mirror of
https://github.com/open-goal/jak-project
synced 2026-06-18 23:37:22 -04:00
f9d8fcd6e4
* mips 2 c basic version, not yet tested * calling works without crashing, but the function doesn't * it works * add test * cleanup and actually add the test * dont use mips2c by default for font * clean up formatting
18 lines
413 B
C++
18 lines
413 B
C++
//--------------------------MIPS2C---------------------
|
|
#include "game/mips2c/mips2c_private.h"
|
|
#include "game/kernel/kscheme.h"
|
|
namespace Mips2C {
|
|
namespace test_func {
|
|
u64 execute(void* ctxt) {
|
|
auto* c = (ExecutionContext*)ctxt;
|
|
u64 result = 0;
|
|
|
|
for (int i = a0; i < t4; i++) {
|
|
result += c->sgpr64(i);
|
|
}
|
|
|
|
c->gprs[v0].du64[0] = result;
|
|
return 0;
|
|
}
|
|
} // namespace test_func
|
|
} // namespace Mips2C
|