re PR target/50751 (SH Target: Displacement addressing does not work for QImode and...
authorOleg Endo <olegendo@gcc.gnu.org>
Mon, 19 Mar 2012 18:59:16 +0000 (18:59 +0000)
committerOleg Endo <olegendo@gcc.gnu.org>
Mon, 19 Mar 2012 18:59:16 +0000 (18:59 +0000)
commit344332e87bda8e91370598dced1b9f3a0f12d35f
tree9e2d1ac348fb139421d0ed1bae0011e40bcfdd63
parent26b808448f313cd214311c371a9ea204c58ba66b
re PR target/50751 (SH Target: Displacement addressing does not work for QImode and HImode)

PR target/50751
* config/sh/sh.h (CONST_OK_FOR_K04, CONST_OK_FOR_K12, DISP_ADDR_P,
DISP_ADDR_OFFSET): New macros.
* config/sh/sh.c (sh_address_cost): Add SH2A special case.
(sh_legitimate_index_p): Allow QImode displacements for non-SH2A.
(sh_legitimize_address): Add QImode displacement handling.
(sh_cannot_change_mode_class): Disallow GENERAL_REGS for SFmode
vector subregs.
(sh_secondary_reload): Add QImode displacement handling.
* config/sh/predicates.md (movsrc_no_disp_mem_operand): New predicate.
* config/sh/constraints.md (K04, Snd, Sdd): New constraints.
* config/sh/sh.md (extendqisi2): Remove constraints from expander.
(*extendqisi2_compact): Rename to *extendqisi2_compact_reg, restrict
to register operands only.
(*extendqisi2_compact_mem_disp, *extendqisi2_compact_snd): New insns.
(extendqihi2): Change insn to expander.
(*extendqihi2_compact_reg): New insn.
(movqi_i, movqi): Replace with ...
(movqi, *movqi_reg_reg, *movqi_store_mem_disp12,
*movqi_load_mem_disp, *movqi_load_mem_disp): ... these.
Add new peepholes for QImode displacement addressing.

From-SVN: r185534
gcc/ChangeLog
gcc/config/sh/constraints.md
gcc/config/sh/predicates.md
gcc/config/sh/sh.c
gcc/config/sh/sh.h
gcc/config/sh/sh.md