ThreadContext is the external interface to all thread state for anything outside of the CPU.
T insertBits(T val, int first, int last, B bit_val)
Returns val with bits first to last set to the LSBs of bit_val.
virtual RegVal readIntReg(RegIndex reg_idx) const =0
T bits(T val, int first, int last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.