Upstream version 11.39.266.0
[platform/framework/web/crosswalk.git] / src / native_client / src / trusted / validator_x86 / testdata / 64 / rex_not_last.test
1 @hex:
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.
5   f0 48 0f c7 08
6   # Now show that we don't accept when REX is not last.
7   48 f0 0f c7 08
8 @rval:
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 ***
18 @rvald:
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 ***
27 @vd-rval:
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 ***
37 @dis:
38   0000000000000000: f0 48 0f c7 08                               cmpxchg16b [%rax]
39   0000000000000005: 48 f0 0f c7 08                               cmpxchg16b [%rax]
40 @vdis:
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)
43 @rdfa_output:
44   0: [0] improper memory address - bad base
45   5: [0] unrecognized instruction
46   return code: 1