Commit bb727b5a by Jason Merrill

[multiple changes]

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.

From-SVN: r16696
parent 9b493293
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) Fri Nov 21 15:20:05 1997 Jeffrey A Law (law@cygnus.com)
* Makefile.in (program_transform_cross_name): Clean up "-e" confusion. * Makefile.in (program_transform_cross_name): Clean up "-e" confusion.
......
...@@ -266,6 +266,15 @@ static unsigned reg_number PROTO((rtx)); ...@@ -266,6 +266,15 @@ static unsigned reg_number PROTO((rtx));
fprintf ((FILE), "\t%s\t0x%x", ASM_BYTE_OP, VALUE) fprintf ((FILE), "\t%s\t0x%x", ASM_BYTE_OP, VALUE)
#endif #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 #ifdef UNALIGNED_INT_ASM_OP
#ifndef UNALIGNED_OFFSET_ASM_OP #ifndef UNALIGNED_OFFSET_ASM_OP
...@@ -1451,8 +1460,11 @@ output_cfi (cfi, fde) ...@@ -1451,8 +1460,11 @@ output_cfi (cfi, fde)
fputc ('\n', asm_out_file); fputc ('\n', asm_out_file);
break; break;
case DW_CFA_advance_loc1: case DW_CFA_advance_loc1:
/* TODO: not currently implemented. */ ASM_OUTPUT_DWARF_DELTA1 (asm_out_file,
abort (); 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; break;
case DW_CFA_advance_loc2: case DW_CFA_advance_loc2:
ASM_OUTPUT_DWARF_DELTA2 (asm_out_file, ASM_OUTPUT_DWARF_DELTA2 (asm_out_file,
......
...@@ -743,24 +743,44 @@ get_dynamic_handler_chain () ...@@ -743,24 +743,44 @@ get_dynamic_handler_chain ()
rtx dhc, insns; rtx dhc, insns;
start_sequence (); 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 (); insns = get_insns ();
end_sequence (); end_sequence ();
emit_insns_before (insns, get_first_nonparm_insn ()); 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. */ /* We don't want a copy of the dhc, but rather, the single dhc. */
return gen_rtx (MEM, Pmode, current_function_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 /* Get a reference to the dynamic cleanup chain. It points to the
......
...@@ -416,7 +416,6 @@ extern rtx sjpopnthrow_libfunc; ...@@ -416,7 +416,6 @@ extern rtx sjpopnthrow_libfunc;
extern rtx terminate_libfunc; extern rtx terminate_libfunc;
extern rtx setjmp_libfunc; extern rtx setjmp_libfunc;
extern rtx longjmp_libfunc; extern rtx longjmp_libfunc;
extern rtx get_dynamic_handler_chain_libfunc;
extern rtx eqhf2_libfunc; extern rtx eqhf2_libfunc;
extern rtx nehf2_libfunc; extern rtx nehf2_libfunc;
......
/* Expand the basic unary and binary arithmetic operations, for GNU compiler. /* 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. This file is part of GNU CC.
...@@ -20,6 +20,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -20,6 +20,7 @@ Boston, MA 02111-1307, USA. */
#include "config.h" #include "config.h"
#include <stdio.h>
#include "rtl.h" #include "rtl.h"
#include "tree.h" #include "tree.h"
#include "flags.h" #include "flags.h"
...@@ -124,7 +125,6 @@ rtx sjpopnthrow_libfunc; ...@@ -124,7 +125,6 @@ rtx sjpopnthrow_libfunc;
rtx terminate_libfunc; rtx terminate_libfunc;
rtx setjmp_libfunc; rtx setjmp_libfunc;
rtx longjmp_libfunc; rtx longjmp_libfunc;
rtx get_dynamic_handler_chain_libfunc;
rtx eqhf2_libfunc; rtx eqhf2_libfunc;
rtx nehf2_libfunc; rtx nehf2_libfunc;
...@@ -213,6 +213,7 @@ rtx chkr_check_addr_libfunc; ...@@ -213,6 +213,7 @@ rtx chkr_check_addr_libfunc;
rtx chkr_set_right_libfunc; rtx chkr_set_right_libfunc;
rtx chkr_copy_bitmap_libfunc; rtx chkr_copy_bitmap_libfunc;
rtx chkr_check_exec_libfunc; rtx chkr_check_exec_libfunc;
rtx chkr_check_str_libfunc;
/* Indexed by the rtx-code for a conditional (eg. EQ, LT,...) /* Indexed by the rtx-code for a conditional (eg. EQ, LT,...)
gives the gen_function to make a branch to test that condition. */ gives the gen_function to make a branch to test that condition. */
...@@ -2959,6 +2960,9 @@ emit_float_lib_cmp (x, y, comparison) ...@@ -2959,6 +2960,9 @@ emit_float_lib_cmp (x, y, comparison)
case LE: case LE:
libfunc = lehf2_libfunc; libfunc = lehf2_libfunc;
break; break;
default:
break;
} }
else if (mode == SFmode) else if (mode == SFmode)
switch (comparison) switch (comparison)
...@@ -2986,6 +2990,9 @@ emit_float_lib_cmp (x, y, comparison) ...@@ -2986,6 +2990,9 @@ emit_float_lib_cmp (x, y, comparison)
case LE: case LE:
libfunc = lesf2_libfunc; libfunc = lesf2_libfunc;
break; break;
default:
break;
} }
else if (mode == DFmode) else if (mode == DFmode)
switch (comparison) switch (comparison)
...@@ -3013,6 +3020,9 @@ emit_float_lib_cmp (x, y, comparison) ...@@ -3013,6 +3020,9 @@ emit_float_lib_cmp (x, y, comparison)
case LE: case LE:
libfunc = ledf2_libfunc; libfunc = ledf2_libfunc;
break; break;
default:
break;
} }
else if (mode == XFmode) else if (mode == XFmode)
switch (comparison) switch (comparison)
...@@ -3040,6 +3050,9 @@ emit_float_lib_cmp (x, y, comparison) ...@@ -3040,6 +3050,9 @@ emit_float_lib_cmp (x, y, comparison)
case LE: case LE:
libfunc = lexf2_libfunc; libfunc = lexf2_libfunc;
break; break;
default:
break;
} }
else if (mode == TFmode) else if (mode == TFmode)
switch (comparison) switch (comparison)
...@@ -3067,6 +3080,9 @@ emit_float_lib_cmp (x, y, comparison) ...@@ -3067,6 +3080,9 @@ emit_float_lib_cmp (x, y, comparison)
case LE: case LE:
libfunc = letf2_libfunc; libfunc = letf2_libfunc;
break; break;
default:
break;
} }
else else
{ {
...@@ -4289,7 +4305,6 @@ init_optabs () ...@@ -4289,7 +4305,6 @@ init_optabs ()
setjmp_libfunc = gen_rtx (SYMBOL_REF, Pmode, "setjmp"); setjmp_libfunc = gen_rtx (SYMBOL_REF, Pmode, "setjmp");
longjmp_libfunc = gen_rtx (SYMBOL_REF, Pmode, "longjmp"); longjmp_libfunc = gen_rtx (SYMBOL_REF, Pmode, "longjmp");
#endif #endif
get_dynamic_handler_chain_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__get_dynamic_handler_chain");
eqhf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__eqhf2"); eqhf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__eqhf2");
nehf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__nehf2"); nehf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__nehf2");
...@@ -4379,6 +4394,7 @@ init_optabs () ...@@ -4379,6 +4394,7 @@ init_optabs ()
chkr_set_right_libfunc = gen_rtx (SYMBOL_REF, VOIDmode, "chkr_set_right"); 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_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_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 #ifdef INIT_TARGET_OPTABS
/* Allow the target to add more libcalls or rename some, etc. */ /* Allow the target to add more libcalls or rename some, etc. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment