Files
jak-project/game/mips2c/functions/test_func.cpp
T
water111 f9d8fcd6e4 [decomp] add mips2c converter (#842)
* 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
2021-09-11 20:52:35 -04:00

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