From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <51d4d8ec419f841a99baf30ede300c25@brasstown.quanstro.net> References: <51d4d8ec419f841a99baf30ede300c25@brasstown.quanstro.net> Date: Fri, 9 May 2014 15:56:17 +0100 Message-ID: From: Charles Forsyth To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=089e011837d2c1aa4d04f8f8cc35 Subject: Re: [9fans] ureg alignment Topicbox-Message-UUID: e4cf1834-ead8-11e9-9d60-3106f5b1d025 --089e011837d2c1aa4d04f8f8cc35 Content-Type: text/plain; charset=UTF-8 On 9 May 2014 15:21, erik quanstrom wrote: > 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. --089e011837d2c1aa4d04f8f8cc35 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= On 9 May 2014 15:21, erik quanstrom <quanstro@quanstro.net> wrote:
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 ar= rays, the approach on amd64 and arm64
is simply not to bother with the unions. if it&#= 39;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 w= hat's what.
--089e011837d2c1aa4d04f8f8cc35--