1 # RUN: llvm-mc %s -triple=riscv32 -mattr=+d -riscv-no-aliases \
2 # RUN: | FileCheck -check-prefix=CHECK-INST %s
3 # RUN: llvm-mc %s -triple=riscv32 -mattr=+d \
4 # RUN: | FileCheck -check-prefix=CHECK-ALIAS %s
5 # RUN: llvm-mc %s -triple=riscv64 -mattr=+d -riscv-no-aliases \
6 # RUN: | FileCheck -check-prefix=CHECK-INST %s
7 # RUN: llvm-mc %s -triple=riscv64 -mattr=+d \
8 # RUN: | FileCheck -check-prefix=CHECK-ALIAS %s
9 # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+d < %s \
10 # RUN: | llvm-objdump -d -mattr=+d -M no-aliases - \
11 # RUN: | FileCheck -check-prefix=CHECK-INST %s
12 # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+d < %s \
13 # RUN: | llvm-objdump -d -mattr=+d - \
14 # RUN: | FileCheck -check-prefix=CHECK-ALIAS %s
15 # RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+d < %s \
16 # RUN: | llvm-objdump -d -mattr=+d -M no-aliases - \
17 # RUN: | FileCheck -check-prefix=CHECK-INST %s
18 # RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+d < %s \
19 # RUN: | llvm-objdump -d -mattr=+d - \
20 # RUN: | FileCheck -check-prefix=CHECK-ALIAS %s
22 ##===----------------------------------------------------------------------===##
23 ## Assembler Pseudo Instructions (User-Level ISA, Version 2.2, Chapter 20)
24 ##===----------------------------------------------------------------------===##
29 # CHECK-INST: fsgnj.d ft0, ft1, ft1
30 # CHECK-ALIAS: fmv.d ft0, ft1
32 # CHECK-INST: fsgnjx.d ft1, ft2, ft2
33 # CHECK-ALIAS: fabs.d ft1, ft2
35 # CHECK-INST: fsgnjn.d ft2, ft3, ft3
36 # CHECK-ALIAS: fneg.d ft2, ft3
39 # CHECK-INST: flt.d tp, ft6, ft5
40 # CHECK-ALIAS: flt.d tp, ft6, ft5
42 # CHECK-INST: fle.d t2, fs1, fs0
43 # CHECK-ALIAS: fle.d t2, fs1, fs0
46 # CHECK-INST: fld ft0, 0(a0)
47 # CHECK-ALIAS: fld ft0, 0(a0)
49 # CHECK-INST: fsd ft0, 0(a0)
50 # CHECK-ALIAS: fsd ft0, 0(a0)
53 ##===----------------------------------------------------------------------===##
54 ## Aliases which omit the rounding mode.
55 ##===----------------------------------------------------------------------===##
57 # CHECK-INST: fmadd.d fa0, fa1, fa2, fa3, dyn
58 # CHECK-ALIAS: fmadd.d fa0, fa1, fa2, fa3{{[[:space:]]}}
59 fmadd.d
f10, f11, f12, f13
60 # CHECK-INST: fmsub.d fa4, fa5, fa6, fa7, dyn
61 # CHECK-ALIAS: fmsub.d fa4, fa5, fa6, fa7{{[[:space:]]}}
62 fmsub.d
f14, f15, f16, f17
63 # CHECK-INST: fnmsub.d fs2, fs3, fs4, fs5, dyn
64 # CHECK-ALIAS: fnmsub.d fs2, fs3, fs4, fs5{{[[:space:]]}}
65 fnmsub.d
f18, f19, f20, f21
66 # CHECK-INST: fnmadd.d fs6, fs7, fs8, fs9, dyn
67 # CHECK-ALIAS: fnmadd.d fs6, fs7, fs8, fs9{{[[:space:]]}}
68 fnmadd.d
f22, f23, f24, f25
69 # CHECK-INST: fadd.d fs10, fs11, ft8, dyn
70 # CHECK-ALIAS: fadd.d fs10, fs11, ft8{{[[:space:]]}}
72 # CHECK-INST: fsub.d ft9, ft10, ft11, dyn
73 # CHECK-ALIAS: fsub.d ft9, ft10, ft11{{[[:space:]]}}
75 # CHECK-INST: fmul.d ft0, ft1, ft2, dyn
76 # CHECK-ALIAS: fmul.d ft0, ft1, ft2{{[[:space:]]}}
78 # CHECK-INST: fdiv.d ft3, ft4, ft5, dyn
79 # CHECK-ALIAS: fdiv.d ft3, ft4, ft5{{[[:space:]]}}
81 # CHECK-INST: fsqrt.d ft6, ft7, dyn
82 # CHECK-ALIAS: fsqrt.d ft6, ft7{{[[:space:]]}}
84 # CHECK-INST: fcvt.s.d fs5, fs6, dyn
85 # CHECK-ALIAS: fcvt.s.d fs5, fs6{{[[:space:]]}}
87 # CHECK-INST: fcvt.w.d a4, ft11, dyn
88 # CHECK-ALIAS: fcvt.w.d a4, ft11{{[[:space:]]}}
90 # CHECK-INST: fcvt.wu.d a5, ft10, dyn
91 # CHECK-ALIAS: fcvt.wu.d a5, ft10{{[[:space:]]}}