summaryrefslogtreecommitdiff
path: root/opcodes-pseudo
blob: 20c83ecb323f15120a71a5da9d09e955dfc1c6b3 (plain)
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
# Instructions that differ slightly between rv32 and rv64
@slli.rv32 rd rs1 31..25=0  shamtw  14..12=1 6..2=0x04 1..0=3
@srli.rv32 rd rs1 31..25=0  shamtw  14..12=5 6..2=0x04 1..0=3
@srai.rv32 rd rs1 31..25=32 shamtw  14..12=5 6..2=0x04 1..0=3

# SYSTEM pseudo-instructions that map to csr*
@frflags    rd 19..15=0 31..20=0x001 14..12=2 6..2=0x1C 1..0=3
@fsflags    rd rs1      31..20=0x001 14..12=1 6..2=0x1C 1..0=3
@fsflagsi   rd zimm     31..20=0x001 14..12=5 6..2=0x1C 1..0=3
@frrm       rd 19..15=0 31..20=0x002 14..12=2 6..2=0x1C 1..0=3
@fsrm       rd rs1      31..20=0x002 14..12=1 6..2=0x1C 1..0=3
@fsrmi      rd zimm     31..20=0x002 14..12=5 6..2=0x1C 1..0=3
@fscsr      rd rs1      31..20=0x003 14..12=1 6..2=0x1C 1..0=3
@frcsr      rd 19..15=0 31..20=0x003 14..12=2 6..2=0x1C 1..0=3
@rdcycle    rd 19..15=0 31..20=0xC00 14..12=2 6..2=0x1C 1..0=3
@rdtime     rd 19..15=0 31..20=0xC01 14..12=2 6..2=0x1C 1..0=3
@rdinstret  rd 19..15=0 31..20=0xC02 14..12=2 6..2=0x1C 1..0=3
@rdcycleh   rd 19..15=0 31..20=0xC80 14..12=2 6..2=0x1C 1..0=3
@rdtimeh    rd 19..15=0 31..20=0xC81 14..12=2 6..2=0x1C 1..0=3
@rdinstreth rd 19..15=0 31..20=0xC82 14..12=2 6..2=0x1C 1..0=3

# Krste can't decide how to name these instructions
@ecall     11..7=0 19..15=0 31..20=0x000 14..12=0 6..2=0x1C 1..0=3
@ebreak    11..7=0 19..15=0 31..20=0x001 14..12=0 6..2=0x1C 1..0=3
@eret      11..7=0 19..15=0 31..20=0x100 14..12=0 6..2=0x1C 1..0=3