Add Store case to insn2s.
This commit is contained in:
parent
46f5bf9fc7
commit
dc1c38fbe2
6
ll.py
6
ll.py
|
@ -110,6 +110,12 @@ def insn2s(insn):
|
||||||
if isinstance(insn, Alloca):
|
if isinstance(insn, Alloca):
|
||||||
return ('alloca {}'
|
return ('alloca {}'
|
||||||
.format(ty2s(insn.ty)))
|
.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):
|
elif isinstance(insn, Icmp):
|
||||||
return ('icmp {} {} {}, {}'
|
return ('icmp {} {} {}, {}'
|
||||||
.format(insn.cnd, ty2s(insn.ty),
|
.format(insn.cnd, ty2s(insn.ty),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user