From: Luke Kenneth Casson Leighton Date: Sat, 30 Jul 2022 14:29:08 +0000 (+0100) Subject: add PACK/UNPACK constants for RM-2P-1S1D-PU X-Git-Tag: sv_maxu_works-initial~196 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e1d9815e05eafaff2260585cf10199c84bd9fe19;p=openpower-isa.git add PACK/UNPACK constants for RM-2P-1S1D-PU --- 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)