[PATCH] D9524: [mips] [IAS] Add support for the DLA pseudo-instruction and fix problems with DLI
Daniel Sanders via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 17 03:04:35 PDT 2015
dsanders added a comment.
It didn't apply cleanly for me and when I resolve the patch application issues it works for me. Assuming Vasileios agrees with the question below, I'll commit.
================
Comment at: lib/Target/Mips/AsmParser/MipsAsmParser.cpp:2051-2055
@@ -2014,23 +2050,7 @@
+
+ // dla requires 64-bit addresses.
+ if (!Is32BitAddress && !ABI.ArePtrs64bit()) {
+ Error(IDLoc, "instruction requires a 64-bit architecture");
return true;
-
- return false;
-}
-
-bool
-MipsAsmParser::expandLoadAddressImm(MCInst &Inst, bool Is32BitImm, SMLoc IDLoc,
- SmallVectorImpl<MCInst> &Instructions) {
- const MCOperand &DstRegOp = Inst.getOperand(0);
- assert(DstRegOp.isReg() && "expected register operand kind");
-
- const MCOperand &ImmOp = Inst.getOperand(1);
- assert((ImmOp.isImm() || ImmOp.isExpr()) &&
- "expected immediate operand kind");
- if (!ImmOp.isImm()) {
- if (loadAndAddSymbolAddress(ImmOp.getExpr(), DstRegOp.getReg(),
- Mips::NoRegister, Is32BitImm, IDLoc,
- Instructions))
- return true;
-
- return false;
}
----------------
vkalintiris wrote:
> Could you add a test for this case? Maybe in macro-la-bad.s?
>
> Also, the following test case currently fails for N32:
>
> ```
> dla $5, 0x000000000($6)
> ```
dla fails for N32 because dla is intended for 64-bit pointers. I believe N32 should use la. Do you agree?
http://reviews.llvm.org/D9524
More information about the llvm-commits
mailing list