summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/MCTargetDesc
diff options
context:
space:
mode:
authorJoey Gouly <joey.gouly@arm.com>2013-07-17 13:59:38 +0000
committerJoey Gouly <joey.gouly@arm.com>2013-07-17 13:59:38 +0000
commit19c14abf1c4ccebfa7d07bdd6ea8462a15c0b749 (patch)
tree3b58af9c3707157bc61f555db9f6a2ef18229978 /lib/Target/ARM/MCTargetDesc
parent946dbd83df0aa42e67a0a17af32475b273c2e8f8 (diff)
downloadllvm-19c14abf1c4ccebfa7d07bdd6ea8462a15c0b749.tar.gz
llvm-19c14abf1c4ccebfa7d07bdd6ea8462a15c0b749.tar.bz2
llvm-19c14abf1c4ccebfa7d07bdd6ea8462a15c0b749.tar.xz
[ARMv8] Add support for the NEON instructions vmaxnm/vminnm.
This adds a new class for non-predicable NEON instructions and a new DecoderNamespace for v8 NEON instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186504 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/MCTargetDesc')
-rw-r--r--lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp b/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp
index 8631d81ea0..a18d465f04 100644
--- a/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp
+++ b/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp
@@ -315,6 +315,8 @@ public:
unsigned EncodedValue) const;
unsigned NEONThumb2DupPostEncoder(const MCInst &MI,
unsigned EncodedValue) const;
+ unsigned NEONThumb2V8PostEncoder(const MCInst &MI,
+ unsigned EncodedValue) const;
unsigned VFPThumb2PostEncoder(const MCInst &MI,
unsigned EncodedValue) const;
@@ -389,6 +391,17 @@ unsigned ARMMCCodeEmitter::NEONThumb2DupPostEncoder(const MCInst &MI,
return EncodedValue;
}
+/// Post-process encoded NEON v8 instructions, and rewrite them to Thumb2 form
+/// if we are in Thumb2.
+unsigned ARMMCCodeEmitter::NEONThumb2V8PostEncoder(const MCInst &MI,
+ unsigned EncodedValue) const {
+ if (isThumb2()) {
+ EncodedValue |= 0xC000000; // Set bits 27-26
+ }
+
+ return EncodedValue;
+}
+
/// VFPThumb2PostEncoder - Post-process encoded VFP instructions and rewrite
/// them to their Thumb2 form if we are currently in Thumb2 mode.
unsigned ARMMCCodeEmitter::