[llvm-commits] [llvm] r107070 - /llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp
Bob Wilson
bob.wilson at apple.com
Mon Jun 28 14:16:31 PDT 2010
Author: bwilson
Date: Mon Jun 28 16:16:30 2010
New Revision: 107070
URL: http://llvm.org/viewvc/llvm-project?rev=107070&view=rev
Log:
Refactor encoding function for NEON 1-register with modified immediate format.
Modified:
llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp?rev=107070&r1=107069&r2=107070&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp Mon Jun 28 16:16:30 2010
@@ -1630,15 +1630,11 @@
// Immediate fields: Op, Cmode, I, Imm3, Imm4
unsigned Imm = MI.getOperand(1).getImm();
unsigned Op = (Imm >> 12) & 1;
- Binary |= (Op << 5);
unsigned Cmode = (Imm >> 8) & 0xf;
- Binary |= (Cmode << 8);
unsigned I = (Imm >> 7) & 1;
- Binary |= (I << 24);
unsigned Imm3 = (Imm >> 4) & 0x7;
- Binary |= (Imm3 << 16);
unsigned Imm4 = Imm & 0xf;
- Binary |= Imm4;
+ Binary |= (I << 24) | (Imm3 << 16) | (Cmode << 8) | (Op << 5) | Imm4;
if (Subtarget->isThumb())
Binary = convertNEONDataProcToThumb(Binary);
emitWordLE(Binary);
More information about the llvm-commits
mailing list