From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Blue Swirl <blauwirbel@gmail.com>,
qemu-devel@nongnu.org, Aurelien Jarno <aurelien@aurel32.net>,
Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH 1/5] configure: move TARGET_*_ALIGNMENT to target-*/cpu.h
Date: Tue, 02 Apr 2013 18:56:49 +0200 [thread overview]
Message-ID: <515B0DD1.4030000@redhat.com> (raw)
In-Reply-To: <CAFEAcA_7e99p-auvQpCpTLiFFgoYu9uJ53Jo+Oo4uGQao3ZGFQ@mail.gmail.com>
Il 02/04/2013 18:43, Peter Maydell ha scritto:
> On 2 April 2013 15:44, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> This is no different from, for example, TARGET_LONG_BITS. It does
>> not belong in configure.
>
>> diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
>> index 42c36e2..19d4e4c 100644
>> --- a/target-ppc/cpu.h
>> +++ b/target-ppc/cpu.h
>> @@ -27,6 +27,7 @@
>> #if defined (TARGET_PPC64)
>> /* PowerPC 64 definitions */
>> #define TARGET_LONG_BITS 64
>> +#define TARGET_LONG_ALIGNMENT 8
>> #define TARGET_PAGE_BITS 12
>
> Doesn't this incorrectly set the long alignment to 8
> for ppc64abi32? (Probably similar problem for
> sparc32plus and mipsn32. The underlying point here is that
> alignment is an ABI decision and you can have more than one
> ABI for a particular TARGET_FOO.)
Hmm, seems like you're right _but_ I am not sure if the *current* code
is correct. On real hardware, the CPUs are certainly not able to do
unaligned 32-bit accesses, and target_long/target_ulong pointers look
like they're never used for data that comes from target memory. Rather,
they're used for by-reference passing into functions, and stuff like that.
What these targets want to have 32-bit alignment is really
abi_long/abi_ulong, and that's already okay. Alex, Blue, Aurelien, can
you test the above three targets?
Paolo
next prev parent reply other threads:[~2013-04-02 16:57 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-02 14:44 [Qemu-devel] [PATCH 0/5] trim down config-target.mak Paolo Bonzini
2013-04-02 14:44 ` [Qemu-devel] [PATCH 1/5] configure: move TARGET_*_ALIGNMENT to target-*/cpu.h Paolo Bonzini
2013-04-02 16:43 ` Peter Maydell
2013-04-02 16:56 ` Paolo Bonzini [this message]
2013-04-02 17:17 ` Peter Maydell
2013-04-02 17:26 ` Paolo Bonzini
2013-04-02 17:47 ` Peter Maydell
2013-04-03 8:55 ` Paolo Bonzini
2013-04-02 17:57 ` Aurelien Jarno
2013-04-02 14:44 ` [Qemu-devel] [PATCH 2/5] cpu: default TARGET_LONG_ALIGNMENT to TARGET_LONG_SIZE Paolo Bonzini
2013-04-02 15:16 ` Peter Maydell
2013-04-02 14:44 ` [Qemu-devel] [PATCH 3/5] configure: move CONFIG_QEMU_LDST_OPTIMIZATION to config-host.mak Paolo Bonzini
2013-04-02 16:45 ` Peter Maydell
2013-04-02 14:44 ` [Qemu-devel] [PATCH 4/5] configure: move common libraries " Paolo Bonzini
2013-04-02 17:01 ` Peter Maydell
2013-04-02 17:26 ` Paolo Bonzini
2013-04-02 18:17 ` Peter Maydell
2013-04-02 18:51 ` Paolo Bonzini
2013-04-02 14:44 ` [Qemu-devel] [PATCH 5/5] configure: CONFIG_NO_XEN is duplicated Paolo Bonzini
2013-04-02 16:54 ` Stefano Stabellini
2013-04-02 17:24 ` Peter Maydell
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=515B0DD1.4030000@redhat.com \
--to=pbonzini@redhat.com \
--cc=agraf@suse.de \
--cc=aurelien@aurel32.net \
--cc=blauwirbel@gmail.com \
--cc=peter.maydell@linaro.org \
--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).