pysvp64asm: introduce more flexible Z23 wrapper
authorDmitry Selyutin <ghostmansd@gmail.com>
Tue, 25 Oct 2022 18:34:30 +0000 (21:34 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Tue, 25 Oct 2022 18:34:30 +0000 (21:34 +0300)
src/openpower/sv/trans/svp64.py

index 56553e015564247aea02d619c68e77e311da48fb..6326683823db2455e2e56de290c9c8c544e34b5f 100644 (file)
@@ -587,17 +587,16 @@ def va_form(fields, XO):
 
 
 @_custom_insns(
-    _insn("dsld",  XO=0b00111001, Rc=0),
-    _insn("dsld.", XO=0b00111001, Rc=1),
-    _insn("dsrd",  XO=0b10111001, Rc=0),
-    _insn("dsrd.", XO=0b10111001, Rc=1),
+    _insn("dsld",  PO=31, XO=0b00111001, Rc=0),
+    _insn("dsld.", PO=31, XO=0b00111001, Rc=1),
+    _insn("dsrd",  PO=31, XO=0b10111001, Rc=0),
+    _insn("dsrd.", PO=31, XO=0b10111001, Rc=1),
 )
-def dsld_dsrd(fields, XO, Rc):
+def Z23(fields, PO, XO, Rc):
     # XXX WARNING THESE ARE NOT APPROVED BY OPF ISA WG
     # 1.6.27 Z23-FORM
     #   |0     |6     |11    |15 |16     |21 |23    |31 |
     #   | PO   |  RT  |   RA     |   RB  |sm |   XO |Rc |
-    PO = 31
     (RT, RA, RB, sm) = fields
     return instruction(
         (PO, 0, 5),