From e1d9815e05eafaff2260585cf10199c84bd9fe19 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 30 Jul 2022 15:29:08 +0100 Subject: [PATCH] add PACK/UNPACK constants for RM-2P-1S1D-PU --- src/openpower/consts.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/openpower/consts.py b/src/openpower/consts.py index 4ec670eb..f5da27b4 100644 --- a/src/openpower/consts.py +++ b/src/openpower/consts.py @@ -201,6 +201,13 @@ class EXTRA2b(_Const): EXTRA2_SIZE = 9 EXTRA2 = _ConstLE("EXTRA2", names=EXTRA2b, msb=EXTRA2_SIZE-1) +# sigh, make these convenience-modifications afterwards (aliases) +# see RM-2P-1S1D-PU in https://libre-soc.org/openpower/sv/svp64 +EXTRA2b.PACK_en = EXTRA2b.IDX2_VEC +EXTRA2b.UNPACK_en = EXTRA2b.IDX2_MSB +EXTRA2.PACK_en = EXTRA2.IDX2_VEC +EXTRA2.UNPACK_en = EXTRA2.IDX2_MSB + # EXTRA field, with EXTRA3 subfield encoding class EXTRA3: @@ -331,3 +338,6 @@ class XERRegsEnum: CA=1 # CA and CA32 OV=2 # OV and OV32 N_REGS = 3 # maximum number of regs + +if __name__ == '__main__': + print ("EXTRA2 pack", EXTRA2.PACK_en, EXTRA2.PACK_en.value) -- 2.30.2