39 lines · plain
1# RUN: llvm-mc %s -triple=riscv32 -mattr=+c,+d -M no-aliases -show-encoding \2# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s3# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+c,+d < %s \4# RUN: | llvm-objdump --no-print-imm-hex --mattr=+c,+d -M no-aliases -d -r - \5# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s6# RUN: llvm-mc %s -triple=riscv32 -mattr=+zcd,+d -M no-aliases -show-encoding \7# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s8# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+zcd,+d < %s \9# RUN: | llvm-objdump --no-print-imm-hex --mattr=+zcd,+d -M no-aliases -d -r - \10# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s11#12# RUN: not llvm-mc -triple riscv32 -mattr=+c \13# RUN: -M no-aliases -show-encoding < %s 2>&1 \14# RUN: | FileCheck -check-prefixes=CHECK-NO-EXT-D %s15# RUN: not llvm-mc -triple riscv32 -M no-aliases -show-encoding < %s 2>&1 \16# RUN: | FileCheck -check-prefixes=CHECK-NO-EXT-DC %s17 18# CHECK-ASM-AND-OBJ: c.fldsp fs0, 504(sp)19# CHECK-ASM: encoding: [0x7e,0x34]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) or 'Zcd' (Compressed Double-Precision Floating-Point Instructions), 'D' (Double-Precision Floating-Point){{$}}22c.fldsp fs0, 504(sp)23# CHECK-ASM-AND-OBJ: c.fsdsp fa7, 504(sp)24# CHECK-ASM: encoding: [0xc6,0xbf]25# CHECK-NO-EXT-D: error: instruction requires the following: 'D' (Double-Precision Floating-Point){{$}}26# CHECK-NO-EXT-DC: error: instruction requires the following: 'C' (Compressed Instructions) or 'Zcd' (Compressed Double-Precision Floating-Point Instructions), 'D' (Double-Precision Floating-Point){{$}}27c.fsdsp fa7, 504(sp)28 29# CHECK-ASM-AND-OBJ: c.fld fa3, 248(a5)30# CHECK-ASM: encoding: [0xf4,0x3f]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) or 'Zcd' (Compressed Double-Precision Floating-Point Instructions), 'D' (Double-Precision Floating-Point){{$}}33c.fld fa3, 248(a5)34# CHECK-ASM-AND-OBJ: c.fsd fa2, 248(a1)35# CHECK-ASM: encoding: [0xf0,0xbd]36# CHECK-NO-EXT-D: error: instruction requires the following: 'D' (Double-Precision Floating-Point){{$}}37# CHECK-NO-EXT-DC: error: instruction requires the following: 'C' (Compressed Instructions) or 'Zcd' (Compressed Double-Precision Floating-Point Instructions), 'D' (Double-Precision Floating-Point){{$}}38c.fsd fa2, 248(a1)39