[SH] Fix PR 58314 - Rework *movqi / *movhi patterns
Oleg Endo
oleg.endo@t-online.de
Fri Dec 6 19:39:00 GMT 2013
On Tue, 2013-11-26 at 12:18 +0100, Oleg Endo wrote:
> Hello,
>
> The attached patch is the same as posted in the PR as attachment 31283.
> In addition to the testing done by Kaz and Christian, I've also tested
> it with
> make -k check RUNTESTFLAGS="--target_board=sh-sim
> \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}"
>
> on rev 205313 with no new failures.
> OK for trunk?
>
> The additional test case from PR 58314 will follow.
> I'll also post a version of the patch for 4.8 after testing.
I've just committed the attached patch to the 4.8 branch as rev 205759.
Tested with
make -k check RUNTESTFLAGS="--target_board=sh-sim
\{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}"
Cheers,
Oleg
gcc/ChangeLog:
Backport from mainline
2013-11-26 Oleg Endo <olegendo@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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4_8_sh_pr50751_12_pr58314.patch
Type: text/x-patch
Size: 11223 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20131206/e90f1e17/attachment.bin>
More information about the Gcc-patches
mailing list