From 11de4c7fa60b20493800ed4fb7f67eeb88825fa1 Mon Sep 17 00:00:00 2001 From: rearnsha Date: Sat, 13 Mar 1999 11:40:25 +0000 Subject: [PATCH] * arm.c (arm_split_constant): Don't try to force a constant to memory after arm_reorg has run. (after_arm_reorg): New static variable. (arm_reorg): Set it. (output_func_epilogue): Clear it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25742 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 ++++++++ gcc/config/arm/arm.c | 17 +++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fb4c7c01218..5e2ec7ac167 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +Sat Mar 13 11:36:16 1999 Richard Earnshaw (rearnsha@arm.com) + + * arm.c (arm_split_constant): Don't try to force a constant to + memory after arm_reorg has run. + (after_arm_reorg): New static variable. + (arm_reorg): Set it. + (output_func_epilogue): Clear it. + Fri Mar 12 20:26:32 1999 David Edelsohn * configure.in ({rs6000,powerpc}-ibm-aix*): Set float_format to none. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 478c2a0732a..4a393c94e11 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -128,6 +128,8 @@ int lr_save_eliminated; static int return_used_this_function; +static int after_arm_reorg = 0; + static int arm_constant_limit = 3; /* For an explanation of these variables, see final_prescan_insn below. */ @@ -604,8 +606,15 @@ arm_split_constant (code, mode, val, target, source, subtargets) || (GET_CODE (target) == REG && GET_CODE (source) == REG && REGNO (target) != REGNO (source))) { - if (arm_gen_constant (code, mode, val, target, source, 1, 0) - > arm_constant_limit + (code != SET)) + /* After arm_reorg has been called, we can't fix up expensive + constants by pushing them into memory so we must synthesise + them in-line, regardless of the cost. This is only likely to + be more costly on chips that have load delay slots and we are + compiling without running the scheduler (so no splitting + occurred before the final instruction emission. */ + if (! after_arm_reorg + && (arm_gen_constant (code, mode, val, target, source, 1, 0) + > arm_constant_limit + (code != SET))) { if (code == SET) { @@ -4022,6 +4031,8 @@ arm_reorg (first) insn = scan; } } + + after_arm_reorg = 1; } @@ -5378,7 +5389,9 @@ output_func_epilogue (f, frame_size) epilogue_done: + /* Reset the ARM-specific per-function variables. */ current_function_anonymous_args = 0; + after_arm_reorg = 0; } static void -- 2.11.4.GIT