[PATCH] D23399: [mips][ias] extend li macro when values are negated with ~

Simon Dardis via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 11 03:27:48 PDT 2016


sdardis created this revision.
sdardis added a reviewer: dsanders.
sdardis added a subscriber: llvm-commits.
Herald added a reviewer: vkalintiris.
Herald added subscribers: sdardis, dsanders.

The integrated assembler evaluates the expressions such as ~0x80000000 to
0xffffffff7fffffff early in the parsing process. This patch adds compatibility
with gas so that li loads the expected value (0x7fffffff) in those cases. This
only occurs iff all the upper 32bits are set and maintains existing checks by not
truncating the result down to 32 bits if any of the the upper bits are not set.

https://reviews.llvm.org/D23399

Files:
  lib/Target/Mips/AsmParser/MipsAsmParser.cpp
  lib/Target/Mips/MipsInstrInfo.td
  test/MC/Mips/macro-li.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23399.67668.patch
Type: text/x-patch
Size: 4612 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160811/03a4f21c/attachment.bin>


More information about the llvm-commits mailing list