64 lines · plain
1# RUN: llvm-mc -triple=riscv32 -show-encoding --mattr=+experimental-zibi %s \2# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-ASM3# RUN: llvm-mc -triple=riscv64 -show-encoding --mattr=+experimental-zibi %s \4# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-ASM5# RUN: not llvm-mc -triple=riscv32 -show-encoding %s 2>&1 \6# RUN: | FileCheck %s --check-prefix=CHECK-ERROR7# RUN: not llvm-mc -triple=riscv64 -show-encoding %s 2>&1 \8# RUN: | FileCheck %s --check-prefix=CHECK-ERROR9# RUN: llvm-mc -triple=riscv32 -filetype=obj --mattr=+experimental-zibi %s \10# RUN: | llvm-objdump -d --mattr=+experimental-zibi --no-print-imm-hex - \11# RUN: | FileCheck %s --check-prefix=CHECK-OBJ12# RUN: llvm-mc -triple=riscv32 -filetype=obj --mattr=+experimental-zibi %s \13# RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN14# RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+experimental-zibi %s \15# RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN16beqi a0, 1, 102417# CHECK-OBJ: beqi a0, 1, 0x40018# CHECK-ASM: beqi a0, 1, 102419# CHECK-ENCODING: [0x63,0x20,0x15,0x40]20# CHECK-ERROR: instruction requires the following: 'Zibi' (Branch with Immediate){{$}}21# CHECK-UNKNOWN: 40152063 <unknown>22beqi a5, -1, -102423# CHECK-OBJ: beqi a5, -1, 0xfffffc0424# CHECK-ASM: beqi a5, -1, -102425# CHECK-ENCODING: [0xe3,0xa0,0x07,0xc0]26# CHECK-ERROR: instruction requires the following: 'Zibi' (Branch with Immediate){{$}}27# CHECK-UNKNOWN: c007a0e3 <unknown>28beqi s0, 22, 0xffe29# CHECK-OBJ: beqi s0, 22, 0x100630# CHECK-ASM: beqi s0, 22, 409431# CHECK-ENCODING: [0xe3,0x2f,0x64,0x7f]32# CHECK-ERROR: instruction requires the following: 'Zibi' (Branch with Immediate){{$}}33# CHECK-UNKNOWN: 7f642fe3 <unknown>34beqi s1, 11, -409635# CHECK-OBJ: beqi s1, 11, 0xfffff00c36# CHECK-ASM: beqi s1, 11, -409637# CHECK-ENCODING: [0x63,0xa0,0xb4,0x80]38# CHECK-ERROR: instruction requires the following: 'Zibi' (Branch with Immediate){{$}}39# CHECK-UNKNOWN: 80b4a063 <unknown>40bnei a0, 1, 102441# CHECK-OBJ: bnei a0, 1, 0x41042# CHECK-ASM: bnei a0, 1, 102443# CHECK-ENCODING: [0x63,0x30,0x15,0x40]44# CHECK-ERROR: instruction requires the following: 'Zibi' (Branch with Immediate){{$}}45# CHECK-UNKNOWN: 40153063 <unknown>46bnei a5, -1, -102447# CHECK-OBJ: bnei a5, -1, 0xfffffc1448# CHECK-ASM: bnei a5, -1, -102449# CHECK-ENCODING: [0xe3,0xb0,0x07,0xc0]50# CHECK-ERROR: instruction requires the following: 'Zibi' (Branch with Immediate){{$}}51# CHECK-UNKNOWN: c007b0e3 <unknown>52bnei s0, 22, 0xffe53# CHECK-OBJ: bnei s0, 22, 0x101654# CHECK-ASM: bnei s0, 22, 409455# CHECK-ENCODING: [0xe3,0x3f,0x64,0x7f]56# CHECK-ERROR: instruction requires the following: 'Zibi' (Branch with Immediate){{$}}57# CHECK-UNKNOWN: 7f643fe3 <unknown>58bnei s1, 11, -409659# CHECK-OBJ: bnei s1, 11, 0xfffff01c60# CHECK-ASM: bnei s1, 11, -409661# CHECK-ENCODING: [0x63,0xb0,0xb4,0x80]62# CHECK-ERROR: instruction requires the following: 'Zibi' (Branch with Immediate){{$}}63# CHECK-UNKNOWN: 80b4b063 <unknown>64