diff options
author | Alex Bradbury <asb@lowrisc.org> | 2019-01-10 15:33:17 +0000 |
---|---|---|
committer | Alex Bradbury <asb@lowrisc.org> | 2019-01-10 15:33:17 +0000 |
commit | 6f302b8a69ee54e00d3629bf465b051ecde58273 (patch) | |
tree | d13465154a050bfd23292958bf69bbcff929ca3c /llvm/lib/CodeGen/SjLjEHPrepare.cpp | |
parent | 87ae1460f713600235973be2e10a084660ea541b (diff) | |
download | bcm5719-llvm-6f302b8a69ee54e00d3629bf465b051ecde58273.tar.gz bcm5719-llvm-6f302b8a69ee54e00d3629bf465b051ecde58273.zip |
[RISCV][MC] Add support for evaluating constant symbols as immediates
This further improves compatibility with GNU as, allowing input such as the
following to be assembled:
.equ CONST, 0x123456
li a0, CONST
addi a0, a0, %lo(CONST)
.equ CONST, 1
slli a0, a0, CONST
Note that we don't have perfect compatibility with gas, as it will avoid
emitting a relocation in this case:
addi a0, a0, %lo(CONST2)
.equ CONST2, 0x123456
Thanks to Shiva Chen for suggesting a better way to approach this during review.
Differential Revision: https://reviews.llvm.org/D52298
llvm-svn: 350831
Diffstat (limited to 'llvm/lib/CodeGen/SjLjEHPrepare.cpp')
0 files changed, 0 insertions, 0 deletions