diff options
Diffstat (limited to 'libpcsxcore/ix86')
| -rw-r--r-- | libpcsxcore/ix86/iR3000A.c | 17 | ||||
| -rw-r--r-- | libpcsxcore/ix86/ix86.c | 2 |
2 files changed, 4 insertions, 15 deletions
diff --git a/libpcsxcore/ix86/iR3000A.c b/libpcsxcore/ix86/iR3000A.c index 39b434bf..291a1770 100644 --- a/libpcsxcore/ix86/iR3000A.c +++ b/libpcsxcore/ix86/iR3000A.c @@ -344,6 +344,7 @@ static void iDumpRegs() { void iDumpBlock(char *ptr) { FILE *f; u32 i; + char buf[100]; SysPrintf("dump1 %x:%x, %x\n", psxRegs.pc, pc, psxRegs.cycle); @@ -354,8 +355,8 @@ void iDumpBlock(char *ptr) { f = fopen("dump1", "w"); fwrite(ptr, 1, (u32)x86Ptr - (u32)ptr, f); fclose(f); - system("ndisasmw -u dump1"); - fflush(stdout); + sprintf(buf, "objdump -m i386 -M i386 -D -b binary --adjust-vma=0x%lx dump1", (unsigned long)ptr); + system(buf); } #define REC_FUNC(f) \ @@ -1551,9 +1552,6 @@ static void recLW() { resp+= 4; } -extern u32 LWL_MASK[4]; -extern u32 LWL_SHIFT[4]; - void iLWLk(u32 shift) { if (IsConst(_Rt_)) { MOV32ItoR(ECX, iRegs[_Rt_].k); @@ -1703,9 +1701,6 @@ static void recLWBlock(int count) { resp = respsave; } -extern u32 LWR_MASK[4]; -extern u32 LWR_SHIFT[4]; - void iLWRk(u32 shift) { if (IsConst(_Rt_)) { MOV32ItoR(ECX, iRegs[_Rt_].k); @@ -2051,9 +2046,6 @@ static void recSWBlock(int count) { resp = respsave; } -extern u32 SWL_MASK[4]; -extern u32 SWL_SHIFT[4]; - void iSWLk(u32 shift) { if (IsConst(_Rt_)) { MOV32ItoR(ECX, iRegs[_Rt_].k); @@ -2133,9 +2125,6 @@ void recSWL() { resp+= 8; } -extern u32 SWR_MASK[4]; -extern u32 SWR_SHIFT[4]; - void iSWRk(u32 shift) { if (IsConst(_Rt_)) { MOV32ItoR(ECX, iRegs[_Rt_].k); diff --git a/libpcsxcore/ix86/ix86.c b/libpcsxcore/ix86/ix86.c index 1525ac37..ef0e0d3a 100644 --- a/libpcsxcore/ix86/ix86.c +++ b/libpcsxcore/ix86/ix86.c @@ -54,7 +54,7 @@ void x86SetJ32(u32 *j32) { void x86Align(int bytes) { // fordward align - x86Ptr = (s8*)(((u32)x86Ptr + bytes) & ~(bytes - 1)); + x86Ptr = (s8*)(((u32)x86Ptr + bytes - 1) & ~(bytes - 1)); } #define SIB 4 |
