1*9880d681SAndroid Build Coastguard Worker; RUN: llvm-mc -triple arm64-apple-darwin -mattr=neon -show-encoding < %s | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Workerfoo: 4*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 5*9880d681SAndroid Build Coastguard Worker; Add/Subtract with carry/borrow 6*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 7*9880d681SAndroid Build Coastguard Worker 8*9880d681SAndroid Build Coastguard Worker adc w1, w2, w3 9*9880d681SAndroid Build Coastguard Worker adc x1, x2, x3 10*9880d681SAndroid Build Coastguard Worker adcs w5, w4, w3 11*9880d681SAndroid Build Coastguard Worker adcs x5, x4, x3 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Worker; CHECK: adc w1, w2, w3 ; encoding: [0x41,0x00,0x03,0x1a] 14*9880d681SAndroid Build Coastguard Worker; CHECK: adc x1, x2, x3 ; encoding: [0x41,0x00,0x03,0x9a] 15*9880d681SAndroid Build Coastguard Worker; CHECK: adcs w5, w4, w3 ; encoding: [0x85,0x00,0x03,0x3a] 16*9880d681SAndroid Build Coastguard Worker; CHECK: adcs x5, x4, x3 ; encoding: [0x85,0x00,0x03,0xba] 17*9880d681SAndroid Build Coastguard Worker 18*9880d681SAndroid Build Coastguard Worker sbc w1, w2, w3 19*9880d681SAndroid Build Coastguard Worker sbc x1, x2, x3 20*9880d681SAndroid Build Coastguard Worker sbcs w1, w2, w3 21*9880d681SAndroid Build Coastguard Worker sbcs x1, x2, x3 22*9880d681SAndroid Build Coastguard Worker 23*9880d681SAndroid Build Coastguard Worker; CHECK: sbc w1, w2, w3 ; encoding: [0x41,0x00,0x03,0x5a] 24*9880d681SAndroid Build Coastguard Worker; CHECK: sbc x1, x2, x3 ; encoding: [0x41,0x00,0x03,0xda] 25*9880d681SAndroid Build Coastguard Worker; CHECK: sbcs w1, w2, w3 ; encoding: [0x41,0x00,0x03,0x7a] 26*9880d681SAndroid Build Coastguard Worker; CHECK: sbcs x1, x2, x3 ; encoding: [0x41,0x00,0x03,0xfa] 27*9880d681SAndroid Build Coastguard Worker 28*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 29*9880d681SAndroid Build Coastguard Worker; Add/Subtract with (optionally shifted) immediate 30*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 31*9880d681SAndroid Build Coastguard Worker 32*9880d681SAndroid Build Coastguard Worker add w3, w4, #1024 33*9880d681SAndroid Build Coastguard Worker add w3, w4, #1024, lsl #0 34*9880d681SAndroid Build Coastguard Worker add x3, x4, #1024 35*9880d681SAndroid Build Coastguard Worker add x3, x4, #1024, lsl #0 36*9880d681SAndroid Build Coastguard Worker 37*9880d681SAndroid Build Coastguard Worker; CHECK: add w3, w4, #1024 ; encoding: [0x83,0x00,0x10,0x11] 38*9880d681SAndroid Build Coastguard Worker; CHECK: add w3, w4, #1024 ; encoding: [0x83,0x00,0x10,0x11] 39*9880d681SAndroid Build Coastguard Worker; CHECK: add x3, x4, #1024 ; encoding: [0x83,0x00,0x10,0x91] 40*9880d681SAndroid Build Coastguard Worker; CHECK: add x3, x4, #1024 ; encoding: [0x83,0x00,0x10,0x91] 41*9880d681SAndroid Build Coastguard Worker 42*9880d681SAndroid Build Coastguard Worker add w3, w4, #1024, lsl #12 43*9880d681SAndroid Build Coastguard Worker add w3, w4, #4194304 44*9880d681SAndroid Build Coastguard Worker add w3, w4, #0, lsl #12 45*9880d681SAndroid Build Coastguard Worker add x3, x4, #1024, lsl #12 46*9880d681SAndroid Build Coastguard Worker add x3, x4, #4194304 47*9880d681SAndroid Build Coastguard Worker add x3, x4, #0, lsl #12 48*9880d681SAndroid Build Coastguard Worker add sp, sp, #32 49*9880d681SAndroid Build Coastguard Worker 50*9880d681SAndroid Build Coastguard Worker; CHECK: add w3, w4, #1024, lsl #12 ; encoding: [0x83,0x00,0x50,0x11] 51*9880d681SAndroid Build Coastguard Worker; CHECK: add w3, w4, #1024, lsl #12 ; encoding: [0x83,0x00,0x50,0x11] 52*9880d681SAndroid Build Coastguard Worker; CHECK: add w3, w4, #0, lsl #12 ; encoding: [0x83,0x00,0x40,0x11] 53*9880d681SAndroid Build Coastguard Worker; CHECK: add x3, x4, #1024, lsl #12 ; encoding: [0x83,0x00,0x50,0x91] 54*9880d681SAndroid Build Coastguard Worker; CHECK: add x3, x4, #1024, lsl #12 ; encoding: [0x83,0x00,0x50,0x91] 55*9880d681SAndroid Build Coastguard Worker; CHECK: add x3, x4, #0, lsl #12 ; encoding: [0x83,0x00,0x40,0x91] 56*9880d681SAndroid Build Coastguard Worker; CHECK: add sp, sp, #32 ; encoding: [0xff,0x83,0x00,0x91] 57*9880d681SAndroid Build Coastguard Worker 58*9880d681SAndroid Build Coastguard Worker adds w3, w4, #1024 59*9880d681SAndroid Build Coastguard Worker adds w3, w4, #1024, lsl #0 60*9880d681SAndroid Build Coastguard Worker adds w3, w4, #1024, lsl #12 61*9880d681SAndroid Build Coastguard Worker adds x3, x4, #1024 62*9880d681SAndroid Build Coastguard Worker adds x3, x4, #1024, lsl #0 63*9880d681SAndroid Build Coastguard Worker adds x3, x4, #1024, lsl #12 64*9880d681SAndroid Build Coastguard Worker 65*9880d681SAndroid Build Coastguard Worker; CHECK: adds w3, w4, #1024 ; encoding: [0x83,0x00,0x10,0x31] 66*9880d681SAndroid Build Coastguard Worker; CHECK: adds w3, w4, #1024 ; encoding: [0x83,0x00,0x10,0x31] 67*9880d681SAndroid Build Coastguard Worker; CHECK: adds w3, w4, #1024, lsl #12 ; encoding: [0x83,0x00,0x50,0x31] 68*9880d681SAndroid Build Coastguard Worker; CHECK: adds x3, x4, #1024 ; encoding: [0x83,0x00,0x10,0xb1] 69*9880d681SAndroid Build Coastguard Worker; CHECK: adds x3, x4, #1024 ; encoding: [0x83,0x00,0x10,0xb1] 70*9880d681SAndroid Build Coastguard Worker; CHECK: adds x3, x4, #1024, lsl #12 ; encoding: [0x83,0x00,0x50,0xb1] 71*9880d681SAndroid Build Coastguard Worker 72*9880d681SAndroid Build Coastguard Worker sub w3, w4, #1024 73*9880d681SAndroid Build Coastguard Worker sub w3, w4, #1024, lsl #0 74*9880d681SAndroid Build Coastguard Worker sub w3, w4, #1024, lsl #12 75*9880d681SAndroid Build Coastguard Worker sub x3, x4, #1024 76*9880d681SAndroid Build Coastguard Worker sub x3, x4, #1024, lsl #0 77*9880d681SAndroid Build Coastguard Worker sub x3, x4, #1024, lsl #12 78*9880d681SAndroid Build Coastguard Worker sub sp, sp, #32 79*9880d681SAndroid Build Coastguard Worker 80*9880d681SAndroid Build Coastguard Worker; CHECK: sub w3, w4, #1024 ; encoding: [0x83,0x00,0x10,0x51] 81*9880d681SAndroid Build Coastguard Worker; CHECK: sub w3, w4, #1024 ; encoding: [0x83,0x00,0x10,0x51] 82*9880d681SAndroid Build Coastguard Worker; CHECK: sub w3, w4, #1024, lsl #12 ; encoding: [0x83,0x00,0x50,0x51] 83*9880d681SAndroid Build Coastguard Worker; CHECK: sub x3, x4, #1024 ; encoding: [0x83,0x00,0x10,0xd1] 84*9880d681SAndroid Build Coastguard Worker; CHECK: sub x3, x4, #1024 ; encoding: [0x83,0x00,0x10,0xd1] 85*9880d681SAndroid Build Coastguard Worker; CHECK: sub x3, x4, #1024, lsl #12 ; encoding: [0x83,0x00,0x50,0xd1] 86*9880d681SAndroid Build Coastguard Worker; CHECK: sub sp, sp, #32 ; encoding: [0xff,0x83,0x00,0xd1] 87*9880d681SAndroid Build Coastguard Worker 88*9880d681SAndroid Build Coastguard Worker subs w3, w4, #1024 89*9880d681SAndroid Build Coastguard Worker subs w3, w4, #1024, lsl #0 90*9880d681SAndroid Build Coastguard Worker subs w3, w4, #1024, lsl #12 91*9880d681SAndroid Build Coastguard Worker subs x3, x4, #1024 92*9880d681SAndroid Build Coastguard Worker subs x3, x4, #1024, lsl #0 93*9880d681SAndroid Build Coastguard Worker subs x3, x4, #1024, lsl #12 94*9880d681SAndroid Build Coastguard Worker 95*9880d681SAndroid Build Coastguard Worker; CHECK: subs w3, w4, #1024 ; encoding: [0x83,0x00,0x10,0x71] 96*9880d681SAndroid Build Coastguard Worker; CHECK: subs w3, w4, #1024 ; encoding: [0x83,0x00,0x10,0x71] 97*9880d681SAndroid Build Coastguard Worker; CHECK: subs w3, w4, #1024, lsl #12 ; encoding: [0x83,0x00,0x50,0x71] 98*9880d681SAndroid Build Coastguard Worker; CHECK: subs x3, x4, #1024 ; encoding: [0x83,0x00,0x10,0xf1] 99*9880d681SAndroid Build Coastguard Worker; CHECK: subs x3, x4, #1024 ; encoding: [0x83,0x00,0x10,0xf1] 100*9880d681SAndroid Build Coastguard Worker; CHECK: subs x3, x4, #1024, lsl #12 ; encoding: [0x83,0x00,0x50,0xf1] 101*9880d681SAndroid Build Coastguard Worker 102*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 103*9880d681SAndroid Build Coastguard Worker; Add/Subtract register with (optional) shift 104*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 105*9880d681SAndroid Build Coastguard Worker 106*9880d681SAndroid Build Coastguard Worker add w12, w13, w14 107*9880d681SAndroid Build Coastguard Worker add x12, x13, x14 108*9880d681SAndroid Build Coastguard Worker add w12, w13, w14, lsl #12 109*9880d681SAndroid Build Coastguard Worker add x12, x13, x14, lsl #12 110*9880d681SAndroid Build Coastguard Worker add x12, x13, x14, lsr #42 111*9880d681SAndroid Build Coastguard Worker add x12, x13, x14, asr #39 112*9880d681SAndroid Build Coastguard Worker 113*9880d681SAndroid Build Coastguard Worker; CHECK: add w12, w13, w14 ; encoding: [0xac,0x01,0x0e,0x0b] 114*9880d681SAndroid Build Coastguard Worker; CHECK: add x12, x13, x14 ; encoding: [0xac,0x01,0x0e,0x8b] 115*9880d681SAndroid Build Coastguard Worker; CHECK: add w12, w13, w14, lsl #12 ; encoding: [0xac,0x31,0x0e,0x0b] 116*9880d681SAndroid Build Coastguard Worker; CHECK: add x12, x13, x14, lsl #12 ; encoding: [0xac,0x31,0x0e,0x8b] 117*9880d681SAndroid Build Coastguard Worker; CHECK: add x12, x13, x14, lsr #42 ; encoding: [0xac,0xa9,0x4e,0x8b] 118*9880d681SAndroid Build Coastguard Worker; CHECK: add x12, x13, x14, asr #39 ; encoding: [0xac,0x9d,0x8e,0x8b] 119*9880d681SAndroid Build Coastguard Worker 120*9880d681SAndroid Build Coastguard Worker sub w12, w13, w14 121*9880d681SAndroid Build Coastguard Worker sub x12, x13, x14 122*9880d681SAndroid Build Coastguard Worker sub w12, w13, w14, lsl #12 123*9880d681SAndroid Build Coastguard Worker sub x12, x13, x14, lsl #12 124*9880d681SAndroid Build Coastguard Worker sub x12, x13, x14, lsr #42 125*9880d681SAndroid Build Coastguard Worker sub x12, x13, x14, asr #39 126*9880d681SAndroid Build Coastguard Worker 127*9880d681SAndroid Build Coastguard Worker; CHECK: sub w12, w13, w14 ; encoding: [0xac,0x01,0x0e,0x4b] 128*9880d681SAndroid Build Coastguard Worker; CHECK: sub x12, x13, x14 ; encoding: [0xac,0x01,0x0e,0xcb] 129*9880d681SAndroid Build Coastguard Worker; CHECK: sub w12, w13, w14, lsl #12 ; encoding: [0xac,0x31,0x0e,0x4b] 130*9880d681SAndroid Build Coastguard Worker; CHECK: sub x12, x13, x14, lsl #12 ; encoding: [0xac,0x31,0x0e,0xcb] 131*9880d681SAndroid Build Coastguard Worker; CHECK: sub x12, x13, x14, lsr #42 ; encoding: [0xac,0xa9,0x4e,0xcb] 132*9880d681SAndroid Build Coastguard Worker; CHECK: sub x12, x13, x14, asr #39 ; encoding: [0xac,0x9d,0x8e,0xcb] 133*9880d681SAndroid Build Coastguard Worker 134*9880d681SAndroid Build Coastguard Worker adds w12, w13, w14 135*9880d681SAndroid Build Coastguard Worker adds x12, x13, x14 136*9880d681SAndroid Build Coastguard Worker adds w12, w13, w14, lsl #12 137*9880d681SAndroid Build Coastguard Worker adds x12, x13, x14, lsl #12 138*9880d681SAndroid Build Coastguard Worker adds x12, x13, x14, lsr #42 139*9880d681SAndroid Build Coastguard Worker adds x12, x13, x14, asr #39 140*9880d681SAndroid Build Coastguard Worker 141*9880d681SAndroid Build Coastguard Worker; CHECK: adds w12, w13, w14 ; encoding: [0xac,0x01,0x0e,0x2b] 142*9880d681SAndroid Build Coastguard Worker; CHECK: adds x12, x13, x14 ; encoding: [0xac,0x01,0x0e,0xab] 143*9880d681SAndroid Build Coastguard Worker; CHECK: adds w12, w13, w14, lsl #12 ; encoding: [0xac,0x31,0x0e,0x2b] 144*9880d681SAndroid Build Coastguard Worker; CHECK: adds x12, x13, x14, lsl #12 ; encoding: [0xac,0x31,0x0e,0xab] 145*9880d681SAndroid Build Coastguard Worker; CHECK: adds x12, x13, x14, lsr #42 ; encoding: [0xac,0xa9,0x4e,0xab] 146*9880d681SAndroid Build Coastguard Worker; CHECK: adds x12, x13, x14, asr #39 ; encoding: [0xac,0x9d,0x8e,0xab] 147*9880d681SAndroid Build Coastguard Worker 148*9880d681SAndroid Build Coastguard Worker subs w12, w13, w14 149*9880d681SAndroid Build Coastguard Worker subs x12, x13, x14 150*9880d681SAndroid Build Coastguard Worker subs w12, w13, w14, lsl #12 151*9880d681SAndroid Build Coastguard Worker subs x12, x13, x14, lsl #12 152*9880d681SAndroid Build Coastguard Worker subs x12, x13, x14, lsr #42 153*9880d681SAndroid Build Coastguard Worker subs x12, x13, x14, asr #39 154*9880d681SAndroid Build Coastguard Worker 155*9880d681SAndroid Build Coastguard Worker; CHECK: subs w12, w13, w14 ; encoding: [0xac,0x01,0x0e,0x6b] 156*9880d681SAndroid Build Coastguard Worker; CHECK: subs x12, x13, x14 ; encoding: [0xac,0x01,0x0e,0xeb] 157*9880d681SAndroid Build Coastguard Worker; CHECK: subs w12, w13, w14, lsl #12 ; encoding: [0xac,0x31,0x0e,0x6b] 158*9880d681SAndroid Build Coastguard Worker; CHECK: subs x12, x13, x14, lsl #12 ; encoding: [0xac,0x31,0x0e,0xeb] 159*9880d681SAndroid Build Coastguard Worker; CHECK: subs x12, x13, x14, lsr #42 ; encoding: [0xac,0xa9,0x4e,0xeb] 160*9880d681SAndroid Build Coastguard Worker; CHECK: subs x12, x13, x14, asr #39 ; encoding: [0xac,0x9d,0x8e,0xeb] 161*9880d681SAndroid Build Coastguard Worker 162*9880d681SAndroid Build Coastguard Worker; Check use of upper case register names rdar://14354073 163*9880d681SAndroid Build Coastguard Worker add X2, X2, X2 164*9880d681SAndroid Build Coastguard Worker; CHECK: add x2, x2, x2 ; encoding: [0x42,0x00,0x02,0x8b] 165*9880d681SAndroid Build Coastguard Worker 166*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 167*9880d681SAndroid Build Coastguard Worker; Add/Subtract with (optional) extend 168*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 169*9880d681SAndroid Build Coastguard Worker 170*9880d681SAndroid Build Coastguard Worker add w1, w2, w3, uxtb 171*9880d681SAndroid Build Coastguard Worker add w1, w2, w3, uxth 172*9880d681SAndroid Build Coastguard Worker add w1, w2, w3, uxtw 173*9880d681SAndroid Build Coastguard Worker add w1, w2, w3, uxtx 174*9880d681SAndroid Build Coastguard Worker add w1, w2, w3, sxtb 175*9880d681SAndroid Build Coastguard Worker add w1, w2, w3, sxth 176*9880d681SAndroid Build Coastguard Worker add w1, w2, w3, sxtw 177*9880d681SAndroid Build Coastguard Worker add w1, w2, w3, sxtx 178*9880d681SAndroid Build Coastguard Worker 179*9880d681SAndroid Build Coastguard Worker; CHECK: add w1, w2, w3, uxtb ; encoding: [0x41,0x00,0x23,0x0b] 180*9880d681SAndroid Build Coastguard Worker; CHECK: add w1, w2, w3, uxth ; encoding: [0x41,0x20,0x23,0x0b] 181*9880d681SAndroid Build Coastguard Worker; CHECK: add w1, w2, w3, uxtw ; encoding: [0x41,0x40,0x23,0x0b] 182*9880d681SAndroid Build Coastguard Worker; CHECK: add w1, w2, w3, uxtx ; encoding: [0x41,0x60,0x23,0x0b] 183*9880d681SAndroid Build Coastguard Worker; CHECK: add w1, w2, w3, sxtb ; encoding: [0x41,0x80,0x23,0x0b] 184*9880d681SAndroid Build Coastguard Worker; CHECK: add w1, w2, w3, sxth ; encoding: [0x41,0xa0,0x23,0x0b] 185*9880d681SAndroid Build Coastguard Worker; CHECK: add w1, w2, w3, sxtw ; encoding: [0x41,0xc0,0x23,0x0b] 186*9880d681SAndroid Build Coastguard Worker; CHECK: add w1, w2, w3, sxtx ; encoding: [0x41,0xe0,0x23,0x0b] 187*9880d681SAndroid Build Coastguard Worker 188*9880d681SAndroid Build Coastguard Worker add x1, x2, w3, uxtb 189*9880d681SAndroid Build Coastguard Worker add x1, x2, w3, uxth 190*9880d681SAndroid Build Coastguard Worker add x1, x2, w3, uxtw 191*9880d681SAndroid Build Coastguard Worker add x1, x2, w3, sxtb 192*9880d681SAndroid Build Coastguard Worker add x1, x2, w3, sxth 193*9880d681SAndroid Build Coastguard Worker add x1, x2, w3, sxtw 194*9880d681SAndroid Build Coastguard Worker 195*9880d681SAndroid Build Coastguard Worker; CHECK: add x1, x2, w3, uxtb ; encoding: [0x41,0x00,0x23,0x8b] 196*9880d681SAndroid Build Coastguard Worker; CHECK: add x1, x2, w3, uxth ; encoding: [0x41,0x20,0x23,0x8b] 197*9880d681SAndroid Build Coastguard Worker; CHECK: add x1, x2, w3, uxtw ; encoding: [0x41,0x40,0x23,0x8b] 198*9880d681SAndroid Build Coastguard Worker; CHECK: add x1, x2, w3, sxtb ; encoding: [0x41,0x80,0x23,0x8b] 199*9880d681SAndroid Build Coastguard Worker; CHECK: add x1, x2, w3, sxth ; encoding: [0x41,0xa0,0x23,0x8b] 200*9880d681SAndroid Build Coastguard Worker; CHECK: add x1, x2, w3, sxtw ; encoding: [0x41,0xc0,0x23,0x8b] 201*9880d681SAndroid Build Coastguard Worker 202*9880d681SAndroid Build Coastguard Worker add w1, wsp, w3 203*9880d681SAndroid Build Coastguard Worker add w1, wsp, w3, uxtw #0 204*9880d681SAndroid Build Coastguard Worker add w2, wsp, w3, lsl #1 205*9880d681SAndroid Build Coastguard Worker add sp, x2, x3 206*9880d681SAndroid Build Coastguard Worker add sp, x2, x3, uxtx #0 207*9880d681SAndroid Build Coastguard Worker 208*9880d681SAndroid Build Coastguard Worker; CHECK: add w1, wsp, w3 ; encoding: [0xe1,0x43,0x23,0x0b] 209*9880d681SAndroid Build Coastguard Worker; CHECK: add w1, wsp, w3 ; encoding: [0xe1,0x43,0x23,0x0b] 210*9880d681SAndroid Build Coastguard Worker; CHECK: add w2, wsp, w3, lsl #1 ; encoding: [0xe2,0x47,0x23,0x0b] 211*9880d681SAndroid Build Coastguard Worker; CHECK: add sp, x2, x3 ; encoding: [0x5f,0x60,0x23,0x8b] 212*9880d681SAndroid Build Coastguard Worker; CHECK: add sp, x2, x3 ; encoding: [0x5f,0x60,0x23,0x8b] 213*9880d681SAndroid Build Coastguard Worker 214*9880d681SAndroid Build Coastguard Worker sub w1, w2, w3, uxtb 215*9880d681SAndroid Build Coastguard Worker sub w1, w2, w3, uxth 216*9880d681SAndroid Build Coastguard Worker sub w1, w2, w3, uxtw 217*9880d681SAndroid Build Coastguard Worker sub w1, w2, w3, uxtx 218*9880d681SAndroid Build Coastguard Worker sub w1, w2, w3, sxtb 219*9880d681SAndroid Build Coastguard Worker sub w1, w2, w3, sxth 220*9880d681SAndroid Build Coastguard Worker sub w1, w2, w3, sxtw 221*9880d681SAndroid Build Coastguard Worker sub w1, w2, w3, sxtx 222*9880d681SAndroid Build Coastguard Worker 223*9880d681SAndroid Build Coastguard Worker; CHECK: sub w1, w2, w3, uxtb ; encoding: [0x41,0x00,0x23,0x4b] 224*9880d681SAndroid Build Coastguard Worker; CHECK: sub w1, w2, w3, uxth ; encoding: [0x41,0x20,0x23,0x4b] 225*9880d681SAndroid Build Coastguard Worker; CHECK: sub w1, w2, w3, uxtw ; encoding: [0x41,0x40,0x23,0x4b] 226*9880d681SAndroid Build Coastguard Worker; CHECK: sub w1, w2, w3, uxtx ; encoding: [0x41,0x60,0x23,0x4b] 227*9880d681SAndroid Build Coastguard Worker; CHECK: sub w1, w2, w3, sxtb ; encoding: [0x41,0x80,0x23,0x4b] 228*9880d681SAndroid Build Coastguard Worker; CHECK: sub w1, w2, w3, sxth ; encoding: [0x41,0xa0,0x23,0x4b] 229*9880d681SAndroid Build Coastguard Worker; CHECK: sub w1, w2, w3, sxtw ; encoding: [0x41,0xc0,0x23,0x4b] 230*9880d681SAndroid Build Coastguard Worker; CHECK: sub w1, w2, w3, sxtx ; encoding: [0x41,0xe0,0x23,0x4b] 231*9880d681SAndroid Build Coastguard Worker 232*9880d681SAndroid Build Coastguard Worker sub x1, x2, w3, uxtb 233*9880d681SAndroid Build Coastguard Worker sub x1, x2, w3, uxth 234*9880d681SAndroid Build Coastguard Worker sub x1, x2, w3, uxtw 235*9880d681SAndroid Build Coastguard Worker sub x1, x2, w3, sxtb 236*9880d681SAndroid Build Coastguard Worker sub x1, x2, w3, sxth 237*9880d681SAndroid Build Coastguard Worker sub x1, x2, w3, sxtw 238*9880d681SAndroid Build Coastguard Worker 239*9880d681SAndroid Build Coastguard Worker; CHECK: sub x1, x2, w3, uxtb ; encoding: [0x41,0x00,0x23,0xcb] 240*9880d681SAndroid Build Coastguard Worker; CHECK: sub x1, x2, w3, uxth ; encoding: [0x41,0x20,0x23,0xcb] 241*9880d681SAndroid Build Coastguard Worker; CHECK: sub x1, x2, w3, uxtw ; encoding: [0x41,0x40,0x23,0xcb] 242*9880d681SAndroid Build Coastguard Worker; CHECK: sub x1, x2, w3, sxtb ; encoding: [0x41,0x80,0x23,0xcb] 243*9880d681SAndroid Build Coastguard Worker; CHECK: sub x1, x2, w3, sxth ; encoding: [0x41,0xa0,0x23,0xcb] 244*9880d681SAndroid Build Coastguard Worker; CHECK: sub x1, x2, w3, sxtw ; encoding: [0x41,0xc0,0x23,0xcb] 245*9880d681SAndroid Build Coastguard Worker 246*9880d681SAndroid Build Coastguard Worker sub w1, wsp, w3 247*9880d681SAndroid Build Coastguard Worker sub w1, wsp, w3, uxtw #0 248*9880d681SAndroid Build Coastguard Worker sub sp, x2, x3 249*9880d681SAndroid Build Coastguard Worker sub sp, x2, x3, uxtx #0 250*9880d681SAndroid Build Coastguard Worker sub sp, x3, x7, lsl #4 251*9880d681SAndroid Build Coastguard Worker 252*9880d681SAndroid Build Coastguard Worker; CHECK: sub w1, wsp, w3 ; encoding: [0xe1,0x43,0x23,0x4b] 253*9880d681SAndroid Build Coastguard Worker; CHECK: sub w1, wsp, w3 ; encoding: [0xe1,0x43,0x23,0x4b] 254*9880d681SAndroid Build Coastguard Worker; CHECK: sub sp, x2, x3 ; encoding: [0x5f,0x60,0x23,0xcb] 255*9880d681SAndroid Build Coastguard Worker; CHECK: sub sp, x2, x3 ; encoding: [0x5f,0x60,0x23,0xcb] 256*9880d681SAndroid Build Coastguard Worker; CHECK: sp, x3, x7, lsl #4 ; encoding: [0x7f,0x70,0x27,0xcb] 257*9880d681SAndroid Build Coastguard Worker 258*9880d681SAndroid Build Coastguard Worker adds w1, w2, w3, uxtb 259*9880d681SAndroid Build Coastguard Worker adds w1, w2, w3, uxth 260*9880d681SAndroid Build Coastguard Worker adds w1, w2, w3, uxtw 261*9880d681SAndroid Build Coastguard Worker adds w1, w2, w3, uxtx 262*9880d681SAndroid Build Coastguard Worker adds w1, w2, w3, sxtb 263*9880d681SAndroid Build Coastguard Worker adds w1, w2, w3, sxth 264*9880d681SAndroid Build Coastguard Worker adds w1, w2, w3, sxtw 265*9880d681SAndroid Build Coastguard Worker adds w1, w2, w3, sxtx 266*9880d681SAndroid Build Coastguard Worker 267*9880d681SAndroid Build Coastguard Worker; CHECK: adds w1, w2, w3, uxtb ; encoding: [0x41,0x00,0x23,0x2b] 268*9880d681SAndroid Build Coastguard Worker; CHECK: adds w1, w2, w3, uxth ; encoding: [0x41,0x20,0x23,0x2b] 269*9880d681SAndroid Build Coastguard Worker; CHECK: adds w1, w2, w3, uxtw ; encoding: [0x41,0x40,0x23,0x2b] 270*9880d681SAndroid Build Coastguard Worker; CHECK: adds w1, w2, w3, uxtx ; encoding: [0x41,0x60,0x23,0x2b] 271*9880d681SAndroid Build Coastguard Worker; CHECK: adds w1, w2, w3, sxtb ; encoding: [0x41,0x80,0x23,0x2b] 272*9880d681SAndroid Build Coastguard Worker; CHECK: adds w1, w2, w3, sxth ; encoding: [0x41,0xa0,0x23,0x2b] 273*9880d681SAndroid Build Coastguard Worker; CHECK: adds w1, w2, w3, sxtw ; encoding: [0x41,0xc0,0x23,0x2b] 274*9880d681SAndroid Build Coastguard Worker; CHECK: adds w1, w2, w3, sxtx ; encoding: [0x41,0xe0,0x23,0x2b] 275*9880d681SAndroid Build Coastguard Worker 276*9880d681SAndroid Build Coastguard Worker adds x1, x2, w3, uxtb 277*9880d681SAndroid Build Coastguard Worker adds x1, x2, w3, uxth 278*9880d681SAndroid Build Coastguard Worker adds x1, x2, w3, uxtw 279*9880d681SAndroid Build Coastguard Worker adds x1, x2, w3, uxtx 280*9880d681SAndroid Build Coastguard Worker adds x1, x2, w3, sxtb 281*9880d681SAndroid Build Coastguard Worker adds x1, x2, w3, sxth 282*9880d681SAndroid Build Coastguard Worker adds x1, x2, w3, sxtw 283*9880d681SAndroid Build Coastguard Worker adds x1, x2, w3, sxtx 284*9880d681SAndroid Build Coastguard Worker 285*9880d681SAndroid Build Coastguard Worker; CHECK: adds x1, x2, w3, uxtb ; encoding: [0x41,0x00,0x23,0xab] 286*9880d681SAndroid Build Coastguard Worker; CHECK: adds x1, x2, w3, uxth ; encoding: [0x41,0x20,0x23,0xab] 287*9880d681SAndroid Build Coastguard Worker; CHECK: adds x1, x2, w3, uxtw ; encoding: [0x41,0x40,0x23,0xab] 288*9880d681SAndroid Build Coastguard Worker; CHECK: adds x1, x2, w3, uxtx ; encoding: [0x41,0x60,0x23,0xab] 289*9880d681SAndroid Build Coastguard Worker; CHECK: adds x1, x2, w3, sxtb ; encoding: [0x41,0x80,0x23,0xab] 290*9880d681SAndroid Build Coastguard Worker; CHECK: adds x1, x2, w3, sxth ; encoding: [0x41,0xa0,0x23,0xab] 291*9880d681SAndroid Build Coastguard Worker; CHECK: adds x1, x2, w3, sxtw ; encoding: [0x41,0xc0,0x23,0xab] 292*9880d681SAndroid Build Coastguard Worker; CHECK: adds x1, x2, w3, sxtx ; encoding: [0x41,0xe0,0x23,0xab] 293*9880d681SAndroid Build Coastguard Worker 294*9880d681SAndroid Build Coastguard Worker adds w1, wsp, w3 295*9880d681SAndroid Build Coastguard Worker adds w1, wsp, w3, uxtw #0 296*9880d681SAndroid Build Coastguard Worker adds wzr, wsp, w3, lsl #4 297*9880d681SAndroid Build Coastguard Worker 298*9880d681SAndroid Build Coastguard Worker; CHECK: adds w1, wsp, w3 ; encoding: [0xe1,0x43,0x23,0x2b] 299*9880d681SAndroid Build Coastguard Worker; CHECK: adds w1, wsp, w3 ; encoding: [0xe1,0x43,0x23,0x2b] 300*9880d681SAndroid Build Coastguard Worker; CHECK: cmn wsp, w3, lsl #4 ; encoding: [0xff,0x53,0x23,0x2b] 301*9880d681SAndroid Build Coastguard Worker 302*9880d681SAndroid Build Coastguard Worker subs w1, w2, w3, uxtb 303*9880d681SAndroid Build Coastguard Worker subs w1, w2, w3, uxth 304*9880d681SAndroid Build Coastguard Worker subs w1, w2, w3, uxtw 305*9880d681SAndroid Build Coastguard Worker subs w1, w2, w3, uxtx 306*9880d681SAndroid Build Coastguard Worker subs w1, w2, w3, sxtb 307*9880d681SAndroid Build Coastguard Worker subs w1, w2, w3, sxth 308*9880d681SAndroid Build Coastguard Worker subs w1, w2, w3, sxtw 309*9880d681SAndroid Build Coastguard Worker subs w1, w2, w3, sxtx 310*9880d681SAndroid Build Coastguard Worker 311*9880d681SAndroid Build Coastguard Worker; CHECK: subs w1, w2, w3, uxtb ; encoding: [0x41,0x00,0x23,0x6b] 312*9880d681SAndroid Build Coastguard Worker; CHECK: subs w1, w2, w3, uxth ; encoding: [0x41,0x20,0x23,0x6b] 313*9880d681SAndroid Build Coastguard Worker; CHECK: subs w1, w2, w3, uxtw ; encoding: [0x41,0x40,0x23,0x6b] 314*9880d681SAndroid Build Coastguard Worker; CHECK: subs w1, w2, w3, uxtx ; encoding: [0x41,0x60,0x23,0x6b] 315*9880d681SAndroid Build Coastguard Worker; CHECK: subs w1, w2, w3, sxtb ; encoding: [0x41,0x80,0x23,0x6b] 316*9880d681SAndroid Build Coastguard Worker; CHECK: subs w1, w2, w3, sxth ; encoding: [0x41,0xa0,0x23,0x6b] 317*9880d681SAndroid Build Coastguard Worker; CHECK: subs w1, w2, w3, sxtw ; encoding: [0x41,0xc0,0x23,0x6b] 318*9880d681SAndroid Build Coastguard Worker; CHECK: subs w1, w2, w3, sxtx ; encoding: [0x41,0xe0,0x23,0x6b] 319*9880d681SAndroid Build Coastguard Worker 320*9880d681SAndroid Build Coastguard Worker subs x1, x2, w3, uxtb 321*9880d681SAndroid Build Coastguard Worker subs x1, x2, w3, uxth 322*9880d681SAndroid Build Coastguard Worker subs x1, x2, w3, uxtw 323*9880d681SAndroid Build Coastguard Worker subs x1, x2, w3, uxtx 324*9880d681SAndroid Build Coastguard Worker subs x1, x2, w3, sxtb 325*9880d681SAndroid Build Coastguard Worker subs x1, x2, w3, sxth 326*9880d681SAndroid Build Coastguard Worker subs x1, x2, w3, sxtw 327*9880d681SAndroid Build Coastguard Worker subs x1, x2, w3, sxtx 328*9880d681SAndroid Build Coastguard Worker 329*9880d681SAndroid Build Coastguard Worker; CHECK: subs x1, x2, w3, uxtb ; encoding: [0x41,0x00,0x23,0xeb] 330*9880d681SAndroid Build Coastguard Worker; CHECK: subs x1, x2, w3, uxth ; encoding: [0x41,0x20,0x23,0xeb] 331*9880d681SAndroid Build Coastguard Worker; CHECK: subs x1, x2, w3, uxtw ; encoding: [0x41,0x40,0x23,0xeb] 332*9880d681SAndroid Build Coastguard Worker; CHECK: subs x1, x2, w3, uxtx ; encoding: [0x41,0x60,0x23,0xeb] 333*9880d681SAndroid Build Coastguard Worker; CHECK: subs x1, x2, w3, sxtb ; encoding: [0x41,0x80,0x23,0xeb] 334*9880d681SAndroid Build Coastguard Worker; CHECK: subs x1, x2, w3, sxth ; encoding: [0x41,0xa0,0x23,0xeb] 335*9880d681SAndroid Build Coastguard Worker; CHECK: subs x1, x2, w3, sxtw ; encoding: [0x41,0xc0,0x23,0xeb] 336*9880d681SAndroid Build Coastguard Worker; CHECK: subs x1, x2, w3, sxtx ; encoding: [0x41,0xe0,0x23,0xeb] 337*9880d681SAndroid Build Coastguard Worker 338*9880d681SAndroid Build Coastguard Worker subs w1, wsp, w3 339*9880d681SAndroid Build Coastguard Worker subs w1, wsp, w3, uxtw #0 340*9880d681SAndroid Build Coastguard Worker 341*9880d681SAndroid Build Coastguard Worker; CHECK: subs w1, wsp, w3 ; encoding: [0xe1,0x43,0x23,0x6b] 342*9880d681SAndroid Build Coastguard Worker; CHECK: subs w1, wsp, w3 ; encoding: [0xe1,0x43,0x23,0x6b] 343*9880d681SAndroid Build Coastguard Worker 344*9880d681SAndroid Build Coastguard Worker cmp wsp, w9, lsl #0 345*9880d681SAndroid Build Coastguard Worker subs x3, sp, x9, lsl #2 346*9880d681SAndroid Build Coastguard Worker cmp wsp, w8, uxtw 347*9880d681SAndroid Build Coastguard Worker subs wzr, wsp, w8, uxtw 348*9880d681SAndroid Build Coastguard Worker cmp sp, w8, uxtw 349*9880d681SAndroid Build Coastguard Worker subs xzr, sp, w8, uxtw 350*9880d681SAndroid Build Coastguard Worker 351*9880d681SAndroid Build Coastguard Worker; CHECK: cmp wsp, w9 ; encoding: [0xff,0x43,0x29,0x6b] 352*9880d681SAndroid Build Coastguard Worker; CHECK: subs x3, sp, x9, lsl #2 ; encoding: [0xe3,0x6b,0x29,0xeb] 353*9880d681SAndroid Build Coastguard Worker; CHECK: cmp wsp, w8 ; encoding: [0xff,0x43,0x28,0x6b] 354*9880d681SAndroid Build Coastguard Worker; CHECK: cmp wsp, w8 ; encoding: [0xff,0x43,0x28,0x6b] 355*9880d681SAndroid Build Coastguard Worker; CHECK: cmp sp, w8, uxtw ; encoding: [0xff,0x43,0x28,0xeb] 356*9880d681SAndroid Build Coastguard Worker; CHECK: cmp sp, w8, uxtw ; encoding: [0xff,0x43,0x28,0xeb] 357*9880d681SAndroid Build Coastguard Worker 358*9880d681SAndroid Build Coastguard Worker sub wsp, w9, w8, uxtw 359*9880d681SAndroid Build Coastguard Worker sub w1, wsp, w8, uxtw 360*9880d681SAndroid Build Coastguard Worker sub wsp, wsp, w8, uxtw 361*9880d681SAndroid Build Coastguard Worker sub sp, x9, w8, uxtw 362*9880d681SAndroid Build Coastguard Worker sub x1, sp, w8, uxtw 363*9880d681SAndroid Build Coastguard Worker sub sp, sp, w8, uxtw 364*9880d681SAndroid Build Coastguard Worker subs w1, wsp, w8, uxtw 365*9880d681SAndroid Build Coastguard Worker subs x1, sp, w8, uxtw 366*9880d681SAndroid Build Coastguard Worker 367*9880d681SAndroid Build Coastguard Worker; CHECK: sub wsp, w9, w8 ; encoding: [0x3f,0x41,0x28,0x4b] 368*9880d681SAndroid Build Coastguard Worker; CHECK: sub w1, wsp, w8 ; encoding: [0xe1,0x43,0x28,0x4b] 369*9880d681SAndroid Build Coastguard Worker; CHECK: sub wsp, wsp, w8 ; encoding: [0xff,0x43,0x28,0x4b] 370*9880d681SAndroid Build Coastguard Worker; CHECK: sub sp, x9, w8, uxtw ; encoding: [0x3f,0x41,0x28,0xcb] 371*9880d681SAndroid Build Coastguard Worker; CHECK: sub x1, sp, w8, uxtw ; encoding: [0xe1,0x43,0x28,0xcb] 372*9880d681SAndroid Build Coastguard Worker; CHECK: sub sp, sp, w8, uxtw ; encoding: [0xff,0x43,0x28,0xcb] 373*9880d681SAndroid Build Coastguard Worker; CHECK: subs w1, wsp, w8 ; encoding: [0xe1,0x43,0x28,0x6b] 374*9880d681SAndroid Build Coastguard Worker; CHECK: subs x1, sp, w8, uxtw ; encoding: [0xe1,0x43,0x28,0xeb] 375*9880d681SAndroid Build Coastguard Worker 376*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 377*9880d681SAndroid Build Coastguard Worker; Signed/Unsigned divide 378*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 379*9880d681SAndroid Build Coastguard Worker 380*9880d681SAndroid Build Coastguard Worker sdiv w1, w2, w3 381*9880d681SAndroid Build Coastguard Worker sdiv x1, x2, x3 382*9880d681SAndroid Build Coastguard Worker udiv w1, w2, w3 383*9880d681SAndroid Build Coastguard Worker udiv x1, x2, x3 384*9880d681SAndroid Build Coastguard Worker 385*9880d681SAndroid Build Coastguard Worker; CHECK: sdiv w1, w2, w3 ; encoding: [0x41,0x0c,0xc3,0x1a] 386*9880d681SAndroid Build Coastguard Worker; CHECK: sdiv x1, x2, x3 ; encoding: [0x41,0x0c,0xc3,0x9a] 387*9880d681SAndroid Build Coastguard Worker; CHECK: udiv w1, w2, w3 ; encoding: [0x41,0x08,0xc3,0x1a] 388*9880d681SAndroid Build Coastguard Worker; CHECK: udiv x1, x2, x3 ; encoding: [0x41,0x08,0xc3,0x9a] 389*9880d681SAndroid Build Coastguard Worker 390*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 391*9880d681SAndroid Build Coastguard Worker; Variable shifts 392*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 393*9880d681SAndroid Build Coastguard Worker 394*9880d681SAndroid Build Coastguard Worker asrv w1, w2, w3 395*9880d681SAndroid Build Coastguard Worker asrv x1, x2, x3 396*9880d681SAndroid Build Coastguard Worker asr w1, w2, w3 397*9880d681SAndroid Build Coastguard Worker asr x1, x2, x3 398*9880d681SAndroid Build Coastguard Worker lslv w1, w2, w3 399*9880d681SAndroid Build Coastguard Worker lslv x1, x2, x3 400*9880d681SAndroid Build Coastguard Worker lsl w1, w2, w3 401*9880d681SAndroid Build Coastguard Worker lsl x1, x2, x3 402*9880d681SAndroid Build Coastguard Worker lsrv w1, w2, w3 403*9880d681SAndroid Build Coastguard Worker lsrv x1, x2, x3 404*9880d681SAndroid Build Coastguard Worker lsr w1, w2, w3 405*9880d681SAndroid Build Coastguard Worker lsr x1, x2, x3 406*9880d681SAndroid Build Coastguard Worker rorv w1, w2, w3 407*9880d681SAndroid Build Coastguard Worker rorv x1, x2, x3 408*9880d681SAndroid Build Coastguard Worker ror w1, w2, w3 409*9880d681SAndroid Build Coastguard Worker ror x1, x2, x3 410*9880d681SAndroid Build Coastguard Worker 411*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x28,0xc3,0x1a] 412*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x28,0xc3,0x9a] 413*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x28,0xc3,0x1a] 414*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x28,0xc3,0x9a] 415*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x20,0xc3,0x1a] 416*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x20,0xc3,0x9a] 417*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x20,0xc3,0x1a] 418*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x20,0xc3,0x9a] 419*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x24,0xc3,0x1a] 420*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x24,0xc3,0x9a] 421*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x24,0xc3,0x1a] 422*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x24,0xc3,0x9a] 423*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x2c,0xc3,0x1a] 424*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x2c,0xc3,0x9a] 425*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x2c,0xc3,0x1a] 426*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x2c,0xc3,0x9a] 427*9880d681SAndroid Build Coastguard Worker 428*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 429*9880d681SAndroid Build Coastguard Worker; One operand instructions 430*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 431*9880d681SAndroid Build Coastguard Worker 432*9880d681SAndroid Build Coastguard Worker cls w1, w2 433*9880d681SAndroid Build Coastguard Worker cls x1, x2 434*9880d681SAndroid Build Coastguard Worker clz w1, w2 435*9880d681SAndroid Build Coastguard Worker clz x1, x2 436*9880d681SAndroid Build Coastguard Worker rbit w1, w2 437*9880d681SAndroid Build Coastguard Worker rbit x1, x2 438*9880d681SAndroid Build Coastguard Worker rev w1, w2 439*9880d681SAndroid Build Coastguard Worker rev x1, x2 440*9880d681SAndroid Build Coastguard Worker rev16 w1, w2 441*9880d681SAndroid Build Coastguard Worker rev16 x1, x2 442*9880d681SAndroid Build Coastguard Worker rev32 x1, x2 443*9880d681SAndroid Build Coastguard Worker 444*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x14,0xc0,0x5a] 445*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x14,0xc0,0xda] 446*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x10,0xc0,0x5a] 447*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x10,0xc0,0xda] 448*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x00,0xc0,0x5a] 449*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x00,0xc0,0xda] 450*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x08,0xc0,0x5a] 451*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x0c,0xc0,0xda] 452*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x04,0xc0,0x5a] 453*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x04,0xc0,0xda] 454*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x08,0xc0,0xda] 455*9880d681SAndroid Build Coastguard Worker 456*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 457*9880d681SAndroid Build Coastguard Worker; 6.6.1 Multiply-add instructions 458*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 459*9880d681SAndroid Build Coastguard Worker 460*9880d681SAndroid Build Coastguard Worker madd w1, w2, w3, w4 461*9880d681SAndroid Build Coastguard Worker madd x1, x2, x3, x4 462*9880d681SAndroid Build Coastguard Worker msub w1, w2, w3, w4 463*9880d681SAndroid Build Coastguard Worker msub x1, x2, x3, x4 464*9880d681SAndroid Build Coastguard Worker smaddl x1, w2, w3, x4 465*9880d681SAndroid Build Coastguard Worker smsubl x1, w2, w3, x4 466*9880d681SAndroid Build Coastguard Worker umaddl x1, w2, w3, x4 467*9880d681SAndroid Build Coastguard Worker umsubl x1, w2, w3, x4 468*9880d681SAndroid Build Coastguard Worker 469*9880d681SAndroid Build Coastguard Worker; CHECK: madd w1, w2, w3, w4 ; encoding: [0x41,0x10,0x03,0x1b] 470*9880d681SAndroid Build Coastguard Worker; CHECK: madd x1, x2, x3, x4 ; encoding: [0x41,0x10,0x03,0x9b] 471*9880d681SAndroid Build Coastguard Worker; CHECK: msub w1, w2, w3, w4 ; encoding: [0x41,0x90,0x03,0x1b] 472*9880d681SAndroid Build Coastguard Worker; CHECK: msub x1, x2, x3, x4 ; encoding: [0x41,0x90,0x03,0x9b] 473*9880d681SAndroid Build Coastguard Worker; CHECK: smaddl x1, w2, w3, x4 ; encoding: [0x41,0x10,0x23,0x9b] 474*9880d681SAndroid Build Coastguard Worker; CHECK: smsubl x1, w2, w3, x4 ; encoding: [0x41,0x90,0x23,0x9b] 475*9880d681SAndroid Build Coastguard Worker; CHECK: umaddl x1, w2, w3, x4 ; encoding: [0x41,0x10,0xa3,0x9b] 476*9880d681SAndroid Build Coastguard Worker; CHECK: umsubl x1, w2, w3, x4 ; encoding: [0x41,0x90,0xa3,0x9b] 477*9880d681SAndroid Build Coastguard Worker 478*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 479*9880d681SAndroid Build Coastguard Worker; Multiply-high instructions 480*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 481*9880d681SAndroid Build Coastguard Worker 482*9880d681SAndroid Build Coastguard Worker smulh x1, x2, x3 483*9880d681SAndroid Build Coastguard Worker umulh x1, x2, x3 484*9880d681SAndroid Build Coastguard Worker 485*9880d681SAndroid Build Coastguard Worker; CHECK: smulh x1, x2, x3 ; encoding: [0x41,0x7c,0x43,0x9b] 486*9880d681SAndroid Build Coastguard Worker; CHECK: umulh x1, x2, x3 ; encoding: [0x41,0x7c,0xc3,0x9b] 487*9880d681SAndroid Build Coastguard Worker 488*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 489*9880d681SAndroid Build Coastguard Worker; Move immediate instructions 490*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 491*9880d681SAndroid Build Coastguard Worker 492*9880d681SAndroid Build Coastguard Worker movz w0, #1 493*9880d681SAndroid Build Coastguard Worker movz x0, #1 494*9880d681SAndroid Build Coastguard Worker movz w0, #1, lsl #16 495*9880d681SAndroid Build Coastguard Worker movz x0, #1, lsl #16 496*9880d681SAndroid Build Coastguard Worker 497*9880d681SAndroid Build Coastguard Worker; CHECK: mov w0, #1 ; encoding: [0x20,0x00,0x80,0x52] 498*9880d681SAndroid Build Coastguard Worker; CHECK: mov x0, #1 ; encoding: [0x20,0x00,0x80,0xd2] 499*9880d681SAndroid Build Coastguard Worker; CHECK: mov w0, #65536 ; encoding: [0x20,0x00,0xa0,0x52] 500*9880d681SAndroid Build Coastguard Worker; CHECK: mov x0, #65536 ; encoding: [0x20,0x00,0xa0,0xd2] 501*9880d681SAndroid Build Coastguard Worker 502*9880d681SAndroid Build Coastguard Worker movn w0, #2 503*9880d681SAndroid Build Coastguard Worker movn x0, #2 504*9880d681SAndroid Build Coastguard Worker movn w0, #2, lsl #16 505*9880d681SAndroid Build Coastguard Worker movn x0, #2, lsl #16 506*9880d681SAndroid Build Coastguard Worker 507*9880d681SAndroid Build Coastguard Worker; CHECK: mov w0, #-3 ; encoding: [0x40,0x00,0x80,0x12] 508*9880d681SAndroid Build Coastguard Worker; CHECK: mov x0, #-3 ; encoding: [0x40,0x00,0x80,0x92] 509*9880d681SAndroid Build Coastguard Worker; CHECK: mov w0, #-131073 ; encoding: [0x40,0x00,0xa0,0x12] 510*9880d681SAndroid Build Coastguard Worker; CHECK: mov x0, #-131073 ; encoding: [0x40,0x00,0xa0,0x92] 511*9880d681SAndroid Build Coastguard Worker 512*9880d681SAndroid Build Coastguard Worker movk w0, #1 513*9880d681SAndroid Build Coastguard Worker movk x0, #1 514*9880d681SAndroid Build Coastguard Worker movk w0, #1, lsl #16 515*9880d681SAndroid Build Coastguard Worker movk x0, #1, lsl #16 516*9880d681SAndroid Build Coastguard Worker 517*9880d681SAndroid Build Coastguard Worker; CHECK: movk w0, #1 ; encoding: [0x20,0x00,0x80,0x72] 518*9880d681SAndroid Build Coastguard Worker; CHECK: movk x0, #1 ; encoding: [0x20,0x00,0x80,0xf2] 519*9880d681SAndroid Build Coastguard Worker; CHECK: movk w0, #1, lsl #16 ; encoding: [0x20,0x00,0xa0,0x72] 520*9880d681SAndroid Build Coastguard Worker; CHECK: movk x0, #1, lsl #16 ; encoding: [0x20,0x00,0xa0,0xf2] 521*9880d681SAndroid Build Coastguard Worker 522*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 523*9880d681SAndroid Build Coastguard Worker; Conditionally set flags instructions 524*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 525*9880d681SAndroid Build Coastguard Worker 526*9880d681SAndroid Build Coastguard Worker ccmn w1, #2, #3, eq 527*9880d681SAndroid Build Coastguard Worker ccmn x1, #2, #3, eq 528*9880d681SAndroid Build Coastguard Worker ccmp w1, #2, #3, eq 529*9880d681SAndroid Build Coastguard Worker ccmp x1, #2, #3, eq 530*9880d681SAndroid Build Coastguard Worker 531*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x23,0x08,0x42,0x3a] 532*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x23,0x08,0x42,0xba] 533*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x23,0x08,0x42,0x7a] 534*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x23,0x08,0x42,0xfa] 535*9880d681SAndroid Build Coastguard Worker 536*9880d681SAndroid Build Coastguard Worker ccmn w1, w2, #3, eq 537*9880d681SAndroid Build Coastguard Worker ccmn x1, x2, #3, eq 538*9880d681SAndroid Build Coastguard Worker ccmp w1, w2, #3, eq 539*9880d681SAndroid Build Coastguard Worker ccmp x1, x2, #3, eq 540*9880d681SAndroid Build Coastguard Worker 541*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x23,0x00,0x42,0x3a] 542*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x23,0x00,0x42,0xba] 543*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x23,0x00,0x42,0x7a] 544*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x23,0x00,0x42,0xfa] 545*9880d681SAndroid Build Coastguard Worker 546*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 547*9880d681SAndroid Build Coastguard Worker; Conditional select instructions 548*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 549*9880d681SAndroid Build Coastguard Worker 550*9880d681SAndroid Build Coastguard Worker csel w1, w2, w3, eq 551*9880d681SAndroid Build Coastguard Worker csel x1, x2, x3, eq 552*9880d681SAndroid Build Coastguard Worker csinc w1, w2, w3, eq 553*9880d681SAndroid Build Coastguard Worker csinc x1, x2, x3, eq 554*9880d681SAndroid Build Coastguard Worker csinv w1, w2, w3, eq 555*9880d681SAndroid Build Coastguard Worker csinv x1, x2, x3, eq 556*9880d681SAndroid Build Coastguard Worker csneg w1, w2, w3, eq 557*9880d681SAndroid Build Coastguard Worker csneg x1, x2, x3, eq 558*9880d681SAndroid Build Coastguard Worker 559*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x00,0x83,0x1a] 560*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x00,0x83,0x9a] 561*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x04,0x83,0x1a] 562*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x04,0x83,0x9a] 563*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x00,0x83,0x5a] 564*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x00,0x83,0xda] 565*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x04,0x83,0x5a] 566*9880d681SAndroid Build Coastguard Worker; CHECK: encoding: [0x41,0x04,0x83,0xda] 567*9880d681SAndroid Build Coastguard Worker 568*9880d681SAndroid Build Coastguard Worker; Make sure we handle upper case, too. In particular, condition codes. 569*9880d681SAndroid Build Coastguard Worker CSEL W16, W7, W27, EQ 570*9880d681SAndroid Build Coastguard Worker CSEL W15, W6, W26, NE 571*9880d681SAndroid Build Coastguard Worker CSEL W14, W5, W25, CS 572*9880d681SAndroid Build Coastguard Worker CSEL W13, W4, W24, HS 573*9880d681SAndroid Build Coastguard Worker csel w12, w3, w23, CC 574*9880d681SAndroid Build Coastguard Worker csel w11, w2, w22, LO 575*9880d681SAndroid Build Coastguard Worker csel w10, w1, w21, MI 576*9880d681SAndroid Build Coastguard Worker csel x9, x9, x1, PL 577*9880d681SAndroid Build Coastguard Worker csel x8, x8, x2, VS 578*9880d681SAndroid Build Coastguard Worker CSEL X7, X7, X3, VC 579*9880d681SAndroid Build Coastguard Worker CSEL X6, X7, X4, HI 580*9880d681SAndroid Build Coastguard Worker CSEL X5, X6, X5, LS 581*9880d681SAndroid Build Coastguard Worker CSEL X4, X5, X6, GE 582*9880d681SAndroid Build Coastguard Worker csel x3, x4, x7, LT 583*9880d681SAndroid Build Coastguard Worker csel x2, x3, x8, GT 584*9880d681SAndroid Build Coastguard Worker csel x1, x2, x9, LE 585*9880d681SAndroid Build Coastguard Worker csel x10, x1, x20, AL 586*9880d681SAndroid Build Coastguard Worker 587*9880d681SAndroid Build Coastguard Worker; CHECK: csel w16, w7, w27, eq ; encoding: [0xf0,0x00,0x9b,0x1a] 588*9880d681SAndroid Build Coastguard Worker; CHECK: csel w15, w6, w26, ne ; encoding: [0xcf,0x10,0x9a,0x1a] 589*9880d681SAndroid Build Coastguard Worker; CHECK: csel w14, w5, w25, hs ; encoding: [0xae,0x20,0x99,0x1a] 590*9880d681SAndroid Build Coastguard Worker; CHECK: csel w13, w4, w24, hs ; encoding: [0x8d,0x20,0x98,0x1a] 591*9880d681SAndroid Build Coastguard Worker; CHECK: csel w12, w3, w23, lo ; encoding: [0x6c,0x30,0x97,0x1a] 592*9880d681SAndroid Build Coastguard Worker; CHECK: csel w11, w2, w22, lo ; encoding: [0x4b,0x30,0x96,0x1a] 593*9880d681SAndroid Build Coastguard Worker; CHECK: csel w10, w1, w21, mi ; encoding: [0x2a,0x40,0x95,0x1a] 594*9880d681SAndroid Build Coastguard Worker; CHECK: csel x9, x9, x1, pl ; encoding: [0x29,0x51,0x81,0x9a] 595*9880d681SAndroid Build Coastguard Worker; CHECK: csel x8, x8, x2, vs ; encoding: [0x08,0x61,0x82,0x9a] 596*9880d681SAndroid Build Coastguard Worker; CHECK: csel x7, x7, x3, vc ; encoding: [0xe7,0x70,0x83,0x9a] 597*9880d681SAndroid Build Coastguard Worker; CHECK: csel x6, x7, x4, hi ; encoding: [0xe6,0x80,0x84,0x9a] 598*9880d681SAndroid Build Coastguard Worker; CHECK: csel x5, x6, x5, ls ; encoding: [0xc5,0x90,0x85,0x9a] 599*9880d681SAndroid Build Coastguard Worker; CHECK: csel x4, x5, x6, ge ; encoding: [0xa4,0xa0,0x86,0x9a] 600*9880d681SAndroid Build Coastguard Worker; CHECK: csel x3, x4, x7, lt ; encoding: [0x83,0xb0,0x87,0x9a] 601*9880d681SAndroid Build Coastguard Worker; CHECK: csel x2, x3, x8, gt ; encoding: [0x62,0xc0,0x88,0x9a] 602*9880d681SAndroid Build Coastguard Worker; CHECK: csel x1, x2, x9, le ; encoding: [0x41,0xd0,0x89,0x9a] 603*9880d681SAndroid Build Coastguard Worker; CHECK: csel x10, x1, x20, al ; encoding: [0x2a,0xe0,0x94,0x9a] 604*9880d681SAndroid Build Coastguard Worker 605*9880d681SAndroid Build Coastguard Worker 606*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 607*9880d681SAndroid Build Coastguard Worker; Scalar saturating arithmetic 608*9880d681SAndroid Build Coastguard Worker;==---------------------------------------------------------------------------== 609*9880d681SAndroid Build Coastguard Worker uqxtn b4, h2 610*9880d681SAndroid Build Coastguard Worker uqxtn h2, s3 611*9880d681SAndroid Build Coastguard Worker uqxtn s9, d2 612*9880d681SAndroid Build Coastguard Worker 613*9880d681SAndroid Build Coastguard Worker; CHECK: uqxtn b4, h2 ; encoding: [0x44,0x48,0x21,0x7e] 614*9880d681SAndroid Build Coastguard Worker; CHECK: uqxtn h2, s3 ; encoding: [0x62,0x48,0x61,0x7e] 615*9880d681SAndroid Build Coastguard Worker; CHECK: uqxtn s9, d2 ; encoding: [0x49,0x48,0xa1,0x7e] 616