blob: b07bef9d87c837c7faab32072d8344f6e1819f0b [file] [log] [blame]
Alex Bradbury59136ff2017-12-15 09:47:01 +00001# RUN: llvm-mc %s -triple=riscv32 -mattr=+c,+f -riscv-no-aliases -show-encoding \
Alex Bradbury60714f92017-12-13 09:32:55 +00002# RUN: | FileCheck -check-prefixes=CHECK,CHECK-INST %s
3# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+c,+f < %s \
Alex Bradbury59136ff2017-12-15 09:47:01 +00004# RUN: | llvm-objdump -mattr=+c,+f -riscv-no-aliases -d - \
5# RUN: | FileCheck -check-prefix=CHECK-INST %s
Ana Pazos1b57c7a2018-01-18 18:54:05 +00006# RUN: not llvm-mc -triple riscv32 -mattr=+c \
7# RUN: -riscv-no-aliases -show-encoding < %s 2>&1 \
8# RUN: | FileCheck -check-prefixes=CHECK-NO-EXT %s
9# RUN: not llvm-mc -triple riscv32 \
10# RUN: -riscv-no-aliases -show-encoding < %s 2>&1 \
11# RUN: | FileCheck -check-prefixes=CHECK-NO-EXT %s
12# RUN: not llvm-mc -triple riscv64 -mattr=+c,+f \
13# RUN: -riscv-no-aliases -show-encoding < %s 2>&1 \
14# RUN: | FileCheck -check-prefixes=CHECK-NO-EXT %s
15
Alex Bradbury60714f92017-12-13 09:32:55 +000016
17# CHECK-INST: c.flwsp fs0, 252(sp)
18# CHECK: encoding: [0x7e,0x74]
Ana Pazos1b57c7a2018-01-18 18:54:05 +000019# CHECK-NO-EXT: error: instruction use requires an option to be enabled
Alex Bradbury60714f92017-12-13 09:32:55 +000020c.flwsp fs0, 252(sp)
21# CHECK-INST: c.fswsp fa7, 252(sp)
22# CHECK: encoding: [0xc6,0xff]
Ana Pazos1b57c7a2018-01-18 18:54:05 +000023# CHECK-NO-EXT: error: instruction use requires an option to be enabled
Alex Bradbury60714f92017-12-13 09:32:55 +000024c.fswsp fa7, 252(sp)
25
26# CHECK-INST: c.flw fa3, 124(a5)
27# CHECK: encoding: [0xf4,0x7f]
Ana Pazos1b57c7a2018-01-18 18:54:05 +000028# CHECK-NO-EXT: error: instruction use requires an option to be enabled
Alex Bradbury60714f92017-12-13 09:32:55 +000029c.flw fa3, 124(a5)
30# CHECK-INST: c.fsw fa2, 124(a1)
31# CHECK: encoding: [0xf0,0xfd]
Ana Pazos1b57c7a2018-01-18 18:54:05 +000032# CHECK-NO-EXT: error: instruction use requires an option to be enabled
Alex Bradbury60714f92017-12-13 09:32:55 +000033c.fsw fa2, 124(a1)