aboutsummaryrefslogtreecommitdiffstats
path: root/src/hls/RTLPar.v
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2022-04-05 14:37:11 +0100
committerYann Herklotz <git@yannherklotz.com>2022-04-05 14:37:11 +0100
commitdba20d6c8201c1271ebda9f228ad95c77c6ca8a6 (patch)
tree6f7fd6d62ac726e1adbc6020f08310505b5431d7 /src/hls/RTLPar.v
parente0e291401dd98d4fb1c2a8ca16dc364b3ed6f836 (diff)
downloadvericert-dba20d6c8201c1271ebda9f228ad95c77c6ca8a6.tar.gz
vericert-dba20d6c8201c1271ebda9f228ad95c77c6ca8a6.zip
Add basic blocks to the stackframe
Diffstat (limited to 'src/hls/RTLPar.v')
-rw-r--r--src/hls/RTLPar.v13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/hls/RTLPar.v b/src/hls/RTLPar.v
index a3631ec..61e968e 100644
--- a/src/hls/RTLPar.v
+++ b/src/hls/RTLPar.v
@@ -55,17 +55,18 @@ Section RELSEM.
f.(fn_code)!pc = Some bb ->
step_instr_block sp (mk_instr_state rs pr m) bb.(bb_body)
(mk_instr_state rs' pr' m') ->
- step_cf_instr ge (State s f sp pc nil rs' pr' m') bb.(bb_exit) t s' ->
+ step_cf_instr ge (State s f sp pc (mk_bblock nil bb.(bb_exit)) rs' pr' m') t s' ->
step (State s f sp pc bb rs pr m) t s'
| exec_function_internal:
- forall s f args m m' stk,
+ forall s f args m m' stk bb,
Mem.alloc m 0 f.(fn_stacksize) = (m', stk) ->
+ f.(fn_code) ! (f.(fn_entrypoint)) = Some bb ->
step (Callstate s (Internal f) args m)
E0 (State s
f
(Vptr stk Ptrofs.zero)
f.(fn_entrypoint)
- nil
+ bb
(init_regs args f.(fn_params))
(PMap.init false)
m')
@@ -75,9 +76,9 @@ Section RELSEM.
step (Callstate s (External ef) args m)
t (Returnstate s res m')
| exec_return:
- forall res f sp pc rs s vres m pr,
- step (Returnstate (Stackframe res f sp pc rs pr :: s) vres m)
- E0 (State s f sp pc nil (rs#res <- vres) pr m).
+ forall res f sp pc rs s vres m pr bb,
+ step (Returnstate (Stackframe res f sp pc bb rs pr :: s) vres m)
+ E0 (State s f sp pc bb (rs#res <- vres) pr m).
End RELSEM.