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.