}
type regInfo struct {
- inputs []regMask
+ // inputs[i] encodes the set of registers allowed for the i'th input.
+ // Inputs that don't use registers (flags, memory, etc.) should be 0.
+ inputs []regMask
+ // clobbers encodes the set of registers that are overwritten by
+ // the instruction (other than the output registers).
clobbers regMask
- outputs []regMask
+ // outpus[i] encodes the set of registers allowed for the i'th output.
+ outputs []regMask
}
type regMask uint64
}
type regInfo struct {
- inputs []inputInfo // ordered in register allocation order
+ // inputs encodes the register restrictions for an instruction's inputs.
+ // Each entry specifies an allowed register set for a particular input.
+ // They are listed in the order in which regalloc should pick a register
+ // from the register set (most constrained first).
+ // Inputs which do not need registers are not listed.
+ inputs []inputInfo
+ // clobbers encodes the set of registers that are overwritten by
+ // the instruction (other than the output registers).
clobbers regMask
- outputs []outputInfo // ordered in register allocation order
+ // outputs is the same as inputs, but for the outputs of the instruction.
+ outputs []outputInfo
}
type auxType int8