summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2010-06-29 20:13:29 +0000
committerBob Wilson <bob.wilson@apple.com>2010-06-29 20:13:29 +0000
commitbe157b0ea8596c3e99ab142a336b727f9422774a (patch)
tree55cf980f7076f915e3d49b73f5105392ade27a7f /llvm
parent29933505b67b43cbacc42d2a7b81d4ba03e1c25e (diff)
downloadbcm5719-llvm-be157b0ea8596c3e99ab142a336b727f9422774a.tar.gz
bcm5719-llvm-be157b0ea8596c3e99ab142a336b727f9422774a.zip
Add support for encoding VDUP (ARM core register) instructions.
llvm-svn: 107201
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/ARM/ARMCodeEmitter.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMCodeEmitter.cpp b/llvm/lib/Target/ARM/ARMCodeEmitter.cpp
index 2c8939fdf0f..7895cb07192 100644
--- a/llvm/lib/Target/ARM/ARMCodeEmitter.cpp
+++ b/llvm/lib/Target/ARM/ARMCodeEmitter.cpp
@@ -141,6 +141,7 @@ namespace {
void emitMiscInstruction(const MachineInstr &MI);
void emitNEONLaneInstruction(const MachineInstr &MI);
+ void emitNEONDupInstruction(const MachineInstr &MI);
void emitNEON1RegModImmInstruction(const MachineInstr &MI);
void emitNEON2RegInstruction(const MachineInstr &MI);
void emitNEON3RegInstruction(const MachineInstr &MI);
@@ -420,6 +421,9 @@ void ARMCodeEmitter::emitInstruction(const MachineInstr &MI) {
case ARMII::NSetLnFrm:
emitNEONLaneInstruction(MI);
break;
+ case ARMII::NDupFrm:
+ emitNEONDupInstruction(MI);
+ break;
case ARMII::N1RegModImmFrm:
emitNEON1RegModImmInstruction(MI);
break;
@@ -1638,6 +1642,19 @@ void ARMCodeEmitter::emitNEONLaneInstruction(const MachineInstr &MI) {
emitWordLE(Binary);
}
+void ARMCodeEmitter::emitNEONDupInstruction(const MachineInstr &MI) {
+ unsigned Binary = getBinaryCodeForInstr(MI);
+
+ // Set the conditional execution predicate
+ Binary |= (IsThumb ? ARMCC::AL : II->getPredicate(&MI)) << ARMII::CondShift;
+
+ unsigned RegT = MI.getOperand(1).getReg();
+ RegT = ARMRegisterInfo::getRegisterNumbering(RegT);
+ Binary |= (RegT << ARMII::RegRdShift);
+ Binary |= encodeNEONRn(MI, 0);
+ emitWordLE(Binary);
+}
+
void ARMCodeEmitter::emitNEON1RegModImmInstruction(const MachineInstr &MI) {
unsigned Binary = getBinaryCodeForInstr(MI);
// Destination register is encoded in Dd.
OpenPOWER on IntegriCloud