From f5a979fb1459493ff8e00f2e1295680eaf6e248c Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Thu, 2 Dec 2004 16:18:25 +0000 Subject: [PATCH] - fixed problem with "fixed or forbidden register" bx or bp being spilled for inline assembly that requires a lot of register operands. Now these registers are only spilled if it is safe to do so (if -fno-pic or -fomit-frame-pointer has been given). git-svn-id: file:///srv/svn/repos/haiku/trunk/buildtools@10349 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- gcc/gcc/reload1.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/gcc/reload1.c b/gcc/gcc/reload1.c index 24eb0116a7..3d073e309d 100644 --- a/gcc/gcc/reload1.c +++ b/gcc/gcc/reload1.c @@ -4155,6 +4155,7 @@ order_regs_for_reload (chain) int regno = reg_alloc_order[i]; if (hard_reg_n_uses[regno].uses == 0 + && !fixed_regs[regno] && ! TEST_HARD_REG_BIT (bad_spill_regs, regno)) potential_reload_regs[o++] = regno; } @@ -4162,12 +4163,14 @@ order_regs_for_reload (chain) for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) { if (hard_reg_n_uses[i].uses == 0 && call_used_regs[i] + && !fixed_regs[i] && ! TEST_HARD_REG_BIT (bad_spill_regs, i)) potential_reload_regs[o++] = i; } for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) { if (hard_reg_n_uses[i].uses == 0 && ! call_used_regs[i] + && !fixed_regs[i] && ! TEST_HARD_REG_BIT (bad_spill_regs, i)) potential_reload_regs[o++] = i; } @@ -4182,10 +4185,13 @@ order_regs_for_reload (chain) for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) if (hard_reg_n_uses[i].uses != 0 + && !fixed_regs[hard_reg_n_uses[i].regno] && ! TEST_HARD_REG_BIT (bad_spill_regs, hard_reg_n_uses[i].regno)) potential_reload_regs[o++] = hard_reg_n_uses[i].regno; for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - if (TEST_HARD_REG_BIT (bad_spill_regs, hard_reg_n_uses[i].regno)) + if (TEST_HARD_REG_BIT (bad_spill_regs, hard_reg_n_uses[i].regno) + && !fixed_regs[hard_reg_n_uses[i].regno] +) potential_reload_regs[o++] = hard_reg_n_uses[i].regno; }