[llvm] r374640 - [mips] Fix `loadImmediate` calls when load non-address values.
Simon Atanasyan via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 12 00:42:45 PDT 2019
Author: atanasyan
Date: Sat Oct 12 00:42:44 2019
New Revision: 374640
URL: http://llvm.org/viewvc/llvm-project?rev=374640&view=rev
Log:
[mips] Fix `loadImmediate` calls when load non-address values.
Modified:
llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
llvm/trunk/test/MC/Mips/macro-li.d.s
Modified: llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp?rev=374640&r1=374639&r2=374640&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Sat Oct 12 00:42:44 2019
@@ -3324,7 +3324,7 @@ bool MipsAsmParser::expandLoadSingleImmT
uint32_t ImmOp32 = covertDoubleImmToSingleImm(convertIntToDoubleImm(ImmOp64));
- return loadImmediate(ImmOp32, FirstReg, Mips::NoRegister, true, true, IDLoc,
+ return loadImmediate(ImmOp32, FirstReg, Mips::NoRegister, true, false, IDLoc,
Out, STI);
}
@@ -3397,15 +3397,15 @@ bool MipsAsmParser::expandLoadDoubleImmT
if (Lo_32(ImmOp64) == 0) {
if (isABI_N32() || isABI_N64()) {
- if (loadImmediate(ImmOp64, FirstReg, Mips::NoRegister, false, true, IDLoc,
- Out, STI))
+ if (loadImmediate(ImmOp64, FirstReg, Mips::NoRegister, false, false,
+ IDLoc, Out, STI))
return true;
} else {
- if (loadImmediate(Hi_32(ImmOp64), FirstReg, Mips::NoRegister, true, true,
+ if (loadImmediate(Hi_32(ImmOp64), FirstReg, Mips::NoRegister, true, false,
IDLoc, Out, STI))
return true;
- if (loadImmediate(0, nextReg(FirstReg), Mips::NoRegister, true, true,
+ if (loadImmediate(0, nextReg(FirstReg), Mips::NoRegister, true, false,
IDLoc, Out, STI))
return true;
}
Modified: llvm/trunk/test/MC/Mips/macro-li.d.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/macro-li.d.s?rev=374640&r1=374639&r2=374640&view=diff
==============================================================================
--- llvm/trunk/test/MC/Mips/macro-li.d.s (original)
+++ llvm/trunk/test/MC/Mips/macro-li.d.s Sat Oct 12 00:42:44 2019
@@ -9,12 +9,12 @@
li.d $4, 0
# O32: addiu $4, $zero, 0 # encoding: [0x00,0x00,0x04,0x24]
# O32: addiu $5, $zero, 0 # encoding: [0x00,0x00,0x05,0x24]
-# N32-N64: daddiu $4, $zero, 0 # encoding: [0x00,0x00,0x04,0x64]
+# N32-N64: addiu $4, $zero, 0 # encoding: [0x00,0x00,0x04,0x24]
li.d $4, 0.0
# O32: addiu $4, $zero, 0 # encoding: [0x00,0x00,0x04,0x24]
# O32: addiu $5, $zero, 0 # encoding: [0x00,0x00,0x05,0x24]
-# N32-N64: daddiu $4, $zero, 0 # encoding: [0x00,0x00,0x04,0x64]
+# N32-N64: addiu $4, $zero, 0 # encoding: [0x00,0x00,0x04,0x24]
li.d $4, 1.12345
# ALL: .section .rodata,"a", at progbits
More information about the llvm-commits
mailing list