From bf4053fdf98c906f1e079ae0332cfaee35b8d071 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Mon, 30 Jan 2023 21:36:20 +0100 Subject: Align on halfwords instead of double words; use data/text boundary to distinguish hnfs and thunks --- snug-clean/src/Snug/Compile/ABI.dcl | 2 ++ snug-clean/src/Snug/Compile/Simulate.icl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'snug-clean/src/Snug/Compile') diff --git a/snug-clean/src/Snug/Compile/ABI.dcl b/snug-clean/src/Snug/Compile/ABI.dcl index 938a65e..6de2953 100644 --- a/snug-clean/src/Snug/Compile/ABI.dcl +++ b/snug-clean/src/Snug/Compile/ABI.dcl @@ -13,6 +13,8 @@ FrontPrintPtr :== S 1 BackEvalPtr :== S 2 FrontEvalPtr :== S 3 +TextEndDataStart :== S 7 + HeapPtr :== GP TempImm :== T 0 diff --git a/snug-clean/src/Snug/Compile/Simulate.icl b/snug-clean/src/Snug/Compile/Simulate.icl index 9f09467..620ec3e 100644 --- a/snug-clean/src/Snug/Compile/Simulate.icl +++ b/snug-clean/src/Snug/Compile/Simulate.icl @@ -83,7 +83,7 @@ storeStackValue (SVRegOffset reg offset) doffset dreg = add buildCons :: !Label !Int -> Simulator () buildCons cons nargs = - write_heap (SVImmediate (Address 4 cons)) >>= \addr -> + write_heap (SVImmediate (Address 0 cons)) >>= \addr -> mapM_ (\_ -> pop >>= write_heap) [1..nargs] >>| push addr -- cgit v1.2.3