https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72802

--- Comment #5 from Alan Modra <amodra at gcc dot gnu.org> ---
Author: amodra
Date: Mon Aug  8 09:05:16 2016
New Revision: 239233

URL: https://gcc.gnu.org/viewcvs?rev=239233&root=gcc&view=rev
Log:
[RS6000] PR72802 part 1, fix constraints for lxssp/stxssp

We can't use "o" constraint for lsxxp/stxssp since those insns have a
DS-form offset field, ie. the bottom two bits of the offset must be 0.
So use "wY" instead, but that leads to finding another problem.

mem_operand_gpr is only suitable for gpr loads/stores since it does
not enforce multiple-of-4 offsets when -m32.  So "wY" can't use
mem_operand_gpr, and the vsx tests in mem_operand_gpr are bogus.

I've deleted offsettable_mem_14bit_operand because it wasn't used
anywhere but in the wY constraint.  Note also that the new wY
constraint doesn't use memory_operand because that is redundant in a
constraint, having already been tested in the predicate.

        PR target/72802
        * config/rs6000/rs6000.c (mem_operand_gpr): Remove vsx dform test.
        (mem_operand_ds_form): New predicate.
        * config/rs6000/rs6000-protos.h (mem_operand_ds_form): Declare.
        * config/rs6000/constraints.md (wY): Use mem_operand_df_form.
        * config/rs6000/predicates.md (offsettable_mem_14bit_operand): Delete.
        * config/rs6000/rs6000.md (f32_lm2, f32_sm2): Use wY for SF.
        (extendsfdf2_fpr): Replace o constraint with wY.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/rs6000/constraints.md
    trunk/gcc/config/rs6000/predicates.md
    trunk/gcc/config/rs6000/rs6000-protos.h
    trunk/gcc/config/rs6000/rs6000.c
    trunk/gcc/config/rs6000/rs6000.md

Reply via email to