Index: gcc/gcc/config/mips/sde.h |
diff --git a/gcc/gcc/config/mips/sde.h b/gcc/gcc/config/mips/sde.h |
index 3640883e042c17844385a2d9e2f1e56287410dba..d2a32967b75488e5c352c229d0ccb253d30c6ad8 100644 |
--- a/gcc/gcc/config/mips/sde.h |
+++ b/gcc/gcc/config/mips/sde.h |
@@ -90,7 +90,8 @@ along with GCC; see the file COPYING3. If not see |
/* Use $5 as a temporary for both MIPS16 and non-MIPS16. */ |
#undef MIPS_EPILOGUE_TEMP_REGNUM |
-#define MIPS_EPILOGUE_TEMP_REGNUM (GP_REG_FIRST + 5) |
+#define MIPS_EPILOGUE_TEMP_REGNUM \ |
+ (cfun->machine->interrupt_handler_p ? K0_REG_NUM : GP_REG_FIRST + 5) |
/* Using long will always be right for size_t and ptrdiff_t, since |
sizeof(long) must equal sizeof(void *), following from the setting |