From: Filip Navara <filip.navara@gmail.com>
To: Laurent Desnogues <laurent.desnogues@gmail.com>
Cc: Blue Swirl <blauwirbel@gmail.com>,
Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel@nongnu.org, Avi Kivity <avi@redhat.com>
Subject: Re: OT: TCG SSA, speed, misc (was Re: [Qemu-devel] Re: [PATCH 08/11] QMP: Port balloon command)
Date: Mon, 29 Jun 2009 01:35:13 +0200 [thread overview]
Message-ID: <5b31733c0906281635t523fa82bseaaf753cac46d206@mail.gmail.com> (raw)
In-Reply-To: <5b31733c0906281619k6a4bbf54s46de7d07b0395b2e@mail.gmail.com>
On Mon, Jun 29, 2009 at 1:19 AM, Filip Navara<filip.navara@gmail.com> wrote:
> On x86 host the register allocation still looks very pathetic, I will post a follow-up
> soon.
Let's look at the very first two instructions generated by the guest:
----------------
IN:
0x00200070: ldr r0, [pc, #108] ; 0x2000e4
0x00200074: ldr pc, [pc, #108] ; 0x2000e8
OP:
movi_i32 tmp8,$0x200078
movi_i32 tmp9,$0x6c
add_i32 tmp8,tmp8,tmp9
qemu_ld32u tmp9,tmp8,$0x0
mov_i32 r0,tmp9
movi_i32 tmp9,$0x20007c
movi_i32 tmp10,$0x6c
add_i32 tmp9,tmp9,tmp10
qemu_ld32u tmp8,tmp9,$0x0
movi_i32 tmp10,$0xfffffffe
and_i32 tmp8,tmp8,tmp10
mov_i32 pc,tmp8
exit_tb $0x0
OUT: [size=128]
0x03230020: mov $0x200078,%eax
0x03230025: add $0x6c,%eax
0x03230028: mov %eax,%ecx
0x0323002a: mov %ecx,%edx
0x0323002c: mov %ecx,%eax
-- this instruction sets %eax to value that it already has
0x0323002e: shr $0x6,%edx
0x03230031: and $0xfffffc03,%eax
0x03230037: and $0xff0,%edx
0x0323003d: lea 0x540(%edx,%ebp,1),%edx
0x03230044: cmp (%edx),%eax
0x03230046: mov %ecx,%eax
0x03230048: je 0x3230053
0x0323004a: xor %edx,%edx
0x0323004c: call 0x55cbc0
0x03230051: jmp 0x3230058
0x03230053: add 0xc(%edx),%eax
0x03230056: mov (%eax),%eax
0x03230058: mov $0x20007c,%edx
0x0323005d: add $0x6c,%edx
0x03230060: mov %edx,%ecx
0x03230062: mov %eax,0x0(%ebp)
0x03230065: mov %ecx,%edx
-- same here
0x03230067: mov %ecx,%eax
0x03230069: shr $0x6,%edx
0x0323006c: and $0xfffffc03,%eax
0x03230072: and $0xff0,%edx
0x03230078: lea 0x540(%edx,%ebp,1),%edx
0x0323007f: cmp (%edx),%eax
0x03230081: mov %ecx,%eax
0x03230083: je 0x323008e
0x03230085: xor %edx,%edx
0x03230087: call 0x55cbc0
0x0323008c: jmp 0x3230093
0x0323008e: add 0xc(%edx),%eax
0x03230091: mov (%eax),%eax
0x03230093: and $0xfffffffe,%eax
0x03230096: mov %eax,0x3c(%ebp)
0x03230099: xor %eax,%eax
0x0323009b: jmp 0x7ec928
If someone can explain me why the redundant mov instructions are
generated I'd be very happy. Thanks.
Best regards,
Filip Navara
next prev parent reply other threads:[~2009-06-28 23:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-28 18:19 OT: TCG SSA, speed, misc (was Re: [Qemu-devel] Re: [PATCH 08/11] QMP: Port balloon command) Filip Navara
2009-06-28 21:24 ` Laurent Desnogues
2009-06-28 23:19 ` Filip Navara
2009-06-28 23:35 ` Filip Navara [this message]
2009-06-29 6:39 ` Laurent Desnogues
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=5b31733c0906281635t523fa82bseaaf753cac46d206@mail.gmail.com \
--to=filip.navara@gmail.com \
--cc=aliguori@us.ibm.com \
--cc=avi@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=laurent.desnogues@gmail.com \
--cc=qemu-devel@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).