mirror of
https://github.com/RPCSX/llvm.git
synced 2025-03-04 10:59:04 +00:00
Improve compatibility with VC2005, patch by Morten Ofstad!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25653 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9d90144099
commit
38f7373018
@ -20,6 +20,11 @@
|
||||
#include <iostream>
|
||||
using namespace llvm;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
extern "C" void *_AddressOfReturnAddress(void);
|
||||
#pragma intrinsic(_AddressOfReturnAddress)
|
||||
#endif
|
||||
|
||||
void X86JITInfo::replaceMachineCodeForFunction(void *Old, void *New) {
|
||||
unsigned char *OldByte = (unsigned char *)Old;
|
||||
*OldByte++ = 0xE9; // Emit JMP opcode.
|
||||
@ -64,9 +69,6 @@ extern "C" {
|
||||
"popl %ebp\n"
|
||||
"ret\n");
|
||||
#else
|
||||
extern "C" void *_AddressOfReturnAddress(void);
|
||||
#pragma intrinsic(_AddressOfReturnAddress)
|
||||
|
||||
void X86CompilationCallback2(void);
|
||||
|
||||
_declspec(naked) void X86CompilationCallback(void) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user