2014-09-01 11:25:07 +00:00
|
|
|
@ RUN: llvm-mc -triple=thumbv6m -show-encoding < %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-V6M %s
|
|
|
|
@ RUN: llvm-mc -triple=thumbv7m -show-encoding < %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-V7M %s
|
|
|
|
|
2011-09-28 14:21:38 +00:00
|
|
|
.syntax unified
|
|
|
|
|
|
|
|
@ Check that the assembler can handle the documented syntax from the ARM ARM.
|
2014-01-10 16:49:49 +00:00
|
|
|
@ These tests test instruction encodings specific to v6m & v7m (FeatureMClass).
|
2011-09-28 14:21:38 +00:00
|
|
|
|
|
|
|
@------------------------------------------------------------------------------
|
|
|
|
@ MRS
|
|
|
|
@------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
mrs r0, apsr
|
|
|
|
mrs r0, iapsr
|
|
|
|
mrs r0, eapsr
|
|
|
|
mrs r0, xpsr
|
|
|
|
mrs r0, ipsr
|
|
|
|
mrs r0, epsr
|
|
|
|
mrs r0, iepsr
|
|
|
|
mrs r0, msp
|
|
|
|
mrs r0, psp
|
|
|
|
mrs r0, primask
|
|
|
|
mrs r0, control
|
|
|
|
|
|
|
|
@ CHECK: mrs r0, apsr @ encoding: [0xef,0xf3,0x00,0x80]
|
|
|
|
@ CHECK: mrs r0, iapsr @ encoding: [0xef,0xf3,0x01,0x80]
|
|
|
|
@ CHECK: mrs r0, eapsr @ encoding: [0xef,0xf3,0x02,0x80]
|
|
|
|
@ CHECK: mrs r0, xpsr @ encoding: [0xef,0xf3,0x03,0x80]
|
|
|
|
@ CHECK: mrs r0, ipsr @ encoding: [0xef,0xf3,0x05,0x80]
|
|
|
|
@ CHECK: mrs r0, epsr @ encoding: [0xef,0xf3,0x06,0x80]
|
|
|
|
@ CHECK: mrs r0, iepsr @ encoding: [0xef,0xf3,0x07,0x80]
|
|
|
|
@ CHECK: mrs r0, msp @ encoding: [0xef,0xf3,0x08,0x80]
|
|
|
|
@ CHECK: mrs r0, psp @ encoding: [0xef,0xf3,0x09,0x80]
|
|
|
|
@ CHECK: mrs r0, primask @ encoding: [0xef,0xf3,0x10,0x80]
|
|
|
|
@ CHECK: mrs r0, control @ encoding: [0xef,0xf3,0x14,0x80]
|
|
|
|
|
|
|
|
@------------------------------------------------------------------------------
|
|
|
|
@ MSR
|
|
|
|
@------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
msr apsr, r0
|
2012-05-17 22:18:01 +00:00
|
|
|
msr apsr_nzcvq, r0
|
2011-09-28 14:21:38 +00:00
|
|
|
msr iapsr, r0
|
2012-05-17 22:18:01 +00:00
|
|
|
msr iapsr_nzcvq, r0
|
2011-09-28 14:21:38 +00:00
|
|
|
msr eapsr, r0
|
2012-05-17 22:18:01 +00:00
|
|
|
msr eapsr_nzcvq, r0
|
2011-09-28 14:21:38 +00:00
|
|
|
msr xpsr, r0
|
2012-05-17 22:18:01 +00:00
|
|
|
msr xpsr_nzcvq, r0
|
2011-09-28 14:21:38 +00:00
|
|
|
msr ipsr, r0
|
|
|
|
msr epsr, r0
|
|
|
|
msr iepsr, r0
|
|
|
|
msr msp, r0
|
|
|
|
msr psp, r0
|
|
|
|
msr primask, r0
|
|
|
|
msr control, r0
|
|
|
|
|
2014-09-01 11:25:07 +00:00
|
|
|
@ CHECK-V6M: msr apsr, r0 @ encoding: [0x80,0xf3,0x00,0x88]
|
|
|
|
@ CHECK-V6M: msr apsr, r0 @ encoding: [0x80,0xf3,0x00,0x88]
|
|
|
|
@ CHECK-V6M: msr iapsr, r0 @ encoding: [0x80,0xf3,0x01,0x88]
|
|
|
|
@ CHECK-V6M: msr iapsr, r0 @ encoding: [0x80,0xf3,0x01,0x88]
|
|
|
|
@ CHECK-V6M: msr eapsr, r0 @ encoding: [0x80,0xf3,0x02,0x88]
|
|
|
|
@ CHECK-V6M: msr eapsr, r0 @ encoding: [0x80,0xf3,0x02,0x88]
|
|
|
|
@ CHECK-V6M: msr xpsr, r0 @ encoding: [0x80,0xf3,0x03,0x88]
|
|
|
|
@ CHECK-V6M: msr xpsr, r0 @ encoding: [0x80,0xf3,0x03,0x88]
|
|
|
|
@ CHECK-V7M: msr apsr_nzcvq, r0 @ encoding: [0x80,0xf3,0x00,0x88]
|
|
|
|
@ CHECK-V7M: msr apsr_nzcvq, r0 @ encoding: [0x80,0xf3,0x00,0x88]
|
|
|
|
@ CHECK-V7M: msr iapsr_nzcvq, r0 @ encoding: [0x80,0xf3,0x01,0x88]
|
|
|
|
@ CHECK-V7M: msr iapsr_nzcvq, r0 @ encoding: [0x80,0xf3,0x01,0x88]
|
|
|
|
@ CHECK-V7M: msr eapsr_nzcvq, r0 @ encoding: [0x80,0xf3,0x02,0x88]
|
|
|
|
@ CHECK-V7M: msr eapsr_nzcvq, r0 @ encoding: [0x80,0xf3,0x02,0x88]
|
|
|
|
@ CHECK-V7M: msr xpsr_nzcvq, r0 @ encoding: [0x80,0xf3,0x03,0x88]
|
|
|
|
@ CHECK-V7M: msr xpsr_nzcvq, r0 @ encoding: [0x80,0xf3,0x03,0x88]
|
2012-06-15 22:14:44 +00:00
|
|
|
@ CHECK: msr ipsr, r0 @ encoding: [0x80,0xf3,0x05,0x88]
|
|
|
|
@ CHECK: msr epsr, r0 @ encoding: [0x80,0xf3,0x06,0x88]
|
|
|
|
@ CHECK: msr iepsr, r0 @ encoding: [0x80,0xf3,0x07,0x88]
|
|
|
|
@ CHECK: msr msp, r0 @ encoding: [0x80,0xf3,0x08,0x88]
|
|
|
|
@ CHECK: msr psp, r0 @ encoding: [0x80,0xf3,0x09,0x88]
|
|
|
|
@ CHECK: msr primask, r0 @ encoding: [0x80,0xf3,0x10,0x88]
|
|
|
|
@ CHECK: msr control, r0 @ encoding: [0x80,0xf3,0x14,0x88]
|