From 8487ae3d761cde6ccd4f55fe9390c96305e09221 Mon Sep 17 00:00:00 2001 From: ceriel Date: Wed, 25 Sep 1991 15:04:05 +0000 Subject: [PATCH] Made to work with interpreter --- lang/occam/lib/par_misc.e | 74 +++++++++++++++++++++++++++++++++++---- 1 file changed, 68 insertions(+), 6 deletions(-) diff --git a/lang/occam/lib/par_misc.e b/lang/occam/lib/par_misc.e index 5ddc02d2e..9465e230b 100644 --- a/lang/occam/lib/par_misc.e +++ b/lang/occam/lib/par_misc.e @@ -1,7 +1,22 @@ # mes 2,EM_WSIZE,EM_PSIZE exp $top_size +#ifdef __sparc + inp $top_size2 + pro $top_size, 0 + mes 11 + zer EM_PSIZE + lal 0 + loi EM_PSIZE + cal $top_size2 + asp 2*EM_PSIZE + lfr EM_WSIZE + ret EM_WSIZE + end 0 + pro $top_size2, 3*EM_WSIZE+3*EM_PSIZE +#else pro $top_size, 3*EM_WSIZE+3*EM_PSIZE +#endif mes 11 lal 0 loi EM_PSIZE ; s_brk @@ -11,7 +26,21 @@ end 3*EM_WSIZE+3*EM_PSIZE exp $top_save +#ifdef __sparc + inp $top_save2 + pro $top_save,0 + mes 11 + lal 0 + loi 2*EM_PSIZE + cal $top_save2 + asp 2*EM_PSIZE + lfr EM_WSIZE + ret EM_WSIZE + end 0 + pro $top_save2,0 +#else pro $top_save, 0 +#endif mes 11 loe 0 lae 4 ; load line number and file name @@ -36,26 +65,59 @@ ret EM_WSIZE ; return 1 end 0 +sv + bss EM_PSIZE, 0, 0 + exp $top_load +#ifdef __sparc + inp $top_load1 + pro $top_load,0 + lal 0 + loi EM_PSIZE + cal $top_load1 + asp EM_PSIZE + lfr EM_WSIZE + ret EM_WSIZE + end 0 + pro $top_load1, 0 +#else pro $top_load, 0 +#endif mes 11 lal 0 loi EM_PSIZE + lae sv + sti EM_PSIZE + + lxl 0 +2 dup EM_PSIZE - loi EM_PSIZE - sti EM_PSIZE ; copy pointer from argument 0 to new frame + adp -3*EM_PSIZE lal 0 + loi EM_PSIZE ; compare target SP with current LB to see if we must + loi EM_PSIZE + cmp ; find another LB first + zgt *1 + dch ; just follow dynamic chain to make sure we find + ; a legal one + bra *2 +1 + str 0 + + lae sv + loi EM_PSIZE loi EM_PSIZE - loi EM_PSIZE ; load indirect to str 1 ; restore SP - dup EM_PSIZE ; givesargument 0 again + asp -EM_PSIZE + lae sv + loi EM_PSIZE lor 1 ; SP (the SP AFTER, see above) - lor 1 adp EM_PSIZE + lae sv loi EM_PSIZE lof EM_PSIZE ; size of block bls EM_WSIZE ; move block back (SP becomes the SP BEFORE again!) - asp EM_WSIZE ; drop size + asp EM_WSIZE+EM_PSIZE ; drop size + SP str 0 ; LB sim ; ignore mask lae 4 -- 2.34.1