[PATCH, RS6000] gpc_reg_operand
David Edelsohn
dje.gcc@gmail.com
Tue May 19 03:28:00 GMT 2015
On Mon, May 18, 2015 at 9:09 PM, Alan Modra <amodra@gmail.com> wrote:
> gpc_reg_operand contains a test that dates back to the early 1990s,
> when FIRST_PSEUDO_REGISTER was 76. At that point, testing
> REGNO (op) >= ARG_POINTER_REGNUM allowed ap, xer/ca, cr0..cr7 and
> pseudos. A later patch corrected this to remove xer. Nowadays we
> have a lot more hard registers, altivec, vsx, htm, spe hi. Some of
> these are definitely special registers so not appropriate for
> gpc_reg_operand to match. This patch corrects the situation, to
> just allow pseudos, int, fp, altivec and vsx. ap and sfp are allowed
> via INT_REGNO_P. Note that I've removed cr0..cr7. I believe this is
> OK along with the extzvdi_internal2 change. I checked all uses of
> gpc_reg_operand and predicates derived from gpc_reg_operand.
>
> The patch also removes some operand predicates I discovered were
> unused, and tightens the vr save/restore patterns I added some time
> ago. Bootstrapped and regression tested powerpc64le-linux and
> powerpc64-linux, the latter with -mcpu=power7. OK for mainline?
>
> * config/rs6000/predicates.md (gpc_reg_operand): Don't allow all
> hard registers numbered greater or equal to ARG_POINTER_REGNUM.
> (reg_or_neg_short_operand, fix_trunc_dest_operand): Delete
> unused predicates.
> * config/rs6000/altivec.md (save_vregs_*, restore_vregs_*):
> Use altivec_register_operand. Make insn predicate TARGET_ALTIVEC.
> * config/rs6000/rs6000.md (extzvdi_internal2): Use cc_reg_operand.
> * config/rs6000/vsx.md (vsx_float<VSi><mode>2): Expand comment.
Okay.
Thanks, David
More information about the Gcc-patches
mailing list