[mips] Fix li/la differences between IAS and GAS.
authorDaniel Sanders <daniel.sanders@imgtec.com>
Tue, 14 Jul 2015 12:24:22 +0000 (12:24 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Tue, 14 Jul 2015 12:24:22 +0000 (12:24 +0000)
commit815d6131a4d6b3d7d037e42a38734e4e48c35640
treecfd06ff4c2044b187ce0d1b29813f76cd2a1cce1
parent2364d1f548f8ee3683efb69858d16a8ede9485ed
[mips] Fix li/la differences between IAS and GAS.

Summary:
- Signed 16-bit should have priority over unsigned.
- For la, unsigned 16-bit must use ori+addu rather than directly use ori.
- Correct tests on 32-bit immediates with 64-bit predicates by
  sign-extending the immediate beforehand. For example, isInt<16>(0xffff8000)
  should be true and use addiu.

Also split li/la testing into separate files due to their size.

Reviewers: vkalintiris

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242139 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/AsmParser/MipsAsmParser.cpp
test/MC/Mips/macro-la-bad.s [new file with mode: 0644]
test/MC/Mips/macro-la.s [new file with mode: 0644]
test/MC/Mips/macro-li-bad.s [new file with mode: 0644]
test/MC/Mips/macro-li.s [new file with mode: 0644]
test/MC/Mips/micromips-expansions.s
test/MC/Mips/mips-expansions-bad.s
test/MC/Mips/mips-expansions.s
test/MC/Mips/mips64-expansions.s