File: xqci-fixups.s

package info (click to toggle)
llvm-toolchain-21 1%3A21.1.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,245,028 kB
  • sloc: cpp: 7,619,726; ansic: 1,434,018; asm: 1,058,748; python: 252,740; f90: 94,671; objc: 70,685; lisp: 42,813; pascal: 18,401; sh: 8,601; ml: 5,111; perl: 4,720; makefile: 3,675; awk: 3,523; javascript: 2,409; xml: 892; fortran: 770
file content (36 lines) | stat: -rw-r--r-- 1,113 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# RUN: llvm-mc -filetype=obj -triple riscv32  < %s \
# RUN:     --mattr=+experimental-xqcili,+experimental-xqcilb,+experimental-xqcibi \
# RUN:     -riscv-add-build-attributes \
# RUN:     | llvm-objdump --no-print-imm-hex -M no-aliases -d - \
# RUN:     | FileCheck -check-prefix=CHECK-INSTR %s
# RUN: llvm-mc -filetype=obj -triple=riscv32 %s \
# RUN:     --mattr=+experimental-xqcili,+experimental-xqcilb,+experimental-xqcibi \
# RUN:     | llvm-readobj -r - | FileCheck %s -check-prefix=CHECK-REL

## This checks that, if the assembler can resolve the qc fixup, that the fixup
## is applied correctly to the instruction.

.L0:
# CHECK-INSTR: qc.e.beqi a0, 64, 0x0
qc.e.beqi a0, 64, .L0
# CHECK-INSTR: qc.e.j 0x10000016
qc.e.j func
# CHECK-INSTR: qc.e.li a0, 8
qc.e.li a0, abs_sym
# CHECK-INSTR: qc.li a0, 8
qc.li a0, %qc.abs20(abs_sym)



# This has to come after the instructions that use it or it will
# be evaluated at parse-time (avoiding fixups)
abs_sym = 8


.space 0x10000000
func:
  ret

## All these fixups should be resolved by the assembler without emitting
## relocations.
# CHECK-REL-NOT: R_RISCV