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:
76244a6
)
power_insn: support GPR operands
author
Dmitry Selyutin
<ghostmansd@gmail.com>
Sun, 6 Nov 2022 09:29:55 +0000
(12:29 +0300)
committer
Dmitry Selyutin
<ghostmansd@gmail.com>
Sun, 15 Jan 2023 19:47:22 +0000
(22:47 +0300)
src/openpower/decoder/power_insn.py
patch
|
blob
|
history
diff --git
a/src/openpower/decoder/power_insn.py
b/src/openpower/decoder/power_insn.py
index 9d77cbdbefd8d2e53c515d0e5b409fbcec3b35fe..933741b8ea20b30f7f9d26a20e473109cd511ed9 100644
(file)
--- a/
src/openpower/decoder/power_insn.py
+++ b/
src/openpower/decoder/power_insn.py
@@
-742,6
+742,14
@@
class RegisterOperand(DynamicOperand):
class GPROperand(RegisterOperand):
+ def assemble(self, value, insn, record):
+ if isinstance(value, str):
+ value = value.lower()
+ if value.startswith("r"):
+ value = value[1:]
+ value = int(value, 0)
+ return super().assemble(value=value, insn=insn, record=record)
+
def disassemble(self, insn, record,
verbosity=Verbosity.NORMAL, indent=""):
prefix = "" if (verbosity <= Verbosity.SHORT) else "r"