[PATCH] D77330: Consider increasing the default ARM32 max page size to 64k.

Tobias Hieta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 02:49:27 PDT 2020


thieta marked an inline comment as done.
thieta added a comment.

we are now only down to two failing tests:

  Failing Tests (2):
    lld :: ELF/arm-thunk-largesection.s
    lld :: ELF/arm-thunk-multipass-plt.s



================
Comment at: lld/test/ELF/arm-branch-rangethunk.s:12
  .globl _start
- .balign 0x10000
+ .balign 0x20000
  .type _start,%function
----------------
psmith wrote:
> thieta wrote:
> > @psmith - I just remembered that I didn't get this test to work. @MaskRay told me that the `Inputs/far-long-arm-abs.s` had to be updated as well - but can't say I am sure how exactly.
> > 
> > So if anyone could show me the exact values or how to calculate them in the input file that would be very helpful.
> Looking at the numbers in far-arm-abs.s and far-long-arm-abs.s the values of the symbols are:
> far-arm-abs.s
> ```
> too_far1 0x2020008
> too_far2 0x202000c
> too_far3 0x2020010
> ```
> far-long-arm-abs.s
> 
> ```
> too_far1 0x2020014
> too_far2 0x2020018
> too_far3 0x202001c
> ```
> 
> The address of the first branch in the old disassembly is 0x20000, for far-arm-abs.s the offset is therefore 0x2020008 - 0x20000 = 0x2000008 which including the 8 byte pc-bias is just out of range of the maximum branch displacement. The short thunks can just about reach these addresses if placed after .text. In far-long-arm-abs.s the addresses are 0x2020014 - 0x20000 = 0x2000014 which is just out of range of the short thunk, but is in range of the long-thunk.
> 
> I think that if you alter the addresses of too_far* symbols such that the offset from the first branch instruction matches 0x2000008 for far-arm-abs.s and 0x2000014 for far-long-arm-abs.s then this should work.
> 
> While not strictly necessary, there is an opportunity for a small cleanup. The far symbol in far-arm-abs.s is not used by this test, only arm-branch.s. The far symbol in far-long-arm-abs.s is not used at all by any test. It may be worth splitting out far-arm-abs.s into two files?
> far-arm-abs.s // just contains the symbol far and is used by arm-branch.s
> far-arm-short-abs.s // contains the too_far* symbols from far-arm-abs.s
> far-arm-long-abs.s // contains the too_far* symbols from far-long-arm-abs.s with far removed.
>  
> 
This test passes now 🎉 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77330/new/

https://reviews.llvm.org/D77330





More information about the llvm-commits mailing list