OSDN Git Service

[mips] [IAS] Fix expansion of negative 32-bit immediates for LI/DLI.
authorToma Tabacu <toma.tabacu@imgtec.com>
Fri, 15 May 2015 09:42:11 +0000 (09:42 +0000)
committerToma Tabacu <toma.tabacu@imgtec.com>
Fri, 15 May 2015 09:42:11 +0000 (09:42 +0000)
commit039eb5a7b85543d4f6e09e7f377124309245108e
tree4aa058c17a155b094caf89e964f29a618d3ccc97
parent4fa71b66a822c784ea47c12ab16fd4b52acbda51
[mips] [IAS] Fix expansion of negative 32-bit immediates for LI/DLI.

Summary:
To maintain compatibility with GAS, we need to stop treating negative 32-bit immediates as 64-bit values when expanding LI/DLI.
This currently happens because of sign extension.

To do this we need to choose the 32-bit value expansion for values which use their upper 33 bits only for sign extension (i.e. no 0's, only 1's).

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D8662

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237428 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/AsmParser/MipsAsmParser.cpp
test/MC/Mips/mips-expansions.s
test/MC/Mips/mips64-expansions.s