9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] ureg alignment
Date: Fri,  9 May 2014 11:29:53 -0400	[thread overview]
Message-ID: <6e34eb4ac48233d6cee9edb0ce2062c3@ladd.quanstro.net> (raw)
In-Reply-To: <CAOw7k5iCbM_UUBv0t8OrgZJdf_P7V2gZc1oj_Hka6EJ7mkTNzA@mail.gmail.com>

> > on 64-bit machines, the unions in the ureg.h can lead to internal
> > padding.
>
> although one tactic not yet implemented, but soon ..., is to make
> struct and union alignment match the least alignment required, as is
> done for arrays, the approach on amd64 and arm64 is simply not to
> bother with the unions.  if it's sp, it's sp.  link is link.  i think
> the need for the alias has gone.  there aren't any references in port,
> which i think might have caused the aliasing in the first place, and
> xyz/trap.c should know what's what.

good point. i hadn't considered that it might simply be unnecessary.
perhaps because i was also fretting about this not being done consistently
across various codebases.  do you think that's perhaps worth leaving the
#define in as a temporary measure?

- erik



  reply	other threads:[~2014-05-09 15:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-09 14:21 erik quanstrom
2014-05-09 14:28 ` Steven Stallion
2014-05-09 14:31   ` erik quanstrom
2014-05-09 14:56 ` Charles Forsyth
2014-05-09 15:29   ` erik quanstrom [this message]
2014-05-09 15:45     ` Charles Forsyth
2014-05-09 15:52       ` erik quanstrom

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=6e34eb4ac48233d6cee9edb0ce2062c3@ladd.quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /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).