From: Richard Sandiford Date: Wed, 29 Apr 2020 10:51:38 +0000 (+0100) Subject: arm: Extend the PR94780 fix to arm X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1d7ead9cba91533291e0048d22b711ca124e19de;p=gcc.git arm: Extend the PR94780 fix to arm Essentially the same fix as for x86. 2020-04-29 Richard Sandiford 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. --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7a04f1f4191..2de5b3c81b4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2020-04-29 Richard Sandiford + + * 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-04-29 Richard Sandiford * doc/sourcebuild.texi (arm_arch_v8a_hard_ok): Document new diff --git a/gcc/config/arm/arm-builtins.c b/gcc/config/arm/arm-builtins.c index aee3fd6e2ff..f64742e6447 100644 --- a/gcc/config/arm/arm-builtins.c +++ b/gcc/config/arm/arm-builtins.c @@ -4167,8 +4167,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, @@ -4189,8 +4190,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,