File: attribute-with-insts.s

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (34 lines) | stat: -rw-r--r-- 890 bytes parent folder | download | duplicates (2)
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
## Test .attribute effects.
## We do not provide '-mattr=' and '.option rvc' and enable extensions through
## '.attribute arch'.

# RUN: llvm-mc -triple riscv32 -filetype=obj %s \
# RUN:   | llvm-objdump --triple=riscv32 -d -M no-aliases - \
# RUN:   | FileCheck -check-prefix=CHECK-INST %s

# RUN: llvm-mc -triple riscv64 -filetype=obj %s \
# RUN:   | llvm-objdump --triple=riscv64 -d -M no-aliases - \
# RUN:   | FileCheck -check-prefix=CHECK-INST %s

.attribute arch, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0"

# CHECK-INST: lr.w t0, (t1)
lr.w t0, (t1)

# CHECK-INST: c.addi a3, -32
c.addi a3, -32

# CHECK-INST: fmadd.d fa0, fa1, fa2, fa3, dyn
fmadd.d f10, f11, f12, f13, dyn

# CHECK-INST: fmadd.s fa0, fa1, fa2, fa3, dyn
fmadd.s f10, f11, f12, f13, dyn

# CHECK-INST: addi ra, sp, 2
addi ra, sp, 2

# CHECK-INST: mul a4, ra, s0
mul a4, ra, s0

# CHECK-INST: addw a2, a3, a4
addw a2, a3, a4