foot/emulator/tests/zlsh-instruction.cpp
shylie e647b9e146
All checks were successful
Test / build (push) Successful in 11s
Add some tests for SIMD instruction variants
2025-08-19 08:03:58 -04:00

38 lines
683 B
C++

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