[llvm] [llvm-jitlink] Support plain AArch32 range extension stubs in jitlink-check's stub_addr() expressions (PR #73268)

Stefan Gränitz via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 24 05:40:04 PST 2023


================

----------------
weliveindetail wrote:

Well, ideally I'd like to have `jitlink-check` lines like this:
```
# jitlink-check: decode_operand(stub_addr(elf_stubs.o, fn) + 0, 1) = (fn & 0x0000ffff)
# jitlink-check: decode_operand(stub_addr(elf_stubs.o, fn) + 4, 2) = (fn & 0xffff0000) >> 16
```

We know it's a Thumv7 stub and we could check the `movw` + `movt` immediates directly, but `decode_operand()` doesn't support address expressions right now. We could add that, but it doesn't seem trivial.

One alternative might be to do it in the checker itself and then add something like:
```
# jitlink-check: decode_stub_target(elf_stubs.o, fn) = fn
```
In this case the section name would determine the stub type for the checker. Not urgent yet, but something to think about.

https://github.com/llvm/llvm-project/pull/73268


More information about the llvm-commits mailing list