Add Store case to insn2s.

This commit is contained in:
cfreksen 2017-10-29 21:21:43 +01:00
parent 46f5bf9fc7
commit dc1c38fbe2
No known key found for this signature in database
GPG Key ID: EAC13EE101008978

6
ll.py
View File

@ -110,6 +110,12 @@ def insn2s(insn):
if isinstance(insn, Alloca):
return ('alloca {}'
.format(ty2s(insn.ty)))
if isinstance(insn, Store):
return ('store {} {}, {}* {}'
.format(ty2s(insn.ty),
oper2s(insn.value),
ty2s(insn.ty),
oper2s(insn.location)))
elif isinstance(insn, Icmp):
return ('icmp {} {} {}, {}'
.format(insn.cnd, ty2s(insn.ty),