mirror of https://github.com/PCSX2/pcsx2.git
Linux: Fix up the .S files to match recent changes. Make changes to SafeArray to avoid compiler warnings on every file.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@706 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
5cc9704989
commit
56f802c80f
|
@ -53,12 +53,14 @@ void svudispfn();
|
|||
|
||||
// aR3000A.S
|
||||
void iopJITCompile();
|
||||
void iopJITCompileInBlock();
|
||||
void iopDispatcher();
|
||||
void iopDispatcherClear();
|
||||
void iopDispatcherReg();
|
||||
|
||||
// aR5900-32.S
|
||||
void JITCompile();
|
||||
void JITCompileInBlock();
|
||||
void Dispatcher();
|
||||
void DispatcherClear();
|
||||
void DispatcherReg();
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#ifndef __SAFEARRAY_H__
|
||||
#define __SAFEARRAY_H__
|
||||
|
||||
#include "MemcpyFast.h"
|
||||
#include "System.h"
|
||||
|
||||
extern void* __fastcall pcsx2_aligned_malloc(size_t size, size_t align);
|
||||
extern void* __fastcall pcsx2_aligned_realloc(void* handle, size_t size, size_t align);
|
||||
|
@ -219,9 +219,15 @@ protected:
|
|||
const static std::string m_str_Unnamed;
|
||||
|
||||
protected:
|
||||
virtual T* _virtual_realloc( int newsize )
|
||||
{
|
||||
return (T*)realloc( m_ptr, newsize * sizeof(T) );
|
||||
}
|
||||
|
||||
void _boundsCheck( uint i )
|
||||
{
|
||||
if( IsDevBuild && i >= (uint)m_length )
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
if( i >= (uint)m_length )
|
||||
{
|
||||
assert( 0 ); // makes debugging easier sometimes. :)
|
||||
throw Exception::IndexBoundsFault(
|
||||
|
@ -230,6 +236,7 @@ protected:
|
|||
", length=" + to_string(m_length) + ")"
|
||||
);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public:
|
||||
|
|
|
@ -36,9 +36,13 @@ iopJITCompile:
|
|||
mov ebx, esi
|
||||
shr esi, 16
|
||||
mov ecx, dword ptr [RECLUT+esi*4]
|
||||
jmp dword ptr [ecx+ebx*2]
|
||||
|
||||
jmp dword ptr [ecx+ebx]
|
||||
|
||||
.global iopJITCompileInBlock
|
||||
iopJITCompileInBlock:
|
||||
|
||||
jmp iopJITCompile
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Recompiles the next block, and links the old block directly to it.
|
||||
// This is a on-shot execution for any block which uses it. Once the block
|
||||
|
@ -55,9 +59,11 @@ iopDispatcher:
|
|||
mov ebx, eax
|
||||
shr eax, 16
|
||||
mov ecx, dword ptr [RECLUT+eax*4]
|
||||
mov eax, dword ptr [ecx+ebx*2]
|
||||
mov eax, dword ptr [ecx+ebx]
|
||||
|
||||
cmp eax, offset JITCompile
|
||||
cmp eax, offset iopJITCompile
|
||||
je Dispatch_notcompiled
|
||||
cmp eax, offset iopJITCompileInBlock
|
||||
je Dispatch_notcompiled
|
||||
lea ebx, [eax-4]
|
||||
sub ebx, edx
|
||||
|
@ -67,7 +73,7 @@ iopDispatcher:
|
|||
.align 16
|
||||
Dispatch_notcompiled:
|
||||
mov esi, edx
|
||||
lea edi, [ecx+ebx*2]
|
||||
lea edi, [ecx+ebx]
|
||||
push ebx
|
||||
call iopRecRecompile
|
||||
add esp, 4
|
||||
|
@ -92,16 +98,18 @@ iopDispatcherClear:
|
|||
mov ebx, edx
|
||||
shr edx, 16
|
||||
mov ecx, dword ptr [RECLUT+edx*4]
|
||||
mov eax, dword ptr [ecx+ebx*2]
|
||||
mov eax, dword ptr [ecx+ebx]
|
||||
|
||||
cmp eax, offset JITCompile
|
||||
cmp eax, offset iopJITCompile
|
||||
je Clear_notcompiled
|
||||
cmp eax, offset iopJITCompileInBlock
|
||||
je Clear_notcompiled
|
||||
add esp, 4
|
||||
jmp eax
|
||||
|
||||
.align 16
|
||||
Clear_notcompiled:
|
||||
lea edi, [ecx+ebx*2]
|
||||
lea edi, [ecx+ebx]
|
||||
push ebx
|
||||
call iopRecRecompile
|
||||
add esp, 4
|
||||
|
@ -126,4 +134,4 @@ iopDispatcherReg:
|
|||
mov ebx, eax
|
||||
shr eax, 16
|
||||
mov ecx, dword ptr [RECLUT+eax*4]
|
||||
jmp dword ptr [ecx+ebx*2]
|
||||
jmp dword ptr [ecx+ebx]
|
||||
|
|
|
@ -36,9 +36,12 @@ JITCompile:
|
|||
mov ebx, esi
|
||||
shr esi, 16
|
||||
mov ecx, dword ptr [RECLUT+esi*4]
|
||||
jmp dword ptr [ecx+ebx*2]
|
||||
|
||||
jmp dword ptr [ecx+ebx]
|
||||
|
||||
.global JITCompileInBlock
|
||||
JITCompileInBlock:
|
||||
jmp JITCompile
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Recompiles the next block, and links the old block directly to it.
|
||||
// This is a on-shot execution for any block which uses it. Once the block
|
||||
|
@ -55,10 +58,12 @@ Dispatcher:
|
|||
mov ebx, eax
|
||||
shr eax, 16
|
||||
mov ecx, dword ptr [RECLUT+eax*4]
|
||||
mov eax, dword ptr [ecx+ebx*2]
|
||||
mov eax, dword ptr [ecx+ebx]
|
||||
|
||||
cmp eax, offset JITCompile
|
||||
je Dispatch_notcompiled
|
||||
cmp eax, offset JITCompileInBlock
|
||||
je Dispatch_notcompiled
|
||||
lea ebx, [eax-4]
|
||||
sub ebx, edx
|
||||
mov dword ptr [edx], ebx
|
||||
|
@ -67,7 +72,7 @@ Dispatcher:
|
|||
.align 16
|
||||
Dispatch_notcompiled:
|
||||
mov esi, edx
|
||||
lea edi, [ecx+ebx*2]
|
||||
lea edi, [ecx+ebx]
|
||||
push ebx
|
||||
call recRecompile
|
||||
add esp, 4
|
||||
|
@ -92,16 +97,18 @@ DispatcherClear:
|
|||
mov ebx, edx
|
||||
shr edx, 16
|
||||
mov ecx, dword ptr [RECLUT+edx*4]
|
||||
mov eax, dword ptr [ecx+ebx*2]
|
||||
mov eax, dword ptr [ecx+ebx]
|
||||
|
||||
cmp eax, offset JITCompile
|
||||
je Clear_notcompiled
|
||||
cmp eax, offset JITCompileInBlock
|
||||
je Clear_notcompiled
|
||||
add esp, 4
|
||||
jmp eax
|
||||
|
||||
.align 16
|
||||
Clear_notcompiled:
|
||||
lea edi, [ecx+ebx*2]
|
||||
lea edi, [ecx+ebx]
|
||||
push ebx
|
||||
call recRecompile
|
||||
add esp, 4
|
||||
|
@ -126,4 +133,4 @@ DispatcherReg:
|
|||
mov ebx, eax
|
||||
shr eax, 16
|
||||
mov ecx, dword ptr [RECLUT+eax*4]
|
||||
jmp dword ptr [ecx+ebx*2]
|
||||
jmp dword ptr [ecx+ebx]
|
||||
|
|
Loading…
Reference in New Issue