http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58314
--- Comment #19 from Oleg Endo <olegendo at gcc dot gnu.org> --- Author: olegendo Date: Fri Dec 6 19:34:23 2013 New Revision: 205759 URL: http://gcc.gnu.org/viewcvs?rev=205759&root=gcc&view=rev Log: Backport from mainline 2013-11-26 Oleg Endo <olege...@gcc.gnu.org> PR target/58314 PR target/50751 * config/sh/sh.c (max_mov_insn_displacement, disp_addr_displacement): Prefix function names with 'sh_'. Make them non-static. * config/sh/sh-protos.h (sh_disp_addr_displacement, sh_max_mov_insn_displacement): Add declarations. * config/sh/constraints.md (Q): Reject QImode. (Sdd): Use match_code "mem". (Snd): Fix erroneous matching of non-memory operands. * config/sh/predicates.md (short_displacement_mem_operand): New predicate. (general_movsrc_operand): Disallow PC relative QImode loads. * config/sh/sh.md (*mov<mode>_reg_reg): Remove it. (*movqi, *movhi): Merge both insns into... (*mov<mode>): ... this new insn. Replace generic 'm' constraints with 'Snd' and 'Sdd' constraints. Calculate insn length dynamically based on the operand types. Modified: branches/gcc-4_8-branch/gcc/ChangeLog branches/gcc-4_8-branch/gcc/config/sh/constraints.md branches/gcc-4_8-branch/gcc/config/sh/predicates.md branches/gcc-4_8-branch/gcc/config/sh/sh-protos.h branches/gcc-4_8-branch/gcc/config/sh/sh.c branches/gcc-4_8-branch/gcc/config/sh/sh.md