2 # Complain about instruction where REX byte is not last.
3 # Use instruction: lock cmpxchg16b (%rax)
4 # Start by showing we accept when REX is last.
6 # Now show that we don't accept when REX is not last.
9 VALIDATOR: 0000000000000000: f0 48 0f c7 08 cmpxchg16b [%rax]
10 VALIDATOR: ERROR: Invalid base register in memory offset
11 VALIDATOR: 0000000000000005: 48 f0 0f c7 08 cmpxchg16b [%rax]
12 VALIDATOR: ERROR: REX prefix byte must appear last
13 VALIDATOR: 0000000000000005: 48 f0 0f c7 08 cmpxchg16b [%rax]
14 VALIDATOR: ERROR: Invalid base register in memory offset
15 VALIDATOR: Checking jump targets: 0 to a
16 VALIDATOR: Checking that basic blocks are aligned
17 *** <input> IS UNSAFE ***
19 VALIDATOR: 0000000000000000: f0 48 0f c7 08 cmpxchg16b [%rax]
20 VALIDATOR: ERROR: Invalid base register in memory offset
21 VALIDATOR: 0000000000000005: 48 f0 0f c7 08 cmpxchg16b [%rax]
22 VALIDATOR: ERROR: REX prefix byte must appear last
23 VALIDATOR: 0000000000000005: 48 f0 0f c7 08 cmpxchg16b [%rax]
24 VALIDATOR: ERROR: Invalid base register in memory offset
25 VALIDATOR: Checking block alignment and jump targets: 0 to a
26 *** <input> IS UNSAFE ***
28 VALIDATOR: 0000000000000000: f0 48 0f c7 08 [P] dontcare %rdx (su), %eax (su), [%rax] (su)
29 VALIDATOR: ERROR: Invalid base register in memory offset
30 VALIDATOR: 0000000000000005: 48 f0 0f c7 08 [P] dontcare %rdx (su), %eax (su), [%rax] (su)
31 VALIDATOR: ERROR: REX prefix byte must appear last
32 VALIDATOR: 0000000000000005: 48 f0 0f c7 08 [P] dontcare %rdx (su), %eax (su), [%rax] (su)
33 VALIDATOR: ERROR: Invalid base register in memory offset
34 VALIDATOR: Checking jump targets: 0 to a
35 VALIDATOR: Checking that basic blocks are aligned
36 *** <input> IS UNSAFE ***
38 0000000000000000: f0 48 0f c7 08 cmpxchg16b [%rax]
39 0000000000000005: 48 f0 0f c7 08 cmpxchg16b [%rax]
41 0000000000000000: f0 48 0f c7 08 [P] dontcare %rdx (su), %eax (su), [%rax] (su)
42 0000000000000005: 48 f0 0f c7 08 [P] dontcare %rdx (su), %eax (su), [%rax] (su)
44 0: [0] improper memory address - bad base
45 5: [0] unrecognized instruction