diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-06-19 19:57:28 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-07-02 10:47:08 -0400 |
commit | 3cdd8d69f5c1d63137b9b56992bb9b74a6785459 (patch) | |
tree | d98f944154a7d26ae6c2a43181b402c9715cdbc5 /.mailmap | |
parent | 23e4e04700f840e3c4e75ccb2085aea05bfb5318 (diff) | |
download | haskell-3cdd8d69f5c1d63137b9b56992bb9b74a6785459.tar.gz |
NCG: correctly handle addresses with huge offsets (#15570)
Before this patch we could generate addresses of this form:
movzbl cP0_str+-9223372036854775808,%eax
The linker can't handle them because the offset is too large:
ld.lld: error: Main.o:(.text+0xB3): relocation R_X86_64_32S out of range: -9223372036852653050 is not in [-2147483648, 2147483647]
With this patch we detect those cases and generate:
movq $-9223372036854775808,%rax
addq $cP0_str,%rax
movzbl (%rax),%eax
I've also refactored `getAmode` a little bit to make it easier to
understand and to trace.
Diffstat (limited to '.mailmap')
0 files changed, 0 insertions, 0 deletions