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 lret 61// 64: lretl 62// 64: encoding: [0xcb] 63// 32: lretl 64// 32: encoding: [0xcb] 65// 16: lretw 66// 16: encoding: [0xcb] 67 lretw 68// 64: lretw 69// 64: encoding: [0x66,0xcb] 70// 32: lretw 71// 32: encoding: [0x66,0xcb] 72// 16: lretw 73// 16: encoding: [0xcb] 74 lretl 75// 64: lretl 76// 64: encoding: [0xcb] 77// 32: lretl 78// 32: encoding: [0xcb] 79// 16: lretl 80// 16: encoding: [0x66,0xcb] 81 lretq 82// 64: lretq 83// 64: encoding: [0x48,0xcb] 84// ERR32: error: instruction requires: 64-bit mode 85// ERR16: error: instruction requires: 64-bit mode 86 87 lret $0 88// 64: lretl $0 89// 64: encoding: [0xca,0x00,0x00] 90// 32: lretl $0 91// 32: encoding: [0xca,0x00,0x00] 92// 16: lretw $0 93// 16: encoding: [0xca,0x00,0x00] 94 lretw $0 95// 64: lretw $0 96// 64: encoding: [0x66,0xca,0x00,0x00] 97// 32: lretw $0 98// 32: encoding: [0x66,0xca,0x00,0x00] 99// 16: lretw $0 100// 16: encoding: [0xca,0x00,0x00] 101 lretl $0 102// 64: lretl $0 103// 64: encoding: [0xca,0x00,0x00] 104// 32: lretl $0 105// 32: encoding: [0xca,0x00,0x00] 106// 16: lretl $0 107// 16: encoding: [0x66,0xca,0x00,0x00] 108 lretq $0 109// 64: lretq $0 110// 64: encoding: [0x48,0xca,0x00,0x00] 111// ERR32: error: instruction requires: 64-bit mode 112// ERR16: error: instruction requires: 64-bit mode 113 114 115