diff options
author | Duncan Coutts <duncan@well-typed.com> | 2009-06-10 17:22:15 +0000 |
---|---|---|
committer | Duncan Coutts <duncan@well-typed.com> | 2009-06-10 17:22:15 +0000 |
commit | c9acb4de50dd2b7f7ece5491f60598f0a4815e75 (patch) | |
tree | f1f75e02bf1bcffda07d09641dd9d8a34bcc9e98 | |
parent | de4cc55e97ca2011ab3889a9e2dab9a745839a66 (diff) | |
download | haskell-c9acb4de50dd2b7f7ece5491f60598f0a4815e75.tar.gz |
Make killThread# cmm primop use local stack allocation
It using the mp_tmp_w register/global as a convenient temporary
variable. This is naughty because those vars are supposed to be
for gmp. Also, we want to remove the gmp temp vars so we must
now use a local stack slot instead.
-rw-r--r-- | rts/Exception.cmm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rts/Exception.cmm b/rts/Exception.cmm index 43f53c7ad3..cf24ef5b49 100644 --- a/rts/Exception.cmm +++ b/rts/Exception.cmm @@ -187,6 +187,7 @@ killThreadzh_fast target = R1; exception = R2; + /* Needs 3 words because throwToSingleThreaded uses some stack */ STK_CHK_GEN( WDS(3), R1_PTR & R2_PTR, killThreadzh_fast); /* @@ -215,8 +216,8 @@ killThreadzh_fast } else { W_ out; W_ retcode; - out = BaseReg + OFFSET_StgRegTable_rmp_tmp_w; - + out = Sp - WDS(1); /* ok to re-use stack space here */ + (retcode) = foreign "C" throwTo(MyCapability() "ptr", CurrentTSO "ptr", target "ptr", |