[mips] Extend MipsMCExpr class to handle %higher(sym1 - sym2 + const) and
authorSasa Stankovic <Sasa.Stankovic@imgtec.com>
Thu, 3 Apr 2014 10:37:45 +0000 (10:37 +0000)
committerSasa Stankovic <Sasa.Stankovic@imgtec.com>
Thu, 3 Apr 2014 10:37:45 +0000 (10:37 +0000)
commit10914379f6ba2c2387afac2124737d313d7a6211
treed919e0eadcfbc1e0a897284e249cd5763ede2448
parent107283d7cb7ea4fd34f6f417fb9202d47d0ababe
[mips] Extend MipsMCExpr class to handle %higher(sym1 - sym2 + const) and
%highest(sym1 - sym2 + const) relocations. Remove "ABS_" from VK_Mips_HI
and VK_Mips_LO enums in MipsMCExpr, to be consistent with VK_Mips_HIGHER
and VK_Mips_HIGHEST.

This change also deletes test file test/MC/Mips/higher_highest.ll and moves
its CHECK's to the new test file test/MC/Mips/higher-highest-addressing.s.
The deleted file tests that R_MIPS_HIGHER and R_MIPS_HIGHEST relocations are
emitted in the .o file. Since it uses -force-mips-long-branch option, it was
created when MipsLongBranch's implementation was emitting R_MIPS_HIGHER and
R_MIPS_HIGHEST relocations in the .o file. It was disabled when MipsLongBranch
started to directly calculate offsets.

Differential Revision: http://llvm-reviews.chandlerc.com/D3230

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205522 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/AsmParser/MipsAsmParser.cpp
lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp
lib/Target/Mips/MCTargetDesc/MipsMCExpr.cpp
lib/Target/Mips/MCTargetDesc/MipsMCExpr.h
test/MC/Mips/higher-highest-addressing.s [new file with mode: 0644]
test/MC/Mips/higher_highest.ll [deleted file]