Playground
bench_test.gno
package riscv
import (
"testing"
"gno.land/p/nym-moultest123/x/vm/vmkit/v0"
"gno.land/p/nt/uassert/v0"
)
// The measurement the design issue set a kill criterion against: if an RV32I
// instruction costs more than roughly 15k cycles after the bf ladder's tricks,
// a RISC-V guest runs ~200k instructions per block, which is a token transfer
// and not a program a Rust programmer would write without thinking about it.
//
// The loop is arithmetic and branches only, no syscalls and no memory beyond
// the fetch, so it measures the decode-and-dispatch path rather than the host.
// li loads a full 32-bit constant, because addi cannot: its immediate is 12
// bits SIGN EXTENDED, so addi(rd, x0, 4000) loads -96 and a loop counting up to
// it never terminates. That is not hypothetical, it hung this benchmark for two
// days. The +0x800 pre-bias is the standard correction: it cancels the sign
// extension addi is about to apply to the low half.
func li(rd, v uint32) []uint32 {
return []uint32{
lui(rd, (v+0x800)&0xFFFFF000),
addi(rd, rd, v&0xFFF),
}
}
func lui(rd, imm uint32) uint32 { return uType(imm, rd, opLUI) }
// benchProg counts x6 up to x8 in a 4-instruction loop, then exits.
func benchProg(n uint32) []uint32 {
prog := li(8, n) // x8 = n, the loop bound
prog = append(prog,
addi(5, 0, 0), // sum = 0
addi(6, 0, 0), // i = 0
// loop:
add(5, 5, 6), // sum += i
addi(6, 6, 1), // i++
addi(7, 0, 0), // filler, keeps the loop a round 4 instructions
bne(6, 8, 0x1FF4), // -12, while i != x8
)
return append(prog, exitWith()...)
}
// benchInstrs is how many instructions benchProg(n) executes: 4 setup (li is
// two), 4 per iteration including the branch, 2 to exit.
func benchInstrs(n int64) int64 { return 4 + 4*n + 2 }
// runBench returns the instruction count the machine charged itself. The fuel
// cap is ten times what the program should need: a mis-encoded immediate turns
// an unmetered run into an infinite loop with no test output, so the budget is
// what makes a bad encoding fail in a second instead of hanging the suite.
func runBench(t *testing.T, n uint32) int64 {
t.Helper()
m, err := NewMachine(asm(benchProg(n)), entry)
uassert.NoError(t, err)
if m == nil {
return 0
}
used, status := m.Step(vmkit.NewTestHost(), benchInstrs(int64(n))*10)
uassert.Equal(t, "halted", status.String())
return used
}
// One test per size, so `gno test -print-runtime-metrics` prints one cycle
// count each and the slope cancels the fixed per-test overhead. The README
// quotes the result.
func TestBenchRV32I1000(t *testing.T) {
uassert.Equal(t, benchInstrs(1000), runBench(t, 1000))
}
func TestBenchRV32I4000(t *testing.T) {
uassert.Equal(t, benchInstrs(4000), runBench(t, 4000))
}
// li has to survive the sign-extension boundary in both directions, or the two
// sizes above are not measuring the loop counts they claim to.
func TestLoadImmediateSpansTheSignBoundary(t *testing.T) {
for _, v := range []uint32{0, 1, 0x7FF, 0x800, 1000, 4000, 0x7FFFFFFF, 0xFFFFFFFF} {
prog := append(li(5, v), exitWith()...)
m, err := NewMachine(asm(prog), entry)
uassert.NoError(t, err)
if m == nil {
continue
}
_, status := m.Step(vmkit.NewTestHost(), vmkit.Unmetered)
uassert.Equal(t, "halted", status.String())
uassert.Equal(t, uint64(v), uint64(m.reg[5]))
}
}
// Predecoding is paid once per load, and a realm loads a machine on every
// transaction that resumes one. So the saving on the dispatch loop is only
// real if this side of the trade is small against the instructions the slice
// then executes. Two sizes again, so the slope is per word.
func benchImage(words int) []byte {
img := make([]byte, words*4)
inst := addi(5, 5, 1)
for i := 0; i < words; i++ {
img[i*4] = byte(inst)
img[i*4+1] = byte(inst >> 8)
img[i*4+2] = byte(inst >> 16)
img[i*4+3] = byte(inst >> 24)
}
return img
}
func TestBenchPredecode1000(t *testing.T) {
c := predecode(entry, benchImage(1000))
uassert.Equal(t, uint64(1000), uint64(c.words))
}
func TestBenchPredecode4000(t *testing.T) {
c := predecode(entry, benchImage(4000))
uassert.Equal(t, uint64(4000), uint64(c.words))
}
// The control, so the slope above is predecode and not the loop that builds
// the image.
func TestBenchImageOnly1000(t *testing.T) {
uassert.Equal(t, 4000, len(benchImage(1000)))
}
func TestBenchImageOnly4000(t *testing.T) {
uassert.Equal(t, 16000, len(benchImage(4000)))
}
clang_test.gno
package riscv
import (
"testing"
"gno.land/p/nym-moultest123/x/vm/vmkit/v0"
"gno.land/p/nt/uassert/v0"
)
// A guest compiled by a real compiler, which is the only test here that was
// not written by the same person who wrote the emulator.
//
// The image is guests.gno's, built from tools/riscv-guests/fnv by clang. It
// exercises what hand-written tests do not: a real function prologue spilling
// ra and s0 to a stack the host set up, .bss addressed far above a read-only
// text segment, LLVM's constant materialization through lui/addi pairs, and
// MUL in an inner loop.
// The expected hashes come from an independent FNV-1a, not from this VM.
func TestClangCompiledGuest(t *testing.T) {
cases := []struct {
in string
want string
}{
{"", "811c9dc5"},
{"a", "e40c292c"},
{"Hello", "f55c314b"},
{"gno.land", "fb7ffba0"},
}
for _, c := range cases {
m, err := NewMachine(GuestFNV(), entry)
uassert.NoError(t, err)
if m == nil {
continue
}
h := vmkit.NewTestHost().WithInput([]byte(c.in))
_, status := m.Step(h, vmkit.Unmetered)
uassert.Equal(t, "halted", status.String(), "input "+c.in+": "+m.Trap())
uassert.Equal(t, c.want, string(h.Out()), "fnv1a of "+c.in)
}
}
// Compiled code pauses and resumes like anything else. This is the property a
// realm depends on, run against output a compiler produced rather than against
// a loop written to be sliceable.
func TestClangGuestSurvivesSlicing(t *testing.T) {
image := GuestFNV()
h := vmkit.NewTestHost().WithInput([]byte("gno.land"))
sliced, err := NewMachine(image, entry)
uassert.NoError(t, err)
status := vmkit.Running
slices := 0
for i := 0; i < 500 && status == vmkit.Running; i++ {
var fresh Machine
uassert.NoError(t, fresh.Restore(sliced.Snapshot()))
_, status = fresh.Step(h, 3)
sliced = &fresh
slices++
}
uassert.Equal(t, "halted", status.String())
uassert.True(t, slices > 10, "a sliced run must actually have been sliced")
uassert.Equal(t, "fb7ffba0", string(h.Out()))
}
// The guest writes its globals at 0x40000, which the linker script put well
// above the text segment on purpose. If it had put them adjacent, W xor X
// would trap on the first store, so this is the test that the memory layout
// the toolchain was told to use is the one the host actually provides.
func TestClangGuestWritesAboveItsText(t *testing.T) {
m, err := NewMachine(GuestFNV(), entry)
uassert.NoError(t, err)
h := vmkit.NewTestHost().WithInput([]byte("gno.land"))
_, status := m.Step(h, vmkit.Unmetered)
uassert.Equal(t, "halted", status.String())
// The text pages, the .bss page at 0x40000, and the stack page at the top.
uassert.True(t, m.Memory().DirtyPages() >= 3,
"the guest must have written outside its text segment")
uassert.True(t, m.Memory().DirtyPages() <= 8,
"a 196-byte program must not have dirtied the address space")
}
// Image is what every caller uses to turn words into a program, so a byte
// order mistake here would look like a decoder bug everywhere else.
func TestImageIsLittleEndian(t *testing.T) {
b := Image([]uint32{0x04030201, 0xFF000000})
uassert.Equal(t, 8, len(b))
uassert.Equal(t, uint64(0x01), uint64(b[0]))
uassert.Equal(t, uint64(0x04), uint64(b[3]))
uassert.Equal(t, uint64(0x00), uint64(b[4]))
uassert.Equal(t, uint64(0xFF), uint64(b[7]))
// And it agrees with the assembler the other tests use.
words := []uint32{addi(5, 0, 1), ecall()}
a, i := asm(words), Image(words)
uassert.Equal(t, len(a), len(i))
for k := range a {
uassert.Equal(t, uint64(a[k]), uint64(i[k]))
}
}
// GuestFNV must not hand out a slice a caller can scribble on, because the
// next caller gets the same program.
func TestGuestFNVIsACopy(t *testing.T) {
a := GuestFNV()
a[0] = 0xFF
b := GuestFNV()
uassert.False(t, b[0] == 0xFF, "GuestFNV must return a fresh image each call")
}
conformance_test.gno
package riscv
import (
"testing"
"gno.land/p/nym-moultest123/x/vm/vmkit/v0"
"gno.land/p/nt/uassert/v0"
)
// The official RISC-V conformance suite, built from
// github.com/riscv-software-src/riscv-tests at the rv32ui and rv32um targets.
//
// This is the only test here that a third party wrote. Everything in
// riscv_test.gno checks that the emulator agrees with its author's reading of
// the spec; this checks that it agrees with the people who wrote the spec.
//
// The suite's own environment (env/p) sets up mtvec, delegates traps and
// returns through mret, none of which exists on a hart with no CSRs and one
// privilege level. So these were built against a replacement riscv_test.h that
// keeps the parts of the contract the tests rely on and drops the machine-mode
// ceremony. Crucially the exit convention is the suite's own, unchanged: it
// already spells pass and fail as `li a7, 93; ecall`, which is this host's exit
// syscall, so a0 == 0 means pass and a0 == (testnum << 1) | 1 names the case
// that failed.
//
// Regenerating the corpus, the replacement header and the linker script:
// tools/riscv-guests/conformance.
// conformanceDataAddr is where the linker script puts .data, far above the
// text segment because the text is read-only here.
const conformanceDataAddr = 0x40000
// conformanceFuel bounds a runaway test. Every case in the suite finishes in
// well under this; a case that does not has failed in a way worth reporting as
// a timeout rather than hanging the run.
const conformanceFuel = 2000000
type conformanceCase struct {
name string
text []uint32
data []uint32
}
var conformanceCases = []conformanceCase{
{
name: "rv32ui-add",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00000593, 0x00000613, 0x00C58733, 0x00000393, 0x4C771663,
0x00300193, 0x00100593, 0x00100613, 0x00C58733, 0x00200393, 0x4A771A63, 0x00400193, 0x00300593,
0x00700613, 0x00C58733, 0x00A00393, 0x48771E63, 0x00500193, 0x00000593, 0xFFFF8637, 0x00C58733,
0xFFFF83B7, 0x48771263, 0x00600193, 0x800005B7, 0x00000613, 0x00C58733, 0x800003B7, 0x46771663,
0x00700193, 0x800005B7, 0xFFFF8637, 0x00C58733, 0x7FFF83B7, 0x44771A63, 0x00800193, 0x00000593,
0x00008637, 0xFFF60613, 0x00C58733, 0x000083B7, 0xFFF38393, 0x42771A63, 0x00900193, 0x800005B7,
0xFFF58593, 0x00000613, 0x00C58733, 0x800003B7, 0xFFF38393, 0x40771A63, 0x00A00193, 0x800005B7,
0xFFF58593, 0x00008637, 0xFFF60613, 0x00C58733, 0x800083B7, 0xFFE38393, 0x3E771863, 0x00B00193,
0x800005B7, 0x00008637, 0xFFF60613, 0x00C58733, 0x800083B7, 0xFFF38393, 0x3C771863, 0x00C00193,
0x800005B7, 0xFFF58593, 0xFFFF8637, 0x00C58733, 0x7FFF83B7, 0xFFF38393, 0x3A771863, 0x00D00193,
0x00000593, 0xFFF00613, 0x00C58733, 0xFFF00393, 0x38771C63, 0x00E00193, 0xFFF00593, 0x00100613,
0x00C58733, 0x00000393, 0x38771063, 0x00F00193, 0xFFF00593, 0xFFF00613, 0x00C58733, 0xFFE00393,
0x36771463, 0x01000193, 0x00100593, 0x80000637, 0xFFF60613, 0x00C58733, 0x800003B7, 0x34771663,
0x01100193, 0x00D00593, 0x00B00613, 0x00C585B3, 0x01800393, 0x32759A63, 0x01200193, 0x00E00593,
0x00B00613, 0x00C58633, 0x01900393, 0x30761E63, 0x01300193, 0x00D00593, 0x00B585B3, 0x01A00393,
0x30759463, 0x01400193, 0x00000213, 0x00D00093, 0x00B00113, 0x00208733, 0x00070313, 0x00120213,
0x00200293, 0xFE5214E3, 0x01800393, 0x2C731E63, 0x01500193, 0x00000213, 0x00E00093, 0x00B00113,
0x00208733, 0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFE5212E3, 0x01900393, 0x2A731663,
0x01600193, 0x00000213, 0x00F00093, 0x00B00113, 0x00208733, 0x00000013, 0x00000013, 0x00070313,
0x00120213, 0x00200293, 0xFE5210E3, 0x01A00393, 0x26731C63, 0x01700193, 0x00000213, 0x00D00093,
0x00B00113, 0x00208733, 0x00120213, 0x00200293, 0xFE5216E3, 0x01800393, 0x24771863, 0x01800193,
0x00000213, 0x00E00093, 0x00B00113, 0x00000013, 0x00208733, 0x00120213, 0x00200293, 0xFE5214E3,
0x01900393, 0x22771263, 0x01900193, 0x00000213, 0x00F00093, 0x00B00113, 0x00000013, 0x00000013,
0x00208733, 0x00120213, 0x00200293, 0xFE5212E3, 0x01A00393, 0x1E771A63, 0x01A00193, 0x00000213,
0x00D00093, 0x00000013, 0x00B00113, 0x00208733, 0x00120213, 0x00200293, 0xFE5214E3, 0x01800393,
0x1C771463, 0x01B00193, 0x00000213, 0x00E00093, 0x00000013, 0x00B00113, 0x00000013, 0x00208733,
0x00120213, 0x00200293, 0xFE5212E3, 0x01900393, 0x18771C63, 0x01C00193, 0x00000213, 0x00F00093,
0x00000013, 0x00000013, 0x00B00113, 0x00208733, 0x00120213, 0x00200293, 0xFE5212E3, 0x01A00393,
0x16771463, 0x01D00193, 0x00000213, 0x00B00113, 0x00D00093, 0x00208733, 0x00120213, 0x00200293,
0xFE5216E3, 0x01800393, 0x14771063, 0x01E00193, 0x00000213, 0x00B00113, 0x00E00093, 0x00000013,
0x00208733, 0x00120213, 0x00200293, 0xFE5214E3, 0x01900393, 0x10771A63, 0x01F00193, 0x00000213,
0x00B00113, 0x00F00093, 0x00000013, 0x00000013, 0x00208733, 0x00120213, 0x00200293, 0xFE5212E3,
0x01A00393, 0x0E771263, 0x02000193, 0x00000213, 0x00B00113, 0x00000013, 0x00D00093, 0x00208733,
0x00120213, 0x00200293, 0xFE5214E3, 0x01800393, 0x0A771C63, 0x02100193, 0x00000213, 0x00B00113,
0x00000013, 0x00E00093, 0x00000013, 0x00208733, 0x00120213, 0x00200293, 0xFE5212E3, 0x01900393,
0x08771463, 0x02200193, 0x00000213, 0x00B00113, 0x00000013, 0x00000013, 0x00F00093, 0x00208733,
0x00120213, 0x00200293, 0xFE5212E3, 0x01A00393, 0x04771C63, 0x02300193, 0x00F00093, 0x00100133,
0x00F00393, 0x04711263, 0x02400193, 0x02000093, 0x00008133, 0x02000393, 0x02711863, 0x02500193,
0x000000B3, 0x00000393, 0x02709063, 0x02600193, 0x01000093, 0x01E00113, 0x00208033, 0x00000393,
0x00701463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513,
0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-addi",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00000693, 0x00068713, 0x00000393, 0x26771C63, 0x00300193,
0x00100693, 0x00168713, 0x00200393, 0x26771263, 0x00400193, 0x00300693, 0x00768713, 0x00A00393,
0x24771863, 0x00500193, 0x00000693, 0x80068713, 0x80000393, 0x22771E63, 0x00600193, 0x800006B7,
0x00068713, 0x800003B7, 0x22771463, 0x00700193, 0x800006B7, 0x80068713, 0x800003B7, 0x80038393,
0x20771863, 0x00800193, 0x00000693, 0x7FF68713, 0x7FF00393, 0x1E771E63, 0x00900193, 0x800006B7,
0xFFF68693, 0x00068713, 0x800003B7, 0xFFF38393, 0x1E771063, 0x00A00193, 0x800006B7, 0xFFF68693,
0x7FF68713, 0x800003B7, 0x7FE38393, 0x1C771263, 0x00B00193, 0x800006B7, 0x7FF68713, 0x800003B7,
0x7FF38393, 0x1A771663, 0x00C00193, 0x800006B7, 0xFFF68693, 0x80068713, 0x7FFFF3B7, 0x7FF38393,
0x18771863, 0x00D00193, 0x00000693, 0xFFF68713, 0xFFF00393, 0x16771E63, 0x00E00193, 0xFFF00693,
0x00168713, 0x00000393, 0x16771463, 0x00F00193, 0xFFF00693, 0xFFF68713, 0xFFE00393, 0x14771A63,
0x01000193, 0x800006B7, 0xFFF68693, 0x00168713, 0x800003B7, 0x12771E63, 0x01100193, 0x00D00593,
0x00B58593, 0x01800393, 0x12759463, 0x01200193, 0x00000213, 0x00D00093, 0x00B08713, 0x00070313,
0x00120213, 0x00200293, 0xFE5216E3, 0x01800393, 0x10731063, 0x01300193, 0x00000213, 0x00D00093,
0x00A08713, 0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFE5214E3, 0x01700393, 0x0C731A63,
0x01400193, 0x00000213, 0x00D00093, 0x00908713, 0x00000013, 0x00000013, 0x00070313, 0x00120213,
0x00200293, 0xFE5212E3, 0x01600393, 0x0A731263, 0x01500193, 0x00000213, 0x00D00093, 0x00B08713,
0x00120213, 0x00200293, 0xFE5218E3, 0x01800393, 0x08771063, 0x01600193, 0x00000213, 0x00D00093,
0x00000013, 0x00A08713, 0x00120213, 0x00200293, 0xFE5216E3, 0x01700393, 0x04771C63, 0x01700193,
0x00000213, 0x00D00093, 0x00000013, 0x00000013, 0x00908713, 0x00120213, 0x00200293, 0xFE5214E3,
0x01600393, 0x02771663, 0x01800193, 0x02000093, 0x02000393, 0x00709E63, 0x01900193, 0x02100093,
0x03208013, 0x00000393, 0x00701463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193,
0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073,
0x00000000,
},
},
{
name: "rv32ui-and",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0xFF0105B7, 0xF0058593, 0x0F0F1637, 0xF0F60613, 0x00C5F733,
0x0F0013B7, 0xF0038393, 0x48771C63, 0x00300193, 0x0FF015B7, 0xFF058593, 0xF0F0F637, 0x0F060613,
0x00C5F733, 0x00F003B7, 0x0F038393, 0x46771A63, 0x00400193, 0x00FF05B7, 0x0FF58593, 0x0F0F1637,
0xF0F60613, 0x00C5F733, 0x000F03B7, 0x00F38393, 0x44771863, 0x00500193, 0xF00FF5B7, 0x00F58593,
0xF0F0F637, 0x0F060613, 0x00C5F733, 0xF000F3B7, 0x42771863, 0x00600193, 0xFF0105B7, 0xF0058593,
0x0F0F1637, 0xF0F60613, 0x00C5F5B3, 0x0F0013B7, 0xF0038393, 0x40759663, 0x00700193, 0x0FF015B7,
0xFF058593, 0xF0F0F637, 0x0F060613, 0x00C5F633, 0x00F003B7, 0x0F038393, 0x3E761463, 0x00800193,
0xFF0105B7, 0xF0058593, 0x00B5F5B3, 0xFF0103B7, 0xF0038393, 0x3C759663, 0x00900193, 0x00000213,
0xFF0100B7, 0xF0008093, 0x0F0F1137, 0xF0F10113, 0x0020F733, 0x00070313, 0x00120213, 0x00200293,
0xFE5210E3, 0x0F0013B7, 0xF0038393, 0x38731A63, 0x00A00193, 0x00000213, 0x0FF010B7, 0xFF008093,
0xF0F0F137, 0x0F010113, 0x0020F733, 0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFC521EE3,
0x00F003B7, 0x0F038393, 0x34731C63, 0x00B00193, 0x00000213, 0x00FF00B7, 0x0FF08093, 0x0F0F1137,
0xF0F10113, 0x0020F733, 0x00000013, 0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFC521CE3,
0x000F03B7, 0x00F38393, 0x30731C63, 0x00C00193, 0x00000213, 0xFF0100B7, 0xF0008093, 0x0F0F1137,
0xF0F10113, 0x0020F733, 0x00120213, 0x00200293, 0xFE5212E3, 0x0F0013B7, 0xF0038393, 0x2E771263,
0x00D00193, 0x00000213, 0x0FF010B7, 0xFF008093, 0xF0F0F137, 0x0F010113, 0x00000013, 0x0020F733,
0x00120213, 0x00200293, 0xFE5210E3, 0x00F003B7, 0x0F038393, 0x2A771663, 0x00E00193, 0x00000213,
0x00FF00B7, 0x0FF08093, 0x0F0F1137, 0xF0F10113, 0x00000013, 0x00000013, 0x0020F733, 0x00120213,
0x00200293, 0xFC521EE3, 0x000F03B7, 0x00F38393, 0x26771863, 0x00F00193, 0x00000213, 0xFF0100B7,
0xF0008093, 0x00000013, 0x0F0F1137, 0xF0F10113, 0x0020F733, 0x00120213, 0x00200293, 0xFE5210E3,
0x0F0013B7, 0xF0038393, 0x22771C63, 0x01000193, 0x00000213, 0x0FF010B7, 0xFF008093, 0x00000013,
0xF0F0F137, 0x0F010113, 0x00000013, 0x0020F733, 0x00120213, 0x00200293, 0xFC521EE3, 0x00F003B7,
0x0F038393, 0x1E771E63, 0x01100193, 0x00000213, 0x00FF00B7, 0x0FF08093, 0x00000013, 0x00000013,
0x0F0F1137, 0xF0F10113, 0x0020F733, 0x00120213, 0x00200293, 0xFC521EE3, 0x000F03B7, 0x00F38393,
0x1C771063, 0x01200193, 0x00000213, 0x0F0F1137, 0xF0F10113, 0xFF0100B7, 0xF0008093, 0x0020F733,
0x00120213, 0x00200293, 0xFE5212E3, 0x0F0013B7, 0xF0038393, 0x18771663, 0x01300193, 0x00000213,
0xF0F0F137, 0x0F010113, 0x0FF010B7, 0xFF008093, 0x00000013, 0x0020F733, 0x00120213, 0x00200293,
0xFE5210E3, 0x00F003B7, 0x0F038393, 0x14771A63, 0x01400193, 0x00000213, 0x0F0F1137, 0xF0F10113,
0x00FF00B7, 0x0FF08093, 0x00000013, 0x00000013, 0x0020F733, 0x00120213, 0x00200293, 0xFC521EE3,
0x000F03B7, 0x00F38393, 0x10771C63, 0x01500193, 0x00000213, 0x0F0F1137, 0xF0F10113, 0x00000013,
0xFF0100B7, 0xF0008093, 0x0020F733, 0x00120213, 0x00200293, 0xFE5210E3, 0x0F0013B7, 0xF0038393,
0x0E771063, 0x01600193, 0x00000213, 0xF0F0F137, 0x0F010113, 0x00000013, 0x0FF010B7, 0xFF008093,
0x00000013, 0x0020F733, 0x00120213, 0x00200293, 0xFC521EE3, 0x00F003B7, 0x0F038393, 0x0A771263,
0x01700193, 0x00000213, 0x0F0F1137, 0xF0F10113, 0x00000013, 0x00000013, 0x00FF00B7, 0x0FF08093,
0x0020F733, 0x00120213, 0x00200293, 0xFC521EE3, 0x000F03B7, 0x00F38393, 0x06771463, 0x01800193,
0xFF0100B7, 0xF0008093, 0x00107133, 0x00000393, 0x04711863, 0x01900193, 0x00FF00B7, 0x0FF08093,
0x0000F133, 0x00000393, 0x02711C63, 0x01A00193, 0x000070B3, 0x00000393, 0x02709463, 0x01B00193,
0x111110B7, 0x11108093, 0x22222137, 0x22210113, 0x0020F033, 0x00000393, 0x00701463, 0x02301063,
0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F,
0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-andi",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0xFF0106B7, 0xF0068693, 0xF0F6F713, 0xFF0103B7, 0xF0038393,
0x1A771463, 0x00300193, 0x0FF016B7, 0xFF068693, 0x0F06F713, 0x0F000393, 0x18771863, 0x00400193,
0x00FF06B7, 0x0FF68693, 0x70F6F713, 0x00F00393, 0x16771C63, 0x00500193, 0xF00FF6B7, 0x00F68693,
0x0F06F713, 0x00000393, 0x16771063, 0x00600193, 0xFF0105B7, 0xF0058593, 0x0F05F593, 0x00000393,
0x14759463, 0x00700193, 0x00000213, 0x0FF010B7, 0xFF008093, 0x70F0F713, 0x00070313, 0x00120213,
0x00200293, 0xFE5214E3, 0x70000393, 0x10731E63, 0x00800193, 0x00000213, 0x00FF00B7, 0x0FF08093,
0x0F00F713, 0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFE5212E3, 0x0F000393, 0x0E731663,
0x00900193, 0x00000213, 0xF00FF0B7, 0x00F08093, 0xF0F0F713, 0x00000013, 0x00000013, 0x00070313,
0x00120213, 0x00200293, 0xFE5210E3, 0xF00FF3B7, 0x00F38393, 0x0A731A63, 0x00A00193, 0x00000213,
0x0FF010B7, 0xFF008093, 0x70F0F713, 0x00120213, 0x00200293, 0xFE5216E3, 0x70000393, 0x08771663,
0x00B00193, 0x00000213, 0x00FF00B7, 0x0FF08093, 0x00000013, 0x0F00F713, 0x00120213, 0x00200293,
0xFE5214E3, 0x0F000393, 0x06771063, 0x00C00193, 0x00000213, 0xF00FF0B7, 0x00F08093, 0x00000013,
0x00000013, 0x70F0F713, 0x00120213, 0x00200293, 0xFE5212E3, 0x00F00393, 0x02771863, 0x00D00193,
0x0F007093, 0x00000393, 0x02709063, 0x00E00193, 0x00FF00B7, 0x0FF08093, 0x70F0F013, 0x00000393,
0x00701463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513,
0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-auipc",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00000013, 0x00002517, 0x71C50513, 0x004005EF, 0x40B50533,
0x000023B7, 0x71038393, 0x02751463, 0x00300193, 0xFFFFE517, 0x8FC50513, 0x004005EF, 0x40B50533,
0xFFFFE3B7, 0x8F038393, 0x00751463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193,
0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073,
0x00000000,
},
},
{
name: "rv32ui-beq",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00000093, 0x00000113, 0x00208663, 0x2A301863, 0x00301663,
0xFE208EE3, 0x2A301263, 0x00300193, 0x00100093, 0x00100113, 0x00208663, 0x28301863, 0x00301663,
0xFE208EE3, 0x28301263, 0x00400193, 0xFFF00093, 0xFFF00113, 0x00208663, 0x26301863, 0x00301663,
0xFE208EE3, 0x26301263, 0x00500193, 0x00000093, 0x00100113, 0x00208463, 0x00301463, 0x24301663,
0xFE208EE3, 0x00600193, 0x00100093, 0x00000113, 0x00208463, 0x00301463, 0x22301863, 0xFE208EE3,
0x00700193, 0xFFF00093, 0x00100113, 0x00208463, 0x00301463, 0x20301A63, 0xFE208EE3, 0x00800193,
0x00100093, 0xFFF00113, 0x00208463, 0x00301463, 0x1E301C63, 0xFE208EE3, 0x00900193, 0x00000213,
0x00000093, 0xFFF00113, 0x1E208063, 0x00120213, 0x00200293, 0xFE5216E3, 0x00A00193, 0x00000213,
0x00000093, 0xFFF00113, 0x00000013, 0x1A208E63, 0x00120213, 0x00200293, 0xFE5214E3, 0x00B00193,
0x00000213, 0x00000093, 0xFFF00113, 0x00000013, 0x00000013, 0x18208A63, 0x00120213, 0x00200293,
0xFE5212E3, 0x00C00193, 0x00000213, 0x00000093, 0x00000013, 0xFFF00113, 0x16208863, 0x00120213,
0x00200293, 0xFE5214E3, 0x00D00193, 0x00000213, 0x00000093, 0x00000013, 0xFFF00113, 0x00000013,
0x14208463, 0x00120213, 0x00200293, 0xFE5212E3, 0x00E00193, 0x00000213, 0x00000093, 0x00000013,
0x00000013, 0xFFF00113, 0x12208063, 0x00120213, 0x00200293, 0xFE5212E3, 0x00F00193, 0x00000213,
0x00000093, 0xFFF00113, 0x10208063, 0x00120213, 0x00200293, 0xFE5216E3, 0x01000193, 0x00000213,
0x00000093, 0xFFF00113, 0x00000013, 0x0C208E63, 0x00120213, 0x00200293, 0xFE5214E3, 0x01100193,
0x00000213, 0x00000093, 0xFFF00113, 0x00000013, 0x00000013, 0x0A208A63, 0x00120213, 0x00200293,
0xFE5212E3, 0x01200193, 0x00000213, 0x00000093, 0x00000013, 0xFFF00113, 0x08208863, 0x00120213,
0x00200293, 0xFE5214E3, 0x01300193, 0x00000213, 0x00000093, 0x00000013, 0xFFF00113, 0x00000013,
0x06208463, 0x00120213, 0x00200293, 0xFE5212E3, 0x01400193, 0x00000213, 0x00000093, 0x00000013,
0x00000013, 0xFFF00113, 0x04208063, 0x00120213, 0x00200293, 0xFE5212E3, 0x01500193, 0x00100093,
0x00000A63, 0x00108093, 0x00108093, 0x00108093, 0x00108093, 0x00108093, 0x00108093, 0x00300393,
0x00709463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513,
0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-bge",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00000093, 0x00000113, 0x0020D663, 0x30301863, 0x00301663,
0xFE20DEE3, 0x30301263, 0x00300193, 0x00100093, 0x00100113, 0x0020D663, 0x2E301863, 0x00301663,
0xFE20DEE3, 0x2E301263, 0x00400193, 0xFFF00093, 0xFFF00113, 0x0020D663, 0x2C301863, 0x00301663,
0xFE20DEE3, 0x2C301263, 0x00500193, 0x00100093, 0x00000113, 0x0020D663, 0x2A301863, 0x00301663,
0xFE20DEE3, 0x2A301263, 0x00600193, 0x00100093, 0xFFF00113, 0x0020D663, 0x28301863, 0x00301663,
0xFE20DEE3, 0x28301263, 0x00700193, 0xFFF00093, 0xFFE00113, 0x0020D663, 0x26301863, 0x00301663,
0xFE20DEE3, 0x26301263, 0x00800193, 0x00000093, 0x00100113, 0x0020D463, 0x00301463, 0x24301663,
0xFE20DEE3, 0x00900193, 0xFFF00093, 0x00100113, 0x0020D463, 0x00301463, 0x22301863, 0xFE20DEE3,
0x00A00193, 0xFFE00093, 0xFFF00113, 0x0020D463, 0x00301463, 0x20301A63, 0xFE20DEE3, 0x00B00193,
0xFFE00093, 0x00100113, 0x0020D463, 0x00301463, 0x1E301C63, 0xFE20DEE3, 0x00C00193, 0x00000213,
0xFFF00093, 0x00000113, 0x1E20D063, 0x00120213, 0x00200293, 0xFE5216E3, 0x00D00193, 0x00000213,
0xFFF00093, 0x00000113, 0x00000013, 0x1A20DE63, 0x00120213, 0x00200293, 0xFE5214E3, 0x00E00193,
0x00000213, 0xFFF00093, 0x00000113, 0x00000013, 0x00000013, 0x1820DA63, 0x00120213, 0x00200293,
0xFE5212E3, 0x00F00193, 0x00000213, 0xFFF00093, 0x00000013, 0x00000113, 0x1620D863, 0x00120213,
0x00200293, 0xFE5214E3, 0x01000193, 0x00000213, 0xFFF00093, 0x00000013, 0x00000113, 0x00000013,
0x1420D463, 0x00120213, 0x00200293, 0xFE5212E3, 0x01100193, 0x00000213, 0xFFF00093, 0x00000013,
0x00000013, 0x00000113, 0x1220D063, 0x00120213, 0x00200293, 0xFE5212E3, 0x01200193, 0x00000213,
0xFFF00093, 0x00000113, 0x1020D063, 0x00120213, 0x00200293, 0xFE5216E3, 0x01300193, 0x00000213,
0xFFF00093, 0x00000113, 0x00000013, 0x0C20DE63, 0x00120213, 0x00200293, 0xFE5214E3, 0x01400193,
0x00000213, 0xFFF00093, 0x00000113, 0x00000013, 0x00000013, 0x0A20DA63, 0x00120213, 0x00200293,
0xFE5212E3, 0x01500193, 0x00000213, 0xFFF00093, 0x00000013, 0x00000113, 0x0820D863, 0x00120213,
0x00200293, 0xFE5214E3, 0x01600193, 0x00000213, 0xFFF00093, 0x00000013, 0x00000113, 0x00000013,
0x0620D463, 0x00120213, 0x00200293, 0xFE5212E3, 0x01700193, 0x00000213, 0xFFF00093, 0x00000013,
0x00000013, 0x00000113, 0x0420D063, 0x00120213, 0x00200293, 0xFE5212E3, 0x01800193, 0x00100093,
0x0000DA63, 0x00108093, 0x00108093, 0x00108093, 0x00108093, 0x00108093, 0x00108093, 0x00300393,
0x00709463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513,
0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-bgeu",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00000093, 0x00000113, 0x0020F663, 0x34301263, 0x00301663,
0xFE20FEE3, 0x32301C63, 0x00300193, 0x00100093, 0x00100113, 0x0020F663, 0x32301263, 0x00301663,
0xFE20FEE3, 0x30301C63, 0x00400193, 0xFFF00093, 0xFFF00113, 0x0020F663, 0x30301263, 0x00301663,
0xFE20FEE3, 0x2E301C63, 0x00500193, 0x00100093, 0x00000113, 0x0020F663, 0x2E301263, 0x00301663,
0xFE20FEE3, 0x2C301C63, 0x00600193, 0xFFF00093, 0xFFE00113, 0x0020F663, 0x2C301263, 0x00301663,
0xFE20FEE3, 0x2A301C63, 0x00700193, 0xFFF00093, 0x00000113, 0x0020F663, 0x2A301263, 0x00301663,
0xFE20FEE3, 0x28301C63, 0x00800193, 0x00000093, 0x00100113, 0x0020F463, 0x00301463, 0x28301063,
0xFE20FEE3, 0x00900193, 0xFFE00093, 0xFFF00113, 0x0020F463, 0x00301463, 0x26301263, 0xFE20FEE3,
0x00A00193, 0x00000093, 0xFFF00113, 0x0020F463, 0x00301463, 0x24301463, 0xFE20FEE3, 0x00B00193,
0x800000B7, 0xFFF08093, 0x80000137, 0x0020F463, 0x00301463, 0x22301463, 0xFE20FEE3, 0x00C00193,
0x00000213, 0xF00000B7, 0xFFF08093, 0xF0000137, 0x2020F663, 0x00120213, 0x00200293, 0xFE5214E3,
0x00D00193, 0x00000213, 0xF00000B7, 0xFFF08093, 0xF0000137, 0x00000013, 0x1E20F263, 0x00120213,
0x00200293, 0xFE5212E3, 0x00E00193, 0x00000213, 0xF00000B7, 0xFFF08093, 0xF0000137, 0x00000013,
0x00000013, 0x1A20FC63, 0x00120213, 0x00200293, 0xFE5210E3, 0x00F00193, 0x00000213, 0xF00000B7,
0xFFF08093, 0x00000013, 0xF0000137, 0x1820F863, 0x00120213, 0x00200293, 0xFE5212E3, 0x01000193,
0x00000213, 0xF00000B7, 0xFFF08093, 0x00000013, 0xF0000137, 0x00000013, 0x1620F263, 0x00120213,
0x00200293, 0xFE5210E3, 0x01100193, 0x00000213, 0xF00000B7, 0xFFF08093, 0x00000013, 0x00000013,
0xF0000137, 0x1220FC63, 0x00120213, 0x00200293, 0xFE5210E3, 0x01200193, 0x00000213, 0xF00000B7,
0xFFF08093, 0xF0000137, 0x1020FA63, 0x00120213, 0x00200293, 0xFE5214E3, 0x01300193, 0x00000213,
0xF00000B7, 0xFFF08093, 0xF0000137, 0x00000013, 0x0E20F663, 0x00120213, 0x00200293, 0xFE5212E3,
0x01400193, 0x00000213, 0xF00000B7, 0xFFF08093, 0xF0000137, 0x00000013, 0x00000013, 0x0C20F063,
0x00120213, 0x00200293, 0xFE5210E3, 0x01500193, 0x00000213, 0xF00000B7, 0xFFF08093, 0x00000013,
0xF0000137, 0x0820FC63, 0x00120213, 0x00200293, 0xFE5212E3, 0x01600193, 0x00000213, 0xF00000B7,
0xFFF08093, 0x00000013, 0xF0000137, 0x00000013, 0x0620F663, 0x00120213, 0x00200293, 0xFE5210E3,
0x01700193, 0x00000213, 0xF00000B7, 0xFFF08093, 0x00000013, 0x00000013, 0xF0000137, 0x0420F063,
0x00120213, 0x00200293, 0xFE5210E3, 0x01800193, 0x00100093, 0x0000FA63, 0x00108093, 0x00108093,
0x00108093, 0x00108093, 0x00108093, 0x00108093, 0x00300393, 0x00709463, 0x02301063, 0x0FF0000F,
0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F, 0x00100193,
0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-blt",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00000093, 0x00100113, 0x0020C663, 0x2A301863, 0x00301663,
0xFE20CEE3, 0x2A301263, 0x00300193, 0xFFF00093, 0x00100113, 0x0020C663, 0x28301863, 0x00301663,
0xFE20CEE3, 0x28301263, 0x00400193, 0xFFE00093, 0xFFF00113, 0x0020C663, 0x26301863, 0x00301663,
0xFE20CEE3, 0x26301263, 0x00500193, 0x00100093, 0x00000113, 0x0020C463, 0x00301463, 0x24301663,
0xFE20CEE3, 0x00600193, 0x00100093, 0xFFF00113, 0x0020C463, 0x00301463, 0x22301863, 0xFE20CEE3,
0x00700193, 0xFFF00093, 0xFFE00113, 0x0020C463, 0x00301463, 0x20301A63, 0xFE20CEE3, 0x00800193,
0x00100093, 0xFFE00113, 0x0020C463, 0x00301463, 0x1E301C63, 0xFE20CEE3, 0x00900193, 0x00000213,
0x00000093, 0xFFF00113, 0x1E20C063, 0x00120213, 0x00200293, 0xFE5216E3, 0x00A00193, 0x00000213,
0x00000093, 0xFFF00113, 0x00000013, 0x1A20CE63, 0x00120213, 0x00200293, 0xFE5214E3, 0x00B00193,
0x00000213, 0x00000093, 0xFFF00113, 0x00000013, 0x00000013, 0x1820CA63, 0x00120213, 0x00200293,
0xFE5212E3, 0x00C00193, 0x00000213, 0x00000093, 0x00000013, 0xFFF00113, 0x1620C863, 0x00120213,
0x00200293, 0xFE5214E3, 0x00D00193, 0x00000213, 0x00000093, 0x00000013, 0xFFF00113, 0x00000013,
0x1420C463, 0x00120213, 0x00200293, 0xFE5212E3, 0x00E00193, 0x00000213, 0x00000093, 0x00000013,
0x00000013, 0xFFF00113, 0x1220C063, 0x00120213, 0x00200293, 0xFE5212E3, 0x00F00193, 0x00000213,
0x00000093, 0xFFF00113, 0x1020C063, 0x00120213, 0x00200293, 0xFE5216E3, 0x01000193, 0x00000213,
0x00000093, 0xFFF00113, 0x00000013, 0x0C20CE63, 0x00120213, 0x00200293, 0xFE5214E3, 0x01100193,
0x00000213, 0x00000093, 0xFFF00113, 0x00000013, 0x00000013, 0x0A20CA63, 0x00120213, 0x00200293,
0xFE5212E3, 0x01200193, 0x00000213, 0x00000093, 0x00000013, 0xFFF00113, 0x0820C863, 0x00120213,
0x00200293, 0xFE5214E3, 0x01300193, 0x00000213, 0x00000093, 0x00000013, 0xFFF00113, 0x00000013,
0x0620C463, 0x00120213, 0x00200293, 0xFE5212E3, 0x01400193, 0x00000213, 0x00000093, 0x00000013,
0x00000013, 0xFFF00113, 0x0420C063, 0x00120213, 0x00200293, 0xFE5212E3, 0x01500193, 0x00100093,
0x00104A63, 0x00108093, 0x00108093, 0x00108093, 0x00108093, 0x00108093, 0x00108093, 0x00300393,
0x00709463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513,
0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-bltu",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00000093, 0x00100113, 0x0020E663, 0x2E301263, 0x00301663,
0xFE20EEE3, 0x2C301C63, 0x00300193, 0xFFE00093, 0xFFF00113, 0x0020E663, 0x2C301263, 0x00301663,
0xFE20EEE3, 0x2A301C63, 0x00400193, 0x00000093, 0xFFF00113, 0x0020E663, 0x2A301263, 0x00301663,
0xFE20EEE3, 0x28301C63, 0x00500193, 0x00100093, 0x00000113, 0x0020E463, 0x00301463, 0x28301063,
0xFE20EEE3, 0x00600193, 0xFFF00093, 0xFFE00113, 0x0020E463, 0x00301463, 0x26301263, 0xFE20EEE3,
0x00700193, 0xFFF00093, 0x00000113, 0x0020E463, 0x00301463, 0x24301463, 0xFE20EEE3, 0x00800193,
0x800000B7, 0x80000137, 0xFFF10113, 0x0020E463, 0x00301463, 0x22301463, 0xFE20EEE3, 0x00900193,
0x00000213, 0xF00000B7, 0xF0000137, 0xFFF10113, 0x2020E663, 0x00120213, 0x00200293, 0xFE5214E3,
0x00A00193, 0x00000213, 0xF00000B7, 0xF0000137, 0xFFF10113, 0x00000013, 0x1E20E263, 0x00120213,
0x00200293, 0xFE5212E3, 0x00B00193, 0x00000213, 0xF00000B7, 0xF0000137, 0xFFF10113, 0x00000013,
0x00000013, 0x1A20EC63, 0x00120213, 0x00200293, 0xFE5210E3, 0x00C00193, 0x00000213, 0xF00000B7,
0x00000013, 0xF0000137, 0xFFF10113, 0x1820E863, 0x00120213, 0x00200293, 0xFE5212E3, 0x00D00193,
0x00000213, 0xF00000B7, 0x00000013, 0xF0000137, 0xFFF10113, 0x00000013, 0x1620E263, 0x00120213,
0x00200293, 0xFE5210E3, 0x00E00193, 0x00000213, 0xF00000B7, 0x00000013, 0x00000013, 0xF0000137,
0xFFF10113, 0x1220EC63, 0x00120213, 0x00200293, 0xFE5210E3, 0x00F00193, 0x00000213, 0xF00000B7,
0xF0000137, 0xFFF10113, 0x1020EA63, 0x00120213, 0x00200293, 0xFE5214E3, 0x01000193, 0x00000213,
0xF00000B7, 0xF0000137, 0xFFF10113, 0x00000013, 0x0E20E663, 0x00120213, 0x00200293, 0xFE5212E3,
0x01100193, 0x00000213, 0xF00000B7, 0xF0000137, 0xFFF10113, 0x00000013, 0x00000013, 0x0C20E063,
0x00120213, 0x00200293, 0xFE5210E3, 0x01200193, 0x00000213, 0xF00000B7, 0x00000013, 0xF0000137,
0xFFF10113, 0x0820EC63, 0x00120213, 0x00200293, 0xFE5212E3, 0x01300193, 0x00000213, 0xF00000B7,
0x00000013, 0xF0000137, 0xFFF10113, 0x00000013, 0x0620E663, 0x00120213, 0x00200293, 0xFE5210E3,
0x01400193, 0x00000213, 0xF00000B7, 0x00000013, 0x00000013, 0xF0000137, 0xFFF10113, 0x0420E063,
0x00120213, 0x00200293, 0xFE5210E3, 0x01500193, 0x00100093, 0x00106A63, 0x00108093, 0x00108093,
0x00108093, 0x00108093, 0x00108093, 0x00108093, 0x00300393, 0x00709463, 0x02301063, 0x0FF0000F,
0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F, 0x00100193,
0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-bne",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00000093, 0x00100113, 0x00209663, 0x2A301A63, 0x00301663,
0xFE209EE3, 0x2A301463, 0x00300193, 0x00100093, 0x00000113, 0x00209663, 0x28301A63, 0x00301663,
0xFE209EE3, 0x28301463, 0x00400193, 0xFFF00093, 0x00100113, 0x00209663, 0x26301A63, 0x00301663,
0xFE209EE3, 0x26301463, 0x00500193, 0x00100093, 0xFFF00113, 0x00209663, 0x24301A63, 0x00301663,
0xFE209EE3, 0x24301463, 0x00600193, 0x00000093, 0x00000113, 0x00209463, 0x00301463, 0x22301863,
0xFE209EE3, 0x00700193, 0x00100093, 0x00100113, 0x00209463, 0x00301463, 0x20301A63, 0xFE209EE3,
0x00800193, 0xFFF00093, 0xFFF00113, 0x00209463, 0x00301463, 0x1E301C63, 0xFE209EE3, 0x00900193,
0x00000213, 0x00000093, 0x00000113, 0x1E209063, 0x00120213, 0x00200293, 0xFE5216E3, 0x00A00193,
0x00000213, 0x00000093, 0x00000113, 0x00000013, 0x1A209E63, 0x00120213, 0x00200293, 0xFE5214E3,
0x00B00193, 0x00000213, 0x00000093, 0x00000113, 0x00000013, 0x00000013, 0x18209A63, 0x00120213,
0x00200293, 0xFE5212E3, 0x00C00193, 0x00000213, 0x00000093, 0x00000013, 0x00000113, 0x16209863,
0x00120213, 0x00200293, 0xFE5214E3, 0x00D00193, 0x00000213, 0x00000093, 0x00000013, 0x00000113,
0x00000013, 0x14209463, 0x00120213, 0x00200293, 0xFE5212E3, 0x00E00193, 0x00000213, 0x00000093,
0x00000013, 0x00000013, 0x00000113, 0x12209063, 0x00120213, 0x00200293, 0xFE5212E3, 0x00F00193,
0x00000213, 0x00000093, 0x00000113, 0x10209063, 0x00120213, 0x00200293, 0xFE5216E3, 0x01000193,
0x00000213, 0x00000093, 0x00000113, 0x00000013, 0x0C209E63, 0x00120213, 0x00200293, 0xFE5214E3,
0x01100193, 0x00000213, 0x00000093, 0x00000113, 0x00000013, 0x00000013, 0x0A209A63, 0x00120213,
0x00200293, 0xFE5212E3, 0x01200193, 0x00000213, 0x00000093, 0x00000013, 0x00000113, 0x08209863,
0x00120213, 0x00200293, 0xFE5214E3, 0x01300193, 0x00000213, 0x00000093, 0x00000013, 0x00000113,
0x00000013, 0x06209463, 0x00120213, 0x00200293, 0xFE5212E3, 0x01400193, 0x00000213, 0x00000093,
0x00000013, 0x00000013, 0x00000113, 0x04209063, 0x00120213, 0x00200293, 0xFE5212E3, 0x01500193,
0x00100093, 0x00009A63, 0x00108093, 0x00108093, 0x00108093, 0x00108093, 0x00108093, 0x00108093,
0x00300393, 0x00709463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893,
0x00018513, 0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-fence_i",
text: []uint32{
0x00000193, 0x0040006F, 0x06F00693, 0x0003F517, 0xFF451503, 0x0003F597, 0xFEE59583, 0x00000013,
0x00000013, 0x00000013, 0x00000013, 0x00000013, 0x00000013, 0x00000013, 0x00000013, 0x00000013,
0x0003F297, 0xFCA29223, 0x0003F297, 0xFAB29F23, 0x0000100F, 0x0003F797, 0xFB078793, 0x00078367,
0x00200193, 0x00000013, 0x1BC00393, 0x06769A63, 0x06400713, 0xFFF70713, 0xFE071EE3, 0x0003F297,
0xF8A29823, 0x0003F297, 0xF8B29523, 0x0000100F, 0x00000013, 0x00000013, 0x00000013, 0x00000013,
0x00000013, 0x00000013, 0x00000013, 0x00000013, 0x00000013, 0x00000013, 0x00000013, 0x00000013,
0x0003F797, 0xF4C78793, 0x00078367, 0x00300193, 0x00000013, 0x30900393, 0x00769463, 0x02301063,
0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F,
0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
data: []uint32{
0x14D68693, 0x0DE68693, 0x000307E7, 0x22B68693, 0x000307E7, 0x00000000, 0x00000000, 0x00000000,
},
},
{
name: "rv32ui-jal",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00000093, 0x0100026F, 0x00000013, 0x00000013, 0x0400006F,
0x00000117, 0xFF410113, 0x02411A63, 0x00300193, 0x00100093, 0x0140006F, 0x00108093, 0x00108093,
0x00108093, 0x00108093, 0x00108093, 0x00108093, 0x00300393, 0x00709463, 0x02301063, 0x0FF0000F,
0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F, 0x00100193,
0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-jalr",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00000293, 0x00000317, 0x01030313, 0x000302E7, 0x0E00006F,
0x00000317, 0xFFC30313, 0x0C629A63, 0x00300193, 0x00000297, 0x01028293, 0x000282E7, 0x0C00006F,
0x00000317, 0xFFC30313, 0x0A629A63, 0x00400193, 0x00000213, 0x00000317, 0x01030313, 0x000306E7,
0x08301E63, 0x00120213, 0x00200293, 0xFE5214E3, 0x00500193, 0x00000213, 0x00000317, 0x01430313,
0x00000013, 0x000306E7, 0x06301A63, 0x00120213, 0x00200293, 0xFE5212E3, 0x00600193, 0x00000213,
0x00000317, 0x01830313, 0x00000013, 0x00000013, 0x000306E7, 0x04301463, 0x00120213, 0x00200293,
0xFE5210E3, 0x00700193, 0x00100293, 0x00000317, 0x01C30313, 0xFFC30067, 0x00128293, 0x00128293,
0x00128293, 0x00128293, 0x00128293, 0x00128293, 0x00400393, 0x00729463, 0x02301063, 0x0FF0000F,
0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F, 0x00100193,
0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-lb",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0xFFF00793, 0x0003F117, 0xFF010113, 0x00010703, 0xFFF00393,
0x24771A63, 0x00300193, 0x00000793, 0x0003F117, 0xFD410113, 0x00110703, 0x00000393, 0x22771C63,
0x00400193, 0xFF000793, 0x0003F117, 0xFB810113, 0x00210703, 0xFF000393, 0x20771E63, 0x00500193,
0x00F00793, 0x0003F117, 0xF9C10113, 0x00310703, 0x00F00393, 0x20771063, 0x00600193, 0xFFF00793,
0x0003F117, 0xF8310113, 0xFFD10703, 0xFFF00393, 0x1E771263, 0x00700193, 0x00000793, 0x0003F117,
0xF6710113, 0xFFE10703, 0x00000393, 0x1C771463, 0x00800193, 0xFF000793, 0x0003F117, 0xF4B10113,
0xFFF10703, 0xFF000393, 0x1A771663, 0x00900193, 0x00F00793, 0x0003F117, 0xF2F10113, 0x00010703,
0x00F00393, 0x18771863, 0x00A00193, 0x0003F097, 0xF1408093, 0xFE008093, 0x02008283, 0xFFF00393,
0x16729A63, 0x00B00193, 0x0003F097, 0xEF808093, 0xFFA08093, 0x00708283, 0x00000393, 0x14729C63,
0x00C00193, 0x00000213, 0x0003F697, 0xED968693, 0x00168703, 0x00070313, 0xFF000393, 0x12731C63,
0x00120213, 0x00200293, 0xFE5210E3, 0x00D00193, 0x00000213, 0x0003F697, 0xEAE68693, 0x00168703,
0x00000013, 0x00070313, 0x00F00393, 0x10731463, 0x00120213, 0x00200293, 0xFC521EE3, 0x00E00193,
0x00000213, 0x0003F697, 0xE7C68693, 0x00168703, 0x00000013, 0x00000013, 0x00070313, 0x00000393,
0x0C731A63, 0x00120213, 0x00200293, 0xFC521CE3, 0x00F00193, 0x00000213, 0x0003F697, 0xE4968693,
0x00168703, 0xFF000393, 0x0A771663, 0x00120213, 0x00200293, 0xFE5212E3, 0x01000193, 0x00000213,
0x0003F697, 0xE2268693, 0x00000013, 0x00168703, 0x00F00393, 0x08771063, 0x00120213, 0x00200293,
0xFE5210E3, 0x01100193, 0x00000213, 0x0003F697, 0xDF468693, 0x00000013, 0x00000013, 0x00168703,
0x00000393, 0x04771863, 0x00120213, 0x00200293, 0xFC521EE3, 0x01200193, 0x0003F297, 0xDC828293,
0x00028103, 0x00200113, 0x00200393, 0x02711463, 0x01300193, 0x0003F297, 0xDAC28293, 0x00028103,
0x00000013, 0x00200113, 0x00200393, 0x00711463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193,
0x0011E193, 0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513,
0x00000073, 0x00000000,
},
data: []uint32{
0x0FF000FF, 0x00000000, 0x00000000, 0x00000000,
},
},
{
name: "rv32ui-lbu",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x0FF00793, 0x0003F117, 0xFF010113, 0x00014703, 0x0FF00393,
0x24771A63, 0x00300193, 0x00000793, 0x0003F117, 0xFD410113, 0x00114703, 0x00000393, 0x22771C63,
0x00400193, 0x0F000793, 0x0003F117, 0xFB810113, 0x00214703, 0x0F000393, 0x20771E63, 0x00500193,
0x00F00793, 0x0003F117, 0xF9C10113, 0x00314703, 0x00F00393, 0x20771063, 0x00600193, 0x0FF00793,
0x0003F117, 0xF8310113, 0xFFD14703, 0x0FF00393, 0x1E771263, 0x00700193, 0x00000793, 0x0003F117,
0xF6710113, 0xFFE14703, 0x00000393, 0x1C771463, 0x00800193, 0x0F000793, 0x0003F117, 0xF4B10113,
0xFFF14703, 0x0F000393, 0x1A771663, 0x00900193, 0x00F00793, 0x0003F117, 0xF2F10113, 0x00014703,
0x00F00393, 0x18771863, 0x00A00193, 0x0003F097, 0xF1408093, 0xFE008093, 0x0200C283, 0x0FF00393,
0x16729A63, 0x00B00193, 0x0003F097, 0xEF808093, 0xFFA08093, 0x0070C283, 0x00000393, 0x14729C63,
0x00C00193, 0x00000213, 0x0003F697, 0xED968693, 0x0016C703, 0x00070313, 0x0F000393, 0x12731C63,
0x00120213, 0x00200293, 0xFE5210E3, 0x00D00193, 0x00000213, 0x0003F697, 0xEAE68693, 0x0016C703,
0x00000013, 0x00070313, 0x00F00393, 0x10731463, 0x00120213, 0x00200293, 0xFC521EE3, 0x00E00193,
0x00000213, 0x0003F697, 0xE7C68693, 0x0016C703, 0x00000013, 0x00000013, 0x00070313, 0x00000393,
0x0C731A63, 0x00120213, 0x00200293, 0xFC521CE3, 0x00F00193, 0x00000213, 0x0003F697, 0xE4968693,
0x0016C703, 0x0F000393, 0x0A771663, 0x00120213, 0x00200293, 0xFE5212E3, 0x01000193, 0x00000213,
0x0003F697, 0xE2268693, 0x00000013, 0x0016C703, 0x00F00393, 0x08771063, 0x00120213, 0x00200293,
0xFE5210E3, 0x01100193, 0x00000213, 0x0003F697, 0xDF468693, 0x00000013, 0x00000013, 0x0016C703,
0x00000393, 0x04771863, 0x00120213, 0x00200293, 0xFC521EE3, 0x01200193, 0x0003F297, 0xDC828293,
0x0002C103, 0x00200113, 0x00200393, 0x02711463, 0x01300193, 0x0003F297, 0xDAC28293, 0x0002C103,
0x00000013, 0x00200113, 0x00200393, 0x00711463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193,
0x0011E193, 0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513,
0x00000073, 0x00000000,
},
data: []uint32{
0x0FF000FF, 0x00000000, 0x00000000, 0x00000000,
},
},
{
name: "rv32ui-ld_st",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x0003F117, 0xFF410113, 0xFDD00093, 0x00110023, 0x00010703,
0x00E10023, 0x00010103, 0xFDD00393, 0x647112E3, 0x0003F117, 0xFD010113, 0x00212423, 0x00812203,
0x00120023, 0x622216E3, 0x00020703, 0x627712E3, 0x00300193, 0x0003F117, 0xFAC10113, 0xFCD00093,
0x001100A3, 0x00110703, 0x00E100A3, 0x00110103, 0xFCD00393, 0x5E711EE3, 0x0003F117, 0xF8810113,
0x00212423, 0x00812203, 0x001200A3, 0x5E2212E3, 0x00120703, 0x5C771EE3, 0x00400193, 0x0003F117,
0xF6410113, 0xFCC00093, 0x00110123, 0x00210703, 0x00E10123, 0x00210103, 0xFCC00393, 0x5A711AE3,
0x0003F117, 0xF4010113, 0x00212423, 0x00812203, 0x00120123, 0x58221EE3, 0x00220703, 0x58771AE3,
0x00500193, 0x0003F117, 0xF1C10113, 0xFBC00093, 0x001101A3, 0x00310703, 0x00E101A3, 0x00310103,
0xFBC00393, 0x567116E3, 0x0003F117, 0xEF810113, 0x00212423, 0x00812203, 0x001201A3, 0x54221AE3,
0x00320703, 0x547716E3, 0x00600193, 0x0003F117, 0xED410113, 0xFBB00093, 0x00110223, 0x00410703,
0x00E10223, 0x00410103, 0xFBB00393, 0x527112E3, 0x0003F117, 0xEB010113, 0x00212423, 0x00812203,
0x00120223, 0x502216E3, 0x00420703, 0x507712E3, 0x00700193, 0x0003F117, 0xE8C10113, 0xFAB00093,
0x001102A3, 0x00510703, 0x00E102A3, 0x00510103, 0xFAB00393, 0x4C711EE3, 0x0003F117, 0xE6810113,
0x00212423, 0x00812203, 0x001202A3, 0x4C2212E3, 0x00520703, 0x4A771EE3, 0x00800193, 0x0003F117,
0xE4410113, 0x03300093, 0x00110023, 0x00010703, 0x00E10023, 0x00010103, 0x03300393, 0x48711AE3,
0x0003F117, 0xE2010113, 0x00212423, 0x00812203, 0x00120023, 0x46221EE3, 0x00020703, 0x46771AE3,
0x00900193, 0x0003F117, 0xDFC10113, 0x02300093, 0x001100A3, 0x00110703, 0x00E100A3, 0x00110103,
0x02300393, 0x447116E3, 0x0003F117, 0xDD810113, 0x00212423, 0x00812203, 0x001200A3, 0x42221AE3,
0x00120703, 0x427716E3, 0x00A00193, 0x0003F117, 0xDB410113, 0x02200093, 0x00110123, 0x00210703,
0x00E10123, 0x00210103, 0x02200393, 0x407112E3, 0x0003F117, 0xD9010113, 0x00212423, 0x00812203,
0x00120123, 0x3E2216E3, 0x00220703, 0x3E7712E3, 0x00B00193, 0x0003F117, 0xD6C10113, 0x01200093,
0x001101A3, 0x00310703, 0x00E101A3, 0x00310103, 0x01200393, 0x3A711EE3, 0x0003F117, 0xD4810113,
0x00212423, 0x00812203, 0x001201A3, 0x3A2212E3, 0x00320703, 0x38771EE3, 0x00C00193, 0x0003F117,
0xD2410113, 0x01100093, 0x00110223, 0x00410703, 0x00E10223, 0x00410103, 0x01100393, 0x36711AE3,
0x0003F117, 0xD0010113, 0x00212423, 0x00812203, 0x00120223, 0x34221EE3, 0x00420703, 0x34771AE3,
0x00D00193, 0x0003F117, 0xCDC10113, 0x00100093, 0x001102A3, 0x00510703, 0x00E102A3, 0x00510103,
0x00100393, 0x327116E3, 0x0003F117, 0xCB810113, 0x00212423, 0x00812203, 0x001202A3, 0x30221AE3,
0x00520703, 0x307716E3, 0x00E00193, 0x0003F117, 0xC9410113, 0x03300093, 0x00110023, 0x00014703,
0x00E10023, 0x00014103, 0x03300393, 0x2E7112E3, 0x0003F117, 0xC7010113, 0x00212423, 0x00812203,
0x00120023, 0x2C2216E3, 0x00024703, 0x2C7712E3, 0x00F00193, 0x0003F117, 0xC4C10113, 0x02300093,
0x001100A3, 0x00114703, 0x00E100A3, 0x00114103, 0x02300393, 0x28711EE3, 0x0003F117, 0xC2810113,
0x00212423, 0x00812203, 0x001200A3, 0x282212E3, 0x00124703, 0x26771EE3, 0x01000193, 0x0003F117,
0xC0410113, 0x02200093, 0x00110123, 0x00214703, 0x00E10123, 0x00214103, 0x02200393, 0x24711AE3,
0x0003F117, 0xBE010113, 0x00212423, 0x00812203, 0x00120123, 0x22221EE3, 0x00224703, 0x22771AE3,
0x01100193, 0x0003F117, 0xBBC10113, 0x01200093, 0x001101A3, 0x00314703, 0x00E101A3, 0x00314103,
0x01200393, 0x207116E3, 0x0003F117, 0xB9810113, 0x00212423, 0x00812203, 0x001201A3, 0x1E221AE3,
0x00324703, 0x1E7716E3, 0x01200193, 0x0003F117, 0xB7410113, 0x01100093, 0x00110223, 0x00414703,
0x00E10223, 0x00414103, 0x01100393, 0x1C7112E3, 0x0003F117, 0xB5010113, 0x00212423, 0x00812203,
0x00120223, 0x1A2216E3, 0x00424703, 0x1A7712E3, 0x01300193, 0x0003F117, 0xB2C10113, 0x00100093,
0x001102A3, 0x00514703, 0x00E102A3, 0x00514103, 0x00100393, 0x16711EE3, 0x0003F117, 0xB0810113,
0x00212423, 0x00812203, 0x001202A3, 0x162212E3, 0x00524703, 0x14771EE3, 0x01400193, 0x0003F117,
0xAE410113, 0xAABBD0B7, 0xCDD08093, 0x00112023, 0x00012703, 0x00E12023, 0x00012103, 0xAABBD3B7,
0xCDD38393, 0x127116E3, 0x0003F117, 0xAB810113, 0x00212423, 0x00812203, 0x00122023, 0x10221AE3,
0x00022703, 0x107716E3, 0x01500193, 0x0003F117, 0xA9410113, 0xDAABC0B7, 0xCCD08093, 0x00112223,
0x00412703, 0x00E12223, 0x00412103, 0xDAABC3B7, 0xCCD38393, 0x0C711EE3, 0x0003F117, 0xA6810113,
0x00212423, 0x00812203, 0x00122223, 0x0C2212E3, 0x00422703, 0x0A771EE3, 0x01600193, 0x0003F117,
0xA4410113, 0xDDAAC0B7, 0xBCC08093, 0x00112423, 0x00812703, 0x00E12423, 0x00812103, 0xDDAAC3B7,
0xBCC38393, 0x087116E3, 0x0003F117, 0xA1810113, 0x00212423, 0x00812203, 0x00122423, 0x06221AE3,
0x00822703, 0x067716E3, 0x01700193, 0x0003F117, 0x9F410113, 0xCDDAB0B7, 0xBBC08093, 0x00112623,
0x00C12703, 0x00E12623, 0x00C12103, 0xCDDAB3B7, 0xBBC38393, 0x02711EE3, 0x0003F117, 0x9C810113,
0x00212423, 0x00812203, 0x00122623, 0x022212E3, 0x00C22703, 0x00771EE3, 0x01800193, 0x0003F117,
0x9A410113, 0xCCDDB0B7, 0xABB08093, 0x00112823, 0x01012703, 0x00E12823, 0x01012103, 0xCCDDB3B7,
0xABB38393, 0x7E711663, 0x0003F117, 0x97810113, 0x00212423, 0x00812203, 0x00122823, 0x7C221A63,
0x01022703, 0x7C771663, 0x01900193, 0x0003F117, 0x95410113, 0xBCCDE0B7, 0xAAB08093, 0x00112A23,
0x01412703, 0x00E12A23, 0x01412103, 0xBCCDE3B7, 0xAAB38393, 0x78711E63, 0x0003F117, 0x92810113,
0x00212423, 0x00812203, 0x00122A23, 0x78221263, 0x01422703, 0x76771E63, 0x01A00193, 0x0003F117,
0x90410113, 0x001120B7, 0x23308093, 0x00112023, 0x00012703, 0x00E12023, 0x00012103, 0x001123B7,
0x23338393, 0x74711663, 0x0003F117, 0x8D810113, 0x00212423, 0x00812203, 0x00122023, 0x72221A63,
0x00022703, 0x72771663, 0x01B00193, 0x0003F117, 0x8B410113, 0x300110B7, 0x22308093, 0x00112223,
0x00412703, 0x00E12223, 0x00412103, 0x300113B7, 0x22338393, 0x6E711E63, 0x0003F117, 0x88810113,
0x00212423, 0x00812203, 0x00122223, 0x6E221263, 0x00422703, 0x6C771E63, 0x01C00193, 0x0003F117,
0x86410113, 0x330010B7, 0x12208093, 0x00112423, 0x00812703, 0x00E12423, 0x00812103, 0x330013B7,
0x12238393, 0x6A711663, 0x0003F117, 0x83810113, 0x00212423, 0x00812203, 0x00122423, 0x68221A63,
0x00822703, 0x68771663, 0x01D00193, 0x0003F117, 0x81410113, 0x233000B7, 0x11208093, 0x00112623,
0x00C12703, 0x00E12623, 0x00C12103, 0x233003B7, 0x11238393, 0x64711E63, 0x0003E117, 0x7E810113,
0x00212423, 0x00812203, 0x00122623, 0x64221263, 0x00C22703, 0x62771E63, 0x01E00193, 0x0003E117,
0x7C410113, 0x223300B7, 0x01108093, 0x00112823, 0x01012703, 0x00E12823, 0x01012103, 0x223303B7,
0x01138393, 0x60711663, 0x0003E117, 0x79810113, 0x00212423, 0x00812203, 0x00122823, 0x5E221A63,
0x01022703, 0x5E771663, 0x01F00193, 0x0003E117, 0x77410113, 0x122330B7, 0x00108093, 0x00112A23,
0x01412703, 0x00E12A23, 0x01412103, 0x122333B7, 0x00138393, 0x5A711E63, 0x0003E117, 0x74810113,
0x00212423, 0x00812203, 0x00122A23, 0x5A221263, 0x01422703, 0x58771E63, 0x02000193, 0x0003E117,
0x72410113, 0xFFFFD0B7, 0xCDD08093, 0x00111023, 0x00011703, 0x00E11023, 0x00011103, 0xFFFFD3B7,
0xCDD38393, 0x56711663, 0x0003E117, 0x6F810113, 0x00212423, 0x00812203, 0x00121023, 0x54221A63,
0x00021703, 0x54771663, 0x02100193, 0x0003E117, 0x6D410113, 0xFFFFC0B7, 0xCCD08093, 0x00111123,
0x00211703, 0x00E11123, 0x00211103, 0xFFFFC3B7, 0xCCD38393, 0x50711E63, 0x0003E117, 0x6A810113,
0x00212423, 0x00812203, 0x00121123, 0x50221263, 0x00221703, 0x4E771E63, 0x02200193, 0x0003E117,
0x68410113, 0xFFFFC0B7, 0xBCC08093, 0x00111223, 0x00411703, 0x00E11223, 0x00411103, 0xFFFFC3B7,
0xBCC38393, 0x4C711663, 0x0003E117, 0x65810113, 0x00212423, 0x00812203, 0x00121223, 0x4A221A63,
0x00421703, 0x4A771663, 0x02300193, 0x0003E117, 0x63410113, 0xFFFFB0B7, 0xBBC08093, 0x00111323,
0x00611703, 0x00E11323, 0x00611103, 0xFFFFB3B7, 0xBBC38393, 0x46711E63, 0x0003E117, 0x60810113,
0x00212423, 0x00812203, 0x00121323, 0x46221263, 0x00621703, 0x44771E63, 0x02400193, 0x0003E117,
0x5E410113, 0xFFFFB0B7, 0xABB08093, 0x00111423, 0x00811703, 0x00E11423, 0x00811103, 0xFFFFB3B7,
0xABB38393, 0x42711663, 0x0003E117, 0x5B810113, 0x00212423, 0x00812203, 0x00121423, 0x40221A63,
0x00821703, 0x40771663, 0x02500193, 0x0003E117, 0x59410113, 0xFFFFE0B7, 0xAAB08093, 0x00111523,
0x00A11703, 0x00E11523, 0x00A11103, 0xFFFFE3B7, 0xAAB38393, 0x3C711E63, 0x0003E117, 0x56810113,
0x00212423, 0x00812203, 0x00121523, 0x3C221263, 0x00A21703, 0x3A771E63, 0x02600193, 0x0003E117,
0x54410113, 0x000020B7, 0x23308093, 0x00111023, 0x00011703, 0x00E11023, 0x00011103, 0x000023B7,
0x23338393, 0x38711663, 0x0003E117, 0x51810113, 0x00212423, 0x00812203, 0x00121023, 0x36221A63,
0x00021703, 0x36771663, 0x02700193, 0x0003E117, 0x4F410113, 0x000010B7, 0x22308093, 0x00111123,
0x00211703, 0x00E11123, 0x00211103, 0x000013B7, 0x22338393, 0x32711E63, 0x0003E117, 0x4C810113,
0x00212423, 0x00812203, 0x00121123, 0x32221263, 0x00221703, 0x30771E63, 0x02800193, 0x0003E117,
0x4A410113, 0x000010B7, 0x12208093, 0x00111223, 0x00411703, 0x00E11223, 0x00411103, 0x000013B7,
0x12238393, 0x2E711663, 0x0003E117, 0x47810113, 0x00212423, 0x00812203, 0x00121223, 0x2C221A63,
0x00421703, 0x2C771663, 0x02900193, 0x0003E117, 0x45410113, 0x11200093, 0x00111323, 0x00611703,
0x00E11323, 0x00611103, 0x11200393, 0x2A711263, 0x0003E117, 0x43010113, 0x00212423, 0x00812203,
0x00121323, 0x28221663, 0x00621703, 0x28771263, 0x02A00193, 0x0003E117, 0x40C10113, 0x01100093,
0x00111423, 0x00811703, 0x00E11423, 0x00811103, 0x01100393, 0x24711E63, 0x0003E117, 0x3E810113,
0x00212423, 0x00812203, 0x00121423, 0x24221263, 0x00821703, 0x22771E63, 0x02B00193, 0x0003E117,
0x3C410113, 0x000030B7, 0x00108093, 0x00111523, 0x00A11703, 0x00E11523, 0x00A11103, 0x000033B7,
0x00138393, 0x20711663, 0x0003E117, 0x39810113, 0x00212423, 0x00812203, 0x00121523, 0x1E221A63,
0x00A21703, 0x1E771663, 0x02C00193, 0x0003E117, 0x37410113, 0x000020B7, 0x23308093, 0x00111023,
0x00015703, 0x00E11023, 0x00015103, 0x000023B7, 0x23338393, 0x1A711E63, 0x0003E117, 0x34810113,
0x00212423, 0x00812203, 0x00121023, 0x1A221263, 0x00025703, 0x18771E63, 0x02D00193, 0x0003E117,
0x32410113, 0x000010B7, 0x22308093, 0x00111123, 0x00215703, 0x00E11123, 0x00215103, 0x000013B7,
0x22338393, 0x16711663, 0x0003E117, 0x2F810113, 0x00212423, 0x00812203, 0x00121123, 0x14221A63,
0x00225703, 0x14771663, 0x02E00193, 0x0003E117, 0x2D410113, 0x000010B7, 0x12208093, 0x00111223,
0x00415703, 0x00E11223, 0x00415103, 0x000013B7, 0x12238393, 0x10711E63, 0x0003E117, 0x2A810113,
0x00212423, 0x00812203, 0x00121223, 0x10221263, 0x00425703, 0x0E771E63, 0x02F00193, 0x0003E117,
0x28410113, 0x11200093, 0x00111323, 0x00615703, 0x00E11323, 0x00615103, 0x11200393, 0x0C711A63,
0x0003E117, 0x26010113, 0x00212423, 0x00812203, 0x00121323, 0x0A221E63, 0x00625703, 0x0A771A63,
0x03000193, 0x0003E117, 0x23C10113, 0x01100093, 0x00111423, 0x00815703, 0x00E11423, 0x00815103,
0x01100393, 0x08711663, 0x0003E117, 0x21810113, 0x00212423, 0x00812203, 0x00121423, 0x06221A63,
0x00825703, 0x06771663, 0x03100193, 0x0003E117, 0x1F410113, 0x000030B7, 0x00108093, 0x00111523,
0x00A15703, 0x00E11523, 0x00A15103, 0x000033B7, 0x00138393, 0x02711E63, 0x0003E117, 0x1C810113,
0x00212423, 0x00812203, 0x00121523, 0x02221263, 0x00A25703, 0x00771E63, 0x0EF00513, 0x0003E597,
0x1A458593, 0x00A581A3, 0x00358603, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193,
0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073,
0x00000000,
},
data: []uint32{
0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF,
0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF,
0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF,
},
},
{
name: "rv32ui-lh",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x0FF00793, 0x0003F117, 0xFF010113, 0x00011703, 0x0FF00393,
0x28771263, 0x00300193, 0xF0000793, 0x0003F117, 0xFD410113, 0x00211703, 0xF0000393, 0x26771463,
0x00400193, 0x000017B7, 0xFF078793, 0x0003F117, 0xFB410113, 0x00411703, 0x000013B7, 0xFF038393,
0x24771263, 0x00500193, 0xFFFFF7B7, 0x00F78793, 0x0003F117, 0xF9010113, 0x00611703, 0xFFFFF3B7,
0x00F38393, 0x22771063, 0x00600193, 0x0FF00793, 0x0003F117, 0xF7610113, 0xFFA11703, 0x0FF00393,
0x20771263, 0x00700193, 0xF0000793, 0x0003F117, 0xF5A10113, 0xFFC11703, 0xF0000393, 0x1E771463,
0x00800193, 0x000017B7, 0xFF078793, 0x0003F117, 0xF3A10113, 0xFFE11703, 0x000013B7, 0xFF038393,
0x1C771263, 0x00900193, 0xFFFFF7B7, 0x00F78793, 0x0003F117, 0xF1610113, 0x00011703, 0xFFFFF3B7,
0x00F38393, 0x1A771063, 0x00A00193, 0x0003F097, 0xEF408093, 0xFE008093, 0x02009283, 0x0FF00393,
0x18729263, 0x00B00193, 0x0003F097, 0xED808093, 0xFFB08093, 0x00709283, 0xF0000393, 0x16729463,
0x00C00193, 0x00000213, 0x0003F697, 0xEBA68693, 0x00269703, 0x00070313, 0x000013B7, 0xFF038393,
0x14731263, 0x00120213, 0x00200293, 0xFC521EE3, 0x00D00193, 0x00000213, 0x0003F697, 0xE8C68693,
0x00269703, 0x00000013, 0x00070313, 0xFFFFF3B7, 0x00F38393, 0x10731863, 0x00120213, 0x00200293,
0xFC521CE3, 0x00E00193, 0x00000213, 0x0003F697, 0xE5468693, 0x00269703, 0x00000013, 0x00000013,
0x00070313, 0xF0000393, 0x0C731E63, 0x00120213, 0x00200293, 0xFC521CE3, 0x00F00193, 0x00000213,
0x0003F697, 0xE2268693, 0x00269703, 0x000013B7, 0xFF038393, 0x0A771863, 0x00120213, 0x00200293,
0xFE5210E3, 0x01000193, 0x00000213, 0x0003F697, 0xDF868693, 0x00000013, 0x00269703, 0xFFFFF3B7,
0x00F38393, 0x08771063, 0x00120213, 0x00200293, 0xFC521EE3, 0x01100193, 0x00000213, 0x0003F697,
0xDC468693, 0x00000013, 0x00000013, 0x00269703, 0xF0000393, 0x04771863, 0x00120213, 0x00200293,
0xFC521EE3, 0x01200193, 0x0003F297, 0xD9828293, 0x00029103, 0x00200113, 0x00200393, 0x02711463,
0x01300193, 0x0003F297, 0xD7C28293, 0x00029103, 0x00000013, 0x00200113, 0x00200393, 0x00711463,
0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513, 0x00000073,
0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
data: []uint32{
0xFF0000FF, 0xF00F0FF0, 0x00000000, 0x00000000,
},
},
{
name: "rv32ui-lhu",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x0FF00793, 0x0003F117, 0xFF010113, 0x00015703, 0x0FF00393,
0x2A771063, 0x00300193, 0x000107B7, 0xF0078793, 0x0003F117, 0xFD010113, 0x00215703, 0x000103B7,
0xF0038393, 0x26771E63, 0x00400193, 0x000017B7, 0xFF078793, 0x0003F117, 0xFAC10113, 0x00415703,
0x000013B7, 0xFF038393, 0x24771C63, 0x00500193, 0x0000F7B7, 0x00F78793, 0x0003F117, 0xF8810113,
0x00615703, 0x0000F3B7, 0x00F38393, 0x22771A63, 0x00600193, 0x0FF00793, 0x0003F117, 0xF6E10113,
0xFFA15703, 0x0FF00393, 0x20771C63, 0x00700193, 0x000107B7, 0xF0078793, 0x0003F117, 0xF4E10113,
0xFFC15703, 0x000103B7, 0xF0038393, 0x1E771A63, 0x00800193, 0x000017B7, 0xFF078793, 0x0003F117,
0xF2A10113, 0xFFE15703, 0x000013B7, 0xFF038393, 0x1C771863, 0x00900193, 0x0000F7B7, 0x00F78793,
0x0003F117, 0xF0610113, 0x00015703, 0x0000F3B7, 0x00F38393, 0x1A771663, 0x00A00193, 0x0003F097,
0xEE408093, 0xFE008093, 0x0200D283, 0x0FF00393, 0x18729863, 0x00B00193, 0x0003F097, 0xEC808093,
0xFFB08093, 0x0070D283, 0x000103B7, 0xF0038393, 0x16729863, 0x00C00193, 0x00000213, 0x0003F697,
0xEA668693, 0x0026D703, 0x00070313, 0x000013B7, 0xFF038393, 0x14731663, 0x00120213, 0x00200293,
0xFC521EE3, 0x00D00193, 0x00000213, 0x0003F697, 0xE7868693, 0x0026D703, 0x00000013, 0x00070313,
0x0000F3B7, 0x00F38393, 0x10731C63, 0x00120213, 0x00200293, 0xFC521CE3, 0x00E00193, 0x00000213,
0x0003F697, 0xE4068693, 0x0026D703, 0x00000013, 0x00000013, 0x00070313, 0x000103B7, 0xF0038393,
0x0E731063, 0x00120213, 0x00200293, 0xFC521AE3, 0x00F00193, 0x00000213, 0x0003F697, 0xE0A68693,
0x0026D703, 0x000013B7, 0xFF038393, 0x0A771A63, 0x00120213, 0x00200293, 0xFE5210E3, 0x01000193,
0x00000213, 0x0003F697, 0xDE068693, 0x00000013, 0x0026D703, 0x0000F3B7, 0x00F38393, 0x08771263,
0x00120213, 0x00200293, 0xFC521EE3, 0x01100193, 0x00000213, 0x0003F697, 0xDAC68693, 0x00000013,
0x00000013, 0x0026D703, 0x000103B7, 0xF0038393, 0x04771863, 0x00120213, 0x00200293, 0xFC521CE3,
0x01200193, 0x0003F297, 0xD7C28293, 0x0002D103, 0x00200113, 0x00200393, 0x02711463, 0x01300193,
0x0003F297, 0xD6028293, 0x0002D103, 0x00000013, 0x00200113, 0x00200393, 0x00711463, 0x02301063,
0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F,
0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
data: []uint32{
0xFF0000FF, 0xF00F0FF0, 0x00000000, 0x00000000,
},
},
{
name: "rv32ui-lui",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x000000B7, 0x00000393, 0x04709A63, 0x00300193, 0xFFFFF0B7,
0x4010D093, 0x80000393, 0x04709063, 0x00400193, 0x7FFFF0B7, 0x4140D093, 0x7FF00393, 0x02709663,
0x00500193, 0x800000B7, 0x4140D093, 0x80000393, 0x00709C63, 0x00600193, 0x80000037, 0x00000393,
0x00701463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513,
0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-lw",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00FF07B7, 0x0FF78793, 0x0003F117, 0xFEC10113, 0x00012703,
0x00FF03B7, 0x0FF38393, 0x2A771663, 0x00300193, 0xFF0107B7, 0xF0078793, 0x0003F117, 0xFC810113,
0x00412703, 0xFF0103B7, 0xF0038393, 0x28771463, 0x00400193, 0x0FF017B7, 0xFF078793, 0x0003F117,
0xFA410113, 0x00812703, 0x0FF013B7, 0xFF038393, 0x26771263, 0x00500193, 0xF00FF7B7, 0x00F78793,
0x0003F117, 0xF8010113, 0x00C12703, 0xF00FF3B7, 0x00F38393, 0x24771063, 0x00600193, 0x00FF07B7,
0x0FF78793, 0x0003F117, 0xF6810113, 0xFF412703, 0x00FF03B7, 0x0FF38393, 0x20771E63, 0x00700193,
0xFF0107B7, 0xF0078793, 0x0003F117, 0xF4410113, 0xFF812703, 0xFF0103B7, 0xF0038393, 0x1E771C63,
0x00800193, 0x0FF017B7, 0xFF078793, 0x0003F117, 0xF2010113, 0xFFC12703, 0x0FF013B7, 0xFF038393,
0x1C771A63, 0x00900193, 0xF00FF7B7, 0x00F78793, 0x0003F117, 0xEFC10113, 0x00012703, 0xF00FF3B7,
0x00F38393, 0x1A771863, 0x00A00193, 0x0003F097, 0xED408093, 0xFE008093, 0x0200A283, 0x00FF03B7,
0x0FF38393, 0x18729863, 0x00B00193, 0x0003F097, 0xEB408093, 0xFFD08093, 0x0070A283, 0xFF0103B7,
0xF0038393, 0x16729863, 0x00C00193, 0x00000213, 0x0003F697, 0xE9468693, 0x0046A703, 0x00070313,
0x0FF013B7, 0xFF038393, 0x14731663, 0x00120213, 0x00200293, 0xFC521EE3, 0x00D00193, 0x00000213,
0x0003F697, 0xE6868693, 0x0046A703, 0x00000013, 0x00070313, 0xF00FF3B7, 0x00F38393, 0x10731C63,
0x00120213, 0x00200293, 0xFC521CE3, 0x00E00193, 0x00000213, 0x0003F697, 0xE2C68693, 0x0046A703,
0x00000013, 0x00000013, 0x00070313, 0xFF0103B7, 0xF0038393, 0x0E731063, 0x00120213, 0x00200293,
0xFC521AE3, 0x00F00193, 0x00000213, 0x0003F697, 0xDF868693, 0x0046A703, 0x0FF013B7, 0xFF038393,
0x0A771A63, 0x00120213, 0x00200293, 0xFE5210E3, 0x01000193, 0x00000213, 0x0003F697, 0xDD068693,
0x00000013, 0x0046A703, 0xF00FF3B7, 0x00F38393, 0x08771263, 0x00120213, 0x00200293, 0xFC521EE3,
0x01100193, 0x00000213, 0x0003F697, 0xD9868693, 0x00000013, 0x00000013, 0x0046A703, 0xFF0103B7,
0xF0038393, 0x04771863, 0x00120213, 0x00200293, 0xFC521CE3, 0x01200193, 0x0003F297, 0xD6828293,
0x0002A103, 0x00200113, 0x00200393, 0x02711463, 0x01300193, 0x0003F297, 0xD4C28293, 0x0002A103,
0x00000013, 0x00200113, 0x00200393, 0x00711463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193,
0x0011E193, 0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513,
0x00000073, 0x00000000,
},
data: []uint32{
0x00FF00FF, 0xFF00FF00, 0x0FF00FF0, 0xF00FF00F,
},
},
{
name: "rv32ui-ma_data",
text: []uint32{
0x00000193, 0x0040006F, 0x0003F417, 0xFF840413, 0x00100193, 0x20100313, 0x00141383, 0x52731C63,
0x00200193, 0x20100313, 0x00145383, 0x52731463, 0x00300193, 0x04030337, 0x20130313, 0x00142383,
0x50731A63, 0x00400193, 0x05040337, 0x30230313, 0x00242383, 0x50731063, 0x00500193, 0x06050337,
0x40330313, 0x00342383, 0x4E731663, 0x01000193, 0x00002337, 0x01F30313, 0x01F41383, 0x4C731C63,
0x01100193, 0x00002337, 0x01F30313, 0x01F45383, 0x4C731263, 0x01200193, 0x201F2337, 0xE1D30313,
0x01D42383, 0x4A731863, 0x01300193, 0x21202337, 0xF1E30313, 0x01E42383, 0x48731E63, 0x01400193,
0x22212337, 0x01F30313, 0x01F42383, 0x48731463, 0x01F00193, 0x00004337, 0x03F30313, 0x03F41383,
0x46731A63, 0x02000193, 0x00004337, 0x03F30313, 0x03F45383, 0x46731063, 0x02100193, 0x403F4337,
0xE3D30313, 0x03D42383, 0x44731663, 0x02200193, 0x41404337, 0xF3E30313, 0x03E42383, 0x42731C63,
0x02300193, 0x42414337, 0x03F30313, 0x03F42383, 0x42731263, 0x02E00193, 0xFFFF8337, 0x18030313,
0x006410A3, 0x00141383, 0x40731663, 0x02F00193, 0x00008337, 0x38230313, 0x006410A3, 0x00145383,
0x3E731A63, 0x03000193, 0x87868337, 0x58430313, 0x006420A3, 0x00142383, 0x3C731E63, 0x03100193,
0x8B8A9337, 0x98830313, 0x00642123, 0x00242383, 0x3C731263, 0x03200193, 0x8F8E9337, 0xD8C30313,
0x006421A3, 0x00342383, 0x3A731663, 0x03D00193, 0xFFFFD337, 0x5D430313, 0x00641FA3, 0x01F41383,
0x38731A63, 0x03E00193, 0x0000D337, 0x7D630313, 0x00641FA3, 0x01F45383, 0x36731E63, 0x03F00193,
0xDBDAE337, 0x9D830313, 0x00642EA3, 0x01D42383, 0x36731263, 0x04000193, 0xDFDEE337, 0xDDC30313,
0x00642F23, 0x01E42383, 0x34731663, 0x04100193, 0xE3E2E337, 0x1E030313, 0x00642FA3, 0x01F42383,
0x32731A63, 0x04C00193, 0x00003337, 0x53430313, 0x02641FA3, 0x03F41383, 0x30731E63, 0x04D00193,
0x00003337, 0x73630313, 0x02641FA3, 0x03F45383, 0x30731263, 0x04E00193, 0x3B3A4337, 0x93830313,
0x02642EA3, 0x03D42383, 0x2E731663, 0x04F00193, 0x3F3E4337, 0xD3C30313, 0x02642F23, 0x03E42383,
0x2C731A63, 0x05000193, 0x43424337, 0x14030313, 0x02642FA3, 0x03F42383, 0x2A731E63, 0x05B00193,
0x0000A337, 0x99830313, 0xF9800393, 0x006410A3, 0x00140E03, 0x2BC39063, 0x05C00193, 0x0000A337,
0xB9A30313, 0xF9B00393, 0x006410A3, 0x00240E03, 0x29C39263, 0x05D00193, 0x0000A337, 0xD9C30313,
0x09C00393, 0x006410A3, 0x00144E03, 0x27C39463, 0x05E00193, 0x0000A337, 0xF9E30313, 0x09F00393,
0x006410A3, 0x00244E03, 0x25C39663, 0x05F00193, 0xA3A2A337, 0x1A030313, 0xFA000393, 0x006420A3,
0x00140E03, 0x23C39863, 0x06000193, 0xA7A6A337, 0x5A430313, 0x0A500393, 0x00642123, 0x00344E03,
0x21C39A63, 0x06100193, 0xABAAB337, 0x9A830313, 0xFFFFB3B7, 0xAA938393, 0x006421A3, 0x00441E03,
0x1FC39A63, 0x06200193, 0xAFAEB337, 0xDAC30313, 0x0000B3B7, 0xFAE38393, 0x006421A3, 0x00545E03,
0x1DC39A63, 0x06A00193, 0x0000F337, 0x9E830313, 0xFE800393, 0x00641FA3, 0x01F40E03, 0x1BC39C63,
0x06B00193, 0x0000F337, 0xBEA30313, 0xFEB00393, 0x00641FA3, 0x02040E03, 0x19C39E63, 0x06C00193,
0x0000F337, 0xDEC30313, 0x0EC00393, 0x00641FA3, 0x01F44E03, 0x19C39063, 0x06D00193, 0x0000F337,
0xFEE30313, 0x0EF00393, 0x00641FA3, 0x02044E03, 0x17C39263, 0x06E00193, 0xF3F2F337, 0x1F030313,
0xFF000393, 0x00642EA3, 0x01D40E03, 0x15C39463, 0x06F00193, 0xF7F6F337, 0x5F430313, 0x0F600393,
0x00642F23, 0x02044E03, 0x13C39663, 0x07000193, 0xFBFB0337, 0x9F830313, 0xBFA00393, 0x00642EA3,
0x01F41E03, 0x11C39863, 0x07100193, 0xFFFF0337, 0xDFC30313, 0x000103B7, 0xDFC38393, 0x00642FA3,
0x01F45E03, 0x0FC39863, 0x07900193, 0x00005337, 0x94830313, 0x04800393, 0x02641FA3, 0x03F40E03,
0x0DC39A63, 0x07A00193, 0x00005337, 0xB4A30313, 0x04B00393, 0x02641FA3, 0x04040E03, 0x0BC39C63,
0x07B00193, 0x00005337, 0xD4C30313, 0x04C00393, 0x02641FA3, 0x03F44E03, 0x09C39E63, 0x07C00193,
0x00005337, 0xF4E30313, 0x04F00393, 0x02641FA3, 0x04044E03, 0x09C39063, 0x07D00193, 0x53525337,
0x15030313, 0x05000393, 0x02642EA3, 0x03D40E03, 0x07C39263, 0x07E00193, 0x57565337, 0x55430313,
0x05600393, 0x02642F23, 0x04044E03, 0x05C39463, 0x07F00193, 0x5B5A6337, 0x95830313, 0x000063B7,
0xB5A38393, 0x02642EA3, 0x03F41E03, 0x03C39463, 0x08000193, 0x5F5E6337, 0xD5C30313, 0x000063B7,
0xD5C38393, 0x02642FA3, 0x03F45E03, 0x01C39463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193,
0x0011E193, 0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513,
0x00000073, 0x00000000,
},
data: []uint32{
0x03020100, 0x07060504, 0x0B0A0908, 0x0F0E0D0C, 0x13121110, 0x17161514, 0x1B1A1918, 0x1F1E1D1C,
0x23222120, 0x27262524, 0x2B2A2928, 0x2F2E2D2C, 0x33323130, 0x37363534, 0x3B3A3938, 0x3F3E3D3C,
0x43424140, 0x47464544, 0x4B4A4948, 0x4F4E4D4C, 0x53525150, 0x57565554, 0x5B5A5958, 0x5F5E5D5C,
0x63626160, 0x67666564, 0x6B6A6968, 0x6F6E6D6C, 0x73727170, 0x77767574, 0x7B7A7978, 0x7F7E7D7C,
0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050,
0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050,
0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050,
0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050,
0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050,
0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050,
0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050,
0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x50505050, 0x00505050,
},
},
{
name: "rv32ui-or",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0xFF0105B7, 0xF0058593, 0x0F0F1637, 0xF0F60613, 0x00C5E733,
0xFF1003B7, 0xF0F38393, 0x4A771263, 0x00300193, 0x0FF015B7, 0xFF058593, 0xF0F0F637, 0x0F060613,
0x00C5E733, 0xFFF103B7, 0xFF038393, 0x48771063, 0x00400193, 0x00FF05B7, 0x0FF58593, 0x0F0F1637,
0xF0F60613, 0x00C5E733, 0x0FFF13B7, 0xFFF38393, 0x44771E63, 0x00500193, 0xF00FF5B7, 0x00F58593,
0xF0F0F637, 0x0F060613, 0x00C5E733, 0xF0FFF3B7, 0x0FF38393, 0x42771C63, 0x00600193, 0xFF0105B7,
0xF0058593, 0x0F0F1637, 0xF0F60613, 0x00C5E5B3, 0xFF1003B7, 0xF0F38393, 0x40759A63, 0x00700193,
0xFF0105B7, 0xF0058593, 0x0F0F1637, 0xF0F60613, 0x00C5E633, 0xFF1003B7, 0xF0F38393, 0x3E761863,
0x00800193, 0xFF0105B7, 0xF0058593, 0x00B5E5B3, 0xFF0103B7, 0xF0038393, 0x3C759A63, 0x00900193,
0x00000213, 0xFF0100B7, 0xF0008093, 0x0F0F1137, 0xF0F10113, 0x0020E733, 0x00070313, 0x00120213,
0x00200293, 0xFE5210E3, 0xFF1003B7, 0xF0F38393, 0x38731E63, 0x00A00193, 0x00000213, 0x0FF010B7,
0xFF008093, 0xF0F0F137, 0x0F010113, 0x0020E733, 0x00000013, 0x00070313, 0x00120213, 0x00200293,
0xFC521EE3, 0xFFF103B7, 0xFF038393, 0x36731063, 0x00B00193, 0x00000213, 0x00FF00B7, 0x0FF08093,
0x0F0F1137, 0xF0F10113, 0x0020E733, 0x00000013, 0x00000013, 0x00070313, 0x00120213, 0x00200293,
0xFC521CE3, 0x0FFF13B7, 0xFFF38393, 0x32731063, 0x00C00193, 0x00000213, 0xFF0100B7, 0xF0008093,
0x0F0F1137, 0xF0F10113, 0x0020E733, 0x00120213, 0x00200293, 0xFE5212E3, 0xFF1003B7, 0xF0F38393,
0x2E771663, 0x00D00193, 0x00000213, 0x0FF010B7, 0xFF008093, 0xF0F0F137, 0x0F010113, 0x00000013,
0x0020E733, 0x00120213, 0x00200293, 0xFE5210E3, 0xFFF103B7, 0xFF038393, 0x2A771A63, 0x00E00193,
0x00000213, 0x00FF00B7, 0x0FF08093, 0x0F0F1137, 0xF0F10113, 0x00000013, 0x00000013, 0x0020E733,
0x00120213, 0x00200293, 0xFC521EE3, 0x0FFF13B7, 0xFFF38393, 0x26771C63, 0x00F00193, 0x00000213,
0xFF0100B7, 0xF0008093, 0x00000013, 0x0F0F1137, 0xF0F10113, 0x0020E733, 0x00120213, 0x00200293,
0xFE5210E3, 0xFF1003B7, 0xF0F38393, 0x24771063, 0x01000193, 0x00000213, 0x0FF010B7, 0xFF008093,
0x00000013, 0xF0F0F137, 0x0F010113, 0x00000013, 0x0020E733, 0x00120213, 0x00200293, 0xFC521EE3,
0xFFF103B7, 0xFF038393, 0x20771263, 0x01100193, 0x00000213, 0x00FF00B7, 0x0FF08093, 0x00000013,
0x00000013, 0x0F0F1137, 0xF0F10113, 0x0020E733, 0x00120213, 0x00200293, 0xFC521EE3, 0x0FFF13B7,
0xFFF38393, 0x1C771463, 0x01200193, 0x00000213, 0x0F0F1137, 0xF0F10113, 0xFF0100B7, 0xF0008093,
0x0020E733, 0x00120213, 0x00200293, 0xFE5212E3, 0xFF1003B7, 0xF0F38393, 0x18771A63, 0x01300193,
0x00000213, 0xF0F0F137, 0x0F010113, 0x0FF010B7, 0xFF008093, 0x00000013, 0x0020E733, 0x00120213,
0x00200293, 0xFE5210E3, 0xFFF103B7, 0xFF038393, 0x14771E63, 0x01400193, 0x00000213, 0x0F0F1137,
0xF0F10113, 0x00FF00B7, 0x0FF08093, 0x00000013, 0x00000013, 0x0020E733, 0x00120213, 0x00200293,
0xFC521EE3, 0x0FFF13B7, 0xFFF38393, 0x12771063, 0x01500193, 0x00000213, 0x0F0F1137, 0xF0F10113,
0x00000013, 0xFF0100B7, 0xF0008093, 0x0020E733, 0x00120213, 0x00200293, 0xFE5210E3, 0xFF1003B7,
0xF0F38393, 0x0E771463, 0x01600193, 0x00000213, 0xF0F0F137, 0x0F010113, 0x00000013, 0x0FF010B7,
0xFF008093, 0x00000013, 0x0020E733, 0x00120213, 0x00200293, 0xFC521EE3, 0xFFF103B7, 0xFF038393,
0x0A771663, 0x01700193, 0x00000213, 0x0F0F1137, 0xF0F10113, 0x00000013, 0x00000013, 0x00FF00B7,
0x0FF08093, 0x0020E733, 0x00120213, 0x00200293, 0xFC521EE3, 0x0FFF13B7, 0xFFF38393, 0x06771863,
0x01800193, 0xFF0100B7, 0xF0008093, 0x00106133, 0xFF0103B7, 0xF0038393, 0x04711A63, 0x01900193,
0x00FF00B7, 0x0FF08093, 0x0000E133, 0x00FF03B7, 0x0FF38393, 0x02711C63, 0x01A00193, 0x000060B3,
0x00000393, 0x02709463, 0x01B00193, 0x111110B7, 0x11108093, 0x22222137, 0x22210113, 0x0020E033,
0x00000393, 0x00701463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893,
0x00018513, 0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-ori",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0xFF0106B7, 0xF0068693, 0xF0F6E713, 0xF0F00393, 0x1C771463,
0x00300193, 0x0FF016B7, 0xFF068693, 0x0F06E713, 0x0FF013B7, 0xFF038393, 0x1A771663, 0x00400193,
0x00FF06B7, 0x0FF68693, 0x70F6E713, 0x00FF03B7, 0x7FF38393, 0x18771863, 0x00500193, 0xF00FF6B7,
0x00F68693, 0x0F06E713, 0xF00FF3B7, 0x0FF38393, 0x16771A63, 0x00600193, 0xFF0105B7, 0xF0058593,
0x0F05E593, 0xFF0103B7, 0xFF038393, 0x14759C63, 0x00700193, 0x00000213, 0x0FF010B7, 0xFF008093,
0x0F00E713, 0x00070313, 0x00120213, 0x00200293, 0xFE5214E3, 0x0FF013B7, 0xFF038393, 0x12731463,
0x00800193, 0x00000213, 0x00FF00B7, 0x0FF08093, 0x70F0E713, 0x00000013, 0x00070313, 0x00120213,
0x00200293, 0xFE5212E3, 0x00FF03B7, 0x7FF38393, 0x0E731A63, 0x00900193, 0x00000213, 0xF00FF0B7,
0x00F08093, 0x0F00E713, 0x00000013, 0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFE5210E3,
0xF00FF3B7, 0x0FF38393, 0x0A731E63, 0x00A00193, 0x00000213, 0x0FF010B7, 0xFF008093, 0x0F00E713,
0x00120213, 0x00200293, 0xFE5216E3, 0x0FF013B7, 0xFF038393, 0x08771863, 0x00B00193, 0x00000213,
0x00FF00B7, 0x0FF08093, 0x00000013, 0xF0F0E713, 0x00120213, 0x00200293, 0xFE5214E3, 0xFFF00393,
0x06771263, 0x00C00193, 0x00000213, 0xF00FF0B7, 0x00F08093, 0x00000013, 0x00000013, 0x0F00E713,
0x00120213, 0x00200293, 0xFE5212E3, 0xF00FF3B7, 0x0FF38393, 0x02771863, 0x00D00193, 0x0F006093,
0x0F000393, 0x02709063, 0x00E00193, 0x00FF00B7, 0x0FF08093, 0x70F0E013, 0x00000393, 0x00701463,
0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513, 0x00000073,
0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-sb",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x0003F117, 0xFF410113, 0xFAA00093, 0x00000797, 0x01478793,
0x00110023, 0x00010703, 0x0080006F, 0x00008713, 0xFAA00393, 0x44771463, 0x00300193, 0x0003F117,
0xFC410113, 0x00000093, 0x00000797, 0x01478793, 0x001100A3, 0x00110703, 0x0080006F, 0x00008713,
0x00000393, 0x40771C63, 0x00400193, 0x0003F117, 0xF9410113, 0xFFFFF0B7, 0xFA008093, 0x00000797,
0x01478793, 0x00110123, 0x00211703, 0x0080006F, 0x00008713, 0xFFFFF3B7, 0xFA038393, 0x3E771063,
0x00500193, 0x0003F117, 0xF5C10113, 0x00A00093, 0x00000797, 0x01478793, 0x001101A3, 0x00310703,
0x0080006F, 0x00008713, 0x00A00393, 0x3A771863, 0x00600193, 0x0003F117, 0xF3310113, 0xFAA00093,
0x00000797, 0x01478793, 0xFE110EA3, 0xFFD10703, 0x0080006F, 0x00008713, 0xFAA00393, 0x38771063,
0x00700193, 0x0003F117, 0xF0310113, 0x00000093, 0x00000797, 0x01478793, 0xFE110F23, 0xFFE10703,
0x0080006F, 0x00008713, 0x00000393, 0x34771863, 0x00800193, 0x0003F117, 0xED310113, 0xFA000093,
0x00000797, 0x01478793, 0xFE110FA3, 0xFFF10703, 0x0080006F, 0x00008713, 0xFA000393, 0x32771063,
0x00900193, 0x0003F117, 0xEA310113, 0x00A00093, 0x00000797, 0x01478793, 0x00110023, 0x00010703,
0x0080006F, 0x00008713, 0x00A00393, 0x2E771863, 0x00A00193, 0x0003F097, 0xE7408093, 0x12345137,
0x67810113, 0xFE008213, 0x02220023, 0x00008283, 0x07800393, 0x2C729463, 0x00B00193, 0x0003F097,
0xE4C08093, 0x00003137, 0x09810113, 0xFFA08093, 0x002083A3, 0x0003F217, 0xE3520213, 0x00020283,
0xF9800393, 0x28729C63, 0x00C00193, 0x00000213, 0xFDD00693, 0x0003F617, 0xE0C60613, 0x00D60023,
0x00060703, 0xFDD00393, 0x26771A63, 0x00120213, 0x00200293, 0xFC521EE3, 0x00D00193, 0x00000213,
0xFCD00693, 0x0003F617, 0xDDC60613, 0x00000013, 0x00D600A3, 0x00160703, 0xFCD00393, 0x24771063,
0x00120213, 0x00200293, 0xFC521CE3, 0x00E00193, 0x00000213, 0xFCC00693, 0x0003F617, 0xDA860613,
0x00000013, 0x00000013, 0x00D60123, 0x00260703, 0xFCC00393, 0x20771463, 0x00120213, 0x00200293,
0xFC521AE3, 0x00F00193, 0x00000213, 0xFBC00693, 0x00000013, 0x0003F617, 0xD6C60613, 0x00D601A3,
0x00360703, 0xFBC00393, 0x1C771A63, 0x00120213, 0x00200293, 0xFC521CE3, 0x01000193, 0x00000213,
0xFBB00693, 0x00000013, 0x0003F617, 0xD3860613, 0x00000013, 0x00D60223, 0x00460703, 0xFBB00393,
0x18771E63, 0x00120213, 0x00200293, 0xFC521AE3, 0x01100193, 0x00000213, 0xFAB00693, 0x00000013,
0x00000013, 0x0003F617, 0xCFC60613, 0x00D602A3, 0x00560703, 0xFAB00393, 0x16771263, 0x00120213,
0x00200293, 0xFC521AE3, 0x01200193, 0x00000213, 0x0003F117, 0xCD010113, 0x03300093, 0x00110023,
0x00010703, 0x03300393, 0x12771A63, 0x00120213, 0x00200293, 0xFC521EE3, 0x01300193, 0x00000213,
0x0003F117, 0xCA010113, 0x02300093, 0x00000013, 0x001100A3, 0x00110703, 0x02300393, 0x10771063,
0x00120213, 0x00200293, 0xFC521CE3, 0x01400193, 0x00000213, 0x0003F117, 0xC6C10113, 0x02200093,
0x00000013, 0x00000013, 0x00110123, 0x00210703, 0x02200393, 0x0C771463, 0x00120213, 0x00200293,
0xFC521AE3, 0x01500193, 0x00000213, 0x0003F117, 0xC3410113, 0x00000013, 0x01200093, 0x001101A3,
0x00310703, 0x01200393, 0x08771A63, 0x00120213, 0x00200293, 0xFC521CE3, 0x01600193, 0x00000213,
0x0003F117, 0xC0010113, 0x00000013, 0x01100093, 0x00000013, 0x00110223, 0x00410703, 0x01100393,
0x04771E63, 0x00120213, 0x00200293, 0xFC521AE3, 0x01700193, 0x00000213, 0x0003F117, 0xBC810113,
0x00000013, 0x00000013, 0x00100093, 0x001102A3, 0x00510703, 0x00100393, 0x02771263, 0x00120213,
0x00200293, 0xFC521AE3, 0x0EF00513, 0x0003F597, 0xB9458593, 0x00A581A3, 0x02301063, 0x0FF0000F,
0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F, 0x00100193,
0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
data: []uint32{
0xEFEFEFEF, 0xEFEFEFEF, 0x0000EFEF, 0x00000000,
},
},
{
name: "rv32ui-sh",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x0003F117, 0xFF410113, 0x0AA00093, 0x00000797, 0x01478793,
0x00111023, 0x00011703, 0x0080006F, 0x00008713, 0x0AA00393, 0x4C771663, 0x00300193, 0x0003F117,
0xFC410113, 0xFFFFB0B7, 0xA0008093, 0x00000797, 0x01478793, 0x00111123, 0x00211703, 0x0080006F,
0x00008713, 0xFFFFB3B7, 0xA0038393, 0x48771A63, 0x00400193, 0x0003F117, 0xF8C10113, 0xBEEF10B7,
0xAA008093, 0x00000797, 0x01478793, 0x00111223, 0x00412703, 0x0080006F, 0x00008713, 0xBEEF13B7,
0xAA038393, 0x44771E63, 0x00500193, 0x0003F117, 0xF5410113, 0xFFFFA0B7, 0x00A08093, 0x00000797,
0x01478793, 0x00111323, 0x00611703, 0x0080006F, 0x00008713, 0xFFFFA3B7, 0x00A38393, 0x42771263,
0x00600193, 0x0003F117, 0xF2A10113, 0x0AA00093, 0x00000797, 0x01478793, 0xFE111D23, 0xFFA11703,
0x0080006F, 0x00008713, 0x0AA00393, 0x3E771A63, 0x00700193, 0x0003F117, 0xEFA10113, 0xFFFFB0B7,
0xA0008093, 0x00000797, 0x01478793, 0xFE111E23, 0xFFC11703, 0x0080006F, 0x00008713, 0xFFFFB3B7,
0xA0038393, 0x3A771E63, 0x00800193, 0x0003F117, 0xEC210113, 0x000010B7, 0xAA008093, 0x00000797,
0x01478793, 0xFE111F23, 0xFFE11703, 0x0080006F, 0x00008713, 0x000013B7, 0xAA038393, 0x38771263,
0x00900193, 0x0003F117, 0xE8A10113, 0xFFFFA0B7, 0x00A08093, 0x00000797, 0x01478793, 0x00111023,
0x00011703, 0x0080006F, 0x00008713, 0xFFFFA3B7, 0x00A38393, 0x34771663, 0x00A00193, 0x0003F097,
0xE5408093, 0x12345137, 0x67810113, 0xFE008213, 0x02221023, 0x00009283, 0x000053B7, 0x67838393,
0x32729063, 0x00B00193, 0x0003F097, 0xE2808093, 0x00003137, 0x09810113, 0xFFB08093, 0x002093A3,
0x0003F217, 0xE1220213, 0x00021283, 0x000033B7, 0x09838393, 0x2E729663, 0x00C00193, 0x00000213,
0xFFFFD6B7, 0xCDD68693, 0x0003F617, 0xDD860613, 0x00D61023, 0x00061703, 0xFFFFD3B7, 0xCDD38393,
0x2C771063, 0x00120213, 0x00200293, 0xFC521AE3, 0x00D00193, 0x00000213, 0xFFFFC6B7, 0xCCD68693,
0x0003F617, 0xDA060613, 0x00000013, 0x00D61123, 0x00261703, 0xFFFFC3B7, 0xCCD38393, 0x28771263,
0x00120213, 0x00200293, 0xFC5218E3, 0x00E00193, 0x00000213, 0xFFFFC6B7, 0xBCC68693, 0x0003F617,
0xD6460613, 0x00000013, 0x00000013, 0x00D61223, 0x00461703, 0xFFFFC3B7, 0xBCC38393, 0x24771263,
0x00120213, 0x00200293, 0xFC5216E3, 0x00F00193, 0x00000213, 0xFFFFB6B7, 0xBBC68693, 0x00000013,
0x0003F617, 0xD2060613, 0x00D61323, 0x00661703, 0xFFFFB3B7, 0xBBC38393, 0x20771463, 0x00120213,
0x00200293, 0xFC5218E3, 0x01000193, 0x00000213, 0xFFFFB6B7, 0xABB68693, 0x00000013, 0x0003F617,
0xCE460613, 0x00000013, 0x00D61423, 0x00861703, 0xFFFFB3B7, 0xABB38393, 0x1C771463, 0x00120213,
0x00200293, 0xFC5216E3, 0x01100193, 0x00000213, 0xFFFFE6B7, 0xAAB68693, 0x00000013, 0x00000013,
0x0003F617, 0xCA060613, 0x00D61523, 0x00A61703, 0xFFFFE3B7, 0xAAB38393, 0x18771463, 0x00120213,
0x00200293, 0xFC5216E3, 0x01200193, 0x00000213, 0x0003F117, 0xC7010113, 0x000020B7, 0x23308093,
0x00111023, 0x00011703, 0x000023B7, 0x23338393, 0x14771863, 0x00120213, 0x00200293, 0xFC521AE3,
0x01300193, 0x00000213, 0x0003F117, 0xC3810113, 0x000010B7, 0x22308093, 0x00000013, 0x00111123,
0x00211703, 0x000013B7, 0x22338393, 0x10771A63, 0x00120213, 0x00200293, 0xFC5218E3, 0x01400193,
0x00000213, 0x0003F117, 0xBFC10113, 0x000010B7, 0x12208093, 0x00000013, 0x00000013, 0x00111223,
0x00411703, 0x000013B7, 0x12238393, 0x0C771A63, 0x00120213, 0x00200293, 0xFC5216E3, 0x01500193,
0x00000213, 0x0003F117, 0xBBC10113, 0x00000013, 0x11200093, 0x00111323, 0x00611703, 0x11200393,
0x0A771063, 0x00120213, 0x00200293, 0xFC521CE3, 0x01600193, 0x00000213, 0x0003F117, 0xB8810113,
0x00000013, 0x01100093, 0x00000013, 0x00111423, 0x00811703, 0x01100393, 0x06771463, 0x00120213,
0x00200293, 0xFC521AE3, 0x01700193, 0x00000213, 0x0003F117, 0xB5010113, 0x00000013, 0x00000013,
0x000030B7, 0x00108093, 0x00111523, 0x00A11703, 0x000033B7, 0x00138393, 0x02771463, 0x00120213,
0x00200293, 0xFC5216E3, 0x0000C537, 0xEEF50513, 0x0003F597, 0xB1058593, 0x00A59323, 0x02301063,
0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F,
0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
data: []uint32{
0xBEEFBEEF, 0xBEEFBEEF, 0xBEEFBEEF, 0xBEEFBEEF, 0xBEEFBEEF, 0x00000000, 0x00000000, 0x00000000,
},
},
{
name: "rv32ui-simple",
text: []uint32{
0x00000193, 0x0040006F, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-sll",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00100593, 0x00000613, 0x00C59733, 0x00100393, 0x52771E63,
0x00300193, 0x00100593, 0x00100613, 0x00C59733, 0x00200393, 0x52771263, 0x00400193, 0x00100593,
0x00700613, 0x00C59733, 0x08000393, 0x50771663, 0x00500193, 0x00100593, 0x00E00613, 0x00C59733,
0x000043B7, 0x4E771A63, 0x00600193, 0x00100593, 0x01F00613, 0x00C59733, 0x800003B7, 0x4C771E63,
0x00700193, 0xFFF00593, 0x00000613, 0x00C59733, 0xFFF00393, 0x4C771263, 0x00800193, 0xFFF00593,
0x00100613, 0x00C59733, 0xFFE00393, 0x4A771663, 0x00900193, 0xFFF00593, 0x00700613, 0x00C59733,
0xF8000393, 0x48771A63, 0x00A00193, 0xFFF00593, 0x00E00613, 0x00C59733, 0xFFFFC3B7, 0x46771E63,
0x00B00193, 0xFFF00593, 0x01F00613, 0x00C59733, 0x800003B7, 0x46771263, 0x00C00193, 0x212125B7,
0x12158593, 0x00000613, 0x00C59733, 0x212123B7, 0x12138393, 0x44771263, 0x00D00193, 0x212125B7,
0x12158593, 0x00100613, 0x00C59733, 0x424243B7, 0x24238393, 0x42771263, 0x00E00193, 0x212125B7,
0x12158593, 0x00700613, 0x00C59733, 0x909093B7, 0x08038393, 0x40771263, 0x00F00193, 0x212125B7,
0x12158593, 0x00E00613, 0x00C59733, 0x484843B7, 0x3E771463, 0x01000193, 0x212125B7, 0x12158593,
0x01F00613, 0x00C59733, 0x800003B7, 0x3C771663, 0x01100193, 0x212125B7, 0x12158593, 0xFC000613,
0x00C59733, 0x212123B7, 0x12138393, 0x3A771663, 0x01200193, 0x212125B7, 0x12158593, 0xFC100613,
0x00C59733, 0x424243B7, 0x24238393, 0x38771663, 0x01300193, 0x212125B7, 0x12158593, 0xFC700613,
0x00C59733, 0x909093B7, 0x08038393, 0x36771663, 0x01400193, 0x212125B7, 0x12158593, 0xFCE00613,
0x00C59733, 0x484843B7, 0x34771863, 0x01600193, 0x00100593, 0x00700613, 0x00C595B3, 0x08000393,
0x32759C63, 0x01700193, 0x00100593, 0x00E00613, 0x00C59633, 0x000043B7, 0x32761063, 0x01800193,
0x00300593, 0x00B595B3, 0x01800393, 0x30759663, 0x01900193, 0x00000213, 0x00100093, 0x00700113,
0x00209733, 0x00070313, 0x00120213, 0x00200293, 0xFE5214E3, 0x08000393, 0x2E731063, 0x01A00193,
0x00000213, 0x00100093, 0x00E00113, 0x00209733, 0x00000013, 0x00070313, 0x00120213, 0x00200293,
0xFE5212E3, 0x000043B7, 0x2A731863, 0x01B00193, 0x00000213, 0x00100093, 0x01F00113, 0x00209733,
0x00000013, 0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFE5210E3, 0x800003B7, 0x26731E63,
0x01C00193, 0x00000213, 0x00100093, 0x00700113, 0x00209733, 0x00120213, 0x00200293, 0xFE5216E3,
0x08000393, 0x24771A63, 0x01D00193, 0x00000213, 0x00100093, 0x00E00113, 0x00000013, 0x00209733,
0x00120213, 0x00200293, 0xFE5214E3, 0x000043B7, 0x22771463, 0x01E00193, 0x00000213, 0x00100093,
0x01F00113, 0x00000013, 0x00000013, 0x00209733, 0x00120213, 0x00200293, 0xFE5212E3, 0x800003B7,
0x1E771C63, 0x01F00193, 0x00000213, 0x00100093, 0x00000013, 0x00700113, 0x00209733, 0x00120213,
0x00200293, 0xFE5214E3, 0x08000393, 0x1C771663, 0x02000193, 0x00000213, 0x00100093, 0x00000013,
0x00E00113, 0x00000013, 0x00209733, 0x00120213, 0x00200293, 0xFE5212E3, 0x000043B7, 0x18771E63,
0x02100193, 0x00000213, 0x00100093, 0x00000013, 0x00000013, 0x01F00113, 0x00209733, 0x00120213,
0x00200293, 0xFE5212E3, 0x800003B7, 0x16771663, 0x02200193, 0x00000213, 0x00700113, 0x00100093,
0x00209733, 0x00120213, 0x00200293, 0xFE5216E3, 0x08000393, 0x14771263, 0x02300193, 0x00000213,
0x00E00113, 0x00100093, 0x00000013, 0x00209733, 0x00120213, 0x00200293, 0xFE5214E3, 0x000043B7,
0x10771C63, 0x02400193, 0x00000213, 0x01F00113, 0x00100093, 0x00000013, 0x00000013, 0x00209733,
0x00120213, 0x00200293, 0xFE5212E3, 0x800003B7, 0x0E771463, 0x02500193, 0x00000213, 0x00700113,
0x00000013, 0x00100093, 0x00209733, 0x00120213, 0x00200293, 0xFE5214E3, 0x08000393, 0x0A771E63,
0x02600193, 0x00000213, 0x00E00113, 0x00000013, 0x00100093, 0x00000013, 0x00209733, 0x00120213,
0x00200293, 0xFE5212E3, 0x000043B7, 0x08771663, 0x02700193, 0x00000213, 0x01F00113, 0x00000013,
0x00000013, 0x00100093, 0x00209733, 0x00120213, 0x00200293, 0xFE5212E3, 0x800003B7, 0x04771E63,
0x02800193, 0x00F00093, 0x00101133, 0x00000393, 0x04711463, 0x02900193, 0x02000093, 0x00009133,
0x02000393, 0x02711A63, 0x02A00193, 0x000010B3, 0x00000393, 0x02709263, 0x02B00193, 0x40000093,
0x00100113, 0x00B11113, 0x00209033, 0x00000393, 0x00701463, 0x02301063, 0x0FF0000F, 0x00018063,
0x00119193, 0x0011E193, 0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893,
0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-slli",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00100693, 0x00069713, 0x00100393, 0x26771A63, 0x00300193,
0x00100693, 0x00169713, 0x00200393, 0x26771063, 0x00400193, 0x00100693, 0x00769713, 0x08000393,
0x24771663, 0x00500193, 0x00100693, 0x00E69713, 0x000043B7, 0x22771C63, 0x00600193, 0x00100693,
0x01F69713, 0x800003B7, 0x22771263, 0x00700193, 0xFFF00693, 0x00069713, 0xFFF00393, 0x20771863,
0x00800193, 0xFFF00693, 0x00169713, 0xFFE00393, 0x1E771E63, 0x00900193, 0xFFF00693, 0x00769713,
0xF8000393, 0x1E771463, 0x00A00193, 0xFFF00693, 0x00E69713, 0xFFFFC3B7, 0x1C771A63, 0x00B00193,
0xFFF00693, 0x01F69713, 0x800003B7, 0x1C771063, 0x00C00193, 0x212126B7, 0x12168693, 0x00069713,
0x212123B7, 0x12138393, 0x1A771263, 0x00D00193, 0x212126B7, 0x12168693, 0x00169713, 0x424243B7,
0x24238393, 0x18771463, 0x00E00193, 0x212126B7, 0x12168693, 0x00769713, 0x909093B7, 0x08038393,
0x16771663, 0x00F00193, 0x212126B7, 0x12168693, 0x00E69713, 0x484843B7, 0x14771A63, 0x01000193,
0x212126B7, 0x12168693, 0x01F69713, 0x800003B7, 0x12771E63, 0x01100193, 0x00100593, 0x00759593,
0x08000393, 0x12759463, 0x01200193, 0x00000213, 0x00100093, 0x00709713, 0x00070313, 0x00120213,
0x00200293, 0xFE5216E3, 0x08000393, 0x10731063, 0x01300193, 0x00000213, 0x00100093, 0x00E09713,
0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFE5214E3, 0x000043B7, 0x0C731A63, 0x01400193,
0x00000213, 0x00100093, 0x01F09713, 0x00000013, 0x00000013, 0x00070313, 0x00120213, 0x00200293,
0xFE5212E3, 0x800003B7, 0x0A731263, 0x01500193, 0x00000213, 0x00100093, 0x00709713, 0x00120213,
0x00200293, 0xFE5218E3, 0x08000393, 0x08771063, 0x01600193, 0x00000213, 0x00100093, 0x00000013,
0x00E09713, 0x00120213, 0x00200293, 0xFE5216E3, 0x000043B7, 0x04771C63, 0x01700193, 0x00000213,
0x00100093, 0x00000013, 0x00000013, 0x01F09713, 0x00120213, 0x00200293, 0xFE5214E3, 0x800003B7,
0x02771663, 0x01800193, 0x01F01093, 0x00000393, 0x00709E63, 0x01900193, 0x02100093, 0x01409013,
0x00000393, 0x00701463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893,
0x00018513, 0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-slt",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00000593, 0x00000613, 0x00C5A733, 0x00000393, 0x4A771A63,
0x00300193, 0x00100593, 0x00100613, 0x00C5A733, 0x00000393, 0x48771E63, 0x00400193, 0x00300593,
0x00700613, 0x00C5A733, 0x00100393, 0x48771263, 0x00500193, 0x00700593, 0x00300613, 0x00C5A733,
0x00000393, 0x46771663, 0x00600193, 0x00000593, 0xFFFF8637, 0x00C5A733, 0x00000393, 0x44771A63,
0x00700193, 0x800005B7, 0x00000613, 0x00C5A733, 0x00100393, 0x42771E63, 0x00800193, 0x800005B7,
0xFFFF8637, 0x00C5A733, 0x00100393, 0x42771263, 0x00900193, 0x00000593, 0x00008637, 0xFFF60613,
0x00C5A733, 0x00100393, 0x40771463, 0x00A00193, 0x800005B7, 0xFFF58593, 0x00000613, 0x00C5A733,
0x00000393, 0x3E771663, 0x00B00193, 0x800005B7, 0xFFF58593, 0x00008637, 0xFFF60613, 0x00C5A733,
0x00000393, 0x3C771663, 0x00C00193, 0x800005B7, 0x00008637, 0xFFF60613, 0x00C5A733, 0x00100393,
0x3A771863, 0x00D00193, 0x800005B7, 0xFFF58593, 0xFFFF8637, 0x00C5A733, 0x00000393, 0x38771A63,
0x00E00193, 0x00000593, 0xFFF00613, 0x00C5A733, 0x00000393, 0x36771E63, 0x00F00193, 0xFFF00593,
0x00100613, 0x00C5A733, 0x00100393, 0x36771263, 0x01000193, 0xFFF00593, 0xFFF00613, 0x00C5A733,
0x00000393, 0x34771663, 0x01100193, 0x00E00593, 0x00D00613, 0x00C5A5B3, 0x00000393, 0x32759A63,
0x01200193, 0x00B00593, 0x00D00613, 0x00C5A633, 0x00100393, 0x30761E63, 0x01300193, 0x00D00593,
0x00B5A5B3, 0x00000393, 0x30759463, 0x01400193, 0x00000213, 0x00B00093, 0x00D00113, 0x0020A733,
0x00070313, 0x00120213, 0x00200293, 0xFE5214E3, 0x00100393, 0x2C731E63, 0x01500193, 0x00000213,
0x00E00093, 0x00D00113, 0x0020A733, 0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFE5212E3,
0x00000393, 0x2A731663, 0x01600193, 0x00000213, 0x00C00093, 0x00D00113, 0x0020A733, 0x00000013,
0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFE5210E3, 0x00100393, 0x26731C63, 0x01700193,
0x00000213, 0x00E00093, 0x00D00113, 0x0020A733, 0x00120213, 0x00200293, 0xFE5216E3, 0x00000393,
0x24771863, 0x01800193, 0x00000213, 0x00B00093, 0x00D00113, 0x00000013, 0x0020A733, 0x00120213,
0x00200293, 0xFE5214E3, 0x00100393, 0x22771263, 0x01900193, 0x00000213, 0x00F00093, 0x00D00113,
0x00000013, 0x00000013, 0x0020A733, 0x00120213, 0x00200293, 0xFE5212E3, 0x00000393, 0x1E771A63,
0x01A00193, 0x00000213, 0x00A00093, 0x00000013, 0x00D00113, 0x0020A733, 0x00120213, 0x00200293,
0xFE5214E3, 0x00100393, 0x1C771463, 0x01B00193, 0x00000213, 0x01000093, 0x00000013, 0x00D00113,
0x00000013, 0x0020A733, 0x00120213, 0x00200293, 0xFE5212E3, 0x00000393, 0x18771C63, 0x01C00193,
0x00000213, 0x00900093, 0x00000013, 0x00000013, 0x00D00113, 0x0020A733, 0x00120213, 0x00200293,
0xFE5212E3, 0x00100393, 0x16771463, 0x01D00193, 0x00000213, 0x00D00113, 0x01100093, 0x0020A733,
0x00120213, 0x00200293, 0xFE5216E3, 0x00000393, 0x14771063, 0x01E00193, 0x00000213, 0x00D00113,
0x00800093, 0x00000013, 0x0020A733, 0x00120213, 0x00200293, 0xFE5214E3, 0x00100393, 0x10771A63,
0x01F00193, 0x00000213, 0x00D00113, 0x01200093, 0x00000013, 0x00000013, 0x0020A733, 0x00120213,
0x00200293, 0xFE5212E3, 0x00000393, 0x0E771263, 0x02000193, 0x00000213, 0x00D00113, 0x00000013,
0x00700093, 0x0020A733, 0x00120213, 0x00200293, 0xFE5214E3, 0x00100393, 0x0A771C63, 0x02100193,
0x00000213, 0x00D00113, 0x00000013, 0x01300093, 0x00000013, 0x0020A733, 0x00120213, 0x00200293,
0xFE5212E3, 0x00000393, 0x08771463, 0x02200193, 0x00000213, 0x00D00113, 0x00000013, 0x00000013,
0x00600093, 0x0020A733, 0x00120213, 0x00200293, 0xFE5212E3, 0x00100393, 0x04771C63, 0x02300193,
0xFFF00093, 0x00102133, 0x00000393, 0x04711263, 0x02400193, 0xFFF00093, 0x0000A133, 0x00100393,
0x02711863, 0x02500193, 0x000020B3, 0x00000393, 0x02709063, 0x02600193, 0x01000093, 0x01E00113,
0x0020A033, 0x00000393, 0x00701463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193,
0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073,
0x00000000,
},
},
{
name: "rv32ui-slti",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00000693, 0x0006A713, 0x00000393, 0x26771263, 0x00300193,
0x00100693, 0x0016A713, 0x00000393, 0x24771863, 0x00400193, 0x00300693, 0x0076A713, 0x00100393,
0x22771E63, 0x00500193, 0x00700693, 0x0036A713, 0x00000393, 0x22771463, 0x00600193, 0x00000693,
0x8006A713, 0x00000393, 0x20771A63, 0x00700193, 0x800006B7, 0x0006A713, 0x00100393, 0x20771063,
0x00800193, 0x800006B7, 0x8006A713, 0x00100393, 0x1E771663, 0x00900193, 0x00000693, 0x7FF6A713,
0x00100393, 0x1C771C63, 0x00A00193, 0x800006B7, 0xFFF68693, 0x0006A713, 0x00000393, 0x1C771063,
0x00B00193, 0x800006B7, 0xFFF68693, 0x7FF6A713, 0x00000393, 0x1A771463, 0x00C00193, 0x800006B7,
0x7FF6A713, 0x00100393, 0x18771A63, 0x00D00193, 0x800006B7, 0xFFF68693, 0x8006A713, 0x00000393,
0x16771E63, 0x00E00193, 0x00000693, 0xFFF6A713, 0x00000393, 0x16771463, 0x00F00193, 0xFFF00693,
0x0016A713, 0x00100393, 0x14771A63, 0x01000193, 0xFFF00693, 0xFFF6A713, 0x00000393, 0x14771063,
0x01100193, 0x00B00593, 0x00D5A593, 0x00100393, 0x12759663, 0x01200193, 0x00000213, 0x00F00093,
0x00A0A713, 0x00070313, 0x00120213, 0x00200293, 0xFE5216E3, 0x00000393, 0x10731263, 0x01300193,
0x00000213, 0x00A00093, 0x0100A713, 0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFE5214E3,
0x00100393, 0x0C731C63, 0x01400193, 0x00000213, 0x01000093, 0x0090A713, 0x00000013, 0x00000013,
0x00070313, 0x00120213, 0x00200293, 0xFE5212E3, 0x00000393, 0x0A731463, 0x01500193, 0x00000213,
0x00B00093, 0x00F0A713, 0x00120213, 0x00200293, 0xFE5218E3, 0x00100393, 0x08771263, 0x01600193,
0x00000213, 0x01100093, 0x00000013, 0x0080A713, 0x00120213, 0x00200293, 0xFE5216E3, 0x00000393,
0x04771E63, 0x01700193, 0x00000213, 0x00C00093, 0x00000013, 0x00000013, 0x00E0A713, 0x00120213,
0x00200293, 0xFE5214E3, 0x00100393, 0x02771863, 0x01800193, 0xFFF02093, 0x00000393, 0x02709063,
0x01900193, 0x00FF00B7, 0x0FF08093, 0xFFF0A013, 0x00000393, 0x00701463, 0x02301063, 0x0FF0000F,
0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F, 0x00100193,
0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-sltiu",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00000693, 0x0006B713, 0x00000393, 0x26771263, 0x00300193,
0x00100693, 0x0016B713, 0x00000393, 0x24771863, 0x00400193, 0x00300693, 0x0076B713, 0x00100393,
0x22771E63, 0x00500193, 0x00700693, 0x0036B713, 0x00000393, 0x22771463, 0x00600193, 0x00000693,
0x8006B713, 0x00100393, 0x20771A63, 0x00700193, 0x800006B7, 0x0006B713, 0x00000393, 0x20771063,
0x00800193, 0x800006B7, 0x8006B713, 0x00100393, 0x1E771663, 0x00900193, 0x00000693, 0x7FF6B713,
0x00100393, 0x1C771C63, 0x00A00193, 0x800006B7, 0xFFF68693, 0x0006B713, 0x00000393, 0x1C771063,
0x00B00193, 0x800006B7, 0xFFF68693, 0x7FF6B713, 0x00000393, 0x1A771463, 0x00C00193, 0x800006B7,
0x7FF6B713, 0x00000393, 0x18771A63, 0x00D00193, 0x800006B7, 0xFFF68693, 0x8006B713, 0x00100393,
0x16771E63, 0x00E00193, 0x00000693, 0xFFF6B713, 0x00100393, 0x16771463, 0x00F00193, 0xFFF00693,
0x0016B713, 0x00000393, 0x14771A63, 0x01000193, 0xFFF00693, 0xFFF6B713, 0x00000393, 0x14771063,
0x01100193, 0x00B00593, 0x00D5B593, 0x00100393, 0x12759663, 0x01200193, 0x00000213, 0x00F00093,
0x00A0B713, 0x00070313, 0x00120213, 0x00200293, 0xFE5216E3, 0x00000393, 0x10731263, 0x01300193,
0x00000213, 0x00A00093, 0x0100B713, 0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFE5214E3,
0x00100393, 0x0C731C63, 0x01400193, 0x00000213, 0x01000093, 0x0090B713, 0x00000013, 0x00000013,
0x00070313, 0x00120213, 0x00200293, 0xFE5212E3, 0x00000393, 0x0A731463, 0x01500193, 0x00000213,
0x00B00093, 0x00F0B713, 0x00120213, 0x00200293, 0xFE5218E3, 0x00100393, 0x08771263, 0x01600193,
0x00000213, 0x01100093, 0x00000013, 0x0080B713, 0x00120213, 0x00200293, 0xFE5216E3, 0x00000393,
0x04771E63, 0x01700193, 0x00000213, 0x00C00093, 0x00000013, 0x00000013, 0x00E0B713, 0x00120213,
0x00200293, 0xFE5214E3, 0x00100393, 0x02771863, 0x01800193, 0xFFF03093, 0x00100393, 0x02709063,
0x01900193, 0x00FF00B7, 0x0FF08093, 0xFFF0B013, 0x00000393, 0x00701463, 0x02301063, 0x0FF0000F,
0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F, 0x00100193,
0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-sltu",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00000593, 0x00000613, 0x00C5B733, 0x00000393, 0x4A771A63,
0x00300193, 0x00100593, 0x00100613, 0x00C5B733, 0x00000393, 0x48771E63, 0x00400193, 0x00300593,
0x00700613, 0x00C5B733, 0x00100393, 0x48771263, 0x00500193, 0x00700593, 0x00300613, 0x00C5B733,
0x00000393, 0x46771663, 0x00600193, 0x00000593, 0xFFFF8637, 0x00C5B733, 0x00100393, 0x44771A63,
0x00700193, 0x800005B7, 0x00000613, 0x00C5B733, 0x00000393, 0x42771E63, 0x00800193, 0x800005B7,
0xFFFF8637, 0x00C5B733, 0x00100393, 0x42771263, 0x00900193, 0x00000593, 0x00008637, 0xFFF60613,
0x00C5B733, 0x00100393, 0x40771463, 0x00A00193, 0x800005B7, 0xFFF58593, 0x00000613, 0x00C5B733,
0x00000393, 0x3E771663, 0x00B00193, 0x800005B7, 0xFFF58593, 0x00008637, 0xFFF60613, 0x00C5B733,
0x00000393, 0x3C771663, 0x00C00193, 0x800005B7, 0x00008637, 0xFFF60613, 0x00C5B733, 0x00000393,
0x3A771863, 0x00D00193, 0x800005B7, 0xFFF58593, 0xFFFF8637, 0x00C5B733, 0x00100393, 0x38771A63,
0x00E00193, 0x00000593, 0xFFF00613, 0x00C5B733, 0x00100393, 0x36771E63, 0x00F00193, 0xFFF00593,
0x00100613, 0x00C5B733, 0x00000393, 0x36771263, 0x01000193, 0xFFF00593, 0xFFF00613, 0x00C5B733,
0x00000393, 0x34771663, 0x01100193, 0x00E00593, 0x00D00613, 0x00C5B5B3, 0x00000393, 0x32759A63,
0x01200193, 0x00B00593, 0x00D00613, 0x00C5B633, 0x00100393, 0x30761E63, 0x01300193, 0x00D00593,
0x00B5B5B3, 0x00000393, 0x30759463, 0x01400193, 0x00000213, 0x00B00093, 0x00D00113, 0x0020B733,
0x00070313, 0x00120213, 0x00200293, 0xFE5214E3, 0x00100393, 0x2C731E63, 0x01500193, 0x00000213,
0x00E00093, 0x00D00113, 0x0020B733, 0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFE5212E3,
0x00000393, 0x2A731663, 0x01600193, 0x00000213, 0x00C00093, 0x00D00113, 0x0020B733, 0x00000013,
0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFE5210E3, 0x00100393, 0x26731C63, 0x01700193,
0x00000213, 0x00E00093, 0x00D00113, 0x0020B733, 0x00120213, 0x00200293, 0xFE5216E3, 0x00000393,
0x24771863, 0x01800193, 0x00000213, 0x00B00093, 0x00D00113, 0x00000013, 0x0020B733, 0x00120213,
0x00200293, 0xFE5214E3, 0x00100393, 0x22771263, 0x01900193, 0x00000213, 0x00F00093, 0x00D00113,
0x00000013, 0x00000013, 0x0020B733, 0x00120213, 0x00200293, 0xFE5212E3, 0x00000393, 0x1E771A63,
0x01A00193, 0x00000213, 0x00A00093, 0x00000013, 0x00D00113, 0x0020B733, 0x00120213, 0x00200293,
0xFE5214E3, 0x00100393, 0x1C771463, 0x01B00193, 0x00000213, 0x01000093, 0x00000013, 0x00D00113,
0x00000013, 0x0020B733, 0x00120213, 0x00200293, 0xFE5212E3, 0x00000393, 0x18771C63, 0x01C00193,
0x00000213, 0x00900093, 0x00000013, 0x00000013, 0x00D00113, 0x0020B733, 0x00120213, 0x00200293,
0xFE5212E3, 0x00100393, 0x16771463, 0x01D00193, 0x00000213, 0x00D00113, 0x01100093, 0x0020B733,
0x00120213, 0x00200293, 0xFE5216E3, 0x00000393, 0x14771063, 0x01E00193, 0x00000213, 0x00D00113,
0x00800093, 0x00000013, 0x0020B733, 0x00120213, 0x00200293, 0xFE5214E3, 0x00100393, 0x10771A63,
0x01F00193, 0x00000213, 0x00D00113, 0x01200093, 0x00000013, 0x00000013, 0x0020B733, 0x00120213,
0x00200293, 0xFE5212E3, 0x00000393, 0x0E771263, 0x02000193, 0x00000213, 0x00D00113, 0x00000013,
0x00700093, 0x0020B733, 0x00120213, 0x00200293, 0xFE5214E3, 0x00100393, 0x0A771C63, 0x02100193,
0x00000213, 0x00D00113, 0x00000013, 0x01300093, 0x00000013, 0x0020B733, 0x00120213, 0x00200293,
0xFE5212E3, 0x00000393, 0x08771463, 0x02200193, 0x00000213, 0x00D00113, 0x00000013, 0x00000013,
0x00600093, 0x0020B733, 0x00120213, 0x00200293, 0xFE5212E3, 0x00100393, 0x04771C63, 0x02300193,
0xFFF00093, 0x00103133, 0x00100393, 0x04711263, 0x02400193, 0xFFF00093, 0x0000B133, 0x00000393,
0x02711863, 0x02500193, 0x000030B3, 0x00000393, 0x02709063, 0x02600193, 0x01000093, 0x01E00113,
0x0020B033, 0x00000393, 0x00701463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193,
0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073,
0x00000000,
},
},
{
name: "rv32ui-sra",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x800005B7, 0x00000613, 0x40C5D733, 0x800003B7, 0x58771463,
0x00300193, 0x800005B7, 0x00100613, 0x40C5D733, 0xC00003B7, 0x56771863, 0x00400193, 0x800005B7,
0x00700613, 0x40C5D733, 0xFF0003B7, 0x54771C63, 0x00500193, 0x800005B7, 0x00E00613, 0x40C5D733,
0xFFFE03B7, 0x54771063, 0x00600193, 0x800005B7, 0x00158593, 0x01F00613, 0x40C5D733, 0xFFF00393,
0x52771263, 0x00700193, 0x800005B7, 0xFFF58593, 0x00000613, 0x40C5D733, 0x800003B7, 0xFFF38393,
0x50771263, 0x00800193, 0x800005B7, 0xFFF58593, 0x00100613, 0x40C5D733, 0x400003B7, 0xFFF38393,
0x4E771263, 0x00900193, 0x800005B7, 0xFFF58593, 0x00700613, 0x40C5D733, 0x010003B7, 0xFFF38393,
0x4C771263, 0x00A00193, 0x800005B7, 0xFFF58593, 0x00E00613, 0x40C5D733, 0x000203B7, 0xFFF38393,
0x4A771263, 0x00B00193, 0x800005B7, 0xFFF58593, 0x01F00613, 0x40C5D733, 0x00000393, 0x48771463,
0x00C00193, 0x818185B7, 0x18158593, 0x00000613, 0x40C5D733, 0x818183B7, 0x18138393, 0x46771463,
0x00D00193, 0x818185B7, 0x18158593, 0x00100613, 0x40C5D733, 0xC0C0C3B7, 0x0C038393, 0x44771463,
0x00E00193, 0x818185B7, 0x18158593, 0x00700613, 0x40C5D733, 0xFF0303B7, 0x30338393, 0x42771463,
0x00F00193, 0x818185B7, 0x18158593, 0x00E00613, 0x40C5D733, 0xFFFE03B7, 0x60638393, 0x40771463,
0x01000193, 0x818185B7, 0x18158593, 0x01F00613, 0x40C5D733, 0xFFF00393, 0x3E771663, 0x01100193,
0x818185B7, 0x18158593, 0xFC000613, 0x40C5D733, 0x818183B7, 0x18138393, 0x3C771663, 0x01200193,
0x818185B7, 0x18158593, 0xFC100613, 0x40C5D733, 0xC0C0C3B7, 0x0C038393, 0x3A771663, 0x01300193,
0x818185B7, 0x18158593, 0xFC700613, 0x40C5D733, 0xFF0303B7, 0x30338393, 0x38771663, 0x01400193,
0x818185B7, 0x18158593, 0xFCE00613, 0x40C5D733, 0xFFFE03B7, 0x60638393, 0x36771663, 0x01500193,
0x818185B7, 0x18158593, 0xFFF00613, 0x40C5D733, 0xFFF00393, 0x34771863, 0x01600193, 0x800005B7,
0x00700613, 0x40C5D5B3, 0xFF0003B7, 0x32759C63, 0x01700193, 0x800005B7, 0x00E00613, 0x40C5D633,
0xFFFE03B7, 0x32761063, 0x01800193, 0x00700593, 0x40B5D5B3, 0x00000393, 0x30759663, 0x01900193,
0x00000213, 0x800000B7, 0x00700113, 0x4020D733, 0x00070313, 0x00120213, 0x00200293, 0xFE5214E3,
0xFF0003B7, 0x2E731063, 0x01A00193, 0x00000213, 0x800000B7, 0x00E00113, 0x4020D733, 0x00000013,
0x00070313, 0x00120213, 0x00200293, 0xFE5212E3, 0xFFFE03B7, 0x2A731863, 0x01B00193, 0x00000213,
0x800000B7, 0x01F00113, 0x4020D733, 0x00000013, 0x00000013, 0x00070313, 0x00120213, 0x00200293,
0xFE5210E3, 0xFFF00393, 0x26731E63, 0x01C00193, 0x00000213, 0x800000B7, 0x00700113, 0x4020D733,
0x00120213, 0x00200293, 0xFE5216E3, 0xFF0003B7, 0x24771A63, 0x01D00193, 0x00000213, 0x800000B7,
0x00E00113, 0x00000013, 0x4020D733, 0x00120213, 0x00200293, 0xFE5214E3, 0xFFFE03B7, 0x22771463,
0x01E00193, 0x00000213, 0x800000B7, 0x01F00113, 0x00000013, 0x00000013, 0x4020D733, 0x00120213,
0x00200293, 0xFE5212E3, 0xFFF00393, 0x1E771C63, 0x01F00193, 0x00000213, 0x800000B7, 0x00000013,
0x00700113, 0x4020D733, 0x00120213, 0x00200293, 0xFE5214E3, 0xFF0003B7, 0x1C771663, 0x02000193,
0x00000213, 0x800000B7, 0x00000013, 0x00E00113, 0x00000013, 0x4020D733, 0x00120213, 0x00200293,
0xFE5212E3, 0xFFFE03B7, 0x18771E63, 0x02100193, 0x00000213, 0x800000B7, 0x00000013, 0x00000013,
0x01F00113, 0x4020D733, 0x00120213, 0x00200293, 0xFE5212E3, 0xFFF00393, 0x16771663, 0x02200193,
0x00000213, 0x00700113, 0x800000B7, 0x4020D733, 0x00120213, 0x00200293, 0xFE5216E3, 0xFF0003B7,
0x14771263, 0x02300193, 0x00000213, 0x00E00113, 0x800000B7, 0x00000013, 0x4020D733, 0x00120213,
0x00200293, 0xFE5214E3, 0xFFFE03B7, 0x10771C63, 0x02400193, 0x00000213, 0x01F00113, 0x800000B7,
0x00000013, 0x00000013, 0x4020D733, 0x00120213, 0x00200293, 0xFE5212E3, 0xFFF00393, 0x0E771463,
0x02500193, 0x00000213, 0x00700113, 0x00000013, 0x800000B7, 0x4020D733, 0x00120213, 0x00200293,
0xFE5214E3, 0xFF0003B7, 0x0A771E63, 0x02600193, 0x00000213, 0x00E00113, 0x00000013, 0x800000B7,
0x00000013, 0x4020D733, 0x00120213, 0x00200293, 0xFE5212E3, 0xFFFE03B7, 0x08771663, 0x02700193,
0x00000213, 0x01F00113, 0x00000013, 0x00000013, 0x800000B7, 0x4020D733, 0x00120213, 0x00200293,
0xFE5212E3, 0xFFF00393, 0x04771E63, 0x02800193, 0x00F00093, 0x40105133, 0x00000393, 0x04711463,
0x02900193, 0x02000093, 0x4000D133, 0x02000393, 0x02711A63, 0x02A00193, 0x400050B3, 0x00000393,
0x02709263, 0x02B00193, 0x40000093, 0x00100113, 0x00B11113, 0x4020D033, 0x00000393, 0x00701463,
0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513, 0x00000073,
0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-srai",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00000693, 0x4006D713, 0x00000393, 0x2A771463, 0x00300193,
0x800006B7, 0x4016D713, 0xC00003B7, 0x28771A63, 0x00400193, 0x800006B7, 0x4076D713, 0xFF0003B7,
0x28771063, 0x00500193, 0x800006B7, 0x40E6D713, 0xFFFE03B7, 0x26771663, 0x00600193, 0x800006B7,
0x00168693, 0x41F6D713, 0xFFF00393, 0x24771A63, 0x00700193, 0x800006B7, 0xFFF68693, 0x4006D713,
0x800003B7, 0xFFF38393, 0x22771C63, 0x00800193, 0x800006B7, 0xFFF68693, 0x4016D713, 0x400003B7,
0xFFF38393, 0x20771E63, 0x00900193, 0x800006B7, 0xFFF68693, 0x4076D713, 0x010003B7, 0xFFF38393,
0x20771063, 0x00A00193, 0x800006B7, 0xFFF68693, 0x40E6D713, 0x000203B7, 0xFFF38393, 0x1E771263,
0x00B00193, 0x800006B7, 0xFFF68693, 0x41F6D713, 0x00000393, 0x1C771663, 0x00C00193, 0x818186B7,
0x18168693, 0x4006D713, 0x818183B7, 0x18138393, 0x1A771863, 0x00D00193, 0x818186B7, 0x18168693,
0x4016D713, 0xC0C0C3B7, 0x0C038393, 0x18771A63, 0x00E00193, 0x818186B7, 0x18168693, 0x4076D713,
0xFF0303B7, 0x30338393, 0x16771C63, 0x00F00193, 0x818186B7, 0x18168693, 0x40E6D713, 0xFFFE03B7,
0x60638393, 0x14771E63, 0x01000193, 0x818186B7, 0x18168693, 0x41F6D713, 0xFFF00393, 0x14771263,
0x01100193, 0x800005B7, 0x4075D593, 0xFF0003B7, 0x12759863, 0x01200193, 0x00000213, 0x800000B7,
0x4070D713, 0x00070313, 0x00120213, 0x00200293, 0xFE5216E3, 0xFF0003B7, 0x10731463, 0x01300193,
0x00000213, 0x800000B7, 0x40E0D713, 0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFE5214E3,
0xFFFE03B7, 0x0C731E63, 0x01400193, 0x00000213, 0x800000B7, 0x00108093, 0x41F0D713, 0x00000013,
0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFE5210E3, 0xFFF00393, 0x0A731463, 0x01500193,
0x00000213, 0x800000B7, 0x4070D713, 0x00120213, 0x00200293, 0xFE5218E3, 0xFF0003B7, 0x08771263,
0x01600193, 0x00000213, 0x800000B7, 0x00000013, 0x40E0D713, 0x00120213, 0x00200293, 0xFE5216E3,
0xFFFE03B7, 0x04771E63, 0x01700193, 0x00000213, 0x800000B7, 0x00108093, 0x00000013, 0x00000013,
0x41F0D713, 0x00120213, 0x00200293, 0xFE5212E3, 0xFFF00393, 0x02771663, 0x01800193, 0x40405093,
0x00000393, 0x00709E63, 0x01900193, 0x02100093, 0x40A0D013, 0x00000393, 0x00701463, 0x02301063,
0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F,
0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-srl",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x800005B7, 0x00000613, 0x00C5D733, 0x800003B7, 0x56771863,
0x00300193, 0x800005B7, 0x00100613, 0x00C5D733, 0x400003B7, 0x54771C63, 0x00400193, 0x800005B7,
0x00700613, 0x00C5D733, 0x010003B7, 0x54771063, 0x00500193, 0x800005B7, 0x00E00613, 0x00C5D733,
0x000203B7, 0x52771463, 0x00600193, 0x800005B7, 0x00158593, 0x01F00613, 0x00C5D733, 0x00100393,
0x50771663, 0x00700193, 0xFFF00593, 0x00000613, 0x00C5D733, 0xFFF00393, 0x4E771A63, 0x00800193,
0xFFF00593, 0x00100613, 0x00C5D733, 0x800003B7, 0xFFF38393, 0x4C771C63, 0x00900193, 0xFFF00593,
0x00700613, 0x00C5D733, 0x020003B7, 0xFFF38393, 0x4A771E63, 0x00A00193, 0xFFF00593, 0x00E00613,
0x00C5D733, 0x000403B7, 0xFFF38393, 0x4A771063, 0x00B00193, 0xFFF00593, 0x01F00613, 0x00C5D733,
0x00100393, 0x48771463, 0x00C00193, 0x212125B7, 0x12158593, 0x00000613, 0x00C5D733, 0x212123B7,
0x12138393, 0x46771463, 0x00D00193, 0x212125B7, 0x12158593, 0x00100613, 0x00C5D733, 0x109093B7,
0x09038393, 0x44771463, 0x00E00193, 0x212125B7, 0x12158593, 0x00700613, 0x00C5D733, 0x004243B7,
0x24238393, 0x42771463, 0x00F00193, 0x212125B7, 0x12158593, 0x00E00613, 0x00C5D733, 0x000083B7,
0x48438393, 0x40771463, 0x01000193, 0x212125B7, 0x12158593, 0x01F00613, 0x00C5D733, 0x00000393,
0x3E771663, 0x01100193, 0x212125B7, 0x12158593, 0xFC000613, 0x00C5D733, 0x212123B7, 0x12138393,
0x3C771663, 0x01200193, 0x212125B7, 0x12158593, 0xFC100613, 0x00C5D733, 0x109093B7, 0x09038393,
0x3A771663, 0x01300193, 0x212125B7, 0x12158593, 0xFC700613, 0x00C5D733, 0x004243B7, 0x24238393,
0x38771663, 0x01400193, 0x212125B7, 0x12158593, 0xFCE00613, 0x00C5D733, 0x000083B7, 0x48438393,
0x36771663, 0x01500193, 0x212125B7, 0x12158593, 0xFFF00613, 0x00C5D733, 0x00000393, 0x34771863,
0x01600193, 0x800005B7, 0x00700613, 0x00C5D5B3, 0x010003B7, 0x32759C63, 0x01700193, 0x800005B7,
0x00E00613, 0x00C5D633, 0x000203B7, 0x32761063, 0x01800193, 0x00700593, 0x00B5D5B3, 0x00000393,
0x30759663, 0x01900193, 0x00000213, 0x800000B7, 0x00700113, 0x0020D733, 0x00070313, 0x00120213,
0x00200293, 0xFE5214E3, 0x010003B7, 0x2E731063, 0x01A00193, 0x00000213, 0x800000B7, 0x00E00113,
0x0020D733, 0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFE5212E3, 0x000203B7, 0x2A731863,
0x01B00193, 0x00000213, 0x800000B7, 0x01F00113, 0x0020D733, 0x00000013, 0x00000013, 0x00070313,
0x00120213, 0x00200293, 0xFE5210E3, 0x00100393, 0x26731E63, 0x01C00193, 0x00000213, 0x800000B7,
0x00700113, 0x0020D733, 0x00120213, 0x00200293, 0xFE5216E3, 0x010003B7, 0x24771A63, 0x01D00193,
0x00000213, 0x800000B7, 0x00E00113, 0x00000013, 0x0020D733, 0x00120213, 0x00200293, 0xFE5214E3,
0x000203B7, 0x22771463, 0x01E00193, 0x00000213, 0x800000B7, 0x01F00113, 0x00000013, 0x00000013,
0x0020D733, 0x00120213, 0x00200293, 0xFE5212E3, 0x00100393, 0x1E771C63, 0x01F00193, 0x00000213,
0x800000B7, 0x00000013, 0x00700113, 0x0020D733, 0x00120213, 0x00200293, 0xFE5214E3, 0x010003B7,
0x1C771663, 0x02000193, 0x00000213, 0x800000B7, 0x00000013, 0x00E00113, 0x00000013, 0x0020D733,
0x00120213, 0x00200293, 0xFE5212E3, 0x000203B7, 0x18771E63, 0x02100193, 0x00000213, 0x800000B7,
0x00000013, 0x00000013, 0x01F00113, 0x0020D733, 0x00120213, 0x00200293, 0xFE5212E3, 0x00100393,
0x16771663, 0x02200193, 0x00000213, 0x00700113, 0x800000B7, 0x0020D733, 0x00120213, 0x00200293,
0xFE5216E3, 0x010003B7, 0x14771263, 0x02300193, 0x00000213, 0x00E00113, 0x800000B7, 0x00000013,
0x0020D733, 0x00120213, 0x00200293, 0xFE5214E3, 0x000203B7, 0x10771C63, 0x02400193, 0x00000213,
0x01F00113, 0x800000B7, 0x00000013, 0x00000013, 0x0020D733, 0x00120213, 0x00200293, 0xFE5212E3,
0x00100393, 0x0E771463, 0x02500193, 0x00000213, 0x00700113, 0x00000013, 0x800000B7, 0x0020D733,
0x00120213, 0x00200293, 0xFE5214E3, 0x010003B7, 0x0A771E63, 0x02600193, 0x00000213, 0x00E00113,
0x00000013, 0x800000B7, 0x00000013, 0x0020D733, 0x00120213, 0x00200293, 0xFE5212E3, 0x000203B7,
0x08771663, 0x02700193, 0x00000213, 0x01F00113, 0x00000013, 0x00000013, 0x800000B7, 0x0020D733,
0x00120213, 0x00200293, 0xFE5212E3, 0x00100393, 0x04771E63, 0x02800193, 0x00F00093, 0x00105133,
0x00000393, 0x04711463, 0x02900193, 0x02000093, 0x0000D133, 0x02000393, 0x02711A63, 0x02A00193,
0x000050B3, 0x00000393, 0x02709263, 0x02B00193, 0x40000093, 0x00100113, 0x00B11113, 0x0020D033,
0x00000393, 0x00701463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893,
0x00018513, 0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-srli",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x800006B7, 0x0006D713, 0x800003B7, 0x28771863, 0x00300193,
0x800006B7, 0x0016D713, 0x400003B7, 0x26771E63, 0x00400193, 0x800006B7, 0x0076D713, 0x010003B7,
0x26771463, 0x00500193, 0x800006B7, 0x00E6D713, 0x000203B7, 0x24771A63, 0x00600193, 0x800006B7,
0x00168693, 0x01F6D713, 0x00100393, 0x22771E63, 0x00700193, 0xFFF00693, 0x0006D713, 0xFFF00393,
0x22771463, 0x00800193, 0xFFF00693, 0x0016D713, 0x800003B7, 0xFFF38393, 0x20771863, 0x00900193,
0xFFF00693, 0x0076D713, 0x020003B7, 0xFFF38393, 0x1E771C63, 0x00A00193, 0xFFF00693, 0x00E6D713,
0x000403B7, 0xFFF38393, 0x1E771063, 0x00B00193, 0xFFF00693, 0x01F6D713, 0x00100393, 0x1C771663,
0x00C00193, 0x212126B7, 0x12168693, 0x0006D713, 0x212123B7, 0x12138393, 0x1A771863, 0x00D00193,
0x212126B7, 0x12168693, 0x0016D713, 0x109093B7, 0x09038393, 0x18771A63, 0x00E00193, 0x212126B7,
0x12168693, 0x0076D713, 0x004243B7, 0x24238393, 0x16771C63, 0x00F00193, 0x212126B7, 0x12168693,
0x00E6D713, 0x000083B7, 0x48438393, 0x14771E63, 0x01000193, 0x212126B7, 0x12168693, 0x01F6D713,
0x00000393, 0x14771263, 0x01100193, 0x800005B7, 0x0075D593, 0x010003B7, 0x12759863, 0x01200193,
0x00000213, 0x800000B7, 0x0070D713, 0x00070313, 0x00120213, 0x00200293, 0xFE5216E3, 0x010003B7,
0x10731463, 0x01300193, 0x00000213, 0x800000B7, 0x00E0D713, 0x00000013, 0x00070313, 0x00120213,
0x00200293, 0xFE5214E3, 0x000203B7, 0x0C731E63, 0x01400193, 0x00000213, 0x800000B7, 0x00108093,
0x01F0D713, 0x00000013, 0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFE5210E3, 0x00100393,
0x0A731463, 0x01500193, 0x00000213, 0x800000B7, 0x0070D713, 0x00120213, 0x00200293, 0xFE5218E3,
0x010003B7, 0x08771263, 0x01600193, 0x00000213, 0x800000B7, 0x00000013, 0x00E0D713, 0x00120213,
0x00200293, 0xFE5216E3, 0x000203B7, 0x04771E63, 0x01700193, 0x00000213, 0x800000B7, 0x00108093,
0x00000013, 0x00000013, 0x01F0D713, 0x00120213, 0x00200293, 0xFE5212E3, 0x00100393, 0x02771663,
0x01800193, 0x00405093, 0x00000393, 0x00709E63, 0x01900193, 0x02100093, 0x00A0D013, 0x00000393,
0x00701463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513,
0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-st_ld",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x0003F117, 0xFF410113, 0xFDD00093, 0x00110023, 0x00010703,
0xFDD00393, 0x6C771663, 0x00300193, 0x0003F117, 0xFD410113, 0xFCD00093, 0x001100A3, 0x00110703,
0xFCD00393, 0x6A771663, 0x00400193, 0x0003F117, 0xFB410113, 0xFCC00093, 0x00110123, 0x00210703,
0xFCC00393, 0x68771663, 0x00500193, 0x0003F117, 0xF9410113, 0xFBC00093, 0x001101A3, 0x00310703,
0xFBC00393, 0x66771663, 0x00600193, 0x0003F117, 0xF7410113, 0xFBB00093, 0x00110223, 0x00410703,
0xFBB00393, 0x64771663, 0x00700193, 0x0003F117, 0xF5410113, 0xFAB00093, 0x001102A3, 0x00510703,
0xFAB00393, 0x62771663, 0x00800193, 0x0003F117, 0xF3410113, 0x03300093, 0x00110023, 0x00010703,
0x03300393, 0x60771663, 0x00900193, 0x0003F117, 0xF1410113, 0x02300093, 0x001100A3, 0x00110703,
0x02300393, 0x5E771663, 0x00A00193, 0x0003F117, 0xEF410113, 0x02200093, 0x00110123, 0x00210703,
0x02200393, 0x5C771663, 0x00B00193, 0x0003F117, 0xED410113, 0x01200093, 0x001101A3, 0x00310703,
0x01200393, 0x5A771663, 0x00C00193, 0x0003F117, 0xEB410113, 0x01100093, 0x00110223, 0x00410703,
0x01100393, 0x58771663, 0x00D00193, 0x0003F117, 0xE9410113, 0x00100093, 0x001102A3, 0x00510703,
0x00100393, 0x56771663, 0x00E00193, 0x0003F117, 0xE7410113, 0x03300093, 0x00110023, 0x00014703,
0x03300393, 0x54771663, 0x00F00193, 0x0003F117, 0xE5410113, 0x02300093, 0x001100A3, 0x00114703,
0x02300393, 0x52771663, 0x01000193, 0x0003F117, 0xE3410113, 0x02200093, 0x00110123, 0x00214703,
0x02200393, 0x50771663, 0x01100193, 0x0003F117, 0xE1410113, 0x01200093, 0x001101A3, 0x00314703,
0x01200393, 0x4E771663, 0x01200193, 0x0003F117, 0xDF410113, 0x01100093, 0x00110223, 0x00414703,
0x01100393, 0x4C771663, 0x01300193, 0x0003F117, 0xDD410113, 0x00100093, 0x001102A3, 0x00514703,
0x00100393, 0x4A771663, 0x01400193, 0x0003F117, 0xDB410113, 0xAABBD0B7, 0xCDD08093, 0x00112023,
0x00012703, 0xAABBD3B7, 0xCDD38393, 0x48771263, 0x01500193, 0x0003F117, 0xD8C10113, 0xDAABC0B7,
0xCCD08093, 0x00112223, 0x00412703, 0xDAABC3B7, 0xCCD38393, 0x44771E63, 0x01600193, 0x0003F117,
0xD6410113, 0xDDAAC0B7, 0xBCC08093, 0x00112423, 0x00812703, 0xDDAAC3B7, 0xBCC38393, 0x42771A63,
0x01700193, 0x0003F117, 0xD3C10113, 0xCDDAB0B7, 0xBBC08093, 0x00112623, 0x00C12703, 0xCDDAB3B7,
0xBBC38393, 0x40771663, 0x01800193, 0x0003F117, 0xD1410113, 0xCCDDB0B7, 0xABB08093, 0x00112823,
0x01012703, 0xCCDDB3B7, 0xABB38393, 0x3E771263, 0x01900193, 0x0003F117, 0xCEC10113, 0xBCCDE0B7,
0xAAB08093, 0x00112A23, 0x01412703, 0xBCCDE3B7, 0xAAB38393, 0x3A771E63, 0x01A00193, 0x0003F117,
0xCC410113, 0x001120B7, 0x23308093, 0x00112023, 0x00012703, 0x001123B7, 0x23338393, 0x38771A63,
0x01B00193, 0x0003F117, 0xC9C10113, 0x300110B7, 0x22308093, 0x00112223, 0x00412703, 0x300113B7,
0x22338393, 0x36771663, 0x01C00193, 0x0003F117, 0xC7410113, 0x330010B7, 0x12208093, 0x00112423,
0x00812703, 0x330013B7, 0x12238393, 0x34771263, 0x01D00193, 0x0003F117, 0xC4C10113, 0x233000B7,
0x11208093, 0x00112623, 0x00C12703, 0x233003B7, 0x11238393, 0x30771E63, 0x01E00193, 0x0003F117,
0xC2410113, 0x223300B7, 0x01108093, 0x00112823, 0x01012703, 0x223303B7, 0x01138393, 0x2E771A63,
0x01F00193, 0x0003F117, 0xBFC10113, 0x122330B7, 0x00108093, 0x00112A23, 0x01412703, 0x122333B7,
0x00138393, 0x2C771663, 0x02000193, 0x0003F117, 0xBD410113, 0xFFFFD0B7, 0xCDD08093, 0x00111023,
0x00011703, 0xFFFFD3B7, 0xCDD38393, 0x2A771263, 0x02100193, 0x0003F117, 0xBAC10113, 0xFFFFC0B7,
0xCCD08093, 0x00111123, 0x00211703, 0xFFFFC3B7, 0xCCD38393, 0x26771E63, 0x02200193, 0x0003F117,
0xB8410113, 0xFFFFC0B7, 0xBCC08093, 0x00111223, 0x00411703, 0xFFFFC3B7, 0xBCC38393, 0x24771A63,
0x02300193, 0x0003F117, 0xB5C10113, 0xFFFFB0B7, 0xBBC08093, 0x00111323, 0x00611703, 0xFFFFB3B7,
0xBBC38393, 0x22771663, 0x02400193, 0x0003F117, 0xB3410113, 0xFFFFB0B7, 0xABB08093, 0x00111423,
0x00811703, 0xFFFFB3B7, 0xABB38393, 0x20771263, 0x02500193, 0x0003F117, 0xB0C10113, 0xFFFFE0B7,
0xAAB08093, 0x00111523, 0x00A11703, 0xFFFFE3B7, 0xAAB38393, 0x1C771E63, 0x02600193, 0x0003F117,
0xAE410113, 0x000020B7, 0x23308093, 0x00111023, 0x00011703, 0x000023B7, 0x23338393, 0x1A771A63,
0x02700193, 0x0003F117, 0xABC10113, 0x000010B7, 0x22308093, 0x00111123, 0x00211703, 0x000013B7,
0x22338393, 0x18771663, 0x02800193, 0x0003F117, 0xA9410113, 0x000010B7, 0x12208093, 0x00111223,
0x00411703, 0x000013B7, 0x12238393, 0x16771263, 0x02900193, 0x0003F117, 0xA6C10113, 0x11200093,
0x00111323, 0x00611703, 0x11200393, 0x14771263, 0x02A00193, 0x0003F117, 0xA4C10113, 0x01100093,
0x00111423, 0x00811703, 0x01100393, 0x12771263, 0x02B00193, 0x0003F117, 0xA2C10113, 0x000030B7,
0x00108093, 0x00111523, 0x00A11703, 0x000033B7, 0x00138393, 0x0E771E63, 0x02C00193, 0x0003F117,
0xA0410113, 0x000020B7, 0x23308093, 0x00111023, 0x00015703, 0x000023B7, 0x23338393, 0x0C771A63,
0x02D00193, 0x0003F117, 0x9DC10113, 0x000010B7, 0x22308093, 0x00111123, 0x00215703, 0x000013B7,
0x22338393, 0x0A771663, 0x02E00193, 0x0003F117, 0x9B410113, 0x000010B7, 0x12208093, 0x00111223,
0x00415703, 0x000013B7, 0x12238393, 0x08771263, 0x02F00193, 0x0003F117, 0x98C10113, 0x11200093,
0x00111323, 0x00615703, 0x11200393, 0x06771263, 0x03000193, 0x0003F117, 0x96C10113, 0x01100093,
0x00111423, 0x00815703, 0x01100393, 0x04771263, 0x03100193, 0x0003F117, 0x94C10113, 0x000030B7,
0x00108093, 0x00111523, 0x00A15703, 0x000033B7, 0x00138393, 0x00771E63, 0x0EF00513, 0x0003F597,
0x92458593, 0x00A581A3, 0x00358603, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193,
0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073,
0x00000000,
},
data: []uint32{
0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF,
0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF,
0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF,
},
},
{
name: "rv32ui-sub",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00000593, 0x00000613, 0x40C58733, 0x00000393, 0x4A771663,
0x00300193, 0x00100593, 0x00100613, 0x40C58733, 0x00000393, 0x48771A63, 0x00400193, 0x00300593,
0x00700613, 0x40C58733, 0xFFC00393, 0x46771E63, 0x00500193, 0x00000593, 0xFFFF8637, 0x40C58733,
0x000083B7, 0x46771263, 0x00600193, 0x800005B7, 0x00000613, 0x40C58733, 0x800003B7, 0x44771663,
0x00700193, 0x800005B7, 0xFFFF8637, 0x40C58733, 0x800083B7, 0x42771A63, 0x00800193, 0x00000593,
0x00008637, 0xFFF60613, 0x40C58733, 0xFFFF83B7, 0x00138393, 0x40771A63, 0x00900193, 0x800005B7,
0xFFF58593, 0x00000613, 0x40C58733, 0x800003B7, 0xFFF38393, 0x3E771A63, 0x00A00193, 0x800005B7,
0xFFF58593, 0x00008637, 0xFFF60613, 0x40C58733, 0x7FFF83B7, 0x3C771A63, 0x00B00193, 0x800005B7,
0x00008637, 0xFFF60613, 0x40C58733, 0x7FFF83B7, 0x00138393, 0x3A771A63, 0x00C00193, 0x800005B7,
0xFFF58593, 0xFFFF8637, 0x40C58733, 0x800083B7, 0xFFF38393, 0x38771A63, 0x00D00193, 0x00000593,
0xFFF00613, 0x40C58733, 0x00100393, 0x36771E63, 0x00E00193, 0xFFF00593, 0x00100613, 0x40C58733,
0xFFE00393, 0x36771263, 0x00F00193, 0xFFF00593, 0xFFF00613, 0x40C58733, 0x00000393, 0x34771663,
0x01000193, 0x00D00593, 0x00B00613, 0x40C585B3, 0x00200393, 0x32759A63, 0x01100193, 0x00E00593,
0x00B00613, 0x40C58633, 0x00300393, 0x30761E63, 0x01200193, 0x00D00593, 0x40B585B3, 0x00000393,
0x30759463, 0x01300193, 0x00000213, 0x00D00093, 0x00B00113, 0x40208733, 0x00070313, 0x00120213,
0x00200293, 0xFE5214E3, 0x00200393, 0x2C731E63, 0x01400193, 0x00000213, 0x00E00093, 0x00B00113,
0x40208733, 0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFE5212E3, 0x00300393, 0x2A731663,
0x01500193, 0x00000213, 0x00F00093, 0x00B00113, 0x40208733, 0x00000013, 0x00000013, 0x00070313,
0x00120213, 0x00200293, 0xFE5210E3, 0x00400393, 0x26731C63, 0x01600193, 0x00000213, 0x00D00093,
0x00B00113, 0x40208733, 0x00120213, 0x00200293, 0xFE5216E3, 0x00200393, 0x24771863, 0x01700193,
0x00000213, 0x00E00093, 0x00B00113, 0x00000013, 0x40208733, 0x00120213, 0x00200293, 0xFE5214E3,
0x00300393, 0x22771263, 0x01800193, 0x00000213, 0x00F00093, 0x00B00113, 0x00000013, 0x00000013,
0x40208733, 0x00120213, 0x00200293, 0xFE5212E3, 0x00400393, 0x1E771A63, 0x01900193, 0x00000213,
0x00D00093, 0x00000013, 0x00B00113, 0x40208733, 0x00120213, 0x00200293, 0xFE5214E3, 0x00200393,
0x1C771463, 0x01A00193, 0x00000213, 0x00E00093, 0x00000013, 0x00B00113, 0x00000013, 0x40208733,
0x00120213, 0x00200293, 0xFE5212E3, 0x00300393, 0x18771C63, 0x01B00193, 0x00000213, 0x00F00093,
0x00000013, 0x00000013, 0x00B00113, 0x40208733, 0x00120213, 0x00200293, 0xFE5212E3, 0x00400393,
0x16771463, 0x01C00193, 0x00000213, 0x00B00113, 0x00D00093, 0x40208733, 0x00120213, 0x00200293,
0xFE5216E3, 0x00200393, 0x14771063, 0x01D00193, 0x00000213, 0x00B00113, 0x00E00093, 0x00000013,
0x40208733, 0x00120213, 0x00200293, 0xFE5214E3, 0x00300393, 0x10771A63, 0x01E00193, 0x00000213,
0x00B00113, 0x00F00093, 0x00000013, 0x00000013, 0x40208733, 0x00120213, 0x00200293, 0xFE5212E3,
0x00400393, 0x0E771263, 0x01F00193, 0x00000213, 0x00B00113, 0x00000013, 0x00D00093, 0x40208733,
0x00120213, 0x00200293, 0xFE5214E3, 0x00200393, 0x0A771C63, 0x02000193, 0x00000213, 0x00B00113,
0x00000013, 0x00E00093, 0x00000013, 0x40208733, 0x00120213, 0x00200293, 0xFE5212E3, 0x00300393,
0x08771463, 0x02100193, 0x00000213, 0x00B00113, 0x00000013, 0x00000013, 0x00F00093, 0x40208733,
0x00120213, 0x00200293, 0xFE5212E3, 0x00400393, 0x04771C63, 0x02200193, 0xFF100093, 0x40100133,
0x00F00393, 0x04711263, 0x02300193, 0x02000093, 0x40008133, 0x02000393, 0x02711863, 0x02400193,
0x400000B3, 0x00000393, 0x02709063, 0x02500193, 0x01000093, 0x01E00113, 0x40208033, 0x00000393,
0x00701463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513,
0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-sw",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x0003F117, 0xFF410113, 0x00AA00B7, 0x0AA08093, 0x00000797,
0x01478793, 0x00112023, 0x00012703, 0x0080006F, 0x00008713, 0x00AA03B7, 0x0AA38393, 0x4C771863,
0x00300193, 0x0003F117, 0xFBC10113, 0xAA00B0B7, 0xA0008093, 0x00000797, 0x01478793, 0x00112223,
0x00412703, 0x0080006F, 0x00008713, 0xAA00B3B7, 0xA0038393, 0x48771C63, 0x00400193, 0x0003F117,
0xF8410113, 0x0AA010B7, 0xAA008093, 0x00000797, 0x01478793, 0x00112423, 0x00812703, 0x0080006F,
0x00008713, 0x0AA013B7, 0xAA038393, 0x46771063, 0x00500193, 0x0003F117, 0xF4C10113, 0xA00AA0B7,
0x00A08093, 0x00000797, 0x01478793, 0x00112623, 0x00C12703, 0x0080006F, 0x00008713, 0xA00AA3B7,
0x00A38393, 0x42771463, 0x00600193, 0x0003F117, 0xF3010113, 0x00AA00B7, 0x0AA08093, 0x00000797,
0x01478793, 0xFE112A23, 0xFF412703, 0x0080006F, 0x00008713, 0x00AA03B7, 0x0AA38393, 0x3E771863,
0x00700193, 0x0003F117, 0xEF810113, 0xAA00B0B7, 0xA0008093, 0x00000797, 0x01478793, 0xFE112C23,
0xFF812703, 0x0080006F, 0x00008713, 0xAA00B3B7, 0xA0038393, 0x3A771C63, 0x00800193, 0x0003F117,
0xEC010113, 0x0AA010B7, 0xAA008093, 0x00000797, 0x01478793, 0xFE112E23, 0xFFC12703, 0x0080006F,
0x00008713, 0x0AA013B7, 0xAA038393, 0x38771063, 0x00900193, 0x0003F117, 0xE8810113, 0xA00AA0B7,
0x00A08093, 0x00000797, 0x01478793, 0x00112023, 0x00012703, 0x0080006F, 0x00008713, 0xA00AA3B7,
0x00A38393, 0x34771463, 0x00A00193, 0x0003F097, 0xE5408093, 0x12345137, 0x67810113, 0xFE008213,
0x02222023, 0x0000A283, 0x123453B7, 0x67838393, 0x30729E63, 0x00B00193, 0x0003F097, 0xE2808093,
0x58213137, 0x09810113, 0xFFD08093, 0x0020A3A3, 0x0003F217, 0xE1420213, 0x00022283, 0x582133B7,
0x09838393, 0x2E729463, 0x00C00193, 0x00000213, 0xAABBD6B7, 0xCDD68693, 0x0003F617, 0xDC860613,
0x00D62023, 0x00062703, 0xAABBD3B7, 0xCDD38393, 0x2A771E63, 0x00120213, 0x00200293, 0xFC521AE3,
0x00D00193, 0x00000213, 0xDAABC6B7, 0xCCD68693, 0x0003F617, 0xD9060613, 0x00000013, 0x00D62223,
0x00462703, 0xDAABC3B7, 0xCCD38393, 0x28771063, 0x00120213, 0x00200293, 0xFC5218E3, 0x00E00193,
0x00000213, 0xDDAAC6B7, 0xBCC68693, 0x0003F617, 0xD5460613, 0x00000013, 0x00000013, 0x00D62423,
0x00862703, 0xDDAAC3B7, 0xBCC38393, 0x24771063, 0x00120213, 0x00200293, 0xFC5216E3, 0x00F00193,
0x00000213, 0xCDDAB6B7, 0xBBC68693, 0x00000013, 0x0003F617, 0xD1060613, 0x00D62623, 0x00C62703,
0xCDDAB3B7, 0xBBC38393, 0x20771263, 0x00120213, 0x00200293, 0xFC5218E3, 0x01000193, 0x00000213,
0xCCDDB6B7, 0xABB68693, 0x00000013, 0x0003F617, 0xCD460613, 0x00000013, 0x00D62823, 0x01062703,
0xCCDDB3B7, 0xABB38393, 0x1C771263, 0x00120213, 0x00200293, 0xFC5216E3, 0x01100193, 0x00000213,
0xBCCDE6B7, 0xAAB68693, 0x00000013, 0x00000013, 0x0003F617, 0xC9060613, 0x00D62A23, 0x01462703,
0xBCCDE3B7, 0xAAB38393, 0x18771263, 0x00120213, 0x00200293, 0xFC5216E3, 0x01200193, 0x00000213,
0x0003F117, 0xC6010113, 0x001120B7, 0x23308093, 0x00112023, 0x00012703, 0x001123B7, 0x23338393,
0x14771663, 0x00120213, 0x00200293, 0xFC521AE3, 0x01300193, 0x00000213, 0x0003F117, 0xC2810113,
0x300110B7, 0x22308093, 0x00000013, 0x00112223, 0x00412703, 0x300113B7, 0x22338393, 0x10771863,
0x00120213, 0x00200293, 0xFC5218E3, 0x01400193, 0x00000213, 0x0003F117, 0xBEC10113, 0x330010B7,
0x12208093, 0x00000013, 0x00000013, 0x00112423, 0x00812703, 0x330013B7, 0x12238393, 0x0C771863,
0x00120213, 0x00200293, 0xFC5216E3, 0x01500193, 0x00000213, 0x0003F117, 0xBAC10113, 0x00000013,
0x233000B7, 0x11208093, 0x00112623, 0x00C12703, 0x233003B7, 0x11238393, 0x08771A63, 0x00120213,
0x00200293, 0xFC5218E3, 0x01600193, 0x00000213, 0x0003F117, 0xB7010113, 0x00000013, 0x223300B7,
0x01108093, 0x00000013, 0x00112823, 0x01012703, 0x223303B7, 0x01138393, 0x04771A63, 0x00120213,
0x00200293, 0xFC5216E3, 0x01700193, 0x00000213, 0x0003F117, 0xB3010113, 0x00000013, 0x00000013,
0x122330B7, 0x00108093, 0x00112A23, 0x01412703, 0x122333B7, 0x00138393, 0x00771A63, 0x00120213,
0x00200293, 0xFC5216E3, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893,
0x00018513, 0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
data: []uint32{
0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF,
0xDEADBEEF, 0xDEADBEEF, 0x00000000, 0x00000000,
},
},
{
name: "rv32ui-xor",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0xFF0105B7, 0xF0058593, 0x0F0F1637, 0xF0F60613, 0x00C5C733,
0xF00FF3B7, 0x00F38393, 0x4A771063, 0x00300193, 0x0FF015B7, 0xFF058593, 0xF0F0F637, 0x0F060613,
0x00C5C733, 0xFF0103B7, 0xF0038393, 0x46771E63, 0x00400193, 0x00FF05B7, 0x0FF58593, 0x0F0F1637,
0xF0F60613, 0x00C5C733, 0x0FF013B7, 0xFF038393, 0x44771C63, 0x00500193, 0xF00FF5B7, 0x00F58593,
0xF0F0F637, 0x0F060613, 0x00C5C733, 0x00FF03B7, 0x0FF38393, 0x42771A63, 0x00600193, 0xFF0105B7,
0xF0058593, 0x0F0F1637, 0xF0F60613, 0x00C5C5B3, 0xF00FF3B7, 0x00F38393, 0x40759863, 0x00700193,
0xFF0105B7, 0xF0058593, 0x0F0F1637, 0xF0F60613, 0x00C5C633, 0xF00FF3B7, 0x00F38393, 0x3E761663,
0x00800193, 0xFF0105B7, 0xF0058593, 0x00B5C5B3, 0x00000393, 0x3C759A63, 0x00900193, 0x00000213,
0xFF0100B7, 0xF0008093, 0x0F0F1137, 0xF0F10113, 0x0020C733, 0x00070313, 0x00120213, 0x00200293,
0xFE5210E3, 0xF00FF3B7, 0x00F38393, 0x38731E63, 0x00A00193, 0x00000213, 0x0FF010B7, 0xFF008093,
0xF0F0F137, 0x0F010113, 0x0020C733, 0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFC521EE3,
0xFF0103B7, 0xF0038393, 0x36731063, 0x00B00193, 0x00000213, 0x00FF00B7, 0x0FF08093, 0x0F0F1137,
0xF0F10113, 0x0020C733, 0x00000013, 0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFC521CE3,
0x0FF013B7, 0xFF038393, 0x32731063, 0x00C00193, 0x00000213, 0xFF0100B7, 0xF0008093, 0x0F0F1137,
0xF0F10113, 0x0020C733, 0x00120213, 0x00200293, 0xFE5212E3, 0xF00FF3B7, 0x00F38393, 0x2E771663,
0x00D00193, 0x00000213, 0x0FF010B7, 0xFF008093, 0xF0F0F137, 0x0F010113, 0x00000013, 0x0020C733,
0x00120213, 0x00200293, 0xFE5210E3, 0xFF0103B7, 0xF0038393, 0x2A771A63, 0x00E00193, 0x00000213,
0x00FF00B7, 0x0FF08093, 0x0F0F1137, 0xF0F10113, 0x00000013, 0x00000013, 0x0020C733, 0x00120213,
0x00200293, 0xFC521EE3, 0x0FF013B7, 0xFF038393, 0x26771C63, 0x00F00193, 0x00000213, 0xFF0100B7,
0xF0008093, 0x00000013, 0x0F0F1137, 0xF0F10113, 0x0020C733, 0x00120213, 0x00200293, 0xFE5210E3,
0xF00FF3B7, 0x00F38393, 0x24771063, 0x01000193, 0x00000213, 0x0FF010B7, 0xFF008093, 0x00000013,
0xF0F0F137, 0x0F010113, 0x00000013, 0x0020C733, 0x00120213, 0x00200293, 0xFC521EE3, 0xFF0103B7,
0xF0038393, 0x20771263, 0x01100193, 0x00000213, 0x00FF00B7, 0x0FF08093, 0x00000013, 0x00000013,
0x0F0F1137, 0xF0F10113, 0x0020C733, 0x00120213, 0x00200293, 0xFC521EE3, 0x0FF013B7, 0xFF038393,
0x1C771463, 0x01200193, 0x00000213, 0x0F0F1137, 0xF0F10113, 0xFF0100B7, 0xF0008093, 0x0020C733,
0x00120213, 0x00200293, 0xFE5212E3, 0xF00FF3B7, 0x00F38393, 0x18771A63, 0x01300193, 0x00000213,
0xF0F0F137, 0x0F010113, 0x0FF010B7, 0xFF008093, 0x00000013, 0x0020C733, 0x00120213, 0x00200293,
0xFE5210E3, 0xFF0103B7, 0xF0038393, 0x14771E63, 0x01400193, 0x00000213, 0x0F0F1137, 0xF0F10113,
0x00FF00B7, 0x0FF08093, 0x00000013, 0x00000013, 0x0020C733, 0x00120213, 0x00200293, 0xFC521EE3,
0x0FF013B7, 0xFF038393, 0x12771063, 0x01500193, 0x00000213, 0x0F0F1137, 0xF0F10113, 0x00000013,
0xFF0100B7, 0xF0008093, 0x0020C733, 0x00120213, 0x00200293, 0xFE5210E3, 0xF00FF3B7, 0x00F38393,
0x0E771463, 0x01600193, 0x00000213, 0xF0F0F137, 0x0F010113, 0x00000013, 0x0FF010B7, 0xFF008093,
0x00000013, 0x0020C733, 0x00120213, 0x00200293, 0xFC521EE3, 0xFF0103B7, 0xF0038393, 0x0A771663,
0x01700193, 0x00000213, 0x0F0F1137, 0xF0F10113, 0x00000013, 0x00000013, 0x00FF00B7, 0x0FF08093,
0x0020C733, 0x00120213, 0x00200293, 0xFC521EE3, 0x0FF013B7, 0xFF038393, 0x06771863, 0x01800193,
0xFF0100B7, 0xF0008093, 0x00104133, 0xFF0103B7, 0xF0038393, 0x04711A63, 0x01900193, 0x00FF00B7,
0x0FF08093, 0x0000C133, 0x00FF03B7, 0x0FF38393, 0x02711C63, 0x01A00193, 0x000040B3, 0x00000393,
0x02709463, 0x01B00193, 0x111110B7, 0x11108093, 0x22222137, 0x22210113, 0x0020C033, 0x00000393,
0x00701463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513,
0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32ui-xori",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00FF16B7, 0xF0068693, 0xF0F6C713, 0xFF00F3B7, 0x00F38393,
0x1C771663, 0x00300193, 0x0FF016B7, 0xFF068693, 0x0F06C713, 0x0FF013B7, 0xF0038393, 0x1A771863,
0x00400193, 0x00FF16B7, 0x8FF68693, 0x70F6C713, 0x00FF13B7, 0xFF038393, 0x18771A63, 0x00500193,
0xF00FF6B7, 0x00F68693, 0x0F06C713, 0xF00FF3B7, 0x0FF38393, 0x16771C63, 0x00600193, 0xFF00F5B7,
0x70058593, 0x70F5C593, 0xFF00F3B7, 0x00F38393, 0x14759E63, 0x00700193, 0x00000213, 0x0FF010B7,
0xFF008093, 0x0F00C713, 0x00070313, 0x00120213, 0x00200293, 0xFE5214E3, 0x0FF013B7, 0xF0038393,
0x12731663, 0x00800193, 0x00000213, 0x00FF10B7, 0x8FF08093, 0x70F0C713, 0x00000013, 0x00070313,
0x00120213, 0x00200293, 0xFE5212E3, 0x00FF13B7, 0xFF038393, 0x0E731C63, 0x00900193, 0x00000213,
0xF00FF0B7, 0x00F08093, 0x0F00C713, 0x00000013, 0x00000013, 0x00070313, 0x00120213, 0x00200293,
0xFE5210E3, 0xF00FF3B7, 0x0FF38393, 0x0C731063, 0x00A00193, 0x00000213, 0x0FF010B7, 0xFF008093,
0x0F00C713, 0x00120213, 0x00200293, 0xFE5216E3, 0x0FF013B7, 0xF0038393, 0x08771A63, 0x00B00193,
0x00000213, 0x00FF10B7, 0xFFF08093, 0x00000013, 0x00F0C713, 0x00120213, 0x00200293, 0xFE5214E3,
0x00FF13B7, 0xFF038393, 0x06771263, 0x00C00193, 0x00000213, 0xF00FF0B7, 0x00F08093, 0x00000013,
0x00000013, 0x0F00C713, 0x00120213, 0x00200293, 0xFE5212E3, 0xF00FF3B7, 0x0FF38393, 0x02771863,
0x00D00193, 0x0F004093, 0x0F000393, 0x02709063, 0x00E00193, 0x00FF00B7, 0x0FF08093, 0x70F0C013,
0x00000393, 0x00701463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893,
0x00018513, 0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32um-div",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x01400593, 0x00600613, 0x02C5C733, 0x00300393, 0x0C771463,
0x00300193, 0xFEC00593, 0x00600613, 0x02C5C733, 0xFFD00393, 0x0A771863, 0x00400193, 0x01400593,
0xFFA00613, 0x02C5C733, 0xFFD00393, 0x08771C63, 0x00500193, 0xFEC00593, 0xFFA00613, 0x02C5C733,
0x00300393, 0x08771063, 0x00600193, 0x800005B7, 0x00100613, 0x02C5C733, 0x800003B7, 0x06771463,
0x00700193, 0x800005B7, 0xFFF00613, 0x02C5C733, 0x800003B7, 0x04771863, 0x00800193, 0x800005B7,
0x00000613, 0x02C5C733, 0xFFF00393, 0x02771C63, 0x00900193, 0x00100593, 0x00000613, 0x02C5C733,
0xFFF00393, 0x02771063, 0x00A00193, 0x00000593, 0x00000613, 0x02C5C733, 0xFFF00393, 0x00771463,
0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513, 0x00000073,
0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32um-divu",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x01400593, 0x00600613, 0x02C5D733, 0x00300393, 0x0C771663,
0x00300193, 0xFEC00593, 0x00600613, 0x02C5D733, 0x2AAAB3B7, 0xAA738393, 0x0A771863, 0x00400193,
0x01400593, 0xFFA00613, 0x02C5D733, 0x00000393, 0x08771C63, 0x00500193, 0xFEC00593, 0xFFA00613,
0x02C5D733, 0x00000393, 0x08771063, 0x00600193, 0x800005B7, 0x00100613, 0x02C5D733, 0x800003B7,
0x06771463, 0x00700193, 0x800005B7, 0xFFF00613, 0x02C5D733, 0x00000393, 0x04771863, 0x00800193,
0x800005B7, 0x00000613, 0x02C5D733, 0xFFF00393, 0x02771C63, 0x00900193, 0x00100593, 0x00000613,
0x02C5D733, 0xFFF00393, 0x02771063, 0x00A00193, 0x00000593, 0x00000613, 0x02C5D733, 0xFFF00393,
0x00771463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513,
0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32um-mul",
text: []uint32{
0x00000193, 0x0040006F, 0x02000193, 0x000085B7, 0xE0058593, 0xB6DB7637, 0xDB760613, 0x02C58733,
0x00900393, 0x00939393, 0x4A771463, 0x02100193, 0x000085B7, 0xFC058593, 0xB6DB7637, 0xDB760613,
0x02C58733, 0x000013B7, 0x24038393, 0x48771263, 0x00200193, 0x00000593, 0x00000613, 0x02C58733,
0x00000393, 0x46771663, 0x00300193, 0x00100593, 0x00100613, 0x02C58733, 0x00100393, 0x44771A63,
0x00400193, 0x00300593, 0x00700613, 0x02C58733, 0x01500393, 0x42771E63, 0x00500193, 0x00000593,
0xFFFF8637, 0x02C58733, 0x00000393, 0x42771263, 0x00600193, 0x800005B7, 0x00000613, 0x02C58733,
0x00000393, 0x40771663, 0x00700193, 0x800005B7, 0xFFFF8637, 0x02C58733, 0x00000393, 0x3E771A63,
0x01E00193, 0xAAAAB5B7, 0xAAB58593, 0x00030637, 0xE7D60613, 0x02C58733, 0x000103B7, 0xF7F38393,
0x3C771863, 0x01F00193, 0x000305B7, 0xE7D58593, 0xAAAAB637, 0xAAB60613, 0x02C58733, 0x000103B7,
0xF7F38393, 0x3A771663, 0x02200193, 0xFF0005B7, 0xFF000637, 0x02C58733, 0x00000393, 0x38771A63,
0x02300193, 0xFFF00593, 0xFFF00613, 0x02C58733, 0x00100393, 0x36771E63, 0x02400193, 0xFFF00593,
0x00100613, 0x02C58733, 0xFFF00393, 0x36771263, 0x02500193, 0x00100593, 0xFFF00613, 0x02C58733,
0xFFF00393, 0x34771663, 0x00800193, 0x00D00593, 0x00B00613, 0x02C585B3, 0x08F00393, 0x32759A63,
0x00900193, 0x00E00593, 0x00B00613, 0x02C58633, 0x09A00393, 0x30761E63, 0x00A00193, 0x00D00593,
0x02B585B3, 0x0A900393, 0x30759463, 0x00B00193, 0x00000213, 0x00D00093, 0x00B00113, 0x02208733,
0x00070313, 0x00120213, 0x00200293, 0xFE5214E3, 0x08F00393, 0x2C731E63, 0x00C00193, 0x00000213,
0x00E00093, 0x00B00113, 0x02208733, 0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFE5212E3,
0x09A00393, 0x2A731663, 0x00D00193, 0x00000213, 0x00F00093, 0x00B00113, 0x02208733, 0x00000013,
0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFE5210E3, 0x0A500393, 0x26731C63, 0x00E00193,
0x00000213, 0x00D00093, 0x00B00113, 0x02208733, 0x00120213, 0x00200293, 0xFE5216E3, 0x08F00393,
0x24771863, 0x00F00193, 0x00000213, 0x00E00093, 0x00B00113, 0x00000013, 0x02208733, 0x00120213,
0x00200293, 0xFE5214E3, 0x09A00393, 0x22771263, 0x01000193, 0x00000213, 0x00F00093, 0x00B00113,
0x00000013, 0x00000013, 0x02208733, 0x00120213, 0x00200293, 0xFE5212E3, 0x0A500393, 0x1E771A63,
0x01100193, 0x00000213, 0x00D00093, 0x00000013, 0x00B00113, 0x02208733, 0x00120213, 0x00200293,
0xFE5214E3, 0x08F00393, 0x1C771463, 0x01200193, 0x00000213, 0x00E00093, 0x00000013, 0x00B00113,
0x00000013, 0x02208733, 0x00120213, 0x00200293, 0xFE5212E3, 0x09A00393, 0x18771C63, 0x01300193,
0x00000213, 0x00F00093, 0x00000013, 0x00000013, 0x00B00113, 0x02208733, 0x00120213, 0x00200293,
0xFE5212E3, 0x0A500393, 0x16771463, 0x01400193, 0x00000213, 0x00B00113, 0x00D00093, 0x02208733,
0x00120213, 0x00200293, 0xFE5216E3, 0x08F00393, 0x14771063, 0x01500193, 0x00000213, 0x00B00113,
0x00E00093, 0x00000013, 0x02208733, 0x00120213, 0x00200293, 0xFE5214E3, 0x09A00393, 0x10771A63,
0x01600193, 0x00000213, 0x00B00113, 0x00F00093, 0x00000013, 0x00000013, 0x02208733, 0x00120213,
0x00200293, 0xFE5212E3, 0x0A500393, 0x0E771263, 0x01700193, 0x00000213, 0x00B00113, 0x00000013,
0x00D00093, 0x02208733, 0x00120213, 0x00200293, 0xFE5214E3, 0x08F00393, 0x0A771C63, 0x01800193,
0x00000213, 0x00B00113, 0x00000013, 0x00E00093, 0x00000013, 0x02208733, 0x00120213, 0x00200293,
0xFE5212E3, 0x09A00393, 0x08771463, 0x01900193, 0x00000213, 0x00B00113, 0x00000013, 0x00000013,
0x00F00093, 0x02208733, 0x00120213, 0x00200293, 0xFE5212E3, 0x0A500393, 0x04771C63, 0x01A00193,
0x01F00093, 0x02100133, 0x00000393, 0x04711263, 0x01B00193, 0x02000093, 0x02008133, 0x00000393,
0x02711863, 0x01C00193, 0x020000B3, 0x00000393, 0x02709063, 0x01D00193, 0x02100093, 0x02200113,
0x02208033, 0x00000393, 0x00701463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193,
0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073,
0x00000000,
},
},
{
name: "rv32um-mulh",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00000593, 0x00000613, 0x02C59733, 0x00000393, 0x4A771A63,
0x00300193, 0x00100593, 0x00100613, 0x02C59733, 0x00000393, 0x48771E63, 0x00400193, 0x00300593,
0x00700613, 0x02C59733, 0x00000393, 0x48771263, 0x00500193, 0x00000593, 0xFFFF8637, 0x02C59733,
0x00000393, 0x46771663, 0x00600193, 0x800005B7, 0x00000613, 0x02C59733, 0x00000393, 0x44771A63,
0x00700193, 0x800005B7, 0xFFFF8637, 0x02C59733, 0x000043B7, 0x42771E63, 0x01E00193, 0xAAAAB5B7,
0xAAB58593, 0x00030637, 0xE7D60613, 0x02C59733, 0xFFFF03B7, 0x08138393, 0x40771C63, 0x01F00193,
0x000305B7, 0xE7D58593, 0xAAAAB637, 0xAAB60613, 0x02C59733, 0xFFFF03B7, 0x08138393, 0x3E771A63,
0x02000193, 0xFF0005B7, 0xFF000637, 0x02C59733, 0x000103B7, 0x3C771E63, 0x02100193, 0xFFF00593,
0xFFF00613, 0x02C59733, 0x00000393, 0x3C771263, 0x02200193, 0xFFF00593, 0x00100613, 0x02C59733,
0xFFF00393, 0x3A771663, 0x02300193, 0x00100593, 0xFFF00613, 0x02C59733, 0xFFF00393, 0x38771A63,
0x00800193, 0x00D005B7, 0x00B00637, 0x02C595B3, 0x000093B7, 0xF0038393, 0x36759C63, 0x00900193,
0x00E005B7, 0x00B00637, 0x02C59633, 0x0000A3B7, 0xA0038393, 0x34761E63, 0x00A00193, 0x00D005B7,
0x02B595B3, 0x0000B3B7, 0x90038393, 0x34759263, 0x00B00193, 0x00000213, 0x00D000B7, 0x00B00137,
0x02209733, 0x00070313, 0x00120213, 0x00200293, 0xFE5214E3, 0x000093B7, 0xF0038393, 0x30731A63,
0x00C00193, 0x00000213, 0x00E000B7, 0x00B00137, 0x02209733, 0x00000013, 0x00070313, 0x00120213,
0x00200293, 0xFE5212E3, 0x0000A3B7, 0xA0038393, 0x2E731063, 0x00D00193, 0x00000213, 0x00F000B7,
0x00B00137, 0x02209733, 0x00000013, 0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFE5210E3,
0x0000A3B7, 0x50038393, 0x2A731463, 0x00E00193, 0x00000213, 0x00D000B7, 0x00B00137, 0x02209733,
0x00120213, 0x00200293, 0xFE5216E3, 0x000093B7, 0xF0038393, 0x26771E63, 0x00F00193, 0x00000213,
0x00E000B7, 0x00B00137, 0x00000013, 0x02209733, 0x00120213, 0x00200293, 0xFE5214E3, 0x0000A3B7,
0xA0038393, 0x24771663, 0x01000193, 0x00000213, 0x00F000B7, 0x00B00137, 0x00000013, 0x00000013,
0x02209733, 0x00120213, 0x00200293, 0xFE5212E3, 0x0000A3B7, 0x50038393, 0x20771C63, 0x01100193,
0x00000213, 0x00D000B7, 0x00000013, 0x00B00137, 0x02209733, 0x00120213, 0x00200293, 0xFE5214E3,
0x000093B7, 0xF0038393, 0x1E771463, 0x01200193, 0x00000213, 0x00E000B7, 0x00000013, 0x00B00137,
0x00000013, 0x02209733, 0x00120213, 0x00200293, 0xFE5212E3, 0x0000A3B7, 0xA0038393, 0x1A771A63,
0x01300193, 0x00000213, 0x00F000B7, 0x00000013, 0x00000013, 0x00B00137, 0x02209733, 0x00120213,
0x00200293, 0xFE5212E3, 0x0000A3B7, 0x50038393, 0x18771063, 0x01400193, 0x00000213, 0x00B00137,
0x00D000B7, 0x02209733, 0x00120213, 0x00200293, 0xFE5216E3, 0x000093B7, 0xF0038393, 0x14771A63,
0x01500193, 0x00000213, 0x00B00137, 0x00E000B7, 0x00000013, 0x02209733, 0x00120213, 0x00200293,
0xFE5214E3, 0x0000A3B7, 0xA0038393, 0x12771263, 0x01600193, 0x00000213, 0x00B00137, 0x00F000B7,
0x00000013, 0x00000013, 0x02209733, 0x00120213, 0x00200293, 0xFE5212E3, 0x0000A3B7, 0x50038393,
0x0E771863, 0x01700193, 0x00000213, 0x00B00137, 0x00000013, 0x00D000B7, 0x02209733, 0x00120213,
0x00200293, 0xFE5214E3, 0x000093B7, 0xF0038393, 0x0C771063, 0x01800193, 0x00000213, 0x00B00137,
0x00000013, 0x00E000B7, 0x00000013, 0x02209733, 0x00120213, 0x00200293, 0xFE5212E3, 0x0000A3B7,
0xA0038393, 0x08771663, 0x01900193, 0x00000213, 0x00B00137, 0x00000013, 0x00000013, 0x00F000B7,
0x02209733, 0x00120213, 0x00200293, 0xFE5212E3, 0x0000A3B7, 0x50038393, 0x04771C63, 0x01A00193,
0x7C0000B7, 0x02101133, 0x00000393, 0x04711263, 0x01B00193, 0x800000B7, 0x02009133, 0x00000393,
0x02711863, 0x01C00193, 0x020010B3, 0x00000393, 0x02709063, 0x01D00193, 0x021000B7, 0x02200137,
0x02209033, 0x00000393, 0x00701463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193,
0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073,
0x00000000,
},
},
{
name: "rv32um-mulhsu",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00000593, 0x00000613, 0x02C5A733, 0x00000393, 0x4A771A63,
0x00300193, 0x00100593, 0x00100613, 0x02C5A733, 0x00000393, 0x48771E63, 0x00400193, 0x00300593,
0x00700613, 0x02C5A733, 0x00000393, 0x48771263, 0x00500193, 0x00000593, 0xFFFF8637, 0x02C5A733,
0x00000393, 0x46771663, 0x00600193, 0x800005B7, 0x00000613, 0x02C5A733, 0x00000393, 0x44771A63,
0x00700193, 0x800005B7, 0xFFFF8637, 0x02C5A733, 0x800043B7, 0x42771E63, 0x01E00193, 0xAAAAB5B7,
0xAAB58593, 0x00030637, 0xE7D60613, 0x02C5A733, 0xFFFF03B7, 0x08138393, 0x40771C63, 0x01F00193,
0x000305B7, 0xE7D58593, 0xAAAAB637, 0xAAB60613, 0x02C5A733, 0x000203B7, 0xEFE38393, 0x3E771A63,
0x02000193, 0xFF0005B7, 0xFF000637, 0x02C5A733, 0xFF0103B7, 0x3C771E63, 0x02100193, 0xFFF00593,
0xFFF00613, 0x02C5A733, 0xFFF00393, 0x3C771263, 0x02200193, 0xFFF00593, 0x00100613, 0x02C5A733,
0xFFF00393, 0x3A771663, 0x02300193, 0x00100593, 0xFFF00613, 0x02C5A733, 0x00000393, 0x38771A63,
0x00800193, 0x00D005B7, 0x00B00637, 0x02C5A5B3, 0x000093B7, 0xF0038393, 0x36759C63, 0x00900193,
0x00E005B7, 0x00B00637, 0x02C5A633, 0x0000A3B7, 0xA0038393, 0x34761E63, 0x00A00193, 0x00D005B7,
0x02B5A5B3, 0x0000B3B7, 0x90038393, 0x34759263, 0x00B00193, 0x00000213, 0x00D000B7, 0x00B00137,
0x0220A733, 0x00070313, 0x00120213, 0x00200293, 0xFE5214E3, 0x000093B7, 0xF0038393, 0x30731A63,
0x00C00193, 0x00000213, 0x00E000B7, 0x00B00137, 0x0220A733, 0x00000013, 0x00070313, 0x00120213,
0x00200293, 0xFE5212E3, 0x0000A3B7, 0xA0038393, 0x2E731063, 0x00D00193, 0x00000213, 0x00F000B7,
0x00B00137, 0x0220A733, 0x00000013, 0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFE5210E3,
0x0000A3B7, 0x50038393, 0x2A731463, 0x00E00193, 0x00000213, 0x00D000B7, 0x00B00137, 0x0220A733,
0x00120213, 0x00200293, 0xFE5216E3, 0x000093B7, 0xF0038393, 0x26771E63, 0x00F00193, 0x00000213,
0x00E000B7, 0x00B00137, 0x00000013, 0x0220A733, 0x00120213, 0x00200293, 0xFE5214E3, 0x0000A3B7,
0xA0038393, 0x24771663, 0x01000193, 0x00000213, 0x00F000B7, 0x00B00137, 0x00000013, 0x00000013,
0x0220A733, 0x00120213, 0x00200293, 0xFE5212E3, 0x0000A3B7, 0x50038393, 0x20771C63, 0x01100193,
0x00000213, 0x00D000B7, 0x00000013, 0x00B00137, 0x0220A733, 0x00120213, 0x00200293, 0xFE5214E3,
0x000093B7, 0xF0038393, 0x1E771463, 0x01200193, 0x00000213, 0x00E000B7, 0x00000013, 0x00B00137,
0x00000013, 0x0220A733, 0x00120213, 0x00200293, 0xFE5212E3, 0x0000A3B7, 0xA0038393, 0x1A771A63,
0x01300193, 0x00000213, 0x00F000B7, 0x00000013, 0x00000013, 0x00B00137, 0x0220A733, 0x00120213,
0x00200293, 0xFE5212E3, 0x0000A3B7, 0x50038393, 0x18771063, 0x01400193, 0x00000213, 0x00B00137,
0x00D000B7, 0x0220A733, 0x00120213, 0x00200293, 0xFE5216E3, 0x000093B7, 0xF0038393, 0x14771A63,
0x01500193, 0x00000213, 0x00B00137, 0x00E000B7, 0x00000013, 0x0220A733, 0x00120213, 0x00200293,
0xFE5214E3, 0x0000A3B7, 0xA0038393, 0x12771263, 0x01600193, 0x00000213, 0x00B00137, 0x00F000B7,
0x00000013, 0x00000013, 0x0220A733, 0x00120213, 0x00200293, 0xFE5212E3, 0x0000A3B7, 0x50038393,
0x0E771863, 0x01700193, 0x00000213, 0x00B00137, 0x00000013, 0x00D000B7, 0x0220A733, 0x00120213,
0x00200293, 0xFE5214E3, 0x000093B7, 0xF0038393, 0x0C771063, 0x01800193, 0x00000213, 0x00B00137,
0x00000013, 0x00E000B7, 0x00000013, 0x0220A733, 0x00120213, 0x00200293, 0xFE5212E3, 0x0000A3B7,
0xA0038393, 0x08771663, 0x01900193, 0x00000213, 0x00B00137, 0x00000013, 0x00000013, 0x00F000B7,
0x0220A733, 0x00120213, 0x00200293, 0xFE5212E3, 0x0000A3B7, 0x50038393, 0x04771C63, 0x01A00193,
0x7C0000B7, 0x02102133, 0x00000393, 0x04711263, 0x01B00193, 0x800000B7, 0x0200A133, 0x00000393,
0x02711863, 0x01C00193, 0x020020B3, 0x00000393, 0x02709063, 0x01D00193, 0x021000B7, 0x02200137,
0x0220A033, 0x00000393, 0x00701463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193,
0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073,
0x00000000,
},
},
{
name: "rv32um-mulhu",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x00000593, 0x00000613, 0x02C5B733, 0x00000393, 0x4A771A63,
0x00300193, 0x00100593, 0x00100613, 0x02C5B733, 0x00000393, 0x48771E63, 0x00400193, 0x00300593,
0x00700613, 0x02C5B733, 0x00000393, 0x48771263, 0x00500193, 0x00000593, 0xFFFF8637, 0x02C5B733,
0x00000393, 0x46771663, 0x00600193, 0x800005B7, 0x00000613, 0x02C5B733, 0x00000393, 0x44771A63,
0x00700193, 0x800005B7, 0xFFFF8637, 0x02C5B733, 0x7FFFC3B7, 0x42771E63, 0x01E00193, 0xAAAAB5B7,
0xAAB58593, 0x00030637, 0xE7D60613, 0x02C5B733, 0x000203B7, 0xEFE38393, 0x40771C63, 0x01F00193,
0x000305B7, 0xE7D58593, 0xAAAAB637, 0xAAB60613, 0x02C5B733, 0x000203B7, 0xEFE38393, 0x3E771A63,
0x02000193, 0xFF0005B7, 0xFF000637, 0x02C5B733, 0xFE0103B7, 0x3C771E63, 0x02100193, 0xFFF00593,
0xFFF00613, 0x02C5B733, 0xFFE00393, 0x3C771263, 0x02200193, 0xFFF00593, 0x00100613, 0x02C5B733,
0x00000393, 0x3A771663, 0x02300193, 0x00100593, 0xFFF00613, 0x02C5B733, 0x00000393, 0x38771A63,
0x00800193, 0x00D005B7, 0x00B00637, 0x02C5B5B3, 0x000093B7, 0xF0038393, 0x36759C63, 0x00900193,
0x00E005B7, 0x00B00637, 0x02C5B633, 0x0000A3B7, 0xA0038393, 0x34761E63, 0x00A00193, 0x00D005B7,
0x02B5B5B3, 0x0000B3B7, 0x90038393, 0x34759263, 0x00B00193, 0x00000213, 0x00D000B7, 0x00B00137,
0x0220B733, 0x00070313, 0x00120213, 0x00200293, 0xFE5214E3, 0x000093B7, 0xF0038393, 0x30731A63,
0x00C00193, 0x00000213, 0x00E000B7, 0x00B00137, 0x0220B733, 0x00000013, 0x00070313, 0x00120213,
0x00200293, 0xFE5212E3, 0x0000A3B7, 0xA0038393, 0x2E731063, 0x00D00193, 0x00000213, 0x00F000B7,
0x00B00137, 0x0220B733, 0x00000013, 0x00000013, 0x00070313, 0x00120213, 0x00200293, 0xFE5210E3,
0x0000A3B7, 0x50038393, 0x2A731463, 0x00E00193, 0x00000213, 0x00D000B7, 0x00B00137, 0x0220B733,
0x00120213, 0x00200293, 0xFE5216E3, 0x000093B7, 0xF0038393, 0x26771E63, 0x00F00193, 0x00000213,
0x00E000B7, 0x00B00137, 0x00000013, 0x0220B733, 0x00120213, 0x00200293, 0xFE5214E3, 0x0000A3B7,
0xA0038393, 0x24771663, 0x01000193, 0x00000213, 0x00F000B7, 0x00B00137, 0x00000013, 0x00000013,
0x0220B733, 0x00120213, 0x00200293, 0xFE5212E3, 0x0000A3B7, 0x50038393, 0x20771C63, 0x01100193,
0x00000213, 0x00D000B7, 0x00000013, 0x00B00137, 0x0220B733, 0x00120213, 0x00200293, 0xFE5214E3,
0x000093B7, 0xF0038393, 0x1E771463, 0x01200193, 0x00000213, 0x00E000B7, 0x00000013, 0x00B00137,
0x00000013, 0x0220B733, 0x00120213, 0x00200293, 0xFE5212E3, 0x0000A3B7, 0xA0038393, 0x1A771A63,
0x01300193, 0x00000213, 0x00F000B7, 0x00000013, 0x00000013, 0x00B00137, 0x0220B733, 0x00120213,
0x00200293, 0xFE5212E3, 0x0000A3B7, 0x50038393, 0x18771063, 0x01400193, 0x00000213, 0x00B00137,
0x00D000B7, 0x0220B733, 0x00120213, 0x00200293, 0xFE5216E3, 0x000093B7, 0xF0038393, 0x14771A63,
0x01500193, 0x00000213, 0x00B00137, 0x00E000B7, 0x00000013, 0x0220B733, 0x00120213, 0x00200293,
0xFE5214E3, 0x0000A3B7, 0xA0038393, 0x12771263, 0x01600193, 0x00000213, 0x00B00137, 0x00F000B7,
0x00000013, 0x00000013, 0x0220B733, 0x00120213, 0x00200293, 0xFE5212E3, 0x0000A3B7, 0x50038393,
0x0E771863, 0x01700193, 0x00000213, 0x00B00137, 0x00000013, 0x00D000B7, 0x0220B733, 0x00120213,
0x00200293, 0xFE5214E3, 0x000093B7, 0xF0038393, 0x0C771063, 0x01800193, 0x00000213, 0x00B00137,
0x00000013, 0x00E000B7, 0x00000013, 0x0220B733, 0x00120213, 0x00200293, 0xFE5212E3, 0x0000A3B7,
0xA0038393, 0x08771663, 0x01900193, 0x00000213, 0x00B00137, 0x00000013, 0x00000013, 0x00F000B7,
0x0220B733, 0x00120213, 0x00200293, 0xFE5212E3, 0x0000A3B7, 0x50038393, 0x04771C63, 0x01A00193,
0x7C0000B7, 0x02103133, 0x00000393, 0x04711263, 0x01B00193, 0x800000B7, 0x0200B133, 0x00000393,
0x02711863, 0x01C00193, 0x020030B3, 0x00000393, 0x02709063, 0x01D00193, 0x021000B7, 0x02200137,
0x0220B033, 0x00000393, 0x00701463, 0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193,
0x05D00893, 0x00018513, 0x00000073, 0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073,
0x00000000,
},
},
{
name: "rv32um-rem",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x01400593, 0x00600613, 0x02C5E733, 0x00200393, 0x0C771463,
0x00300193, 0xFEC00593, 0x00600613, 0x02C5E733, 0xFFE00393, 0x0A771863, 0x00400193, 0x01400593,
0xFFA00613, 0x02C5E733, 0x00200393, 0x08771C63, 0x00500193, 0xFEC00593, 0xFFA00613, 0x02C5E733,
0xFFE00393, 0x08771063, 0x00600193, 0x800005B7, 0x00100613, 0x02C5E733, 0x00000393, 0x06771463,
0x00700193, 0x800005B7, 0xFFF00613, 0x02C5E733, 0x00000393, 0x04771863, 0x00800193, 0x800005B7,
0x00000613, 0x02C5E733, 0x800003B7, 0x02771C63, 0x00900193, 0x00100593, 0x00000613, 0x02C5E733,
0x00100393, 0x02771063, 0x00A00193, 0x00000593, 0x00000613, 0x02C5E733, 0x00000393, 0x00771463,
0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513, 0x00000073,
0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
{
name: "rv32um-remu",
text: []uint32{
0x00000193, 0x0040006F, 0x00200193, 0x01400593, 0x00600613, 0x02C5F733, 0x00200393, 0x0C771463,
0x00300193, 0xFEC00593, 0x00600613, 0x02C5F733, 0x00200393, 0x0A771863, 0x00400193, 0x01400593,
0xFFA00613, 0x02C5F733, 0x01400393, 0x08771C63, 0x00500193, 0xFEC00593, 0xFFA00613, 0x02C5F733,
0xFEC00393, 0x08771063, 0x00600193, 0x800005B7, 0x00100613, 0x02C5F733, 0x00000393, 0x06771463,
0x00700193, 0x800005B7, 0xFFF00613, 0x02C5F733, 0x800003B7, 0x04771863, 0x00800193, 0x800005B7,
0x00000613, 0x02C5F733, 0x800003B7, 0x02771C63, 0x00900193, 0x00100593, 0x00000613, 0x02C5F733,
0x00100393, 0x02771063, 0x00A00193, 0x00000593, 0x00000613, 0x02C5F733, 0x00000393, 0x00771463,
0x02301063, 0x0FF0000F, 0x00018063, 0x00119193, 0x0011E193, 0x05D00893, 0x00018513, 0x00000073,
0x0FF0000F, 0x00100193, 0x05D00893, 0x00000513, 0x00000073, 0x00000000,
},
},
}
// skipped names the two cases this machine cannot pass by design, with the
// reason, because silently dropping a conformance case is how a suite stops
// meaning anything.
var skipped = map[string]string{
// FENCE.I exists to make writes to the instruction stream visible. This
// machine predecodes its text and refuses stores into it, so there is no
// instruction stream to make visible: self-modifying code is not
// unimplemented here, it is excluded. See README, W xor X.
"rv32ui-fence_i": "self-modifying code is refused by design",
}
func TestRISCVConformance(t *testing.T) {
ran, skips := 0, 0
for _, c := range conformanceCases {
if why, ok := skipped[c.name]; ok {
skips++
t.Log(c.name + ": skipped, " + why)
continue
}
m, err := NewMachine(Image(c.text), entry)
uassert.NoError(t, err, c.name)
if m == nil {
continue
}
if len(c.data) > 0 {
uassert.NoError(t, m.LoadData(conformanceDataAddr, Image(c.data)), c.name)
}
_, status := m.Step(vmkit.NewTestHost(), conformanceFuel)
uassert.Equal(t, "halted", status.String(), c.name+": "+m.Trap())
// The suite's convention: a0 is 0 on pass, and on failure it is the
// failing case number shifted left with the low bit set.
a0 := m.Registers()[10]
uassert.Equal(t, uint64(0), uint64(a0),
c.name+" failed at its case number "+itoa(int(a0>>1)))
ran++
}
uassert.True(t, ran >= 45, "the conformance suite must actually have run")
uassert.Equal(t, len(skipped), skips, "a skip must be declared, not discovered")
}
func itoa(n int) string {
if n == 0 {
return "0"
}
var b []byte
for n > 0 {
b = append([]byte{byte('0' + n%10)}, b...)
n /= 10
}
return string(b)
}
// A conformance suite that passes a broken emulator is worse than none, so the
// harness is checked against a program built to fail, using the suite's own
// exit convention. Without this, a change that made every case report a0 == 0
// would turn the whole file green and look like progress.
//
// The suite was also checked the other way, by injecting faults into exec.gno
// and confirming it went red and named the case:
//
// SRAI as a logical shift -> rv32ui-srai and rv32ui-lui, case 3
// REMU by zero returning 0 -> rv32um-remu, case 8
//
// Both are recorded here rather than left as something someone did once,
// because they are how you check this file still bites.
func TestConformanceHarnessDetectsAFailure(t *testing.T) {
// The tail of RVTEST_FAIL for testnum 5: gp is shifted left and the low
// bit set, so a0 is 11 and the reported case number is 5.
fail := []uint32{
addi(3, 0, 5), // TESTNUM = 5
addi(17, 0, 93), // a7 = exit
addi(10, 0, 11), // a0 = (5 << 1) | 1
ecall(),
}
m, err := NewMachine(Image(fail), entry)
uassert.NoError(t, err)
if m == nil {
return
}
_, status := m.Step(vmkit.NewTestHost(), conformanceFuel)
uassert.Equal(t, "halted", status.String())
a0 := m.Registers()[10]
uassert.False(t, a0 == 0, "a failing case must not look like a pass")
uassert.Equal(t, uint64(11), uint64(a0))
uassert.Equal(t, "5", itoa(int(a0>>1)), "the reported case number")
}
// And the pass side, so the convention is pinned from both directions.
func TestConformanceHarnessRecognizesAPass(t *testing.T) {
pass := []uint32{
addi(3, 0, 1), // TESTNUM = 1
addi(17, 0, 93), // a7 = exit
addi(10, 0, 0), // a0 = 0
ecall(),
}
m, err := NewMachine(Image(pass), entry)
uassert.NoError(t, err)
if m == nil {
return
}
_, status := m.Step(vmkit.NewTestHost(), conformanceFuel)
uassert.Equal(t, "halted", status.String())
uassert.Equal(t, uint64(0), uint64(m.Registers()[10]))
}
decode.gno
package riscv
// RV32 instruction decode: bit fields, not a parser.
//
// Every instruction is exactly 32 bits and the opcode is the low 7. The rest is
// slicing: which fields exist depends on the format, and there are six formats.
// This file is only the slicing; exec.gno decides what the fields mean.
// Instruction formats. Named as the spec names them.
const (
opLUI = 0x37
opAUIPC = 0x17
opJAL = 0x6F
opJALR = 0x67
opBranch = 0x63
opLoad = 0x03
opStore = 0x23
opImm = 0x13
opReg = 0x33
opSystem = 0x73
opFence = 0x0F
)
// opcode returns the low 7 bits.
func opcode(inst uint32) uint32 { return inst & 0x7F }
// rd, rs1 and rs2 are register selectors, 5 bits each, always in the same place
// when the format has them.
func rd(inst uint32) uint32 { return (inst >> 7) & 0x1F }
func rs1(inst uint32) uint32 { return (inst >> 15) & 0x1F }
func rs2(inst uint32) uint32 { return (inst >> 20) & 0x1F }
// funct3 and funct7 narrow an opcode to an operation.
func funct3(inst uint32) uint32 { return (inst >> 12) & 0x7 }
func funct7(inst uint32) uint32 { return inst >> 25 }
// The immediates. Each format scatters the bits differently, and every one of
// them is SIGN EXTENDED from its top bit: RISC-V has no zero-extended immediate
// in the base set, and getting that wrong is the classic decoder bug because
// small positive programs still work.
//
// The shift-right-on-int32 idiom is the sign extension: Go defines >> on a
// signed type as arithmetic.
// immI is the 12-bit immediate of I-type (loads, ALU-immediate, JALR, ECALL).
func immI(inst uint32) uint32 { return uint32(int32(inst) >> 20) }
// immS is S-type (stores), split across two fields.
func immS(inst uint32) uint32 {
return uint32(int32(inst)>>25<<5) | ((inst >> 7) & 0x1F)
}
// immB is B-type (branches): S-type with the bits rotated, and bit 0 always
// zero because a branch target is 2-byte aligned.
func immB(inst uint32) uint32 {
imm := uint32(int32(inst)>>31) << 12 // sign, bit 12
imm |= ((inst >> 7) & 0x1) << 11 // bit 11
imm |= ((inst >> 25) & 0x3F) << 5 // bits 10:5
imm |= ((inst >> 8) & 0xF) << 1 // bits 4:1
return imm
}
// immU is U-type (LUI, AUIPC): the top 20 bits, already in place.
func immU(inst uint32) uint32 { return inst & 0xFFFFF000 }
// immJ is J-type (JAL), the most scattered of the six.
func immJ(inst uint32) uint32 {
imm := uint32(int32(inst)>>31) << 20 // sign, bit 20
imm |= ((inst >> 12) & 0xFF) << 12 // bits 19:12
imm |= ((inst >> 20) & 0x1) << 11 // bit 11
imm |= ((inst >> 21) & 0x3FF) << 1 // bits 10:1
return imm
}
decode_test.gno
package riscv
import (
"testing"
"gno.land/p/nt/uassert/v0"
)
// jal is only needed to exercise immJ, the one format no program in
// riscv_test.gno reaches for.
func jal(rd, imm uint32) uint32 { return jType(imm, rd, opJAL) }
// The assembler in riscv_test.gno and the decoders here were written from the
// spec independently, so encoding a known field and reading it back is a real
// cross-check rather than a tautology: a field in the wrong place fails unless
// both files put it in the same wrong place.
func TestDecodeRoundTripsTheAssembler(t *testing.T) {
inst := add(5, 6, 7)
uassert.Equal(t, uint64(opReg), uint64(opcode(inst)))
uassert.Equal(t, uint64(5), uint64(rd(inst)))
uassert.Equal(t, uint64(6), uint64(rs1(inst)))
uassert.Equal(t, uint64(7), uint64(rs2(inst)))
uassert.Equal(t, uint64(0), uint64(funct3(inst)))
uassert.Equal(t, uint64(0), uint64(funct7(inst)))
uassert.Equal(t, uint64(0x20), uint64(funct7(sub(5, 6, 7))))
uassert.Equal(t, uint64(0x01), uint64(funct7(mul(5, 6, 7))))
}
// Every immediate in the base set is sign extended from its own top bit, and
// the top bit is in a different place in each of the five formats. These are
// the boundary values: the largest positive, the value one past it that must
// come back negative, and all-ones for minus one.
func TestImmediatesSignExtend(t *testing.T) {
// I-type, 12 bits.
uassert.Equal(t, uint64(0x7FF), uint64(immI(addi(1, 2, 0x7FF))))
uassert.Equal(t, uint64(0xFFFFF800), uint64(immI(addi(1, 2, 0x800))))
uassert.Equal(t, uint64(0xFFFFFFFF), uint64(immI(addi(1, 2, 0xFFF))))
// S-type, 12 bits split across two fields.
uassert.Equal(t, uint64(0x7FF), uint64(immS(sw(3, 4, 0x7FF))))
uassert.Equal(t, uint64(0xFFFFF800), uint64(immS(sw(3, 4, 0x800))))
uassert.Equal(t, uint64(0xFFFFFFFF), uint64(immS(sw(3, 4, 0xFFF))))
// B-type, 13 bits with bit 0 always zero. -12 is the encoding the
// benchmark's loop branch uses, and getting its width wrong is what makes
// a backward branch jump forward instead.
uassert.Equal(t, uint64(0x7FE), uint64(immB(bne(1, 2, 0x7FE))))
uassert.Equal(t, uint64(0xFFFFF000), uint64(immB(bne(1, 2, 0x1000))))
uassert.Equal(t, uint64(0xFFFFFFF4), uint64(immB(bne(1, 2, 0x1FF4))))
// U-type is the only one that is not sign extended, because it is already
// the top 20 bits.
uassert.Equal(t, uint64(0xDEADB000), uint64(immU(lui(1, 0xDEADB000))))
// J-type, 21 bits with bit 0 always zero.
uassert.Equal(t, uint64(0x7FE), uint64(immJ(jal(1, 0x7FE))))
uassert.Equal(t, uint64(0xFFF00000), uint64(immJ(jal(1, 0x100000))))
uassert.Equal(t, uint64(0xFFFFFFFE), uint64(immJ(jal(1, 0x1FFFFE))))
}
func jalr(rd, rs1, imm uint32) uint32 { return iType(imm, rs1, 0x0, rd, opJALR) }
ecall.gno
package riscv
import "gno.land/p/nym-moultest123/x/vm/vmkit/v0"
// The syscall table: the entire interface between a guest and the chain.
//
// Register-passing, in the RISC-V Linux convention a compiler already knows:
// a7 (x17) selects the call, a0..a2 (x10..x12) carry arguments, a0 receives the
// result. A guest written against these needs no gno-specific runtime, only the
// three lines of inline assembly every no_std program already has for ecall.
//
// Deliberately small. Every call here maps onto something [vmkit.Host] already
// offers, because the Host is the audited surface and a syscall that reaches
// past it would be a second, unreviewed one.
const (
sysExit = 93 // a0 = status. The Linux number, so a guest can reuse its libc shim.
sysWrite = 64 // a0 = fd (ignored), a1 = buf, a2 = len -> Host.Output
sysRead = 63 // a0 = fd (ignored), a1 = buf, a2 = len <- Host.Input
sysHeight = 90 // -> block height
sysNow = 91 // -> block time, Unix seconds
sysCaller = 92 // a0 = buf, a1 = len; writes the caller address, returns bytes written
sysLog = 94 // a0 = buf, a1 = len -> Host.Log
sysEmit = 95 // a0 = type buf, a1 = type len, a2 = body buf, a3 = body len
)
// maxSyscallBytes bounds one call's buffer. A guest asking to write a gigabyte
// is a guest that found the host's allocator, not one with something to say.
const maxSyscallBytes = 64 * 1024
// ecall dispatches a syscall. It returns the machine status and whether the
// machine should stop: only exit stops it, everything else returns to the guest
// with a0 set.
func (m *Machine) ecall(h vmkit.Host) (vmkit.Status, bool) {
switch m.reg[17] { // a7
case sysExit:
// The guest's exit status is not the machine's: a program that returns
// 1 has halted, it has not trapped. Trapping is for what the machine
// could not do, and a chain should not confuse "your code said no"
// with "the VM broke".
return vmkit.Halted, true
case sysWrite:
buf, ok := m.readGuest(m.reg[11], m.reg[12])
if !ok {
m.reg[10] = ^uint32(0)
return vmkit.Running, false
}
h.Output(buf)
m.outLen += len(buf)
m.reg[10] = uint32(len(buf))
case sysRead:
in := h.Input()
n := int(m.reg[12])
if n > len(in) {
n = len(in)
}
if n > maxSyscallBytes {
n = maxSyscallBytes
}
if !m.writeGuest(m.reg[11], in[:n]) {
m.reg[10] = ^uint32(0)
return vmkit.Running, false
}
m.reg[10] = uint32(n)
case sysHeight:
m.reg[10] = uint32(h.Height())
case sysNow:
m.reg[10] = uint32(h.Now())
case sysCaller:
addr := []byte(h.Caller().String())
n := int(m.reg[11])
if n > len(addr) {
n = len(addr)
}
if !m.writeGuest(m.reg[10], addr[:n]) {
m.reg[10] = ^uint32(0)
return vmkit.Running, false
}
m.reg[10] = uint32(n)
case sysLog:
buf, ok := m.readGuest(m.reg[10], m.reg[11])
if !ok {
m.reg[10] = ^uint32(0)
return vmkit.Running, false
}
h.Log(string(buf))
m.reg[10] = uint32(len(buf))
case sysEmit:
typ, ok1 := m.readGuest(m.reg[10], m.reg[11])
body, ok2 := m.readGuest(m.reg[12], m.reg[13])
if !ok1 || !ok2 {
m.reg[10] = ^uint32(0)
return vmkit.Running, false
}
h.Emit(string(typ), "body", string(body))
m.reg[10] = 0
default:
// An unknown syscall is a trap, not a silent zero. A guest compiled
// against a newer table must fail loudly on an older host rather than
// read a success it did not get.
m.trap = "unknown syscall"
return vmkit.Trapped, true
}
return vmkit.Running, false
}
// readGuest copies a buffer out of guest memory, refusing anything out of range
// or larger than maxSyscallBytes.
func (m *Machine) readGuest(addr, length uint32) ([]byte, bool) {
if length > maxSyscallBytes || !m.mem.inRange(addr, int(length)) {
return nil, false
}
out := make([]byte, length)
copy(out, m.mem.b[addr:addr+length])
return out, true
}
// writeGuest copies into guest memory, marking the pages it touched.
func (m *Machine) writeGuest(addr uint32, b []byte) bool {
if len(b) > maxSyscallBytes || !m.mem.inRange(addr, len(b)) {
return false
}
copy(m.mem.b[addr:], b)
for i := 0; i < len(b); i++ {
m.mem.dirty[(uint64(addr)+uint64(i))/PageSize] = true
}
return true
}
exec.gno
// Package riscv is an RV32IM emulator for gno.land: 48 instructions that every
// real compiler already targets.
//
// A guest here is not written in a new language. `rustc --target
// riscv32im-unknown-none-elf`, `clang -target riscv32`, TinyGo and Zig all emit
// it, so a program arrives compiled by the real compiler and optimized by the
// real optimizer. The interpreter is a decode loop rather than a semantic
// minefield: fetch four bytes, switch on seven bits, do arithmetic.
//
// No F or D. No floats means no rounding-mode ambiguity and nothing that can
// differ between nodes. The M extension's divide-by-zero and overflow cases are
// defined by the spec to RETURN a value rather than trap, which is exactly what
// a deterministic chain wants.
//
// It implements [vmkit.Machine], so it shares the fuel meter, the snapshot
// codec and the instance store with [p/moul/x/vm/bf](/p/nym-moultest123/x/vm/bf/v0). That
// sharing is the point: the second guest is what tells you whether the ABI was
// shaped around the first one.
//
// Live demo: [r/moul/x/vm/riscvdemo](/r/nym-moultest123/x/vm/riscvdemo/v0).
package riscv
import (
"errors"
"gno.land/p/nym-moultest123/x/vm/vmkit/v0"
)
// VMName is the identifier this machine registers under in a vmkit.Instance.
const VMName = "riscv32im"
// DefaultEntry is where a flat text image is conventionally loaded and where
// execution starts. Low enough to leave a scratch page below it, aligned, and
// nothing about the machine requires it: NewMachine takes the entry point.
const DefaultEntry uint32 = 0x1000
const (
snapMagic uint32 = 0x52563332 // "RV32"
// snapVersion 2 carries the text segment's extent, which version 1 did
// not need because the interpreter decoded from memory on every fetch.
// Predecoding moved that work to load time, so a restored hart has to be
// told which part of its memory is code.
snapVersion byte = 2
)
// ErrNoProgram is returned when a Machine is stepped with no image loaded.
var ErrNoProgram = errors.New("riscv: machine has no program")
// Machine is an RV32IM hart, mid-execution.
type Machine struct {
reg [32]uint32
pc uint32
mem *Memory
// code is the text segment with its fields already pulled apart. See
// predecode.gno for why the dispatch loop reads arrays and not memory.
code *code
status vmkit.Status
trap string
// out is what the guest wrote through the write syscall, mirrored to the
// host as it goes. Kept here too so a snapshot round-trips it.
outLen int
}
// NewMachine returns a hart with the image loaded at entry, pc at entry, and
// the stack pointer at the top of memory.
func NewMachine(image []byte, entry uint32) (*Machine, error) {
if entry%4 != 0 {
return nil, errors.New("riscv: entry point is not 4-byte aligned")
}
if len(image)%4 != 0 {
return nil, errors.New("riscv: image length is not a whole number of instructions")
}
m := &Machine{mem: NewMemory(), pc: entry, status: vmkit.Running}
if !m.mem.WriteImage(entry, image) {
return nil, errors.New("riscv: image does not fit at the entry point")
}
m.code = predecode(entry, image)
// x2 is sp by convention. A guest that never touches the stack does not
// care; one compiled by rustc does, immediately.
m.reg[2] = MemSize
return m, nil
}
// LoadData places initialized data in memory, outside the text segment.
//
// The other half of a flat-image loader. A program with a .data section needs
// its initial bytes in memory and needs to write them back afterwards, which
// the text segment forbids: W xor X is what makes the predecode sound. So the
// linker puts data at its own address and it arrives here separately, rather
// than being concatenated onto the code and silently becoming read-only.
//
// The pages are marked dirty, so a snapshot carries the data the same way it
// carries the program.
func (m *Machine) LoadData(addr uint32, b []byte) error {
if m.mem == nil {
return ErrNoProgram
}
if len(b) > 0 && m.code != nil && m.code.words > 0 {
lo, hi := uint64(addr), uint64(addr)+uint64(len(b))
if lo < uint64(m.code.end) && hi > uint64(m.code.base) {
return errors.New("riscv: data segment overlaps the text segment")
}
}
if !m.mem.WriteImage(addr, b) {
return errors.New("riscv: data does not fit at that address")
}
return nil
}
// Registers returns a copy of the register file, for tests and rendering.
func (m *Machine) Registers() [32]uint32 { return m.reg }
// PC returns the program counter.
func (m *Machine) PC() uint32 { return m.pc }
// Memory returns the address space.
func (m *Machine) Memory() *Memory { return m.mem }
// Status returns the machine's status.
func (m *Machine) Status() vmkit.Status { return m.status }
// Trap returns why the machine trapped, making Machine a [vmkit.Trapper].
func (m *Machine) Trap() string { return m.trap }
// Step runs until the program halts, traps, or spends `fuel` instructions.
//
// Written the way the bf ladder concluded, and for the same measured reasons:
// the hot state is in locals and written back once, and the fuel counter is two
// locals rather than a vmkit.Meter, because calling a method per instruction
// cost 86% there and would cost more here, where an instruction is cheaper.
//
// Two things in this loop look like premature optimization and are not, both
// measured in switchcost_test.gno on this VM:
//
// - The case order is the internal opcode order from predecode.gno, which is
// by dynamic frequency, because the GnoVM scans switch cases in source
// order at 278 gas each. Reordering the arms below changes what the
// interpreter costs.
// - Everything the loop touches is a local. Reading cop[i] through m.code.op
// instead would pay for two field lookups on every instruction.
func (m *Machine) Step(h vmkit.Host, fuel int64) (int64, vmkit.Status) {
if m.mem == nil || m.code == nil {
m.status, m.trap = vmkit.Trapped, "no program"
return 0, m.status
}
if m.status != vmkit.Running {
return 0, m.status
}
pc := m.pc
// A misaligned pc would index the word containing it rather than trap,
// because the index is a shift. Only a restored snapshot can get here with
// one, since JALR is the only instruction that can produce it and it
// checks its own target.
if pc%4 != 0 {
m.status, m.trap = vmkit.Trapped, "misaligned program counter"
return 0, m.status
}
reg := &m.reg
mem := m.mem
c := m.code
cop, crd, crs1, crs2, cimm := c.op, c.rd, c.rs1, c.rs2, c.imm
cbase, cwords, cend := c.base, c.words, c.end
defer func() { m.pc = pc }()
budget := fuel
if budget < 0 {
budget = vmkit.Unmetered
}
metered := budget != vmkit.Unmetered
var used int64
for {
if metered && used >= budget {
return used, vmkit.Running
}
used++
// One subtraction and one shift replace the fetch. A pc below the text
// segment underflows to a huge index and is caught by the same
// comparison, which is why there is no second bound here.
i := (pc - cbase) >> 2
if i >= cwords {
m.status, m.trap = vmkit.Trapped, "instruction fetch out of range"
return used, m.status
}
next := pc + 4
switch cop[i] {
case iADDI:
reg[crd[i]] = reg[crs1[i]] + cimm[i]
case iLW:
v, ok := mem.Load32(reg[crs1[i]] + cimm[i])
if !ok {
m.status, m.trap = vmkit.Trapped, "load out of range"
return used, m.status
}
reg[crd[i]] = v
case iSW:
addr := reg[crs1[i]] + cimm[i]
if addr < cend && addr+4 > cbase {
m.status, m.trap = vmkit.Trapped, "store into text segment"
return used, m.status
}
if !mem.Store32(addr, reg[crs2[i]]) {
m.status, m.trap = vmkit.Trapped, "store out of range"
return used, m.status
}
case iADD:
reg[crd[i]] = reg[crs1[i]] + reg[crs2[i]]
case iBNE:
if reg[crs1[i]] != reg[crs2[i]] {
next = pc + cimm[i]
}
case iBEQ:
if reg[crs1[i]] == reg[crs2[i]] {
next = pc + cimm[i]
}
case iJAL:
reg[crd[i]] = next
next = pc + cimm[i]
case iJALR:
// The target is computed before rd is written, because rd and rs1
// are allowed to be the same register and usually are: `ret` is
// jalr x0, 0(x1).
t := (reg[crs1[i]] + cimm[i]) &^ 1
if t%4 != 0 {
m.status, m.trap = vmkit.Trapped, "misaligned jump target"
return used, m.status
}
reg[crd[i]] = next
next = t
case iLUI:
reg[crd[i]] = cimm[i]
case iSLLI:
reg[crd[i]] = reg[crs1[i]] << (cimm[i] & 0x1F)
case iSRLI:
reg[crd[i]] = reg[crs1[i]] >> (cimm[i] & 0x1F)
case iANDI:
reg[crd[i]] = reg[crs1[i]] & cimm[i]
case iSUB:
reg[crd[i]] = reg[crs1[i]] - reg[crs2[i]]
case iORI:
reg[crd[i]] = reg[crs1[i]] | cimm[i]
case iXORI:
reg[crd[i]] = reg[crs1[i]] ^ cimm[i]
case iBLT:
if int32(reg[crs1[i]]) < int32(reg[crs2[i]]) {
next = pc + cimm[i]
}
case iBGE:
if int32(reg[crs1[i]]) >= int32(reg[crs2[i]]) {
next = pc + cimm[i]
}
case iBLTU:
if reg[crs1[i]] < reg[crs2[i]] {
next = pc + cimm[i]
}
case iBGEU:
if reg[crs1[i]] >= reg[crs2[i]] {
next = pc + cimm[i]
}
case iSRAI:
reg[crd[i]] = uint32(int32(reg[crs1[i]]) >> (cimm[i] & 0x1F))
case iSLL:
reg[crd[i]] = reg[crs1[i]] << (reg[crs2[i]] & 0x1F)
case iSRL:
reg[crd[i]] = reg[crs1[i]] >> (reg[crs2[i]] & 0x1F)
case iSRA:
reg[crd[i]] = uint32(int32(reg[crs1[i]]) >> (reg[crs2[i]] & 0x1F))
case iAND:
reg[crd[i]] = reg[crs1[i]] & reg[crs2[i]]
case iOR:
reg[crd[i]] = reg[crs1[i]] | reg[crs2[i]]
case iXOR:
reg[crd[i]] = reg[crs1[i]] ^ reg[crs2[i]]
case iLBU:
v, ok := mem.Load8(reg[crs1[i]] + cimm[i])
if !ok {
m.status, m.trap = vmkit.Trapped, "load out of range"
return used, m.status
}
reg[crd[i]] = uint32(v)
case iLB:
v, ok := mem.Load8(reg[crs1[i]] + cimm[i])
if !ok {
m.status, m.trap = vmkit.Trapped, "load out of range"
return used, m.status
}
reg[crd[i]] = uint32(int32(int8(v)))
case iLH:
v, ok := mem.Load16(reg[crs1[i]] + cimm[i])
if !ok {
m.status, m.trap = vmkit.Trapped, "load out of range"
return used, m.status
}
reg[crd[i]] = uint32(int32(int16(v)))
case iLHU:
v, ok := mem.Load16(reg[crs1[i]] + cimm[i])
if !ok {
m.status, m.trap = vmkit.Trapped, "load out of range"
return used, m.status
}
reg[crd[i]] = uint32(v)
case iSB:
addr := reg[crs1[i]] + cimm[i]
if addr < cend && addr+4 > cbase {
m.status, m.trap = vmkit.Trapped, "store into text segment"
return used, m.status
}
if !mem.Store8(addr, uint8(reg[crs2[i]])) {
m.status, m.trap = vmkit.Trapped, "store out of range"
return used, m.status
}
case iSH:
addr := reg[crs1[i]] + cimm[i]
if addr < cend && addr+4 > cbase {
m.status, m.trap = vmkit.Trapped, "store into text segment"
return used, m.status
}
if !mem.Store16(addr, uint16(reg[crs2[i]])) {
m.status, m.trap = vmkit.Trapped, "store out of range"
return used, m.status
}
case iAUIPC:
reg[crd[i]] = pc + cimm[i]
case iSLT:
reg[crd[i]] = b2u(int32(reg[crs1[i]]) < int32(reg[crs2[i]]))
case iSLTU:
reg[crd[i]] = b2u(reg[crs1[i]] < reg[crs2[i]])
case iSLTI:
reg[crd[i]] = b2u(int32(reg[crs1[i]]) < int32(cimm[i]))
case iSLTIU:
reg[crd[i]] = b2u(reg[crs1[i]] < cimm[i])
case iMUL:
reg[crd[i]] = reg[crs1[i]] * reg[crs2[i]]
case iMULH:
reg[crd[i]] = uint32((int64(int32(reg[crs1[i]])) * int64(int32(reg[crs2[i]]))) >> 32)
case iMULHSU:
reg[crd[i]] = uint32((int64(int32(reg[crs1[i]])) * int64(uint64(reg[crs2[i]]))) >> 32)
case iMULHU:
reg[crd[i]] = uint32((uint64(reg[crs1[i]]) * uint64(reg[crs2[i]])) >> 32)
case iDIV:
// The M extension defines divide by zero and the one signed
// overflow case to RETURN a value rather than trap. That is what
// makes it safe on a chain: there is no host arithmetic exception
// to differ between nodes.
reg[crd[i]] = divS(int32(reg[crs1[i]]), int32(reg[crs2[i]]))
case iDIVU:
if reg[crs2[i]] == 0 {
reg[crd[i]] = ^uint32(0)
} else {
reg[crd[i]] = reg[crs1[i]] / reg[crs2[i]]
}
case iREM:
reg[crd[i]] = remS(int32(reg[crs1[i]]), int32(reg[crs2[i]]))
case iREMU:
if reg[crs2[i]] == 0 {
reg[crd[i]] = reg[crs1[i]]
} else {
reg[crd[i]] = reg[crs1[i]] % reg[crs2[i]]
}
case iECALL:
st, halt := m.ecall(h)
if halt {
// pc advances past the ecall before returning, so a halted
// hart points at what it would run next rather than at the
// syscall it already made. The deferred write-back is the only
// thing that sets m.pc, so assigning the local is how this is
// said.
m.status = st
pc = next
return used, m.status
}
case iEBREAK:
m.status, m.trap = vmkit.Trapped, "ebreak"
pc = next
return used, m.status
case iFENCE:
// FENCE orders memory for a hart that has neighbours. There is
// exactly one here, so it is architecturally a no-op rather than
// an unimplemented instruction.
default:
m.status, m.trap = vmkit.Trapped, "illegal instruction"
return used, m.status
}
// x0 is hardwired to zero. Writing it is legal and discarded, and
// clearing after the fact is cheaper than branching on rd in every
// arm above.
reg[0] = 0
pc = next
}
}
// b2u is the spec's "set if" result: 1 or 0, never a Go bool.
func b2u(b bool) uint32 {
if b {
return 1
}
return 0
}
// divS is DIV with the two cases the spec pins down: division by zero yields
// all ones, and the most negative value divided by -1 overflows to itself.
func divS(a, b int32) uint32 {
if b == 0 {
return ^uint32(0)
}
if a == -2147483648 && b == -1 {
return uint32(a)
}
return uint32(a / b)
}
// remS is REM, with the matching pair: remainder by zero is the dividend, and
// the overflow case is zero.
func remS(a, b int32) uint32 {
if b == 0 {
return uint32(a)
}
if a == -2147483648 && b == -1 {
return 0
}
return uint32(a % b)
}
gnomod.toml
module = "gno.land/p/nym-moultest123/x/vm/riscv/v0" gno = "0.9" [addpkg] creator = "g1ml9grtwnpzqn3hre5ve5vjdlmv2srrmpmc0dsv" height = 186410 max_deposit = "106000000ugnot"
guests.gno
package riscv
// Compiled guests: programs a real compiler produced, shipped as the bytes it
// emitted.
//
// A hand-written test program proves the emulator agrees with the person who
// wrote it. A compiled one proves it agrees with LLVM, which is the only claim
// that matters for a machine whose whole premise is that every toolchain
// already targets it.
//
// The source, the linker script and the exact build command are in
// tools/riscv-guests/. `make words` there prints the image in the form below,
// so this is reproducible rather than magic.
// guestFNV is tools/riscv-guests/fnv: it reads the call input, hashes it with
// FNV-1a, and writes eight hex digits back. 49 instructions, built with clang
// 19.1.7, `-march=rv32im -mabi=ilp32 -Os`.
//
// Worth reading as output rather than as a program. LLVM opens with a real
// function prologue spilling ra and s0 to a stack the host set up, materializes
// the 2166136261 offset basis as a lui/addi pair, and addresses its globals at
// 0x40000, far above a text segment the host refuses stores into.
var guestFNV = []uint32{
0xFF010113, 0x00112623, 0x00812423, 0x01010413,
0x000405B7, 0x00058593, 0x03F00893, 0x10000613,
0x00000513, 0x00000073, 0x811CA6B7, 0x02A05663,
0x00A58633, 0xDC568513, 0x010006B7, 0x19368693,
0x0005C703, 0x00E54533, 0x00158593, 0x02D50533,
0xFEC598E3, 0x0080006F, 0xDC568513, 0x01C00593,
0x00040637, 0x10060613, 0x00A00693, 0xFFC00713,
0x00B557B3, 0x00F7F793, 0x00D7E663, 0x05778793,
0x0080006F, 0x03078793, 0x00F60023, 0xFFC58593,
0x00160613, 0xFCE59EE3, 0x000405B7, 0x10058593,
0x04000893, 0x00800613, 0x00100513, 0x00000073,
0x05D00893, 0x00000593, 0x00000613, 0x00000513,
0x00000073,
}
// GuestFNV returns the flat text image of the compiled FNV-1a guest, ready for
// [NewMachine] at [DefaultEntry]. A fresh slice per call, so a caller cannot
// mutate the copy everyone else gets.
func GuestFNV() []byte { return Image(guestFNV) }
// guestLedger is tools/riscv-guests/ledger: a token in no_std Rust. It applies
// a script of mint, send and burn lines from the call input and writes the
// resulting balances back. 1,959 instructions, built with rustc 1.98.1 for
// riscv32im-unknown-none-elf.
//
// It links Rust's real core and compiler_builtins, which is what makes it more
// than a bigger FNV: a bounds check reaches core::panicking, and the balances
// are 64-bit, so a divide reaches __udivdi3 because RV32 has no 64-bit divide
// instruction. The emulator is running the standard library's own software
// arithmetic, not just compiler output.
var guestLedger = []uint32{
0xFA010113, 0x04112E23, 0x04812C23, 0x04912A23, 0x05212823, 0x05312623, 0x05412423, 0x05512223,
0x05612023, 0x03712E23, 0x03812C23, 0x03912A23, 0x03A12823, 0x03B12623, 0x00000513, 0x00000713,
0x00000413, 0x00000B93, 0x000409B7, 0x00098993, 0x03F00893, 0x40000613, 0x00A00913, 0x40100B13,
0x00400C13, 0x0F600493, 0x00040DB7, 0x400D8D93, 0x00098593, 0x00000073, 0x00050A13, 0x00A02533,
0x00012C23, 0x40A00533, 0x01457CB3, 0x4B977A63, 0x40000593, 0x00070513, 0x00E5E463, 0x40000513,
0x00170613, 0x000A0593, 0x01464463, 0x00060593, 0x00070A93, 0x71550263, 0x01598633, 0x00064D03,
0x012D0863, 0x001A8A93, 0xFF5596E3, 0x00058A93, 0x43577A63, 0x6D6AF463, 0x00140413, 0x00143513,
0x00AB8BB3, 0x40EA8633, 0x00E985B3, 0x01C10513, 0x00000097, 0x760080E7, 0x02012503, 0x40050463,
0x00F00B13, 0x53851E63, 0x01C12503, 0x02412583, 0x02812603, 0x00054683, 0x06200713, 0x24E68A63,
0x07300713, 0x12E68063, 0x06D00713, 0x50E69A63, 0x00154683, 0x06900713, 0x50E69463, 0x00254683,
0x06E00713, 0x4EE69E63, 0x00354503, 0x07400693, 0x4ED51863, 0x01C10513, 0x00000097, 0x6F8080E7,
0x01C12503, 0x00A12623, 0x02012C03, 0x02412583, 0x02812603, 0x01C10513, 0x00000097, 0x6D8080E7,
0x02012503, 0xFF650593, 0x00A00B13, 0xFF700613, 0x5AC5E263, 0x01712A23, 0x00812823, 0x00000413,
0x01C12583, 0x00000B93, 0x0005C603, 0xFC660693, 0x0FF6F693, 0x4696EC63, 0x00158593, 0x032436B3,
0x001B9713, 0x003B9B93, 0x00EB8733, 0x00141793, 0x00341413, 0xFD060613, 0x00F407B3, 0x0FF67413,
0x00E686B3, 0x00878433, 0x00F43BB3, 0xFFF50513, 0x01768BB3, 0xFA051AE3, 0x00C12503, 0x000C0593,
0x00001097, 0x80C080E7, 0x00058693, 0x00100593, 0x52B51863, 0x00F00513, 0x5CD56663, 0x00369693,
0x00DD86B3, 0x3806A503, 0x3846A583, 0x00850433, 0x017585B3, 0x00A43533, 0x00A58533, 0x3886A023,
0x2B00006F, 0x00154683, 0x06500713, 0x3EE69A63, 0x00254683, 0x06E00713, 0x3EE69463, 0x00354503,
0x06400693, 0x3CD51E63, 0x01C10513, 0x00000097, 0x5E4080E7, 0x01C12503, 0x00A12823, 0x02012503,
0x00A12623, 0x02412583, 0x02812603, 0x01C10513, 0x00000097, 0x5C0080E7, 0x01C12C03, 0x02012503,
0x00A12423, 0x02412583, 0x02812603, 0x01C10513, 0x00000097, 0x5A0080E7, 0x02012503, 0xFF650593,
0x00A00B13, 0xFF700613, 0x46C5E663, 0x01812223, 0x01712A23, 0x00000B93, 0x01C12583, 0x00000C13,
0x0005C603, 0xFC660693, 0x0FF6F693, 0x3296E863, 0x00158593, 0x032BB6B3, 0x001C1713, 0x003C1C13,
0x00EC0733, 0x001B9793, 0x003B9B93, 0xFD060613, 0x00FB87B3, 0x0FF67B93, 0x00E686B3, 0x01778BB3,
0x00FBBC33, 0xFFF50513, 0x01868C33, 0xFA051AE3, 0x01012503, 0x00C12583, 0x00000097, 0x5E0080E7,
0x00058693, 0x00100593, 0x42B51C63, 0x00812823, 0x00F00513, 0x4AD56463, 0x00369693, 0x00DD8433,
0x38442503, 0x11850C63, 0x01852533, 0x1180006F, 0x00154683, 0x07500713, 0x2CE69463, 0x00254683,
0x07200713, 0x2AE69E63, 0x00354503, 0x06E00693, 0x2AD51863, 0x01C10513, 0x00000097, 0x4B8080E7,
0x01C12503, 0x00A12623, 0x02012C03, 0x02412583, 0x02812603, 0x01C10513, 0x00000097, 0x498080E7,
0x02012503, 0xFF650593, 0xFF700613, 0x36C5E263, 0x01712A23, 0x00812823, 0x00000413, 0x01C12583,
0x00000B93, 0x0005C603, 0xFC660693, 0x0FF6F693, 0x2296EC63, 0x00158593, 0x032436B3, 0x001B9713,
0x003B9B93, 0x00EB8733, 0x00141793, 0x00341413, 0xFD060613, 0x00F407B3, 0x0FF67413, 0x00E686B3,
0x00878433, 0x00F43BB3, 0xFFF50513, 0x01768BB3, 0xFA051AE3, 0x00C12503, 0x000C0593, 0x00000097,
0x4DC080E7, 0x00058693, 0x00100593, 0x34B51263, 0x00F00513, 0x38D56E63, 0x00369513, 0x00AD8533,
0x38452603, 0x38052583, 0x40100B13, 0x00400C13, 0x0B760263, 0x017626B3, 0x0A00006F, 0x38042503,
0x01753533, 0x2C051A63, 0x00412503, 0x00812583, 0x00000097, 0x57C080E7, 0x00058693, 0x00100593,
0x2AB51063, 0x38042503, 0x38442583, 0x01753633, 0x418585B3, 0x41750533, 0x40C585B3, 0x38A42023,
0x38B42223, 0x00F00513, 0x34D56063, 0x00369693, 0x00DD86B3, 0x3806A503, 0x3846A583, 0x01750BB3,
0x018585B3, 0x00ABB533, 0x00A58533, 0x3976A023, 0x38A6A223, 0x01012403, 0x01412B83, 0x40100B13,
0x00400C13, 0x032D1E63, 0x001A8713, 0xB99AE0E3, 0x0300006F, 0x0085B6B3, 0x24069063, 0x0085B6B3,
0x41760633, 0x408585B3, 0x40D60633, 0x38B52023, 0x38C52223, 0x01012403, 0x01412B83, 0xFD2D06E3,
0x410DA403, 0x0A040A63, 0x00000513, 0x00000493, 0x01000913, 0x01900993, 0x20000A13, 0x02000A93,
0x00A00B13, 0x27248463, 0x009D85B3, 0x4005C583, 0x1F35FC63, 0x00349613, 0x02058A63, 0x00449693,
0x00C686B3, 0x00DD86B3, 0x20068693, 0x01457A63, 0x0006C703, 0x00AD87B3, 0x00E78023, 0x00150513,
0xFFF58593, 0x00168693, 0xFE0592E3, 0x01457863, 0x00AD85B3, 0x01558023, 0x00150513, 0x00CD8633,
0x38062583, 0x38462603, 0x00A12C23, 0x01810513, 0x00000097, 0x598080E7, 0x01812503, 0x01457863,
0x00AD85B3, 0x01658023, 0x00150513, 0x00148493, 0x00A12C23, 0xF68498E3, 0x01810513, 0x00000097,
0x528080E7, 0x05D00893, 0x00000513, 0x00000593, 0x00000613, 0x00000073, 0x0000006F, 0x000034B7,
0xBAE48493, 0x0140006F, 0x00A00B13, 0x000034B7, 0xBAE48493, 0x01012403, 0x01412B83, 0x00C0006F,
0x000034B7, 0xD1C48493, 0x00000513, 0x000035B7, 0xDAC58593, 0x00500613, 0x20000693, 0x00D57A63,
0x0005C703, 0x00AD87B3, 0x00E78023, 0x00150513, 0xFFF60613, 0x00158593, 0xFE0612E3, 0x00A12C23,
0x01810513, 0x00040593, 0x000B8613, 0x00000097, 0x4DC080E7, 0x00000513, 0x00000713, 0x01812583,
0x20000613, 0x000036B7, 0xDB168693, 0x00C5FC63, 0x00E68733, 0x00074703, 0x00BD87B3, 0x00E78023,
0x00158593, 0x00100713, 0x00157793, 0x00100513, 0xFC078EE3, 0x00B12C23, 0x01810513, 0x00048593,
0x000B0613, 0x00000097, 0x404080E7, 0x01812503, 0x20000593, 0x00B57A63, 0x00AD8DB3, 0x00A00593,
0x00BD8023, 0x00150513, 0x00A12C23, 0x01810513, 0x00000097, 0x414080E7, 0x05D00893, 0x00100513,
0x00000593, 0x00000613, 0x00000073, 0x0000006F, 0x00A00B13, 0x000034B7, 0xBAE48493, 0xF0DFF06F,
0x01700B13, 0x01012403, 0x01412B83, 0x000034B7, 0xBB848493, 0xEF5FF06F, 0x01400B13, 0x000034B7,
0xCE848493, 0xED1FF06F, 0x000036B7, 0xDC468693, 0x01800613, 0x00000513, 0x00001097, 0xB50080E7,
0x00E00B13, 0x000034B7, 0xCB848493, 0xEADFF06F, 0x000034B7, 0xCFC48493, 0xE9DFF06F, 0x000036B7,
0xD9C68693, 0x40000613, 0x00070513, 0x000A8593, 0x00001097, 0xB18080E7, 0x00003637, 0xD8C60613,
0x40000593, 0x00001097, 0x880080E7, 0x00003637, 0xDB460613, 0x01000513, 0x01000593, 0x00001097,
0x868080E7, 0x00003637, 0xCA860613, 0x0240006F, 0x00003637, 0xD0C60613, 0x0180006F, 0x00003637,
0xCC860613, 0x00C0006F, 0x00003637, 0xCD860613, 0x01000593, 0x00068513, 0x00001097, 0x82C080E7,
0x000035B7, 0xBA858593, 0x04000893, 0x00100513, 0x00600613, 0x00000073, 0x05D00893, 0x00200513,
0x00000593, 0x00000613, 0x00000073, 0x0000006F, 0x00000793, 0x04060063, 0x01700693, 0x00800737,
0x01170713, 0x00F58833, 0x00084803, 0xFF780813, 0x0306E263, 0x01075833, 0x00187813, 0x00080C63,
0x00178793, 0xFEF610E3, 0x00060793, 0x00060713, 0x0440006F, 0x02C7FE63, 0x01700693, 0x00800837,
0x01180813, 0x00078713, 0x00E588B3, 0x0008C883, 0xFF788893, 0x0116E863, 0x011858B3, 0x0018F893,
0x00089A63, 0x00170713, 0xFEE610E3, 0xFC1FF06F, 0x00078713, 0x02F76663, 0x02E66463, 0x40F706B3,
0x00F587B3, 0x40E60633, 0x00E585B3, 0x00F52023, 0x00D52223, 0x00B52423, 0x00C52623, 0x00008067,
0x000036B7, 0xD2C68693, 0x00078513, 0x00070593, 0x00001097, 0x9B8080E7, 0xFE010113, 0x00112E23,
0x00812C23, 0x00912A23, 0x01212823, 0x01312623, 0x01412423, 0x01512223, 0x01612023, 0x000409B7,
0x40098993, 0x4109A403, 0x04040A63, 0x00058493, 0x00050913, 0x00000A13, 0xE8000A93, 0x01900B13,
0x080A8A63, 0x01498533, 0x40054503, 0x02A49263, 0x07657463, 0x01598533, 0x38050513, 0x00090593,
0x00048613, 0x00001097, 0xCBC080E7, 0x00050C63, 0x001A0A13, 0x018A8A93, 0xFD4414E3, 0x00000513,
0x00C0006F, 0x00100513, 0x000A0413, 0x00040593, 0x01C12083, 0x01812403, 0x01412483, 0x01012903,
0x00C12983, 0x00812A03, 0x00412A83, 0x00012B03, 0x02010113, 0x00008067, 0x000036B7, 0xD4C68693,
0x01800613, 0x00000513, 0x00048593, 0x00001097, 0x8DC080E7, 0x00003637, 0xD3C60613, 0x01000513,
0x01000593, 0x00000097, 0x640080E7, 0xFF010113, 0x00112623, 0x00812423, 0x00912223, 0x00058413,
0x00050493, 0x00000097, 0xEF4080E7, 0x00050693, 0x00100513, 0x00A69663, 0x00058713, 0x07C0006F,
0x000405B7, 0x40058593, 0x4105A703, 0x01000613, 0x00000513, 0x06C70263, 0xFE740613, 0xFE700693,
0x04C6FC63, 0x00F00513, 0x06E56463, 0x00371513, 0x00471613, 0x00A60533, 0x00B50533, 0x20050513,
0x00040613, 0x0004C683, 0x00148493, 0xFFF60613, 0x00D50023, 0x00150513, 0xFE0616E3, 0x00E58533,
0x40850023, 0x4105A503, 0x00150513, 0x40A5A823, 0x00100513, 0x0040006F, 0x00070593, 0x00C12083,
0x00812403, 0x00412483, 0x01010113, 0x00008067, 0x00003637, 0xD5C60613, 0x01000593, 0x00070513,
0x00000097, 0x564080E7, 0x02060C63, 0x00052683, 0x20000713, 0x000407B7, 0x40078793, 0x00E6FC63,
0x0005C803, 0x00D788B3, 0x00168693, 0x01088023, 0x00D52023, 0xFFF60613, 0x00158593, 0xFE0610E3,
0x00008067, 0x00052703, 0x20100513, 0x02A77063, 0x000405B7, 0x40058593, 0x04000893, 0x00100513,
0x00070613, 0x00000073, 0x00008067, 0x000036B7, 0xD6C68693, 0x20000613, 0x00000513, 0x00070593,
0x00000097, 0x768080E7, 0xFC010113, 0x02112E23, 0x02812C23, 0x02912A23, 0x03212823, 0x03312623,
0x03412423, 0x03512223, 0x03612023, 0x00058493, 0x00C5E5B3, 0x00050413, 0x02058663, 0x00060913,
0x00C10513, 0x01400613, 0x00000593, 0x00001097, 0xF70080E7, 0x02090E63, 0x01F95513, 0x02050E63,
0x0E00006F, 0x00042503, 0x1FF00593, 0x0CA5EA63, 0x000405B7, 0x40058593, 0x03000613, 0x00A585B3,
0x00150513, 0x00C58023, 0x00A42023, 0x0B40006F, 0x0014B513, 0x0A051663, 0x00000993, 0x01300A13,
0x01F10A93, 0x01300B13, 0x0D6A6063, 0x00A00613, 0x00048513, 0x00090593, 0x00000693, 0x00001097,
0xA54080E7, 0x00193613, 0x00151693, 0x00351713, 0x00D706B3, 0x00A4B713, 0x00198993, 0x00E67633,
0x40D484B3, 0x0304E693, 0x00DA8023, 0xFFFA8A93, 0xFFFB0B13, 0x00050493, 0x00058913, 0xFA0606E3,
0x00042503, 0x00C10593, 0x413585B3, 0x01458593, 0x20000613, 0x000406B7, 0x40068693, 0x00C57C63,
0x0005C703, 0x00A687B3, 0x00150513, 0x00E78023, 0x00A42023, 0xFFF98993, 0x00158593, 0xFE0990E3,
0x03C12083, 0x03812403, 0x03412483, 0x03012903, 0x02C12983, 0x02812A03, 0x02412A83, 0x02012B03,
0x04010113, 0x00008067, 0x00003637, 0xD7C60613, 0xFFF00513, 0x01400593, 0x00000097, 0x36C080E7,
0xFC010113, 0x02112E23, 0x02812C23, 0x02912A23, 0x03212823, 0x03312623, 0x03412423, 0x03512223,
0x03612023, 0x01712E23, 0x01812C23, 0x01912A23, 0x01A12823, 0x01B12623, 0x04010413, 0x00078493,
0x00070913, 0x00068A13, 0x00060A93, 0x00050993, 0x00852B83, 0x08059263, 0x02D00B13, 0x00100C93,
0x008B9513, 0x009C8CB3, 0x08055663, 0x01000513, 0x10AA7263, 0x00000513, 0x020A0263, 0x014A85B3,
0x000A8613, 0x00060683, 0x00160613, 0xFC06A693, 0x0016C693, 0x00D50533, 0xFEB616E3, 0x01950CB3,
0x00C9DD83, 0x05BCFE63, 0x007B9513, 0x0E054463, 0x419D8633, 0x001B9513, 0x01E55513, 0x00100593,
0x00BB9B93, 0xFD242423, 0x14A5CA63, 0x18051A63, 0x00000D13, 0x1900006F, 0x00AB9513, 0x01F55C93,
0xFFFC8513, 0x02B56B13, 0x008B9513, 0x009C8CB3, 0xF6054EE3, 0x00000A93, 0x00C9DD83, 0xFBBCE6E3,
0x0009AB83, 0x0049A983, 0x000B8513, 0x00098593, 0x000B0613, 0x000A8693, 0x000A0713, 0x00000097,
0x5A8080E7, 0x18051063, 0x00C9A303, 0x000B8513, 0x00090593, 0x00048613, 0x03C12083, 0x03812403,
0x03412483, 0x03012903, 0x02C12983, 0x02812A03, 0x02412A83, 0x02012B03, 0x01C12B83, 0x01812C03,
0x01412C83, 0x01012D03, 0x00C12D83, 0x04010113, 0x00030067, 0x000A8513, 0x000A0593, 0x00000097,
0x26C080E7, 0x01950CB3, 0x00C9DD83, 0xF7BCFAE3, 0xF19FF06F, 0x0009AB83, 0x0049AC03, 0x0089AD03,
0x00C9A503, 0xFCA42223, 0x9FE00537, 0x200005B7, 0x00AD7533, 0x03058593, 0x00B56533, 0x00A9A423,
0x000B8513, 0x000C0593, 0x000B0613, 0x000A8693, 0x000A0713, 0x00000097, 0x4F0080E7, 0x00100A13,
0x0C051463, 0x00000A93, 0x419D8533, 0x00010B37, 0xFFFB0B13, 0x01657CB3, 0x016AF533, 0x03957C63,
0x010C2603, 0x001A8A93, 0x03000593, 0x000B8513, 0x000600E7, 0xFE0502E3, 0x0900006F, 0x00200593,
0x00060D13, 0x04B51063, 0x01061513, 0x01155D13, 0x0340006F, 0x00CC2683, 0x000B8513, 0x00090593,
0x00048613, 0x000680E7, 0x06051063, 0x00000A13, 0x01A9A423, 0xFC442503, 0x00A9A623, 0x04C0006F,
0x00060D13, 0xFCC42223, 0x00000D93, 0x00BBDB93, 0x0009AC03, 0x0049A983, 0x00010CB7, 0xFFFC8C93,
0x019D7933, 0x019DF533, 0x07257063, 0x0109A603, 0x001D8D93, 0x000C0513, 0x000B8593, 0x000600E7,
0xFE0502E3, 0x00100A13, 0x000A0513, 0x03C12083, 0x03812403, 0x03412483, 0x03012903, 0x02C12983,
0x02812A03, 0x02412A83, 0x02012B03, 0x01C12B83, 0x01812C03, 0x01412C83, 0x01012D03, 0x00C12D83,
0x04010113, 0x00008067, 0x000C0513, 0x00098593, 0x000B0613, 0x000A8693, 0x000A0713, 0x00000097,
0x3C8080E7, 0x00100A13, 0xFA0510E3, 0x00C9A683, 0x000C0513, 0xFC842583, 0x00048613, 0x000680E7,
0xF80514E3, 0x00000493, 0xFC442503, 0x41A50533, 0x00010937, 0xFFF90913, 0x01257AB3, 0x0124F533,
0x01553A33, 0xF75572E3, 0x0109A603, 0x00148493, 0x000C0513, 0x000B8593, 0x000600E7, 0xFE0500E3,
0xF49FF06F, 0xFE010113, 0x00112E23, 0x00812C23, 0x02010413, 0xFEA42023, 0xFEB42223, 0xFE440513,
0x000025B7, 0x45058593, 0xFE040693, 0xFEA42423, 0xFEB42623, 0xFED42823, 0xFEB42A23, 0x00003537,
0xC0050513, 0xFE840593, 0x00000097, 0x008080E7, 0xFE010113, 0x00112E23, 0x00812C23, 0x02010413,
0xFEA42223, 0xFEB42423, 0xFE440513, 0x00100593, 0xFEA42623, 0xFEC42823, 0xFEB41A23, 0xFEC40513,
0xFFFFF097, 0x760080E7, 0x00050613, 0x00350513, 0xFFC57513, 0x40C50833, 0x0305F663, 0x00000513,
0x02058063, 0x00B605B3, 0x00060683, 0x00160613, 0xFC06A693, 0x0016C693, 0x00D50533, 0xFEB616E3,
0x00008067, 0x41058733, 0x00275693, 0xFC0688E3, 0x01060833, 0x00377593, 0x00C51663, 0x00000513,
0x0200006F, 0x00000513, 0x00060783, 0x00160613, 0xFC07A793, 0x0017C793, 0x00F50533, 0xFF0616E3,
0x00000793, 0x02058863, 0x80000637, 0xFFC60613, 0x00C77633, 0x00C80633, 0x00060703, 0xFFF58593,
0xFC072713, 0x00174713, 0x00E787B3, 0x00160613, 0xFE0594E3, 0x010105B7, 0x00FF0737, 0x10158613,
0x0FF70593, 0x00A78533, 0x0340006F, 0x01070833, 0x40F686B3, 0x0037F293, 0x00B8F333, 0x0088D893,
0x00B8F8B3, 0x006888B3, 0x01089313, 0x011308B3, 0x0108D893, 0x00A88533, 0x0A029863, 0xF40682E3,
0x00080713, 0x0C000813, 0x00068793, 0x0106E463, 0x0C000793, 0x00279813, 0x00000893, 0x3F087293,
0xFA0286E3, 0x005702B3, 0x00070313, 0x00032383, 0x00432E03, 0x00832E83, 0x00C32F03, 0xFFF3CF93,
0x0063D393, 0x007FDF93, 0x007FE3B3, 0xFFFE4F93, 0x006E5E13, 0x007FDF93, 0x01CFEE33, 0xFFFECF93,
0x006EDE93, 0x007FDF93, 0x01DFEEB3, 0xFFFF4F93, 0x006F5F13, 0x007FDF93, 0x01EFEF33, 0x00C3F3B3,
0x011388B3, 0x00CE73B3, 0x00CEFE33, 0x00CF7EB3, 0x007E03B3, 0x011388B3, 0x01030313, 0x011E88B3,
0xF85316E3, 0xF29FF06F, 0x00000693, 0x0FC7F793, 0x00279793, 0x00F707B3, 0x00229713, 0x0007A803,
0x00478793, 0xFFF84893, 0x00685813, 0x0078D893, 0x0108E833, 0x00C87833, 0xFFC70713, 0x00D806B3,
0xFC071EE3, 0x00B6F633, 0x0086D693, 0x00B6F5B3, 0x00C585B3, 0x01059613, 0x00B605B3, 0x0105D593,
0x00A58533, 0x00008067, 0xFE010113, 0x00112E23, 0x00812C23, 0x02010413, 0x04A67263, 0xFEA42023,
0xFEC42223, 0xFE040513, 0x000025B7, 0x45058593, 0xFE440613, 0xFEA42423, 0xFEB42623, 0xFEC42823,
0xFEB42A23, 0x00003537, 0xC6E50513, 0xFE840593, 0x00068613, 0x00000097, 0xD7C080E7, 0x04B66463,
0x04A5F263, 0xFEA42023, 0xFEB42223, 0xFE040513, 0x000025B7, 0x45058593, 0xFE440613, 0xFEA42423,
0xFEB42623, 0xFEC42823, 0xFEB42A23, 0x00003537, 0xBCF50513, 0xFE840593, 0x00068613, 0x00000097,
0xD34080E7, 0xFEB42023, 0xFEC42223, 0xFE040513, 0x000025B7, 0x45058593, 0xFE440613, 0xFEA42423,
0xFEB42623, 0xFEC42823, 0xFEB42A23, 0x00003537, 0xC3750513, 0xFE840593, 0x00068613, 0x00000097,
0xCF4080E7, 0xFE010113, 0x00112E23, 0x00812C23, 0x00912A23, 0x01212823, 0x01312623, 0x01412423,
0x02010413, 0x00070493, 0x00068913, 0x00058993, 0xFFF00593, 0x00050A13, 0x02B60063, 0x0109A683,
0x000A0513, 0x00060593, 0x000680E7, 0x00050663, 0x00100513, 0x03C0006F, 0x02090A63, 0x00C9A303,
0x000A0513, 0x00090593, 0x00048613, 0x01C12083, 0x01812403, 0x01412483, 0x01012903, 0x00C12983,
0x00812A03, 0x02010113, 0x00030067, 0x00000513, 0x01C12083, 0x01812403, 0x01412483, 0x01012903,
0x00C12983, 0x00812A03, 0x02010113, 0x00008067, 0xFC010113, 0x02112E23, 0x02812C23, 0x02912A23,
0x03212823, 0x03312623, 0x03412423, 0x03512223, 0x03612023, 0x01712E23, 0x01812C23, 0x04010413,
0x00058693, 0x00052583, 0x3E800613, 0x00003537, 0xDD450513, 0x0CC5E663, 0x00000713, 0xFD440793,
0xFD740813, 0xFD640893, 0xFD540293, 0xD1B71637, 0x00002E37, 0x00001EB7, 0x06400313, 0x00989F37,
0x75960393, 0x710E0E13, 0x47BE8E93, 0x67FF0F13, 0x00058613, 0x00060F93, 0x02763633, 0x00E784B3,
0x00E28933, 0x00E889B3, 0x00E80A33, 0x00D65613, 0x03C60AB3, 0x415F8AB3, 0x010A9B13, 0x012B5B13,
0x03DB0B33, 0x010B5B93, 0x011B5B13, 0x026B0B33, 0x7FEBFB93, 0x416A8AB3, 0x01750BB3, 0x011A9A93,
0x010ADA93, 0x01550AB3, 0x000BCB03, 0x001BCB83, 0x000ACC03, 0x001ACA83, 0x01648023, 0x01790023,
0x01898023, 0x015A0023, 0xFFC70713, 0xF9FF64E3, 0x00A70713, 0x00900793, 0x00C7EC63, 0x0680006F,
0x00A00713, 0x00058613, 0x00900793, 0x04B7FC63, 0x01061793, 0x00001837, 0x06400893, 0xFCE40293,
0x0127D793, 0x47B80813, 0x00E28333, 0x030787B3, 0x0117D793, 0x03178833, 0x41060633, 0x01161613,
0x01065613, 0x00C50633, 0x00064803, 0x00164603, 0xFFE70713, 0x00E282B3, 0x01028023, 0xFEC30FA3,
0x00078613, 0x00058463, 0x02060063, 0x00161613, 0x00C50533, 0x00154503, 0xFFF70713, 0xFCE40593,
0x00E585B3, 0x00A58023, 0x00A00793, 0xFCE40513, 0x40E787B3, 0x00E50733, 0x00100593, 0x00100613,
0x00068513, 0x00000693, 0xFFFFF097, 0x6D8080E7, 0x03C12083, 0x03812403, 0x03412483, 0x03012903,
0x02C12983, 0x02812A03, 0x02412A83, 0x02012B03, 0x01C12B83, 0x01812C03, 0x04010113, 0x00008067,
0x02060063, 0x00054683, 0x0005C703, 0x00E69E63, 0x00158593, 0xFFF60613, 0x00150513, 0xFE0614E3,
0x00000513, 0x00008067, 0x40E68533, 0x00008067, 0xFE010113, 0x00112E23, 0x00812C23, 0x02010413,
0x00068713, 0x00060693, 0x00058613, 0x00050593, 0xFE840513, 0x00000097, 0x020080E7, 0xFE842503,
0xFEC42583, 0x01C12083, 0x01812403, 0x02010113, 0x00008067, 0x0A068863, 0x0A071663, 0x1C060C63,
0x1ED67A63, 0x0106D893, 0x00C8B7B3, 0x0017C813, 0x00068793, 0x26C8F063, 0x00481813, 0x0087D293,
0x00C2B8B3, 0x0018C893, 0x26C2F263, 0x00389293, 0x0047D893, 0x0102E833, 0x00C8B2B3, 0x0012C293,
0x26C8F463, 0x00229293, 0x0027D893, 0x00586833, 0x00C8B2B3, 0x0012C293, 0x00C8E463, 0x00088793,
0x00129293, 0x0017D793, 0x00C7B7B3, 0x0017C793, 0x00F2E7B3, 0x00F867B3, 0x24079863, 0x01F00813,
0xFE080293, 0x010698B3, 0x2402DA63, 0x01071733, 0xFFF84793, 0x0016D313, 0x00F357B3, 0x00F767B3,
0x2400006F, 0x00000813, 0x10060C63, 0x10E60663, 0x00E637B3, 0x10079663, 0x01065893, 0x00E8B7B3,
0x0017C813, 0x00481813, 0x00060793, 0x14E8F863, 0x0087D893, 0x00E8B2B3, 0x0012C293, 0x00329293,
0x0102E833, 0x14E8FA63, 0x0047D893, 0x00E8B2B3, 0x0012C293, 0x00229293, 0x00586833, 0x14E8FC63,
0x0027D293, 0x00E2B8B3, 0x0018C893, 0x00189893, 0x011868B3, 0x00E2E463, 0x00028793, 0x00000813,
0x0017D793, 0x0016D293, 0x00E7B7B3, 0x0017C793, 0x00F8E8B3, 0x01F8C793, 0x00F2D7B3, 0x011712B3,
0x00F2E7B3, 0x00100293, 0x011292B3, 0x01169333, 0x0180006F, 0x00135893, 0x01F79313, 0x0017D793,
0x0068E333, 0x0012D293, 0x0065B8B3, 0x40F603B3, 0x411388B3, 0xFE08C0E3, 0x406585B3, 0x00E88A63,
0x00E8B633, 0x0102E833, 0x00060A63, 0x0180006F, 0x00D5B633, 0x0102E833, 0x00061663, 0x00088613,
0xFB5FF06F, 0x01052023, 0x00052223, 0x00B52423, 0x01152623, 0x00008067, 0x00D5B7B3, 0xEE078EE3,
0x01052023, 0x01052223, 0x00B52423, 0x00C52623, 0x00008067, 0x02D5D833, 0x02D80633, 0x40C585B3,
0x01052023, 0x00052223, 0x00B52423, 0x00052623, 0x00008067, 0x16D61063, 0x02C5D833, 0x02C80633,
0x40C585B3, 0x00100793, 0x01052023, 0x00F52223, 0x00B52423, 0x00052623, 0x00008067, 0x00088793,
0x0088D893, 0x00E8B2B3, 0x0012C293, 0x00329293, 0x0102E833, 0xEAE8EAE3, 0x00088793, 0x0048D893,
0x00E8B2B3, 0x0012C293, 0x00229293, 0x00586833, 0xEAE8E8E3, 0x00088793, 0x0028D293, 0x00E2B8B3,
0x0018C893, 0x00189893, 0x011868B3, 0xEAE2F6E3, 0xEADFF06F, 0x00088793, 0x00481813, 0x0088D293,
0x00C2B8B3, 0x0018C893, 0xDAC2E2E3, 0x00028793, 0x00389293, 0x0047D893, 0x0102E833, 0x00C8B2B3,
0x0012C293, 0xDAC8E0E3, 0x00088793, 0x00229293, 0x0028D893, 0x00586833, 0x00C8B2B3, 0x0012C293,
0xD8C8FEE3, 0xD9DFF06F, 0x02000813, 0x40F80833, 0xFE080293, 0x010698B3, 0xDA02CAE3, 0x00088793,
0x00000713, 0x41F2D293, 0x0112F8B3, 0x00100293, 0x01029833, 0x0180006F, 0x0018D893, 0x01F79293,
0x0017D793, 0x0058E8B3, 0x00185813, 0x0115B2B3, 0x40F60333, 0x405302B3, 0xFE02C0E3, 0x411585B3,
0x00E86733, 0x00028663, 0x00028613, 0xFCDFF06F, 0x02D5D633, 0x02D606B3, 0x40D585B3, 0x00E66833,
0x01052023, 0x00052223, 0x00B52423, 0x00052623, 0x00008067, 0x02D657B3, 0x0106D813, 0x02D788B3,
0x411608B3, 0x04081E63, 0x0105D613, 0x01089893, 0x00C8E733, 0x02D75733, 0x01059593, 0x0105D593,
0x02D70833, 0x41060633, 0x01061613, 0x00B665B3, 0x02D5D633, 0x01071813, 0x01075713, 0x00F767B3,
0x02D606B3, 0x40D585B3, 0x00C86833, 0x01052023, 0x00F52223, 0x00B52423, 0x00052623, 0x00008067,
0x00E88663, 0x00E8B633, 0x0080006F, 0x00D5B633, 0x00060C63, 0x00052023, 0x00F52223, 0x00B52423,
0x01152623, 0x00008067, 0x0016D813, 0x01F71713, 0x01F69293, 0x01076733, 0x80000837, 0x0180006F,
0x0012D293, 0x01F71313, 0x00175713, 0x0062E2B3, 0x00185813, 0x0055B333, 0x40E883B3, 0x40638333,
0xFE0340E3, 0x405585B3, 0x00C86633, 0x00030663, 0x00030893, 0xFCDFF06F, 0x02D5D733, 0x02D706B3,
0x40D585B3, 0x00C76833, 0x01052023, 0x00F52223, 0x00B52423, 0x00052623, 0x00008067, 0x01000693,
0x06D66463, 0x40A006B3, 0x0036F693, 0x00D50733, 0x00E57E63, 0x00068793, 0x00050813, 0x00B80023,
0xFFF78793, 0x00180813, 0xFE079AE3, 0x40D60633, 0xFFC67693, 0x00D706B3, 0x02D77063, 0x0FF5F793,
0x01010837, 0x10180813, 0x030787B3, 0x00F72023, 0x00470713, 0xFED76CE3, 0x00367613, 0x00C68733,
0x00E6EA63, 0x0200006F, 0x00050693, 0x00C50733, 0x00E57A63, 0x00B68023, 0xFFF60613, 0x00168693,
0xFE061AE3, 0x00008067, 0x696E6170, 0x61620A63, 0x6D612064, 0x746E756F, 0x6764656C, 0x66207265,
0x206C6C75, 0x6220726F, 0x6E206461, 0x16656D61, 0x63696C73, 0x6E692065, 0x20786564, 0x72617473,
0x61207374, 0x0DC02074, 0x74756220, 0x646E6520, 0x74612073, 0x6700C020, 0x74736575, 0x0073722E,
0x646E6920, 0x6F207865, 0x6F207475, 0x6F622066, 0x73646E75, 0x6874203A, 0x656C2065, 0x7369206E,
0x2012C020, 0x20747562, 0x20656874, 0x65646E69, 0x73692078, 0x1000C020, 0x676E6172, 0x6E652065,
0x6E692064, 0x20786564, 0x6F2022C0, 0x6F207475, 0x61722066, 0x2065676E, 0x20726F66, 0x63696C73,
0x666F2065, 0x6E656C20, 0x20687467, 0x721200C0, 0x65676E61, 0x61747320, 0x69207472, 0x7865646E,
0x2022C020, 0x2074756F, 0x7220666F, 0x65676E61, 0x726F6620, 0x696C7320, 0x6F206563, 0x656C2066,
0x6874676E, 0x0000C020, 0x00002BF7, 0x00000008, 0x000000C0, 0x0000000D, 0x6E6B6E75, 0x206E776F,
0x646E6573, 0x00007265, 0x00002BF7, 0x00000008, 0x000000C9, 0x00000010, 0x00002BF7, 0x00000008,
0x000000CE, 0x0000000D, 0x75736E69, 0x63696666, 0x746E6569, 0x6C616220, 0x65636E61, 0x6E6B6E75,
0x206E776F, 0x6F636361, 0x00746E75, 0x00002BF7, 0x00000008, 0x000000D6, 0x00000010, 0x6E6B6E75,
0x206E776F, 0x6D6D6F63, 0x00646E61, 0x00002BF7, 0x00000008, 0x0000007F, 0x00000008, 0x00002BF7,
0x00000008, 0x00000050, 0x00000015, 0x00002BF7, 0x00000008, 0x00000051, 0x00000030, 0x00002BF7,
0x00000008, 0x00000063, 0x0000000D, 0x00002BF7, 0x00000008, 0x000000B0, 0x00000013, 0x00002BF7,
0x00000008, 0x000000A8, 0x0000000D, 0x00002BF7, 0x00000008, 0x000000ED, 0x0000001A, 0x00002BF7,
0x00000008, 0x000000F2, 0x0000002B, 0x656E696C, 0x00203A20, 0x00002BF7, 0x00000008, 0x00000103,
0x00000011, 0x00002BF7, 0x00000008, 0x00000104, 0x0000001F, 0x31303030, 0x33303230, 0x35303430,
0x37303630, 0x39303830, 0x31313031, 0x33313231, 0x35313431, 0x37313631, 0x39313831, 0x31323032,
0x33323232, 0x35323432, 0x37323632, 0x39323832, 0x31333033, 0x33333233, 0x35333433, 0x37333633,
0x39333833, 0x31343034, 0x33343234, 0x35343434, 0x37343634, 0x39343834, 0x31353035, 0x33353235,
0x35353435, 0x37353635, 0x39353835, 0x31363036, 0x33363236, 0x35363436, 0x37363636, 0x39363836,
0x31373037, 0x33373237, 0x35373437, 0x37373637, 0x39373837, 0x31383038, 0x33383238, 0x35383438,
0x37383638, 0x39383838, 0x31393039, 0x33393239, 0x35393439, 0x37393639, 0x39393839,
}
// GuestLedger returns the flat text image of the compiled Rust ledger, ready
// for [NewMachine] at [DefaultEntry].
func GuestLedger() []byte { return Image(guestLedger) }
// Image serializes instruction words little-endian, which is what RV32 is.
// Exported because anything assembling a program has to do exactly this, and
// getting the byte order wrong produces a decoder error a long way from the
// mistake.
func Image(words []uint32) []byte {
b := make([]byte, 0, len(words)*4)
for _, w := range words {
b = append(b, byte(w), byte(w>>8), byte(w>>16), byte(w>>24))
}
return b
}
mem.gno
package riscv
import "gno.land/p/nym-moultest123/x/vm/vmkit/v0"
// Memory is the guest's flat address space, with a snapshot that carries only
// the pages it actually touched.
//
// The shape is the one the bf ladder argued for. Running memory is a flat
// []byte because a load or a store happens on a large fraction of instructions
// and an avl lookup per access would dominate the interpreter the way
// vmkit.Meter.Charge did there. Snapshot cost is solved separately, by a dirty
// bitmap: a program that writes one page pauses in one page, not in a megabyte,
// which is the same trick that lets a bf hello world pause in 43 bytes.
//
// That answers the open question on the design issue ("memory size versus
// snapshot cost") without paying for it on every instruction.
const (
// PageSize is the snapshot granularity, not an MMU page: there is no
// address translation here, only bookkeeping about what changed.
PageSize = 4096
// MemSize is the address space. 1 MiB is far more than a no_std guest
// needs and small enough that the flat allocation is not the cost.
MemSize = 1 << 20
pageCount = MemSize / PageSize
)
// Memory is a flat address space plus the record of which pages were written.
type Memory struct {
b []byte
dirty []bool
}
// NewMemory returns a zeroed address space.
func NewMemory() *Memory {
return &Memory{b: make([]byte, MemSize), dirty: make([]bool, pageCount)}
}
// Size returns the address space size.
func (m *Memory) Size() int { return len(m.b) }
// DirtyPages reports how many pages the guest has written, which is what a
// snapshot costs.
func (m *Memory) DirtyPages() int {
n := 0
for _, d := range m.dirty {
if d {
n++
}
}
return n
}
// inRange reports whether [addr, addr+size) is inside the address space.
//
// Out of range is a trap rather than a wrap. RISC-V leaves the behaviour of an
// access outside physical memory to the platform, and a chain has to pick the
// one that cannot differ between nodes: refusing is deterministic, wrapping
// invites a guest to alias two addresses and get different answers from
// different memory sizes.
func (m *Memory) inRange(addr uint32, size int) bool {
end := uint64(addr) + uint64(size)
return end <= uint64(len(m.b))
}
// Load8, Load16 and Load32 read little-endian, which is what RV32 is.
func (m *Memory) Load8(addr uint32) (uint8, bool) {
if !m.inRange(addr, 1) {
return 0, false
}
return m.b[addr], true
}
func (m *Memory) Load16(addr uint32) (uint16, bool) {
if !m.inRange(addr, 2) {
return 0, false
}
return uint16(m.b[addr]) | uint16(m.b[addr+1])<<8, true
}
func (m *Memory) Load32(addr uint32) (uint32, bool) {
if !m.inRange(addr, 4) {
return 0, false
}
return uint32(m.b[addr]) | uint32(m.b[addr+1])<<8 |
uint32(m.b[addr+2])<<16 | uint32(m.b[addr+3])<<24, true
}
func (m *Memory) Store8(addr uint32, v uint8) bool {
if !m.inRange(addr, 1) {
return false
}
m.b[addr] = v
m.dirty[addr/PageSize] = true
return true
}
func (m *Memory) Store16(addr uint32, v uint16) bool {
if !m.inRange(addr, 2) {
return false
}
m.b[addr] = uint8(v)
m.b[addr+1] = uint8(v >> 8)
m.dirty[addr/PageSize] = true
m.dirty[(addr+1)/PageSize] = true
return true
}
func (m *Memory) Store32(addr uint32, v uint32) bool {
if !m.inRange(addr, 4) {
return false
}
m.b[addr] = uint8(v)
m.b[addr+1] = uint8(v >> 8)
m.b[addr+2] = uint8(v >> 16)
m.b[addr+3] = uint8(v >> 24)
m.dirty[addr/PageSize] = true
m.dirty[(addr+3)/PageSize] = true
return true
}
// WriteImage places a program image at addr and marks the pages it covers, so
// a snapshot taken before the first store still carries the program.
func (m *Memory) WriteImage(addr uint32, img []byte) bool {
if !m.inRange(addr, len(img)) {
return false
}
copy(m.b[addr:], img)
for i := 0; i < len(img); i++ {
m.dirty[(uint64(addr)+uint64(i))/PageSize] = true
}
return true
}
// Snapshot writes only the dirty pages, each prefixed by its index.
func (m *Memory) Snapshot(w *vmkit.Writer) {
w.Uint32(uint32(m.DirtyPages()))
for i, d := range m.dirty {
if !d {
continue
}
w.Uint32(uint32(i))
w.Bytes(m.b[i*PageSize : (i+1)*PageSize])
}
}
// Restore reads a snapshot written by Snapshot into a zeroed address space.
func (m *Memory) Restore(r *vmkit.Reader) error {
m.b = make([]byte, MemSize)
m.dirty = make([]bool, pageCount)
n := int(r.Uint32())
if n < 0 || n > pageCount {
return vmkit.ErrBadSnapshot
}
for i := 0; i < n; i++ {
idx := int(r.Uint32())
page := r.Bytes()
if err := r.Err(); err != nil {
return err
}
if idx < 0 || idx >= pageCount || len(page) != PageSize {
return vmkit.ErrBadSnapshot
}
copy(m.b[idx*PageSize:], page)
m.dirty[idx] = true
}
return r.Err()
}
predecode.gno
package riscv
// Predecode: the image is turned into fields once, at load, and the dispatch
// loop only indexes arrays.
//
// Two measurements forced this shape, both in switchcost_test.gno:
//
// - The GnoVM scans switch cases in source order. Reaching case 47 of a
// 48-case switch costs 13,358 gas against 292 for case 0, a measured 278
// gas per case skipped. So the internal opcodes below are ordered by how
// often compiled code actually executes them, and that ordering is a
// performance decision, not a stylistic one. Do not sort this list.
// - An elementary operation costs on the order of 280 gas. Fetching four
// bytes and reassembling them is fourteen of those, on every instruction,
// forever. Doing it once per word instead is the single largest saving
// available to an interpreter here.
//
// The decoders in decode.gno are used verbatim below rather than inlined,
// because predecode runs once per word in the image and not once per executed
// instruction. That is the point: the expensive, readable code moved off the
// hot path instead of being duplicated onto it.
// Internal opcodes, ordered by expected dynamic frequency in compiled code.
// The first dozen are what a loop nest and a function prologue are made of.
const (
iADDI uint8 = iota
iLW
iSW
iADD
iBNE
iBEQ
iJAL
iJALR
iLUI
iSLLI
iSRLI
iANDI
iSUB
iORI
iXORI
iBLT
iBGE
iBLTU
iBGEU
iSRAI
iSLL
iSRL
iSRA
iAND
iOR
iXOR
iLBU
iLB
iLH
iLHU
iSB
iSH
iAUIPC
iSLT
iSLTU
iSLTI
iSLTIU
iMUL
iMULH
iMULHSU
iMULHU
iDIV
iDIVU
iREM
iREMU
iECALL
iEBREAK
iFENCE
iILLEGAL
)
// code is an image with its fields already pulled apart. Parallel arrays, not
// a slice of structs: an arm reads three or four fields, and paying for the
// ones it does not read is the cost this whole file exists to avoid.
type code struct {
base uint32 // the address word 0 sits at
words uint32 // how many instructions the text segment holds
end uint32 // base + 4*words, the first address past the text
op []uint8
rd []uint8
rs1 []uint8
rs2 []uint8
imm []uint32
}
// predecode walks an image and records, for every word, what it is and what
// its operands are. A word that is not an instruction becomes iILLEGAL and
// traps only if it is ever executed, which is what keeps a constant pool in
// the middle of a text segment legal.
func predecode(base uint32, img []byte) *code {
n := uint32(len(img) / 4)
c := &code{
base: base,
words: n,
end: base + n*4,
op: make([]uint8, n),
rd: make([]uint8, n),
rs1: make([]uint8, n),
rs2: make([]uint8, n),
imm: make([]uint32, n),
}
for i := uint32(0); i < n; i++ {
j := i * 4
inst := uint32(img[j]) | uint32(img[j+1])<<8 |
uint32(img[j+2])<<16 | uint32(img[j+3])<<24
op, imm := decodeWord(inst)
c.op[i] = op
c.imm[i] = imm
// The three register selectors are in the same place in every format
// that has them, and are harmless in the formats that do not, so they
// are taken unconditionally and spelled out: this loop already costs
// more than executing the instruction does.
c.rd[i] = uint8((inst >> 7) & 0x1F)
c.rs1[i] = uint8((inst >> 15) & 0x1F)
c.rs2[i] = uint8((inst >> 20) & 0x1F)
}
return c
}
// decodeWord returns both the internal opcode and the immediate, in one pass.
//
// They were two functions once, and splitting them cost 22 case labels: the
// second switch had to ask all over again which format the instruction was, and
// the GnoVM scans case labels one at a time. Deciding both in the arm that
// already knows the answer took predecode from 31.4k gas per word to 19.6k.
//
// The immediate decoders are still called rather than inlined. This runs once
// per word in the image, not once per executed instruction, and sign extension
// is the subtle part of RV32 decoding: it belongs in one place, spelled out,
// with decode_test.gno round-tripping it against the assembler.
func decodeWord(inst uint32) (uint8, uint32) {
f3 := funct3(inst)
switch opcode(inst) {
case opImm:
imm := immI(inst)
switch f3 {
case 0x0:
return iADDI, imm
case 0x1:
return iSLLI, imm
case 0x2:
return iSLTI, imm
case 0x3:
return iSLTIU, imm
case 0x4:
return iXORI, imm
case 0x5:
if funct7(inst) == 0x20 {
return iSRAI, imm
}
return iSRLI, imm
case 0x6:
return iORI, imm
case 0x7:
return iANDI, imm
}
case opLoad:
imm := immI(inst)
switch f3 {
case 0x0:
return iLB, imm
case 0x1:
return iLH, imm
case 0x2:
return iLW, imm
case 0x4:
return iLBU, imm
case 0x5:
return iLHU, imm
}
case opStore:
imm := immS(inst)
switch f3 {
case 0x0:
return iSB, imm
case 0x1:
return iSH, imm
case 0x2:
return iSW, imm
}
case opReg:
f7 := funct7(inst)
if f7 == 0x01 {
switch f3 {
case 0x0:
return iMUL, 0
case 0x1:
return iMULH, 0
case 0x2:
return iMULHSU, 0
case 0x3:
return iMULHU, 0
case 0x4:
return iDIV, 0
case 0x5:
return iDIVU, 0
case 0x6:
return iREM, 0
case 0x7:
return iREMU, 0
}
}
switch f3 {
case 0x0:
if f7 == 0x20 {
return iSUB, 0
}
return iADD, 0
case 0x1:
return iSLL, 0
case 0x2:
return iSLT, 0
case 0x3:
return iSLTU, 0
case 0x4:
return iXOR, 0
case 0x5:
if f7 == 0x20 {
return iSRA, 0
}
return iSRL, 0
case 0x6:
return iOR, 0
case 0x7:
return iAND, 0
}
case opBranch:
imm := immB(inst)
switch f3 {
case 0x0:
return iBEQ, imm
case 0x1:
return iBNE, imm
case 0x4:
return iBLT, imm
case 0x5:
return iBGE, imm
case 0x6:
return iBLTU, imm
case 0x7:
return iBGEU, imm
}
case opLUI:
return iLUI, immU(inst)
case opAUIPC:
return iAUIPC, immU(inst)
case opJAL:
return iJAL, immJ(inst)
case opJALR:
if f3 == 0x0 {
return iJALR, immI(inst)
}
case opFence:
return iFENCE, 0
case opSystem:
if immI(inst) == 0 {
return iECALL, 0
}
return iEBREAK, 0
}
return iILLEGAL, 0
}
predecode_test.gno
package riscv
import (
"testing"
"gno.land/p/nym-moultest123/x/vm/vmkit/v0"
"gno.land/p/nt/uassert/v0"
)
// classify collapses the spec's opcode / funct3 / funct7 tree onto one byte,
// and every arm of the dispatch loop trusts it. These are the pairs that share
// a funct3 and differ only in funct7, which is where a collapse goes wrong.
func TestClassifySeparatesTheAmbiguousPairs(t *testing.T) {
cases := []struct {
inst uint32
want uint8
}{
{add(1, 2, 3), iADD},
{sub(1, 2, 3), iSUB},
{mul(1, 2, 3), iMUL},
{divi(1, 2, 3), iDIV},
{remi(1, 2, 3), iREM},
{addi(1, 2, 5), iADDI},
{lw(1, 2, 0), iLW},
{lbu(1, 2, 0), iLBU},
{sw(1, 2, 0), iSW},
{bne(1, 2, 4), iBNE},
{lui(1, 0x1000), iLUI},
{jal(1, 4), iJAL},
{ecall(), iECALL},
{0, iILLEGAL},
}
for _, c := range cases {
op, _ := decodeWord(c.inst)
uassert.Equal(t, uint64(c.want), uint64(op))
}
}
// A restored hart has to predecode again, because the arrays are not in the
// snapshot: only the memory pages are. Restoring into a machine that has never
// seen the image is the path a realm actually takes between transactions, and
// it is the one the existing slice test did not cover, because it always
// restored into a machine NewMachine had already loaded.
func TestRestoreIntoABareMachine(t *testing.T) {
prog := append([]uint32{
addi(5, 0, 0),
addi(6, 0, 10),
add(5, 5, 6),
addi(6, 6, 0xFFF), // -1
bne(6, 0, 0x1FF8), // -8
}, exitWith()...)
image := asm(prog)
one, err := NewMachine(image, entry)
uassert.NoError(t, err)
one.Step(vmkit.NewTestHost(), vmkit.Unmetered)
part, err := NewMachine(image, entry)
uassert.NoError(t, err)
_, status := part.Step(vmkit.NewTestHost(), 7)
uassert.Equal(t, "running", status.String())
var bare Machine
uassert.NoError(t, bare.Restore(part.Snapshot()))
_, status = bare.Step(vmkit.NewTestHost(), vmkit.Unmetered)
uassert.Equal(t, "halted", status.String())
uassert.Equal(t, uint64(one.Registers()[5]), uint64(bare.Registers()[5]))
uassert.Equal(t, uint64(55), uint64(bare.Registers()[5]))
}
// Predecoding is only sound if the text cannot change under it, so a store
// into the text segment is a trap rather than a silent disagreement between
// the arrays and the memory. That is W xor X, which is what an ELF text
// segment is anyway, and it removes self-modifying code from the VM entirely.
func TestStoreIntoTextTraps(t *testing.T) {
prog := append(li(5, entry), addi(6, 0, 1), sw(6, 5, 0))
prog = append(prog, exitWith()...)
m, err := NewMachine(asm(prog), entry)
uassert.NoError(t, err)
_, status := m.Step(vmkit.NewTestHost(), vmkit.Unmetered)
uassert.Equal(t, "trapped", status.String())
uassert.Equal(t, "store into text segment", m.Trap())
}
// A store just below the text segment is legal, or the trap above would be
// catching the wrong thing.
func TestStoreBelowTextIsFine(t *testing.T) {
prog := append(li(5, entry-4), addi(6, 0, 7), sw(6, 5, 0))
prog = append(prog, exitWith()...)
m, err := NewMachine(asm(prog), entry)
uassert.NoError(t, err)
_, status := m.Step(vmkit.NewTestHost(), vmkit.Unmetered)
uassert.Equal(t, "halted", status.String())
v, ok := m.Memory().Load32(entry - 4)
uassert.True(t, ok)
uassert.Equal(t, uint64(7), uint64(v))
}
// A halted hart points past the ecall it halted on, not at it. The deferred
// write-back is the only thing that sets m.pc, so an arm that assigned m.pc
// directly had its assignment silently undone on the way out.
func TestHaltedPCIsPastTheEcall(t *testing.T) {
m, err := NewMachine(asm(exitWith()), entry)
uassert.NoError(t, err)
_, status := m.Step(vmkit.NewTestHost(), vmkit.Unmetered)
uassert.Equal(t, "halted", status.String())
// entry: addi a7, x0, 93 -- entry+4: ecall -- so the next pc is entry+8.
uassert.Equal(t, uint64(entry+8), uint64(m.PC()))
}
// An entry point or an image that is not a whole number of instructions has no
// predecode, so it is refused at load rather than half-executed.
func TestNewMachineRefusesMisalignedImages(t *testing.T) {
_, err := NewMachine(asm(exitWith()), entry+1)
uassert.Error(t, err)
_, err = NewMachine([]byte{1, 2, 3}, entry)
uassert.Error(t, err)
}
// The index into the predecoded arrays is a shift, so a pc that is not
// 4-aligned would silently execute the word containing it. Only a snapshot can
// deliver one, because JALR checks its own target, so the guard is at entry to
// the loop rather than inside it.
func TestMisalignedPCTraps(t *testing.T) {
m, err := NewMachine(asm(exitWith()), entry)
uassert.NoError(t, err)
m.pc = entry + 2
_, status := m.Step(vmkit.NewTestHost(), vmkit.Unmetered)
uassert.Equal(t, "trapped", status.String())
uassert.Equal(t, "misaligned program counter", m.Trap())
}
// JALR is the only instruction that can compute an odd target, and it clears
// only bit 0, so a target of 2 mod 4 has to be refused where it is made.
func TestJalrRefusesAMisalignedTarget(t *testing.T) {
prog := append(li(5, entry+6), []uint32{jalr(1, 5, 0)}...)
prog = append(prog, exitWith()...)
m, err := NewMachine(asm(prog), entry)
uassert.NoError(t, err)
_, status := m.Step(vmkit.NewTestHost(), vmkit.Unmetered)
uassert.Equal(t, "trapped", status.String())
uassert.Equal(t, "misaligned jump target", m.Trap())
}
// A .data section has to land somewhere writable, and refusing an overlap with
// the text is the check that keeps a bad linker script from producing a program
// that traps on its first store instead of at load.
func TestLoadDataRefusesTheTextSegment(t *testing.T) {
m, err := NewMachine(asm(exitWith()), entry)
uassert.NoError(t, err)
uassert.Error(t, m.LoadData(entry, []byte{1, 2, 3, 4}))
uassert.Error(t, m.LoadData(entry-2, []byte{1, 2, 3, 4}))
uassert.NoError(t, m.LoadData(entry-4, []byte{1, 2, 3, 4}))
uassert.NoError(t, m.LoadData(0x40000, []byte{9, 8, 7, 6}))
uassert.Error(t, m.LoadData(MemSize-2, []byte{1, 2, 3, 4}))
v, ok := m.Memory().Load32(0x40000)
uassert.True(t, ok)
uassert.Equal(t, uint64(0x06070809), uint64(v))
}
// Data is memory, so it rides in the snapshot like everything else the guest
// touched. A resumed program must not find its constants gone.
func TestLoadedDataSurvivesASnapshot(t *testing.T) {
m, err := NewMachine(asm(exitWith()), entry)
uassert.NoError(t, err)
uassert.NoError(t, m.LoadData(0x40000, []byte{0xDE, 0xAD, 0xBE, 0xEF}))
var restored Machine
uassert.NoError(t, restored.Restore(m.Snapshot()))
v, ok := restored.Memory().Load32(0x40000)
uassert.True(t, ok)
uassert.Equal(t, uint64(0xEFBEADDE), uint64(v))
}
riscv_test.gno
package riscv
import (
"testing"
"gno.land/p/nym-moultest123/x/vm/vmkit/v0"
"gno.land/p/nt/uassert/v0"
)
// A tiny assembler, so the programs below read as instructions rather than as
// hex. Encoding here and decoding in decode.gno are written from the spec
// independently: if one has a field in the wrong place the tests fail, which is
// the point of not sharing a helper between them.
func rType(f7, rs2, rs1, f3, rd, op uint32) uint32 {
return f7<<25 | rs2<<20 | rs1<<15 | f3<<12 | rd<<7 | op
}
func iType(imm, rs1, f3, rd, op uint32) uint32 {
return (imm&0xFFF)<<20 | rs1<<15 | f3<<12 | rd<<7 | op
}
func sType(imm, rs2, rs1, f3, op uint32) uint32 {
return (imm>>5&0x7F)<<25 | rs2<<20 | rs1<<15 | f3<<12 | (imm&0x1F)<<7 | op
}
func bType(imm, rs2, rs1, f3, op uint32) uint32 {
return (imm>>12&0x1)<<31 | (imm>>5&0x3F)<<25 | rs2<<20 | rs1<<15 |
f3<<12 | (imm>>1&0xF)<<8 | (imm>>11&0x1)<<7 | op
}
func uType(imm, rd, op uint32) uint32 { return imm&0xFFFFF000 | rd<<7 | op }
func jType(imm, rd, op uint32) uint32 {
return (imm>>20&0x1)<<31 | (imm>>1&0x3FF)<<21 | (imm>>11&0x1)<<20 |
(imm>>12&0xFF)<<12 | rd<<7 | op
}
func addi(rd, rs1, imm uint32) uint32 { return iType(imm, rs1, 0x0, rd, opImm) }
func add(rd, rs1, rs2 uint32) uint32 { return rType(0x00, rs2, rs1, 0x0, rd, opReg) }
func sub(rd, rs1, rs2 uint32) uint32 { return rType(0x20, rs2, rs1, 0x0, rd, opReg) }
func mul(rd, rs1, rs2 uint32) uint32 { return rType(0x01, rs2, rs1, 0x0, rd, opReg) }
func divi(rd, rs1, rs2 uint32) uint32 { return rType(0x01, rs2, rs1, 0x4, rd, opReg) }
func remi(rd, rs1, rs2 uint32) uint32 { return rType(0x01, rs2, rs1, 0x6, rd, opReg) }
func sw(rs2, rs1, imm uint32) uint32 { return sType(imm, rs2, rs1, 0x2, opStore) }
func lw(rd, rs1, imm uint32) uint32 { return iType(imm, rs1, 0x2, rd, opLoad) }
func lbu(rd, rs1, imm uint32) uint32 { return iType(imm, rs1, 0x4, rd, opLoad) }
func bne(rs1, rs2, imm uint32) uint32 { return bType(imm, rs2, rs1, 0x1, opBranch) }
func ecall() uint32 { return iType(0, 0, 0, 0, opSystem) }
// exitWith is the two instructions every test program ends with: set a7 to the
// exit syscall and trap into the host.
func exitWith() []uint32 { return []uint32{addi(17, 0, sysExit), ecall()} }
func asm(words []uint32) []byte {
out := make([]byte, 0, len(words)*4)
for _, w := range words {
out = append(out, byte(w), byte(w>>8), byte(w>>16), byte(w>>24))
}
return out
}
const entry = 0x1000
func run(t *testing.T, words []uint32, h vmkit.Host) *Machine {
t.Helper()
m, err := NewMachine(asm(words), entry)
uassert.NoError(t, err)
if m == nil {
return nil
}
_, status := m.Step(h, vmkit.Unmetered)
uassert.Equal(t, "halted", status.String())
return m
}
func TestArithmetic(t *testing.T) {
// x5 = 7 + 35; x6 = x5 - 2; x7 = x6 * 3
prog := append([]uint32{
addi(5, 0, 7),
addi(5, 5, 35),
addi(6, 0, 2),
sub(6, 5, 6),
addi(7, 0, 3),
mul(7, 6, 7),
}, exitWith()...)
m := run(t, prog, vmkit.NewTestHost())
r := m.Registers()
uassert.Equal(t, uint64(42), uint64(r[5]))
uassert.Equal(t, uint64(40), uint64(r[6]))
uassert.Equal(t, uint64(120), uint64(r[7]))
}
// Every immediate in the base set is sign extended from its top bit. Small
// positive programs work either way, which is what makes this the classic
// decoder bug: it only shows up on a negative constant.
func TestImmediatesAreSignExtended(t *testing.T) {
prog := append([]uint32{
addi(5, 0, 10),
addi(5, 5, 0xFFF), // -1
addi(6, 0, 0x800), // -2048, the most negative 12-bit immediate
}, exitWith()...)
m := run(t, prog, vmkit.NewTestHost())
r := m.Registers()
uassert.Equal(t, uint64(9), uint64(r[5]))
uassert.Equal(t, int64(-2048), int64(int32(r[6])))
}
// x0 reads as zero and discards every write, and the spec has no exception.
func TestRegisterZeroIsHardwired(t *testing.T) {
prog := append([]uint32{
addi(0, 0, 99),
add(5, 0, 0),
}, exitWith()...)
m := run(t, prog, vmkit.NewTestHost())
uassert.Equal(t, uint64(0), uint64(m.Registers()[0]))
uassert.Equal(t, uint64(0), uint64(m.Registers()[5]))
}
func TestLoadsAndStores(t *testing.T) {
prog := append([]uint32{
addi(5, 0, 0x7F0), // an address well clear of the program
addi(6, 0, 0x123),
sw(6, 5, 0),
lw(7, 5, 0),
lbu(8, 5, 0), // little-endian: the low byte is 0x23
}, exitWith()...)
m := run(t, prog, vmkit.NewTestHost())
r := m.Registers()
uassert.Equal(t, uint64(0x123), uint64(r[7]))
uassert.Equal(t, uint64(0x23), uint64(r[8]))
}
// A loop, which is the only way to know branches and the pc agree.
func TestBranchLoopSumsToTen(t *testing.T) {
// x5 = 0; x6 = 5; do { x5 += x6; x6 -= 1 } while (x6 != 0) => 15
prog := append([]uint32{
addi(5, 0, 0),
addi(6, 0, 5),
add(5, 5, 6), // loop:
addi(6, 6, 0xFFF), // x6 -= 1
bne(6, 0, 0x1FF8), // -8, back to loop
}, exitWith()...)
m := run(t, prog, vmkit.NewTestHost())
uassert.Equal(t, uint64(15), uint64(m.Registers()[5]))
}
// The M extension's defined answers. These are the cases a chain cares about,
// because the spec makes them RETURN rather than trap and every implementation
// therefore has to agree.
func TestDivisionEdgeCases(t *testing.T) {
const minInt32 = 0x80000000
prog := append([]uint32{
addi(5, 0, 7),
addi(6, 0, 0),
divi(7, 5, 6), // 7 / 0 = all ones
remi(8, 5, 6), // 7 % 0 = 7
uType(minInt32, 9, opLUI),
addi(10, 0, 0xFFF), // -1
divi(11, 9, 10), // overflow: stays minInt32
remi(12, 9, 10), // overflow: 0
}, exitWith()...)
m := run(t, prog, vmkit.NewTestHost())
r := m.Registers()
uassert.Equal(t, uint64(0xFFFFFFFF), uint64(r[7]))
uassert.Equal(t, uint64(7), uint64(r[8]))
uassert.Equal(t, uint64(minInt32), uint64(r[11]))
uassert.Equal(t, uint64(0), uint64(r[12]))
}
// The syscall table is the whole interface between guest and chain.
func TestWriteSyscallReachesTheHost(t *testing.T) {
// Store "hi" at 0x800, then write(1, 0x800, 2).
prog := append([]uint32{
addi(5, 0, 0x7F0),
addi(6, 0, 'h'),
sType(0, 6, 5, 0x0, opStore), // sb
addi(6, 0, 'i'),
sType(1, 6, 5, 0x0, opStore),
addi(17, 0, sysWrite),
addi(10, 0, 1),
addi(11, 0, 0x7F0),
addi(12, 0, 2),
ecall(),
}, exitWith()...)
h := vmkit.NewTestHost()
run(t, prog, h)
uassert.Equal(t, "hi", h.OutString())
}
// A guest that exits non-zero has HALTED, not trapped: "your code said no" is
// not "the VM broke", and a chain should not conflate them.
func TestNonZeroExitIsStillHalted(t *testing.T) {
prog := []uint32{addi(10, 0, 1), addi(17, 0, sysExit), ecall()}
m, err := NewMachine(asm(prog), entry)
uassert.NoError(t, err)
_, status := m.Step(vmkit.NewTestHost(), vmkit.Unmetered)
uassert.Equal(t, "halted", status.String())
uassert.Equal(t, "", m.Trap())
uassert.Equal(t, uint64(1), uint64(m.Registers()[10]))
}
func TestUnknownSyscallTraps(t *testing.T) {
prog := []uint32{addi(17, 0, 777), ecall()}
m, err := NewMachine(asm(prog), entry)
uassert.NoError(t, err)
_, status := m.Step(vmkit.NewTestHost(), vmkit.Unmetered)
uassert.Equal(t, "trapped", status.String())
uassert.Equal(t, "unknown syscall", m.Trap())
}
func TestIllegalInstructionTraps(t *testing.T) {
m, err := NewMachine(asm([]uint32{0xFFFFFFFF}), entry)
uassert.NoError(t, err)
_, status := m.Step(vmkit.NewTestHost(), vmkit.Unmetered)
uassert.Equal(t, "trapped", status.String())
}
func TestFuelStopsTheHart(t *testing.T) {
prog := append([]uint32{
addi(5, 0, 1), addi(5, 5, 1), addi(5, 5, 1), addi(5, 5, 1),
}, exitWith()...)
m, err := NewMachine(asm(prog), entry)
uassert.NoError(t, err)
used, status := m.Step(vmkit.NewTestHost(), 2)
uassert.Equal(t, int64(2), used)
uassert.Equal(t, "running", status.String())
uassert.Equal(t, uint64(2), uint64(m.Registers()[5]))
}
// The property that makes a guest program a contract: slices must equal one go.
func TestSlicedRunEqualsOneShot(t *testing.T) {
prog := append([]uint32{
addi(5, 0, 0),
addi(6, 0, 12),
add(5, 5, 6),
addi(6, 6, 0xFFF),
bne(6, 0, 0x1FF8),
addi(7, 0, 0x7F0),
sw(5, 7, 0),
}, exitWith()...)
image := asm(prog)
one, err := NewMachine(image, entry)
uassert.NoError(t, err)
one.Step(vmkit.NewTestHost(), vmkit.Unmetered)
sliced, err := NewMachine(image, entry)
uassert.NoError(t, err)
h := vmkit.NewTestHost()
status := vmkit.Running
for i := 0; i < 5000 && status == vmkit.Running; i++ {
fresh, err := NewMachine(image, entry)
uassert.NoError(t, err)
uassert.NoError(t, fresh.Restore(sliced.Snapshot()))
_, status = fresh.Step(h, 3)
sliced = fresh
}
uassert.Equal(t, "halted", status.String())
uassert.Equal(t, uint64(one.Registers()[5]), uint64(sliced.Registers()[5]))
uassert.Equal(t, uint64(78), uint64(sliced.Registers()[5]))
}
// A 1 MiB address space must not cost 1 MiB to pause. This is the kill
// criterion vmkit set for continuations, measured rather than asserted.
func TestSnapshotCarriesOnlyTouchedPages(t *testing.T) {
prog := append([]uint32{
addi(5, 0, 0x7F0),
addi(6, 0, 1),
sw(6, 5, 0),
}, exitWith()...)
m := run(t, prog, vmkit.NewTestHost())
// Two: the page holding the program at 0x1000, and the one holding the
// store at 0x7F0. Two out of 256, which is the whole point.
uassert.Equal(t, 2, m.Memory().DirtyPages())
// The property is proportionality: a snapshot costs what the guest
// touched plus a fixed header, not what the address space is. Two pages
// out of 256 means about 8 KiB out of a megabyte.
snap := m.Snapshot()
pages := m.Memory().DirtyPages()
uassert.True(t, len(snap) <= pages*PageSize+512,
"a snapshot must not exceed its dirty pages plus a header")
uassert.True(t, len(snap) < MemSize/100,
"a snapshot of a lightly-used hart must be a rounding error against the address space")
}
func TestRestoreRejectsJunk(t *testing.T) {
m, err := NewMachine(asm(exitWith()), entry)
uassert.NoError(t, err)
uassert.Error(t, m.Restore([]byte{}))
uassert.Error(t, m.Restore([]byte{1, 2, 3, 4, 5}))
good := m.Snapshot()
bad := make([]byte, len(good))
copy(bad, good)
bad[4] = 99 // version
uassert.ErrorIs(t, m.Restore(bad), vmkit.ErrBadSnapshot)
}
// vmkit's plumbing has to work for a second guest, which is the only way to
// know the ABI was not shaped around the first one.
func TestInstanceIntegration(t *testing.T) {
prog := append([]uint32{addi(5, 0, 21), add(5, 5, 5)}, exitWith()...)
image := asm(prog)
inst := vmkit.NewInstance("001", address("g1x"), VMName, image, vmkit.Unmetered)
h := vmkit.NewTestHost()
for i := 0; i < 100 && inst.Status == vmkit.Running; i++ {
m, err := NewMachine(image, entry)
uassert.NoError(t, err)
uassert.NoError(t, inst.Run(m, h, 2))
}
uassert.Equal(t, "halted", inst.Status.String())
uassert.True(t, inst.Slices > 1)
}
rust_test.gno
package riscv
import (
"testing"
"gno.land/p/nym-moultest123/x/vm/vmkit/v0"
"gno.land/p/nt/uassert/v0"
)
// The demo the design issue actually asked for: Rust code, compiled by rustc,
// running on gno.land, moving a balance from one account to another.
//
// The image is guests.gno's, built from tools/riscv-guests/ledger. It is worth
// more than the C guest for one reason: it links Rust's real core and
// compiler_builtins, so this exercises the standard library's own software
// arithmetic rather than only what the compiler emitted for my source.
func runLedger(t *testing.T, in string) (string, vmkit.Status, *Machine) {
t.Helper()
m, err := NewMachine(GuestLedger(), entry)
uassert.NoError(t, err)
if m == nil {
return "", vmkit.Trapped, nil
}
h := vmkit.NewTestHost().WithInput([]byte(in))
_, status := m.Step(h, 5000000)
return string(h.Out()), status, m
}
func TestRustLedgerTransfers(t *testing.T) {
out, status, _ := runLedger(t,
"mint alice 100\nmint bob 50\nsend alice bob 30\n")
uassert.Equal(t, "halted", status.String())
uassert.Equal(t, "alice 70\nbob 80\n", out)
}
func TestRustLedgerMintBurnAndBlankLines(t *testing.T) {
out, status, _ := runLedger(t, "mint a 5\n\n \nburn a 2\n")
uassert.Equal(t, "halted", status.String())
uassert.Equal(t, "a 3\n", out)
out, status, _ = runLedger(t, "")
uassert.Equal(t, "halted", status.String())
uassert.Equal(t, "", out)
}
// A refusal is halted, not trapped, and it names the line. This is the
// semantic the whole VM is built around: the program said no, the machine did
// not break, and a chain has to be able to tell a user which one happened.
func TestRustLedgerRefusalsAreHaltsNotTraps(t *testing.T) {
cases := []struct{ in, want string }{
{"mint a 1\nsend a b 9\n", "line 2: insufficient balance\n"},
{"send nobody b 1\n", "line 1: unknown sender\n"},
{"burn ghost 1\n", "line 1: unknown account\n"},
{"frobnicate\n", "line 1: unknown command\n"},
{"mint a x\n", "line 1: bad amount\n"},
}
for _, c := range cases {
out, status, m := runLedger(t, c.in)
uassert.Equal(t, "halted", status.String(), c.in+": "+m.Trap())
uassert.Equal(t, c.want, out)
uassert.Equal(t, uint64(1), uint64(m.Registers()[10]), "a refusal exits 1")
}
}
// 64-bit arithmetic on a 32-bit machine goes through compiler_builtins, and
// printing a balance above 2^32 is the path that proves __udivdi3 ran.
func TestRustLedgerDoes64BitArithmetic(t *testing.T) {
// Nine-digit mints, accumulated past what 32 bits holds.
in := ""
for i := 0; i < 6; i++ {
in += "mint whale 999999999\n"
}
out, status, _ := runLedger(t, in)
uassert.Equal(t, "halted", status.String())
uassert.Equal(t, "whale 5999999994\n", out)
}
// Compiled Rust pauses and resumes like anything else, including in the middle
// of a library routine it never asked to call.
func TestRustLedgerSurvivesSlicing(t *testing.T) {
image := GuestLedger()
h := vmkit.NewTestHost().WithInput([]byte("mint alice 100\nsend alice bob 30\n"))
sliced, err := NewMachine(image, entry)
uassert.NoError(t, err)
status := vmkit.Running
slices := 0
for i := 0; i < 4000 && status == vmkit.Running; i++ {
var fresh Machine
uassert.NoError(t, fresh.Restore(sliced.Snapshot()))
_, status = fresh.Step(h, 17)
sliced = &fresh
slices++
}
uassert.Equal(t, "halted", status.String())
uassert.True(t, slices > 20, "a sliced run must actually have been sliced")
uassert.Equal(t, "alice 70\nbob 30\n", string(h.Out()))
}
snapshot.gno
package riscv
import "gno.land/p/nym-moultest123/x/vm/vmkit/v0"
// Snapshot serializes the hart: registers, pc, status, and only the memory
// pages the guest has written.
//
// A 1 MiB address space serialized on every pause would make continuations
// cost more than re-running, which is exactly the kill criterion vmkit set for
// them. The dirty bitmap is what avoids it: a guest that has touched two pages
// pauses in about 8 KiB regardless of how much memory it was given.
func (m *Machine) Snapshot() []byte {
if m.code == nil {
m.code = &code{}
}
w := vmkit.NewWriter(4096)
w.Uint32(snapMagic)
w.Byte(snapVersion)
for i := 0; i < 32; i++ {
w.Uint32(m.reg[i])
}
w.Uint32(m.pc)
w.Byte(byte(m.status))
w.String(m.trap)
w.Int(int64(m.outLen))
// The text segment's extent, so a restored hart knows which of its pages
// are code and can predecode them again. The code itself is not written:
// it is already in the memory pages, which WriteImage marked dirty.
w.Uint32(m.code.base)
w.Uint32(m.code.words)
m.mem.Snapshot(w)
return w.Out()
}
// Restore loads a snapshot. The program image is not carried separately: it
// lives in the memory pages, which were marked dirty when it was written, so a
// restored hart has its code without the instance storing it twice.
func (m *Machine) Restore(b []byte) error {
r := vmkit.NewReader(b)
if r.Uint32() != snapMagic {
return vmkit.ErrBadSnapshot
}
if r.Byte() != snapVersion {
return vmkit.ErrBadSnapshot
}
var reg [32]uint32
for i := 0; i < 32; i++ {
reg[i] = r.Uint32()
}
pc := r.Uint32()
status := vmkit.Status(r.Byte())
trap := r.String()
outLen := int(r.Int())
base := r.Uint32()
words := r.Uint32()
if err := r.Err(); err != nil {
return err
}
// A text segment that does not fit in the address space is a snapshot this
// machine did not write, and predecoding it would index past the memory.
if base%4 != 0 || uint64(base)+uint64(words)*4 > uint64(MemSize) {
return vmkit.ErrBadSnapshot
}
mem := NewMemory()
if err := mem.Restore(r); err != nil {
return err
}
if err := r.Err(); err != nil {
return err
}
m.reg, m.pc, m.status, m.trap, m.outLen, m.mem = reg, pc, status, trap, outLen, mem
// Predecode again from the restored pages. This is the work a resume pays
// for, once, in exchange for not paying a fetch on every instruction after
// it, and it is why stores into the text segment trap: the arrays and the
// memory would otherwise be free to disagree.
m.code = predecode(base, mem.b[base:base+words*4])
// x0 is hardwired, and a snapshot that claims otherwise is not one this
// machine wrote.
m.reg[0] = 0
return nil
}
switchcost_test.gno
package riscv
import "testing"
// Does the GnoVM dispatch a switch by jump table or by scanning the cases in
// order? The answer decides the interpreter's shape: predecoding an image into
// (op, rd, rs1, rs2, imm) arrays deletes the fetch and the field extraction,
// but it also flattens two small nested switches into one 48-case switch. If
// cases are scanned, that trade buys nothing and costs the deeper arms.
//
// The experiment: the same 48-case switch, driven to the first case and to the
// last. Equal cycles means a jump table. A large gap means a scan, and the
// switch has to stay shallow no matter what else changes.
//go:noinline
func switch48(v uint32) uint32 {
switch v {
case 0:
return 1
case 1:
return 2
case 2:
return 3
case 3:
return 4
case 4:
return 5
case 5:
return 6
case 6:
return 7
case 7:
return 8
case 8:
return 9
case 9:
return 10
case 10:
return 11
case 11:
return 12
case 12:
return 13
case 13:
return 14
case 14:
return 15
case 15:
return 16
case 16:
return 17
case 17:
return 18
case 18:
return 19
case 19:
return 20
case 20:
return 21
case 21:
return 22
case 22:
return 23
case 23:
return 24
case 24:
return 25
case 25:
return 26
case 26:
return 27
case 27:
return 28
case 28:
return 29
case 29:
return 30
case 30:
return 31
case 31:
return 32
case 32:
return 33
case 33:
return 34
case 34:
return 35
case 35:
return 36
case 36:
return 37
case 37:
return 38
case 38:
return 39
case 39:
return 40
case 40:
return 41
case 41:
return 42
case 42:
return 43
case 43:
return 44
case 44:
return 45
case 45:
return 46
case 46:
return 47
case 47:
return 48
}
return 0
}
const switchIters = 200000
func TestSwitchCostFirstCase(t *testing.T) {
var acc uint32
for i := 0; i < switchIters; i++ {
acc += switch48(0)
}
if acc == 0 {
t.Fatal("unreachable")
}
}
func TestSwitchCostLastCase(t *testing.T) {
var acc uint32
for i := 0; i < switchIters; i++ {
acc += switch48(47)
}
if acc == 0 {
t.Fatal("unreachable")
}
}
// The control: the same loop with no switch at all, so the two above can be
// read net of loop and call overhead.
//
//go:noinline
func switchNone(v uint32) uint32 { return v + 1 }
func TestSwitchCostNoSwitch(t *testing.T) {
var acc uint32
for i := 0; i < switchIters; i++ {
acc += switchNone(0)
}
if acc == 0 {
t.Fatal("unreachable")
}
}
// A scan means the question is no longer "how few cases" but "is there a
// dispatch that does not scan at all". These three isolate the alternatives:
// the bare loop, a direct call, and a call through a table indexed by opcode.
//go:noinline
func hADDI(v uint32) uint32 { return v + 1 }
//go:noinline
func hSUB(v uint32) uint32 { return v - 1 }
//go:noinline
func hXOR(v uint32) uint32 { return v ^ 1 }
//go:noinline
func hAND(v uint32) uint32 { return v & 1 }
var dispatchTable = [4]func(uint32) uint32{hADDI, hSUB, hXOR, hAND}
func TestDispatchLoopOnly(t *testing.T) {
var acc uint32
for i := 0; i < switchIters; i++ {
acc += uint32(i) & 1
}
if acc == 0 {
t.Fatal("unreachable")
}
}
func TestDispatchTableCall(t *testing.T) {
var acc uint32
for i := 0; i < switchIters; i++ {
acc += dispatchTable[3](1)
}
if acc == 0 {
t.Fatal("unreachable")
}
}
// What does memory cost? Predecode allocates five arrays per load and the
// address space allocates a megabyte, so the answer decides whether the
// predecode arrays should be built eagerly or only for words actually reached.
func TestAllocBytes1000(t *testing.T) {
b := make([]byte, 4000)
if len(b) != 4000 {
t.Fatal("unreachable")
}
}
func TestAllocBytes4000(t *testing.T) {
b := make([]byte, 16000)
if len(b) != 16000 {
t.Fatal("unreachable")
}
}
// The five arrays predecode builds, at the same two sizes.
func TestAllocArrays1000(t *testing.T) {
a, b, c := make([]uint8, 1000), make([]uint8, 1000), make([]uint8, 1000)
d, e := make([]uint8, 1000), make([]uint32, 1000)
if len(a)+len(b)+len(c)+len(d)+len(e) == 0 {
t.Fatal("unreachable")
}
}
func TestAllocArrays4000(t *testing.T) {
a, b, c := make([]uint8, 4000), make([]uint8, 4000), make([]uint8, 4000)
d, e := make([]uint8, 4000), make([]uint32, 4000)
if len(a)+len(b)+len(c)+len(d)+len(e) == 0 {
t.Fatal("unreachable")
}
}