mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-03 11:13:44 +01:00
Use a typesafe struct for opcodes.
Also, correctly read delayslots using Read_Instruction on ARM.
This commit is contained in:
1 parent
ec46fdd06c
commit
109ad17ac6
41 files changed
+736
-704
No files matched your search
@@ -31,8 +31,8 @@ namespace MIPSCodeUtils
|
||||
|
||||
u32 GetJumpTarget(u32 addr)
|
||||
{
|
||||
u32 op = Memory::Read_Instruction(addr);
|
||||
if (op)
|
||||
MIPSOpcode op = Memory::Read_Instruction(addr);
|
||||
if (op != 0)
|
||||
{
|
||||
MIPSInfo info = MIPSGetInfo(op);
|
||||
if ((info & IS_JUMP) && (info & IN_IMM26))
|
||||
@@ -49,8 +49,8 @@ namespace MIPSCodeUtils
|
||||
|
||||
u32 GetBranchTarget(u32 addr)
|
||||
{
|
||||
u32 op = Memory::Read_Instruction(addr);
|
||||
if (op)
|
||||
MIPSOpcode op = Memory::Read_Instruction(addr);
|
||||
if (op != 0)
|
||||
{
|
||||
MIPSInfo info = MIPSGetInfo(op);
|
||||
if (info & IS_CONDBRANCH)
|
||||
@@ -66,8 +66,8 @@ namespace MIPSCodeUtils
|
||||
|
||||
u32 GetBranchTargetNoRA(u32 addr)
|
||||
{
|
||||
u32 op = Memory::Read_Instruction(addr);
|
||||
if (op)
|
||||
MIPSOpcode op = Memory::Read_Instruction(addr);
|
||||
if (op != 0)
|
||||
{
|
||||
MIPSInfo info = MIPSGetInfo(op);
|
||||
if ((info & IS_CONDBRANCH) && !(info & OUT_RA))
|
||||
@@ -83,8 +83,8 @@ namespace MIPSCodeUtils
|
||||
|
||||
u32 GetSureBranchTarget(u32 addr)
|
||||
{
|
||||
u32 op = Memory::Read_Instruction(addr);
|
||||
if (op)
|
||||
MIPSOpcode op = Memory::Read_Instruction(addr);
|
||||
if (op != 0)
|
||||
{
|
||||
MIPSInfo info = MIPSGetInfo(op);
|
||||
if (info & IS_CONDBRANCH)
|
||||
@@ -133,7 +133,7 @@ namespace MIPSCodeUtils
|
||||
return INVALIDTARGET;
|
||||
}
|
||||
|
||||
bool IsVFPUBranch(u32 op) {
|
||||
bool IsVFPUBranch(MIPSOpcode op) {
|
||||
return (MIPSGetInfo(op) & (IS_VFPU | IS_CONDBRANCH)) == (IS_VFPU | IS_CONDBRANCH);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user