Patch for PR rtl-optimization/22472 (Critical HPPA bug)
Steve Ellcey
sje@cup.hp.com
Mon Jul 25 16:06:00 GMT 2005
> I wasn't thinking clearly last night (too much beer at the OLS party).
> I believe the above should be:
>
> #define HARD_REGNO_RENAME_OK(OLD_REG, NEW_REG) \
> ((NEW_REG) != 2 || regs_ever_live[2] || current_function_calls_eh_return)
David,
I tested your modification of my patch and it seems to work fine for me.
I had no regressions and it fixes the bug. Is it OK to check it in?
Steve Ellcey
sje@cup.hp.com
2005-07-25 Steve Ellcey <sje@cup.hp.com>
PR rtl-optimization/22472
* config/pa/pa.h (HARD_REGNO_RENAME_OK): Define.
*** gcc.orig/gcc/config/pa/pa.h Wed Jul 20 10:37:07 2005
--- gcc/gcc/config/pa/pa.h Mon Jul 25 08:33:52 2005
*************** typedef struct machine_function GTY(())
*** 358,363 ****
--- 358,369 ----
#define FRAME_POINTER_REQUIRED \
(current_function_calls_alloca)
+ /* Don't allow hard registers to be renamed into r2 unless r2
+ is already live or already being saved (due to eh). */
+
+ #define HARD_REGNO_RENAME_OK(OLD_REG, NEW_REG) \
+ ((NEW_REG) != 2 || regs_ever_live[2] || current_function_calls_eh_return)
+
/* C statement to store the difference between the frame pointer
and the stack pointer values immediately after the function prologue.
More information about the Gcc-patches
mailing list