[mips][ias] Handle more complicated expressions for memory operands
authorSimon Dardis <simon.dardis@imgtec.com>
Tue, 18 Oct 2016 15:17:17 +0000 (15:17 +0000)
committerSimon Dardis <simon.dardis@imgtec.com>
Tue, 18 Oct 2016 15:17:17 +0000 (15:17 +0000)
commit858915f054ef80a89d285ffb4b0a50e32b08defe
tree90881ce0c80a609a9beae24ed3016a7e6bd727fe
parentaf6ff2a91bd65ae5ed417314713e24190e428a45
[mips][ias] Handle more complicated expressions for memory operands

This patch teaches ias for mips to handle expressions such as
(8*4)+(8*31)($sp). Such expression typically occur from the expansion
of multiple macro definitions.

This partially resolves PR/30383.

Thanks to Sean Bruno for reporting the issue!

Reviewers: zoran.jovanovic, vkalintiris

Differential Revision: https://reviews.llvm.org/D24667

llvm-svn: 284485
llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
llvm/test/MC/Mips/memory-offsets.s [new file with mode: 0644]