[PATCH] D25804: Fix 24560: assembler does not share constant pool for same constants

Weiming Zhao via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 20 10:58:34 PDT 2016


weimingz updated this revision to Diff 75318.
weimingz added a comment.

Forgot to include the full context in previous diff.

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.


Repository:
  rL LLVM

https://reviews.llvm.org/D25804

Files:
  include/llvm/MC/ConstantPools.h
  lib/MC/ConstantPools.cpp
  test/MC/AArch64/ldr-pseudo.s
  test/MC/ARM/ldr-pseudo-darwin.s
  test/MC/ARM/ldr-pseudo-wide.s
  test/MC/ARM/ldr-pseudo.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25804.75318.patch
Type: text/x-patch
Size: 11499 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161020/5479a036/attachment.bin>


More information about the llvm-commits mailing list