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
|
// aR3000A.S
|
||||||
void iopJITCompile();
|
void iopJITCompile();
|
||||||
|
void iopJITCompileInBlock();
|
||||||
void iopDispatcher();
|
void iopDispatcher();
|
||||||
void iopDispatcherClear();
|
void iopDispatcherClear();
|
||||||
void iopDispatcherReg();
|
void iopDispatcherReg();
|
||||||
|
|
||||||
// aR5900-32.S
|
// aR5900-32.S
|
||||||
void JITCompile();
|
void JITCompile();
|
||||||
|
void JITCompileInBlock();
|
||||||
void Dispatcher();
|
void Dispatcher();
|
||||||
void DispatcherClear();
|
void DispatcherClear();
|
||||||
void DispatcherReg();
|
void DispatcherReg();
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef __SAFEARRAY_H__
|
#ifndef __SAFEARRAY_H__
|
||||||
#define __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_malloc(size_t size, size_t align);
|
||||||
extern void* __fastcall pcsx2_aligned_realloc(void* handle, 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;
|
const static std::string m_str_Unnamed;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual T* _virtual_realloc( int newsize )
|
||||||
|
{
|
||||||
|
return (T*)realloc( m_ptr, newsize * sizeof(T) );
|
||||||
|
}
|
||||||
|
|
||||||
void _boundsCheck( uint i )
|
void _boundsCheck( uint i )
|
||||||
{
|
{
|
||||||
if( IsDevBuild && i >= (uint)m_length )
|
#ifdef PCSX2_DEVBUILD
|
||||||
|
if( i >= (uint)m_length )
|
||||||
{
|
{
|
||||||
assert( 0 ); // makes debugging easier sometimes. :)
|
assert( 0 ); // makes debugging easier sometimes. :)
|
||||||
throw Exception::IndexBoundsFault(
|
throw Exception::IndexBoundsFault(
|
||||||
|
@ -230,6 +236,7 @@ protected:
|
||||||
", length=" + to_string(m_length) + ")"
|
", length=" + to_string(m_length) + ")"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -36,8 +36,12 @@ iopJITCompile:
|
||||||
mov ebx, esi
|
mov ebx, esi
|
||||||
shr esi, 16
|
shr esi, 16
|
||||||
mov ecx, dword ptr [RECLUT+esi*4]
|
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.
|
// Recompiles the next block, and links the old block directly to it.
|
||||||
|
@ -55,9 +59,11 @@ iopDispatcher:
|
||||||
mov ebx, eax
|
mov ebx, eax
|
||||||
shr eax, 16
|
shr eax, 16
|
||||||
mov ecx, dword ptr [RECLUT+eax*4]
|
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
|
je Dispatch_notcompiled
|
||||||
lea ebx, [eax-4]
|
lea ebx, [eax-4]
|
||||||
sub ebx, edx
|
sub ebx, edx
|
||||||
|
@ -67,7 +73,7 @@ iopDispatcher:
|
||||||
.align 16
|
.align 16
|
||||||
Dispatch_notcompiled:
|
Dispatch_notcompiled:
|
||||||
mov esi, edx
|
mov esi, edx
|
||||||
lea edi, [ecx+ebx*2]
|
lea edi, [ecx+ebx]
|
||||||
push ebx
|
push ebx
|
||||||
call iopRecRecompile
|
call iopRecRecompile
|
||||||
add esp, 4
|
add esp, 4
|
||||||
|
@ -92,16 +98,18 @@ iopDispatcherClear:
|
||||||
mov ebx, edx
|
mov ebx, edx
|
||||||
shr edx, 16
|
shr edx, 16
|
||||||
mov ecx, dword ptr [RECLUT+edx*4]
|
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
|
je Clear_notcompiled
|
||||||
add esp, 4
|
add esp, 4
|
||||||
jmp eax
|
jmp eax
|
||||||
|
|
||||||
.align 16
|
.align 16
|
||||||
Clear_notcompiled:
|
Clear_notcompiled:
|
||||||
lea edi, [ecx+ebx*2]
|
lea edi, [ecx+ebx]
|
||||||
push ebx
|
push ebx
|
||||||
call iopRecRecompile
|
call iopRecRecompile
|
||||||
add esp, 4
|
add esp, 4
|
||||||
|
@ -126,4 +134,4 @@ iopDispatcherReg:
|
||||||
mov ebx, eax
|
mov ebx, eax
|
||||||
shr eax, 16
|
shr eax, 16
|
||||||
mov ecx, dword ptr [RECLUT+eax*4]
|
mov ecx, dword ptr [RECLUT+eax*4]
|
||||||
jmp dword ptr [ecx+ebx*2]
|
jmp dword ptr [ecx+ebx]
|
||||||
|
|
|
@ -36,8 +36,11 @@ JITCompile:
|
||||||
mov ebx, esi
|
mov ebx, esi
|
||||||
shr esi, 16
|
shr esi, 16
|
||||||
mov ecx, dword ptr [RECLUT+esi*4]
|
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.
|
// Recompiles the next block, and links the old block directly to it.
|
||||||
|
@ -55,10 +58,12 @@ Dispatcher:
|
||||||
mov ebx, eax
|
mov ebx, eax
|
||||||
shr eax, 16
|
shr eax, 16
|
||||||
mov ecx, dword ptr [RECLUT+eax*4]
|
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 JITCompile
|
||||||
je Dispatch_notcompiled
|
je Dispatch_notcompiled
|
||||||
|
cmp eax, offset JITCompileInBlock
|
||||||
|
je Dispatch_notcompiled
|
||||||
lea ebx, [eax-4]
|
lea ebx, [eax-4]
|
||||||
sub ebx, edx
|
sub ebx, edx
|
||||||
mov dword ptr [edx], ebx
|
mov dword ptr [edx], ebx
|
||||||
|
@ -67,7 +72,7 @@ Dispatcher:
|
||||||
.align 16
|
.align 16
|
||||||
Dispatch_notcompiled:
|
Dispatch_notcompiled:
|
||||||
mov esi, edx
|
mov esi, edx
|
||||||
lea edi, [ecx+ebx*2]
|
lea edi, [ecx+ebx]
|
||||||
push ebx
|
push ebx
|
||||||
call recRecompile
|
call recRecompile
|
||||||
add esp, 4
|
add esp, 4
|
||||||
|
@ -92,16 +97,18 @@ DispatcherClear:
|
||||||
mov ebx, edx
|
mov ebx, edx
|
||||||
shr edx, 16
|
shr edx, 16
|
||||||
mov ecx, dword ptr [RECLUT+edx*4]
|
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 JITCompile
|
||||||
je Clear_notcompiled
|
je Clear_notcompiled
|
||||||
|
cmp eax, offset JITCompileInBlock
|
||||||
|
je Clear_notcompiled
|
||||||
add esp, 4
|
add esp, 4
|
||||||
jmp eax
|
jmp eax
|
||||||
|
|
||||||
.align 16
|
.align 16
|
||||||
Clear_notcompiled:
|
Clear_notcompiled:
|
||||||
lea edi, [ecx+ebx*2]
|
lea edi, [ecx+ebx]
|
||||||
push ebx
|
push ebx
|
||||||
call recRecompile
|
call recRecompile
|
||||||
add esp, 4
|
add esp, 4
|
||||||
|
@ -126,4 +133,4 @@ DispatcherReg:
|
||||||
mov ebx, eax
|
mov ebx, eax
|
||||||
shr eax, 16
|
shr eax, 16
|
||||||
mov ecx, dword ptr [RECLUT+eax*4]
|
mov ecx, dword ptr [RECLUT+eax*4]
|
||||||
jmp dword ptr [ecx+ebx*2]
|
jmp dword ptr [ecx+ebx]
|
||||||
|
|
Loading…
Reference in New Issue