Commit a8cca781 authored by wolfgang's avatar wolfgang
Browse files

[project @ 2005-09-11 23:56:24 by wolfgang]

Darwin/x86:

Align the stack correctly when entering Haskell code.
parent 6ac7eb25
......@@ -141,14 +141,32 @@ StgRun(StgFunPtr f, StgRegTable *basereg) {
*/
"movl %3,%%ebx\n\t"
/*
* grab the function argument from the stack, and jump to it.
* grab the function argument from the stack
*/
"movl %2,%%eax\n\t"
#if darwin_TARGET_OS
/*
* Darwin: keep the stack aligned
*/
"subl $12,%%esp\n\t"
#endif
/*
* jump to it
*/
"jmp *%%eax\n\t"
STG_GLOBAL STG_RETURN "\n"
STG_RETURN ":\n\t"
#if darwin_TARGET_OS
/*
* Darwin: keep the stack aligned
*/
"addl $12,%%esp\n\t"
#endif
"movl %%esi, %%eax\n\t" /* Return value in R1 */
/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment