[all-commits] [llvm/llvm-project] 1ece3e: [JITLink][RISCV] fix the extractBits behavior and ...

fourdim via All-commits all-commits at lists.llvm.org
Thu Feb 17 22:07:47 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1ece3eeeb79e766d4f9e0b5044db2d72946f785d
      https://github.com/llvm/llvm-project/commit/1ece3eeeb79e766d4f9e0b5044db2d72946f785d
  Author: fourdim <fourdim at foxmail.com>
  Date:   2022-02-18 (Fri, 18 Feb 2022)

  Changed paths:
    M llvm/include/llvm/ExecutionEngine/JITLink/riscv.h
    M llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp
    M llvm/lib/ExecutionEngine/JITLink/riscv.cpp
    A llvm/test/ExecutionEngine/JITLink/RISCV/ELF_jal.s

  Log Message:
  -----------
  [JITLink][RISCV] fix the extractBits behavior and add R_RISCV_JAL relocation.

This patch supports the R_RISCV_JAL relocation.
Moreover, it will fix the extractBits function's behavior as it extracts Size + 1 bits.
In the test ELF_jal.s:
Before:
```
Hi: 4294836480
extractBits(Hi, 12, 8): 480
```
After:
```
Hi: 4294836480
extractBits(Hi, 12, 8): 224
```

Reviewed By: StephenFan

Differential Revision: https://reviews.llvm.org/D117975




More information about the All-commits mailing list