Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(461)

Side by Side Diff: src/trusted/validator_ragel/testdata/64/bt.test

Issue 18553004: Add more instructions to text-based spec. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: only allow bt* with immediate Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/trusted/validator_ragel/testdata/64/bswap.test ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 @hex: 1 @hex:
2 # Test illegal bit commands. 2 # bt* with register offset and memory as second operand is illegal,
3 # because bit offset can be arbitrarily large.
3 48 0F B3 00 4 48 0F B3 00
4 @dis: 5 @dis:
5 0: 48 0f b3 00 btr %rax,(%rax) 6 0: 48 0f b3 00 btr %rax,(%rax)
6 @rdfa_output: 7 @rdfa_output:
7 0: [0] unrecognized instruction 8 0: [0] unrecognized instruction
8 return code: 1 9 return code: 1
10 @spec:
11 0: ('bt* is only allowed with immediate as bit offset', Instruction(0x0: 48 0f b3 00 btr %rax,(%rax)))
9 ---------------------------------------------------------------------- 12 ----------------------------------------------------------------------
10 @hex: 13 @hex:
11 48 0F AB 00 14 48 0F AB 00
12 @dis: 15 @dis:
13 0: 48 0f ab 00 bts %rax,(%rax) 16 0: 48 0f ab 00 bts %rax,(%rax)
14 @rdfa_output: 17 @rdfa_output:
15 0: [0] unrecognized instruction 18 0: [0] unrecognized instruction
16 return code: 1 19 return code: 1
20 @spec:
21 0: ('bt* is only allowed with immediate as bit offset', Instruction(0x0: 48 0f ab 00 bts %rax,(%rax)))
17 ---------------------------------------------------------------------- 22 ----------------------------------------------------------------------
18 @hex: 23 @hex:
19 48 0F BB 00 24 48 0F BB 00
20 @dis: 25 @dis:
21 0: 48 0f bb 00 btc %rax,(%rax) 26 0: 48 0f bb 00 btc %rax,(%rax)
22 @rdfa_output: 27 @rdfa_output:
23 0: [0] unrecognized instruction 28 0: [0] unrecognized instruction
24 return code: 1 29 return code: 1
30 @spec:
31 0: ('bt* is only allowed with immediate as bit offset', Instruction(0x0: 48 0f bb 00 btc %rax,(%rax)))
25 ---------------------------------------------------------------------- 32 ----------------------------------------------------------------------
26 @hex: 33 @hex:
27 0F BA 30 01 34 0F BA 30 01
28 @dis: 35 @dis:
29 0: 0f ba 30 01 btrl $0x1,(%rax) 36 0: 0f ba 30 01 btrl $0x1,(%rax)
30 @rdfa_output: 37 @rdfa_output:
31 0: [0] improper memory address - bad base 38 0: [0] improper memory address - bad base
32 return code: 1 39 return code: 1
40 @spec:
41 0: ("memory access only is allowed with base from ['%r15', '%rbp', '%rsp', '%r ip']", Instruction(0x0: 0f ba 30 01 btrl $0x1,(%rax)))
33 ---------------------------------------------------------------------- 42 ----------------------------------------------------------------------
34 @hex: 43 @hex:
35 0F BA 28 01 44 0F BA 28 01
36 @dis: 45 @dis:
37 0: 0f ba 28 01 btsl $0x1,(%rax) 46 0: 0f ba 28 01 btsl $0x1,(%rax)
38 @rdfa_output: 47 @rdfa_output:
39 0: [0] improper memory address - bad base 48 0: [0] improper memory address - bad base
40 return code: 1 49 return code: 1
50 @spec:
51 0: ("memory access only is allowed with base from ['%r15', '%rbp', '%rsp', '%r ip']", Instruction(0x0: 0f ba 28 01 btsl $0x1,(%rax)))
41 ---------------------------------------------------------------------- 52 ----------------------------------------------------------------------
42 @hex: 53 @hex:
43 0F BA 38 01 54 0F BA 38 01
44 @dis: 55 @dis:
45 0: 0f ba 38 01 btcl $0x1,(%rax) 56 0: 0f ba 38 01 btcl $0x1,(%rax)
46 @rdfa_output: 57 @rdfa_output:
47 0: [0] improper memory address - bad base 58 0: [0] improper memory address - bad base
48 return code: 1 59 return code: 1
60 @spec:
61 0: ("memory access only is allowed with base from ['%r15', '%rbp', '%rsp', '%r ip']", Instruction(0x0: 0f ba 38 01 btcl $0x1,(%rax)))
62 ----------------------------------------------------------------------
63 @hex:
64 66 41 0f a3 07
65 @dis:
66 0: 66 41 0f a3 07 bt %ax,(%r15)
67 @rdfa_output:
68 0: [0] unrecognized instruction
69 return code: 1
70 @spec:
71 0: ('bt* is only allowed with immediate as bit offset', Instruction(0x0: 66 41 0f a3 07 bt %ax,(%r15)))
72 ----------------------------------------------------------------------
73 @hex:
74 # Technically safe, but for some reason validator only allows immediate
75 # for first operand.
76 48 0f a3 c3
77 @dis:
78 0: 48 0f a3 c3 bt %rax,%rbx
79 @rdfa_output:
80 0: [0] unrecognized instruction
81 return code: 1
82 @spec:
83 0: ('bt* is only allowed with immediate as bit offset', Instruction(0x0: 48 0f a3 c3 bt %rax,%rbx))
49 ---------------------------------------------------------------------- 84 ----------------------------------------------------------------------
50 @hex: 85 @hex:
51 # Test legal bit commands 86 # Test legal bit commands
52 # btw $0x1,(%rsp)
53 66 0F BA 24 24 01 87 66 0F BA 24 24 01
54 # btl $0x1,(%rsp)
55 0F BA 24 24 01 88 0F BA 24 24 01
56 # btq $0x1,(%rsp)
57 48 0F BA 24 24 01 89 48 0F BA 24 24 01
58 # btrl $0x1,(%rsp)
59 0F BA 34 24 01 90 0F BA 34 24 01
60 # btsl $0x1,(%rsp)
61 0F BA 2C 24 01 91 0F BA 2C 24 01
62 # btcl $0x1,(%rsp)
63 0F BA 3C 24 01 92 0F BA 3C 24 01
64 @dis: 93 @dis:
65 0: 66 0f ba 24 24 01 btw $0x1,(%rsp) 94 0: 66 0f ba 24 24 01 btw $0x1,(%rsp)
66 6: 0f ba 24 24 01 btl $0x1,(%rsp) 95 6: 0f ba 24 24 01 btl $0x1,(%rsp)
67 b: 48 0f ba 24 24 01 btq $0x1,(%rsp) 96 b: 48 0f ba 24 24 01 btq $0x1,(%rsp)
68 11: 0f ba 34 24 01 btrl $0x1,(%rsp) 97 11: 0f ba 34 24 01 btrl $0x1,(%rsp)
69 16: 0f ba 2c 24 01 btsl $0x1,(%rsp) 98 16: 0f ba 2c 24 01 btsl $0x1,(%rsp)
70 1b: 0f ba 3c 24 01 btcl $0x1,(%rsp) 99 1b: 0f ba 3c 24 01 btcl $0x1,(%rsp)
71 @rdfa_output: 100 @rdfa_output:
72 return code: 0 101 return code: 0
102 @spec:
103 SAFE
104 ----------------------------------------------------------------------
105 @hex:
106 48 0f ba e0 01
107 48 0f ba fb 01
108 @dis:
109 0: 48 0f ba e0 01 bt $0x1,%rax
110 5: 48 0f ba fb 01 btc $0x1,%rbx
111 @rdfa_output:
112 return code: 0
113 @spec:
114 SAFE
OLDNEW
« no previous file with comments | « src/trusted/validator_ragel/testdata/64/bswap.test ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698