bitfields.isa revision 2026
1//////////////////////////////////////////////////////////////////// 2// 3// Bitfield definitions. 4// 5 6// Universal (format-independent) fields 7def bitfield OPCODE_HI <31:29>; 8def bitfield OPCODE_LO <28:26>; 9 10def bitfield FUNCTION_HI < 5: 3>; 11def bitfield FUNCTION_LO < 2: 0>; 12 13def bitfield RT <20:16>; 14def bitfield RT_HI <20:19>; 15def bitfield RT_LO <18:16>; 16 17def bitfield RS <25:21>; 18def bitfield RS_HI <25:24>; 19def bitfield RS_LO <23:21>; 20 21def bitfield MOVCI <>; 22def bitfield SRL <>; 23def bitfield SRLV <>; 24def bitfield SA <>; 25 26def bitfield BSHFL <>; 27def bitfield BSHFL_HI <>; 28def bitfield BSHFL_LO <>; 29 30// Integer operate format(s>; 31def bitfield INTIMM <15: 0>; // integer immediate (literal) 32def bitfield IMM <12:12>; // immediate flag 33def bitfield INTFUNC <11: 5>; // function code 34def bitfield RD <15:11>; // dest reg 35 36// Memory format 37def signed bitfield MEMDISP <15: 0>; // displacement 38def bitfield MEMFUNC <15: 0>; // function code (same field, unsigned) 39 40// Memory-format jumps 41def bitfield JMPFUNC <15:14>; // function code (disp<15:14>) 42def bitfield JMPHINT <13: 0>; // tgt Icache idx hint (disp<13:0>) 43 44// Branch format 45def signed bitfield BRDISP <20: 0>; // displacement 46 47// Floating-point operate format 48def bitfield FMT <25:21>; 49def bitfield FT <20:16>; 50def bitfield FS <15:11>; 51def bitfield FD <10: 6>; 52 53def bitfield FP_FULLFUNC <15: 5>; // complete function code 54 def bitfield FP_TRAPMODE <15:13>; // trapping mode 55 def bitfield FP_ROUNDMODE <12:11>; // rounding mode 56 def bitfield FP_TYPEFUNC <10: 5>; // type+func: handiest for decoding 57 def bitfield FP_SRCTYPE <10: 9>; // source reg type 58 def bitfield FP_SHORTFUNC < 8: 5>; // short function code 59 def bitfield FP_SHORTFUNC_TOP2 <8:7>; // top 2 bits of short func code 60 61// PALcode format 62def bitfield PALFUNC <25: 0>; // function code 63 64// EV5 PAL instructions: 65// HW_LD/HW_ST 66def bitfield HW_LDST_PHYS <15>; // address is physical 67def bitfield HW_LDST_ALT <14>; // use ALT_MODE IPR 68def bitfield HW_LDST_WRTCK <13>; // HW_LD only: fault if no write acc 69def bitfield HW_LDST_QUAD <12>; // size: 0=32b, 1=64b 70def bitfield HW_LDST_VPTE <11>; // HW_LD only: is PTE fetch 71def bitfield HW_LDST_LOCK <10>; // HW_LD only: is load locked 72def bitfield HW_LDST_COND <10>; // HW_ST only: is store conditional 73def signed bitfield HW_LDST_DISP <9:0>; // signed displacement 74 75// HW_REI 76def bitfield HW_REI_TYP <15:14>; // type: stalling vs. non-stallingk 77def bitfield HW_REI_MBZ <13: 0>; // must be zero 78 79// HW_MTPR/MW_MFPR 80def bitfield HW_IPR_IDX <15:0>; // IPR index 81 82// M5 instructions 83def bitfield M5FUNC <7:0>; 84