From 7a463dddadebf63234c820d37fc4e8e301d74577 Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 4 Feb 2000 11:18:05 +0000 Subject: [PATCH] [project @ 2000-02-04 11:18:05 by simonmar] Fix bug #2 in unregisterised RTS: forceIO had the same problem as catch#. This bug has been here for a long time, not sure why we haven't noticed it before. Jules: that should get you back on the road. --- ghc/rts/StgMiscClosures.hc | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/ghc/rts/StgMiscClosures.hc b/ghc/rts/StgMiscClosures.hc index 645a442..61393d1 100644 --- a/ghc/rts/StgMiscClosures.hc +++ b/ghc/rts/StgMiscClosures.hc @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgMiscClosures.hc,v 1.34 2000/01/30 10:25:29 simonmar Exp $ + * $Id: StgMiscClosures.hc,v 1.35 2000/02/04 11:18:05 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -694,6 +694,7 @@ SET_STATIC_HDR(dummy_ret_closure,dummy_ret_info,CCS_DONTZuCARE,,EI_) * -------------------------------------------------------------------------- */ +#ifdef REG_R1 INFO_TABLE_SRT_BITMAP(forceIO_ret_info,forceIO_ret_entry,0,0,0,0,RET_SMALL,,EF_,0,0); FN_(forceIO_ret_entry) { @@ -703,7 +704,19 @@ FN_(forceIO_ret_entry) PUSH_SEQ_FRAME(Sp); JMP_(GET_ENTRY(R1.cl)); } - +#else +INFO_TABLE_SRT_BITMAP(forceIO_ret_info,forceIO_ret_entry,0,0,0,0,RET_SMALL,,EF_,0,0); +FN_(forceIO_ret_entry) +{ + StgClosure *rval; + FB_ + rval = (StgClosure *)Sp[0]; + Sp += 2; + Sp -= sizeofW(StgSeqFrame); + PUSH_SEQ_FRAME(Sp); + JMP_(GET_ENTRY(rval)); +} +#endif INFO_TABLE(forceIO_info,forceIO_entry,1,0,FUN_STATIC,,EF_,0,0); FN_(forceIO_entry) -- 1.7.10.4