+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.
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
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,
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
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;
/* 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.
#include "config.h"
+#include <stdio.h>
#include "rtl.h"
#include "tree.h"
#include "flags.h"
rtx terminate_libfunc;
rtx setjmp_libfunc;
rtx longjmp_libfunc;
-rtx get_dynamic_handler_chain_libfunc;
rtx eqhf2_libfunc;
rtx nehf2_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. */
case LE:
libfunc = lehf2_libfunc;
break;
+
+ default:
+ break;
}
else if (mode == SFmode)
switch (comparison)
case LE:
libfunc = lesf2_libfunc;
break;
+
+ default:
+ break;
}
else if (mode == DFmode)
switch (comparison)
case LE:
libfunc = ledf2_libfunc;
break;
+
+ default:
+ break;
}
else if (mode == XFmode)
switch (comparison)
case LE:
libfunc = lexf2_libfunc;
break;
+
+ default:
+ break;
}
else if (mode == TFmode)
switch (comparison)
case LE:
libfunc = letf2_libfunc;
break;
+
+ default:
+ break;
}
else
{
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");
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. */