mips64 n32 and n64 support in dl-machine.h

Alexandre Oliva aoliva@redhat.com
Fri Mar 14 14:27:00 GMT 2003


On Mar 14, 2003, Andreas Schwab <schwab@suse.de> wrote:

> The actual arguments are always generic pointers (or integers cast to it),
> so it would be safe.

I don't understand what you mean.  Consider:

int something;

void f(void*p) {
  memcpy (p, something, sizeof(int));
}

void g(int *q) {
  f(q);
}

If g() is passed a mis-aligned pointer, and f() is inlined into g(),
the optimizer may very well assume that it is safe to write to *q as a
word, instead of as separate bytes.  It doesn't matter that the
pointer passed to f guarantees less alignment: with inlining, the
compiler can see through it.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer



More information about the Libc-alpha mailing list