diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2019-04-24 10:06:02 +0200 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2019-04-24 10:06:02 +0200 |
commit | 368c5972b648508d6a07b98b1b883f54a4eddd07 (patch) | |
tree | 7d05a3d1e39320394f6b4830647e10e3d601c6f1 | |
parent | 19260ae02f1447ccd382b5c278cc5d1f22d004b3 (diff) |
Add TODO note
-rw-r--r-- | Lower.hs | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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 |