qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <Laurent@vivier.eu>
To: "Andreas Färber" <afaerber@suse.de>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Riku Voipio <riku.voipio@iki.fi>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] linux-user: correctly align types in thunking code
Date: Sat, 08 Dec 2012 18:13:17 +0100	[thread overview]
Message-ID: <1354986797.12642.21.camel@Quad> (raw)
In-Reply-To: <50C3711F.9050508@suse.de>

Le samedi 08 décembre 2012 à 17:55 +0100, Andreas Färber a écrit :
> Am 08.12.2012 16:18, schrieb Laurent Vivier:
> > Signed-off-by: Laurent Vivier <laurent@vivier.eu>
> > ---
> >  thunk.h |   22 +++++++++++++++++-----
> >  1 file changed, 17 insertions(+), 5 deletions(-)
> > 
> > diff --git a/thunk.h b/thunk.h
> > index 87025c3..d3e9f3d 100644
> > --- a/thunk.h
> > +++ b/thunk.h
> > @@ -151,20 +151,32 @@ static inline int thunk_type_align(const argtype *type_ptr, int is_host)
> >      case TYPE_CHAR:
> >          return 1;
> >      case TYPE_SHORT:
> > -        return 2;
> > +        if (is_host) {
> > +            return __alignof__(short);
> 
> Might __alignof__() depend on a certain GCC version? Is it supported by
> clang?

I'm a big fan of copy&paste: I took them from linux-user/syscall.c :

static const StructEntry struct_termios_def = {
    .convert = { host_to_target_termios, target_to_host_termios },
    .size = { sizeof(struct target_termios), sizeof(struct host_termios) },
    .align = { __alignof__(struct target_termios), __alignof__(struct host_termios) },
};

Regards,
Laurent

  reply	other threads:[~2012-12-08 17:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-08 15:18 [Qemu-devel] [PATCH] linux-user: correctly align types in thunking code Laurent Vivier
2012-12-08 16:40 ` Peter Maydell
2012-12-08 17:10   ` Laurent Vivier
2012-12-08 16:55 ` Andreas Färber
2012-12-08 17:13   ` Laurent Vivier [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-12-20 20:55 Laurent Vivier
2013-01-01 23:08 ` Laurent Vivier
2018-05-10 20:59 Laurent Vivier
2018-05-11 10:43 ` 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=1354986797.12642.21.camel@Quad \
    --to=laurent@vivier.eu \
    --cc=afaerber@suse.de \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /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).