1 # RUN: llvm-mc -triple arm64-apple-darwin --disassemble < %s | FileCheck %s 2 3 #==---------------------------------------------------------------------------== 4 # 5.4.2 Logical (immediate) 5 #==---------------------------------------------------------------------------== 6 7 0x00 0x00 0x00 0x12 8 0x00 0x00 0x40 0x92 9 0x41 0x0c 0x00 0x12 10 0x41 0x0c 0x40 0x92 11 0xbf 0xec 0x7c 0x92 12 0x00 0x00 0x00 0x72 13 0x00 0x00 0x40 0xf2 14 0x41 0x0c 0x00 0x72 15 0x41 0x0c 0x40 0xf2 16 0x5f 0x0c 0x40 0xf2 17 18 # CHECK: and w0, w0, #0x1 19 # CHECK: and x0, x0, #0x1 20 # CHECK: and w1, w2, #0xf 21 # CHECK: and x1, x2, #0xf 22 # CHECK: and sp, x5, #0xfffffffffffffff0 23 # CHECK: ands w0, w0, #0x1 24 # CHECK: ands x0, x0, #0x1 25 # CHECK: ands w1, w2, #0xf 26 # CHECK: ands x1, x2, #0xf 27 # CHECK: tst x2, #0xf 28 29 0x41 0x00 0x12 0x52 30 0x41 0x00 0x71 0xd2 31 0x5f 0x00 0x71 0xd2 32 33 # CHECK: eor w1, w2, #0x4000 34 # CHECK: eor x1, x2, #0x8000 35 # CHECK: eor sp, x2, #0x8000 36 37 0x41 0x00 0x12 0x32 38 0x41 0x00 0x71 0xb2 39 0x5f 0x00 0x71 0xb2 40 41 # CHECK: orr w1, w2, #0x4000 42 # CHECK: orr x1, x2, #0x8000 43 # CHECK: orr sp, x2, #0x8000 44 45 #==---------------------------------------------------------------------------== 46 # 5.5.3 Logical (shifted register) 47 #==---------------------------------------------------------------------------== 48 49 0x41 0x00 0x03 0x0a 50 0x41 0x00 0x03 0x8a 51 0x41 0x08 0x03 0x0a 52 0x41 0x08 0x03 0x8a 53 0x41 0x08 0x43 0x0a 54 0x41 0x08 0x43 0x8a 55 0x41 0x08 0x83 0x0a 56 0x41 0x08 0x83 0x8a 57 0x41 0x08 0xc3 0x0a 58 0x41 0x08 0xc3 0x8a 59 60 # CHECK: and w1, w2, w3 61 # CHECK: and x1, x2, x3 62 # CHECK: and w1, w2, w3, lsl #2 63 # CHECK: and x1, x2, x3, lsl #2 64 # CHECK: and w1, w2, w3, lsr #2 65 # CHECK: and x1, x2, x3, lsr #2 66 # CHECK: and w1, w2, w3, asr #2 67 # CHECK: and x1, x2, x3, asr #2 68 # CHECK: and w1, w2, w3, ror #2 69 # CHECK: and x1, x2, x3, ror #2 70 71 0x41 0x00 0x03 0x6a 72 0x41 0x00 0x03 0xea 73 0x41 0x08 0x03 0x6a 74 0x41 0x08 0x03 0xea 75 0x41 0x08 0x43 0x6a 76 0x41 0x08 0x43 0xea 77 0x41 0x08 0x83 0x6a 78 0x41 0x08 0x83 0xea 79 0x41 0x08 0xc3 0x6a 80 0x41 0x08 0xc3 0xea 81 82 # CHECK: ands w1, w2, w3 83 # CHECK: ands x1, x2, x3 84 # CHECK: ands w1, w2, w3, lsl #2 85 # CHECK: ands x1, x2, x3, lsl #2 86 # CHECK: ands w1, w2, w3, lsr #2 87 # CHECK: ands x1, x2, x3, lsr #2 88 # CHECK: ands w1, w2, w3, asr #2 89 # CHECK: ands x1, x2, x3, asr #2 90 # CHECK: ands w1, w2, w3, ror #2 91 # CHECK: ands x1, x2, x3, ror #2 92 93 0x41 0x00 0x23 0x0a 94 0x41 0x00 0x23 0x8a 95 0x41 0x0c 0x23 0x0a 96 0x41 0x0c 0x23 0x8a 97 0x41 0x0c 0x63 0x0a 98 0x41 0x0c 0x63 0x8a 99 0x41 0x0c 0xa3 0x0a 100 0x41 0x0c 0xa3 0x8a 101 0x41 0x0c 0xe3 0x0a 102 0x41 0x0c 0xe3 0x8a 103 104 # CHECK: bic w1, w2, w3 105 # CHECK: bic x1, x2, x3 106 # CHECK: bic w1, w2, w3, lsl #3 107 # CHECK: bic x1, x2, x3, lsl #3 108 # CHECK: bic w1, w2, w3, lsr #3 109 # CHECK: bic x1, x2, x3, lsr #3 110 # CHECK: bic w1, w2, w3, asr #3 111 # CHECK: bic x1, x2, x3, asr #3 112 # CHECK: bic w1, w2, w3, ror #3 113 # CHECK: bic x1, x2, x3, ror #3 114 115 0x41 0x00 0x23 0x6a 116 0x41 0x00 0x23 0xea 117 0x41 0x0c 0x23 0x6a 118 0x41 0x0c 0x23 0xea 119 0x41 0x0c 0x63 0x6a 120 0x41 0x0c 0x63 0xea 121 0x41 0x0c 0xa3 0x6a 122 0x41 0x0c 0xa3 0xea 123 0x41 0x0c 0xe3 0x6a 124 0x41 0x0c 0xe3 0xea 125 126 # CHECK: bics w1, w2, w3 127 # CHECK: bics x1, x2, x3 128 # CHECK: bics w1, w2, w3, lsl #3 129 # CHECK: bics x1, x2, x3, lsl #3 130 # CHECK: bics w1, w2, w3, lsr #3 131 # CHECK: bics x1, x2, x3, lsr #3 132 # CHECK: bics w1, w2, w3, asr #3 133 # CHECK: bics x1, x2, x3, asr #3 134 # CHECK: bics w1, w2, w3, ror #3 135 # CHECK: bics x1, x2, x3, ror #3 136 137 0x41 0x00 0x23 0x4a 138 0x41 0x00 0x23 0xca 139 0x41 0x10 0x23 0x4a 140 0x41 0x10 0x23 0xca 141 0x41 0x10 0x63 0x4a 142 0x41 0x10 0x63 0xca 143 0x41 0x10 0xa3 0x4a 144 0x41 0x10 0xa3 0xca 145 0x41 0x10 0xe3 0x4a 146 0x41 0x10 0xe3 0xca 147 148 # CHECK: eon w1, w2, w3 149 # CHECK: eon x1, x2, x3 150 # CHECK: eon w1, w2, w3, lsl #4 151 # CHECK: eon x1, x2, x3, lsl #4 152 # CHECK: eon w1, w2, w3, lsr #4 153 # CHECK: eon x1, x2, x3, lsr #4 154 # CHECK: eon w1, w2, w3, asr #4 155 # CHECK: eon x1, x2, x3, asr #4 156 # CHECK: eon w1, w2, w3, ror #4 157 # CHECK: eon x1, x2, x3, ror #4 158 159 0x41 0x00 0x03 0x4a 160 0x41 0x00 0x03 0xca 161 0x41 0x14 0x03 0x4a 162 0x41 0x14 0x03 0xca 163 0x41 0x14 0x43 0x4a 164 0x41 0x14 0x43 0xca 165 0x41 0x14 0x83 0x4a 166 0x41 0x14 0x83 0xca 167 0x41 0x14 0xc3 0x4a 168 0x41 0x14 0xc3 0xca 169 170 # CHECK: eor w1, w2, w3 171 # CHECK: eor x1, x2, x3 172 # CHECK: eor w1, w2, w3, lsl #5 173 # CHECK: eor x1, x2, x3, lsl #5 174 # CHECK: eor w1, w2, w3, lsr #5 175 # CHECK: eor x1, x2, x3, lsr #5 176 # CHECK: eor w1, w2, w3, asr #5 177 # CHECK: eor x1, x2, x3, asr #5 178 # CHECK: eor w1, w2, w3, ror #5 179 # CHECK: eor x1, x2, x3, ror #5 180 181 0x41 0x00 0x03 0x2a 182 0x41 0x00 0x03 0xaa 183 0x41 0x18 0x03 0x2a 184 0x41 0x18 0x03 0xaa 185 0x41 0x18 0x43 0x2a 186 0x41 0x18 0x43 0xaa 187 0x41 0x18 0x83 0x2a 188 0x41 0x18 0x83 0xaa 189 0x41 0x18 0xc3 0x2a 190 0x41 0x18 0xc3 0xaa 191 192 # CHECK: orr w1, w2, w3 193 # CHECK: orr x1, x2, x3 194 # CHECK: orr w1, w2, w3, lsl #6 195 # CHECK: orr x1, x2, x3, lsl #6 196 # CHECK: orr w1, w2, w3, lsr #6 197 # CHECK: orr x1, x2, x3, lsr #6 198 # CHECK: orr w1, w2, w3, asr #6 199 # CHECK: orr x1, x2, x3, asr #6 200 # CHECK: orr w1, w2, w3, ror #6 201 # CHECK: orr x1, x2, x3, ror #6 202 203 0x41 0x00 0x23 0x2a 204 0x41 0x00 0x23 0xaa 205 0x41 0x1c 0x23 0x2a 206 0x41 0x1c 0x23 0xaa 207 0x41 0x1c 0x63 0x2a 208 0x41 0x1c 0x63 0xaa 209 0x41 0x1c 0xa3 0x2a 210 0x41 0x1c 0xa3 0xaa 211 0x41 0x1c 0xe3 0x2a 212 0x41 0x1c 0xe3 0xaa 213 214 # CHECK: orn w1, w2, w3 215 # CHECK: orn x1, x2, x3 216 # CHECK: orn w1, w2, w3, lsl #7 217 # CHECK: orn x1, x2, x3, lsl #7 218 # CHECK: orn w1, w2, w3, lsr #7 219 # CHECK: orn x1, x2, x3, lsr #7 220 # CHECK: orn w1, w2, w3, asr #7 221 # CHECK: orn x1, x2, x3, asr #7 222 # CHECK: orn w1, w2, w3, ror #7 223 # CHECK: orn x1, x2, x3, ror #7 224