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: MN10300: Fix building libstdc++-v3


On 02/03/14 10:11, Nick Clifton wrote:
Hi Jeff, Hi Alex,

   Currently the mainline MN10300 toolchain does not build the
   libstdc++-v3 library because:

     /libstdc++-v3/include/bits/locale_facets_nonio.tcc:1213:5:
     error: unable to find a register to spill in class 'EXTENDED_REGS'

     mn10300-elf/mn10300-elf/libstdc++-v3/include/bits/locale_facets_nonio.tcc:1213:5:
     internal compiler error: in spill_failure, at reload1.c:2106

   Of course the MN10300 does not have any extended registers, so it is
   not surprising that reload cannot find any to spill.  The reason why
   reload thinks that it can use the EXTENDED_REGS class however is the
   mn10300_register_move_cost() function which tells it that it only costs
   2 to move via those registers.  Hence the patch below.

   With the patch applied the libstdc++-v3 library now builds.  OK to
   apply ?

gcc/ChangeLog
2014-02-03  Nick Clifton  <nickc@redhat.com>

	* config/mn10300/mn10300.c (mn10300_register_move_cost): Prevent
	moves via extended registers in MN10300 mode.
But how/why did an extended register get selected to begin with? HARD_REGNO_MODE_OK and other macros/hooks ought to be preventing this relatively early.

Twiddling costs just seems to be papering over some deeper issue.

jeff


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