foot/emulator/tests/zrsh-instruction.cpp
shylie d271bdc959
All checks were successful
Test / build (push) Successful in 14s
Add ELF support, handle condcodes, test ZRSH
2025-10-28 12:09:50 -04:00

37 lines
678 B
C++

#include "test-common.h"
int main(int argc, char** argv)
{
// CNST
// dst - 0, Direct
// imm - 0x4567
//
// ZRSH
// dst - 0, Direct
// a - 0, Direct
// b - 2, Immediate
{
foot::Emulator emu = run_instructions({ 0x00204567, 0x05200220 });
if (!check(0x1159, emu.register_at(0))) { return 1; }
}
// CNST
// dst - 0, Direct
// imm - 0x4343
//
// CNST
// dst - 1, Direct
// imm - 0x1122
//
// ZRSH - 4-bit SIMD
// dst - 0, Direct
// a - 0, Direct
// b - 1, Direct
{
foot::Emulator emu = run_instructions({ 0x00204343, 0x00211122, 0x05A021A0 });
if (!check(0x2110, emu.register_at(0))) { return 1; }
}
return 0;
}