From: law Date: Tue, 23 Oct 2018 22:51:25 +0000 (+0000) Subject: * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b8e0f11a71bbf605545f68062376e14ab458af8b;p=thirdparty%2Fgcc.git * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation for H8/S. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@265444 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f0820c086afa..5fe8205a94cc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-10-12 Jeff Law + + * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation + for H8/S. + 2018-10-23 Richard Biener * tree-vrp.c (add_assert_info): Guard dump_printf with diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c index 596f2fd2cda6..24b7485602f7 100644 --- a/gcc/config/h8300/h8300.c +++ b/gcc/config/h8300/h8300.c @@ -865,15 +865,15 @@ h8300_expand_prologue (void) if (TARGET_H8300S) { /* See how many registers we can push at the same time. */ - if ((!TARGET_H8300SX || (regno & 3) == 0) + if ((TARGET_H8300SX || (regno & 3) == 0) && ((saved_regs >> regno) & 0x0f) == 0x0f) n_regs = 4; - else if ((!TARGET_H8300SX || (regno & 3) == 0) + else if ((TARGET_H8300SX || (regno & 3) == 0) && ((saved_regs >> regno) & 0x07) == 0x07) n_regs = 3; - else if ((!TARGET_H8300SX || (regno & 1) == 0) + else if ((TARGET_H8300SX || (regno & 1) == 0) && ((saved_regs >> regno) & 0x03) == 0x03) n_regs = 2; }