projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
605ad45
)
[project @ 2005-03-14 16:25:21 by simonpj]
author
simonpj
<unknown>
Mon, 14 Mar 2005 16:25:21 +0000
(16:25 +0000)
committer
simonpj
<unknown>
Mon, 14 Mar 2005 16:25:21 +0000
(16:25 +0000)
Fix obscure_ccall
ghc/rts/Adjustor.c
patch
|
blob
|
history
diff --git
a/ghc/rts/Adjustor.c
b/ghc/rts/Adjustor.c
index
13c66ca
..
3341c58
100644
(file)
--- a/
ghc/rts/Adjustor.c
+++ b/
ghc/rts/Adjustor.c
@@
-99,6
+99,11
@@
mallocBytesRWX(int len)
return addr;
}
return addr;
}
+#ifdef LEADING_UNDERSCORE
+#define UNDERSCORE "_"
+#else
+#define UNDERSCORE ""
+#endif
#if defined(i386_HOST_ARCH)
/*
Now here's something obscure for you:
#if defined(i386_HOST_ARCH)
/*
Now here's something obscure for you:
@@
-118,8
+123,8
@@
mallocBytesRWX(int len)
to return to it before tail jumping from the adjustor thunk.
*/
__asm__ (
to return to it before tail jumping from the adjustor thunk.
*/
__asm__ (
- ".globl obscure_ccall_ret_code\n"
- "obscure_ccall_ret_code:\n\t"
+ ".globl " UNDERSCORE "obscure_ccall_ret_code\n"
+ UNDERSCORE "obscure_ccall_ret_code:\n\t"
"addl $0x4, %esp\n\t"
"ret"
);
"addl $0x4, %esp\n\t"
"ret"
);
@@
-128,8
+133,8
@@
extern void obscure_ccall_ret_code(void);
#if defined(x86_64_TARGET_ARCH)
__asm__ (
#if defined(x86_64_TARGET_ARCH)
__asm__ (
- ".globl obscure_ccall_ret_code\n"
- "obscure_ccall_ret_code:\n\t"
+ ".globl " UNDERSCORE "obscure_ccall_ret_code\n"
+ UNDERSCORE "obscure_ccall_ret_code:\n\t"
"addq $0x8, %rsp\n\t"
"ret"
);
"addq $0x8, %rsp\n\t"
"ret"
);