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:
gabest11
2011-02-28 11:08:52 +00:00
parent 525175ba70
commit a96a345077
28 changed files with 9896 additions and 5369 deletions
+33
View File
@@ -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
}