From: yroux Date: Thu, 12 Jun 2014 10:54:12 +0000 (+0000) Subject: 2014-05-23 Yvan Roux X-Git-Tag: upstream/4.9.2.0~230 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=494e620eed72ca7f24d7b7e6c11011f6fba0cd46;p=platform%2Fupstream%2Fgcc49.git 2014-05-23 Yvan Roux Backport from trunk r209615. 2014-04-22 Ramana Radhakrishnan * config/arm/arm.c (arm_hard_regno_mode_ok): Loosen restrictions on core registers for DImode values in Thumb2. git-svn-id: svn://gcc.gnu.org/svn/gcc/branches/linaro/gcc-4_9-branch@211508 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog.linaro b/gcc/ChangeLog.linaro index e1bfe1e..28940aa 100644 --- a/gcc/ChangeLog.linaro +++ b/gcc/ChangeLog.linaro @@ -1,5 +1,13 @@ 2014-05-23 Yvan Roux + Backport from trunk r209615. + 2014-04-22 Ramana Radhakrishnan + + * config/arm/arm.c (arm_hard_regno_mode_ok): Loosen + restrictions on core registers for DImode values in Thumb2. + +2014-05-23 Yvan Roux + Backport from trunk r209613, r209614. 2014-04-22 Ian Bolton diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index dbc9681..fd5e225 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -22646,12 +22646,19 @@ arm_hard_regno_mode_ok (unsigned int regno, enum machine_mode mode) } /* We allow almost any value to be stored in the general registers. - Restrict doubleword quantities to even register pairs so that we can - use ldrd. Do not allow very large Neon structure opaque modes in - general registers; they would use too many. */ + Restrict doubleword quantities to even register pairs in ARM state + so that we can use ldrd. Do not allow very large Neon structure + opaque modes in general registers; they would use too many. */ if (regno <= LAST_ARM_REGNUM) - return !(TARGET_LDRD && GET_MODE_SIZE (mode) > 4 && (regno & 1) != 0) - && ARM_NUM_REGS (mode) <= 4; + { + if (ARM_NUM_REGS (mode) > 4) + return FALSE; + + if (TARGET_THUMB2) + return TRUE; + + return !(TARGET_LDRD && GET_MODE_SIZE (mode) > 4 && (regno & 1) != 0); + } if (regno == FRAME_POINTER_REGNUM || regno == ARG_POINTER_REGNUM)