This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

limiting call clobbered registers for library functions


I've ported GCC to a small 16 bit CPU that has single bit shifts. So I've handled variable / multi-bit shifts using a mix of inline shifts and calls to assembler support functions.

The calls to the asm library functions clobber only one (by const) or two (variable) registers but of course calling these functions causes all of the standard call clobbered registers to be considered clobbered, thus wasting lots of candidate registers for use in expressions surrounding these shifts and causing unnecessary register saves in the surrounding function prologue/epilogue.

I've scrutinized and cloned the actions of other ports that do the same, however I'm unable to convince the various passes that only r1 and r2 can be clobbered by these library calls.

Is anyone able to point me in the proper direction for a solution to this problem ?

Thanks, Paul.




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