------- Comment #15 from hp at gcc dot gnu dot org  2010-09-04 03:08 -------
(In reply to comment #4)
> Good job picking up on that. 
> There must be a better way of telling the compiler to generate lwr and lwl 
> instructions without breaking strict aliasing rules...?

When requiring a specific insn you want an asm:

unsigned int result;
unsigned char *p;

/* Need the "m" (dummy) to mark memory as read. Need earlyclobber because gcc
using the same register would cause...problems.  Little endian assumed. */
asm ("lwr %0,0(%1)\n\tlwl %0,3(%1)" : "=&r" (result) : "r" (p), "m" (*p));



Reply via email to