From mboxrd@z Thu Jan 1 00:00:00 1970 From: Franz Sirl To: Geoff Keating Cc: "David J Schinsing" , gcc@gcc.gnu.org Subject: Re: PowerPC code generation Date: Wed, 05 Jul 2000 13:53:00 -0000 Message-id: <4.3.2.7.2.20000705224335.00d84780@mail.lauterbach.com> References: <"Wed,> <5> <2000> <14:47:53> <-0400> X-SW-Source: 2000-07/msg00078.html At 22:26 05.07.00, Geoff Keating wrote: >"David J Schinsing" writes: > > > What can I do to get gcc to generate byte-reversed loads and stores > > (like the lwbrx instruction, for example). Perhaps there's a way to define > > a structure so as to generate them? > >You can use asm statements, like > >asm ("lwbrx %0, 0, %1" : "=r"(result) : "r"(&input), "X"(input)); > >at present, there is no way to have gcc generate such code without >using asm statements. Just out of interest, if I would implement __attribute__((little_endian)) and __attribute__((big_endian)) for MEM's, basically the major work would be to create something like a "revmovsi" pattern in the .md and tell compiler how to use it, or? Which pass of the compiler would be responsible for that? reload? Franz.