9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] kc/ka/kl alignment?
@ 2004-12-01 20:06 Tim Newsham
  2004-12-01 22:43 ` Russ Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Tim Newsham @ 2004-12-01 20:06 UTC (permalink / raw)
  To: 9fans

Hi,
   When a uvlong is a return value from a function, such as:

     uvlong func(void);

the kc compiler passes in a pointer to a uvlong in the first
argument (R7).  However, it appears that the uvlong value is
not aligned on an 8-byte boundary.  Shouldn't all uvlong's
be aligned on 8-byte boundaries in sparc?  (This would entail
keeping the stack aligned too, I imagine, or doing some funky
alignment math in the prologue of affected functions).

Tim N.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9fans] kc/ka/kl alignment?
  2004-12-01 20:06 [9fans] kc/ka/kl alignment? Tim Newsham
@ 2004-12-01 22:43 ` Russ Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Russ Cox @ 2004-12-01 22:43 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> the kc compiler passes in a pointer to a uvlong in the first
> argument (R7).  However, it appears that the uvlong value is
> not aligned on an 8-byte boundary.  Shouldn't all uvlong's
> be aligned on 8-byte boundaries in sparc?  (This would entail
> keeping the stack aligned too, I imagine, or doing some funky
> alignment math in the prologue of affected functions).

This would matter if the compilers ever emitted
instructions that addressed the uvlongs as 64-bit
numbers, but they never do.  They only treat uvlongs
as though they are arrays of 2 32-bit ints.

Russ


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-12-01 22:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-01 20:06 [9fans] kc/ka/kl alignment? Tim Newsham
2004-12-01 22:43 ` Russ Cox

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).