This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PowerPC code generation
- To: "David J Schinsing" <dxs at pt dot com>
- Subject: Re: PowerPC code generation
- From: Geoff Keating <geoffk at cygnus dot com>
- Date: 05 Jul 2000 13:26:22 -0700
- CC: gcc at gcc dot gnu dot org
- References: <OFA60BB7AF.840E75F8-ON85256913.0066FEA7@pt.com>
"David J Schinsing" <dxs@pt.com> 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.
--
- Geoffrey Keating <geoffk@cygnus.com>