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  <ni...@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

Reply via email to