public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r8-10517] arm: Extend the PR94780 fix to arm
@ 2020-09-18  8:58 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2020-09-18  8:58 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:bbb72c2ccc271541e0d1feb25d2256d47041df59

commit r8-10517-gbbb72c2ccc271541e0d1feb25d2256d47041df59
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Wed Apr 29 11:51:38 2020 +0100

    arm: Extend the PR94780 fix to arm
    
    Essentially the same fix as for x86.
    
    2020-04-29  Richard Sandiford  <richard.sandiford@arm.com>
    
    gcc/
            * config/arm/arm-builtins.c (arm_atomic_assign_expand_fenv): Use
            TARGET_EXPR instead of MODIFY_EXPR for the first assignments to
            fenv_var and new_fenv_var.
    
    (cherry picked from commit 1d7ead9cba91533291e0048d22b711ca124e19de)

Diff:
---
 gcc/ChangeLog                 | 6 ++++++
 gcc/config/arm/arm-builtins.c | 9 +++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8a21aac9b0e..9d11b8a47e6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2020-04-29  Richard Sandiford  <richard.sandiford@arm.com>
+
+	* config/arm/arm-builtins.c (arm_atomic_assign_expand_fenv): Use
+	TARGET_EXPR instead of MODIFY_EXPR for the first assignments to
+	fenv_var and new_fenv_var.
+
 2020-09-17  Segher Boessenkool  <segher@kernel.crashing.org>
 
 	Backported from master:
diff --git a/gcc/config/arm/arm-builtins.c b/gcc/config/arm/arm-builtins.c
index 183a7b907f6..48500bca825 100644
--- a/gcc/config/arm/arm-builtins.c
+++ b/gcc/config/arm/arm-builtins.c
@@ -3260,8 +3260,9 @@ arm_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update)
   mask = build_int_cst (unsigned_type_node,
 			~((ARM_FE_ALL_EXCEPT << ARM_FE_EXCEPT_SHIFT)
 			  | ARM_FE_ALL_EXCEPT));
-  ld_fenv = build2 (MODIFY_EXPR, unsigned_type_node,
-		    fenv_var, build_call_expr (get_fpscr, 0));
+  ld_fenv = build4 (TARGET_EXPR, unsigned_type_node,
+		    fenv_var, build_call_expr (get_fpscr, 0),
+		    NULL_TREE, NULL_TREE);
   masked_fenv = build2 (BIT_AND_EXPR, unsigned_type_node, fenv_var, mask);
   hold_fnclex = build_call_expr (set_fpscr, 1, masked_fenv);
   *hold = build2 (COMPOUND_EXPR, void_type_node,
@@ -3282,8 +3283,8 @@ arm_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update)
        __atomic_feraiseexcept (new_fenv_var);  */
 
   new_fenv_var = create_tmp_var_raw (unsigned_type_node);
-  reload_fenv = build2 (MODIFY_EXPR, unsigned_type_node, new_fenv_var,
-			build_call_expr (get_fpscr, 0));
+  reload_fenv = build4 (TARGET_EXPR, unsigned_type_node, new_fenv_var,
+			build_call_expr (get_fpscr, 0), NULL_TREE, NULL_TREE);
   restore_fnenv = build_call_expr (set_fpscr, 1, fenv_var);
   atomic_feraiseexcept = builtin_decl_implicit (BUILT_IN_ATOMIC_FERAISEEXCEPT);
   update_call = build_call_expr (atomic_feraiseexcept, 1,


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-18  8:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-18  8:58 [gcc r8-10517] arm: Extend the PR94780 fix to arm Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).