RFA: LM32: Fix building libgcc

Message ID 87has1stsj.fsf@redhat.com
State New
Headers show

Commit Message

Nick Clifton Aug. 17, 2012, 10:21 a.m.
Hi Sebastien,

  Currently the lm32-elf target fails to configure libgcc because of a
  seg-fault whilst running the configuration checks:

    configure:3794:  lm32-elf/gcc/xgcc [...] conftest.c
    xgcc: internal compiler error: Segmentation fault (program cc1)

  GCC goes into an infinite loop trying to generate a valid return
  instruction.  The problem is the epilogue and return patterns are
  misnamed.  The return is really a simple_return and the epilogue is
  really the (complex) return.  Thus the patch below fixes the problem
  and allows the libgcc library to be configured and built.

  OK to apply ?


2012-08-17  Nick Clifton  <nickc@redhat.com>

	* config/lm32/lm32.md (return): Rename to simple_return.
	(epilogue): Rename to return.



Index: gcc/config/lm32/lm32.md
--- gcc/config/lm32/lm32.md	(revision 190466)
+++ gcc/config/lm32/lm32.md	(working copy)
@@ -636,13 +636,14 @@ 
   [(set_attr "type" "uibranch")]  
-(define_insn "return"
-  [(return)]
+(define_insn "simple_return"
+  [(simple_return)]
   "lm32_can_use_return ()"
   [(set_attr "type" "uibranch")]  
@@ -961,7 +962,7 @@ 
-(define_expand "epilogue"
+(define_expand "return"