[all-commits] [llvm/llvm-project] e5ca20: [JITLink][AArch32] Multi-stub support for armv7/th...

Stefan Gränitz via All-commits all-commits at lists.llvm.org
Mon Jan 22 17:59:42 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e5ca202ef8870f3b46cc19a7a62624e6908be9a8
      https://github.com/llvm/llvm-project/commit/e5ca202ef8870f3b46cc19a7a62624e6908be9a8
  Author: Stefan Gränitz <stefan.graenitz at gmail.com>
  Date:   2024-01-23 (Tue, 23 Jan 2024)

  Changed paths:
    M llvm/include/llvm/ExecutionEngine/JITLink/aarch32.h
    M llvm/lib/ExecutionEngine/JITLink/aarch32.cpp
    A llvm/test/ExecutionEngine/JITLink/AArch32/ELF_stubs_arm.s
    A llvm/test/ExecutionEngine/JITLink/AArch32/ELF_stubs_multi.s
    M llvm/tools/llvm-jitlink/llvm-jitlink.cpp

  Log Message:
  -----------
  [JITLink][AArch32] Multi-stub support for armv7/thumbv7 (#78371)

We want to emit stubs that match the instruction set state of the
relocation site. This is important for branches that have no built-in
switch for the instruction set state. It's the case for Jump24
relocations. Relocations on instructions that support switching on
the fly will be rewritten in a relaxation step in the future. This
affects Call relocations on `BL`/`BLX` instructions.

In this patch, the StubManager gains a second stub symbol slot for each
target and selects which one to use based on the relocation type. For
testing, we select the appropriate slot with a stub-kind filter, i.e.
`arm` or `thumb`. With that we can implement Armv7 stubs and test
that we can have both kinds of stubs for a single external symbol.




More information about the All-commits mailing list