[RS6000] PR72802 part 1, fix constraints for lxssp/stxssp
authorAlan Modra <amodra@gmail.com>
Mon, 8 Aug 2016 09:05:16 +0000 (18:35 +0930)
committerAlan Modra <amodra@gcc.gnu.org>
Mon, 8 Aug 2016 09:05:16 +0000 (18:35 +0930)
commitad69178ca9b691e39308062bc46a801806ea1030
treeaa3164c0f78340a45e3a0f25a83af3f0043aabdb
parent8e9218f2b39c5730760a23595f449498f3f4faf6
[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.

From-SVN: r239233
gcc/ChangeLog
gcc/config/rs6000/constraints.md
gcc/config/rs6000/predicates.md
gcc/config/rs6000/rs6000-protos.h
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.md