1 // RUN
: not llvm-mc
-triple x86_64-unknown-unknown
--show-encoding
%s
2> %t.err | FileCheck
--check-prefix
=64 %s
2 // RUN
: FileCheck
--check-prefix
=ERR64
< %t.err
%s
3 // RUN
: not llvm-mc
-triple i386-unknown-unknown
--show-encoding
%s
2> %t.err | FileCheck
--check-prefix
=32 %s
4 // RUN
: FileCheck
--check-prefix
=ERR32
< %t.err
%s
5 // RUN
: not llvm-mc
-triple i386-unknown-unknown-code16
--show-encoding
%s
2> %t.err | FileCheck
--check-prefix
=16 %s
6 // RUN
: FileCheck
--check-prefix
=ERR16
< %t.err
%s
10 // 64: encoding
: [0xc3]
12 // 32: encoding
: [0xc3]
14 // 16: encoding
: [0xc3]
17 // 64: encoding
: [0x66,0xc3]
19 // 32: encoding
: [0x66,0xc3]
21 // 16: encoding
: [0xc3]
23 // ERR64
: error
: instruction requires
: Not 64-bit mode
25 // 32: encoding
: [0xc3]
27 // 16: encoding
: [0x66,0xc3]
30 // 64: encoding
: [0xc3]
31 // ERR32
: error
: instruction requires
: 64-bit mode
32 // ERR16
: error
: instruction requires
: 64-bit mode
36 // 64: encoding
: [0xc2,0x00,0x00]
38 // 32: encoding
: [0xc2,0x00,0x00]
40 // 16: encoding
: [0xc2,0x00,0x00]
43 // 64: encoding
: [0x66,0xc2,0x00,0x00]
45 // 32: encoding
: [0x66,0xc2,0x00,0x00]
47 // 16: encoding
: [0xc2,0x00,0x00]
49 // ERR64
: error
: instruction requires
: Not 64-bit mode
51 // 32: encoding
: [0xc2,0x00,0x00]
53 // 16: encoding
: [0x66,0xc2,0x00,0x00]
56 // 64: encoding
: [0xc2,0x00,0x00]
57 // ERR32
: error
: instruction requires
: 64-bit mode
58 // ERR16
: error
: instruction requires
: 64-bit mode
62 // 64: encoding
: [0xc3]
64 // 32: encoding
: [0xc3]
66 // 16: encoding
: [0xc3]
70 // 64: encoding
: [0xc2,0x00,0x00]
72 // 32: encoding
: [0xc2,0x00,0x00]
74 // 16: encoding
: [0xc2,0x00,0x00]
78 // 64: encoding
: [0xcb]
80 // 32: encoding
: [0xcb]
82 // 16: encoding
: [0xcb]
85 // 64: encoding
: [0x66,0xcb]
87 // 32: encoding
: [0x66,0xcb]
89 // 16: encoding
: [0xcb]
92 // 64: encoding
: [0xcb]
94 // 32: encoding
: [0xcb]
96 // 16: encoding
: [0x66,0xcb]
99 // 64: encoding
: [0x48,0xcb]
100 // ERR32
: error
: instruction requires
: 64-bit mode
101 // ERR16
: error
: instruction requires
: 64-bit mode
105 // 64: encoding
: [0xca,0x00,0x00]
107 // 32: encoding
: [0xca,0x00,0x00]
109 // 16: encoding
: [0xca,0x00,0x00]
112 // 64: encoding
: [0x66,0xca,0x00,0x00]
114 // 32: encoding
: [0x66,0xca,0x00,0x00]
116 // 16: encoding
: [0xca,0x00,0x00]
119 // 64: encoding
: [0xca,0x00,0x00]
121 // 32: encoding
: [0xca,0x00,0x00]
123 // 16: encoding
: [0x66,0xca,0x00,0x00]
126 // 64: encoding
: [0x48,0xca,0x00,0x00]
127 // ERR32
: error
: instruction requires
: 64-bit mode
128 // ERR16
: error
: instruction requires
: 64-bit mode