Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
824d7fa0
Commit
824d7fa0
authored
Mar 14, 2005
by
simonpj
Browse files
[project @ 2005-03-14 16:25:21 by simonpj]
Fix obscure_ccall
parent
605ad450
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/rts/Adjustor.c
View file @
824d7fa0
...
...
@@ -99,6 +99,11 @@ mallocBytesRWX(int len)
return
addr
;
}
#ifdef LEADING_UNDERSCORE
#define UNDERSCORE "_"
#else
#define UNDERSCORE ""
#endif
#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__
(
".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"
);
...
...
@@ -128,8 +133,8 @@ extern void obscure_ccall_ret_code(void);
#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"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment