This is the mail archive of the gcc-patches@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]

Re: RFA: Add an FPIC set of multilibs to the MN10300 port


Nick Clifton wrote:
Hi Richard,

Have you tried using CALL_REALLY_USED_REGISTERS?  I.e. define
CALL_REALLY_USED_REGISTERS to be the same as CALL_USED_REGISTERS,
except that the former marks a2 as call-saved.

I had not considered this (because I did not know of the existence of the macro), but you are right, it is a good idea.


So Jeff, Alex - here is a third version of the patch, using Richard's suggestion and updating the code in mn10300.c to check the call_really_used[] array rather than the call_used[] array. Tested with an mn10300-elf toolchain with no regressions in the gcc testsuite and a lot of improvements for the results when compiling with -fpic.

May I apply this version of the patch please ?

Cheers
  Nick

gcc/ChangeLog
2008-10-27  Nick Clifton  <nickc@redhat.com>

    * config/mn10300/mn10300.h (CALL_REALLY_USED_REGISTERS): Define.
    * config/mn10300/mn10300.c (fp_regs_to_save): Test the
    call_really_used_regs array rather than the call_used_regs array.
    (mn10300_get_live_callee_saved_regs, expand_prologue,
    expand_epilogue, output_tst): Likewise.

This is fine. I wasn't aware of CALL_REALLY_USED_REGISTERS either.

jeff


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