All of lore.kernel.org
 help / color / mirror / Atom feed
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 19:26:55 +0200	[thread overview]
Message-ID: <515B14DF.1090109@redhat.com> (raw)
In-Reply-To: <CAFEAcA-j6zJszy2pHB4vA+ZcQ+tvuPFVDLjqEqRf+cHNq5Ruhg@mail.gmail.com>

Il 02/04/2013 19:17, Peter Maydell ha scritto:
> On 2 April 2013 17:56, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> Il 02/04/2013 18:43, Peter Maydell ha scritto:
>>> 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.
> 
> Did you check linux-user too? I'm pretty sure we have structs
> and so on that mirror target memory and use target_ulong.
> 
>> 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?
> 
> Mmm, rather than speculating we should just confirm what gcc
> thinks the alignment of void* should be on these targets
> (since "a thing the size of a pointer" is what target_long/ulong
> represent, I think.)

I think "a thing the size of a pointer" should be abi_long/ulong.  The
pointer is not a CPU concept.

> That said, we should keep bugfixes and cleanup patches separated,

Indeed.  The change was unintended, and your comment is worth a respin.

> so on approach for proceeding with these cleanup patches is just
> to define TARGET_LONG_ALIGNMENT based on TARGET_ABI32 or whatever is
> appropriate for each target CPU. Then we retain the same behaviour.

Yes, TARGET_ABI32.  I'll have to squash patches 1 and 2, and the testing
RFH still holds because this alignment things sounds fishy...

Paolo

  reply	other threads:[~2013-04-02 17:27 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
2013-04-02 17:17       ` Peter Maydell
2013-04-02 17:26         ` Paolo Bonzini [this message]
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=515B14DF.1090109@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 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.