diff options
| author | Renato Golin <renato.golin@linaro.org> | 2015-03-17 11:55:28 +0000 |
|---|---|---|
| committer | Renato Golin <renato.golin@linaro.org> | 2015-03-17 11:55:28 +0000 |
| commit | 12350607344c9dba651ae1daf7560019a693f42d (patch) | |
| tree | 3ee4d4e457ab113803af5f4640d8f66514570aa9 /llvm/test/MC/ARM/arm11-hint-instr.s | |
| parent | 3df471c32de4bba7395662f01e2036ff45e40e18 (diff) | |
| download | bcm5719-llvm-12350607344c9dba651ae1daf7560019a693f42d.tar.gz bcm5719-llvm-12350607344c9dba651ae1daf7560019a693f42d.zip | |
[ARM] Add support for ARMV6K subtarget (LLVM)
ARMv6K is another layer between ARMV6 and ARMV6T2. This is the LLVM
side of the changes.
ARMV6 family LLVM implementation.
+-------------------------------------+
| ARMV6 |
+----------------+--------------------+
| ARMV6M (thumb) | ARMV6K (arm,thumb) | <- From ARMV6K and ARMV6M processors
+----------------+--------------------+ have support for hint instructions
| ARMV6T2 (arm,thumb,thumb2) | (SEV/WFE/WFI/NOP/YIELD). They can
+-------------------------------------+ be either real or default to NOP.
| ARMV7 (arm,thumb,thumb2) | The two processors also use
+-------------------------------------+ different encoding for them.
Patch by Vinicius Tinti.
llvm-svn: 232468
Diffstat (limited to 'llvm/test/MC/ARM/arm11-hint-instr.s')
| -rw-r--r-- | llvm/test/MC/ARM/arm11-hint-instr.s | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/llvm/test/MC/ARM/arm11-hint-instr.s b/llvm/test/MC/ARM/arm11-hint-instr.s new file mode 100644 index 00000000000..6f5a374e417 --- /dev/null +++ b/llvm/test/MC/ARM/arm11-hint-instr.s @@ -0,0 +1,69 @@ +@ RUN: not llvm-mc -triple=armv6 -show-encoding < %s > %t1 2> %t2 +@ RUN: FileCheck --check-prefix=CHECK-V6 %s < %t1 +@ RUN: FileCheck --check-prefix=CHECK-ERROR-V6 %s < %t2 +@ RUN: llvm-mc -triple=armv6k -show-encoding < %s \ +@ RUN: | FileCheck --check-prefix=CHECK-ARM %s +@ RUN: llvm-mc -triple=armv6t2 -show-encoding < %s \ +@ RUN: | FileCheck --check-prefix=CHECK-ARM %s +@ RUN: llvm-mc -triple=thumb -mcpu=arm1156t2-s -show-encoding < %s \ +@ RUN: | FileCheck --check-prefix=CHECK-THUMB %s +@ RUN: llvm-mc -triple=armv6m -show-encoding < %s \ +@ RUN: | FileCheck --check-prefix=CHECK-V6M %s + + .syntax unified + +@------------------------------------------------------------------------------ +@ YIELD/WFE/WFI/SEV - are not supported pre v6K +@------------------------------------------------------------------------------ + nop + yield + wfe + wfi + sev + + +@------------------------------------------------------------------------------ +@ v6 using ARM encoding +@------------------------------------------------------------------------------ +@ CHECK-V6: mov r0, r0 @ encoding: [0x00,0x00,0xa0,0xe1] +@ CHECK-ERROR-V6: error: instruction requires: armv6k +@ CHECK-ERROR-V6: yield +@ CHECK-ERROR-V6: ^ +@ CHECK-ERROR-V6: error: instruction requires: armv6k +@ CHECK-ERROR-V6: wfe +@ CHECK-ERROR-V6: ^ +@ CHECK-ERROR-V6: error: instruction requires: armv6k +@ CHECK-ERROR-V6: wfi +@ CHECK-ERROR-V6: error: instruction requires: armv6k +@ CHECK-ERROR-V6: sev +@ CHECK-ERROR-V6: ^ + +@------------------------------------------------------------------------------ +@ v6K using ARM encoding +@------------------------------------------------------------------------------ +@------------------------------------------------------------------------------ +@ v6T2 using ARM encoding (arm triple) +@------------------------------------------------------------------------------ +@ CHECK-ARM: nop @ encoding: [0x00,0xf0,0x20,0xe3] +@ CHECK-ARM: yield @ encoding: [0x01,0xf0,0x20,0xe3] +@ CHECK-ARM: wfe @ encoding: [0x02,0xf0,0x20,0xe3] +@ CHECK-ARM: wfi @ encoding: [0x03,0xf0,0x20,0xe3] +@ CHECK-ARM: sev @ encoding: [0x04,0xf0,0x20,0xe3] + +@------------------------------------------------------------------------------ +@ v6T2 using THUMB encoding (thumb triple) +@------------------------------------------------------------------------------ +@ CHECK-THUMB: nop @ encoding: [0x00,0xbf] +@ CHECK-THUMB: yield @ encoding: [0x10,0xbf] +@ CHECK-THUMB: wfe @ encoding: [0x20,0xbf] +@ CHECK-THUMB: wfi @ encoding: [0x30,0xbf] +@ CHECK-THUMB: sev @ encoding: [0x40,0xbf] + +@------------------------------------------------------------------------------ +@ v6M using THUMB encoding +@------------------------------------------------------------------------------ +@ CHECK-V6M: nop @ encoding: [0x00,0xbf] +@ CHECK-V6M: yield @ encoding: [0x10,0xbf] +@ CHECK-V6M: wfe @ encoding: [0x20,0xbf] +@ CHECK-V6M: wfi @ encoding: [0x30,0xbf] +@ CHECK-V6M: sev @ encoding: [0x40,0xbf] |

