1*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc -triple arm64-apple-darwin --disassemble < %s | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 4*9880d681SAndroid Build Coastguard Worker# Add/Subtract with carry/borrow 5*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Worker0x41 0x00 0x03 0x1a 8*9880d681SAndroid Build Coastguard Worker0x41 0x00 0x03 0x9a 9*9880d681SAndroid Build Coastguard Worker0x85 0x00 0x03 0x3a 10*9880d681SAndroid Build Coastguard Worker0x85 0x00 0x03 0xba 11*9880d681SAndroid Build Coastguard Worker 12*9880d681SAndroid Build Coastguard Worker# CHECK: adc w1, w2, w3 13*9880d681SAndroid Build Coastguard Worker# CHECK: adc x1, x2, x3 14*9880d681SAndroid Build Coastguard Worker# CHECK: adcs w5, w4, w3 15*9880d681SAndroid Build Coastguard Worker# CHECK: adcs x5, x4, x3 16*9880d681SAndroid Build Coastguard Worker 17*9880d681SAndroid Build Coastguard Worker0x41 0x00 0x03 0x5a 18*9880d681SAndroid Build Coastguard Worker0x41 0x00 0x03 0xda 19*9880d681SAndroid Build Coastguard Worker0x41 0x00 0x03 0x7a 20*9880d681SAndroid Build Coastguard Worker0x41 0x00 0x03 0xfa 21*9880d681SAndroid Build Coastguard Worker 22*9880d681SAndroid Build Coastguard Worker# CHECK: sbc w1, w2, w3 23*9880d681SAndroid Build Coastguard Worker# CHECK: sbc x1, x2, x3 24*9880d681SAndroid Build Coastguard Worker# CHECK: sbcs w1, w2, w3 25*9880d681SAndroid Build Coastguard Worker# CHECK: sbcs x1, x2, x3 26*9880d681SAndroid Build Coastguard Worker 27*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 28*9880d681SAndroid Build Coastguard Worker# Add/Subtract with (optionally shifted) immediate 29*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 30*9880d681SAndroid Build Coastguard Worker 31*9880d681SAndroid Build Coastguard Worker0x83 0x00 0x10 0x11 32*9880d681SAndroid Build Coastguard Worker0x83 0x00 0x10 0x91 33*9880d681SAndroid Build Coastguard Worker 34*9880d681SAndroid Build Coastguard Worker# CHECK: add w3, w4, #1024 35*9880d681SAndroid Build Coastguard Worker# CHECK: add x3, x4, #1024 36*9880d681SAndroid Build Coastguard Worker 37*9880d681SAndroid Build Coastguard Worker0x83 0x00 0x50 0x11 38*9880d681SAndroid Build Coastguard Worker0x83 0x00 0x40 0x11 39*9880d681SAndroid Build Coastguard Worker0x83 0x00 0x50 0x91 40*9880d681SAndroid Build Coastguard Worker0x83 0x00 0x40 0x91 41*9880d681SAndroid Build Coastguard Worker0xff 0x83 0x00 0x91 42*9880d681SAndroid Build Coastguard Worker 43*9880d681SAndroid Build Coastguard Worker# CHECK: add w3, w4, #1024, lsl #12 44*9880d681SAndroid Build Coastguard Worker# CHECK: add x3, x4, #1024, lsl #12 45*9880d681SAndroid Build Coastguard Worker# CHECK: add x3, x4, #0, lsl #12 46*9880d681SAndroid Build Coastguard Worker# CHECK: add sp, sp, #32 47*9880d681SAndroid Build Coastguard Worker 48*9880d681SAndroid Build Coastguard Worker0x83 0x00 0x10 0x31 49*9880d681SAndroid Build Coastguard Worker0x83 0x00 0x50 0x31 50*9880d681SAndroid Build Coastguard Worker0x83 0x00 0x10 0xb1 51*9880d681SAndroid Build Coastguard Worker0x83 0x00 0x50 0xb1 52*9880d681SAndroid Build Coastguard Worker0xff 0x83 0x00 0xb1 53*9880d681SAndroid Build Coastguard Worker 54*9880d681SAndroid Build Coastguard Worker# CHECK: adds w3, w4, #1024 55*9880d681SAndroid Build Coastguard Worker# CHECK: adds w3, w4, #1024, lsl #12 56*9880d681SAndroid Build Coastguard Worker# CHECK: adds x3, x4, #1024 57*9880d681SAndroid Build Coastguard Worker# CHECK: adds x3, x4, #1024, lsl #12 58*9880d681SAndroid Build Coastguard Worker# CHECK: cmn sp, #32 59*9880d681SAndroid Build Coastguard Worker 60*9880d681SAndroid Build Coastguard Worker0x83 0x00 0x10 0x51 61*9880d681SAndroid Build Coastguard Worker0x83 0x00 0x50 0x51 62*9880d681SAndroid Build Coastguard Worker0x83 0x00 0x10 0xd1 63*9880d681SAndroid Build Coastguard Worker0x83 0x00 0x50 0xd1 64*9880d681SAndroid Build Coastguard Worker0xff 0x83 0x00 0xd1 65*9880d681SAndroid Build Coastguard Worker 66*9880d681SAndroid Build Coastguard Worker# CHECK: sub w3, w4, #1024 67*9880d681SAndroid Build Coastguard Worker# CHECK: sub w3, w4, #1024, lsl #12 68*9880d681SAndroid Build Coastguard Worker# CHECK: sub x3, x4, #1024 69*9880d681SAndroid Build Coastguard Worker# CHECK: sub x3, x4, #1024, lsl #12 70*9880d681SAndroid Build Coastguard Worker# CHECK: sub sp, sp, #32 71*9880d681SAndroid Build Coastguard Worker 72*9880d681SAndroid Build Coastguard Worker0x83 0x00 0x10 0x71 73*9880d681SAndroid Build Coastguard Worker0x83 0x00 0x50 0x71 74*9880d681SAndroid Build Coastguard Worker0x83 0x00 0x10 0xf1 75*9880d681SAndroid Build Coastguard Worker0x83 0x00 0x50 0xf1 76*9880d681SAndroid Build Coastguard Worker0xff 0x83 0x00 0xf1 77*9880d681SAndroid Build Coastguard Worker 78*9880d681SAndroid Build Coastguard Worker# CHECK: subs w3, w4, #1024 79*9880d681SAndroid Build Coastguard Worker# CHECK: subs w3, w4, #1024, lsl #12 80*9880d681SAndroid Build Coastguard Worker# CHECK: subs x3, x4, #1024 81*9880d681SAndroid Build Coastguard Worker# CHECK: subs x3, x4, #1024, lsl #12 82*9880d681SAndroid Build Coastguard Worker# CHECK: cmp sp, #32 83*9880d681SAndroid Build Coastguard Worker 84*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 85*9880d681SAndroid Build Coastguard Worker# Add/Subtract register with (optional) shift 86*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 87*9880d681SAndroid Build Coastguard Worker 88*9880d681SAndroid Build Coastguard Worker0xac 0x01 0x0e 0x0b 89*9880d681SAndroid Build Coastguard Worker0xac 0x01 0x0e 0x8b 90*9880d681SAndroid Build Coastguard Worker0xac 0x31 0x0e 0x0b 91*9880d681SAndroid Build Coastguard Worker0xac 0x31 0x0e 0x8b 92*9880d681SAndroid Build Coastguard Worker0xac 0x29 0x4e 0x0b 93*9880d681SAndroid Build Coastguard Worker0xac 0x29 0x4e 0x8b 94*9880d681SAndroid Build Coastguard Worker0xac 0x1d 0x8e 0x0b 95*9880d681SAndroid Build Coastguard Worker0xac 0x9d 0x8e 0x8b 96*9880d681SAndroid Build Coastguard Worker 97*9880d681SAndroid Build Coastguard Worker# CHECK: add w12, w13, w14 98*9880d681SAndroid Build Coastguard Worker# CHECK: add x12, x13, x14 99*9880d681SAndroid Build Coastguard Worker# CHECK: add w12, w13, w14, lsl #12 100*9880d681SAndroid Build Coastguard Worker# CHECK: add x12, x13, x14, lsl #12 101*9880d681SAndroid Build Coastguard Worker# CHECK: add w12, w13, w14, lsr #10 102*9880d681SAndroid Build Coastguard Worker# CHECK: add x12, x13, x14, lsr #10 103*9880d681SAndroid Build Coastguard Worker# CHECK: add w12, w13, w14, asr #7 104*9880d681SAndroid Build Coastguard Worker# CHECK: add x12, x13, x14, asr #39 105*9880d681SAndroid Build Coastguard Worker 106*9880d681SAndroid Build Coastguard Worker0xac 0x01 0x0e 0x4b 107*9880d681SAndroid Build Coastguard Worker0xac 0x01 0x0e 0xcb 108*9880d681SAndroid Build Coastguard Worker0xac 0x31 0x0e 0x4b 109*9880d681SAndroid Build Coastguard Worker0xac 0x31 0x0e 0xcb 110*9880d681SAndroid Build Coastguard Worker0xac 0x29 0x4e 0x4b 111*9880d681SAndroid Build Coastguard Worker0xac 0x29 0x4e 0xcb 112*9880d681SAndroid Build Coastguard Worker0xac 0x1d 0x8e 0x4b 113*9880d681SAndroid Build Coastguard Worker0xac 0x9d 0x8e 0xcb 114*9880d681SAndroid Build Coastguard Worker 115*9880d681SAndroid Build Coastguard Worker# CHECK: sub w12, w13, w14 116*9880d681SAndroid Build Coastguard Worker# CHECK: sub x12, x13, x14 117*9880d681SAndroid Build Coastguard Worker# CHECK: sub w12, w13, w14, lsl #12 118*9880d681SAndroid Build Coastguard Worker# CHECK: sub x12, x13, x14, lsl #12 119*9880d681SAndroid Build Coastguard Worker# CHECK: sub w12, w13, w14, lsr #10 120*9880d681SAndroid Build Coastguard Worker# CHECK: sub x12, x13, x14, lsr #10 121*9880d681SAndroid Build Coastguard Worker# CHECK: sub w12, w13, w14, asr #7 122*9880d681SAndroid Build Coastguard Worker# CHECK: sub x12, x13, x14, asr #39 123*9880d681SAndroid Build Coastguard Worker 124*9880d681SAndroid Build Coastguard Worker0xac 0x01 0x0e 0x2b 125*9880d681SAndroid Build Coastguard Worker0xac 0x01 0x0e 0xab 126*9880d681SAndroid Build Coastguard Worker0xac 0x31 0x0e 0x2b 127*9880d681SAndroid Build Coastguard Worker0xac 0x31 0x0e 0xab 128*9880d681SAndroid Build Coastguard Worker0xac 0x29 0x4e 0x2b 129*9880d681SAndroid Build Coastguard Worker0xac 0x29 0x4e 0xab 130*9880d681SAndroid Build Coastguard Worker0xac 0x1d 0x8e 0x2b 131*9880d681SAndroid Build Coastguard Worker0xac 0x9d 0x8e 0xab 132*9880d681SAndroid Build Coastguard Worker 133*9880d681SAndroid Build Coastguard Worker# CHECK: adds w12, w13, w14 134*9880d681SAndroid Build Coastguard Worker# CHECK: adds x12, x13, x14 135*9880d681SAndroid Build Coastguard Worker# CHECK: adds w12, w13, w14, lsl #12 136*9880d681SAndroid Build Coastguard Worker# CHECK: adds x12, x13, x14, lsl #12 137*9880d681SAndroid Build Coastguard Worker# CHECK: adds w12, w13, w14, lsr #10 138*9880d681SAndroid Build Coastguard Worker# CHECK: adds x12, x13, x14, lsr #10 139*9880d681SAndroid Build Coastguard Worker# CHECK: adds w12, w13, w14, asr #7 140*9880d681SAndroid Build Coastguard Worker# CHECK: adds x12, x13, x14, asr #39 141*9880d681SAndroid Build Coastguard Worker 142*9880d681SAndroid Build Coastguard Worker0xac 0x01 0x0e 0x6b 143*9880d681SAndroid Build Coastguard Worker0xac 0x01 0x0e 0xeb 144*9880d681SAndroid Build Coastguard Worker0xac 0x31 0x0e 0x6b 145*9880d681SAndroid Build Coastguard Worker0xac 0x31 0x0e 0xeb 146*9880d681SAndroid Build Coastguard Worker0xac 0x29 0x4e 0x6b 147*9880d681SAndroid Build Coastguard Worker0xac 0x29 0x4e 0xeb 148*9880d681SAndroid Build Coastguard Worker0xac 0x1d 0x8e 0x6b 149*9880d681SAndroid Build Coastguard Worker0xac 0x9d 0x8e 0xeb 150*9880d681SAndroid Build Coastguard Worker 151*9880d681SAndroid Build Coastguard Worker# CHECK: subs w12, w13, w14 152*9880d681SAndroid Build Coastguard Worker# CHECK: subs x12, x13, x14 153*9880d681SAndroid Build Coastguard Worker# CHECK: subs w12, w13, w14, lsl #12 154*9880d681SAndroid Build Coastguard Worker# CHECK: subs x12, x13, x14, lsl #12 155*9880d681SAndroid Build Coastguard Worker# CHECK: subs w12, w13, w14, lsr #10 156*9880d681SAndroid Build Coastguard Worker# CHECK: subs x12, x13, x14, lsr #10 157*9880d681SAndroid Build Coastguard Worker# CHECK: subs w12, w13, w14, asr #7 158*9880d681SAndroid Build Coastguard Worker# CHECK: subs x12, x13, x14, asr #39 159*9880d681SAndroid Build Coastguard Worker 160*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 161*9880d681SAndroid Build Coastguard Worker# Add/Subtract with (optional) extend 162*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 163*9880d681SAndroid Build Coastguard Worker 164*9880d681SAndroid Build Coastguard Worker0x41 0x00 0x23 0x0b 165*9880d681SAndroid Build Coastguard Worker0x41 0x20 0x23 0x0b 166*9880d681SAndroid Build Coastguard Worker0x41 0x40 0x23 0x0b 167*9880d681SAndroid Build Coastguard Worker0x41 0x60 0x23 0x0b 168*9880d681SAndroid Build Coastguard Worker0x41 0x80 0x23 0x0b 169*9880d681SAndroid Build Coastguard Worker0x41 0xa0 0x23 0x0b 170*9880d681SAndroid Build Coastguard Worker0x41 0xc0 0x23 0x0b 171*9880d681SAndroid Build Coastguard Worker0x41 0xe0 0x23 0x0b 172*9880d681SAndroid Build Coastguard Worker 173*9880d681SAndroid Build Coastguard Worker# CHECK: add w1, w2, w3, uxtb 174*9880d681SAndroid Build Coastguard Worker# CHECK: add w1, w2, w3, uxth 175*9880d681SAndroid Build Coastguard Worker# CHECK: add w1, w2, w3 176*9880d681SAndroid Build Coastguard Worker# CHECK: add w1, w2, w3, uxtx 177*9880d681SAndroid Build Coastguard Worker# CHECK: add w1, w2, w3, sxtb 178*9880d681SAndroid Build Coastguard Worker# CHECK: add w1, w2, w3, sxth 179*9880d681SAndroid Build Coastguard Worker# CHECK: add w1, w2, w3, sxtw 180*9880d681SAndroid Build Coastguard Worker# CHECK: add w1, w2, w3, sxtx 181*9880d681SAndroid Build Coastguard Worker 182*9880d681SAndroid Build Coastguard Worker0x41 0x00 0x23 0x8b 183*9880d681SAndroid Build Coastguard Worker0x41 0x20 0x23 0x8b 184*9880d681SAndroid Build Coastguard Worker0x41 0x40 0x23 0x8b 185*9880d681SAndroid Build Coastguard Worker0x41 0x80 0x23 0x8b 186*9880d681SAndroid Build Coastguard Worker0x41 0xa0 0x23 0x8b 187*9880d681SAndroid Build Coastguard Worker0x41 0xc0 0x23 0x8b 188*9880d681SAndroid Build Coastguard Worker 189*9880d681SAndroid Build Coastguard Worker# CHECK: add x1, x2, w3, uxtb 190*9880d681SAndroid Build Coastguard Worker# CHECK: add x1, x2, w3, uxth 191*9880d681SAndroid Build Coastguard Worker# CHECK: add x1, x2, w3, uxtw 192*9880d681SAndroid Build Coastguard Worker# CHECK: add x1, x2, w3, sxtb 193*9880d681SAndroid Build Coastguard Worker# CHECK: add x1, x2, w3, sxth 194*9880d681SAndroid Build Coastguard Worker# CHECK: add x1, x2, w3, sxtw 195*9880d681SAndroid Build Coastguard Worker 196*9880d681SAndroid Build Coastguard Worker0xe1 0x43 0x23 0x0b 197*9880d681SAndroid Build Coastguard Worker0xe1 0x43 0x23 0x0b 198*9880d681SAndroid Build Coastguard Worker0x5f 0x60 0x23 0x8b 199*9880d681SAndroid Build Coastguard Worker0x5f 0x60 0x23 0x8b 200*9880d681SAndroid Build Coastguard Worker 201*9880d681SAndroid Build Coastguard Worker# CHECK: add w1, wsp, w3 202*9880d681SAndroid Build Coastguard Worker# CHECK: add w1, wsp, w3 203*9880d681SAndroid Build Coastguard Worker# CHECK: add sp, x2, x3 204*9880d681SAndroid Build Coastguard Worker# CHECK: add sp, x2, x3 205*9880d681SAndroid Build Coastguard Worker 206*9880d681SAndroid Build Coastguard Worker0x41 0x00 0x23 0x4b 207*9880d681SAndroid Build Coastguard Worker0x41 0x20 0x23 0x4b 208*9880d681SAndroid Build Coastguard Worker0x41 0x40 0x23 0x4b 209*9880d681SAndroid Build Coastguard Worker0x41 0x60 0x23 0x4b 210*9880d681SAndroid Build Coastguard Worker0x41 0x80 0x23 0x4b 211*9880d681SAndroid Build Coastguard Worker0x41 0xa0 0x23 0x4b 212*9880d681SAndroid Build Coastguard Worker0x41 0xc0 0x23 0x4b 213*9880d681SAndroid Build Coastguard Worker0x41 0xe0 0x23 0x4b 214*9880d681SAndroid Build Coastguard Worker 215*9880d681SAndroid Build Coastguard Worker# CHECK: sub w1, w2, w3, uxtb 216*9880d681SAndroid Build Coastguard Worker# CHECK: sub w1, w2, w3, uxth 217*9880d681SAndroid Build Coastguard Worker# CHECK: sub w1, w2, w3 218*9880d681SAndroid Build Coastguard Worker# CHECK: sub w1, w2, w3, uxtx 219*9880d681SAndroid Build Coastguard Worker# CHECK: sub w1, w2, w3, sxtb 220*9880d681SAndroid Build Coastguard Worker# CHECK: sub w1, w2, w3, sxth 221*9880d681SAndroid Build Coastguard Worker# CHECK: sub w1, w2, w3, sxtw 222*9880d681SAndroid Build Coastguard Worker# CHECK: sub w1, w2, w3, sxtx 223*9880d681SAndroid Build Coastguard Worker 224*9880d681SAndroid Build Coastguard Worker0x41 0x00 0x23 0xcb 225*9880d681SAndroid Build Coastguard Worker0x41 0x20 0x23 0xcb 226*9880d681SAndroid Build Coastguard Worker0x41 0x40 0x23 0xcb 227*9880d681SAndroid Build Coastguard Worker0x41 0x80 0x23 0xcb 228*9880d681SAndroid Build Coastguard Worker0x41 0xa0 0x23 0xcb 229*9880d681SAndroid Build Coastguard Worker0x41 0xc0 0x23 0xcb 230*9880d681SAndroid Build Coastguard Worker 231*9880d681SAndroid Build Coastguard Worker# CHECK: sub x1, x2, w3, uxtb 232*9880d681SAndroid Build Coastguard Worker# CHECK: sub x1, x2, w3, uxth 233*9880d681SAndroid Build Coastguard Worker# CHECK: sub x1, x2, w3, uxtw 234*9880d681SAndroid Build Coastguard Worker# CHECK: sub x1, x2, w3, sxtb 235*9880d681SAndroid Build Coastguard Worker# CHECK: sub x1, x2, w3, sxth 236*9880d681SAndroid Build Coastguard Worker# CHECK: sub x1, x2, w3, sxtw 237*9880d681SAndroid Build Coastguard Worker 238*9880d681SAndroid Build Coastguard Worker0xe1 0x43 0x23 0x4b 239*9880d681SAndroid Build Coastguard Worker0xe1 0x43 0x23 0x4b 240*9880d681SAndroid Build Coastguard Worker0x5f 0x60 0x23 0xcb 241*9880d681SAndroid Build Coastguard Worker0x5f 0x60 0x23 0xcb 242*9880d681SAndroid Build Coastguard Worker 243*9880d681SAndroid Build Coastguard Worker# CHECK: sub w1, wsp, w3 244*9880d681SAndroid Build Coastguard Worker# CHECK: sub w1, wsp, w3 245*9880d681SAndroid Build Coastguard Worker# CHECK: sub sp, x2, x3 246*9880d681SAndroid Build Coastguard Worker# CHECK: sub sp, x2, x3 247*9880d681SAndroid Build Coastguard Worker 248*9880d681SAndroid Build Coastguard Worker0x41 0x00 0x23 0x2b 249*9880d681SAndroid Build Coastguard Worker0x41 0x20 0x23 0x2b 250*9880d681SAndroid Build Coastguard Worker0x41 0x40 0x23 0x2b 251*9880d681SAndroid Build Coastguard Worker0x41 0x60 0x23 0x2b 252*9880d681SAndroid Build Coastguard Worker0x41 0x80 0x23 0x2b 253*9880d681SAndroid Build Coastguard Worker0x41 0xa0 0x23 0x2b 254*9880d681SAndroid Build Coastguard Worker0x41 0xc0 0x23 0x2b 255*9880d681SAndroid Build Coastguard Worker0x41 0xe0 0x23 0x2b 256*9880d681SAndroid Build Coastguard Worker 257*9880d681SAndroid Build Coastguard Worker# CHECK: adds w1, w2, w3, uxtb 258*9880d681SAndroid Build Coastguard Worker# CHECK: adds w1, w2, w3, uxth 259*9880d681SAndroid Build Coastguard Worker# CHECK: adds w1, w2, w3 260*9880d681SAndroid Build Coastguard Worker# CHECK: adds w1, w2, w3, uxtx 261*9880d681SAndroid Build Coastguard Worker# CHECK: adds w1, w2, w3, sxtb 262*9880d681SAndroid Build Coastguard Worker# CHECK: adds w1, w2, w3, sxth 263*9880d681SAndroid Build Coastguard Worker# CHECK: adds w1, w2, w3, sxtw 264*9880d681SAndroid Build Coastguard Worker# CHECK: adds w1, w2, w3, sxtx 265*9880d681SAndroid Build Coastguard Worker 266*9880d681SAndroid Build Coastguard Worker0x41 0x00 0x23 0xab 267*9880d681SAndroid Build Coastguard Worker0x41 0x20 0x23 0xab 268*9880d681SAndroid Build Coastguard Worker0x41 0x40 0x23 0xab 269*9880d681SAndroid Build Coastguard Worker0x41 0x80 0x23 0xab 270*9880d681SAndroid Build Coastguard Worker0x41 0xa0 0x23 0xab 271*9880d681SAndroid Build Coastguard Worker0x41 0xc0 0x23 0xab 272*9880d681SAndroid Build Coastguard Worker 273*9880d681SAndroid Build Coastguard Worker# CHECK: adds x1, x2, w3, uxtb 274*9880d681SAndroid Build Coastguard Worker# CHECK: adds x1, x2, w3, uxth 275*9880d681SAndroid Build Coastguard Worker# CHECK: adds x1, x2, w3, uxtw 276*9880d681SAndroid Build Coastguard Worker# CHECK: adds x1, x2, w3, sxtb 277*9880d681SAndroid Build Coastguard Worker# CHECK: adds x1, x2, w3, sxth 278*9880d681SAndroid Build Coastguard Worker# CHECK: adds x1, x2, w3, sxtw 279*9880d681SAndroid Build Coastguard Worker 280*9880d681SAndroid Build Coastguard Worker0xe1 0x43 0x23 0x2b 281*9880d681SAndroid Build Coastguard Worker0xe1 0x43 0x23 0x2b 282*9880d681SAndroid Build Coastguard Worker 283*9880d681SAndroid Build Coastguard Worker# CHECK: adds w1, wsp, w3 284*9880d681SAndroid Build Coastguard Worker# CHECK: adds w1, wsp, w3 285*9880d681SAndroid Build Coastguard Worker 286*9880d681SAndroid Build Coastguard Worker0x41 0x00 0x23 0x6b 287*9880d681SAndroid Build Coastguard Worker0x41 0x20 0x23 0x6b 288*9880d681SAndroid Build Coastguard Worker0x41 0x40 0x23 0x6b 289*9880d681SAndroid Build Coastguard Worker0x41 0x60 0x23 0x6b 290*9880d681SAndroid Build Coastguard Worker0x41 0x80 0x23 0x6b 291*9880d681SAndroid Build Coastguard Worker0x41 0xa0 0x23 0x6b 292*9880d681SAndroid Build Coastguard Worker0x41 0xc0 0x23 0x6b 293*9880d681SAndroid Build Coastguard Worker0x41 0xe0 0x23 0x6b 294*9880d681SAndroid Build Coastguard Worker 295*9880d681SAndroid Build Coastguard Worker# CHECK: subs w1, w2, w3, uxtb 296*9880d681SAndroid Build Coastguard Worker# CHECK: subs w1, w2, w3, uxth 297*9880d681SAndroid Build Coastguard Worker# CHECK: subs w1, w2, w3 298*9880d681SAndroid Build Coastguard Worker# CHECK: subs w1, w2, w3, uxtx 299*9880d681SAndroid Build Coastguard Worker# CHECK: subs w1, w2, w3, sxtb 300*9880d681SAndroid Build Coastguard Worker# CHECK: subs w1, w2, w3, sxth 301*9880d681SAndroid Build Coastguard Worker# CHECK: subs w1, w2, w3, sxtw 302*9880d681SAndroid Build Coastguard Worker# CHECK: subs w1, w2, w3, sxtx 303*9880d681SAndroid Build Coastguard Worker 304*9880d681SAndroid Build Coastguard Worker0x41 0x00 0x23 0xeb 305*9880d681SAndroid Build Coastguard Worker0x41 0x20 0x23 0xeb 306*9880d681SAndroid Build Coastguard Worker0x41 0x40 0x23 0xeb 307*9880d681SAndroid Build Coastguard Worker0x41 0x80 0x23 0xeb 308*9880d681SAndroid Build Coastguard Worker0x41 0xa0 0x23 0xeb 309*9880d681SAndroid Build Coastguard Worker0x41 0xc0 0x23 0xeb 310*9880d681SAndroid Build Coastguard Worker 311*9880d681SAndroid Build Coastguard Worker# CHECK: subs x1, x2, w3, uxtb 312*9880d681SAndroid Build Coastguard Worker# CHECK: subs x1, x2, w3, uxth 313*9880d681SAndroid Build Coastguard Worker# CHECK: subs x1, x2, w3, uxtw 314*9880d681SAndroid Build Coastguard Worker# CHECK: subs x1, x2, w3, sxtb 315*9880d681SAndroid Build Coastguard Worker# CHECK: subs x1, x2, w3, sxth 316*9880d681SAndroid Build Coastguard Worker# CHECK: subs x1, x2, w3, sxtw 317*9880d681SAndroid Build Coastguard Worker 318*9880d681SAndroid Build Coastguard Worker0xe1 0x43 0x23 0x6b 319*9880d681SAndroid Build Coastguard Worker0xe1 0x43 0x23 0x6b 320*9880d681SAndroid Build Coastguard Worker 321*9880d681SAndroid Build Coastguard Worker# CHECK: subs w1, wsp, w3 322*9880d681SAndroid Build Coastguard Worker# CHECK: subs w1, wsp, w3 323*9880d681SAndroid Build Coastguard Worker 324*9880d681SAndroid Build Coastguard Worker0x1f 0x41 0x28 0xeb 325*9880d681SAndroid Build Coastguard Worker0x3f 0x41 0x28 0x6b 326*9880d681SAndroid Build Coastguard Worker0xff 0x43 0x28 0x6b 327*9880d681SAndroid Build Coastguard Worker0xff 0x43 0x28 0xeb 328*9880d681SAndroid Build Coastguard Worker 329*9880d681SAndroid Build Coastguard Worker# CHECK: cmp x8, w8, uxtw 330*9880d681SAndroid Build Coastguard Worker# CHECK: cmp w9, w8, uxtw 331*9880d681SAndroid Build Coastguard Worker# CHECK: cmp wsp, w8 332*9880d681SAndroid Build Coastguard Worker# CHECK: cmp sp, w8 333*9880d681SAndroid Build Coastguard Worker 334*9880d681SAndroid Build Coastguard Worker0x3f 0x41 0x28 0x4b 335*9880d681SAndroid Build Coastguard Worker0xe1 0x43 0x28 0x4b 336*9880d681SAndroid Build Coastguard Worker0xff 0x43 0x28 0x4b 337*9880d681SAndroid Build Coastguard Worker0x3f 0x41 0x28 0xcb 338*9880d681SAndroid Build Coastguard Worker0xe1 0x43 0x28 0xcb 339*9880d681SAndroid Build Coastguard Worker0xff 0x43 0x28 0xcb 340*9880d681SAndroid Build Coastguard Worker0xe1 0x43 0x28 0x6b 341*9880d681SAndroid Build Coastguard Worker0xe1 0x43 0x28 0xeb 342*9880d681SAndroid Build Coastguard Worker 343*9880d681SAndroid Build Coastguard Worker# CHECK: sub wsp, w9, w8 344*9880d681SAndroid Build Coastguard Worker# CHECK: sub w1, wsp, w8 345*9880d681SAndroid Build Coastguard Worker# CHECK: sub wsp, wsp, w8 346*9880d681SAndroid Build Coastguard Worker# CHECK: sub sp, x9, w8 347*9880d681SAndroid Build Coastguard Worker# CHECK: sub x1, sp, w8 348*9880d681SAndroid Build Coastguard Worker# CHECK: sub sp, sp, w8 349*9880d681SAndroid Build Coastguard Worker# CHECK: subs w1, wsp, w8 350*9880d681SAndroid Build Coastguard Worker# CHECK: subs x1, sp, w8 351*9880d681SAndroid Build Coastguard Worker 352*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 353*9880d681SAndroid Build Coastguard Worker# Signed/Unsigned divide 354*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 355*9880d681SAndroid Build Coastguard Worker 356*9880d681SAndroid Build Coastguard Worker0x41 0x0c 0xc3 0x1a 357*9880d681SAndroid Build Coastguard Worker0x41 0x0c 0xc3 0x9a 358*9880d681SAndroid Build Coastguard Worker0x41 0x08 0xc3 0x1a 359*9880d681SAndroid Build Coastguard Worker0x41 0x08 0xc3 0x9a 360*9880d681SAndroid Build Coastguard Worker 361*9880d681SAndroid Build Coastguard Worker# CHECK: sdiv w1, w2, w3 362*9880d681SAndroid Build Coastguard Worker# CHECK: sdiv x1, x2, x3 363*9880d681SAndroid Build Coastguard Worker# CHECK: udiv w1, w2, w3 364*9880d681SAndroid Build Coastguard Worker# CHECK: udiv x1, x2, x3 365*9880d681SAndroid Build Coastguard Worker 366*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 367*9880d681SAndroid Build Coastguard Worker# Variable shifts 368*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 369*9880d681SAndroid Build Coastguard Worker 370*9880d681SAndroid Build Coastguard Worker 0x41 0x28 0xc3 0x1a 371*9880d681SAndroid Build Coastguard Worker# CHECK: asr w1, w2, w3 372*9880d681SAndroid Build Coastguard Worker 0x41 0x28 0xc3 0x9a 373*9880d681SAndroid Build Coastguard Worker# CHECK: asr x1, x2, x3 374*9880d681SAndroid Build Coastguard Worker 0x41 0x20 0xc3 0x1a 375*9880d681SAndroid Build Coastguard Worker# CHECK: lsl w1, w2, w3 376*9880d681SAndroid Build Coastguard Worker 0x41 0x20 0xc3 0x9a 377*9880d681SAndroid Build Coastguard Worker# CHECK: lsl x1, x2, x3 378*9880d681SAndroid Build Coastguard Worker 0x41 0x24 0xc3 0x1a 379*9880d681SAndroid Build Coastguard Worker# CHECK: lsr w1, w2, w3 380*9880d681SAndroid Build Coastguard Worker 0x41 0x24 0xc3 0x9a 381*9880d681SAndroid Build Coastguard Worker# CHECK: lsr x1, x2, x3 382*9880d681SAndroid Build Coastguard Worker 0x41 0x2c 0xc3 0x1a 383*9880d681SAndroid Build Coastguard Worker# CHECK: ror w1, w2, w3 384*9880d681SAndroid Build Coastguard Worker 0x41 0x2c 0xc3 0x9a 385*9880d681SAndroid Build Coastguard Worker# CHECK: ror x1, x2, x3 386*9880d681SAndroid Build Coastguard Worker 387*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 388*9880d681SAndroid Build Coastguard Worker# One operand instructions 389*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 390*9880d681SAndroid Build Coastguard Worker 391*9880d681SAndroid Build Coastguard Worker 0x41 0x14 0xc0 0x5a 392*9880d681SAndroid Build Coastguard Worker# CHECK: cls w1, w2 393*9880d681SAndroid Build Coastguard Worker 0x41 0x14 0xc0 0xda 394*9880d681SAndroid Build Coastguard Worker# CHECK: cls x1, x2 395*9880d681SAndroid Build Coastguard Worker 0x41 0x10 0xc0 0x5a 396*9880d681SAndroid Build Coastguard Worker# CHECK: clz w1, w2 397*9880d681SAndroid Build Coastguard Worker 0x41 0x10 0xc0 0xda 398*9880d681SAndroid Build Coastguard Worker# CHECK: clz x1, x2 399*9880d681SAndroid Build Coastguard Worker 0x41 0x00 0xc0 0x5a 400*9880d681SAndroid Build Coastguard Worker# CHECK: rbit w1, w2 401*9880d681SAndroid Build Coastguard Worker 0x41 0x00 0xc0 0xda 402*9880d681SAndroid Build Coastguard Worker# CHECK: rbit x1, x2 403*9880d681SAndroid Build Coastguard Worker 0x41 0x08 0xc0 0x5a 404*9880d681SAndroid Build Coastguard Worker# CHECK: rev w1, w2 405*9880d681SAndroid Build Coastguard Worker 0x41 0x0c 0xc0 0xda 406*9880d681SAndroid Build Coastguard Worker# CHECK: rev x1, x2 407*9880d681SAndroid Build Coastguard Worker 0x41 0x04 0xc0 0x5a 408*9880d681SAndroid Build Coastguard Worker# CHECK: rev16 w1, w2 409*9880d681SAndroid Build Coastguard Worker 0x41 0x04 0xc0 0xda 410*9880d681SAndroid Build Coastguard Worker# CHECK: rev16 x1, x2 411*9880d681SAndroid Build Coastguard Worker 0x41 0x08 0xc0 0xda 412*9880d681SAndroid Build Coastguard Worker# CHECK: rev32 x1, x2 413*9880d681SAndroid Build Coastguard Worker 414*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 415*9880d681SAndroid Build Coastguard Worker# 6.6.1 Multiply-add instructions 416*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 417*9880d681SAndroid Build Coastguard Worker 418*9880d681SAndroid Build Coastguard Worker0x41 0x10 0x03 0x1b 419*9880d681SAndroid Build Coastguard Worker0x41 0x10 0x03 0x9b 420*9880d681SAndroid Build Coastguard Worker0x41 0x90 0x03 0x1b 421*9880d681SAndroid Build Coastguard Worker0x41 0x90 0x03 0x9b 422*9880d681SAndroid Build Coastguard Worker0x41 0x10 0x23 0x9b 423*9880d681SAndroid Build Coastguard Worker0x41 0x90 0x23 0x9b 424*9880d681SAndroid Build Coastguard Worker0x41 0x10 0xa3 0x9b 425*9880d681SAndroid Build Coastguard Worker0x41 0x90 0xa3 0x9b 426*9880d681SAndroid Build Coastguard Worker 427*9880d681SAndroid Build Coastguard Worker# CHECK: madd w1, w2, w3, w4 428*9880d681SAndroid Build Coastguard Worker# CHECK: madd x1, x2, x3, x4 429*9880d681SAndroid Build Coastguard Worker# CHECK: msub w1, w2, w3, w4 430*9880d681SAndroid Build Coastguard Worker# CHECK: msub x1, x2, x3, x4 431*9880d681SAndroid Build Coastguard Worker# CHECK: smaddl x1, w2, w3, x4 432*9880d681SAndroid Build Coastguard Worker# CHECK: smsubl x1, w2, w3, x4 433*9880d681SAndroid Build Coastguard Worker# CHECK: umaddl x1, w2, w3, x4 434*9880d681SAndroid Build Coastguard Worker# CHECK: umsubl x1, w2, w3, x4 435*9880d681SAndroid Build Coastguard Worker 436*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 437*9880d681SAndroid Build Coastguard Worker# Multiply-high instructions 438*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 439*9880d681SAndroid Build Coastguard Worker 440*9880d681SAndroid Build Coastguard Worker0x41 0x7c 0x43 0x9b 441*9880d681SAndroid Build Coastguard Worker0x41 0x7c 0xc3 0x9b 442*9880d681SAndroid Build Coastguard Worker 443*9880d681SAndroid Build Coastguard Worker# CHECK: smulh x1, x2, x3 444*9880d681SAndroid Build Coastguard Worker# CHECK: umulh x1, x2, x3 445*9880d681SAndroid Build Coastguard Worker 446*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 447*9880d681SAndroid Build Coastguard Worker# Move immediate instructions 448*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 449*9880d681SAndroid Build Coastguard Worker 450*9880d681SAndroid Build Coastguard Worker0x20 0x00 0x80 0x52 451*9880d681SAndroid Build Coastguard Worker0x20 0x00 0x80 0xd2 452*9880d681SAndroid Build Coastguard Worker0x20 0x00 0xa0 0x52 453*9880d681SAndroid Build Coastguard Worker0x20 0x00 0xa0 0xd2 454*9880d681SAndroid Build Coastguard Worker 455*9880d681SAndroid Build Coastguard Worker# CHECK: mov w0, #1 456*9880d681SAndroid Build Coastguard Worker# CHECK: mov x0, #1 457*9880d681SAndroid Build Coastguard Worker# CHECK: mov w0, #65536 458*9880d681SAndroid Build Coastguard Worker# CHECK: mov x0, #65536 459*9880d681SAndroid Build Coastguard Worker 460*9880d681SAndroid Build Coastguard Worker0x40 0x00 0x80 0x12 461*9880d681SAndroid Build Coastguard Worker0x40 0x00 0x80 0x92 462*9880d681SAndroid Build Coastguard Worker0x40 0x00 0xa0 0x12 463*9880d681SAndroid Build Coastguard Worker0x40 0x00 0xa0 0x92 464*9880d681SAndroid Build Coastguard Worker 465*9880d681SAndroid Build Coastguard Worker# CHECK: mov w0, #-3 466*9880d681SAndroid Build Coastguard Worker# CHECK: mov x0, #-3 467*9880d681SAndroid Build Coastguard Worker# CHECK: mov w0, #-131073 468*9880d681SAndroid Build Coastguard Worker# CHECK: mov x0, #-131073 469*9880d681SAndroid Build Coastguard Worker 470*9880d681SAndroid Build Coastguard Worker0x20 0x00 0x80 0x72 471*9880d681SAndroid Build Coastguard Worker0x20 0x00 0x80 0xf2 472*9880d681SAndroid Build Coastguard Worker0x20 0x00 0xa0 0x72 473*9880d681SAndroid Build Coastguard Worker0x20 0x00 0xa0 0xf2 474*9880d681SAndroid Build Coastguard Worker 475*9880d681SAndroid Build Coastguard Worker# CHECK: movk w0, #1 476*9880d681SAndroid Build Coastguard Worker# CHECK: movk x0, #1 477*9880d681SAndroid Build Coastguard Worker# CHECK: movk w0, #1, lsl #16 478*9880d681SAndroid Build Coastguard Worker# CHECK: movk x0, #1, lsl #16 479*9880d681SAndroid Build Coastguard Worker 480*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 481*9880d681SAndroid Build Coastguard Worker# Conditionally set flags instructions 482*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 483*9880d681SAndroid Build Coastguard Worker 484*9880d681SAndroid Build Coastguard Worker 0x1f 0x00 0x00 0x31 485*9880d681SAndroid Build Coastguard Worker# CHECK: cmn w0, #0 486*9880d681SAndroid Build Coastguard Worker 0x1f 0xfc 0x03 0xb1 487*9880d681SAndroid Build Coastguard Worker# CHECK: x0, #255 488*9880d681SAndroid Build Coastguard Worker 489*9880d681SAndroid Build Coastguard Worker 0x23 0x08 0x42 0x3a 490*9880d681SAndroid Build Coastguard Worker# CHECK: ccmn w1, #2, #3, eq 491*9880d681SAndroid Build Coastguard Worker 0x23 0x08 0x42 0xba 492*9880d681SAndroid Build Coastguard Worker# CHECK: ccmn x1, #2, #3, eq 493*9880d681SAndroid Build Coastguard Worker 0x23 0x08 0x42 0x7a 494*9880d681SAndroid Build Coastguard Worker# CHECK: ccmp w1, #2, #3, eq 495*9880d681SAndroid Build Coastguard Worker 0x23 0x08 0x42 0xfa 496*9880d681SAndroid Build Coastguard Worker# CHECK: ccmp x1, #2, #3, eq 497*9880d681SAndroid Build Coastguard Worker 498*9880d681SAndroid Build Coastguard Worker 0x23 0x00 0x42 0x3a 499*9880d681SAndroid Build Coastguard Worker# CHECK: ccmn w1, w2, #3, eq 500*9880d681SAndroid Build Coastguard Worker 0x23 0x00 0x42 0xba 501*9880d681SAndroid Build Coastguard Worker# CHECK: ccmn x1, x2, #3, eq 502*9880d681SAndroid Build Coastguard Worker 0x23 0x00 0x42 0x7a 503*9880d681SAndroid Build Coastguard Worker# CHECK: ccmp w1, w2, #3, eq 504*9880d681SAndroid Build Coastguard Worker 0x23 0x00 0x42 0xfa 505*9880d681SAndroid Build Coastguard Worker# CHECK: ccmp x1, x2, #3, eq 506*9880d681SAndroid Build Coastguard Worker 507*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 508*9880d681SAndroid Build Coastguard Worker# Conditional select instructions 509*9880d681SAndroid Build Coastguard Worker#==---------------------------------------------------------------------------== 510*9880d681SAndroid Build Coastguard Worker 511*9880d681SAndroid Build Coastguard Worker 0x41 0x00 0x83 0x1a 512*9880d681SAndroid Build Coastguard Worker# CHECK: csel w1, w2, w3, eq 513*9880d681SAndroid Build Coastguard Worker 0x41 0x00 0x83 0x9a 514*9880d681SAndroid Build Coastguard Worker# CHECK: csel x1, x2, x3, eq 515*9880d681SAndroid Build Coastguard Worker 0x41 0x04 0x83 0x1a 516*9880d681SAndroid Build Coastguard Worker# CHECK: csinc w1, w2, w3, eq 517*9880d681SAndroid Build Coastguard Worker 0x41 0x04 0x83 0x9a 518*9880d681SAndroid Build Coastguard Worker# CHECK: csinc x1, x2, x3, eq 519*9880d681SAndroid Build Coastguard Worker 0x41 0x00 0x83 0x5a 520*9880d681SAndroid Build Coastguard Worker# CHECK: csinv w1, w2, w3, eq 521*9880d681SAndroid Build Coastguard Worker 0x41 0x00 0x83 0xda 522*9880d681SAndroid Build Coastguard Worker# CHECK: csinv x1, x2, x3, eq 523*9880d681SAndroid Build Coastguard Worker 0x41 0x04 0x83 0x5a 524*9880d681SAndroid Build Coastguard Worker# CHECK: csneg w1, w2, w3, eq 525*9880d681SAndroid Build Coastguard Worker 0x41 0x04 0x83 0xda 526*9880d681SAndroid Build Coastguard Worker# CHECK: csneg x1, x2, x3, eq 527