From c15b1d3219ced27e736c5c0eccd8d2726bb1c8fd Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Tue, 20 Apr 2010 13:19:36 +0000 Subject: [PATCH] OS X: enable path in Jit64::stX. fix wxw assert on opening ConfigMain. __force_align_arg_pointer__ not needed on x64 builds git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5393 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/Common.h | 4 ++-- .../Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp | 5 ++--- Source/Core/DolphinWX/Src/ConfigMain.cpp | 2 +- Source/Core/InputCommon/Src/SConscript | 19 ++++++++++++------- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/Source/Core/Common/Src/Common.h b/Source/Core/Common/Src/Common.h index d32a49416e..b254076165 100644 --- a/Source/Core/Common/Src/Common.h +++ b/Source/Core/Common/Src/Common.h @@ -54,8 +54,8 @@ #endif // Darwin ABI requires that stack frames be aligned to 16-byte boundaries. -// This probably wouldn't break anyone either, but hey -#ifdef __APPLE__ +// This is only needed on i386 gcc - x86_64 already aligns to 16bytes +#if defined(__APPLE__) && defined(__i386__) && defined(__GNUC__) #define STACKALIGN __attribute__((__force_align_arg_pointer__)) #else #define STACKALIGN diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp index 8010ea9325..40c392bedf 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp @@ -317,8 +317,7 @@ void Jit64::stX(UGeckoInstruction inst) case 38: accessSize = 8; break; //stb default: _assert_msg_(DYNA_REC, 0, "AWETKLJASDLKF"); return; } -#if !defined(__APPLE__) && _M_X64 -// This code path fails in OSX, not 100% sure why, seems to be from the gpr.SetImmediate + if (gpr.R(a).IsImm()) { // If we already know the address through constant folding, we can do some @@ -354,7 +353,7 @@ void Jit64::stX(UGeckoInstruction inst) } // Other IO not worth the trouble. } -#endif + // Optimized stack access? if (accessSize == 32 && !gpr.R(a).IsImm() && a == 1 && js.st.isFirstBlockOfFunction && jo.optimizeStack) { diff --git a/Source/Core/DolphinWX/Src/ConfigMain.cpp b/Source/Core/DolphinWX/Src/ConfigMain.cpp index afde7d6ad4..cc3232e7e3 100644 --- a/Source/Core/DolphinWX/Src/ConfigMain.cpp +++ b/Source/Core/DolphinWX/Src/ConfigMain.cpp @@ -607,13 +607,13 @@ void CConfigMain::CreateGUIControls() sPaths->Add(sbISOPaths, 1, wxEXPAND|wxALL, 5); sOtherPaths = new wxGridBagSizer(0, 0); - sOtherPaths->AddGrowableCol(1); sOtherPaths->Add(DefaultISOText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); sOtherPaths->Add(DefaultISO, wxGBPosition(0, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); sOtherPaths->Add(DVDRootText, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); sOtherPaths->Add(DVDRoot, wxGBPosition(1, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); sOtherPaths->Add(ApploaderPathText, wxGBPosition(2, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5); sOtherPaths->Add(ApploaderPath, wxGBPosition(2, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5); + sOtherPaths->AddGrowableCol(1); sPaths->Add(sOtherPaths, 0, wxEXPAND|wxALL, 5); PathsPage->SetSizer(sPaths); sPaths->Layout(); diff --git a/Source/Core/InputCommon/Src/SConscript b/Source/Core/InputCommon/Src/SConscript index acb0b83013..a8f5162449 100644 --- a/Source/Core/InputCommon/Src/SConscript +++ b/Source/Core/InputCommon/Src/SConscript @@ -22,15 +22,20 @@ if env['HAVE_WX']: ] if icenv['HAVE_SDL']: - files += [ 'ControllerInterface/SDL/SDL.cpp' ] + files += [ + 'ControllerInterface/SDL/SDL.cpp' + ] + if sys.platform == 'darwin': - files += [ 'ControllerInterface/OSX/OSX.cpp', - 'ControllerInterface/OSX/OSXPrivate.mm' ] + files += [ + 'ControllerInterface/OSX/OSX.cpp', + 'ControllerInterface/OSX/OSXPrivate.mm' + ] + if sys.platform == 'linux2': - files += [ 'ControllerInterface/Xlib/Xlib.cpp' ] - + files += [ + 'ControllerInterface/Xlib/Xlib.cpp' + ] icenv.Append(CXXFLAGS = [ '-fPIC' ]) icenv.StaticLibrary(env['local_libs'] + "inputcommon", files) - -