Possibly OT: GCC 2.96 on PPC for VxWorks 5.5

John Clark jclark@metricsystems.com
Tue Jun 13 19:10:00 GMT 2006

Paul Smith schrieb:
> Hi all;
> As of now, most of my .o's are building identically.  However, there're
> some objects which don't.  After much investigation I've discovered that
> for some .c files, the Linux version of the compiler generates this
> assembly code:
>        mulli 9,0,100
>        stw 9,28(31)
> while the Solaris version generates this assembly code:
>        mr 11,0
>        slwi 9,11,1
>        add 9,9,0
>        slwi 11,9,5
>        add 9,9,11
>        add 0,9,0
>        stw 0,28(31)

Having spent thousands of dollars in psychoanalysis to irradicate any  
conscious or subconscious
material involved with any WRS product...

I would conjecture that the above is due to some form of option that 
selects a 'mul' over a shift
and add implementation. That could be based on machine type (ie which 
PPC implementation)
or optimizer settings, again conditioned on machine type, that the new 
compiler defaults to.
(PPC things for me are pretty ancient, but arn't there versions which 
don't have a multiply?)

John Clark

For unsubscribe information see http://sourceware.org/lists.html#faq

More information about the crossgcc mailing list