[PATCH] D24607: [mips] seq macro support
Simon Dardis via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 19 07:01:27 PDT 2016
sdardis marked an inline comment as done.
sdardis added inline comments.
================
Comment at: lib/Target/Mips/AsmParser/MipsAsmParser.cpp:3862-3878
+ if (!isUInt<16>(Imm)) {
+ unsigned ATReg = getATReg(IDLoc);
+ if (!ATReg)
+ return true;
+
+ if (Imm < 0) {
+ Imm = -Imm;
----------------
vkalintiris wrote:
> The constants manipulation here looks problematic, eg:
>
> seq $4, $5, -66666
>
> With gas:
>
> lui at,0xfffe
> ori at,at,0xfb96
> xor a0,a1,at
> sltiu a0,a0,1
>
> With llvm-mc:
>
> addiu $4, $5, 1130
> sltiu $4, $4, 1
>
> Similarly for:
>
> seq $4, $5, -2147483648
>
> gas:
>
> lui at,0x8000
> xor a0,a1,at
> sltiu a0,a0,1
>
> llvm-mc:
>
> addiu $4, $5, 0
> sltiu $4, $4, 1
>
> Also, on 64-bit we should generate a daddiu instead of an addiu according to the gas testsuite in binutils.
Right. It appears that seqi reads immediates like li does. I have a working copy with this addressed and I'll add your examples to the test.
https://reviews.llvm.org/D24607
More information about the llvm-commits
mailing list