mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-09-09 14:22:58 +02:00
GSdx: the x64 ABI on windows is not so nice after all.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4380 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
@@ -22,3 +22,36 @@
|
||||
#include "stdafx.h"
|
||||
#include "GSFunctionMap.h"
|
||||
|
||||
void GSCodeGenerator::enter(uint32 size, bool align)
|
||||
{
|
||||
#ifdef _M_AMD64
|
||||
|
||||
push(r15);
|
||||
mov(r15, rsp);
|
||||
if(size > 0) sub(rsp, size);
|
||||
if(align) and(rsp, 0xfffffffffffffff0);
|
||||
|
||||
#else
|
||||
|
||||
push(ebp);
|
||||
mov(ebp, esp);
|
||||
if(size > 0) sub(esp, size);
|
||||
if(align) and(esp, 0xfffffff0);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void GSCodeGenerator::leave()
|
||||
{
|
||||
#ifdef _M_AMD64
|
||||
|
||||
mov(rsp, r15);
|
||||
pop(r15);
|
||||
|
||||
#else
|
||||
|
||||
mov(esp, ebp);
|
||||
pop(ebp);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user