summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1997-11-25 09:30:38 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1997-11-25 09:30:38 +0000
commitc96dd0ff2cdcb55cbf4a5fb5cadf569736559ba8 (patch)
treeca6591a7b866135d15eb5a98ad1717ce4efd9672 /gcc
parentd03901d4276714a7c410d43258bf7237e9ca6d88 (diff)
downloadgcc-c96dd0ff2cdcb55cbf4a5fb5cadf569736559ba8.tar.gz
Tue Nov 25 01:26:55 1997 Bruno Haible <haible@ilog.fr>:
* dwarf2out.c (ASM_OUTPUT_DWARF_DELTA1): Implement. Mon Nov 24 22:41:55 1997 Jason Merrill <jason@yorick.cygnus.com> * except.c (get_dynamic_handler_chain): Build up a FUNCTION_DECL. * optabs.c (init_optabs): Lose get_dynamic_handler_chain_libfunc. * expr.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16696 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/dwarf2out.c16
-rw-r--r--gcc/except.c44
-rw-r--r--gcc/expr.h1
-rw-r--r--gcc/optabs.c22
5 files changed, 75 insertions, 18 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0b55fa726d9..647638c5d32 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+Tue Nov 25 01:26:55 1997 Bruno Haible <haible@ilog.fr>:
+
+ * dwarf2out.c (ASM_OUTPUT_DWARF_DELTA1): Implement.
+
+Mon Nov 24 22:41:55 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * except.c (get_dynamic_handler_chain): Build up a FUNCTION_DECL.
+ * optabs.c (init_optabs): Lose get_dynamic_handler_chain_libfunc.
+ * expr.h: Likewise.
+
Fri Nov 21 15:20:05 1997 Jeffrey A Law (law@cygnus.com)
* Makefile.in (program_transform_cross_name): Clean up "-e" confusion.
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 5aac63db812..e9bae0026f9 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -266,6 +266,15 @@ static unsigned reg_number PROTO((rtx));
fprintf ((FILE), "\t%s\t0x%x", ASM_BYTE_OP, VALUE)
#endif
+#ifndef ASM_OUTPUT_DWARF_DELTA1
+#define ASM_OUTPUT_DWARF_DELTA1(FILE,LABEL1,LABEL2) \
+ do { fprintf ((FILE), "\t%s\t", ASM_BYTE_OP); \
+ assemble_name (FILE, LABEL1); \
+ fprintf (FILE, "-"); \
+ assemble_name (FILE, LABEL2); \
+ } while (0)
+#endif
+
#ifdef UNALIGNED_INT_ASM_OP
#ifndef UNALIGNED_OFFSET_ASM_OP
@@ -1451,8 +1460,11 @@ output_cfi (cfi, fde)
fputc ('\n', asm_out_file);
break;
case DW_CFA_advance_loc1:
- /* TODO: not currently implemented. */
- abort ();
+ ASM_OUTPUT_DWARF_DELTA1 (asm_out_file,
+ cfi->dw_cfi_oprnd1.dw_cfi_addr,
+ fde->dw_fde_current_label);
+ fputc ('\n', asm_out_file);
+ fde->dw_fde_current_label = cfi->dw_cfi_oprnd1.dw_cfi_addr;
break;
case DW_CFA_advance_loc2:
ASM_OUTPUT_DWARF_DELTA2 (asm_out_file,
diff --git a/gcc/except.c b/gcc/except.c
index 05d66dbe6d2..cdfa9777a90 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -743,24 +743,44 @@ get_dynamic_handler_chain ()
rtx dhc, insns;
start_sequence ();
- dhc = emit_library_call_value (get_dynamic_handler_chain_libfunc,
- NULL_RTX, 1,
- Pmode, 0);
- current_function_dhc = copy_to_reg (dhc);
+ /* ... */
insns = get_insns ();
end_sequence ();
emit_insns_before (insns, get_first_nonparm_insn ());
}
-#else
- rtx dhc;
- dhc = emit_library_call_value (get_dynamic_handler_chain_libfunc,
- NULL_RTX, 1,
- Pmode, 0);
- current_function_dhc = copy_to_reg (dhc);
-#endif
-
/* We don't want a copy of the dhc, but rather, the single dhc. */
return gen_rtx (MEM, Pmode, current_function_dhc);
+#endif
+
+ static tree fn;
+ tree expr;
+
+ if (fn == NULL_TREE)
+ {
+ tree fntype;
+ fn = get_identifier ("__get_dynamic_handler_chain");
+ push_obstacks_nochange ();
+ end_temporary_allocation ();
+ fntype = build_pointer_type (build_pointer_type
+ (build_pointer_type (void_type_node)));
+ fntype = build_function_type (fntype, NULL_TREE);
+ fn = build_decl (FUNCTION_DECL, fn, fntype);
+ DECL_EXTERNAL (fn) = 1;
+ TREE_PUBLIC (fn) = 1;
+ DECL_ARTIFICIAL (fn) = 1;
+ TREE_READONLY (fn) = 1;
+ make_decl_rtl (fn, NULL_PTR, 1);
+ assemble_external (fn);
+ pop_obstacks ();
+ }
+
+ expr = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (fn)), fn);
+ expr = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)),
+ expr, NULL_TREE, NULL_TREE);
+ TREE_SIDE_EFFECTS (expr) = 1;
+ expr = build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (expr)), expr);
+
+ return expand_expr (expr, NULL_RTX, VOIDmode, 0);
}
/* Get a reference to the dynamic cleanup chain. It points to the
diff --git a/gcc/expr.h b/gcc/expr.h
index 15f1addb1a5..aec539a422f 100644
--- a/gcc/expr.h
+++ b/gcc/expr.h
@@ -416,7 +416,6 @@ extern rtx sjpopnthrow_libfunc;
extern rtx terminate_libfunc;
extern rtx setjmp_libfunc;
extern rtx longjmp_libfunc;
-extern rtx get_dynamic_handler_chain_libfunc;
extern rtx eqhf2_libfunc;
extern rtx nehf2_libfunc;
diff --git a/gcc/optabs.c b/gcc/optabs.c
index a5f2e7ed064..067db59ef7b 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -1,5 +1,5 @@
/* Expand the basic unary and binary arithmetic operations, for GNU compiler.
- Copyright (C) 1987, 88, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 92-96, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -20,6 +20,7 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
+#include <stdio.h>
#include "rtl.h"
#include "tree.h"
#include "flags.h"
@@ -124,7 +125,6 @@ rtx sjpopnthrow_libfunc;
rtx terminate_libfunc;
rtx setjmp_libfunc;
rtx longjmp_libfunc;
-rtx get_dynamic_handler_chain_libfunc;
rtx eqhf2_libfunc;
rtx nehf2_libfunc;
@@ -213,6 +213,7 @@ rtx chkr_check_addr_libfunc;
rtx chkr_set_right_libfunc;
rtx chkr_copy_bitmap_libfunc;
rtx chkr_check_exec_libfunc;
+rtx chkr_check_str_libfunc;
/* Indexed by the rtx-code for a conditional (eg. EQ, LT,...)
gives the gen_function to make a branch to test that condition. */
@@ -2959,6 +2960,9 @@ emit_float_lib_cmp (x, y, comparison)
case LE:
libfunc = lehf2_libfunc;
break;
+
+ default:
+ break;
}
else if (mode == SFmode)
switch (comparison)
@@ -2986,6 +2990,9 @@ emit_float_lib_cmp (x, y, comparison)
case LE:
libfunc = lesf2_libfunc;
break;
+
+ default:
+ break;
}
else if (mode == DFmode)
switch (comparison)
@@ -3013,6 +3020,9 @@ emit_float_lib_cmp (x, y, comparison)
case LE:
libfunc = ledf2_libfunc;
break;
+
+ default:
+ break;
}
else if (mode == XFmode)
switch (comparison)
@@ -3040,6 +3050,9 @@ emit_float_lib_cmp (x, y, comparison)
case LE:
libfunc = lexf2_libfunc;
break;
+
+ default:
+ break;
}
else if (mode == TFmode)
switch (comparison)
@@ -3067,6 +3080,9 @@ emit_float_lib_cmp (x, y, comparison)
case LE:
libfunc = letf2_libfunc;
break;
+
+ default:
+ break;
}
else
{
@@ -4289,7 +4305,6 @@ init_optabs ()
setjmp_libfunc = gen_rtx (SYMBOL_REF, Pmode, "setjmp");
longjmp_libfunc = gen_rtx (SYMBOL_REF, Pmode, "longjmp");
#endif
- get_dynamic_handler_chain_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__get_dynamic_handler_chain");
eqhf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__eqhf2");
nehf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__nehf2");
@@ -4379,6 +4394,7 @@ init_optabs ()
chkr_set_right_libfunc = gen_rtx (SYMBOL_REF, VOIDmode, "chkr_set_right");
chkr_copy_bitmap_libfunc = gen_rtx (SYMBOL_REF, VOIDmode, "chkr_copy_bitmap");
chkr_check_exec_libfunc = gen_rtx (SYMBOL_REF, VOIDmode, "chkr_check_exec");
+ chkr_check_str_libfunc = gen_rtx (SYMBOL_REF, VOIDmode, "chkr_check_str");
#ifdef INIT_TARGET_OPTABS
/* Allow the target to add more libcalls or rename some, etc. */