projects
/
openpower-isa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e38e46
)
oppc/code: handle call statements
author
Dmitry Selyutin
<ghostmansd@gmail.com>
Tue, 16 Jan 2024 19:09:45 +0000
(22:09 +0300)
committer
Dmitry Selyutin
<ghostmansd@gmail.com>
Tue, 16 Jan 2024 19:10:08 +0000
(22:10 +0300)
src/openpower/oppc/pc_code.py
patch
|
blob
|
history
diff --git
a/src/openpower/oppc/pc_code.py
b/src/openpower/oppc/pc_code.py
index 8f1b771e663ca67e889b3102aecec47b14c3650e..9b92caefda26928b989a9d54764b466e2b78e13c 100644
(file)
--- a/
src/openpower/oppc/pc_code.py
+++ b/
src/openpower/oppc/pc_code.py
@@
-184,6
+184,10
@@
class CodeVisitor(pc_util.Visitor):
yield node
with self[node]:
for subnode in node:
+ if isinstance(subnode, pc_ast.Call):
+ (level, stmt) = self[subnode][-1]
+ assert stmt[-1] == ")"
+ self[subnode][-1] = (level, f"{stmt};")
for (level, stmt) in self[subnode]:
self[node].emit(stmt=stmt, level=level)