brintos

brintos / llvm-project-archived public Read only

0
0
Text · 878 B · e8fdeb0 Raw
28 lines · plain
1/// FIXME llvm-mc is used instead of clang because we need a recent change in2/// the RISC-V MC layer (D153260). Once that one is released, we can switch to3/// clang. (Note that the pre-merge check buildbots use the system's clang).4// RUN: llvm-mc -triple riscv64 -mattr=+c -filetype obj -o %t.o %s5// RUN: ld.lld -o %t %t.o6// RUN: llvm-bolt --print-cfg --print-only=_start -o %t.bolt %t 2>&1 | FileCheck %s7// RUN: llvm-objdump -d %t.bolt | FileCheck --check-prefix=CHECK-OBJDUMP %s8 9// CHECK-NOT: BOLT-WARNING10 11/// Check that .word is not disassembled by BOLT12// CHECK: 00000000: nop13// CHECK: 00000002: ret14 15/// Check .word is still present in output16// CHECK-OBJDUMP: <_start>:17// CHECK-OBJDUMP-NEXT: nop18// CHECK-OBJDUMP-NEXT: unimp19// CHECK-OBJDUMP-NEXT: unimp20// CHECK-OBJDUMP-NEXT: ret21    .text22    .globl _start23    .p2align 124_start:25    nop26    .word 0x027    ret28