166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ RUN: llvm-mc -triple arm-unknown-unknown -show-encoding < %s | FileCheck %s
266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanfoo:
466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: foo
566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumansub r2, r2, #6
766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumansub r2, #6
866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumansub r2, r2, r3
966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumansub r2, r3
1066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
1166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: sub r2, r2, #6              @ encoding: [0x06,0x20,0x42,0xe2]
1266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: sub r2, r2, #6              @ encoding: [0x06,0x20,0x42,0xe2]
1366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: sub r2, r2, r3              @ encoding: [0x03,0x20,0x42,0xe0]
1466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: sub r2, r2, r3              @ encoding: [0x03,0x20,0x42,0xe0]
1566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
1666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanadd r2, r2, #6
1766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanadd r2, #6
1866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanadd r2, r2, r3
1966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanadd r2, r3
2066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
2166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: add r2, r2, #6              @ encoding: [0x06,0x20,0x82,0xe2]
2266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: add r2, r2, #6              @ encoding: [0x06,0x20,0x82,0xe2]
2366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: add r2, r2, r3              @ encoding: [0x03,0x20,0x82,0xe0]
2466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: add r2, r2, r3              @ encoding: [0x03,0x20,0x82,0xe0]
2566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
2666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanand r2, r2, #6
2766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanand r2, #6
2866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanand r2, r2, r3
2966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanand r2, r3
3066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
3166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: and r2, r2, #6              @ encoding: [0x06,0x20,0x02,0xe2]
3266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: and r2, r2, #6              @ encoding: [0x06,0x20,0x02,0xe2]
3366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: and r2, r2, r3              @ encoding: [0x03,0x20,0x02,0xe0]
3466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: and r2, r2, r3              @ encoding: [0x03,0x20,0x02,0xe0]
3566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
3666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanorr r2, r2, #6
3766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanorr r2, #6
3866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanorr r2, r2, r3
3966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanorr r2, r3
4066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
4166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: orr r2, r2, #6              @ encoding: [0x06,0x20,0x82,0xe3]
4266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: orr r2, r2, #6              @ encoding: [0x06,0x20,0x82,0xe3]
4366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: orr r2, r2, r3              @ encoding: [0x03,0x20,0x82,0xe1]
4466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: orr r2, r2, r3              @ encoding: [0x03,0x20,0x82,0xe1]
4566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
4666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumaneor r2, r2, #6
4766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumaneor r2, #6
4866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumaneor r2, r2, r3
4966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumaneor r2, r3
5066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
5166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: eor r2, r2, #6              @ encoding: [0x06,0x20,0x22,0xe2]
5266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: eor r2, r2, #6              @ encoding: [0x06,0x20,0x22,0xe2]
5366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: eor r2, r2, r3              @ encoding: [0x03,0x20,0x22,0xe0]
5466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: eor r2, r2, r3              @ encoding: [0x03,0x20,0x22,0xe0]
5566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
5666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanbic r2, r2, #6
5766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanbic r2, #6
5866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanbic r2, r2, r3
5966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanbic r2, r3
6066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
6166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: bic r2, r2, #6              @ encoding: [0x06,0x20,0xc2,0xe3]
6266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: bic r2, r2, #6              @ encoding: [0x06,0x20,0xc2,0xe3]
6366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: bic r2, r2, r3              @ encoding: [0x03,0x20,0xc2,0xe1]
6466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: bic r2, r2, r3              @ encoding: [0x03,0x20,0xc2,0xe1]
6566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
6666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
6766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ Also check that we handle the predicate and cc_out operands.
6866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumansubseq r2, r2, #6
6966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumansubseq r2, #6
7066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumansubseq r2, r2, r3
7166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumansubseq r2, r3
7266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
7366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: subseq r2, r2, #6              @ encoding: [0x06,0x20,0x52,0x02]
7466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: subseq r2, r2, #6              @ encoding: [0x06,0x20,0x52,0x02]
7566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: subseq r2, r2, r3              @ encoding: [0x03,0x20,0x52,0x00]
7666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: subseq r2, r2, r3              @ encoding: [0x03,0x20,0x52,0x00]
7766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
7866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanaddseq r2, r2, #6
7966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanaddseq r2, #6
8066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanaddseq r2, r2, r3
8166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanaddseq r2, r3
8266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
8366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: addseq r2, r2, #6              @ encoding: [0x06,0x20,0x92,0x02]
8466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: addseq r2, r2, #6              @ encoding: [0x06,0x20,0x92,0x02]
8566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: addseq r2, r2, r3              @ encoding: [0x03,0x20,0x92,0x00]
8666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: addseq r2, r2, r3              @ encoding: [0x03,0x20,0x92,0x00]
8766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
8866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanandseq r2, r2, #6
8966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanandseq r2, #6
9066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanandseq r2, r2, r3
9166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanandseq r2, r3
9266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
9366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: andseq r2, r2, #6              @ encoding: [0x06,0x20,0x12,0x02]
9466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: andseq r2, r2, #6              @ encoding: [0x06,0x20,0x12,0x02]
9566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: andseq r2, r2, r3              @ encoding: [0x03,0x20,0x12,0x00]
9666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: andseq r2, r2, r3              @ encoding: [0x03,0x20,0x12,0x00]
9766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
9866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanorrseq r2, r2, #6
9966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanorrseq r2, #6
10066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanorrseq r2, r2, r3
10166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanorrseq r2, r3
10266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
10366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: orrseq r2, r2, #6              @ encoding: [0x06,0x20,0x92,0x03]
10466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: orrseq r2, r2, #6              @ encoding: [0x06,0x20,0x92,0x03]
10566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: orrseq r2, r2, r3              @ encoding: [0x03,0x20,0x92,0x01]
10666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: orrseq r2, r2, r3              @ encoding: [0x03,0x20,0x92,0x01]
10766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
10866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumaneorseq r2, r2, #6
10966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumaneorseq r2, #6
11066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumaneorseq r2, r2, r3
11166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumaneorseq r2, r3
11266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
11366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: eorseq r2, r2, #6              @ encoding: [0x06,0x20,0x32,0x02]
11466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: eorseq r2, r2, #6              @ encoding: [0x06,0x20,0x32,0x02]
11566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: eorseq r2, r2, r3              @ encoding: [0x03,0x20,0x32,0x00]
11666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: eorseq r2, r2, r3              @ encoding: [0x03,0x20,0x32,0x00]
11766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
11866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanbicseq r2, r2, #6
11966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanbicseq r2, #6
12066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanbicseq r2, r2, r3
12166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Baumanbicseq r2, r3
12266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
12366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: bicseq r2, r2, #6              @ encoding: [0x06,0x20,0xd2,0x03]
12466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: bicseq r2, r2, #6              @ encoding: [0x06,0x20,0xd2,0x03]
12566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: bicseq r2, r2, r3              @ encoding: [0x03,0x20,0xd2,0x01]
12666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: bicseq r2, r2, r3              @ encoding: [0x03,0x20,0xd2,0x01]
127