Fix linux build and a crash. hrm, how did it work before...

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@146 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard committed 2008-08-07 19:20:51 +00:00
1 parent f46c64c02f
commit ac366022f4
8 files changed
+16 -9

No files matched your search

+1 -1
View File
@@ -22,7 +22,7 @@
namespace
{
PanicAlertHandler panic_handler = 0;
static PanicAlertHandler panic_handler = 0;
}
void RegisterPanicAlertHandler(PanicAlertHandler handler)
+1 -1
View File
@@ -46,7 +46,7 @@ extern "C" {
#define MAX_PATH 260
#define WEAK_SYMBOL __attribute__((weak))
#define stricmp strcasecmp
#define Crash() {__builtin_trap();}
#define Crash() {asm ("int $3");}
// #ifdef 64bit
// #define _M_IX86
// #else
+1 -1
View File
@@ -162,7 +162,7 @@ void StringFromFormatV(std::string* out, const char* format, va_list args)
while (writtenCount < 0)
{
delete[] buf;
delete [] buf;
buf = new char[newSize + 1];
writtenCount = vsnprintf(buf, newSize, format, args);
newSize *= 2;
+7 -3
View File
@@ -23,6 +23,8 @@ namespace Gen
{
static u8 *code;
static bool mode32 = false;
static bool enableBranchHints = false;
void SetCodePtr(u8 *ptr)
{
@@ -350,8 +352,6 @@ namespace Gen
return branch;
}
static bool enableBranchHints = false;
// These are to be used with Jcc only.
// Found in intel manual 2A
// These do not really make a difference for any current X86 CPU,
@@ -1221,10 +1221,12 @@ namespace Gen
#ifdef _M_IX86
// Don't really need to do anything
#elif defined(_M_X64)
#if _WIN32
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));
#endif
#else
#error Arch not supported
#endif
@@ -1234,15 +1236,17 @@ namespace Gen
#ifdef _M_IX86
RET();
#elif defined(_M_X64)
#ifdef _WIN32
int stacksize = ((maxCallParams+1)&~1)*8 + 8;
ADD(64, R(RSP), Imm8(stacksize));
#endif
RET();
#else
#error Arch not supported
#endif
}
}
} // namespace
// helper routines for setting pointers