X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fopenpower%2Fdecoder%2Fpower_enums.py;h=eee86b949e7d18675b798caf6289f2152761223e;hb=c3b9973df8edcb1f6c1583c2da693336af7d1921;hp=bf5738997b4b08eae72f732b458e0fd24f73cb6f;hpb=a3aac4910551ec24b20c3245cae008e4796e7a2f;p=openpower-isa.git diff --git a/src/openpower/decoder/power_enums.py b/src/openpower/decoder/power_enums.py index bf573899..eee86b94 100644 --- a/src/openpower/decoder/power_enums.py +++ b/src/openpower/decoder/power_enums.py @@ -118,6 +118,8 @@ class Form(Enum): SVL = 29 # Simple-V for setvl instruction SVD = 30 # Simple-V for LD/ST bit-reverse, variant of D-Form SVDS = 31 # Simple-V for LD/ST bit-reverse, variant of DS-Form + SVM = 32 # Simple-V SHAPE mode - TEMPORARY TEMPORARY TEMPORARY + SVRM = 33 # Simple-V REMAP mode - TEMPORARY TEMPORARY TEMPORARY # Simple-V svp64 fields https://libre-soc.org/openpower/sv/svp64/ @@ -184,6 +186,35 @@ class SVP64RMMode(Enum): FFIRST = 2 SATURATE = 3 PREDRES = 4 + BRANCH = 5 + + +@unique +class SVP64BCPredMode(Enum): + NONE = 0 + MASKZERO = 1 + MASKONE = 2 + +@unique +class SVP64BCVLSETMode(Enum): + NONE = 0 + VL_INCL = 1 + VL_EXCL = 2 + + +# note that these are chosen to be exactly the same as +# SVP64 RM bit 4. ALL=1 => bit4=1 +@unique +class SVP64BCGate(Enum): + ANY = 0 + ALL = 1 + + +@unique +class SVP64BCStep(Enum): + NONE = 0 + STEP = 1 + STEP_RC = 2 @unique @@ -214,7 +245,7 @@ class SVP64LDSTmode(Enum): INDEXED = 1 ELSTRIDE = 2 UNITSTRIDE = 3 - BITREVERSE = 4 + SHIFT = 4 # supported instructions: make sure to keep up-to-date with CSV files @@ -223,10 +254,13 @@ _insns = [ "NONE", "add", "addc", "addco", "adde", "addeo", "addi", "addic", "addic.", "addis", "addme", "addmeo", "addo", "addze", "addzeo", + "addg6s", "and", "andc", "andi.", "andis.", "attn", "b", "bc", "bcctr", "bclr", "bctar", "bpermd", + "cbcdtd", + "cdtbcd", "cmp", "cmpb", "cmpeqb", "cmpi", "cmpl", "cmpli", "cmprb", "cntlzd", "cntlzw", "cnttzd", "cnttzw", "crand", "crandc", "creqv", @@ -240,10 +274,13 @@ _insns = [ "extsb", "extsh", "extsw", "extswsli", "fadd", "fadds", "fsub", "fsubs", # FP add / sub "fcfids", "fcfidus", "fsqrts", "fres", "frsqrtes", # FP stuff + "fdmadds", # DCT FP 3-arg "fmsubs", "fmadds", "fnmsubs", "fnmadds", # FP 3-arg + "ffadds", "ffsubs", "ffmuls", "ffdivs", # FFT FP 2-arg "ffmsubs", "ffmadds", "ffnmsubs", "ffnmadds", # FFT FP 3-arg "fmul", "fmuls", "fdiv", "fdivs", # FP mul / div "fmr", "fabs", "fnabs", "fneg", "fcpsgn", # FP move/abs/neg + "fsins", "fcoss", # FP SIN/COS "hrfid", "icbi", "icbt", "isel", "isync", "lbarx", "lbz", "lbzu", "lbzux", "lbzx", # load byte "ld", "ldarx", "ldbrx", "ldu", "ldux", "ldx", # load double @@ -276,6 +313,9 @@ _insns = [ "rlwimi", "rlwinm", "rlwnm", "setb", "setvl", # https://libre-soc.org/openpower/sv/setvl + "svremap", # https://libre-soc.org/openpower/sv/remap - TEMPORARY + "svshape", # https://libre-soc.org/openpower/sv/remap + "svstep", # https://libre-soc.org/openpower/sv/setvl "sim_cfg", "slbia", "sld", "slw", "srad", "sradi", "sraw", "srawi", "srd", "srw", @@ -301,6 +341,9 @@ for i, insn in enumerate(_insns): insns[i] = insn asmidx[insn] = i +# must be long enough to cover all instructions +asmlen = len(_insns).bit_length() + # Internal Operation numbering. Add new opcodes here (FPADD, FPMUL etc.) @@ -383,6 +426,12 @@ class MicrOp(Enum): OP_FPOP = 77 # temporary: replace with actual ops OP_FPOP_I = 78 # temporary: replace with actual ops OP_FP_MADD = 79 + OP_SVREMAP = 80 + OP_SVSHAPE = 81 + OP_SVSTEP = 82 + OP_ADDG6S = 83 + OP_CDTBCD = 84 + OP_CBCDTD = 85 @unique @@ -502,6 +551,7 @@ def get_spr_enum(full_file): this saves drastically on the size of the regfile """ short_list = {'PIDR', 'DAR', 'PRTBL', 'DSISR', 'SVSRR0', 'SVSTATE', + 'SVSTATE0', 'SVSTATE1', 'SVSTATE2', 'SVSTATE3', 'SPRG0_priv', 'SPRG1_priv', 'SPRG2_priv', 'SPRG3_priv', 'SPRG3' }