All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [PATCH 1/5] qom: Allow objects to be allocated with increased alignment
Date: Tue, 15 Sep 2020 17:27:32 -0400	[thread overview]
Message-ID: <20200915212732.GE7594@habkost.net> (raw)
In-Reply-To: <74c1e091-63c4-9ea0-c515-ad977ffa1d98@linaro.org>

On Tue, Sep 15, 2020 at 01:51:48PM -0700, Richard Henderson wrote:
> On 9/15/20 1:19 PM, Eduardo Habkost wrote:
> > Once we move to C11, we can just use max_align_t.
> 
> Yes.
> 
> > While we don't move to C11, why not just use
> >   __alignof__(union { long l; void *p; double d; long double ld;})
> > ?
> 
> For i386, this is 4.

Is i386-linux the only case where there are additional alignment
guarantees not covered by C99?

I would prefer a i386-linux-specific #ifdef for that case instead
of guessing based on undocumented libc internals.

-- 
Eduardo



  reply	other threads:[~2020-09-15 21:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15 17:46 [PATCH 0/5] qom: Allow object to be aligned Richard Henderson
2020-09-15 17:46 ` Richard Henderson
2020-09-15 17:46 ` [PATCH 1/5] qom: Allow objects to be allocated with increased alignment Richard Henderson
2020-09-15 18:07   ` Eduardo Habkost
2020-09-15 19:09     ` Richard Henderson
2020-09-15 20:19       ` Eduardo Habkost
2020-09-15 20:51         ` Richard Henderson
2020-09-15 21:27           ` Eduardo Habkost [this message]
2020-09-15 21:30             ` Richard Henderson
2020-09-15 22:00               ` Eduardo Habkost
2020-09-15 17:46 ` [PATCH 2/5] target/arm: Set instance_align on CPUARM TypeInfo Richard Henderson
2020-09-15 17:46 ` [PATCH 3/5] target/ppc: Set instance_align on PowerPCCPU TypeInfo Richard Henderson
2020-09-15 17:46 ` [PATCH 4/5] target/riscv: Set instance_align on RISCVCPU TypeInfo Richard Henderson
2020-09-15 17:46   ` Richard Henderson
2020-09-15 17:46 ` [PATCH 5/5] target/s390x: Set instance_align on S390CPU TypeInfo Richard Henderson
2020-09-15 22:47 ` [PATCH 0/5] qom: Allow object to be aligned Richard Henderson
2020-09-16  3:25   ` Stefan Weil

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=20200915212732.GE7594@habkost.net \
    --to=ehabkost@redhat.com \
    --cc=berrange@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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.