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)
commitdc46338e2d9c534a53369901fc8025fab9cbc9ba
tree716e910d2588714216fb6fb3720302f58331d31c
parentfd8eac66faf122105c4d2e52862cafdb6b05bce6
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
llvm-svn: 175707
llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
llvm/test/MC/Mips/hilo-addressing.s [new file with mode: 0644]
llvm/test/MC/Mips/mips_directives.s