* [PATCH] MIPS: fix loongson3 llsc workaround
@ 2023-03-23 10:59 YunQiang Su
2023-04-10 6:37 ` YunQiang Su
2023-05-11 0:00 ` Maciej W. Rozycki
0 siblings, 2 replies; 4+ messages in thread
From: YunQiang Su @ 2023-03-23 10:59 UTC (permalink / raw)
To: binutils
Cc: syq, macro, xry111, richard.sandiford, jiaxun.yang, amodra, YunQiang Su
-mfix-looongson3-llsc may add sync instructions not needed on some
asm code with lots of debug info.
PR: 30153
* gas/config/tc-mips.c(fix_loongson3_llsc): clear logistic.
---
gas/config/tc-mips.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index e911aaa904a..8a970ceada2 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -6942,10 +6942,6 @@ fix_loongson3_llsc (struct mips_cl_insn * ip)
unsigned long lookback = ARRAY_SIZE (history);
for (i = 0; i < lookback; i++)
{
- if (streq (history[i].insn_mo->name, "ll")
- || streq (history[i].insn_mo->name, "lld"))
- break;
-
if (streq (history[i].insn_mo->name, "sc")
|| streq (history[i].insn_mo->name, "scd"))
{
@@ -6953,8 +6949,8 @@ fix_loongson3_llsc (struct mips_cl_insn * ip)
for (j = i + 1; j < lookback; j++)
{
- if (streq (history[i].insn_mo->name, "ll")
- || streq (history[i].insn_mo->name, "lld"))
+ if (streq (history[j].insn_mo->name, "ll")
+ || streq (history[j].insn_mo->name, "lld"))
break;
if (delayed_branch_p (&history[j]))
@@ -6993,7 +6989,7 @@ fix_loongson3_llsc (struct mips_cl_insn * ip)
for (j = i + 1; j < lookback; j++)
{
if (streq (history[j].insn_mo->name, "ll")
- || streq (history[i].insn_mo->name, "lld"))
+ || streq (history[j].insn_mo->name, "lld"))
break;
}
--
2.30.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] MIPS: fix loongson3 llsc workaround
2023-03-23 10:59 [PATCH] MIPS: fix loongson3 llsc workaround YunQiang Su
@ 2023-04-10 6:37 ` YunQiang Su
2023-05-11 0:00 ` Maciej W. Rozycki
1 sibling, 0 replies; 4+ messages in thread
From: YunQiang Su @ 2023-04-10 6:37 UTC (permalink / raw)
To: YunQiang Su
Cc: binutils, macro, xry111, richard.sandiford, jiaxun.yang, amodra
ping
YunQiang Su <yunqiang.su@cipunited.com> 于2023年3月23日周四 19:00写道:
>
> -mfix-looongson3-llsc may add sync instructions not needed on some
> asm code with lots of debug info.
>
> PR: 30153
> * gas/config/tc-mips.c(fix_loongson3_llsc): clear logistic.
> ---
> gas/config/tc-mips.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
> index e911aaa904a..8a970ceada2 100644
> --- a/gas/config/tc-mips.c
> +++ b/gas/config/tc-mips.c
> @@ -6942,10 +6942,6 @@ fix_loongson3_llsc (struct mips_cl_insn * ip)
> unsigned long lookback = ARRAY_SIZE (history);
> for (i = 0; i < lookback; i++)
> {
> - if (streq (history[i].insn_mo->name, "ll")
> - || streq (history[i].insn_mo->name, "lld"))
> - break;
> -
> if (streq (history[i].insn_mo->name, "sc")
> || streq (history[i].insn_mo->name, "scd"))
> {
> @@ -6953,8 +6949,8 @@ fix_loongson3_llsc (struct mips_cl_insn * ip)
>
> for (j = i + 1; j < lookback; j++)
> {
> - if (streq (history[i].insn_mo->name, "ll")
> - || streq (history[i].insn_mo->name, "lld"))
> + if (streq (history[j].insn_mo->name, "ll")
> + || streq (history[j].insn_mo->name, "lld"))
> break;
>
> if (delayed_branch_p (&history[j]))
> @@ -6993,7 +6989,7 @@ fix_loongson3_llsc (struct mips_cl_insn * ip)
> for (j = i + 1; j < lookback; j++)
> {
> if (streq (history[j].insn_mo->name, "ll")
> - || streq (history[i].insn_mo->name, "lld"))
> + || streq (history[j].insn_mo->name, "lld"))
> break;
> }
>
> --
> 2.30.2
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] MIPS: fix loongson3 llsc workaround
2023-03-23 10:59 [PATCH] MIPS: fix loongson3 llsc workaround YunQiang Su
2023-04-10 6:37 ` YunQiang Su
@ 2023-05-11 0:00 ` Maciej W. Rozycki
2023-05-11 0:15 ` YunQiang Su
1 sibling, 1 reply; 4+ messages in thread
From: Maciej W. Rozycki @ 2023-05-11 0:00 UTC (permalink / raw)
To: YunQiang Su
Cc: binutils, syq, xry111, richard.sandiford, jiaxun.yang, Alan Modra
On Thu, 23 Mar 2023, YunQiang Su wrote:
> -mfix-looongson3-llsc may add sync instructions not needed on some
> asm code with lots of debug info.
I can see the change has been committed, but who has actually reviewed
it?
The change description doesn't say what the change actually does, so one
can't say whether it is correct or not. At least an example of incorrect
code produced ought to be shown and how the change affects it. As it
stands I have no idea what is going on here, and surely no one who looks
at it in a few year's time will.
Change descriptions cannot be retrofitted, so I think the original fix
ought to be reverted and, assuming it is indeed the correct one, reapplied
with a correct change description (after a proper review).
Maciej
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] MIPS: fix loongson3 llsc workaround
2023-05-11 0:00 ` Maciej W. Rozycki
@ 2023-05-11 0:15 ` YunQiang Su
0 siblings, 0 replies; 4+ messages in thread
From: YunQiang Su @ 2023-05-11 0:15 UTC (permalink / raw)
To: Maciej W. Rozycki
Cc: YunQiang Su, binutils, xry111, richard.sandiford, jiaxun.yang,
Alan Modra
Maciej W. Rozycki <macro@orcam.me.uk> 于2023年5月11日周四 08:01写道:
>
> On Thu, 23 Mar 2023, YunQiang Su wrote:
>
> > -mfix-looongson3-llsc may add sync instructions not needed on some
> > asm code with lots of debug info.
>
> I can see the change has been committed, but who has actually reviewed
> it?
>
> The change description doesn't say what the change actually does, so one
> can't say whether it is correct or not. At least an example of incorrect
> code produced ought to be shown and how the change affects it. As it
> stands I have no idea what is going on here, and surely no one who looks
> at it in a few year's time will.
>
In fact, it was a typo of i/j.
> Change descriptions cannot be retrofitted, so I think the original fix
> ought to be reverted and, assuming it is indeed the correct one, reapplied
> with a correct change description (after a proper review).
>
> Maciej
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-11 0:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23 10:59 [PATCH] MIPS: fix loongson3 llsc workaround YunQiang Su
2023-04-10 6:37 ` YunQiang Su
2023-05-11 0:00 ` Maciej W. Rozycki
2023-05-11 0:15 ` YunQiang Su
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).