Align stack to 16-byte boundary when compiling in 32-bit mode with GCC. This is required to run anything on OS X and to support SSE instructions on Linux.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@439 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Maarten ter Huurne
2008-09-05 00:02:53 +00:00
parent f96d19a1fb
commit 722ea233a1
7 changed files with 76 additions and 22 deletions

View File

@ -21,6 +21,7 @@
#include "Common.h"
#include "x64Emitter.h"
#include "ABI.h"
#include "Profiler.h"
#include "StringUtil.h"
@ -536,21 +537,21 @@ void VertexLoader::ProcessFormat()
int id = GL_TEXTURE0+i;
#ifdef _M_X64
#ifdef _MSC_VER
MOV(32, R(RCX), Imm32(id));
CALL((void *)glClientActiveTexture);
#else
MOV(32, R(RDI), Imm32(id));
CALL((void *)glClientActiveTexture);
#endif
#else
ABI_AlignStack(1 * 4);
PUSH(32, Imm32(id));
#endif
CALL((void *)glClientActiveTexture);
// don't inc stack on windows, stdcall
#ifndef _WIN32
ADD(32, R(ESP), Imm8(4));
#ifndef _M_X64
#ifdef _WIN32
// don't inc stack on windows, stdcall
#else
ABI_RestoreStack(1 * 4);
#endif
#endif
if( m_components&(VB_HAS_TEXMTXIDX0<<i) ) {