From 4c95db67505f94a1c8f0554a4a3d00318e214b62 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 1 Jul 1998 20:16:54 +0000 Subject: [PATCH] h8300.c (print_operand): Delete %L support. * h8300.c (print_operand): Delete %L support. * h8300.md (branch_true, branch_false): Use %= with a prefix instead of %L for local branch labels. Prevents emitting of "tl###" labels that are not assembler-temporary and thus confuse gdb. From-SVN: r20881 --- gcc/ChangeLog | 6 ++++++ gcc/config/h8300/h8300.c | 10 ---------- gcc/config/h8300/h8300.h | 5 ++++- gcc/config/h8300/h8300.md | 9 +++------ 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1d81fd1c9a5..3724b488670 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Wed Jul 1 23:12:58 1998 Ken Raeburn + + * h8300.c (print_operand): Delete %L support. + * h8300.md (branch_true, branch_false): Use %= with a prefix + instead of %L for local branch labels. + Wed Jul 1 21:27:13 1998 J"orn Rennecke * reload1.c (emit_reload_insns): Use proper register classes for diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c index 560a20bb599..e0dff83c9d3 100644 --- a/gcc/config/h8300/h8300.c +++ b/gcc/config/h8300/h8300.c @@ -1024,7 +1024,6 @@ const_costs (r, c) 'E' like s but negative. 'F' like t but negative. 'G' constant just the negative - 'L' fake label, changed after used twice. 'M' turn a 'M' constant into its negative mod 2. 'P' if operand is incing/decing sp, print .w, otherwise .b. 'R' print operand as a byte:8 address if appropriate, else fall back to @@ -1098,9 +1097,6 @@ print_operand (file, x, code) rtx x; int code; { - /* This is used to general unique labels for the 'L' code. */ - static int lab = 1000; - /* This is used for communication between the 'P' and 'U' codes. */ static char *last_p; @@ -1149,12 +1145,6 @@ print_operand (file, x, code) abort (); fprintf (file, "#%d", 0xff & (-INTVAL (x))); break; - case 'L': - /* 'L' must always be used twice in a single pattern. It generates - the same label twice, and then will generate a unique label the - next time it is used. */ - asm_fprintf (file, "tl%d", (lab++) / 2); - break; case 'M': /* For 3/-3 and 4/-4, the other 2 is handled separately. */ switch (INTVAL (x)) diff --git a/gcc/config/h8300/h8300.h b/gcc/config/h8300/h8300.h index 8a492d76985..4da7c9ea96f 100644 --- a/gcc/config/h8300/h8300.h +++ b/gcc/config/h8300/h8300.h @@ -1202,7 +1202,10 @@ readonly_data() \ #define USER_LABEL_PREFIX "_" /* This is how to output an internal numbered label where - PREFIX is the class of label and NUM is the number within the class. */ + PREFIX is the class of label and NUM is the number within the class. + + N.B.: The h8300.md branch_true and branch_false patterns also know + how to generate internal labels. */ #define ASM_OUTPUT_INTERNAL_LABEL(FILE, PREFIX, NUM) \ fprintf (FILE, ".%s%d:\n", PREFIX, NUM) diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md index 79da8bfb923..a94a5ad55b2 100644 --- a/gcc/config/h8300/h8300.md +++ b/gcc/config/h8300/h8300.md @@ -1,5 +1,5 @@ ;; GCC machine description for Hitachi H8/300 -;; Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. +;; Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. ;; Contributed by Steve Chamberlain (sac@cygnus.com), ;; Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com). @@ -1487,7 +1487,7 @@ else if (get_attr_length (insn) == 4) return \"b%j1 %l0:16\"; else - return \"b%k1 %L0\;jmp @%l0\;%L0:\"; + return \"b%k1 .Lh8BR%=\;jmp @%l0\\n.Lh8BR%=:\"; }" [(set_attr "type" "branch") (set_attr "cc" "none")]) @@ -1516,7 +1516,7 @@ else if (get_attr_length (insn) == 4) return \"b%k1 %l0:16\"; else - return \"b%j1 %L0\;jmp @%l0\;%L0:\"; + return \"b%j1 .Lh8BR%=\;jmp @%l0\\n.Lh8BR%=:\"; }" [(set_attr "type" "branch") (set_attr "cc" "none")]) @@ -1669,8 +1669,6 @@ "" " { - extern int optimize; - if (TARGET_H8300 && GET_CODE (operands[1]) != CONST_INT && !optimize) @@ -1753,7 +1751,6 @@ "" " { - extern int optimize; if (TARGET_H8300 && GET_CODE (operands[1]) != CONST_INT && !optimize) -- 2.30.2