Mips specific standalone assembler addressing mode %hi and %lo.
authorJack Carter <jcarter@mips.com>
Thu, 21 Feb 2013 02:09:31 +0000 (02:09 +0000)
committerJack Carter <jcarter@mips.com>
Thu, 21 Feb 2013 02:09:31 +0000 (02:09 +0000)
commit77217229ba1bbc92f3a53099fa91bcdaa7797da8
tree0ee4752914269e634804686290d43a88c3020bba
parent421021157eda12453b4fea7ea853d8c472bd8532
Mips specific standalone assembler addressing mode %hi and %lo.

The constructs %hi() and %lo() represent the high and low 16
bits of the address.
Because the 16 bit offset field of an LW instruction is
interpreted as signed, if bit 15 of the low part is 1 then the
low part will act as a negative and 1 needs to be added to the
high part.

Contributer: Vladimir Medic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175707 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/AsmParser/MipsAsmParser.cpp
test/MC/Mips/hilo-addressing.s [new file with mode: 0644]
test/MC/Mips/mips_directives.s