public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* alpha nobwx movqi/hi question
@ 2003-02-06 19:12 Spundun Bhatt
  2003-02-06 19:55 ` Falk Hueffner
  2003-02-06 20:41 ` Richard Henderson
  0 siblings, 2 replies; 3+ messages in thread
From: Spundun Bhatt @ 2003-02-06 19:12 UTC (permalink / raw)
  To: gcc

Hi
I have a question about the implementation of movqi and movhi in alpha.
In alpha.c the finction alpha_expand_mov_nobwx there is a condition
check whether the memory access is aligned or not. My problem is, I
cantthink of places where the memory address will not be algned. I
thoght since the compiler is generating code, all the memory accesses
would automatically be aligned because compiler will aliign the stack
and data structures that way.

Just in case you are wondering why I am insterestedin this. I am porting
gcc for a new architecture, I have taken powerpc config files as a
template because theres a resemblence, but the architecture has only
4byte memory accesses, so I asked a question on this list in november
and somebody suggested me to take a look at code for alpha without bwx.
So I am trying to understand this code and inject it into the powerpc
files. I also have confusions about the reload part.. but I cant even
phrase my questions on that yet, may be later.
Thanx
Spundun

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

* Re: alpha nobwx movqi/hi question
  2003-02-06 19:12 alpha nobwx movqi/hi question Spundun Bhatt
@ 2003-02-06 19:55 ` Falk Hueffner
  2003-02-06 20:41 ` Richard Henderson
  1 sibling, 0 replies; 3+ messages in thread
From: Falk Hueffner @ 2003-02-06 19:55 UTC (permalink / raw)
  To: Spundun Bhatt; +Cc: gcc

Spundun Bhatt <spundun@ISI.EDU> writes:

> I have a question about the implementation of movqi and movhi in
> alpha.  In alpha.c the finction alpha_expand_mov_nobwx there is a
> condition check whether the memory access is aligned or not. My
> problem is, I cantthink of places where the memory address will not
> be algned.

The only one I can think of is with __attribute__((packed)).

-- 
	Falk

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

* Re: alpha nobwx movqi/hi question
  2003-02-06 19:12 alpha nobwx movqi/hi question Spundun Bhatt
  2003-02-06 19:55 ` Falk Hueffner
@ 2003-02-06 20:41 ` Richard Henderson
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2003-02-06 20:41 UTC (permalink / raw)
  To: Spundun Bhatt; +Cc: gcc

On Thu, Feb 06, 2003 at 11:12:10AM -0800, Spundun Bhatt wrote:
> My problem is, I cant think of places where the memory address
> will not be algned.

	int foo(short *x)
	{
	  return *x;
	}

You can assume that x is two byte aligned, but nothing else.


r~

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

end of thread, other threads:[~2003-02-06 20:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-06 19:12 alpha nobwx movqi/hi question Spundun Bhatt
2003-02-06 19:55 ` Falk Hueffner
2003-02-06 20:41 ` Richard Henderson

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 read-only IMAP folder(s) and NNTP newsgroup(s).