Commit d0396b79 by Nathan Sidwell Committed by Nathan Sidwell

i386.c (type_natural_mode): Use gcc_unreachable and gcc_assert instead of abort.

	* config/i386/i386.c (type_natural_mode): Use gcc_unreachable and
	gcc_assert instead of abort.
	(classify_argument, examine_argument, construct_container,
	contains_128bit_aligned_vector_p, ix86_check_movabs,
	standard_80387_constant_opcode, standard_80387_constant_rtx,
	ix86_initial_elimination_offset, ix86_compute_frame_layout,
	pro_epilogue_adjust_stack, ix86_expand_epilogue,
	ix86_address_cost, legitimate_address_p, legitimize_pic_address,
	legitimize_tls_address, output_pic_addr_const,
	i386_output_dwarf_dtprel, put_condition_code, print_reg,
	get_some_local_dynamic_name, print_operand, print_operand_address,
	output_387_binary_op, emit_i387_cw_initialization,
	output_fix_trunc, output_fp_compare, ix86_output_addr_vec_elt,
	ix86_expand_clear, ix86_expand_binary_operator,
	ix86_expand_unary_operator, ix86_match_ccmode, ix86_cc_mode,
	ix86_cc_modes_compatible, ix86_fp_comparison_codes,
	ix86_fp_comparison_arithmetics_cost, ix86_expand_fp_compare,
	ix86_expand_branch, ix86_expand_setcc,
	ix86_expand_carry_flag_compare, ix86_expand_fp_movcc,
	ix86_expand_int_addcc, ix86_split_to_parts, ix86_split_long_move,
	ix86_expand_movmem, ix86_expand_call, assign_386_stack_local,
	memory_address_length, ix86_attr_length_immediate_default,
	ix86_attr_length_address_default, ix86_agi_dependant,
	x86_initialize_trampoline, ix86_init_mmx_sse_builtins,
	ix86_expand_binop_builtin, ix86_force_to_memory,
	ix86_secondary_memory_needed, ix86_avoid_jump_misspredicts,
	x86_emit_floatuns): Likewise.
	* config/i386/netware.c (gen_regparm_prefix,
	i386_nlm_strip_name_encoding): Likewise.
	* config/i386/winnt.c (i386_pe_mark_dllexport): Likewise.

From-SVN: r98500
parent e3feb571
2005-04-21 Nathan Sidwell <nathan@codesourcery.com> 2005-04-21 Nathan Sidwell <nathan@codesourcery.com>
* config/i386/i386.c (type_natural_mode): Use gcc_unreachable and
gcc_assert instead of abort.
(classify_argument, examine_argument, construct_container,
contains_128bit_aligned_vector_p, ix86_check_movabs,
standard_80387_constant_opcode, standard_80387_constant_rtx,
ix86_initial_elimination_offset, ix86_compute_frame_layout,
pro_epilogue_adjust_stack, ix86_expand_epilogue,
ix86_address_cost, legitimate_address_p, legitimize_pic_address,
legitimize_tls_address, output_pic_addr_const,
i386_output_dwarf_dtprel, put_condition_code, print_reg,
get_some_local_dynamic_name, print_operand, print_operand_address,
output_387_binary_op, emit_i387_cw_initialization,
output_fix_trunc, output_fp_compare, ix86_output_addr_vec_elt,
ix86_expand_clear, ix86_expand_binary_operator,
ix86_expand_unary_operator, ix86_match_ccmode, ix86_cc_mode,
ix86_cc_modes_compatible, ix86_fp_comparison_codes,
ix86_fp_comparison_arithmetics_cost, ix86_expand_fp_compare,
ix86_expand_branch, ix86_expand_setcc,
ix86_expand_carry_flag_compare, ix86_expand_fp_movcc,
ix86_expand_int_addcc, ix86_split_to_parts, ix86_split_long_move,
ix86_expand_movmem, ix86_expand_call, assign_386_stack_local,
memory_address_length, ix86_attr_length_immediate_default,
ix86_attr_length_address_default, ix86_agi_dependant,
x86_initialize_trampoline, ix86_init_mmx_sse_builtins,
ix86_expand_binop_builtin, ix86_force_to_memory,
ix86_secondary_memory_needed, ix86_avoid_jump_misspredicts,
x86_emit_floatuns): Likewise.
* config/i386/netware.c (gen_regparm_prefix,
i386_nlm_strip_name_encoding): Likewise.
* config/i386/winnt.c (i386_pe_mark_dllexport): Likewise.
2005-04-21 Nathan Sidwell <nathan@codesourcery.com>
* optabs.c (gen_condiational_trap): Remove #define. * optabs.c (gen_condiational_trap): Remove #define.
(add_equal_note): Assertify. Remove explicit indirection from (add_equal_note): Assertify. Remove explicit indirection from
call via function pointer. call via function pointer.
......
...@@ -150,7 +150,7 @@ gen_regparm_prefix (tree decl, unsigned nregs) ...@@ -150,7 +150,7 @@ gen_regparm_prefix (tree decl, unsigned nregs)
if (nregs > total / BITS_PER_WORD) if (nregs > total / BITS_PER_WORD)
nregs = total / BITS_PER_WORD; nregs = total / BITS_PER_WORD;
if (nregs > 9) abort(); gcc_assert (nregs <= 9);
newsym = alloca (2 + strlen (asmname) + 1 + 1); newsym = alloca (2 + strlen (asmname) + 1 + 1);
return IDENTIFIER_POINTER (get_identifier_with_length (newsym, return IDENTIFIER_POINTER (get_identifier_with_length (newsym,
sprintf (newsym, "_%u@%s", nregs, asmname))); sprintf (newsym, "_%u@%s", nregs, asmname)));
...@@ -201,8 +201,12 @@ i386_nlm_strip_name_encoding (const char *str) ...@@ -201,8 +201,12 @@ i386_nlm_strip_name_encoding (const char *str)
++name; ++name;
if (ISDIGIT (p[1])) if (ISDIGIT (p[1]))
name = ggc_alloc_string (name, p - name); name = ggc_alloc_string (name, p - name);
else if (!ISDIGIT (*name) || ++name != p) else
abort(); {
gcc_assert (ISDIGIT (*name));
name++;
gcc_assert (name == p);
}
} }
} }
return name; return name;
......
...@@ -273,13 +273,10 @@ i386_pe_mark_dllexport (tree decl) ...@@ -273,13 +273,10 @@ i386_pe_mark_dllexport (tree decl)
tree idp; tree idp;
rtlname = XEXP (DECL_RTL (decl), 0); rtlname = XEXP (DECL_RTL (decl), 0);
if (GET_CODE (rtlname) == SYMBOL_REF) if (GET_CODE (rtlname) == MEM)
oldname = XSTR (rtlname, 0); rtlname = XEXP (rtlname, 0);
else if (GET_CODE (rtlname) == MEM gcc_assert (GET_CODE (rtlname) == SYMBOL_REF);
&& GET_CODE (XEXP (rtlname, 0)) == SYMBOL_REF) oldname = XSTR (rtlname, 0);
oldname = XSTR (XEXP (rtlname, 0), 0);
else
abort ();
if (i386_pe_dllimport_name_p (oldname)) if (i386_pe_dllimport_name_p (oldname))
{ {
warning ("%Jinconsistent dll linkage for '%D', dllexport assumed.", warning ("%Jinconsistent dll linkage for '%D', dllexport assumed.",
...@@ -317,13 +314,10 @@ i386_pe_mark_dllimport (tree decl) ...@@ -317,13 +314,10 @@ i386_pe_mark_dllimport (tree decl)
rtx symref; rtx symref;
rtlname = XEXP (DECL_RTL (decl), 0); rtlname = XEXP (DECL_RTL (decl), 0);
if (GET_CODE (rtlname) == SYMBOL_REF) if (GET_CODE (rtlname) == MEM)
oldname = XSTR (rtlname, 0); rtlname = XEXP (rtlname, 0);
else if (GET_CODE (rtlname) == MEM gcc_assert (GET_CODE (rtlname) == SYMBOL_REF);
&& GET_CODE (XEXP (rtlname, 0)) == SYMBOL_REF) oldname = XSTR (rtlname, 0);
oldname = XSTR (XEXP (rtlname, 0), 0);
else
abort ();
if (i386_pe_dllexport_name_p (oldname)) if (i386_pe_dllexport_name_p (oldname))
{ {
error ("%qs declared as both exported to and imported from a DLL", error ("%qs declared as both exported to and imported from a DLL",
...@@ -332,14 +326,9 @@ i386_pe_mark_dllimport (tree decl) ...@@ -332,14 +326,9 @@ i386_pe_mark_dllimport (tree decl)
} }
else if (i386_pe_dllimport_name_p (oldname)) else if (i386_pe_dllimport_name_p (oldname))
{ {
/* Already done, but do a sanity check to prevent assembler errors. */ /* Already done, but do a sanity check to prevent assembler
if (!DECL_EXTERNAL (decl) || !TREE_PUBLIC (decl)) errors. */
{ gcc_assert (DECL_EXTERNAL (decl) && TREE_PUBLIC (decl));
error ("%Jfailure in redeclaration of '%D': dllimport'd "
"symbol lacks external linkage.", decl, decl);
abort();
}
return;
} }
newname = alloca (strlen (DLL_IMPORT_PREFIX) + strlen (oldname) + 1); newname = alloca (strlen (DLL_IMPORT_PREFIX) + strlen (oldname) + 1);
......
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