diff options
| author | SND\dario86_cp <SND\dario86_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-03-12 18:54:28 +0000 |
|---|---|---|
| committer | SND\dario86_cp <SND\dario86_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-03-12 18:54:28 +0000 |
| commit | a58cfdac407bc1d8fedc11acd924b275ba28cc51 (patch) | |
| tree | b4c2e08c34ef1bfe0ba947ef8eed931c9a43fc0e /libpcsxcore/ix86 | |
| parent | 9bdd06684bcc627c06ddcf4c406f6b48f0dfe389 (diff) | |
| download | pcsxr-a58cfdac407bc1d8fedc11acd924b275ba28cc51.tar.gz | |
Commited patch in issue #8171 (by darktjm).
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@64524 e17a0e51-4ae3-4d35-97c3-1a29b211df97
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 |
