J?rgen Keil wrote:

> The "-xbuiltin" flag seems to introduce "%g2" register usage and
>
>works against the "-xregs=no%appl" option.  Apparently, 
>when substituting inlined versions of standard library functions.
>
>% cat xx.c
>#include <string.h>
>
>void
>func(void *a, void *b, int n)
>{
>        memcpy(a, b, n);
>}
>
>% /opt/studio11/SUNWspro/bin/cc -V
>cc: Sun C 5.8 Patch 121015-02 2006/03/29
>usage: cc [ options] files.  Use 'cc -flags' for details
>
>% /opt/studio11/SUNWspro/bin/cc -c -xO3 -xarch=v8 -Kpic -xregs=no%appl xx.c
>
>% dis xx.o | grep %g2
>
>% /opt/studio11/SUNWspro/bin/cc -c -xO3 -xbuiltin -xarch=v8 -Kpic 
>-xregs=no%appl xx.c
>
>% dis xx.o | grep %g2
>    func+0x1c:              84 0a 60 03  and       %o1, 0x3, %g2
>    func+0x20:              80 96 c0 02  orcc      %i3, %g2, %g0
>    func+0x6c:              c4 0e 7f ff  ldub      [%i1 - 0x1], %g2
>    func+0x74:              c4 2d ff ff  stb       %g2, [%l7 - 0x1]
>    func+0x94:              c4 0a 60 01  ldub      [%o1 + 0x1], %g2
>    func+0x9c:              c4 2d e0 01  stb       %g2, [%l7 + 0x1]
> 
>  
>

Awesome, Mr. Keil!       :)

(and btw, I myself had been hinting in that direction, too
-  just no time or enough priority to test it out)


rgds.
~m

Reply via email to