[llvm-branch-commits] [BOLT] Support POSSIBLE_PIC_FIXED_BRANCH (PR #91667)

Amir Ayupov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu May 9 14:56:22 PDT 2024


https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/91667

Detect and support fixed PIC indirect jumps of the following form:
```
movslq  En(%rip), %r1
leaq  PIC_JUMP_TABLE(%rip), %r2
addq  %r2, %r1
jmpq  *%r1
```

with PIC_JUMP_TABLE that looks like following:

```
  JT:  ----------
   E1:| L1 - JT  |
      |----------|
   E2:| L2 - JT  |
      |----------|
      |          |
         ......
   En:| Ln - JT  |
       ----------
```

The code could be produced by compilers, see
https://github.com/llvm/llvm-project/issues/91648.

Test Plan: updated jump-table-fixed-ref-pic.test





More information about the llvm-branch-commits mailing list