diff --git a/Source/Core/Common/Src/ABI.cpp b/Source/Core/Common/Src/ABI.cpp index 26059494f2..2fc6cd81cd 100644 --- a/Source/Core/Common/Src/ABI.cpp +++ b/Source/Core/Common/Src/ABI.cpp @@ -1,3 +1,20 @@ +// Copyright (C) 2003-2008 Dolphin Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + #include "Common.h" #include "x64Emitter.h" #include "ABI.h" @@ -14,7 +31,7 @@ void ABI_EmitPrologue(int maxCallParams) // Don't really need to do anything #elif defined(_M_X64) #if _WIN32 - int stacksize = ((maxCallParams + 1) & ~1)*8 + 8; + int stacksize = ((maxCallParams + 1) & ~1) * 8 + 8; // Set up a stack frame so that we can call functions // TODO: use maxCallParams SUB(64, R(RSP), Imm8(stacksize)); @@ -264,13 +281,27 @@ void ABI_PopAllCalleeSavedRegsAndAdjustStack() { } void ABI_PushAllCallerSavedRegsAndAdjustStack() { - INT3(); - //not yet supported + PUSH(RCX); + PUSH(RDX); + PUSH(RSI); + PUSH(RDI); + PUSH(R8); + PUSH(R9); + PUSH(R10); + PUSH(R11); + PUSH(R11); } void ABI_PopAllCallerSavedRegsAndAdjustStack() { - INT3(); - //not yet supported + POP(R11); + POP(R11); + POP(R10); + POP(R9); + POP(R8); + POP(RDI); + POP(RSI); + POP(RDX); + POP(RCX); } #endif diff --git a/Source/Core/Core/Src/MemTools.cpp b/Source/Core/Core/Src/MemTools.cpp index d3fadaf39e..e9991b791d 100644 --- a/Source/Core/Core/Src/MemTools.cpp +++ b/Source/Core/Core/Src/MemTools.cpp @@ -230,7 +230,6 @@ void InstallExceptionHandler() PanicAlert("InstallExceptionHandler called, but this platform does not yet support it."); return; #endif - struct sigaction sa; sa.sa_handler = 0; sa.sa_sigaction = &sigsegv_handler;