Add missing insn cases as TODOs.

This commit is contained in:
cfreksen 2017-10-29 20:44:17 +01:00
parent 0aa427ac02
commit 648c718843
No known key found for this signature in database
GPG Key ID: EAC13EE101008978

View File

@ -41,6 +41,12 @@ def step(insns, terminator, blocks, stack_frames, ssa_env, global_env, memory,
# TODO # TODO
print('{} {}, {}' print('{} {}, {}'
.format(bop, left_v, right_v)) .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): elif isinstance(next_insn, ll.Icmp):
cnd = next_insn.cnd cnd = next_insn.cnd
left = next_insn.left left = next_insn.left
@ -96,6 +102,8 @@ def step(insns, terminator, blocks, stack_frames, ssa_env, global_env, memory,
# TODO # TODO
print('bitcast {} {} to {}' print('bitcast {} {} to {}'
.format(ll.ty2s(from_ty), oper_v, ll.ty2s(to_ty))) .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): elif isinstance(next_insn, ll.Zext):
oper = next_insn.oper oper = next_insn.oper
from_ty = next_insn.from_ty 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: if ssa_target in ssa_env:
err('Cannot assign to variable twice: {}' err('Cannot assign to variable twice: {}'
.format(ssa_target)) .format(ssa_target))
elif res is None:
err('Cannot assign empty value to %{}'
.format(ssa_target))
else: else:
# TODO # TODO
print('%{} <- {}' print('%{} <- {}'