summaryrefslogtreecommitdiff
path: root/rts/RaiseAsync.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2008-07-28 15:56:21 +0000
committerSimon Marlow <marlowsd@gmail.com>2008-07-28 15:56:21 +0000
commit02620e7c705ac946db43e61988ca3781af3f2447 (patch)
tree4a65b034fdda5ed683d951a786b56383b1300e77 /rts/RaiseAsync.c
parent4ddcff11bae7e4c66c3c895b277eb8b2230aea67 (diff)
downloadhaskell-02620e7c705ac946db43e61988ca3781af3f2447.tar.gz
Change the calling conventions for unboxed tuples slightly
When returning an unboxed tuple with a single non-void component, we now use the same calling convention as for returning a value of the same type as that component. This means that the return convention for IO now doesn't vary depending on the platform, which make some parts of the RTS simpler, and fixes a problem I was having with making the FFI work in unregisterised GHCi (the byte-code compiler makes some assumptions about calling conventions to keep things simple).
Diffstat (limited to 'rts/RaiseAsync.c')
-rw-r--r--rts/RaiseAsync.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/rts/RaiseAsync.c b/rts/RaiseAsync.c
index 9d03d07ab4..d3400d791d 100644
--- a/rts/RaiseAsync.c
+++ b/rts/RaiseAsync.c
@@ -1010,17 +1010,7 @@ raiseAsync(Capability *cap, StgTSO *tso, StgClosure *exception,
if (stop_at_atomically) {
ASSERT(stmGetEnclosingTRec(tso->trec) == NO_TREC);
stmCondemnTransaction(cap, tso -> trec);
-#ifdef REG_R1
tso->sp = frame;
-#else
- // R1 is not a register: the return convention for IO in
- // this case puts the return value on the stack, so we
- // need to set up the stack to return to the atomically
- // frame properly...
- tso->sp = frame - 2;
- tso->sp[1] = (StgWord) &stg_NO_FINALIZER_closure; // why not?
- tso->sp[0] = (StgWord) &stg_ut_1_0_unreg_info;
-#endif
tso->what_next = ThreadRunGHC;
return;
}