1*9880d681SAndroid Build Coastguard Worker@ New ARMv8 T32 encodings 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker@ RUN: llvm-mc -triple thumbv8 -show-encoding < %s | FileCheck %s --check-prefix=CHECK-V8 4*9880d681SAndroid Build Coastguard Worker@ RUN: not llvm-mc -triple thumbv7 -show-encoding < %s 2>&1 | FileCheck %s --check-prefix=CHECK-V7 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Worker@ HLT (in ARMv8 only) 7*9880d681SAndroid Build Coastguard Worker hlt #0 8*9880d681SAndroid Build Coastguard Worker hlt #63 9*9880d681SAndroid Build Coastguard Worker@ CHECK-V8: hlt #0 @ encoding: [0x80,0xba] 10*9880d681SAndroid Build Coastguard Worker@ CHECK-V8: hlt #63 @ encoding: [0xbf,0xba] 11*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: instruction requires: armv8 12*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: instruction requires: armv8 13*9880d681SAndroid Build Coastguard Worker 14*9880d681SAndroid Build Coastguard Worker@ In IT block 15*9880d681SAndroid Build Coastguard Worker it pl 16*9880d681SAndroid Build Coastguard Worker hlt #24 17*9880d681SAndroid Build Coastguard Worker 18*9880d681SAndroid Build Coastguard Worker@ CHECK-V8: it pl @ encoding: [0x58,0xbf] 19*9880d681SAndroid Build Coastguard Worker@ CHECK-V8: hlt #24 @ encoding: [0x98,0xba] 20*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: instruction requires: armv8 21*9880d681SAndroid Build Coastguard Worker 22*9880d681SAndroid Build Coastguard Worker@ Can accept AL condition code (in ARMv8 only) 23*9880d681SAndroid Build Coastguard Worker hltal #24 24*9880d681SAndroid Build Coastguard Worker@ CHECK-V8: hlt #24 @ encoding: [0x98,0xba] 25*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: instruction requires: armv8 26*9880d681SAndroid Build Coastguard Worker 27*9880d681SAndroid Build Coastguard Worker@ Can accept SP as rGPR (in ARMv8 only) 28*9880d681SAndroid Build Coastguard Worker sbc.w r6, r3, sp, asr #16 29*9880d681SAndroid Build Coastguard Worker and.w r6, r3, sp, asr #16 30*9880d681SAndroid Build Coastguard Worker and sp, r0, #0 31*9880d681SAndroid Build Coastguard Worker@ CHECK-V8: sbc.w r6, r3, sp, asr #16 @ encoding: [0x63,0xeb,0x2d,0x46] 32*9880d681SAndroid Build Coastguard Worker@ CHECK-V8: and.w r6, r3, sp, asr #16 @ encoding: [0x03,0xea,0x2d,0x46] 33*9880d681SAndroid Build Coastguard Worker@ CHECK-V8: and sp, r0, #0 @ encoding: [0x00,0xf0,0x00,0x0d] 34*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: instruction variant requires ARMv8 or later 35*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: instruction variant requires ARMv8 or later 36*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: invalid operand for instruction 37*9880d681SAndroid Build Coastguard Worker 38*9880d681SAndroid Build Coastguard Worker@ DCPS{1,2,3} (in ARMv8 only) 39*9880d681SAndroid Build Coastguard Worker dcps1 40*9880d681SAndroid Build Coastguard Worker dcps2 41*9880d681SAndroid Build Coastguard Worker dcps3 42*9880d681SAndroid Build Coastguard Worker@ CHECK-V8: dcps1 @ encoding: [0x8f,0xf7,0x01,0x80] 43*9880d681SAndroid Build Coastguard Worker@ CHECK-V8: dcps2 @ encoding: [0x8f,0xf7,0x02,0x80] 44*9880d681SAndroid Build Coastguard Worker@ CHECK-V8: dcps3 @ encoding: [0x8f,0xf7,0x03,0x80] 45*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: instruction requires: armv8 46*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: instruction requires: armv8 47*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: instruction requires: armv8 48*9880d681SAndroid Build Coastguard Worker 49*9880d681SAndroid Build Coastguard Worker@------------------------------------------------------------------------------ 50*9880d681SAndroid Build Coastguard Worker@ DMB (ARMv8-only barriers) 51*9880d681SAndroid Build Coastguard Worker@------------------------------------------------------------------------------ 52*9880d681SAndroid Build Coastguard Worker dmb ishld 53*9880d681SAndroid Build Coastguard Worker dmb oshld 54*9880d681SAndroid Build Coastguard Worker dmb nshld 55*9880d681SAndroid Build Coastguard Worker dmb ld 56*9880d681SAndroid Build Coastguard Worker 57*9880d681SAndroid Build Coastguard Worker@ CHECK-V8: dmb ishld @ encoding: [0xbf,0xf3,0x59,0x8f] 58*9880d681SAndroid Build Coastguard Worker@ CHECK-V8: dmb oshld @ encoding: [0xbf,0xf3,0x51,0x8f] 59*9880d681SAndroid Build Coastguard Worker@ CHECK-V8: dmb nshld @ encoding: [0xbf,0xf3,0x55,0x8f] 60*9880d681SAndroid Build Coastguard Worker@ CHECK-V8: dmb ld @ encoding: [0xbf,0xf3,0x5d,0x8f] 61*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: invalid operand for instruction 62*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: invalid operand for instruction 63*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: invalid operand for instruction 64*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: invalid operand for instruction 65*9880d681SAndroid Build Coastguard Worker 66*9880d681SAndroid Build Coastguard Worker@------------------------------------------------------------------------------ 67*9880d681SAndroid Build Coastguard Worker@ DSB (ARMv8-only barriers) 68*9880d681SAndroid Build Coastguard Worker@------------------------------------------------------------------------------ 69*9880d681SAndroid Build Coastguard Worker dsb ishld 70*9880d681SAndroid Build Coastguard Worker dsb oshld 71*9880d681SAndroid Build Coastguard Worker dsb nshld 72*9880d681SAndroid Build Coastguard Worker dsb ld 73*9880d681SAndroid Build Coastguard Worker 74*9880d681SAndroid Build Coastguard Worker@ CHECK-V8: dsb ishld @ encoding: [0xbf,0xf3,0x49,0x8f] 75*9880d681SAndroid Build Coastguard Worker@ CHECK-V8: dsb oshld @ encoding: [0xbf,0xf3,0x41,0x8f] 76*9880d681SAndroid Build Coastguard Worker@ CHECK-V8: dsb nshld @ encoding: [0xbf,0xf3,0x45,0x8f] 77*9880d681SAndroid Build Coastguard Worker@ CHECK-V8: dsb ld @ encoding: [0xbf,0xf3,0x4d,0x8f] 78*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: invalid operand for instruction 79*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: invalid operand for instruction 80*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: invalid operand for instruction 81*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: invalid operand for instruction 82*9880d681SAndroid Build Coastguard Worker 83*9880d681SAndroid Build Coastguard Worker@------------------------------------------------------------------------------ 84*9880d681SAndroid Build Coastguard Worker@ SEVL (in ARMv8 only) 85*9880d681SAndroid Build Coastguard Worker@------------------------------------------------------------------------------ 86*9880d681SAndroid Build Coastguard Worker sevl 87*9880d681SAndroid Build Coastguard Worker sevl.w 88*9880d681SAndroid Build Coastguard Worker it ge 89*9880d681SAndroid Build Coastguard Worker sevlge 90*9880d681SAndroid Build Coastguard Worker 91*9880d681SAndroid Build Coastguard Worker@ CHECK-V8: sevl @ encoding: [0x50,0xbf] 92*9880d681SAndroid Build Coastguard Worker@ CHECK-V8: sevl.w @ encoding: [0xaf,0xf3,0x05,0x80] 93*9880d681SAndroid Build Coastguard Worker@ CHECK-V8: it ge @ encoding: [0xa8,0xbf] 94*9880d681SAndroid Build Coastguard Worker@ CHECK-V8: sevlge @ encoding: [0x50,0xbf] 95*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: instruction requires: armv8 96*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: instruction requires: armv8 97*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: 98*9880d681SAndroid Build Coastguard Worker@ CHECK-V7: error: instruction requires: armv8 99