diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 855042cd5d2..01b2e442e7f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-04-25 Ulrich Weigand + + * config/s390/s390.c (s390_emit_epilogue): Always restore registers + needed by the compiler, even if they are used as global regs. + 2002-04-25 Matt Hiller * mips.c (mips_class_max_nregs, mips_register_move_cost): New diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index c052e049fa6..ce51bcf18ca 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -3255,6 +3255,14 @@ s390_emit_epilogue () i <= frame.last_save_gpr; i++) { + /* These registers are special and need to be + restored in any case. */ + if (i == STACK_POINTER_REGNUM + || i == RETURN_REGNUM + || i == BASE_REGISTER + || (flag_pic && i == PIC_OFFSET_TABLE_REGNUM)) + continue; + if (global_regs[i]) { addr = plus_constant (frame_pointer,