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:
c49fe86
)
oppc/code: support repeat expr
author
Dmitry Selyutin
<ghostmansd@gmail.com>
Fri, 12 Jan 2024 19:24:22 +0000
(22:24 +0300)
committer
Dmitry Selyutin
<ghostmansd@gmail.com>
Fri, 12 Jan 2024 19:24:44 +0000
(22:24 +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 a4bbe66563fd0d6ca06d0d31574ad75e960c2752..0c64d40ecae678e034aa8dc77c55ac19ad7d25fd 100644
(file)
--- a/
src/openpower/oppc/pc_code.py
+++ b/
src/openpower/oppc/pc_code.py
@@
-141,6
+141,13
@@
class CodeVisitor(pc_util.Visitor):
yield node
self[node].emit(stmt=f"ctx->fpr[OPPC_FPR_{str(node)}]")
+ @pc_util.Hook(pc_ast.RepeatExpr)
+ def RepeatExpr(self, node):
+ yield node
+ subject = str(self[node.subject])
+ times = str(self[node.times])
+ self[node].emit(f"oppc_repeat({subject}, {times})")
+
@pc_util.Hook(pc_ast.Call.Name)
def CallName(self, node):
yield node