From 648c718843c9a0503896113f1bad563f8dab13c8 Mon Sep 17 00:00:00 2001 From: cfreksen Date: Sun, 29 Oct 2017 20:44:17 +0100 Subject: [PATCH] Add missing insn cases as TODOs. --- stepper.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/stepper.py b/stepper.py index e74f166..6d63e02 100644 --- a/stepper.py +++ b/stepper.py @@ -41,6 +41,12 @@ def step(insns, terminator, blocks, stack_frames, ssa_env, global_env, memory, # TODO print('{} {}, {}' .format(bop, left_v, right_v)) + elif isinstance(next_insn, ll.Alloca): + TODO('Alloca') + elif isinstance(next_insn, ll.Load): + TODO('Load') + elif isinstance(next_insn, ll.Store): + TODO('Store') elif isinstance(next_insn, ll.Icmp): cnd = next_insn.cnd left = next_insn.left @@ -96,6 +102,8 @@ def step(insns, terminator, blocks, stack_frames, ssa_env, global_env, memory, # TODO print('bitcast {} {} to {}' .format(ll.ty2s(from_ty), oper_v, ll.ty2s(to_ty))) + elif isinstance(next_insn, ll.Gep): + TODO('Gep') elif isinstance(next_insn, ll.Zext): oper = next_insn.oper from_ty = next_insn.from_ty @@ -126,6 +134,9 @@ def step(insns, terminator, blocks, stack_frames, ssa_env, global_env, memory, if ssa_target in ssa_env: err('Cannot assign to variable twice: {}' .format(ssa_target)) + elif res is None: + err('Cannot assign empty value to %{}' + .format(ssa_target)) else: # TODO print('%{} <- {}'