public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/redhat/heads/gcc-8-branch)] riscv: Fix up riscv_atomic_assign_expand_fenv [PR94950]
@ 2020-09-17 17:23 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2020-09-17 17:23 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:877032ab61c7c2cd54e6006beb97d96bf016abbb
commit 877032ab61c7c2cd54e6006beb97d96bf016abbb
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed May 6 09:40:33 2020 +0200
riscv: Fix up riscv_atomic_assign_expand_fenv [PR94950]
Similarly to the fixes on many other targets, riscv needs to use TARGET_EXPR
to avoid having the create_tmp_var_raw temporaries without proper DECL_CONTEXT
and not mentioned in local decls.
2020-05-06 Jakub Jelinek <jakub@redhat.com>
PR target/94950
* config/riscv/riscv-builtins.c (riscv_atomic_assign_expand_fenv): Use
TARGET_EXPR instead of MODIFY_EXPR for first assignment to old_flags.
(cherry picked from commit 5454a13add37fa6a8eedbf9d2f6bdc63a7825e2c)
Diff:
---
gcc/config/riscv/riscv-builtins.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/config/riscv/riscv-builtins.c b/gcc/config/riscv/riscv-builtins.c
index b1d89fc8719..7607ebad6b9 100644
--- a/gcc/config/riscv/riscv-builtins.c
+++ b/gcc/config/riscv/riscv-builtins.c
@@ -283,8 +283,8 @@ riscv_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update)
tree fsflags = GET_BUILTIN_DECL (CODE_FOR_riscv_fsflags);
tree old_flags = create_tmp_var_raw (RISCV_ATYPE_USI);
- *hold = build2 (MODIFY_EXPR, RISCV_ATYPE_USI, old_flags,
- build_call_expr (frflags, 0));
+ *hold = build4 (TARGET_EXPR, RISCV_ATYPE_USI, old_flags,
+ build_call_expr (frflags, 0), NULL_TREE, NULL_TREE);
*clear = build_call_expr (fsflags, 1, old_flags);
*update = NULL_TREE;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-17 17:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-17 17:23 [gcc(refs/vendors/redhat/heads/gcc-8-branch)] riscv: Fix up riscv_atomic_assign_expand_fenv [PR94950] 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).