diff options
| author | Jim Grosbach <grosbach@apple.com> | 2010-10-12 18:09:12 +0000 |
|---|---|---|
| committer | Jim Grosbach <grosbach@apple.com> | 2010-10-12 18:09:12 +0000 |
| commit | 0e57a9f7a9a2c033d4672621a9894275d97c8353 (patch) | |
| tree | ba4e7d0345784990d2547e28772fb0469f090ad1 /llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp | |
| parent | f220088295a892208747bbb5eaac52cab48ad9a4 (diff) | |
| download | bcm5719-llvm-0e57a9f7a9a2c033d4672621a9894275d97c8353.tar.gz bcm5719-llvm-0e57a9f7a9a2c033d4672621a9894275d97c8353.zip | |
Add MOVi ARM encoding.
llvm-svn: 116321
Diffstat (limited to 'llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp b/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp index 1c4ad264c24..b2584f9ad85 100644 --- a/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp +++ b/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp @@ -150,6 +150,13 @@ EncodeInstruction(const MCInst &MI, raw_ostream &OS, unsigned Value = getBinaryCodeForInstr(MI); switch (Opcode) { default: break; + case ARM::MOVi: + // The 's' bit. + if (MI.getOperand(4).getReg() == ARM::CPSR) + Value |= 1 << ARMII::S_BitShift; + // The shifted immediate value. + Value |= getMachineSoImmOpValue((unsigned)MI.getOperand(1).getImm()); + break; case ARM::ADDri: case ARM::ANDri: case ARM::BICri: |

