diff options
author | Matheus Almeida <matheus.almeida@imgtec.com> | 2013-11-18 12:32:49 +0000 |
---|---|---|
committer | Matheus Almeida <matheus.almeida@imgtec.com> | 2013-11-18 12:32:49 +0000 |
commit | 95adf91f29980e374bf094e15bc3f2764ef9baf4 (patch) | |
tree | 96d3e0751088d9406351c72e4d6eff646098f0e2 /lib/Target/Mips/MipsCodeEmitter.cpp | |
parent | f56f1dfecc04078dd76121cf06dae4024372f329 (diff) | |
download | external_llvm-95adf91f29980e374bf094e15bc3f2764ef9baf4.zip external_llvm-95adf91f29980e374bf094e15bc3f2764ef9baf4.tar.gz external_llvm-95adf91f29980e374bf094e15bc3f2764ef9baf4.tar.bz2 |
[mips][msa] Fix immediate value of LSA instruction as it was being wrongly encoded.
The immediate field should be encoded as "imm - 1" as the CPU always adds one to that field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195004 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsCodeEmitter.cpp')
-rw-r--r-- | lib/Target/Mips/MipsCodeEmitter.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsCodeEmitter.cpp b/lib/Target/Mips/MipsCodeEmitter.cpp index f4e1e18..ca4163d 100644 --- a/lib/Target/Mips/MipsCodeEmitter.cpp +++ b/lib/Target/Mips/MipsCodeEmitter.cpp @@ -114,6 +114,7 @@ private: unsigned getMemEncodingMMImm12(const MachineInstr &MI, unsigned OpNo) const; unsigned getSizeExtEncoding(const MachineInstr &MI, unsigned OpNo) const; unsigned getSizeInsEncoding(const MachineInstr &MI, unsigned OpNo) const; + unsigned getLSAImmEncoding(const MachineInstr &MI, unsigned OpNo) const; void emitGlobalAddressUnaligned(const GlobalValue *GV, unsigned Reloc, int Offset) const; @@ -236,6 +237,12 @@ unsigned MipsCodeEmitter::getSizeInsEncoding(const MachineInstr &MI, getMachineOpValue(MI, MI.getOperand(OpNo)) - 1; } +unsigned MipsCodeEmitter::getLSAImmEncoding(const MachineInstr &MI, + unsigned OpNo) const { + llvm_unreachable("Unimplemented function."); + return 0; +} + /// getMachineOpValue - Return binary encoding of operand. If the machine /// operand requires relocation, record the relocation and return zero. unsigned MipsCodeEmitter::getMachineOpValue(const MachineInstr &MI, |