re PR target/32335 (libgcc build failure, ICE in cselib_record_set, at cselib.c:1508)

2007-06-20  Rask Ingemann Lambertsen  <rask@sygehus.dk>

	PR target/32335
	* config/m32c/m32c.c (m32c_emit_epilogue): Use new HImode epilogue
	for TARGET_A16.
	* config/m32c/prologue.md (epilogue_exitd_16): New.
	(epilogue_reit_16): New.
	(epilogue_exitd): Rename to epilogue_exitd_24.
	(epilogue_reit): Rename to epilogue_reit_24.

From-SVN: r125892
This commit is contained in:
Rask Ingemann Lambertsen 2007-06-20 19:57:32 +00:00
parent b631c5f742
commit 0e0642aa7a
2 changed files with 43 additions and 14 deletions

View File

@ -4026,12 +4026,17 @@ m32c_emit_epilogue (void)
else
emit_insn (gen_poppsi (gen_rtx_REG (PSImode, FP_REGNO)));
emit_insn (gen_popm (GEN_INT (cfun->machine->intr_pushm)));
emit_jump_insn (gen_epilogue_reit (GEN_INT (TARGET_A16 ? 4 : 6)));
if (TARGET_A16)
emit_jump_insn (gen_epilogue_reit_16 ());
else
emit_jump_insn (gen_epilogue_reit_24 ());
}
else if (cfun->machine->use_rts)
emit_jump_insn (gen_epilogue_rts ());
else if (TARGET_A16)
emit_jump_insn (gen_epilogue_exitd_16 ());
else
emit_jump_insn (gen_epilogue_exitd (GEN_INT (TARGET_A16 ? 2 : 4)));
emit_jump_insn (gen_epilogue_exitd_24 ());
emit_barrier ();
}

View File

@ -102,26 +102,50 @@
[(set_attr "flags" "x")]
)
(define_insn "epilogue_exitd"
[(set (reg:PSI SP_REGNO)
(plus:PSI (reg:PSI FB_REGNO)
(match_operand 0 "const_int_operand" "i")))
(set (reg:PSI FB_REGNO)
(mem:PSI (reg:PSI FB_REGNO)))
(define_insn "epilogue_exitd_16"
[(set (reg:HI SP_REGNO)
(plus:HI (reg:HI FB_REGNO)
(const_int 2)))
(set (reg:HI FB_REGNO)
(mem:HI (reg:HI FB_REGNO)))
(return)
]
""
"TARGET_A16"
"exitd"
[(set_attr "flags" "x")]
)
(define_insn "epilogue_reit"
[(set (reg:PSI SP_REGNO)
(plus:PSI (reg:PSI SP_REGNO)
(match_operand 0 "const_int_operand" "i")))
(define_insn "epilogue_reit_16"
[(set (reg:HI SP_REGNO)
(plus:HI (reg:HI SP_REGNO)
(const_int 4)))
(return)
]
""
"TARGET_A16"
"reit"
[(set_attr "flags" "x")]
)
(define_insn "epilogue_exitd_24"
[(set (reg:PSI SP_REGNO)
(plus:PSI (reg:PSI FB_REGNO)
(const_int 4)))
(set (reg:PSI FB_REGNO)
(mem:PSI (reg:PSI FB_REGNO)))
(return)
]
"TARGET_A24"
"exitd"
[(set_attr "flags" "x")]
)
(define_insn "epilogue_reit_24"
[(set (reg:PSI SP_REGNO)
(plus:PSI (reg:PSI SP_REGNO)
(const_int 6)))
(return)
]
"TARGET_A24"
"reit"
[(set_attr "flags" "x")]
)