diff options
author | Vladimir Azarov <avm@intermediate-node.net> | 2025-08-10 02:03:50 +0200 |
---|---|---|
committer | Vladimir Azarov <avm@intermediate-node.net> | 2025-08-10 02:03:50 +0200 |
commit | 9edb2b8dbd99636cf2d98d3253a0316f74720894 (patch) | |
tree | 2618d33ef9b846fdd4340f8aacb41c9e8dea0a34 /il.fun | |
parent | 89cbdbe9e4cb6f142154292cac462e2d130d912a (diff) |
Instruction selection for multiplication and division
Diffstat (limited to 'il.fun')
-rw-r--r-- | il.fun | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -404,7 +404,7 @@ functor IL(P: PARSER) = struct (if onStack then Addr else Reg) id end - fun getOffset ea field = #1 $ valOf $ P.getFieldInfo (P.getT ea) field + fun getOffset t field = #1 $ valOf $ P.getFieldInfo t field fun computeFieldFromVReg ctx v offset = let @@ -418,7 +418,7 @@ functor IL(P: PARSER) = struct fun convFieldAccessByV ctx ea field: ev = let val v: ev = convExpr ctx ea - val offset = getOffset ea field + val offset = getOffset (P.getT ea) field in case v of Addr v => computeFieldFromVReg ctx v offset @@ -429,7 +429,8 @@ functor IL(P: PARSER) = struct let val v = convExpr ctx ea - val offset = getOffset ea field + val () = printfn `"TYPE: " P.Pctype (P.getT ea) % + val offset = getOffset (P.pointsTo $ P.getT ea)field in case v of Reg v => computeFieldFromVReg ctx v offset |