From: "Aurélien Jarno" <aurelien@aurel32.net>
To: "Andreas Färber" <andreas.faerber@web.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 5/x] ppc: Convert op_load_gpr_{T0, T1, T2} to TCG
Date: Wed, 3 Sep 2008 14:41:39 +0200 [thread overview]
Message-ID: <20080903124139.GA9674@hall.aurel32.net> (raw)
In-Reply-To: <A941D609-39D0-4AC2-9E68-3BD68AE2C58A@web.de>
On Wed, Sep 03, 2008 at 12:41:01PM +0200, Andreas Färber wrote:
>
> Am 03.09.2008 um 07:07 schrieb Aurelien Jarno:
>
> >On Wed, Sep 03, 2008 at 02:39:52AM +0200, Andreas Färber wrote:
> >>
> >>Am 03.09.2008 um 01:20 schrieb Aurelien Jarno:
> >>
> >>>
> >>>>+ for (i = 0; i < 32; i++) {
> >>>>+ cpu_gpr[i] = tcg_global_mem_new(TCG_TYPE_TL, TCG_AREG0,
> >>>>+ offsetof(CPUState,
> >>>>gpr[i]),
> >>>>+ gprnames[i]);
> >>>
> >>>This is most probably wrong given the definition of ppc_gpr_t in
> >>>cpu.h:
> >>>- 64 bits on 64-bit targets
> >>>- 32 bits on 32-bit targets and 32-bit hosts
> >>>- *64 bits* on 32-bit targets and 64-bit hosts
> >>>
> >>>I think it is a bit weird, and I think the best is to modify cpu.h
> >>>in
> >>>order to have ppc_gpr_t matching the target bitness.
> >>
> >>This might be related to the 64-on-32 issue I just posted about. I
> >>don't
> >>remember seeing code that makes use of this sophisticated definition
> >>though, for non-ppc64 it apparently uses a set of 32-bit gpr and gprh
> >>variables. Let's not change ppc_gpr_t for now.
> >
> >Well that's different, your previous post is about T_* registers, I am
> >speaking about the GPR registers. And either ppc_gpr_t or the init
> >code
> >of cpu_gpr[i] has to be changed, otherwise you will break existing
> >targets.
>
> I'm quite sure it is related - the issue is that GPR / T TCGv size
> does not always correspond to tl, and the only problem is the 32-bit
> target with 64-bit host.
>
> Would there be a problem with using i64 in the 32-on-64 case? That is,
> would it hurt to do i32 TCG operations on i64 variables on a 64-bit
> host? If not, we could keep tl for the regular instructions and use
> i64 for ppc64/ppc-on-64 and 2x i32 on ppc-on-32. That sounds more
> efficient than reverting the ppc_gpr_t optimization and always using
> 2x i32 independent of the host bitness. We'll need an inlined helper
> for these any way.
This optimization has been done with dyngen in mind, we surely don't
want to keep it with TCG.
I currently have plenty of time, but almost no network (travelling), so
I'll work on implementing a solution, and commit the result most probably
tomorrow morning.
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
next prev parent reply other threads:[~2008-09-03 12:41 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-02 13:36 [Qemu-devel] [PATCH] [ppc] Convert gen_set_{T0,T1} to TCG Andreas Färber
2008-09-02 14:32 ` [Qemu-devel] [PATCH] [ppc] Convert op_reset_T0, op_set_{T0, T1} " Andreas Färber
2008-09-02 15:39 ` [Qemu-devel] [PATCH] [ppc] Convert op_move_{T1,T2}_T0 " Andreas Färber
2008-09-02 16:19 ` Aurelien Jarno
2008-09-02 16:57 ` [Qemu-devel] [PATCH 4/x] [ppc] Convert op_moven_T2_T0 " Andreas Färber
2008-09-02 22:22 ` [Qemu-devel] [PATCH 5/x] ppc: Convert op_load_gpr_{T0,T1,T2} " Andreas Färber
2008-09-02 23:20 ` Aurelien Jarno
2008-09-03 0:39 ` [Qemu-devel] [PATCH 5/x] ppc: Convert op_load_gpr_{T0, T1, T2} " Andreas Färber
2008-09-03 5:07 ` Aurelien Jarno
2008-09-03 10:41 ` Andreas Färber
2008-09-03 11:28 ` Thiemo Seufer
2008-09-03 18:07 ` Andreas Färber
2008-09-03 18:26 ` Blue Swirl
2008-09-03 19:00 ` Andreas Färber
2008-09-03 19:12 ` Blue Swirl
2008-09-03 20:04 ` [Qemu-devel] [PATCH 5/x v2] ppc: Convert GPR moves " Andreas Färber
2008-09-04 5:25 ` Aurelien Jarno
2008-09-04 10:21 ` Andreas Färber
2008-09-04 12:24 ` [Qemu-devel] [PATCH 6/x] ppc: Convert Altivec register " Andreas Färber
2008-09-04 14:08 ` [Qemu-devel] [PATCH 7/x] ppc: Convert FPR " Andreas Färber
2008-09-04 14:39 ` Aurélien Jarno
2008-09-04 17:59 ` [Qemu-devel] [PATCH 8/x] ppc: Convert op_set_FT0 " Andreas Färber
2008-09-04 20:36 ` Aurélien Jarno
2008-09-04 22:53 ` [Qemu-devel] [PATCH 9/x] ppc: Convert op_add, op_addi " Andreas Färber
2008-09-05 14:18 ` Aurélien Jarno
2008-09-05 17:17 ` Andreas Färber
2008-09-05 17:49 ` Aurelien Jarno
2008-09-04 23:46 ` [Qemu-devel] [PATCH 10/x] ppc: Convert op_subf " Andreas Färber
2008-09-05 14:18 ` Aurélien Jarno
2008-09-04 14:39 ` [Qemu-devel] [PATCH 6/x] ppc: Convert Altivec register moves " Aurélien Jarno
2008-09-07 14:22 ` [Qemu-devel] [PATCH 5/x] ppc: Convert op_load_gpr_{T0, T1, T2} " Paul Brook
2008-09-03 12:41 ` Aurélien Jarno [this message]
2008-09-03 12:58 ` Andreas Färber
2008-09-03 13:00 ` Aurélien Jarno
2008-09-03 13:23 ` Thiemo Seufer
2008-09-03 13:45 ` Tristan Gingold
2008-09-03 16:04 ` Andreas Färber
2008-09-02 23:27 ` [Qemu-devel] [PATCH 4/x] [ppc] Convert op_moven_T2_T0 " Aurélien Jarno
2008-09-02 15:58 ` [Qemu-devel] [PATCH] [ppc] Convert op_reset_T0, op_set_{T0, T1} " Aurelien Jarno
2008-09-02 16:44 ` [Qemu-devel] [PATCH 2/x v2] " Andreas Färber
2008-09-02 23:28 ` Aurélien Jarno
2008-09-02 16:18 ` [Qemu-devel] [PATCH] [ppc] Convert gen_set_{T0,T1} " Aurelien Jarno
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=20080903124139.GA9674@hall.aurel32.net \
--to=aurelien@aurel32.net \
--cc=andreas.faerber@web.de \
--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 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.