mirror of
https://github.com/open-goal/jak-project
synced 2026-06-26 10:31:54 -04:00
[Decompiler - New IR] Add AtomicOp (#181)
* wip decompiler ir * add AtomicOp stuff * fix windows build and warnings * add instruction parser * include * make minilzo shared * odr fix * a * fix merge conflicts * move decompiler into namespace * update the code coverage to include the decompiler * add demo test * add register use test to example test
This commit is contained in:
@@ -7,6 +7,24 @@
|
||||
#include <cassert>
|
||||
#include <stdexcept>
|
||||
|
||||
namespace decompiler {
|
||||
namespace Reg {
|
||||
// register which may hold GOAL local variables
|
||||
|
||||
// clang-format off
|
||||
const bool allowed_local_gprs[Reg::MAX_GPR] = {
|
||||
false /*R0*/, false /*AT*/, true /*V0*/, true /*V1*/,
|
||||
true /*A0*/, true /*A1*/, true /*A2*/, true /*A3*/,
|
||||
true /*T0*/, true /*T1*/, true /*T2*/, true /*T3*/,
|
||||
true /*T4*/, true /*T5*/, true /*T6*/, true /*T7*/,
|
||||
true /*S0*/, true /*S1*/, true /*S2*/, true /*S3*/,
|
||||
true /*S4*/, true /*S5*/, false /*S6*/, false /*S7*/,
|
||||
true /*T8*/, true /*T9*/, false /*K0*/, false /*K1*/,
|
||||
true /*GP*/, true /*SP*/, false /*FP*/, false /*RA*/
|
||||
};
|
||||
// clang-format on
|
||||
} // namespace Reg
|
||||
|
||||
////////////////////////////
|
||||
// Register Name Constants
|
||||
////////////////////////////
|
||||
@@ -233,4 +251,5 @@ bool Register::operator==(const Register& other) const {
|
||||
|
||||
bool Register::operator!=(const Register& other) const {
|
||||
return id != other.id;
|
||||
}
|
||||
}
|
||||
} // namespace decompiler
|
||||
Reference in New Issue
Block a user