* PING: [PATCH] mips: Fix up mips_atomic_assign_expand_fenv [PR94780]
2021-06-23 3:11 [PATCH] mips: Fix up mips_atomic_assign_expand_fenv [PR94780] Xi Ruoyao
@ 2021-06-28 13:50 ` Xi Ruoyao
2021-07-09 6:51 ` PING^2: " Xi Ruoyao
2021-07-16 5:53 ` PING^3: " Xi Ruoyao
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: Xi Ruoyao @ 2021-06-28 13:50 UTC (permalink / raw)
To: gcc-patches
Cc: Jakub Jelinek, Matthew Fortune, richard.sandiford, Jeff Law, xry111
Ping. CC several maintainers who may help to review MIPS patches.
Sorry if it sounds buzzing.
On Wed, 2021-06-23 at 11:11 +0800, Xi Ruoyao wrote:
> Commit message shamelessly copied from 1777beb6b129 by jakub:
>
> This function, because it is sometimes called even outside of function
> bodies, uses create_tmp_var_raw rather than create_tmp_var. But in
> order
> for that to work, when first referenced, the VAR_DECLs need to appear
> in a
> TARGET_EXPR so that during gimplification the var gets the right
> DECL_CONTEXT and is added to local decls.
>
> Bootstrapped & regtested on mips64el-linux-gnu. Ok for trunk and
> backport
> to 11, 10, and 9?
>
> gcc/
>
> * config/mips/mips.c (mips_atomic_assign_expand_fenv): Use
> TARGET_EXPR instead of MODIFY_EXPR.
> ---
> gcc/config/mips/mips.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
> index 8f043399a8e..89d1be6cea6 100644
> --- a/gcc/config/mips/mips.c
> +++ b/gcc/config/mips/mips.c
> @@ -22439,12 +22439,12 @@ mips_atomic_assign_expand_fenv (tree *hold,
> tree *clear, tree *update)
> tree get_fcsr = mips_builtin_decls[MIPS_GET_FCSR];
> tree set_fcsr = mips_builtin_decls[MIPS_SET_FCSR];
> tree get_fcsr_hold_call = build_call_expr (get_fcsr, 0);
> - tree hold_assign_orig = build2 (MODIFY_EXPR, MIPS_ATYPE_USI,
> - fcsr_orig_var, get_fcsr_hold_call);
> + tree hold_assign_orig = build4 (TARGET_EXPR, MIPS_ATYPE_USI,
> + fcsr_orig_var, get_fcsr_hold_call,
> NULL, NULL);
> tree hold_mod_val = build2 (BIT_AND_EXPR, MIPS_ATYPE_USI,
> fcsr_orig_var,
> build_int_cst (MIPS_ATYPE_USI,
> 0xfffff003));
> - tree hold_assign_mod = build2 (MODIFY_EXPR, MIPS_ATYPE_USI,
> - fcsr_mod_var, hold_mod_val);
> + tree hold_assign_mod = build4 (TARGET_EXPR, MIPS_ATYPE_USI,
> + fcsr_mod_var, hold_mod_val, NULL,
> NULL);
> tree set_fcsr_hold_call = build_call_expr (set_fcsr, 1,
> fcsr_mod_var);
> tree hold_all = build2 (COMPOUND_EXPR, MIPS_ATYPE_USI,
> hold_assign_orig, hold_assign_mod);
> @@ -22454,8 +22454,8 @@ mips_atomic_assign_expand_fenv (tree *hold,
> tree *clear, tree *update)
> *clear = build_call_expr (set_fcsr, 1, fcsr_mod_var);
>
> tree get_fcsr_update_call = build_call_expr (get_fcsr, 0);
> - *update = build2 (MODIFY_EXPR, MIPS_ATYPE_USI,
> - exceptions_var, get_fcsr_update_call);
> + *update = build4 (TARGET_EXPR, MIPS_ATYPE_USI,
> + exceptions_var, get_fcsr_update_call, NULL, NULL);
> tree set_fcsr_update_call = build_call_expr (set_fcsr, 1,
> fcsr_orig_var);
> *update = build2 (COMPOUND_EXPR, void_type_node, *update,
> set_fcsr_update_call);
--
Xi Ruoyao <xry111@mengyan1223.wang>
^ permalink raw reply [flat|nested] 10+ messages in thread
* PING^2: [PATCH] mips: Fix up mips_atomic_assign_expand_fenv [PR94780]
2021-06-28 13:50 ` PING: " Xi Ruoyao
@ 2021-07-09 6:51 ` Xi Ruoyao
0 siblings, 0 replies; 10+ messages in thread
From: Xi Ruoyao @ 2021-07-09 6:51 UTC (permalink / raw)
To: gcc-patches
Cc: Jakub Jelinek, Matthew Fortune, richard.sandiford, Jeff Law, xry111
Ping again.
On Mon, 2021-06-28 at 21:50 +0800, Xi Ruoyao wrote:
> Ping. CC several maintainers who may help to review MIPS patches.
> Sorry if it sounds buzzing.
>
> On Wed, 2021-06-23 at 11:11 +0800, Xi Ruoyao wrote:
> > Commit message shamelessly copied from 1777beb6b129 by jakub:
> >
> > This function, because it is sometimes called even outside of
> > function
> > bodies, uses create_tmp_var_raw rather than create_tmp_var. But in
> > order
> > for that to work, when first referenced, the VAR_DECLs need to
> > appear
> > in a
> > TARGET_EXPR so that during gimplification the var gets the right
> > DECL_CONTEXT and is added to local decls.
> >
> > Bootstrapped & regtested on mips64el-linux-gnu. Ok for trunk and
> > backport
> > to 11, 10, and 9?
> >
> > gcc/
> >
> > * config/mips/mips.c (mips_atomic_assign_expand_fenv): Use
> > TARGET_EXPR instead of MODIFY_EXPR.
> > ---
> > gcc/config/mips/mips.c | 12 ++++++------
> > 1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
> > index 8f043399a8e..89d1be6cea6 100644
> > --- a/gcc/config/mips/mips.c
> > +++ b/gcc/config/mips/mips.c
> > @@ -22439,12 +22439,12 @@ mips_atomic_assign_expand_fenv (tree
> > *hold,
> > tree *clear, tree *update)
> > tree get_fcsr = mips_builtin_decls[MIPS_GET_FCSR];
> > tree set_fcsr = mips_builtin_decls[MIPS_SET_FCSR];
> > tree get_fcsr_hold_call = build_call_expr (get_fcsr, 0);
> > - tree hold_assign_orig = build2 (MODIFY_EXPR, MIPS_ATYPE_USI,
> > - fcsr_orig_var,
> > get_fcsr_hold_call);
> > + tree hold_assign_orig = build4 (TARGET_EXPR, MIPS_ATYPE_USI,
> > + fcsr_orig_var, get_fcsr_hold_call,
> > NULL, NULL);
> > tree hold_mod_val = build2 (BIT_AND_EXPR, MIPS_ATYPE_USI,
> > fcsr_orig_var,
> > build_int_cst (MIPS_ATYPE_USI,
> > 0xfffff003));
> > - tree hold_assign_mod = build2 (MODIFY_EXPR, MIPS_ATYPE_USI,
> > - fcsr_mod_var, hold_mod_val);
> > + tree hold_assign_mod = build4 (TARGET_EXPR, MIPS_ATYPE_USI,
> > + fcsr_mod_var, hold_mod_val, NULL,
> > NULL);
> > tree set_fcsr_hold_call = build_call_expr (set_fcsr, 1,
> > fcsr_mod_var);
> > tree hold_all = build2 (COMPOUND_EXPR, MIPS_ATYPE_USI,
> > hold_assign_orig, hold_assign_mod);
> > @@ -22454,8 +22454,8 @@ mips_atomic_assign_expand_fenv (tree *hold,
> > tree *clear, tree *update)
> > *clear = build_call_expr (set_fcsr, 1, fcsr_mod_var);
> >
> > tree get_fcsr_update_call = build_call_expr (get_fcsr, 0);
> > - *update = build2 (MODIFY_EXPR, MIPS_ATYPE_USI,
> > - exceptions_var, get_fcsr_update_call);
> > + *update = build4 (TARGET_EXPR, MIPS_ATYPE_USI,
> > + exceptions_var, get_fcsr_update_call, NULL,
> > NULL);
> > tree set_fcsr_update_call = build_call_expr (set_fcsr, 1,
> > fcsr_orig_var);
> > *update = build2 (COMPOUND_EXPR, void_type_node, *update,
> > set_fcsr_update_call);
>
--
Xi Ruoyao <xry111@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University
^ permalink raw reply [flat|nested] 10+ messages in thread
* PING^3: [PATCH] mips: Fix up mips_atomic_assign_expand_fenv [PR94780]
2021-06-23 3:11 [PATCH] mips: Fix up mips_atomic_assign_expand_fenv [PR94780] Xi Ruoyao
2021-06-28 13:50 ` PING: " Xi Ruoyao
@ 2021-07-16 5:53 ` Xi Ruoyao
2021-07-23 12:47 ` PING^4: " Xi Ruoyao
2021-07-30 4:56 ` PING^5: " Xi Ruoyao
3 siblings, 0 replies; 10+ messages in thread
From: Xi Ruoyao @ 2021-07-16 5:53 UTC (permalink / raw)
To: gcc-patches
Cc: Jakub Jelinek, Matthew Fortune, richard.sandiford, Jeff Law,
Maciej W. Rozycki, xry111
Ping again.
On Wed, 2021-06-23 at 11:11 +0800, Xi Ruoyao wrote:
> Commit message shamelessly copied from 1777beb6b129 by jakub:
>
> This function, because it is sometimes called even outside of function
> bodies, uses create_tmp_var_raw rather than create_tmp_var. But in
> order
> for that to work, when first referenced, the VAR_DECLs need to appear
> in a
> TARGET_EXPR so that during gimplification the var gets the right
> DECL_CONTEXT and is added to local decls.
>
> Bootstrapped & regtested on mips64el-linux-gnu. Ok for trunk and
> backport
> to 11, 10, and 9?
>
> gcc/
>
> * config/mips/mips.c (mips_atomic_assign_expand_fenv): Use
> TARGET_EXPR instead of MODIFY_EXPR.
> ---
> gcc/config/mips/mips.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
> index 8f043399a8e..89d1be6cea6 100644
> --- a/gcc/config/mips/mips.c
> +++ b/gcc/config/mips/mips.c
> @@ -22439,12 +22439,12 @@ mips_atomic_assign_expand_fenv (tree *hold,
> tree *clear, tree *update)
> tree get_fcsr = mips_builtin_decls[MIPS_GET_FCSR];
> tree set_fcsr = mips_builtin_decls[MIPS_SET_FCSR];
> tree get_fcsr_hold_call = build_call_expr (get_fcsr, 0);
> - tree hold_assign_orig = build2 (MODIFY_EXPR, MIPS_ATYPE_USI,
> - fcsr_orig_var, get_fcsr_hold_call);
> + tree hold_assign_orig = build4 (TARGET_EXPR, MIPS_ATYPE_USI,
> + fcsr_orig_var, get_fcsr_hold_call,
> NULL, NULL);
> tree hold_mod_val = build2 (BIT_AND_EXPR, MIPS_ATYPE_USI,
> fcsr_orig_var,
> build_int_cst (MIPS_ATYPE_USI,
> 0xfffff003));
> - tree hold_assign_mod = build2 (MODIFY_EXPR, MIPS_ATYPE_USI,
> - fcsr_mod_var, hold_mod_val);
> + tree hold_assign_mod = build4 (TARGET_EXPR, MIPS_ATYPE_USI,
> + fcsr_mod_var, hold_mod_val, NULL,
> NULL);
> tree set_fcsr_hold_call = build_call_expr (set_fcsr, 1,
> fcsr_mod_var);
> tree hold_all = build2 (COMPOUND_EXPR, MIPS_ATYPE_USI,
> hold_assign_orig, hold_assign_mod);
> @@ -22454,8 +22454,8 @@ mips_atomic_assign_expand_fenv (tree *hold,
> tree *clear, tree *update)
> *clear = build_call_expr (set_fcsr, 1, fcsr_mod_var);
>
> tree get_fcsr_update_call = build_call_expr (get_fcsr, 0);
> - *update = build2 (MODIFY_EXPR, MIPS_ATYPE_USI,
> - exceptions_var, get_fcsr_update_call);
> + *update = build4 (TARGET_EXPR, MIPS_ATYPE_USI,
> + exceptions_var, get_fcsr_update_call, NULL, NULL);
> tree set_fcsr_update_call = build_call_expr (set_fcsr, 1,
> fcsr_orig_var);
> *update = build2 (COMPOUND_EXPR, void_type_node, *update,
> set_fcsr_update_call);
--
Xi Ruoyao <xry111@mengyan1223.wang>
^ permalink raw reply [flat|nested] 10+ messages in thread
* PING^4: [PATCH] mips: Fix up mips_atomic_assign_expand_fenv [PR94780]
2021-06-23 3:11 [PATCH] mips: Fix up mips_atomic_assign_expand_fenv [PR94780] Xi Ruoyao
2021-06-28 13:50 ` PING: " Xi Ruoyao
2021-07-16 5:53 ` PING^3: " Xi Ruoyao
@ 2021-07-23 12:47 ` Xi Ruoyao
2021-07-30 4:56 ` PING^5: " Xi Ruoyao
3 siblings, 0 replies; 10+ messages in thread
From: Xi Ruoyao @ 2021-07-23 12:47 UTC (permalink / raw)
To: gcc-patches
Cc: Jakub Jelinek, Matthew Fortune, Maciej W. Rozycki,
Richard Sandiford, xry111
Ping again.
On Wed, 2021-06-23 at 11:11 +0800, Xi Ruoyao wrote:
> Commit message shamelessly copied from 1777beb6b129 by jakub:
>
> This function, because it is sometimes called even outside of function
> bodies, uses create_tmp_var_raw rather than create_tmp_var. But in order
> for that to work, when first referenced, the VAR_DECLs need to appear in a
> TARGET_EXPR so that during gimplification the var gets the right
> DECL_CONTEXT and is added to local decls.
>
> Bootstrapped & regtested on mips64el-linux-gnu. Ok for trunk and backport
> to 11, 10, and 9?
>
> gcc/
>
> * config/mips/mips.c (mips_atomic_assign_expand_fenv): Use
> TARGET_EXPR instead of MODIFY_EXPR.
> ---
> gcc/config/mips/mips.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
> index 8f043399a8e..89d1be6cea6 100644
> --- a/gcc/config/mips/mips.c
> +++ b/gcc/config/mips/mips.c
> @@ -22439,12 +22439,12 @@ mips_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update)
> tree get_fcsr = mips_builtin_decls[MIPS_GET_FCSR];
> tree set_fcsr = mips_builtin_decls[MIPS_SET_FCSR];
> tree get_fcsr_hold_call = build_call_expr (get_fcsr, 0);
> - tree hold_assign_orig = build2 (MODIFY_EXPR, MIPS_ATYPE_USI,
> - fcsr_orig_var, get_fcsr_hold_call);
> + tree hold_assign_orig = build4 (TARGET_EXPR, MIPS_ATYPE_USI,
> + fcsr_orig_var, get_fcsr_hold_call, NULL, NULL);
> tree hold_mod_val = build2 (BIT_AND_EXPR, MIPS_ATYPE_USI, fcsr_orig_var,
> build_int_cst (MIPS_ATYPE_USI, 0xfffff003));
> - tree hold_assign_mod = build2 (MODIFY_EXPR, MIPS_ATYPE_USI,
> - fcsr_mod_var, hold_mod_val);
> + tree hold_assign_mod = build4 (TARGET_EXPR, MIPS_ATYPE_USI,
> + fcsr_mod_var, hold_mod_val, NULL, NULL);
> tree set_fcsr_hold_call = build_call_expr (set_fcsr, 1, fcsr_mod_var);
> tree hold_all = build2 (COMPOUND_EXPR, MIPS_ATYPE_USI,
> hold_assign_orig, hold_assign_mod);
> @@ -22454,8 +22454,8 @@ mips_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update)
> *clear = build_call_expr (set_fcsr, 1, fcsr_mod_var);
>
> tree get_fcsr_update_call = build_call_expr (get_fcsr, 0);
> - *update = build2 (MODIFY_EXPR, MIPS_ATYPE_USI,
> - exceptions_var, get_fcsr_update_call);
> + *update = build4 (TARGET_EXPR, MIPS_ATYPE_USI,
> + exceptions_var, get_fcsr_update_call, NULL, NULL);
> tree set_fcsr_update_call = build_call_expr (set_fcsr, 1, fcsr_orig_var);
> *update = build2 (COMPOUND_EXPR, void_type_node, *update,
> set_fcsr_update_call);
--
Xi Ruoyao <xry111@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University
^ permalink raw reply [flat|nested] 10+ messages in thread
* PING^5: [PATCH] mips: Fix up mips_atomic_assign_expand_fenv [PR94780]
2021-06-23 3:11 [PATCH] mips: Fix up mips_atomic_assign_expand_fenv [PR94780] Xi Ruoyao
` (2 preceding siblings ...)
2021-07-23 12:47 ` PING^4: " Xi Ruoyao
@ 2021-07-30 4:56 ` Xi Ruoyao
2021-07-30 8:11 ` Richard Sandiford
3 siblings, 1 reply; 10+ messages in thread
From: Xi Ruoyao @ 2021-07-30 4:56 UTC (permalink / raw)
To: gcc-patches
Cc: Jakub Jelinek, Matthew Fortune, Maciej W. Rozycki,
Richard Sandiford, xry111
Ping again.
On Wed, 2021-06-23 at 11:11 +0800, Xi Ruoyao wrote:
> Commit message shamelessly copied from 1777beb6b129 by jakub:
>
> This function, because it is sometimes called even outside of function
> bodies, uses create_tmp_var_raw rather than create_tmp_var. But in
> order
> for that to work, when first referenced, the VAR_DECLs need to appear
> in a
> TARGET_EXPR so that during gimplification the var gets the right
> DECL_CONTEXT and is added to local decls.
>
> Bootstrapped & regtested on mips64el-linux-gnu. Ok for trunk and
> backport
> to 11, 10, and 9?
>
> gcc/
>
> * config/mips/mips.c (mips_atomic_assign_expand_fenv): Use
> TARGET_EXPR instead of MODIFY_EXPR.
> ---
> gcc/config/mips/mips.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
> index 8f043399a8e..89d1be6cea6 100644
> --- a/gcc/config/mips/mips.c
> +++ b/gcc/config/mips/mips.c
> @@ -22439,12 +22439,12 @@ mips_atomic_assign_expand_fenv (tree *hold,
> tree *clear, tree *update)
> tree get_fcsr = mips_builtin_decls[MIPS_GET_FCSR];
> tree set_fcsr = mips_builtin_decls[MIPS_SET_FCSR];
> tree get_fcsr_hold_call = build_call_expr (get_fcsr, 0);
> - tree hold_assign_orig = build2 (MODIFY_EXPR, MIPS_ATYPE_USI,
> - fcsr_orig_var, get_fcsr_hold_call);
> + tree hold_assign_orig = build4 (TARGET_EXPR, MIPS_ATYPE_USI,
> + fcsr_orig_var, get_fcsr_hold_call,
> NULL, NULL);
> tree hold_mod_val = build2 (BIT_AND_EXPR, MIPS_ATYPE_USI,
> fcsr_orig_var,
> build_int_cst (MIPS_ATYPE_USI,
> 0xfffff003));
> - tree hold_assign_mod = build2 (MODIFY_EXPR, MIPS_ATYPE_USI,
> - fcsr_mod_var, hold_mod_val);
> + tree hold_assign_mod = build4 (TARGET_EXPR, MIPS_ATYPE_USI,
> + fcsr_mod_var, hold_mod_val, NULL,
> NULL);
> tree set_fcsr_hold_call = build_call_expr (set_fcsr, 1,
> fcsr_mod_var);
> tree hold_all = build2 (COMPOUND_EXPR, MIPS_ATYPE_USI,
> hold_assign_orig, hold_assign_mod);
> @@ -22454,8 +22454,8 @@ mips_atomic_assign_expand_fenv (tree *hold,
> tree *clear, tree *update)
> *clear = build_call_expr (set_fcsr, 1, fcsr_mod_var);
>
> tree get_fcsr_update_call = build_call_expr (get_fcsr, 0);
> - *update = build2 (MODIFY_EXPR, MIPS_ATYPE_USI,
> - exceptions_var, get_fcsr_update_call);
> + *update = build4 (TARGET_EXPR, MIPS_ATYPE_USI,
> + exceptions_var, get_fcsr_update_call, NULL, NULL);
> tree set_fcsr_update_call = build_call_expr (set_fcsr, 1,
> fcsr_orig_var);
> *update = build2 (COMPOUND_EXPR, void_type_node, *update,
> set_fcsr_update_call);
--
Xi Ruoyao <xry111@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: PING^5: [PATCH] mips: Fix up mips_atomic_assign_expand_fenv [PR94780]
2021-07-30 4:56 ` PING^5: " Xi Ruoyao
@ 2021-07-30 8:11 ` Richard Sandiford
2021-07-30 8:23 ` Xi Ruoyao
0 siblings, 1 reply; 10+ messages in thread
From: Richard Sandiford @ 2021-07-30 8:11 UTC (permalink / raw)
To: Xi Ruoyao; +Cc: gcc-patches, Jakub Jelinek, Matthew Fortune, Maciej W. Rozycki
Xi Ruoyao <xry111@mengyan1223.wang> writes:
> Ping again.
>
> On Wed, 2021-06-23 at 11:11 +0800, Xi Ruoyao wrote:
>> Commit message shamelessly copied from 1777beb6b129 by jakub:
>>
>> This function, because it is sometimes called even outside of function
>> bodies, uses create_tmp_var_raw rather than create_tmp_var. But in
>> order
>> for that to work, when first referenced, the VAR_DECLs need to appear
>> in a
>> TARGET_EXPR so that during gimplification the var gets the right
>> DECL_CONTEXT and is added to local decls.
>>
>> Bootstrapped & regtested on mips64el-linux-gnu. Ok for trunk and
>> backport
>> to 11, 10, and 9?
OK for all, thanks.
Similar comments to the previous message about the appropriateness
of me reviewing the patch, but like you say, this is doing for MIPS
what we've already had to do for other targets.
Richard
>>
>> gcc/
>>
>> * config/mips/mips.c (mips_atomic_assign_expand_fenv): Use
>> TARGET_EXPR instead of MODIFY_EXPR.
>> ---
>> gcc/config/mips/mips.c | 12 ++++++------
>> 1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
>> index 8f043399a8e..89d1be6cea6 100644
>> --- a/gcc/config/mips/mips.c
>> +++ b/gcc/config/mips/mips.c
>> @@ -22439,12 +22439,12 @@ mips_atomic_assign_expand_fenv (tree *hold,
>> tree *clear, tree *update)
>> tree get_fcsr = mips_builtin_decls[MIPS_GET_FCSR];
>> tree set_fcsr = mips_builtin_decls[MIPS_SET_FCSR];
>> tree get_fcsr_hold_call = build_call_expr (get_fcsr, 0);
>> - tree hold_assign_orig = build2 (MODIFY_EXPR, MIPS_ATYPE_USI,
>> - fcsr_orig_var, get_fcsr_hold_call);
>> + tree hold_assign_orig = build4 (TARGET_EXPR, MIPS_ATYPE_USI,
>> + fcsr_orig_var, get_fcsr_hold_call,
>> NULL, NULL);
>> tree hold_mod_val = build2 (BIT_AND_EXPR, MIPS_ATYPE_USI,
>> fcsr_orig_var,
>> build_int_cst (MIPS_ATYPE_USI,
>> 0xfffff003));
>> - tree hold_assign_mod = build2 (MODIFY_EXPR, MIPS_ATYPE_USI,
>> - fcsr_mod_var, hold_mod_val);
>> + tree hold_assign_mod = build4 (TARGET_EXPR, MIPS_ATYPE_USI,
>> + fcsr_mod_var, hold_mod_val, NULL,
>> NULL);
>> tree set_fcsr_hold_call = build_call_expr (set_fcsr, 1,
>> fcsr_mod_var);
>> tree hold_all = build2 (COMPOUND_EXPR, MIPS_ATYPE_USI,
>> hold_assign_orig, hold_assign_mod);
>> @@ -22454,8 +22454,8 @@ mips_atomic_assign_expand_fenv (tree *hold,
>> tree *clear, tree *update)
>> *clear = build_call_expr (set_fcsr, 1, fcsr_mod_var);
>>
>> tree get_fcsr_update_call = build_call_expr (get_fcsr, 0);
>> - *update = build2 (MODIFY_EXPR, MIPS_ATYPE_USI,
>> - exceptions_var, get_fcsr_update_call);
>> + *update = build4 (TARGET_EXPR, MIPS_ATYPE_USI,
>> + exceptions_var, get_fcsr_update_call, NULL, NULL);
>> tree set_fcsr_update_call = build_call_expr (set_fcsr, 1,
>> fcsr_orig_var);
>> *update = build2 (COMPOUND_EXPR, void_type_node, *update,
>> set_fcsr_update_call);
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: PING^5: [PATCH] mips: Fix up mips_atomic_assign_expand_fenv [PR94780]
2021-07-30 8:11 ` Richard Sandiford
@ 2021-07-30 8:23 ` Xi Ruoyao
2021-07-30 18:08 ` committed: " Xi Ruoyao
0 siblings, 1 reply; 10+ messages in thread
From: Xi Ruoyao @ 2021-07-30 8:23 UTC (permalink / raw)
To: Richard Sandiford
Cc: gcc-patches, Jakub Jelinek, Matthew Fortune, Maciej W. Rozycki
On Fri, 2021-07-30 at 09:11 +0100, Richard Sandiford wrote:
> Xi Ruoyao <xry111@mengyan1223.wang> writes:
> > Ping again.
> >
> > On Wed, 2021-06-23 at 11:11 +0800, Xi Ruoyao wrote:
> > > Commit message shamelessly copied from 1777beb6b129 by jakub:
> > >
> > > This function, because it is sometimes called even outside of
> > > function
> > > bodies, uses create_tmp_var_raw rather than create_tmp_var. But
> > > in
> > > order
> > > for that to work, when first referenced, the VAR_DECLs need to
> > > appear
> > > in a
> > > TARGET_EXPR so that during gimplification the var gets the right
> > > DECL_CONTEXT and is added to local decls.
> > >
> > > Bootstrapped & regtested on mips64el-linux-gnu. Ok for trunk and
> > > backport
> > > to 11, 10, and 9?
>
> OK for all, thanks.
>
> Similar comments to the previous message about the appropriateness
> of me reviewing the patch, but like you say, this is doing for MIPS
> what we've already had to do for other targets.
Thanks for reviewing.
Will bootstrap and test it again, and commit if there is no regressions.
--
Xi Ruoyao <xry111@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University
^ permalink raw reply [flat|nested] 10+ messages in thread
* committed: [PATCH] mips: Fix up mips_atomic_assign_expand_fenv [PR94780]
2021-07-30 8:23 ` Xi Ruoyao
@ 2021-07-30 18:08 ` Xi Ruoyao
2021-07-31 10:27 ` Xi Ruoyao
0 siblings, 1 reply; 10+ messages in thread
From: Xi Ruoyao @ 2021-07-30 18:08 UTC (permalink / raw)
To: Richard Sandiford
Cc: Matthew Fortune, gcc-patches, Jakub Jelinek, Maciej W. Rozycki
On Fri, 2021-07-30 at 16:23 +0800, Xi Ruoyao via Gcc-patches wrote:
> On Fri, 2021-07-30 at 09:11 +0100, Richard Sandiford wrote:
> > Xi Ruoyao <xry111@mengyan1223.wang> writes:
> > > Ping again.
> > >
> > > On Wed, 2021-06-23 at 11:11 +0800, Xi Ruoyao wrote:
> > > > Commit message shamelessly copied from 1777beb6b129 by jakub:
> > > >
> > > > This function, because it is sometimes called even outside of
> > > > function
> > > > bodies, uses create_tmp_var_raw rather than create_tmp_var. But
> > > > in
> > > > order
> > > > for that to work, when first referenced, the VAR_DECLs need to
> > > > appear
> > > > in a
> > > > TARGET_EXPR so that during gimplification the var gets the right
> > > > DECL_CONTEXT and is added to local decls.
> > > >
> > > > Bootstrapped & regtested on mips64el-linux-gnu. Ok for trunk
> > > > and
> > > > backport
> > > > to 11, 10, and 9?
> >
> > OK for all, thanks.
> >
> > Similar comments to the previous message about the appropriateness
> > of me reviewing the patch, but like you say, this is doing for MIPS
> > what we've already had to do for other targets.
>
> Thanks for reviewing.
>
> Will bootstrap and test it again, and commit if there is no
> regressions.
Committed to master at 20656544 and releases/gcc-11 at 7db1795a.
Will do it for gcc-10 and gcc-9 tomorrow.
^ permalink raw reply [flat|nested] 10+ messages in thread
* committed: [PATCH] mips: Fix up mips_atomic_assign_expand_fenv [PR94780]
2021-07-30 18:08 ` committed: " Xi Ruoyao
@ 2021-07-31 10:27 ` Xi Ruoyao
0 siblings, 0 replies; 10+ messages in thread
From: Xi Ruoyao @ 2021-07-31 10:27 UTC (permalink / raw)
To: Richard Sandiford
Cc: Matthew Fortune, gcc-patches, Jakub Jelinek, Maciej W. Rozycki
On Sat, 2021-07-31 at 02:08 +0800, Xi Ruoyao via Gcc-patches wrote:
> On Fri, 2021-07-30 at 16:23 +0800, Xi Ruoyao via Gcc-patches wrote:
> > On Fri, 2021-07-30 at 09:11 +0100, Richard Sandiford wrote:
> > > Xi Ruoyao <xry111@mengyan1223.wang> writes:
> > > > Ping again.
> > > >
> > > > On Wed, 2021-06-23 at 11:11 +0800, Xi Ruoyao wrote:
> > > > > Commit message shamelessly copied from 1777beb6b129 by jakub:
> > > > >
> > > > > This function, because it is sometimes called even outside of
> > > > > function
> > > > > bodies, uses create_tmp_var_raw rather than create_tmp_var.
> > > > > But
> > > > > in
> > > > > order
> > > > > for that to work, when first referenced, the VAR_DECLs need to
> > > > > appear
> > > > > in a
> > > > > TARGET_EXPR so that during gimplification the var gets the
> > > > > right
> > > > > DECL_CONTEXT and is added to local decls.
> > > > >
> > > > > Bootstrapped & regtested on mips64el-linux-gnu. Ok for trunk
> > > > > and
> > > > > backport
> > > > > to 11, 10, and 9?
> > >
> > > OK for all, thanks.
> > >
> > > Similar comments to the previous message about the appropriateness
> > > of me reviewing the patch, but like you say, this is doing for
> > > MIPS
> > > what we've already had to do for other targets.
> >
> > Thanks for reviewing.
> >
> > Will bootstrap and test it again, and commit if there is no
> > regressions.
>
> Committed to master at 20656544 and releases/gcc-11 at 7db1795a.
Commited to releases/gcc-10 at 613e4ebc and releases/gcc-9 at 79184d8c.
^ permalink raw reply [flat|nested] 10+ messages in thread