[PATCH] D25804: Fix 24560: assembler does not share constant pool for same constants
Michal Meloun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat May 20 01:20:01 PDT 2017
strejda added a comment.
This commit causes https://bugs.llvm.org//show_bug.cgi?id=32825
In https://reviews.llvm.org/D25804#575584, @weimingz wrote:
> Regarding the out-of-range test, give a test like:
> foo1:
> PUSH {r4-r6,lr}
> LDR r7, =0x80808080
> .space 0x1000
> LDR r7, =0x80808080
>
> Existing llvm-mc gives "error: out of range pc-relative fixup value". Similarly, gnu-as gives "Error: invalid literal constant: pool needs to be closer"
> Is our case, if the first LDR is valid (within the range), then following LDR to the same constant should be valid as well since we always put CP at the end.
The above example is invalid, you must use .ltorg to ensure literal pool accessibility.
The corrected(valid) code can be compiled by gnu-as, but not by llvm-mc
foo1:
PUSH {r4-r6,lr}
LDR r7, =0x80808080
.ltorg
.space 0x1000
LDR r7, =0x80808080
.ltorg
Can you, please, fix or revert it? It's a clear regression as the example can be compiled using llvm 3.9 but not by llvm 4.0+..
Thanks.
Repository:
rL LLVM
https://reviews.llvm.org/D25804
More information about the llvm-commits
mailing list