1# RUN: llvm-mc %s -triple=riscv64 -mattr=+c,+d -riscv-no-aliases -show-encoding \
2# RUN:     | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
3# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+c,+d < %s \
4# RUN:     | llvm-objdump --mattr=+c,+d -M no-aliases -d -r - \
5# RUN:     | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
6#
7# RUN: not llvm-mc -triple riscv64 -mattr=+c \
8# RUN:     -riscv-no-aliases -show-encoding < %s 2>&1 \
9# RUN:     | FileCheck -check-prefixes=CHECK-NO-EXT-D %s
10# RUN: not llvm-mc -triple riscv64 -riscv-no-aliases -show-encoding < %s 2>&1 \
11# RUN:     | FileCheck -check-prefixes=CHECK-NO-EXT-DC %s
12
13# CHECK-ASM-AND-OBJ: c.fldsp  fs0, 504(sp)
14# CHECK-ASM: encoding: [0x7e,0x34]
15# CHECK-NO-EXT-D:  error: instruction requires the following: 'D' (Double-Precision Floating-Point)
16# CHECK-NO-EXT-DC:  error: instruction requires the following: 'C' (Compressed Instructions), 'D' (Double-Precision Floating-Point)
17c.fldsp  fs0, 504(sp)
18# CHECK-ASM-AND-OBJ: c.fsdsp  fa7, 504(sp)
19# CHECK-ASM: encoding: [0xc6,0xbf]
20# CHECK-NO-EXT-D:  error: instruction requires the following: 'D' (Double-Precision Floating-Point)
21# CHECK-NO-EXT-DC:  error: instruction requires the following: 'C' (Compressed Instructions), 'D' (Double-Precision Floating-Point)
22c.fsdsp  fa7, 504(sp)
23
24# CHECK-ASM-AND-OBJ: c.fld  fa3, 248(a5)
25# CHECK-ASM: encoding: [0xf4,0x3f]
26# CHECK-NO-EXT-D:  error: instruction requires the following: 'D' (Double-Precision Floating-Point)
27# CHECK-NO-EXT-DC:  error: instruction requires the following: 'C' (Compressed Instructions), 'D' (Double-Precision Floating-Point)
28c.fld  fa3, 248(a5)
29# CHECK-ASM-AND-OBJ: c.fsd  fa2, 248(a1)
30# CHECK-ASM: encoding: [0xf0,0xbd]
31# CHECK-NO-EXT-D:  error: instruction requires the following: 'D' (Double-Precision Floating-Point)
32# CHECK-NO-EXT-DC:  error: instruction requires the following: 'C' (Compressed Instructions), 'D' (Double-Precision Floating-Point)
33c.fsd  fa2, 248(a1)
34