diff options
author | Jack Carter <jcarter@mips.com> | 2012-10-04 04:03:53 +0000 |
---|---|---|
committer | Jack Carter <jcarter@mips.com> | 2012-10-04 04:03:53 +0000 |
commit | 30a5982e7560234e563856961fb0d6d6967801c7 (patch) | |
tree | 223a41f285314d1567c3cb8705ff928f4920ea9a /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | fc6de0f2cb75e6e3dcc5ff38f166b873ed88e470 (diff) | |
download | bcm5719-llvm-30a5982e7560234e563856961fb0d6d6967801c7.tar.gz bcm5719-llvm-30a5982e7560234e563856961fb0d6d6967801c7.zip |
Implement methods that enable expansion of load immediate
macro instruction (li) in the assembler.
We have identified three possible expansions depending on
the size of immediate operand:
1) for 0 ≤ j ≤ 65535.
li d,j =>
ori d,$zero,j
2) for −32768 ≤ j < 0.
li d,j =>
addiu d,$zero,j
3) for any other value of j that is representable as a 32-bit integer.
li d,j =>
lui d,hi16(j)
ori d,d,lo16(j)
All of the above have been implemented in ths patch.
Contributer: Vladimir Medic
llvm-svn: 165199
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions