From 368c5972b648508d6a07b98b1b883f54a4eddd07 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Wed, 24 Apr 2019 10:06:02 +0200 Subject: Add TODO note --- Lower.hs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Lower.hs b/Lower.hs index 57ac9ca..cde2e2b 100644 --- a/Lower.hs +++ b/Lower.hs @@ -1,3 +1,13 @@ +-- TODO +-- Use the link register, R14, for the frame pointer (i.e. points to the +-- link register stack slot, from which argument positions are independent +-- of spill space). Upon a function call, the frame pointer needs to be +-- pushed because R14 is overwritten by the call. The value 8 can be +-- obtained each time through a Li on a new temporary. +-- If that works out to be impossible, use R12 as the constant 8. + + + {-# LANGUAGE TupleSections, MultiWayIf, GeneralizedNewtypeDeriving #-} module Lower(lowerIR) where @@ -116,7 +126,6 @@ genTemp = liftM AReg genId lowerIR :: IRProgram -> AsmProgram' lowerIR origProgram = - -- TODO: For each function, push and pop the link register let res1 = closuresAreParams origProgram IRProgram bbs gfds _ = res1 -- cgit v1.2.3-54-g00ecf