Re: [PATCH] Do not allow non-allocatable registers in scratch_operand

2014-09-19 Thread Jeff Law
On 09/19/14 06:21, Segher Boessenkool wrote: On Thu, Sep 18, 2014 at 11:54:46PM -0600, Jeff Law wrote: Shouldn't you be testing if the register is fixed rather than its class? Or maybe both? register_operand (via general_operand) uses operand_reg_set for this; it is initialised via the regcl

Re: [PATCH] Do not allow non-allocatable registers in scratch_operand

2014-09-19 Thread Segher Boessenkool
On Thu, Sep 18, 2014 at 11:54:46PM -0600, Jeff Law wrote: > Shouldn't you be testing if the register is fixed rather than its class? > Or maybe both? register_operand (via general_operand) uses operand_reg_set for this; it is initialised via the regclass NO_REGS too (and other things). This wou

Re: [PATCH] Do not allow non-allocatable registers in scratch_operand

2014-09-18 Thread Jeff Law
On 09/15/14 18:58, Segher Boessenkool wrote: Currently, scratch_operand allows all hard registers, also those that cannot be allocated and are only generated explicitly by the backend. This causes problems. Consider the case where combine combines instructions A and B, where B clobbers such a n

[PATCH] Do not allow non-allocatable registers in scratch_operand

2014-09-15 Thread Segher Boessenkool
Currently, scratch_operand allows all hard registers, also those that cannot be allocated and are only generated explicitly by the backend. This causes problems. Consider the case where combine combines instructions A and B, where B clobbers such a non-allocatable hard reg X, into an instruction