-
Notifications
You must be signed in to change notification settings - Fork 4
/
s4e-mac.test.s
41 lines (33 loc) · 1.52 KB
/
s4e-mac.test.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# MC test of sample S4E MAC instruction extensions
# RUN: llvm-mc -triple=riscv32 --mattr=+xs4emac -show-encoding %s \
# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INSTR
# RUN: not llvm-mc -triple riscv32 %s 2>&1 \
# RUN: | FileCheck -check-prefix=CHECK-NO-EXT %s
s4e.reset_acc
# CHECK-INSTR: s4e.reset_acc
# CHECK-ENCODING: [0x0b,0x00,0x00,0x00]
# CHECK-NO-EXT: instruction requires the following: 'XS4EMAC' (X_S4E_MAC Extension){{$}}
s4e.get_acc_lo t1
# CHECK-INSTR: s4e.get_acc_lo t1
# CHECK-ENCODING: [0x0b,0x03,0x00,0x02]
# CHECK-NO-EXT: instruction requires the following: 'XS4EMAC' (X_S4E_MAC Extension){{$}}
s4e.get_acc_hi s9
# CHECK-INSTR: s4e.get_acc_hi s9
# CHECK-ENCODING: [0x8b,0x0c,0x00,0x04]
# CHECK-NO-EXT: instruction requires the following: 'XS4EMAC' (X_S4E_MAC Extension){{$}}
s4e.macu_32 s5, a7
# CHECK-INSTR: s4e.macu_32 s5, a7
# CHECK-ENCODING: [0x0b,0x90,0x1a,0x01]
# CHECK-NO-EXT: instruction requires the following: 'XS4EMAC' (X_S4E_MAC Extension){{$}}
s4e.macs_32 s5, a7
# CHECK-INSTR: s4e.macs_32 s5, a7
# CHECK-ENCODING: [0x0b,0x90,0x1a,0x03]
# CHECK-NO-EXT: instruction requires the following: 'XS4EMAC' (X_S4E_MAC Extension){{$}}
s4e.macu_64 s5, a7
# CHECK-INSTR: s4e.macu_64 s5, a7
# CHECK-ENCODING: [0x0b,0xa0,0x1a,0x01]
# CHECK-NO-EXT: instruction requires the following: 'XS4EMAC' (X_S4E_MAC Extension){{$}}
s4e.macs_64 s5, a7
# CHECK-INSTR: s4e.macs_64 s5, a7
# CHECK-ENCODING: [0x0b,0xa0,0x1a,0x03]
# CHECK-NO-EXT: instruction requires the following: 'XS4EMAC' (X_S4E_MAC Extension){{$}}