summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/Disassembler/ARM
diff options
context:
space:
mode:
authorOliver Stannard <oliver.stannard@arm.com>2014-11-05 12:06:39 +0000
committerOliver Stannard <oliver.stannard@arm.com>2014-11-05 12:06:39 +0000
commit9e89d8cc5cd048b5ed2037f472f3d38ce2c8328f (patch)
tree885f70aaf959a2338916c3c23aee98c8bea4614d /llvm/test/MC/Disassembler/ARM
parente20ce07a2fa6c447872da3f8230c08e46166d9e3 (diff)
downloadbcm5719-llvm-9e89d8cc5cd048b5ed2037f472f3d38ce2c8328f.tar.gz
bcm5719-llvm-9e89d8cc5cd048b5ed2037f472f3d38ce2c8328f.zip
[ARM] Honor FeatureD16 in the assembler and disassembler
Some ARM FPUs only have 16 double-precision registers, rather than the normal 32. LLVM represents this with the D16 target feature. This is currently used by CodeGen to avoid using high registers when they are not available, but the assembler and disassembler do not. I fix this in the assmebler and disassembler rather than the InstrInfo.td files, as the latter would require a large number of changes everywhere one of the floating-point instructions is referenced in the backend. This solution is similar to the one used for co-processor numbers and MSR masks. llvm-svn: 221341
Diffstat (limited to 'llvm/test/MC/Disassembler/ARM')
-rw-r--r--llvm/test/MC/Disassembler/ARM/d16.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/MC/Disassembler/ARM/d16.txt b/llvm/test/MC/Disassembler/ARM/d16.txt
new file mode 100644
index 00000000000..42560e19b39
--- /dev/null
+++ b/llvm/test/MC/Disassembler/ARM/d16.txt
@@ -0,0 +1,23 @@
+# RUN: llvm-mc < %s -triple thumbv7-unknown-unknown -disassemble -mattr=+vfp4,-d16 |& FileCheck %s --check-prefix=D32
+# RUN: llvm-mc < %s -triple thumbv7-unknown-unknown -disassemble -mattr=+vfp4,-d16 |& FileCheck %s --check-prefix=D32
+
+
+# D32: vadd.f64 d1, d2, d16
+# D16: warning: invalid instruction encoding
+[0x32,0xee,0x20,0x1b]
+
+# D32: vadd.f64 d1, d17, d6
+# D16: warning: invalid instruction encoding
+[0x31,0xee,0x86,0x1b]
+
+# D32: vadd.f64 d19, d7, d6
+# D16: warning: invalid instruction encoding
+[0x77,0xee,0x06,0x3b]
+
+# D32: vcvt.f64.f32 d22, s4
+# D16: warning: invalid instruction encoding
+[0xf7,0xee,0xc2,0x6a]
+
+# D32: vcvt.f32.f64 s26, d30
+# D16: warning: invalid instruction encoding
+[0xb7,0xee,0xee,0xdb]
OpenPOWER on IntegriCloud