From: Uros Bizjak Date: Thu, 7 May 2020 06:44:38 +0000 (+0200) Subject: alpha: Implement the PR94780 fix for alpha. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6760cb478451203ca1213d157b93253f1d5013e4;p=gcc.git alpha: Implement the PR94780 fix for alpha. Essentially the same fix as for x86. 2020-05-07 Uroš Bizjak gcc/ * config/alpha/alpha.c (alpha_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 1afb7824fa5..e11bbcedb65 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2020-05-07 UroÅ¡ Bizjak + + * config/alpha/alpha.c (alpha_atomic_assign_expand_fenv): Use + TARGET_EXPR instead of MODIFY_EXPR for the first assignments to + fenv_var and new_fenv_var. + 2020-05-06 Jakub Jelinek PR target/93069 diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 7e5d1cbb0c4..49b5a24d4b0 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -9775,8 +9775,8 @@ alpha_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update) = build_fn_decl ("__ieee_set_fp_control", build_function_type_list (void_type_node, NULL)); mask = build_int_cst (long_unsigned_type_node, ~SWCR_STATUS_MASK); - ld_fenv = build2 (MODIFY_EXPR, long_unsigned_type_node, - fenv_var, build_call_expr (get_fpscr, 0)); + ld_fenv = build4 (TARGET_EXPR, long_unsigned_type_node, fenv_var, + build_call_expr (get_fpscr, 0), NULL_TREE, NULL_TREE); masked_fenv = build2 (BIT_AND_EXPR, long_unsigned_type_node, fenv_var, mask); hold_fnclex = build_call_expr (set_fpscr, 1, masked_fenv); *hold = build2 (COMPOUND_EXPR, void_type_node, @@ -9797,8 +9797,8 @@ alpha_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update) __atomic_feraiseexcept (new_fenv_var); */ new_fenv_var = create_tmp_var_raw (long_unsigned_type_node); - reload_fenv = build2 (MODIFY_EXPR, long_unsigned_type_node, new_fenv_var, - build_call_expr (get_fpscr, 0)); + reload_fenv = build4 (TARGET_EXPR, long_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