From ff1c72999d6e4d7393324a5e726d596c6f71a36d Mon Sep 17 00:00:00 2001 From: ktkachov Date: Wed, 1 Jun 2016 10:44:07 +0000 Subject: [PATCH] [ARM] Use proper output modifier for DImode register in store exclusive patterns * config/arm/sync.md (arm_store_exclusive): Use 'H' output modifier on operands[2] rather than creating a new entry in out-of-bounds memory of the operands array. (arm_store_release_exclusivedi): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236984 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/config/arm/sync.md | 15 ++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b9baf4c9c0a..0bb7f286c8e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2016-06-01 Kyrylo Tkachov + * config/arm/sync.md (arm_store_exclusive): + Use 'H' output modifier on operands[2] rather than creating a new + entry in out-of-bounds memory of the operands array. + (arm_store_release_exclusivedi): Likewise. + +2016-06-01 Kyrylo Tkachov + * config/arm/arm.c (arm_fusion_enabled_p): New function. * config/arm/arm-protos.h (arm_fusion_enabled_p): Declare prototype. * config/arm/crypto.md (crypto_, CRYPTO_UNARY): diff --git a/gcc/config/arm/sync.md b/gcc/config/arm/sync.md index 0589e4d8905..abcfbcb1eac 100644 --- a/gcc/config/arm/sync.md +++ b/gcc/config/arm/sync.md @@ -452,14 +452,13 @@ { if (mode == DImode) { - rtx value = operands[2]; /* The restrictions on target registers in ARM mode are that the two registers are consecutive and the first one is even; Thumb is actually more flexible, but DI should give us this anyway. - Note that the 1st register always gets the lowest word in memory. */ - gcc_assert ((REGNO (value) & 1) == 0 || TARGET_THUMB2); - operands[3] = gen_rtx_REG (SImode, REGNO (value) + 1); - return "strexd%?\t%0, %2, %3, %C1"; + Note that the 1st register always gets the + lowest word in memory. */ + gcc_assert ((REGNO (operands[2]) & 1) == 0 || TARGET_THUMB2); + return "strexd%?\t%0, %2, %H2, %C1"; } return "strex%?\t%0, %2, %C1"; } @@ -475,11 +474,9 @@ VUNSPEC_SLX))] "TARGET_HAVE_LDACQ && ARM_DOUBLEWORD_ALIGN" { - rtx value = operands[2]; /* See comment in arm_store_exclusive above. */ - gcc_assert ((REGNO (value) & 1) == 0 || TARGET_THUMB2); - operands[3] = gen_rtx_REG (SImode, REGNO (value) + 1); - return "stlexd%?\t%0, %2, %3, %C1"; + gcc_assert ((REGNO (operands[2]) & 1) == 0 || TARGET_THUMB2); + return "stlexd%?\t%0, %2, %H2, %C1"; } [(set_attr "predicable" "yes") (set_attr "predicable_short_it" "no")]) -- 2.11.4.GIT