diff options
author | Ian Lynagh <igloo@earth.li> | 2012-03-23 23:19:01 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-03-23 23:19:01 +0000 |
commit | 9782f8fbf0d777840a5e65f71921186a7a193f16 (patch) | |
tree | 90f0849e27ffe0b7f811bb7c0305a8a1274bb9bc /rts | |
parent | 47a018026aee9faef28ddc9b4550425dd0000ceb (diff) | |
parent | 1212145be348b35ea91f17f62466de7841e0e705 (diff) | |
download | haskell-9782f8fbf0d777840a5e65f71921186a7a193f16.tar.gz |
Merge branch 'master' of win:c:/m64/reg4/.
Diffstat (limited to 'rts')
-rw-r--r-- | rts/StgCRun.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/rts/StgCRun.c b/rts/StgCRun.c index 15f9fd26a8..35c04f7476 100644 --- a/rts/StgCRun.c +++ b/rts/StgCRun.c @@ -247,15 +247,20 @@ StgRunIsImplementedInAssembler(void) */ ".globl " STG_RUN "\n" STG_RUN ":\n\t" - "subq %0, %%rsp\n\t" + "subq %1, %%rsp\n\t" "movq %%rsp, %%rax\n\t" - "addq %0-48, %%rax\n\t" + "subq %0, %%rsp\n\t" "movq %%rbx,0(%%rax)\n\t" "movq %%rbp,8(%%rax)\n\t" "movq %%r12,16(%%rax)\n\t" "movq %%r13,24(%%rax)\n\t" "movq %%r14,32(%%rax)\n\t" "movq %%r15,40(%%rax)\n\t" +#if defined(mingw32_HOST_OS) + "movq %%rdi,48(%%rax)\n\t" + "movq %%rsi,56(%%rax)\n\t" + "movq %%xmm6,64(%%rax)\n\t" +#endif /* * Set BaseReg */ @@ -282,18 +287,30 @@ StgRunIsImplementedInAssembler(void) /* * restore callee-saves registers. (Don't stomp on %%rax!) */ + "addq %0, %%rsp\n\t" "movq %%rsp, %%rdx\n\t" - "addq %0-48, %%rdx\n\t" + "addq %1, %%rsp\n\t" "movq 0(%%rdx),%%rbx\n\t" /* restore the registers saved above */ "movq 8(%%rdx),%%rbp\n\t" "movq 16(%%rdx),%%r12\n\t" "movq 24(%%rdx),%%r13\n\t" "movq 32(%%rdx),%%r14\n\t" "movq 40(%%rdx),%%r15\n\t" - "addq %0, %%rsp\n\t" +#if defined(mingw32_HOST_OS) + "movq 48(%%rdx),%%rdi\n\t" + "movq 56(%%rdx),%%rsi\n\t" + "movq 64(%%rdx),%%xmm6\n\t" +#endif "retq" - : : "i"(RESERVED_C_STACK_BYTES + 48 /*stack frame size*/)); + : + : "i"(RESERVED_C_STACK_BYTES), +#if defined(mingw32_HOST_OS) + "i"(72 /*stack frame size*/) +#else + "i"(48 /*stack frame size*/) +#endif + ); /* * See Note [Stack Alignment on X86] */ |