Commit c26fbbca by Kazu Hirata Committed by Kazu Hirata

dwarf2out.c: Fix formatting.

	* dwarf2out.c: Fix formatting.
	* varasm.c: Likewise.

From-SVN: r53160
parent 0387639b
2002-05-04 Kazu Hirata <kazu@cs.umass.edu>
* dwarf2out.c: Fix formatting.
* varasm.c: Likewise.
2002-05-04 David Edelsohn <edelsohn@gnu.org> 2002-05-04 David Edelsohn <edelsohn@gnu.org>
PR c/6543 PR c/6543
......
...@@ -959,8 +959,8 @@ stack_adjust_offset (pattern) ...@@ -959,8 +959,8 @@ stack_adjust_offset (pattern)
src = XEXP (dest, 0); src = XEXP (dest, 0);
code = GET_CODE (src); code = GET_CODE (src);
switch (code) switch (code)
{ {
case PRE_MODIFY: case PRE_MODIFY:
case POST_MODIFY: case POST_MODIFY:
if (XEXP (src, 0) == stack_pointer_rtx) if (XEXP (src, 0) == stack_pointer_rtx)
...@@ -969,7 +969,7 @@ stack_adjust_offset (pattern) ...@@ -969,7 +969,7 @@ stack_adjust_offset (pattern)
/* We handle only adjustments by constant amount. */ /* We handle only adjustments by constant amount. */
if (GET_CODE (XEXP (src, 1)) != PLUS || if (GET_CODE (XEXP (src, 1)) != PLUS ||
GET_CODE (val) != CONST_INT) GET_CODE (val) != CONST_INT)
abort(); abort ();
offset = -INTVAL (val); offset = -INTVAL (val);
break; break;
} }
...@@ -1114,7 +1114,7 @@ flush_queued_reg_saves () ...@@ -1114,7 +1114,7 @@ flush_queued_reg_saves ()
{ {
struct queued_reg_save *q, *next; struct queued_reg_save *q, *next;
for (q = queued_reg_saves; q ; q = next) for (q = queued_reg_saves; q; q = next)
{ {
dwarf2out_reg_save (last_reg_save_label, REGNO (q->reg), q->cfa_offset); dwarf2out_reg_save (last_reg_save_label, REGNO (q->reg), q->cfa_offset);
next = q->next; next = q->next;
...@@ -1131,13 +1131,13 @@ clobbers_queued_reg_save (insn) ...@@ -1131,13 +1131,13 @@ clobbers_queued_reg_save (insn)
{ {
struct queued_reg_save *q; struct queued_reg_save *q;
for (q = queued_reg_saves; q ; q = q->next) for (q = queued_reg_saves; q; q = q->next)
if (modified_in_p (q->reg, insn)) if (modified_in_p (q->reg, insn))
return true; return true;
return false; return false;
} }
/* A temporary register holding an integral value used in adjusting SP /* A temporary register holding an integral value used in adjusting SP
or setting up the store_reg. The "offset" field holds the integer or setting up the store_reg. The "offset" field holds the integer
...@@ -1188,7 +1188,7 @@ static dw_cfa_location cfa_temp; ...@@ -1188,7 +1188,7 @@ static dw_cfa_location cfa_temp;
stores the value, which will be used to adjust the stores the value, which will be used to adjust the
stack pointer. cfa_temp is also used like cfa_store, stack pointer. cfa_temp is also used like cfa_store,
to track stores to the stack via fp or a temp reg. to track stores to the stack via fp or a temp reg.
Rules 1- 4: Setting a register's value to cfa.reg or an expression Rules 1- 4: Setting a register's value to cfa.reg or an expression
with cfa.reg as the first operand changes the cfa.reg and its with cfa.reg as the first operand changes the cfa.reg and its
cfa.offset. Rule 1 and 4 also set cfa_temp.reg and cfa.offset. Rule 1 and 4 also set cfa_temp.reg and
...@@ -1656,7 +1656,7 @@ dwarf2out_frame_debug (insn) ...@@ -1656,7 +1656,7 @@ dwarf2out_frame_debug (insn)
if (! RTX_FRAME_RELATED_P (insn)) if (! RTX_FRAME_RELATED_P (insn))
{ {
if (!ACCUMULATE_OUTGOING_ARGS) if (!ACCUMULATE_OUTGOING_ARGS)
dwarf2out_stack_adjust (insn); dwarf2out_stack_adjust (insn);
return; return;
} }
...@@ -1896,7 +1896,7 @@ output_call_frame_info (for_eh) ...@@ -1896,7 +1896,7 @@ output_call_frame_info (for_eh)
if (p > augmentation + 1) if (p > augmentation + 1)
{ {
augmentation[0] = 'z'; augmentation[0] = 'z';
*p = '\0'; *p = '\0';
} }
/* Ug. Some platforms can't do unaligned dynamic relocations at all. */ /* Ug. Some platforms can't do unaligned dynamic relocations at all. */
...@@ -1952,7 +1952,7 @@ output_call_frame_info (for_eh) ...@@ -1952,7 +1952,7 @@ output_call_frame_info (for_eh)
output_cfi (cfi, NULL, for_eh); output_cfi (cfi, NULL, for_eh);
/* Pad the CIE out to an address sized boundary. */ /* Pad the CIE out to an address sized boundary. */
ASM_OUTPUT_ALIGN (asm_out_file, ASM_OUTPUT_ALIGN (asm_out_file,
floor_log2 (for_eh ? PTR_SIZE : DWARF2_ADDR_SIZE)); floor_log2 (for_eh ? PTR_SIZE : DWARF2_ADDR_SIZE));
ASM_OUTPUT_LABEL (asm_out_file, l2); ASM_OUTPUT_LABEL (asm_out_file, l2);
...@@ -1984,15 +1984,15 @@ output_call_frame_info (for_eh) ...@@ -1984,15 +1984,15 @@ output_call_frame_info (for_eh)
gen_rtx_SYMBOL_REF (Pmode, fde->dw_fde_begin), gen_rtx_SYMBOL_REF (Pmode, fde->dw_fde_begin),
"FDE initial location"); "FDE initial location");
dw2_asm_output_delta (size_of_encoded_value (fde_encoding), dw2_asm_output_delta (size_of_encoded_value (fde_encoding),
fde->dw_fde_end, fde->dw_fde_begin, fde->dw_fde_end, fde->dw_fde_begin,
"FDE address range"); "FDE address range");
} }
else else
{ {
dw2_asm_output_addr (DWARF2_ADDR_SIZE, fde->dw_fde_begin, dw2_asm_output_addr (DWARF2_ADDR_SIZE, fde->dw_fde_begin,
"FDE initial location"); "FDE initial location");
dw2_asm_output_delta (DWARF2_ADDR_SIZE, dw2_asm_output_delta (DWARF2_ADDR_SIZE,
fde->dw_fde_end, fde->dw_fde_begin, fde->dw_fde_end, fde->dw_fde_begin,
"FDE address range"); "FDE address range");
} }
...@@ -2045,7 +2045,7 @@ output_call_frame_info (for_eh) ...@@ -2045,7 +2045,7 @@ output_call_frame_info (for_eh)
output_cfi (cfi, fde, for_eh); output_cfi (cfi, fde, for_eh);
/* Pad the FDE out to an address sized boundary. */ /* Pad the FDE out to an address sized boundary. */
ASM_OUTPUT_ALIGN (asm_out_file, ASM_OUTPUT_ALIGN (asm_out_file,
floor_log2 ((for_eh ? PTR_SIZE : DWARF2_ADDR_SIZE))); floor_log2 ((for_eh ? PTR_SIZE : DWARF2_ADDR_SIZE)));
ASM_OUTPUT_LABEL (asm_out_file, l2); ASM_OUTPUT_LABEL (asm_out_file, l2);
} }
...@@ -3681,7 +3681,7 @@ static void retry_incomplete_types PARAMS ((void)); ...@@ -3681,7 +3681,7 @@ static void retry_incomplete_types PARAMS ((void));
static void gen_type_die_for_member PARAMS ((tree, tree, dw_die_ref)); static void gen_type_die_for_member PARAMS ((tree, tree, dw_die_ref));
static void splice_child_die PARAMS ((dw_die_ref, dw_die_ref)); static void splice_child_die PARAMS ((dw_die_ref, dw_die_ref));
static int file_info_cmp PARAMS ((const void *, const void *)); static int file_info_cmp PARAMS ((const void *, const void *));
static dw_loc_list_ref new_loc_list PARAMS ((dw_loc_descr_ref, static dw_loc_list_ref new_loc_list PARAMS ((dw_loc_descr_ref,
const char *, const char *, const char *, const char *,
const char *, unsigned)); const char *, unsigned));
static void add_loc_descr_to_loc_list PARAMS ((dw_loc_list_ref *, static void add_loc_descr_to_loc_list PARAMS ((dw_loc_list_ref *,
...@@ -4504,7 +4504,7 @@ add_AT_string (die, attr_kind, str) ...@@ -4504,7 +4504,7 @@ add_AT_string (die, attr_kind, str)
{ {
dw_attr_ref attr = (dw_attr_ref) xmalloc (sizeof (dw_attr_node)); dw_attr_ref attr = (dw_attr_ref) xmalloc (sizeof (dw_attr_node));
struct indirect_string_node *node; struct indirect_string_node *node;
if (! debug_str_hash) if (! debug_str_hash)
{ {
debug_str_hash = ht_create (10); debug_str_hash = ht_create (10);
...@@ -4915,7 +4915,7 @@ is_cxx () ...@@ -4915,7 +4915,7 @@ is_cxx ()
{ {
return (get_AT_unsigned (comp_unit_die, DW_AT_language) return (get_AT_unsigned (comp_unit_die, DW_AT_language)
== DW_LANG_C_plus_plus); == DW_LANG_C_plus_plus);
} }
static inline int static inline int
is_fortran () is_fortran ()
...@@ -5626,7 +5626,7 @@ is_symbol_die (c) ...@@ -5626,7 +5626,7 @@ is_symbol_die (c)
dw_die_ref c; dw_die_ref c;
{ {
return (is_type_die (c) return (is_type_die (c)
|| (get_AT (c, DW_AT_declaration) || (get_AT (c, DW_AT_declaration)
&& !get_AT (c, DW_AT_specification))); && !get_AT (c, DW_AT_specification)));
} }
...@@ -5679,7 +5679,7 @@ break_out_includes (die) ...@@ -5679,7 +5679,7 @@ break_out_includes (die)
dw_die_ref unit = NULL; dw_die_ref unit = NULL;
limbo_die_node *node; limbo_die_node *node;
for (ptr = &(die->die_child); *ptr; ) for (ptr = &(die->die_child); *ptr;)
{ {
dw_die_ref c = *ptr; dw_die_ref c = *ptr;
...@@ -5761,6 +5761,7 @@ output_location_lists (die) ...@@ -5761,6 +5761,7 @@ output_location_lists (die)
output_location_lists (c); output_location_lists (c);
} }
/* The format of each DIE (and its attribute value pairs) is encoded in an /* The format of each DIE (and its attribute value pairs) is encoded in an
abbreviation table. This routine builds the abbreviation table and assigns abbreviation table. This routine builds the abbreviation table and assigns
a unique abbreviation id for each abbreviation entry. The children of each a unique abbreviation id for each abbreviation entry. The children of each
...@@ -6183,7 +6184,7 @@ new_loc_list (expr, begin, end, section, gensym) ...@@ -6183,7 +6184,7 @@ new_loc_list (expr, begin, end, section, gensym)
retlist->end = end; retlist->end = end;
retlist->expr = expr; retlist->expr = expr;
retlist->section = section; retlist->section = section;
if (gensym) if (gensym)
retlist->ll_symbol = gen_internal_sym ("LLST"); retlist->ll_symbol = gen_internal_sym ("LLST");
return retlist; return retlist;
...@@ -6200,7 +6201,7 @@ add_loc_descr_to_loc_list (list_head, descr, begin, end, section) ...@@ -6200,7 +6201,7 @@ add_loc_descr_to_loc_list (list_head, descr, begin, end, section)
const char *section; const char *section;
{ {
dw_loc_list_ref *d; dw_loc_list_ref *d;
/* Find the end of the chain. */ /* Find the end of the chain. */
for (d = list_head; (*d) != NULL; d = &(*d)->dw_loc_next) for (d = list_head; (*d) != NULL; d = &(*d)->dw_loc_next)
; ;
...@@ -6231,7 +6232,7 @@ output_loc_list (list_head) ...@@ -6231,7 +6232,7 @@ output_loc_list (list_head)
"Location list base address specifier base"); "Location list base address specifier base");
} }
for (curr = list_head; curr != NULL; curr=curr->dw_loc_next) for (curr = list_head; curr != NULL; curr = curr->dw_loc_next)
{ {
unsigned long size; unsigned long size;
...@@ -6242,7 +6243,7 @@ output_loc_list (list_head) ...@@ -6242,7 +6243,7 @@ output_loc_list (list_head)
"Location list end address (%s)", "Location list end address (%s)",
list_head->ll_symbol); list_head->ll_symbol);
size = size_of_locs (curr->expr); size = size_of_locs (curr->expr);
/* Output the block length for this list of location operations. */ /* Output the block length for this list of location operations. */
if (size > 0xffff) if (size > 0xffff)
abort (); abort ();
...@@ -6331,7 +6332,7 @@ output_die (die) ...@@ -6331,7 +6332,7 @@ output_die (die)
dw2_asm_output_data (1, dw2_asm_output_data (1,
2 * HOST_BITS_PER_LONG / HOST_BITS_PER_CHAR, 2 * HOST_BITS_PER_LONG / HOST_BITS_PER_CHAR,
"%s", name); "%s", name);
if (WORDS_BIG_ENDIAN) if (WORDS_BIG_ENDIAN)
{ {
...@@ -6356,7 +6357,7 @@ output_die (die) ...@@ -6356,7 +6357,7 @@ output_die (die)
unsigned int i; unsigned int i;
dw2_asm_output_data (1, a->dw_attr_val.v.val_float.length * 4, dw2_asm_output_data (1, a->dw_attr_val.v.val_float.length * 4,
"%s", name); "%s", name);
for (i = 0; i < a->dw_attr_val.v.val_float.length; i++) for (i = 0; i < a->dw_attr_val.v.val_float.length; i++)
dw2_asm_output_data (4, a->dw_attr_val.v.val_float.array[i], dw2_asm_output_data (4, a->dw_attr_val.v.val_float.array[i],
...@@ -6368,7 +6369,7 @@ output_die (die) ...@@ -6368,7 +6369,7 @@ output_die (die)
dw2_asm_output_data (1, AT_flag (a), "%s", name); dw2_asm_output_data (1, AT_flag (a), "%s", name);
break; break;
case dw_val_class_loc_list: case dw_val_class_loc_list:
{ {
char *sym = AT_loc_list (a)->ll_symbol; char *sym = AT_loc_list (a)->ll_symbol;
...@@ -6938,7 +6939,7 @@ output_file_names () ...@@ -6938,7 +6939,7 @@ output_file_names ()
if (total > dirs[i].length + 1) if (total > dirs[i].length + 1)
{ {
/* It's worthwhile adding. */ /* It's worthwhile adding. */
for (j = i; j < ndirs; j++) for (j = i; j < ndirs; j++)
if (savehere[j] > 0) if (savehere[j] > 0)
{ {
/* Remember how much we saved for this directory so far. */ /* Remember how much we saved for this directory so far. */
...@@ -7499,10 +7500,10 @@ modified_type_die (type, is_const_type, is_volatile_type, context_die) ...@@ -7499,10 +7500,10 @@ modified_type_die (type, is_const_type, is_volatile_type, context_die)
/* See if we already have the appropriately qualified variant of /* See if we already have the appropriately qualified variant of
this type. */ this type. */
qualified_type qualified_type
= get_qualified_type (type, = get_qualified_type (type,
((is_const_type ? TYPE_QUAL_CONST : 0) ((is_const_type ? TYPE_QUAL_CONST : 0)
| (is_volatile_type | (is_volatile_type
? TYPE_QUAL_VOLATILE : 0))); ? TYPE_QUAL_VOLATILE : 0)));
/* If we do, then we can just use its DIE, if it exists. */ /* If we do, then we can just use its DIE, if it exists. */
...@@ -7514,7 +7515,7 @@ modified_type_die (type, is_const_type, is_volatile_type, context_die) ...@@ -7514,7 +7515,7 @@ modified_type_die (type, is_const_type, is_volatile_type, context_die)
} }
/* Handle C typedef types. */ /* Handle C typedef types. */
if (qualified_type && TYPE_NAME (qualified_type) if (qualified_type && TYPE_NAME (qualified_type)
&& TREE_CODE (TYPE_NAME (qualified_type)) == TYPE_DECL && TREE_CODE (TYPE_NAME (qualified_type)) == TYPE_DECL
&& DECL_ORIGINAL_TYPE (TYPE_NAME (qualified_type))) && DECL_ORIGINAL_TYPE (TYPE_NAME (qualified_type)))
{ {
...@@ -8141,7 +8142,7 @@ loc_descriptor_from_tree (loc, addressp) ...@@ -8141,7 +8142,7 @@ loc_descriptor_from_tree (loc, addressp)
return 0; return 0;
break; break;
case TRUTH_AND_EXPR: case TRUTH_AND_EXPR:
case TRUTH_ANDIF_EXPR: case TRUTH_ANDIF_EXPR:
case BIT_AND_EXPR: case BIT_AND_EXPR:
op = DW_OP_and; op = DW_OP_and;
...@@ -8662,7 +8663,7 @@ add_const_value_attribute (die, rtl) ...@@ -8662,7 +8663,7 @@ add_const_value_attribute (die, rtl)
out, and the CONST_INT rtx is assigned VOIDmode. */ out, and the CONST_INT rtx is assigned VOIDmode. */
{ {
HOST_WIDE_INT val = INTVAL (rtl); HOST_WIDE_INT val = INTVAL (rtl);
/* ??? We really should be using HOST_WIDE_INT throughout. */ /* ??? We really should be using HOST_WIDE_INT throughout. */
if (val < 0 && (long) val == val) if (val < 0 && (long) val == val)
add_AT_int (die, DW_AT_const_value, (long) val); add_AT_int (die, DW_AT_const_value, (long) val);
...@@ -8691,7 +8692,7 @@ add_const_value_attribute (die, rtl) ...@@ -8691,7 +8692,7 @@ add_const_value_attribute (die, rtl)
if (GET_MODE_CLASS (mode) == MODE_FLOAT) if (GET_MODE_CLASS (mode) == MODE_FLOAT)
{ {
unsigned length = GET_MODE_SIZE (mode) / 4; unsigned length = GET_MODE_SIZE (mode) / 4;
long *array = (long *) xmalloc (sizeof (long) * length); long *array = (long *) xmalloc (sizeof (long) * length);
REAL_VALUE_TYPE rv; REAL_VALUE_TYPE rv;
REAL_VALUE_FROM_CONST_DOUBLE (rv, rtl); REAL_VALUE_FROM_CONST_DOUBLE (rv, rtl);
...@@ -10060,7 +10061,7 @@ gen_formal_types_die (function_or_method_type, context_die) ...@@ -10060,7 +10061,7 @@ gen_formal_types_die (function_or_method_type, context_die)
} }
else else
arg = NULL_TREE; arg = NULL_TREE;
first_parm_type = TYPE_ARG_TYPES (function_or_method_type); first_parm_type = TYPE_ARG_TYPES (function_or_method_type);
/* Make our first pass over the list of formal parameter types and output a /* Make our first pass over the list of formal parameter types and output a
...@@ -10144,7 +10145,7 @@ dwarf2out_abstract_function (decl) ...@@ -10144,7 +10145,7 @@ dwarf2out_abstract_function (decl)
/* Make sure we have the actual abstract inline, not a clone. */ /* Make sure we have the actual abstract inline, not a clone. */
decl = DECL_ORIGIN (decl); decl = DECL_ORIGIN (decl);
old_die = lookup_decl_die (decl); old_die = lookup_decl_die (decl);
if (old_die && get_AT_unsigned (old_die, DW_AT_inline)) if (old_die && get_AT_unsigned (old_die, DW_AT_inline))
/* We've already generated the abstract instance. */ /* We've already generated the abstract instance. */
return; return;
...@@ -10158,7 +10159,7 @@ dwarf2out_abstract_function (decl) ...@@ -10158,7 +10159,7 @@ dwarf2out_abstract_function (decl)
gen_type_die_for_member gen_type_die_for_member
(context, decl, decl_function_context (decl) ? NULL : comp_unit_die); (context, decl, decl_function_context (decl) ? NULL : comp_unit_die);
} }
/* Pretend we've just finished compiling this function. */ /* Pretend we've just finished compiling this function. */
save_fn = current_function_decl; save_fn = current_function_decl;
current_function_decl = decl; current_function_decl = decl;
...@@ -10477,7 +10478,7 @@ gen_variable_die (decl, context_die) ...@@ -10477,7 +10478,7 @@ gen_variable_die (decl, context_die)
??? Duplicated blocks have been rewritten to use .debug_ranges. */ ??? Duplicated blocks have been rewritten to use .debug_ranges. */
else if (old_die && TREE_STATIC (decl) else if (old_die && TREE_STATIC (decl)
&& get_AT_flag (old_die, DW_AT_declaration) == 1) && get_AT_flag (old_die, DW_AT_declaration) == 1)
{ {
/* This is a definition of a C++ class level static. */ /* This is a definition of a C++ class level static. */
add_AT_die_ref (var_die, DW_AT_specification, old_die); add_AT_die_ref (var_die, DW_AT_specification, old_die);
...@@ -11559,7 +11560,7 @@ mark_limbo_die_list (ptr) ...@@ -11559,7 +11560,7 @@ mark_limbo_die_list (ptr)
void *ptr ATTRIBUTE_UNUSED; void *ptr ATTRIBUTE_UNUSED;
{ {
limbo_die_node *node; limbo_die_node *node;
for (node = limbo_die_list; node ; node = node->next) for (node = limbo_die_list; node; node = node->next)
ggc_mark_tree (node->created_for); ggc_mark_tree (node->created_for);
} }
...@@ -12165,7 +12166,7 @@ dwarf2out_finish (input_filename) ...@@ -12165,7 +12166,7 @@ dwarf2out_finish (input_filename)
add_child_die (comp_unit_die, die); add_child_die (comp_unit_die, die);
else if (node->created_for else if (node->created_for
&& ((DECL_P (node->created_for) && ((DECL_P (node->created_for)
&& (context = DECL_CONTEXT (node->created_for))) && (context = DECL_CONTEXT (node->created_for)))
|| (TYPE_P (node->created_for) || (TYPE_P (node->created_for)
&& (context = TYPE_CONTEXT (node->created_for)))) && (context = TYPE_CONTEXT (node->created_for))))
&& TREE_CODE (context) == FUNCTION_DECL) && TREE_CODE (context) == FUNCTION_DECL)
...@@ -12291,7 +12292,7 @@ dwarf2out_finish (input_filename) ...@@ -12291,7 +12292,7 @@ dwarf2out_finish (input_filename)
/* Have to end the primary source file. */ /* Have to end the primary source file. */
if (debug_info_level >= DINFO_LEVEL_VERBOSE) if (debug_info_level >= DINFO_LEVEL_VERBOSE)
{ {
named_section_flags (DEBUG_MACINFO_SECTION, SECTION_DEBUG); named_section_flags (DEBUG_MACINFO_SECTION, SECTION_DEBUG);
dw2_asm_output_data (1, DW_MACINFO_end_file, "End file"); dw2_asm_output_data (1, DW_MACINFO_end_file, "End file");
} }
......
...@@ -268,6 +268,7 @@ data_section () ...@@ -268,6 +268,7 @@ data_section ()
in_section = in_data; in_section = in_data;
} }
} }
/* Tell assembler to ALWAYS switch to data section, in case /* Tell assembler to ALWAYS switch to data section, in case
it's not sure where it is. */ it's not sure where it is. */
...@@ -339,7 +340,7 @@ get_named_section_flags (section) ...@@ -339,7 +340,7 @@ get_named_section_flags (section)
{ {
struct in_named_entry **slot; struct in_named_entry **slot;
slot = (struct in_named_entry**) slot = (struct in_named_entry **)
htab_find_slot_with_hash (in_named_htab, section, htab_find_slot_with_hash (in_named_htab, section,
htab_hash_string (section), NO_INSERT); htab_hash_string (section), NO_INSERT);
...@@ -347,7 +348,7 @@ get_named_section_flags (section) ...@@ -347,7 +348,7 @@ get_named_section_flags (section)
} }
/* Returns true if the section has been declared before. Sets internal /* Returns true if the section has been declared before. Sets internal
flag on this section in in_named_hash so subsequent calls on this flag on this section in in_named_hash so subsequent calls on this
section will return false. */ section will return false. */
bool bool
...@@ -356,15 +357,15 @@ named_section_first_declaration (name) ...@@ -356,15 +357,15 @@ named_section_first_declaration (name)
{ {
struct in_named_entry **slot; struct in_named_entry **slot;
slot = (struct in_named_entry**) slot = (struct in_named_entry **)
htab_find_slot_with_hash (in_named_htab, name, htab_find_slot_with_hash (in_named_htab, name,
htab_hash_string (name), NO_INSERT); htab_hash_string (name), NO_INSERT);
if (! (*slot)->declared) if (! (*slot)->declared)
{ {
(*slot)->declared = true; (*slot)->declared = true;
return true; return true;
} }
else else
{ {
return false; return false;
} }
...@@ -381,7 +382,7 @@ set_named_section_flags (section, flags) ...@@ -381,7 +382,7 @@ set_named_section_flags (section, flags)
{ {
struct in_named_entry **slot, *entry; struct in_named_entry **slot, *entry;
slot = (struct in_named_entry**) slot = (struct in_named_entry **)
htab_find_slot_with_hash (in_named_htab, section, htab_find_slot_with_hash (in_named_htab, section,
htab_hash_string (section), INSERT); htab_hash_string (section), INSERT);
entry = *slot; entry = *slot;
...@@ -412,7 +413,7 @@ named_section_flags (name, flags) ...@@ -412,7 +413,7 @@ named_section_flags (name, flags)
if (! set_named_section_flags (name, flags)) if (! set_named_section_flags (name, flags))
abort (); abort ();
(* targetm.asm_out.named_section) (name, flags); (*targetm.asm_out.named_section) (name, flags);
if (flags & SECTION_FORGET) if (flags & SECTION_FORGET)
in_section = no_section; in_section = no_section;
...@@ -624,9 +625,9 @@ default_exception_section () ...@@ -624,9 +625,9 @@ default_exception_section ()
void void
mergeable_string_section (decl, align, flags) mergeable_string_section (decl, align, flags)
tree decl ATTRIBUTE_UNUSED; tree decl ATTRIBUTE_UNUSED;
unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED; unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED;
unsigned int flags ATTRIBUTE_UNUSED; unsigned int flags ATTRIBUTE_UNUSED;
{ {
#ifdef HAVE_GAS_SHF_MERGE #ifdef HAVE_GAS_SHF_MERGE
if (flag_merge_constants if (flag_merge_constants
...@@ -657,7 +658,7 @@ mergeable_string_section (decl, align, flags) ...@@ -657,7 +658,7 @@ mergeable_string_section (decl, align, flags)
for (i = 0; i < len; i += unit) for (i = 0; i < len; i += unit)
{ {
for (j = 0; j < unit; j++) for (j = 0; j < unit; j++)
if (str [i + j] != '\0') if (str[i + j] != '\0')
break; break;
if (j == unit) if (j == unit)
break; break;
...@@ -693,15 +694,15 @@ mergeable_string_section (decl, align, flags) ...@@ -693,15 +694,15 @@ mergeable_string_section (decl, align, flags)
} }
#endif #endif
readonly_data_section (); readonly_data_section ();
} }
/* Tell assembler to switch to the section for constant merging. */ /* Tell assembler to switch to the section for constant merging. */
void void
mergeable_constant_section (mode, align, flags) mergeable_constant_section (mode, align, flags)
enum machine_mode mode ATTRIBUTE_UNUSED; enum machine_mode mode ATTRIBUTE_UNUSED;
unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED; unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED;
unsigned int flags ATTRIBUTE_UNUSED; unsigned int flags ATTRIBUTE_UNUSED;
{ {
#ifdef HAVE_GAS_SHF_MERGE #ifdef HAVE_GAS_SHF_MERGE
unsigned int modesize = GET_MODE_BITSIZE (mode); unsigned int modesize = GET_MODE_BITSIZE (mode);
...@@ -720,7 +721,7 @@ mergeable_constant_section (mode, align, flags) ...@@ -720,7 +721,7 @@ mergeable_constant_section (mode, align, flags)
flags |= (align / 8) | SECTION_MERGE; flags |= (align / 8) | SECTION_MERGE;
named_section_flags (name, flags); named_section_flags (name, flags);
return; return;
} }
#endif #endif
readonly_data_section (); readonly_data_section ();
} }
...@@ -729,7 +730,7 @@ mergeable_constant_section (mode, align, flags) ...@@ -729,7 +730,7 @@ mergeable_constant_section (mode, align, flags)
static const char * static const char *
strip_reg_name (name) strip_reg_name (name)
const char *name; const char *name;
{ {
#ifdef REGISTER_PREFIX #ifdef REGISTER_PREFIX
if (!strncmp (name, REGISTER_PREFIX, strlen (REGISTER_PREFIX))) if (!strncmp (name, REGISTER_PREFIX, strlen (REGISTER_PREFIX)))
...@@ -750,7 +751,7 @@ strip_reg_name (name) ...@@ -750,7 +751,7 @@ strip_reg_name (name)
int int
decode_reg_name (asmspec) decode_reg_name (asmspec)
const char *asmspec; const char *asmspec;
{ {
if (asmspec != 0) if (asmspec != 0)
{ {
...@@ -1203,7 +1204,7 @@ assemble_start_function (decl, fnname) ...@@ -1203,7 +1204,7 @@ assemble_start_function (decl, fnname)
{ {
#ifdef ASM_OUTPUT_MAX_SKIP_ALIGN #ifdef ASM_OUTPUT_MAX_SKIP_ALIGN
ASM_OUTPUT_MAX_SKIP_ALIGN (asm_out_file, ASM_OUTPUT_MAX_SKIP_ALIGN (asm_out_file,
align_functions_log, align_functions-1); align_functions_log, align_functions - 1);
#else #else
ASM_OUTPUT_ALIGN (asm_out_file, align_functions_log); ASM_OUTPUT_ALIGN (asm_out_file, align_functions_log);
#endif #endif
...@@ -1373,7 +1374,7 @@ assemble_string (p, size) ...@@ -1373,7 +1374,7 @@ assemble_string (p, size)
static void static void
asm_emit_uninitialised (decl, name, size, rounded) asm_emit_uninitialised (decl, name, size, rounded)
tree decl; tree decl;
const char * name; const char *name;
int size ATTRIBUTE_UNUSED; int size ATTRIBUTE_UNUSED;
int rounded ATTRIBUTE_UNUSED; int rounded ATTRIBUTE_UNUSED;
{ {
...@@ -2486,7 +2487,7 @@ const_str_htab_eq (x, y) ...@@ -2486,7 +2487,7 @@ const_str_htab_eq (x, y)
static void static void
const_str_htab_del (dfsp) const_str_htab_del (dfsp)
void *dfsp; void *dfsp;
{ {
free (dfsp); free (dfsp);
} }
...@@ -2778,7 +2779,7 @@ compare_constant_1 (exp, p) ...@@ -2778,7 +2779,7 @@ compare_constant_1 (exp, p)
&& TREE_CODE (TREE_PURPOSE (link)) == FIELD_DECL) && TREE_CODE (TREE_PURPOSE (link)) == FIELD_DECL)
{ {
if (memcmp ((char *) &TREE_PURPOSE (link), p, if (memcmp ((char *) &TREE_PURPOSE (link), p,
sizeof TREE_PURPOSE (link))) sizeof TREE_PURPOSE (link)))
return 0; return 0;
p += sizeof TREE_PURPOSE (link); p += sizeof TREE_PURPOSE (link);
...@@ -2839,7 +2840,7 @@ compare_constant_1 (exp, p) ...@@ -2839,7 +2840,7 @@ compare_constant_1 (exp, p)
tree new = (*lang_hooks.expand_constant) (exp); tree new = (*lang_hooks.expand_constant) (exp);
if (new != exp) if (new != exp)
return compare_constant_1 (new, p); return compare_constant_1 (new, p);
else else
return 0; return 0;
} }
...@@ -2935,7 +2936,7 @@ record_constant_1 (exp) ...@@ -2935,7 +2936,7 @@ record_constant_1 (exp)
obstack_grow (&permanent_obstack, &nbytes, sizeof (nbytes)); obstack_grow (&permanent_obstack, &nbytes, sizeof (nbytes));
obstack_blank (&permanent_obstack, nbytes); obstack_blank (&permanent_obstack, nbytes);
get_set_constructor_bytes get_set_constructor_bytes
(exp, (unsigned char *) permanent_obstack.next_free-nbytes, (exp, (unsigned char *) permanent_obstack.next_free - nbytes,
nbytes); nbytes);
return; return;
} }
...@@ -3053,7 +3054,7 @@ record_constant_1 (exp) ...@@ -3053,7 +3054,7 @@ record_constant_1 (exp)
tree new = (*lang_hooks.expand_constant) (exp); tree new = (*lang_hooks.expand_constant) (exp);
if (new != exp) if (new != exp)
record_constant_1 (new); record_constant_1 (new);
return; return;
} }
} }
...@@ -3631,16 +3632,16 @@ decode_rtx_const (mode, x, value) ...@@ -3631,16 +3632,16 @@ decode_rtx_const (mode, x, value)
if (value->kind == RTX_INT && value->un.addr.base != 0 if (value->kind == RTX_INT && value->un.addr.base != 0
&& GET_CODE (value->un.addr.base) == UNSPEC) && GET_CODE (value->un.addr.base) == UNSPEC)
{ {
/* For a simple UNSPEC, the base is set to the /* For a simple UNSPEC, the base is set to the
operand, the kind field is set to the index of operand, the kind field is set to the index of
the unspec expression. the unspec expression.
Together with the code below, in case that Together with the code below, in case that
the operand is a SYMBOL_REF or LABEL_REF, the operand is a SYMBOL_REF or LABEL_REF,
the address of the string or the code_label the address of the string or the code_label
is taken as base. */ is taken as base. */
if (XVECLEN (value->un.addr.base, 0) == 1) if (XVECLEN (value->un.addr.base, 0) == 1)
{ {
value->kind = RTX_UNSPEC + XINT (value->un.addr.base, 1); value->kind = RTX_UNSPEC + XINT (value->un.addr.base, 1);
value->un.addr.base = XVECEXP (value->un.addr.base, 0, 0); value->un.addr.base = XVECEXP (value->un.addr.base, 0, 0);
} }
...@@ -3768,7 +3769,7 @@ mem_for_const_double (x) ...@@ -3768,7 +3769,7 @@ mem_for_const_double (x)
return 0; return 0;
} }
/* Given a constant rtx X, make (or find) a memory constant for its value /* Given a constant rtx X, make (or find) a memory constant for its value
and return a MEM rtx to refer to it in memory. */ and return a MEM rtx to refer to it in memory. */
...@@ -3797,7 +3798,7 @@ force_const_mem (mode, x) ...@@ -3797,7 +3798,7 @@ force_const_mem (mode, x)
desc = record_constant_rtx (mode, x); desc = record_constant_rtx (mode, x);
desc->next = const_rtx_hash_table[hash]; desc->next = const_rtx_hash_table[hash];
const_rtx_hash_table[hash] = desc; const_rtx_hash_table[hash] = desc;
/* Align the location counter as required by EXP's data type. */ /* Align the location counter as required by EXP's data type. */
align = GET_MODE_ALIGNMENT (mode == VOIDmode ? word_mode : mode); align = GET_MODE_ALIGNMENT (mode == VOIDmode ? word_mode : mode);
#ifdef CONSTANT_ALIGNMENT #ifdef CONSTANT_ALIGNMENT
...@@ -3826,7 +3827,7 @@ force_const_mem (mode, x) ...@@ -3826,7 +3827,7 @@ force_const_mem (mode, x)
first_pool = pool; first_pool = pool;
else else
last_pool->next = pool; last_pool->next = pool;
last_pool = pool; last_pool = pool;
pool_offset += GET_MODE_SIZE (mode); pool_offset += GET_MODE_SIZE (mode);
...@@ -3944,8 +3945,8 @@ get_pool_size () ...@@ -3944,8 +3945,8 @@ get_pool_size ()
void void
output_constant_pool (fnname, fndecl) output_constant_pool (fnname, fndecl)
const char *fnname ATTRIBUTE_UNUSED; const char *fnname ATTRIBUTE_UNUSED;
tree fndecl ATTRIBUTE_UNUSED; tree fndecl ATTRIBUTE_UNUSED;
{ {
struct pool_constant *pool; struct pool_constant *pool;
rtx x; rtx x;
...@@ -4055,7 +4056,7 @@ output_constant_pool (fnname, fndecl) ...@@ -4055,7 +4056,7 @@ output_constant_pool (fnname, fndecl)
} }
break; break;
case MODE_VECTOR_INT: case MODE_VECTOR_INT:
{ {
int i, units; int i, units;
rtx elt; rtx elt;
...@@ -4202,10 +4203,11 @@ mark_constant (current_rtx, data) ...@@ -4202,10 +4203,11 @@ mark_constant (current_rtx, data)
if (CONSTANT_POOL_ADDRESS_P (x)) if (CONSTANT_POOL_ADDRESS_P (x))
{ {
struct pool_constant *pool = find_pool_constant (cfun, x); struct pool_constant *pool = find_pool_constant (cfun, x);
if (pool->mark == 0) { if (pool->mark == 0)
pool->mark = 1; {
for_each_rtx (&(pool->constant), &mark_constant, NULL); pool->mark = 1;
} for_each_rtx (&(pool->constant), &mark_constant, NULL);
}
else else
return -1; return -1;
} }
...@@ -4279,7 +4281,7 @@ output_addressed_constants (exp) ...@@ -4279,7 +4281,7 @@ output_addressed_constants (exp)
case CONSTRUCTOR: case CONSTRUCTOR:
for (tem = CONSTRUCTOR_ELTS (exp); tem; tem = TREE_CHAIN (tem)) for (tem = CONSTRUCTOR_ELTS (exp); tem; tem = TREE_CHAIN (tem))
if (TREE_VALUE (tem) != 0) if (TREE_VALUE (tem) != 0)
reloc |= output_addressed_constants (TREE_VALUE (tem)); reloc |= output_addressed_constants (TREE_VALUE (tem));
break; break;
...@@ -4397,7 +4399,7 @@ initializer_constant_valid_p (value, endtype) ...@@ -4397,7 +4399,7 @@ initializer_constant_valid_p (value, endtype)
case PLUS_EXPR: case PLUS_EXPR:
if (! INTEGRAL_TYPE_P (endtype) if (! INTEGRAL_TYPE_P (endtype)
|| TYPE_PRECISION (endtype) >= POINTER_SIZE) || TYPE_PRECISION (endtype) >= POINTER_SIZE)
{ {
tree valid0 = initializer_constant_valid_p (TREE_OPERAND (value, 0), tree valid0 = initializer_constant_valid_p (TREE_OPERAND (value, 0),
endtype); endtype);
tree valid1 = initializer_constant_valid_p (TREE_OPERAND (value, 1), tree valid1 = initializer_constant_valid_p (TREE_OPERAND (value, 1),
...@@ -4407,7 +4409,7 @@ initializer_constant_valid_p (value, endtype) ...@@ -4407,7 +4409,7 @@ initializer_constant_valid_p (value, endtype)
return valid1; return valid1;
if (valid1 == null_pointer_node) if (valid1 == null_pointer_node)
return valid0; return valid0;
} }
break; break;
case MINUS_EXPR: case MINUS_EXPR:
...@@ -4614,7 +4616,7 @@ output_constant (exp, size, align) ...@@ -4614,7 +4616,7 @@ output_constant (exp, size, align)
if (TREE_CODE (exp) == INTEGER_CST) if (TREE_CODE (exp) == INTEGER_CST)
assemble_integer (expand_expr (exp, NULL_RTX, assemble_integer (expand_expr (exp, NULL_RTX,
VOIDmode, EXPAND_INITIALIZER), VOIDmode, EXPAND_INITIALIZER),
thissize, align, 1); thissize, align, 1);
else if (TREE_CODE (exp) == CONSTRUCTOR) else if (TREE_CODE (exp) == CONSTRUCTOR)
{ {
unsigned char *buffer = (unsigned char *) alloca (thissize); unsigned char *buffer = (unsigned char *) alloca (thissize);
...@@ -4656,7 +4658,7 @@ array_size_for_constructor (val) ...@@ -4656,7 +4658,7 @@ array_size_for_constructor (val)
return TREE_STRING_LENGTH (val); return TREE_STRING_LENGTH (val);
max_index = NULL_TREE; max_index = NULL_TREE;
for (i = CONSTRUCTOR_ELTS (val); i ; i = TREE_CHAIN (i)) for (i = CONSTRUCTOR_ELTS (val); i; i = TREE_CHAIN (i))
{ {
tree index = TREE_PURPOSE (i); tree index = TREE_PURPOSE (i);
...@@ -5050,7 +5052,7 @@ weak_finish () ...@@ -5050,7 +5052,7 @@ weak_finish ()
{ {
tree t; tree t;
for (t = weak_decls; t ; t = TREE_CHAIN (t)) for (t = weak_decls; t; t = TREE_CHAIN (t))
{ {
tree decl = TREE_VALUE (t); tree decl = TREE_VALUE (t);
const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
...@@ -5234,7 +5236,7 @@ void ...@@ -5234,7 +5236,7 @@ void
init_varasm_once () init_varasm_once ()
{ {
const_str_htab = htab_create (128, const_str_htab_hash, const_str_htab_eq, const_str_htab = htab_create (128, const_str_htab_hash, const_str_htab_eq,
const_str_htab_del); const_str_htab_del);
in_named_htab = htab_create (31, in_named_entry_hash, in_named_htab = htab_create (31, in_named_entry_hash,
in_named_entry_eq, NULL); in_named_entry_eq, NULL);
......
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