32 lines
593 B
C++
32 lines
593 B
C++
#include "test-common.h"
|
|
|
|
int main(int argc, char** argv)
|
|
{
|
|
// CNST
|
|
// dst - 0, Direct
|
|
// imm - 0x4567
|
|
//
|
|
// SRSH
|
|
// dst - 0, Direct
|
|
// a - 0, Direct
|
|
// b - 2, Immediate
|
|
{
|
|
foot::Emulator emu = run_instructions({ 0x00204567, 0x06200220 });
|
|
if (!check(0x4567 >> 2, emu.register_at(0))) { return 1; }
|
|
}
|
|
|
|
// CNST
|
|
// dst - 0, Direct
|
|
// imm - 0x8000
|
|
//
|
|
// SRSH
|
|
// dst - 0, Direct
|
|
// a - 0, Direct
|
|
{
|
|
foot::Emulator emu = run_instructions({ 0x00208000, 0x06200220 });
|
|
if (!check((-0x8000) >> 2, emu.register_at(0))) { return 1; }
|
|
}
|
|
|
|
return 0;
|
|
}
|