1 @ RUN: llvm-mc -triple arm-unknown-unknown -show-encoding < %s | FileCheck %s 2 3 foo: 4 @ CHECK: foo 5 6 sub r2, r2, #6 7 sub r2, #6 8 sub r2, r2, r3 9 sub r2, r3 10 11 @ CHECK: sub r2, r2, #6 @ encoding: [0x06,0x20,0x42,0xe2] 12 @ CHECK: sub r2, r2, #6 @ encoding: [0x06,0x20,0x42,0xe2] 13 @ CHECK: sub r2, r2, r3 @ encoding: [0x03,0x20,0x42,0xe0] 14 @ CHECK: sub r2, r2, r3 @ encoding: [0x03,0x20,0x42,0xe0] 15 16 add r2, r2, #6 17 add r2, #6 18 add r2, r2, r3 19 add r2, r3 20 21 @ CHECK: add r2, r2, #6 @ encoding: [0x06,0x20,0x82,0xe2] 22 @ CHECK: add r2, r2, #6 @ encoding: [0x06,0x20,0x82,0xe2] 23 @ CHECK: add r2, r2, r3 @ encoding: [0x03,0x20,0x82,0xe0] 24 @ CHECK: add r2, r2, r3 @ encoding: [0x03,0x20,0x82,0xe0] 25 26 and r2, r2, #6 27 and r2, #6 28 and r2, r2, r3 29 and r2, r3 30 31 @ CHECK: and r2, r2, #6 @ encoding: [0x06,0x20,0x02,0xe2] 32 @ CHECK: and r2, r2, #6 @ encoding: [0x06,0x20,0x02,0xe2] 33 @ CHECK: and r2, r2, r3 @ encoding: [0x03,0x20,0x02,0xe0] 34 @ CHECK: and r2, r2, r3 @ encoding: [0x03,0x20,0x02,0xe0] 35 36 orr r2, r2, #6 37 orr r2, #6 38 orr r2, r2, r3 39 orr r2, r3 40 41 @ CHECK: orr r2, r2, #6 @ encoding: [0x06,0x20,0x82,0xe3] 42 @ CHECK: orr r2, r2, #6 @ encoding: [0x06,0x20,0x82,0xe3] 43 @ CHECK: orr r2, r2, r3 @ encoding: [0x03,0x20,0x82,0xe1] 44 @ CHECK: orr r2, r2, r3 @ encoding: [0x03,0x20,0x82,0xe1] 45 46 eor r2, r2, #6 47 eor r2, #6 48 eor r2, r2, r3 49 eor r2, r3 50 51 @ CHECK: eor r2, r2, #6 @ encoding: [0x06,0x20,0x22,0xe2] 52 @ CHECK: eor r2, r2, #6 @ encoding: [0x06,0x20,0x22,0xe2] 53 @ CHECK: eor r2, r2, r3 @ encoding: [0x03,0x20,0x22,0xe0] 54 @ CHECK: eor r2, r2, r3 @ encoding: [0x03,0x20,0x22,0xe0] 55 56 bic r2, r2, #6 57 bic r2, #6 58 bic r2, r2, r3 59 bic r2, r3 60 61 @ CHECK: bic r2, r2, #6 @ encoding: [0x06,0x20,0xc2,0xe3] 62 @ CHECK: bic r2, r2, #6 @ encoding: [0x06,0x20,0xc2,0xe3] 63 @ CHECK: bic r2, r2, r3 @ encoding: [0x03,0x20,0xc2,0xe1] 64 @ CHECK: bic r2, r2, r3 @ encoding: [0x03,0x20,0xc2,0xe1] 65 66 67 @ Also check that we handle the predicate and cc_out operands. 68 subseq r2, r2, #6 69 subseq r2, #6 70 subseq r2, r2, r3 71 subseq r2, r3 72 73 @ CHECK: subseq r2, r2, #6 @ encoding: [0x06,0x20,0x52,0x02] 74 @ CHECK: subseq r2, r2, #6 @ encoding: [0x06,0x20,0x52,0x02] 75 @ CHECK: subseq r2, r2, r3 @ encoding: [0x03,0x20,0x52,0x00] 76 @ CHECK: subseq r2, r2, r3 @ encoding: [0x03,0x20,0x52,0x00] 77 78 addseq r2, r2, #6 79 addseq r2, #6 80 addseq r2, r2, r3 81 addseq r2, r3 82 83 @ CHECK: addseq r2, r2, #6 @ encoding: [0x06,0x20,0x92,0x02] 84 @ CHECK: addseq r2, r2, #6 @ encoding: [0x06,0x20,0x92,0x02] 85 @ CHECK: addseq r2, r2, r3 @ encoding: [0x03,0x20,0x92,0x00] 86 @ CHECK: addseq r2, r2, r3 @ encoding: [0x03,0x20,0x92,0x00] 87 88 andseq r2, r2, #6 89 andseq r2, #6 90 andseq r2, r2, r3 91 andseq r2, r3 92 93 @ CHECK: andseq r2, r2, #6 @ encoding: [0x06,0x20,0x12,0x02] 94 @ CHECK: andseq r2, r2, #6 @ encoding: [0x06,0x20,0x12,0x02] 95 @ CHECK: andseq r2, r2, r3 @ encoding: [0x03,0x20,0x12,0x00] 96 @ CHECK: andseq r2, r2, r3 @ encoding: [0x03,0x20,0x12,0x00] 97 98 orrseq r2, r2, #6 99 orrseq r2, #6 100 orrseq r2, r2, r3 101 orrseq r2, r3 102 103 @ CHECK: orrseq r2, r2, #6 @ encoding: [0x06,0x20,0x92,0x03] 104 @ CHECK: orrseq r2, r2, #6 @ encoding: [0x06,0x20,0x92,0x03] 105 @ CHECK: orrseq r2, r2, r3 @ encoding: [0x03,0x20,0x92,0x01] 106 @ CHECK: orrseq r2, r2, r3 @ encoding: [0x03,0x20,0x92,0x01] 107 108 eorseq r2, r2, #6 109 eorseq r2, #6 110 eorseq r2, r2, r3 111 eorseq r2, r3 112 113 @ CHECK: eorseq r2, r2, #6 @ encoding: [0x06,0x20,0x32,0x02] 114 @ CHECK: eorseq r2, r2, #6 @ encoding: [0x06,0x20,0x32,0x02] 115 @ CHECK: eorseq r2, r2, r3 @ encoding: [0x03,0x20,0x32,0x00] 116 @ CHECK: eorseq r2, r2, r3 @ encoding: [0x03,0x20,0x32,0x00] 117 118 bicseq r2, r2, #6 119 bicseq r2, #6 120 bicseq r2, r2, r3 121 bicseq r2, r3 122 123 @ CHECK: bicseq r2, r2, #6 @ encoding: [0x06,0x20,0xd2,0x03] 124 @ CHECK: bicseq r2, r2, #6 @ encoding: [0x06,0x20,0xd2,0x03] 125 @ CHECK: bicseq r2, r2, r3 @ encoding: [0x03,0x20,0xd2,0x01] 126 @ CHECK: bicseq r2, r2, r3 @ encoding: [0x03,0x20,0xd2,0x01] 127 128 add r0, pc, #123 129 130 @ CHECK: adr r0, #123 @ encoding: [0x7b,0x00,0x8f,0xe2] 131