From: "Philippe Mathieu-Daudé" <f4bug@amsat.org> To: Richard Henderson <richard.henderson@linaro.org>, Miroslav Rezanina <mrezanin@redhat.com> Cc: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>, Cornelia Huck <cohuck@redhat.com>, qemu-riscv@nongnu.org, Stefan Weil <sw@weilnetz.de>, Huacai Chen <chenhuacai@kernel.org>, qemu-devel@nongnu.org, qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Alistair Francis <Alistair.Francis@wdc.com>, Thomas Huth <thuth@redhat.com>, Palmer Dabbelt <palmer@dabbelt.com>, Aurelien Jarno <aurelien@aurel32.net> Subject: Re: [PATCH 2/5] tcg/ppc: Hoist common argument loads in tcg_out_op() Date: Wed, 13 Jan 2021 16:49:05 +0100 [thread overview] Message-ID: <7baba218-340a-9426-6933-0024e0d4110d@amsat.org> (raw) In-Reply-To: <fa4c5ea6-3ca6-6aa4-6dea-5b400bc7ccd1@amsat.org> On 1/13/21 4:25 PM, Philippe Mathieu-Daudé wrote: > On 1/11/21 4:01 PM, Philippe Mathieu-Daudé wrote: >> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> >> --- >> tcg/ppc/tcg-target.c.inc | 294 ++++++++++++++++++--------------------- >> 1 file changed, 138 insertions(+), 156 deletions(-) > ... > >> @@ -2818,10 +2805,9 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args, >> case INDEX_op_bswap32_i32: >> case INDEX_op_bswap32_i64: >> /* Stolen from gcc's builtin_bswap32 */ >> - a1 = args[1]; >> - a0 = args[0] == a1 ? TCG_REG_R0 : args[0]; >> + a0 = a0 == a1 ? TCG_REG_R0 : a0; > > Oops... Here is probably the regression reported by Miroslav, > I shouldn't have changed this line, simply remove the a1 Oops^2, wrong hunk =) Following one... > >> >> - /* a1 = args[1] # abcd */ >> + /* a1 = a1 # abcd */ >> /* a0 = rotate_left (a1, 8) # bcda */ >> tcg_out_rlw(s, RLWINM, a0, a1, 8, 0, 31); >> /* a0 = (a0 & ~0xff000000) | ((a1 r<< 24) & 0xff000000) # dcda */ @@ -2830,12 +2816,12 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args, tcg_out_rlw(s, RLWIMI, a0, a1, 24, 16, 23); Here, is the line I shouldn't have changed: if (a0 == TCG_REG_R0) { - tcg_out_mov(s, TCG_TYPE_REG, args[0], a0); + tcg_out_mov(s, TCG_TYPE_REG, a0, a0); } break; (multiple occurrences).
WARNING: multiple messages have this Message-ID (diff)
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org> To: Richard Henderson <richard.henderson@linaro.org>, Miroslav Rezanina <mrezanin@redhat.com> Cc: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>, Huacai Chen <chenhuacai@kernel.org>, qemu-riscv@nongnu.org, Stefan Weil <sw@weilnetz.de>, Cornelia Huck <cohuck@redhat.com>, qemu-devel@nongnu.org, qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Alistair Francis <Alistair.Francis@wdc.com>, Thomas Huth <thuth@redhat.com>, Palmer Dabbelt <palmer@dabbelt.com>, Aurelien Jarno <aurelien@aurel32.net> Subject: Re: [PATCH 2/5] tcg/ppc: Hoist common argument loads in tcg_out_op() Date: Wed, 13 Jan 2021 16:49:05 +0100 [thread overview] Message-ID: <7baba218-340a-9426-6933-0024e0d4110d@amsat.org> (raw) In-Reply-To: <fa4c5ea6-3ca6-6aa4-6dea-5b400bc7ccd1@amsat.org> On 1/13/21 4:25 PM, Philippe Mathieu-Daudé wrote: > On 1/11/21 4:01 PM, Philippe Mathieu-Daudé wrote: >> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> >> --- >> tcg/ppc/tcg-target.c.inc | 294 ++++++++++++++++++--------------------- >> 1 file changed, 138 insertions(+), 156 deletions(-) > ... > >> @@ -2818,10 +2805,9 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args, >> case INDEX_op_bswap32_i32: >> case INDEX_op_bswap32_i64: >> /* Stolen from gcc's builtin_bswap32 */ >> - a1 = args[1]; >> - a0 = args[0] == a1 ? TCG_REG_R0 : args[0]; >> + a0 = a0 == a1 ? TCG_REG_R0 : a0; > > Oops... Here is probably the regression reported by Miroslav, > I shouldn't have changed this line, simply remove the a1 Oops^2, wrong hunk =) Following one... > >> >> - /* a1 = args[1] # abcd */ >> + /* a1 = a1 # abcd */ >> /* a0 = rotate_left (a1, 8) # bcda */ >> tcg_out_rlw(s, RLWINM, a0, a1, 8, 0, 31); >> /* a0 = (a0 & ~0xff000000) | ((a1 r<< 24) & 0xff000000) # dcda */ @@ -2830,12 +2816,12 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args, tcg_out_rlw(s, RLWIMI, a0, a1, 24, 16, 23); Here, is the line I shouldn't have changed: if (a0 == TCG_REG_R0) { - tcg_out_mov(s, TCG_TYPE_REG, args[0], a0); + tcg_out_mov(s, TCG_TYPE_REG, a0, a0); } break; (multiple occurrences).
next prev parent reply other threads:[~2021-01-13 15:53 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-11 15:01 [PATCH 0/5] tcg: Restrict tcg_out_op() to arrays of TCG_MAX_OP_ARGS elements Philippe Mathieu-Daudé 2021-01-11 15:01 ` Philippe Mathieu-Daudé 2021-01-11 15:01 ` [PATCH 1/5] tcg/arm: Hoist common argument loads in tcg_out_op() Philippe Mathieu-Daudé 2021-01-11 15:01 ` Philippe Mathieu-Daudé 2021-01-11 15:01 ` [PATCH 2/5] tcg/ppc: " Philippe Mathieu-Daudé 2021-01-11 15:01 ` Philippe Mathieu-Daudé 2021-01-13 15:25 ` Philippe Mathieu-Daudé 2021-01-13 15:25 ` Philippe Mathieu-Daudé 2021-01-13 15:49 ` Philippe Mathieu-Daudé [this message] 2021-01-13 15:49 ` Philippe Mathieu-Daudé 2021-01-11 15:01 ` [PATCH 3/5] tcg/s390: " Philippe Mathieu-Daudé 2021-01-11 15:01 ` Philippe Mathieu-Daudé 2021-01-13 11:56 ` Miroslav Rezanina 2021-01-13 11:56 ` Miroslav Rezanina 2021-01-11 15:01 ` [RFC PATCH 4/5] tcg: Restrict tcg_out_op() to arrays of TCG_MAX_OP_ARGS elements Philippe Mathieu-Daudé 2021-01-11 15:01 ` Philippe Mathieu-Daudé 2021-01-11 15:49 ` Miroslav Rezanina 2021-01-11 15:49 ` Miroslav Rezanina 2021-01-11 15:01 ` [RFC PATCH 5/5] tcg: Restrict tcg_out_vec_op() " Philippe Mathieu-Daudé 2021-01-11 15:01 ` Philippe Mathieu-Daudé 2021-01-11 17:22 ` [PATCH 0/5] tcg: Restrict tcg_out_op() " Richard Henderson 2021-01-11 17:22 ` Richard Henderson 2021-01-13 15:07 ` Philippe Mathieu-Daudé 2021-01-13 15:07 ` Philippe Mathieu-Daudé 2021-01-13 18:34 ` Richard Henderson 2021-01-13 18:34 ` Richard Henderson
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=7baba218-340a-9426-6933-0024e0d4110d@amsat.org \ --to=f4bug@amsat.org \ --cc=Alistair.Francis@wdc.com \ --cc=aleksandar.rikalo@syrmia.com \ --cc=aurelien@aurel32.net \ --cc=chenhuacai@kernel.org \ --cc=cohuck@redhat.com \ --cc=mrezanin@redhat.com \ --cc=palmer@dabbelt.com \ --cc=qemu-arm@nongnu.org \ --cc=qemu-devel@nongnu.org \ --cc=qemu-riscv@nongnu.org \ --cc=qemu-s390x@nongnu.org \ --cc=richard.henderson@linaro.org \ --cc=sw@weilnetz.de \ --cc=thuth@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.