-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BOLT][RISCV] Recognize mapping symbols
The RISC-V psABI [1] defines them similarly to AArch64. [1] https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc#mapping-symbol Reviewed By: yota9, Amir Differential Revision: https://reviews.llvm.org/D153277
- Loading branch information
Showing
3 changed files
with
32 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/// FIXME llvm-mc is used instead of clang because we need a recent change in | ||
/// the RISC-V MC layer (D153260). Once that one is released, we can switch to | ||
/// clang. (Note that the pre-merge check buildbots use the system's clang). | ||
// RUN: llvm-mc -triple riscv64 -mattr=+c -filetype obj -o %t.o %s | ||
// RUN: ld.lld -o %t %t.o | ||
// RUN: llvm-bolt --print-cfg --print-only=_start -o %t.bolt %t 2>&1 | FileCheck %s | ||
// RUN: llvm-objdump -d %t.bolt | FileCheck --check-prefix=CHECK-OBJDUMP %s | ||
|
||
// CHECK-NOT: BOLT-WARNING | ||
|
||
/// Check that .word is not disassembled by BOLT | ||
// CHECK: 00000000: nop | ||
// CHECK: 00000002: ret | ||
|
||
/// Check .word is still present in output | ||
// CHECK-OBJDUMP: <_start>: | ||
// CHECK-OBJDUMP-NEXT: nop | ||
// CHECK-OBJDUMP-NEXT: unimp | ||
// CHECK-OBJDUMP-NEXT: unimp | ||
// CHECK-OBJDUMP-NEXT: ret | ||
.text | ||
.globl _start | ||
.p2align 1 | ||
_start: | ||
nop | ||
.word 0x0 | ||
ret |