// WriteReg writes an integer register with value v. // Writing to $0 will have no effect, // writing to $31 will be automatically aligned. func (rs *Registers) WriteReg(a uint8, v uint32) { if a == 0 { // do nothing } else if a == inst.RegPC { rs.ints[inst.RegPC] = align.A32(v) } else { rs.ints[a] = v } }
func offset32(offset uint32) uint32 { return align.A32(maskOffset(offset)) }