2010-11-29 08:42:50 +08:00
|
|
|
@ RUN: llvm-mc -triple thumbv6-apple-darwin -show-encoding < %s | FileCheck %s
|
2010-11-19 09:33:10 +08:00
|
|
|
.code 16
|
|
|
|
|
|
|
|
cmp r1, r2
|
2011-08-13 01:01:02 +08:00
|
|
|
@ CHECK: cmp r1, r2 @ encoding: [0x91,0x42]
|
2010-11-19 09:33:10 +08:00
|
|
|
|
|
|
|
pop {r1, r2, r4}
|
2011-08-13 01:01:02 +08:00
|
|
|
@ CHECK: pop {r1, r2, r4} @ encoding: [0x16,0xbc]
|
2010-11-21 19:05:29 +08:00
|
|
|
|
|
|
|
trap
|
2011-08-13 01:01:02 +08:00
|
|
|
@ CHECK: trap @ encoding: [0xfe,0xde]
|
2010-11-29 08:18:15 +08:00
|
|
|
|
|
|
|
blx r9
|
2011-08-13 01:01:02 +08:00
|
|
|
blx r10
|
|
|
|
@ CHECK: blx r9 @ encoding: [0xc8,0x47]
|
2011-05-12 01:00:48 +08:00
|
|
|
@ CHECK: blx r10 @ encoding: [0xd0,0x47]
|
2010-11-29 08:42:50 +08:00
|
|
|
|
|
|
|
rev r2, r3
|
|
|
|
rev16 r3, r4
|
|
|
|
revsh r5, r6
|
2011-08-13 01:01:02 +08:00
|
|
|
@ CHECK: rev r2, r3 @ encoding: [0x1a,0xba]
|
|
|
|
@ CHECK: rev16 r3, r4 @ encoding: [0x63,0xba]
|
|
|
|
@ CHECK: revsh r5, r6 @ encoding: [0xf5,0xba]
|
2010-11-29 09:00:43 +08:00
|
|
|
|
|
|
|
sxtb r2, r3
|
|
|
|
sxth r2, r3
|
2011-08-13 01:01:02 +08:00
|
|
|
@ CHECK: sxtb r2, r3 @ encoding: [0x5a,0xb2]
|
|
|
|
@ CHECK: sxth r2, r3 @ encoding: [0x1a,0xb2]
|
2010-11-29 09:07:48 +08:00
|
|
|
|
|
|
|
tst r4, r5
|
2011-08-13 01:01:02 +08:00
|
|
|
@ CHECK: tst r4, r5 @ encoding: [0x2c,0x42]
|
2010-11-29 09:07:48 +08:00
|
|
|
|
|
|
|
uxtb r3, r6
|
|
|
|
uxth r3, r6
|
2011-08-13 01:01:02 +08:00
|
|
|
@ CHECK: uxtb r3, r6 @ encoding: [0xf3,0xb2]
|
|
|
|
@ CHECK: uxth r3, r6 @ encoding: [0xb3,0xb2]
|
2010-11-30 15:44:32 +08:00
|
|
|
|
|
|
|
ldr r3, [r1, r2]
|
2011-08-13 01:01:02 +08:00
|
|
|
@ CHECK: ldr r3, [r1, r2] @ encoding: [0x8b,0x58]
|
2011-01-19 04:55:11 +08:00
|
|
|
|
2011-08-13 01:01:02 +08:00
|
|
|
bkpt #2
|
|
|
|
@ CHECK: bkpt #2 @ encoding: [0x02,0xbe]
|
2011-01-21 00:35:57 +08:00
|
|
|
|
2011-01-26 21:28:14 +08:00
|
|
|
nop
|
2011-08-20 07:24:36 +08:00
|
|
|
@ CHECK: nop @ encoding: [0xc0,0x46]
|
2011-01-26 21:28:14 +08:00
|
|
|
|
|
|
|
wfe
|
|
|
|
wfi
|
2011-08-13 01:01:02 +08:00
|
|
|
yield
|
|
|
|
@ CHECK: wfe @ encoding: [0x20,0xbf]
|
|
|
|
@ CHECK: wfi @ encoding: [0x30,0xbf]
|
|
|
|
@ CHECK: yield @ encoding: [0x10,0xbf]
|
2011-02-14 21:09:44 +08:00
|
|
|
|
|
|
|
cpsie aif
|
2011-08-13 01:01:02 +08:00
|
|
|
@ CHECK: cpsie aif @ encoding: [0x67,0xb6]
|
2011-05-28 07:46:09 +08:00
|
|
|
|
|
|
|
mov r0, pc
|
2011-08-13 01:01:02 +08:00
|
|
|
@ CHECK: mov r0, pc @ encoding: [0x78,0x46]
|