From: Richard Henderson <rth@twiddle.net>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Stefan Weil <sw@weilnetz.de>,
qemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>,
Blue Swirl <blauwirbel@gmail.com>
Subject: Re: [Qemu-devel] [PATCH 2/4] tcg/i386: Add shortcuts for registers used in L constraint
Date: Thu, 13 Sep 2012 14:30:36 -0700 [thread overview]
Message-ID: <5052507C.7010603@twiddle.net> (raw)
In-Reply-To: <20120913212157.GA840@ohm.aurel32.net>
On 09/13/2012 02:21 PM, Aurelien Jarno wrote:
>> > #if TCG_TARGET_REG_BITS == 32
>> > tcg_out_ld(s, TCG_TYPE_PTR, TCG_AREG0, TCG_REG_ESP,
>> > (ARRAY_SIZE(tcg_target_callee_save_regs) + 1) * 4);
>> > - tcg_out_ld(s, TCG_TYPE_PTR, tcg_target_call_iarg_regs[1], TCG_REG_ESP,
>> > + tcg_out_ld(s, TCG_TYPE_PTR, TCG_REG_L1, TCG_REG_ESP,
>> > (ARRAY_SIZE(tcg_target_callee_save_regs) + 2) * 4);
>> > #else
>> > - tcg_out_mov(s, TCG_TYPE_PTR, TCG_AREG0, tcg_target_call_iarg_regs[0]);
>> > + tcg_out_mov(s, TCG_TYPE_PTR, TCG_AREG0, TCG_REG_L0);
>> > #endif
>> > tcg_out_addi(s, TCG_REG_ESP, -stack_addend);
>> >
>> > /* jmp *tb. */
>> > - tcg_out_modrm(s, OPC_GRP5, EXT5_JMPN_Ev, tcg_target_call_iarg_regs[1]);
>> > + tcg_out_modrm(s, OPC_GRP5, EXT5_JMPN_Ev, TCG_REG_L1);
> I don't think this is correct here. This has nothing to do with the L
> constraint, it's really refers to the first and seconds argument passed
> to the prologue.
>
In the 32-bit case, our use of TCG_REG_L1 really is just a temporary.
We loaded it from the stack just above there.
For the 64-bit case you're right. But that's exactly how we set up
the Ln macros, so I think that's ok.
r~
next prev parent reply other threads:[~2012-09-13 21:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-13 17:37 [Qemu-devel] [PATCH v2 0/4] Fix and clean tcg_target_get_call_iarg_regs_count Stefan Weil
2012-09-13 17:37 ` [Qemu-devel] [PATCH 1/4] w64: Fix TCG helper functions with 5 arguments Stefan Weil
2012-09-13 21:22 ` Aurelien Jarno
2012-09-22 14:55 ` Aurelien Jarno
2012-09-13 17:37 ` [Qemu-devel] [PATCH 2/4] tcg/i386: Add shortcuts for registers used in L constraint Stefan Weil
2012-09-13 21:21 ` Aurelien Jarno
2012-09-13 21:30 ` Richard Henderson [this message]
2012-09-13 21:47 ` Aurelien Jarno
2012-09-13 22:03 ` Peter Maydell
2012-09-13 22:20 ` Richard Henderson
2012-09-14 5:18 ` Stefan Weil
2012-09-22 14:55 ` Aurelien Jarno
2012-09-13 17:37 ` [Qemu-devel] [PATCH 3/4] tcg/i386: Remove unused registers from tcg_target_call_iarg_regs Stefan Weil
2012-09-13 21:22 ` Aurelien Jarno
2012-09-22 14:55 ` Aurelien Jarno
2012-09-13 17:37 ` [Qemu-devel] [PATCH 4/4] tcg: Remove tcg_target_get_call_iarg_regs_count Stefan Weil
2012-09-13 21:22 ` Aurelien Jarno
2012-09-22 14:55 ` Aurelien Jarno
2012-09-13 17:52 ` [Qemu-devel] [PATCH v2 0/4] Fix and clean tcg_target_get_call_iarg_regs_count 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=5052507C.7010603@twiddle.net \
--to=rth@twiddle.net \
--cc=agraf@suse.de \
--cc=aurelien@aurel32.net \
--cc=blauwirbel@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=sw@weilnetz.de \
/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).