This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GCC 3.2.1 arm assembler error


Can someone please verify that this is a problem. Referring to the APCS a0 - a3, and ip are used between procedure calls. Therefore the local routine cannot assume any values for these registers beyond a branch and link. When used again they must be loaded again. I have included two samples from a dissassembled object file in which it looks like they are being used incorrectly. I have tested on 3 compiler versions as indicated.


Here are the compiler options used:
-c -nostdinc -O3 -mcpu=xscale -msoft-float -mapcs-32 -fno-rtti -fno-exceptions -fsigned-char -fno-builtin -b arm-unknown-elf -V 3.2.1


Using 2.96 is not an option due to a stack corruption problem. I only included it in these results for comparision.


3.2.1 (rebuilt from source --target=arm-unknown-elf) d8: e50bc02c str ip, [fp, -#44] dc: ebfffffe bl 0 <_ZN12PciXScaleDevC2Ej> e0: e289e09c add lr, r9, #156 ; 0x9c e4: e58ce21c str lr, [ip, #540]


3.1 (GNUPRO xscale-020523) d8: e50b302c str r3, [fp, -#44] dc: ebfffffe bl 0 <_ZN12PciXScaleDevC2Ej> e0: e289a09c add sl, r9, #156 ; 0x9c e4: e583a21c str sl, [r3, #540]

Same problem different register.


2.96 (GNUPRO xscale-010827)
I could not find any instance of r0,r1,r2,r3,ip being used with assumed value after a bl call.



Ryan.





------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe at sources dot redhat dot com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]