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 7 8 ret 9// 64: retq 10// 64: encoding: [0xc3] 11// 32: retl 12// 32: encoding: [0xc3] 13// 16: retw 14// 16: encoding: [0xc3] 15 retw 16// 64: retw 17// 64: encoding: [0x66,0xc3] 18// 32: retw 19// 32: encoding: [0x66,0xc3] 20// 16: retw 21// 16: encoding: [0xc3] 22 retl 23// ERR64: error: instruction requires: Not 64-bit mode 24// 32: retl 25// 32: encoding: [0xc3] 26// 16: retl 27// 16: encoding: [0x66,0xc3] 28 retq 29// 64: retq 30// 64: encoding: [0xc3] 31// ERR32: error: instruction requires: 64-bit mode 32// ERR16: error: instruction requires: 64-bit mode 33 34 ret $0 35// 64: retq $0 36// 64: encoding: [0xc2,0x00,0x00] 37// 32: retl $0 38// 32: encoding: [0xc2,0x00,0x00] 39// 16: retw $0 40// 16: encoding: [0xc2,0x00,0x00] 41 retw $0 42// 64: retw $0 43// 64: encoding: [0x66,0xc2,0x00,0x00] 44// 32: retw $0 45// 32: encoding: [0x66,0xc2,0x00,0x00] 46// 16: retw $0 47// 16: encoding: [0xc2,0x00,0x00] 48 retl $0 49// ERR64: error: instruction requires: Not 64-bit mode 50// 32: retl $0 51// 32: encoding: [0xc2,0x00,0x00] 52// 16: retl $0 53// 16: encoding: [0x66,0xc2,0x00,0x00] 54 retq $0 55// 64: retq $0 56// 64: encoding: [0xc2,0x00,0x00] 57// ERR32: error: instruction requires: 64-bit mode 58// ERR16: error: instruction requires: 64-bit mode 59 60 retn 61// 64: retq 62// 64: encoding: [0xc3] 63// 32: retl 64// 32: encoding: [0xc3] 65// 16: retw 66// 16: encoding: [0xc3] 67 68 retn $0 69// 64: retq $0 70// 64: encoding: [0xc2,0x00,0x00] 71// 32: retl $0 72// 32: encoding: [0xc2,0x00,0x00] 73// 16: retw $0 74// 16: encoding: [0xc2,0x00,0x00] 75 76 lret 77// 64: lretl 78// 64: encoding: [0xcb] 79// 32: lretl 80// 32: encoding: [0xcb] 81// 16: lretw 82// 16: encoding: [0xcb] 83 lretw 84// 64: lretw 85// 64: encoding: [0x66,0xcb] 86// 32: lretw 87// 32: encoding: [0x66,0xcb] 88// 16: lretw 89// 16: encoding: [0xcb] 90 lretl 91// 64: lretl 92// 64: encoding: [0xcb] 93// 32: lretl 94// 32: encoding: [0xcb] 95// 16: lretl 96// 16: encoding: [0x66,0xcb] 97 lretq 98// 64: lretq 99// 64: encoding: [0x48,0xcb] 100// ERR32: error: instruction requires: 64-bit mode 101// ERR16: error: instruction requires: 64-bit mode 102 103 lret $0 104// 64: lretl $0 105// 64: encoding: [0xca,0x00,0x00] 106// 32: lretl $0 107// 32: encoding: [0xca,0x00,0x00] 108// 16: lretw $0 109// 16: encoding: [0xca,0x00,0x00] 110 lretw $0 111// 64: lretw $0 112// 64: encoding: [0x66,0xca,0x00,0x00] 113// 32: lretw $0 114// 32: encoding: [0x66,0xca,0x00,0x00] 115// 16: lretw $0 116// 16: encoding: [0xca,0x00,0x00] 117 lretl $0 118// 64: lretl $0 119// 64: encoding: [0xca,0x00,0x00] 120// 32: lretl $0 121// 32: encoding: [0xca,0x00,0x00] 122// 16: lretl $0 123// 16: encoding: [0x66,0xca,0x00,0x00] 124 lretq $0 125// 64: lretq $0 126// 64: encoding: [0x48,0xca,0x00,0x00] 127// ERR32: error: instruction requires: 64-bit mode 128// ERR16: error: instruction requires: 64-bit mode 129 130 131