Test: Fix no-return register ROM tester usage

This commit is contained in:
Vicki Pfau 2022-07-09 05:08:33 -07:00
parent 5ad8907acb
commit b8087c1d97
1 changed files with 9 additions and 3 deletions

View File

@ -236,14 +236,18 @@ static bool _romTestCheckResiger(void) {
static void _romTestCallback(void* context) { static void _romTestCallback(void* context) {
UNUSED(context); UNUSED(context);
if (_returnCodeRegister) {
core->readRegister(core, _returnCodeRegister, &_exitCode); core->readRegister(core, _returnCodeRegister, &_exitCode);
}
_dispatchExiting = true; _dispatchExiting = true;
} }
#ifdef M_CORE_GBA #ifdef M_CORE_GBA
static void _romTestSwi16(struct ARMCore* cpu, int immediate) { static void _romTestSwi16(struct ARMCore* cpu, int immediate) {
if (immediate == _exitSwiImmediate) { if (immediate == _exitSwiImmediate) {
if (_returnCodeRegister) {
core->readRegister(core, _returnCodeRegister, &_exitCode); core->readRegister(core, _returnCodeRegister, &_exitCode);
}
_dispatchExiting = true; _dispatchExiting = true;
return; return;
} }
@ -252,7 +256,9 @@ static void _romTestSwi16(struct ARMCore* cpu, int immediate) {
static void _romTestSwi32(struct ARMCore* cpu, int immediate) { static void _romTestSwi32(struct ARMCore* cpu, int immediate) {
if (immediate == _exitSwiImmediate) { if (immediate == _exitSwiImmediate) {
if (_returnCodeRegister) {
core->readRegister(core, _returnCodeRegister, &_exitCode); core->readRegister(core, _returnCodeRegister, &_exitCode);
}
_dispatchExiting = true; _dispatchExiting = true;
return; return;
} }