* [PATCH] arm: Extend the PR94780 fix to arm
@ 2020-04-29 10:30 Richard Sandiford
2020-04-29 10:33 ` Ramana Radhakrishnan
0 siblings, 1 reply; 2+ messages in thread
From: Richard Sandiford @ 2020-04-29 10:30 UTC (permalink / raw)
To: gcc-patches; +Cc: nickc, richard.earnshaw, ramana.radhakrishnan, kyrylo.tkachov
Essentially the same fix as for x86.
Tested on arm-linux-gnueabihf and armeb-eabi. Bordering on the obvious
I guess, but OK to install?
Richard
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.
---
gcc/config/arm/arm-builtins.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
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,
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] arm: Extend the PR94780 fix to arm
2020-04-29 10:30 [PATCH] arm: Extend the PR94780 fix to arm Richard Sandiford
@ 2020-04-29 10:33 ` Ramana Radhakrishnan
0 siblings, 0 replies; 2+ messages in thread
From: Ramana Radhakrishnan @ 2020-04-29 10:33 UTC (permalink / raw)
To: gcc-patches, Nick Clifton, Richard Earnshaw,
Ramana Radhakrishnan, Kyrylo Tkachov, Richard Sandiford
On Wed, Apr 29, 2020 at 11:30 AM Richard Sandiford
<richard.sandiford@arm.com> wrote:
>
> Essentially the same fix as for x86.
>
> Tested on arm-linux-gnueabihf and armeb-eabi. Bordering on the obvious
> I guess, but OK to install?
>
> Richard
>
Ok.
Ramana
>
> 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.
> ---
> gcc/config/arm/arm-builtins.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> 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,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-29 10:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29 10:30 [PATCH] arm: Extend the PR94780 fix to arm Richard Sandiford
2020-04-29 10:33 ` Ramana Radhakrishnan
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).