1*9880d681SAndroid Build Coastguard Worker// RUN: not llvm-mc -triple x86_64-unknown-unknown --show-encoding %s 2> %t.err | FileCheck --check-prefix=64 %s 2*9880d681SAndroid Build Coastguard Worker// RUN: FileCheck --check-prefix=ERR64 < %t.err %s 3*9880d681SAndroid Build Coastguard Worker// RUN: not llvm-mc -triple i386-unknown-unknown --show-encoding %s 2> %t.err | FileCheck --check-prefix=32 %s 4*9880d681SAndroid Build Coastguard Worker// RUN: FileCheck --check-prefix=ERR32 < %t.err %s 5*9880d681SAndroid Build Coastguard Worker// RUN: not llvm-mc -triple i386-unknown-unknown-code16 --show-encoding %s 2> %t.err | FileCheck --check-prefix=16 %s 6*9880d681SAndroid Build Coastguard Worker// RUN: FileCheck --check-prefix=ERR16 < %t.err %s 7*9880d681SAndroid Build Coastguard Worker 8*9880d681SAndroid Build Coastguard Worker ret 9*9880d681SAndroid Build Coastguard Worker// 64: retq 10*9880d681SAndroid Build Coastguard Worker// 64: encoding: [0xc3] 11*9880d681SAndroid Build Coastguard Worker// 32: retl 12*9880d681SAndroid Build Coastguard Worker// 32: encoding: [0xc3] 13*9880d681SAndroid Build Coastguard Worker// 16: retw 14*9880d681SAndroid Build Coastguard Worker// 16: encoding: [0xc3] 15*9880d681SAndroid Build Coastguard Worker retw 16*9880d681SAndroid Build Coastguard Worker// 64: retw 17*9880d681SAndroid Build Coastguard Worker// 64: encoding: [0x66,0xc3] 18*9880d681SAndroid Build Coastguard Worker// 32: retw 19*9880d681SAndroid Build Coastguard Worker// 32: encoding: [0x66,0xc3] 20*9880d681SAndroid Build Coastguard Worker// 16: retw 21*9880d681SAndroid Build Coastguard Worker// 16: encoding: [0xc3] 22*9880d681SAndroid Build Coastguard Worker retl 23*9880d681SAndroid Build Coastguard Worker// ERR64: error: instruction requires: Not 64-bit mode 24*9880d681SAndroid Build Coastguard Worker// 32: retl 25*9880d681SAndroid Build Coastguard Worker// 32: encoding: [0xc3] 26*9880d681SAndroid Build Coastguard Worker// 16: retl 27*9880d681SAndroid Build Coastguard Worker// 16: encoding: [0x66,0xc3] 28*9880d681SAndroid Build Coastguard Worker retq 29*9880d681SAndroid Build Coastguard Worker// 64: retq 30*9880d681SAndroid Build Coastguard Worker// 64: encoding: [0xc3] 31*9880d681SAndroid Build Coastguard Worker// ERR32: error: instruction requires: 64-bit mode 32*9880d681SAndroid Build Coastguard Worker// ERR16: error: instruction requires: 64-bit mode 33*9880d681SAndroid Build Coastguard Worker 34*9880d681SAndroid Build Coastguard Worker ret $0 35*9880d681SAndroid Build Coastguard Worker// 64: retq $0 36*9880d681SAndroid Build Coastguard Worker// 64: encoding: [0xc2,0x00,0x00] 37*9880d681SAndroid Build Coastguard Worker// 32: retl $0 38*9880d681SAndroid Build Coastguard Worker// 32: encoding: [0xc2,0x00,0x00] 39*9880d681SAndroid Build Coastguard Worker// 16: retw $0 40*9880d681SAndroid Build Coastguard Worker// 16: encoding: [0xc2,0x00,0x00] 41*9880d681SAndroid Build Coastguard Worker retw $0 42*9880d681SAndroid Build Coastguard Worker// 64: retw $0 43*9880d681SAndroid Build Coastguard Worker// 64: encoding: [0x66,0xc2,0x00,0x00] 44*9880d681SAndroid Build Coastguard Worker// 32: retw $0 45*9880d681SAndroid Build Coastguard Worker// 32: encoding: [0x66,0xc2,0x00,0x00] 46*9880d681SAndroid Build Coastguard Worker// 16: retw $0 47*9880d681SAndroid Build Coastguard Worker// 16: encoding: [0xc2,0x00,0x00] 48*9880d681SAndroid Build Coastguard Worker retl $0 49*9880d681SAndroid Build Coastguard Worker// ERR64: error: instruction requires: Not 64-bit mode 50*9880d681SAndroid Build Coastguard Worker// 32: retl $0 51*9880d681SAndroid Build Coastguard Worker// 32: encoding: [0xc2,0x00,0x00] 52*9880d681SAndroid Build Coastguard Worker// 16: retl $0 53*9880d681SAndroid Build Coastguard Worker// 16: encoding: [0x66,0xc2,0x00,0x00] 54*9880d681SAndroid Build Coastguard Worker retq $0 55*9880d681SAndroid Build Coastguard Worker// 64: retq $0 56*9880d681SAndroid Build Coastguard Worker// 64: encoding: [0xc2,0x00,0x00] 57*9880d681SAndroid Build Coastguard Worker// ERR32: error: instruction requires: 64-bit mode 58*9880d681SAndroid Build Coastguard Worker// ERR16: error: instruction requires: 64-bit mode 59*9880d681SAndroid Build Coastguard Worker 60*9880d681SAndroid Build Coastguard Worker lret 61*9880d681SAndroid Build Coastguard Worker// 64: lretl 62*9880d681SAndroid Build Coastguard Worker// 64: encoding: [0xcb] 63*9880d681SAndroid Build Coastguard Worker// 32: lretl 64*9880d681SAndroid Build Coastguard Worker// 32: encoding: [0xcb] 65*9880d681SAndroid Build Coastguard Worker// 16: lretw 66*9880d681SAndroid Build Coastguard Worker// 16: encoding: [0xcb] 67*9880d681SAndroid Build Coastguard Worker lretw 68*9880d681SAndroid Build Coastguard Worker// 64: lretw 69*9880d681SAndroid Build Coastguard Worker// 64: encoding: [0x66,0xcb] 70*9880d681SAndroid Build Coastguard Worker// 32: lretw 71*9880d681SAndroid Build Coastguard Worker// 32: encoding: [0x66,0xcb] 72*9880d681SAndroid Build Coastguard Worker// 16: lretw 73*9880d681SAndroid Build Coastguard Worker// 16: encoding: [0xcb] 74*9880d681SAndroid Build Coastguard Worker lretl 75*9880d681SAndroid Build Coastguard Worker// 64: lretl 76*9880d681SAndroid Build Coastguard Worker// 64: encoding: [0xcb] 77*9880d681SAndroid Build Coastguard Worker// 32: lretl 78*9880d681SAndroid Build Coastguard Worker// 32: encoding: [0xcb] 79*9880d681SAndroid Build Coastguard Worker// 16: lretl 80*9880d681SAndroid Build Coastguard Worker// 16: encoding: [0x66,0xcb] 81*9880d681SAndroid Build Coastguard Worker lretq 82*9880d681SAndroid Build Coastguard Worker// 64: lretq 83*9880d681SAndroid Build Coastguard Worker// 64: encoding: [0x48,0xcb] 84*9880d681SAndroid Build Coastguard Worker// ERR32: error: instruction requires: 64-bit mode 85*9880d681SAndroid Build Coastguard Worker// ERR16: error: instruction requires: 64-bit mode 86*9880d681SAndroid Build Coastguard Worker 87*9880d681SAndroid Build Coastguard Worker lret $0 88*9880d681SAndroid Build Coastguard Worker// 64: lretl $0 89*9880d681SAndroid Build Coastguard Worker// 64: encoding: [0xca,0x00,0x00] 90*9880d681SAndroid Build Coastguard Worker// 32: lretl $0 91*9880d681SAndroid Build Coastguard Worker// 32: encoding: [0xca,0x00,0x00] 92*9880d681SAndroid Build Coastguard Worker// 16: lretw $0 93*9880d681SAndroid Build Coastguard Worker// 16: encoding: [0xca,0x00,0x00] 94*9880d681SAndroid Build Coastguard Worker lretw $0 95*9880d681SAndroid Build Coastguard Worker// 64: lretw $0 96*9880d681SAndroid Build Coastguard Worker// 64: encoding: [0x66,0xca,0x00,0x00] 97*9880d681SAndroid Build Coastguard Worker// 32: lretw $0 98*9880d681SAndroid Build Coastguard Worker// 32: encoding: [0x66,0xca,0x00,0x00] 99*9880d681SAndroid Build Coastguard Worker// 16: lretw $0 100*9880d681SAndroid Build Coastguard Worker// 16: encoding: [0xca,0x00,0x00] 101*9880d681SAndroid Build Coastguard Worker lretl $0 102*9880d681SAndroid Build Coastguard Worker// 64: lretl $0 103*9880d681SAndroid Build Coastguard Worker// 64: encoding: [0xca,0x00,0x00] 104*9880d681SAndroid Build Coastguard Worker// 32: lretl $0 105*9880d681SAndroid Build Coastguard Worker// 32: encoding: [0xca,0x00,0x00] 106*9880d681SAndroid Build Coastguard Worker// 16: lretl $0 107*9880d681SAndroid Build Coastguard Worker// 16: encoding: [0x66,0xca,0x00,0x00] 108*9880d681SAndroid Build Coastguard Worker lretq $0 109*9880d681SAndroid Build Coastguard Worker// 64: lretq $0 110*9880d681SAndroid Build Coastguard Worker// 64: encoding: [0x48,0xca,0x00,0x00] 111*9880d681SAndroid Build Coastguard Worker// ERR32: error: instruction requires: 64-bit mode 112*9880d681SAndroid Build Coastguard Worker// ERR16: error: instruction requires: 64-bit mode 113*9880d681SAndroid Build Coastguard Worker 114*9880d681SAndroid Build Coastguard Worker 115