PATCH, rs6000 (alpha?) long const take 2

David Edelsohn dje@watson.ibm.com
Thu Jan 3 08:06:00 GMT 2002


>>>>> Richard Henderson writes:

Richard> I think changing rs6000_emit_set_long_const so that it always
Richard> works is the right thing.  If you want to choose another register,
Richard> that's fine.

	rs6000_emit_set_long_const() does always work when called from the
MD file because the MD file register constraints ensure that the
instructions always will have an appropriate registers.

	Only, *ONLY*, rs6000_emit_allocate_stack() forces r0 into a
pattern for which it was not designed:

  rtx tmp_reg = gen_rtx_REG (Pmode, 0);

rs6000_emit_allocate_stack() is the problem and what should be fixed, not
rs6000_emit_set_long_const().  rs6000_emit_set_long_const() was the
symptom and was correct.  Fix the problem, not the symptom.

Richard> That said, IOR clearly works better than PLUS because of the r0 issue.

	If rs6000_emit_allocate_stack() cannot be rewritten in terms of
r12 for this large stack frame case, *IT* should be modified to use
gen_iorsi3() instead of gen_addsi3() for that case, not modifying
rs6000_emit_set_long_const().

David



More information about the Gcc-patches mailing list