mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-30 02:32:08 +00:00
Refactor encoding function for NEON 1-register with modified immediate format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107070 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d896a97dc7
commit
08baddbc07
@ -1630,15 +1630,11 @@ void ARMCodeEmitter::emitNEON1RegModImmInstruction(const MachineInstr &MI) {
|
||||
// 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);
|
||||
|
Loading…
Reference in New Issue
Block a user