From c874ab1193089e2de87c7193f5e264719d10ebb1 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Wed, 7 Mar 2001 20:28:19 +0000 Subject: [PATCH] a29k.c (print_operand): Free a29k_last_prologue_insn after its emitted. 2001-03-07 Andrew MacLeod * config/a29k/a29k.c (print_operand): Free a29k_last_prologue_insn after its emitted. (output_prologue): Use xmalloc not oballoc. (output_epilog): Free a29k_first_epilogue_insn when finished. * confif/a29k/a29k.h (PREDICATE_CODES): Remove shift_constant_operand. From-SVN: r40301 --- gcc/ChangeLog | 8 ++++++++ gcc/config/a29k/a29k.c | 11 +++++++++-- gcc/config/a29k/a29k.h | 1 - 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c24116e..1247f16 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2001-03-07 Andrew MacLeod + + * config/a29k/a29k.c (print_operand): Free a29k_last_prologue_insn + after its emitted. + (output_prologue): Use xmalloc not oballoc. + (output_epilog): Free a29k_first_epilogue_insn when finished. + * confif/a29k/a29k.h (PREDICATE_CODES): Remove shift_constant_operand. + 2001-03-07 Brad Lucier * builtins.c (expand_builtin_mathfn): Check diff --git a/gcc/config/a29k/a29k.c b/gcc/config/a29k/a29k.c index 5a87e94..a895f44 100644 --- a/gcc/config/a29k/a29k.c +++ b/gcc/config/a29k/a29k.c @@ -1082,6 +1082,7 @@ print_operand (file, x, code) else if (a29k_last_prologue_insn) { fprintf (file, "\n\t%s", a29k_last_prologue_insn); + free (a29k_last_prologue_insn); a29k_last_prologue_insn = 0; } else if (optimize && flag_delayed_branch @@ -1105,6 +1106,7 @@ print_operand (file, x, code) if (a29k_last_prologue_insn) { fprintf (file, "\n\t%s", a29k_last_prologue_insn); + free (a29k_last_prologue_insn); a29k_last_prologue_insn = 0; } else if (GET_CODE (x) == SYMBOL_REF @@ -1159,6 +1161,7 @@ print_operand (file, x, code) if (a29k_last_prologue_insn) { fprintf (file, "\n\t%s", a29k_last_prologue_insn); + free (a29k_last_prologue_insn); a29k_last_prologue_insn = 0; } else @@ -1387,7 +1390,7 @@ output_prolog (file, size) if (num_delay_slots (insn) > 0) { - a29k_last_prologue_insn = (char *) oballoc (100); + a29k_last_prologue_insn = (char *) xmalloc (100); sprintf (a29k_last_prologue_insn, "add lr1,gr1,%d", i); break; } @@ -1404,7 +1407,7 @@ output_prolog (file, size) if (size == 0 && a29k_regstack_size == 0 && ! frame_pointer_needed) a29k_first_epilogue_insn = 0; else - a29k_first_epilogue_insn = (char *) oballoc (100); + a29k_first_epilogue_insn = (char *) xmalloc (100); if (frame_pointer_needed) sprintf (a29k_first_epilogue_insn, "sll %s,%s,0", @@ -1547,4 +1550,8 @@ output_epilog (file, size) file, 1, -2, 1); else fprintf (file, "\tnop\n"); + + if (a29k_first_epilogue_insn) + free (a29k_first_epilogue_insn); + a29k_first_epilogue_insn = 0; } diff --git a/gcc/config/a29k/a29k.h b/gcc/config/a29k/a29k.h index 12c6526..3ee8bf7 100644 --- a/gcc/config/a29k/a29k.h +++ b/gcc/config/a29k/a29k.h @@ -1635,7 +1635,6 @@ extern int a29k_debug_reg_map[]; {"cint_16_operand", {CONST_INT}}, \ {"long_const_operand", {CONST_INT, CONST, CONST_DOUBLE, \ LABEL_REF, SYMBOL_REF}}, \ - {"shift_constant_operand", {CONST_INT, ASHIFT}}, \ {"const_0_operand", {CONST_INT, ASHIFT}}, \ {"const_8_operand", {CONST_INT, ASHIFT}}, \ {"const_16_operand", {CONST_INT, ASHIFT}}, \ -- 2.7.4