qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Nicholas Piggin" <npiggin@gmail.com>
To: "BALATON Zoltan" <balaton@eik.bme.hu>, <qemu-devel@nongnu.org>,
	<qemu-ppc@nongnu.org>
Subject: Re: [PATCH 1/4] ppc/amigaone: Simplify replacement dummy_fw
Date: Thu, 27 Feb 2025 10:50:59 +1000	[thread overview]
Message-ID: <D82TE63DN8E5.1M16STS88RJO6@gmail.com> (raw)
In-Reply-To: <d9cec2b2294887c3849ee651e72fd31ecf43a935.1740243918.git.balaton@eik.bme.hu>

On Sun Feb 23, 2025 at 3:52 AM AEST, BALATON Zoltan wrote:
> There's no need to do shift in a loop, doing it in one instruction
> works just as well, only the result is used.
>
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>

Resulting asm looks right to me.

Reviewed-by: Nicholas Piggin <npiggin@gmail.com>

> ---
>  hw/ppc/amigaone.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/hw/ppc/amigaone.c b/hw/ppc/amigaone.c
> index b02792221c..4290d58613 100644
> --- a/hw/ppc/amigaone.c
> +++ b/hw/ppc/amigaone.c
> @@ -41,10 +41,7 @@
>  
>  /* AmigaOS calls this routine from ROM, use this if no firmware loaded */
>  static const char dummy_fw[] = {
> -    0x38, 0x00, 0x00, 0x08, /* li      r0,8 */
> -    0x7c, 0x09, 0x03, 0xa6, /* mtctr   r0 */
> -    0x54, 0x63, 0xf8, 0x7e, /* srwi    r3,r3,1 */
> -    0x42, 0x00, 0xff, 0xfc, /* bdnz    0x8 */
> +    0x54, 0x63, 0xc2, 0x3e, /* srwi    r3,r3,8 */
>      0x7c, 0x63, 0x18, 0xf8, /* not     r3,r3 */
>      0x4e, 0x80, 0x00, 0x20, /* blr */
>  };



  reply	other threads:[~2025-02-27  0:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-22 17:52 [PATCH 0/4] ppc/amigaone patches BALATON Zoltan
2025-02-22 17:52 ` [PATCH 1/4] ppc/amigaone: Simplify replacement dummy_fw BALATON Zoltan
2025-02-27  0:50   ` Nicholas Piggin [this message]
2025-02-22 17:52 ` [PATCH 2/4] ppc/amigaone: Implement NVRAM emulation BALATON Zoltan
2025-02-27  1:10   ` Nicholas Piggin
2025-02-27  1:48     ` BALATON Zoltan
2025-02-27  8:08       ` Nicholas Piggin
2025-02-27 16:40         ` BALATON Zoltan
2025-02-22 17:52 ` [PATCH 3/4] ppc/amigaone: Add default environment BALATON Zoltan
2025-02-27  1:21   ` Nicholas Piggin
2025-02-27  2:18     ` BALATON Zoltan
2025-02-27  8:31       ` Nicholas Piggin
2025-02-27 17:07         ` BALATON Zoltan
2025-02-22 17:52 ` [PATCH 4/4] ppc/amigaone: Add kernel and initrd support BALATON Zoltan
2025-02-27  1:24   ` Nicholas Piggin
2025-02-24 19:04 ` [PATCH 0/4] ppc/amigaone patches Bernhard Beschow
2025-02-24 20:48   ` BALATON Zoltan

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=D82TE63DN8E5.1M16STS88RJO6@gmail.com \
    --to=npiggin@gmail.com \
    --cc=balaton@eik.bme.hu \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).