This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] dwarf2out.c, varasm.c: Fix formatting.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 04 May 2002 10:54:56 -0400 (EDT)
- Subject: [patch] dwarf2out.c, varasm.c: Fix formatting.
Hi,
Attached is a patch to fix formatting. Committed as obvious.
Kazu Hirata
2002-05-04 Kazu Hirata <kazu@cs.umass.edu>
* dwarf2out.c: Fix formatting.
* varasm.c: Likewise.
Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.366
diff -u -r1.366 dwarf2out.c
--- dwarf2out.c 24 Apr 2002 18:49:51 -0000 1.366
+++ dwarf2out.c 4 May 2002 14:49:42 -0000
@@ -959,8 +959,8 @@
src = XEXP (dest, 0);
code = GET_CODE (src);
- switch (code)
- {
+ switch (code)
+ {
case PRE_MODIFY:
case POST_MODIFY:
if (XEXP (src, 0) == stack_pointer_rtx)
@@ -969,7 +969,7 @@
/* We handle only adjustments by constant amount. */
if (GET_CODE (XEXP (src, 1)) != PLUS ||
GET_CODE (val) != CONST_INT)
- abort();
+ abort ();
offset = -INTVAL (val);
break;
}
@@ -1114,7 +1114,7 @@
{
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);
next = q->next;
@@ -1131,13 +1131,13 @@
{
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))
return true;
return false;
}
-
+
/* A temporary register holding an integral value used in adjusting SP
or setting up the store_reg. The "offset" field holds the integer
@@ -1188,7 +1188,7 @@
stores the value, which will be used to adjust the
stack pointer. cfa_temp is also used like cfa_store,
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
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
@@ -1656,7 +1656,7 @@
if (! RTX_FRAME_RELATED_P (insn))
{
if (!ACCUMULATE_OUTGOING_ARGS)
- dwarf2out_stack_adjust (insn);
+ dwarf2out_stack_adjust (insn);
return;
}
@@ -1896,7 +1896,7 @@
if (p > augmentation + 1)
{
augmentation[0] = 'z';
- *p = '\0';
+ *p = '\0';
}
/* Ug. Some platforms can't do unaligned dynamic relocations at all. */
@@ -1952,7 +1952,7 @@
output_cfi (cfi, NULL, for_eh);
/* 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));
ASM_OUTPUT_LABEL (asm_out_file, l2);
@@ -1984,15 +1984,15 @@
gen_rtx_SYMBOL_REF (Pmode, fde->dw_fde_begin),
"FDE initial location");
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");
}
else
{
dw2_asm_output_addr (DWARF2_ADDR_SIZE, fde->dw_fde_begin,
"FDE initial location");
- dw2_asm_output_delta (DWARF2_ADDR_SIZE,
- fde->dw_fde_end, fde->dw_fde_begin,
+ dw2_asm_output_delta (DWARF2_ADDR_SIZE,
+ fde->dw_fde_end, fde->dw_fde_begin,
"FDE address range");
}
@@ -2045,7 +2045,7 @@
output_cfi (cfi, fde, for_eh);
/* 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)));
ASM_OUTPUT_LABEL (asm_out_file, l2);
}
@@ -3681,7 +3681,7 @@
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 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 *, unsigned));
static void add_loc_descr_to_loc_list PARAMS ((dw_loc_list_ref *,
@@ -4504,7 +4504,7 @@
{
dw_attr_ref attr = (dw_attr_ref) xmalloc (sizeof (dw_attr_node));
struct indirect_string_node *node;
-
+
if (! debug_str_hash)
{
debug_str_hash = ht_create (10);
@@ -4915,7 +4915,7 @@
{
return (get_AT_unsigned (comp_unit_die, DW_AT_language)
== DW_LANG_C_plus_plus);
-}
+}
static inline int
is_fortran ()
@@ -5626,7 +5626,7 @@
dw_die_ref c;
{
return (is_type_die (c)
- || (get_AT (c, DW_AT_declaration)
+ || (get_AT (c, DW_AT_declaration)
&& !get_AT (c, DW_AT_specification)));
}
@@ -5679,7 +5679,7 @@
dw_die_ref unit = NULL;
limbo_die_node *node;
- for (ptr = &(die->die_child); *ptr; )
+ for (ptr = &(die->die_child); *ptr;)
{
dw_die_ref c = *ptr;
@@ -5761,6 +5761,7 @@
output_location_lists (c);
}
+
/* The format of each DIE (and its attribute value pairs) is encoded in an
abbreviation table. This routine builds the abbreviation table and assigns
a unique abbreviation id for each abbreviation entry. The children of each
@@ -6183,7 +6184,7 @@
retlist->end = end;
retlist->expr = expr;
retlist->section = section;
- if (gensym)
+ if (gensym)
retlist->ll_symbol = gen_internal_sym ("LLST");
return retlist;
@@ -6200,7 +6201,7 @@
const char *section;
{
dw_loc_list_ref *d;
-
+
/* Find the end of the chain. */
for (d = list_head; (*d) != NULL; d = &(*d)->dw_loc_next)
;
@@ -6231,7 +6232,7 @@
"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;
@@ -6242,7 +6243,7 @@
"Location list end address (%s)",
list_head->ll_symbol);
size = size_of_locs (curr->expr);
-
+
/* Output the block length for this list of location operations. */
if (size > 0xffff)
abort ();
@@ -6331,7 +6332,7 @@
dw2_asm_output_data (1,
2 * HOST_BITS_PER_LONG / HOST_BITS_PER_CHAR,
- "%s", name);
+ "%s", name);
if (WORDS_BIG_ENDIAN)
{
@@ -6356,7 +6357,7 @@
unsigned int i;
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++)
dw2_asm_output_data (4, a->dw_attr_val.v.val_float.array[i],
@@ -6368,7 +6369,7 @@
dw2_asm_output_data (1, AT_flag (a), "%s", name);
break;
- case dw_val_class_loc_list:
+ case dw_val_class_loc_list:
{
char *sym = AT_loc_list (a)->ll_symbol;
@@ -6938,7 +6939,7 @@
if (total > dirs[i].length + 1)
{
/* It's worthwhile adding. */
- for (j = i; j < ndirs; j++)
+ for (j = i; j < ndirs; j++)
if (savehere[j] > 0)
{
/* Remember how much we saved for this directory so far. */
@@ -7499,10 +7500,10 @@
/* See if we already have the appropriately qualified variant of
this type. */
- qualified_type
+ qualified_type
= get_qualified_type (type,
((is_const_type ? TYPE_QUAL_CONST : 0)
- | (is_volatile_type
+ | (is_volatile_type
? TYPE_QUAL_VOLATILE : 0)));
/* If we do, then we can just use its DIE, if it exists. */
@@ -7514,7 +7515,7 @@
}
/* 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
&& DECL_ORIGINAL_TYPE (TYPE_NAME (qualified_type)))
{
@@ -8141,7 +8142,7 @@
return 0;
break;
- case TRUTH_AND_EXPR:
+ case TRUTH_AND_EXPR:
case TRUTH_ANDIF_EXPR:
case BIT_AND_EXPR:
op = DW_OP_and;
@@ -8662,7 +8663,7 @@
out, and the CONST_INT rtx is assigned VOIDmode. */
{
HOST_WIDE_INT val = INTVAL (rtl);
-
+
/* ??? We really should be using HOST_WIDE_INT throughout. */
if (val < 0 && (long) val == val)
add_AT_int (die, DW_AT_const_value, (long) val);
@@ -8691,7 +8692,7 @@
if (GET_MODE_CLASS (mode) == MODE_FLOAT)
{
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_FROM_CONST_DOUBLE (rv, rtl);
@@ -10060,7 +10061,7 @@
}
else
arg = NULL_TREE;
-
+
first_parm_type = TYPE_ARG_TYPES (function_or_method_type);
/* Make our first pass over the list of formal parameter types and output a
@@ -10144,7 +10145,7 @@
/* Make sure we have the actual abstract inline, not a clone. */
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))
/* We've already generated the abstract instance. */
return;
@@ -10158,7 +10159,7 @@
gen_type_die_for_member
(context, decl, decl_function_context (decl) ? NULL : comp_unit_die);
}
-
+
/* Pretend we've just finished compiling this function. */
save_fn = current_function_decl;
current_function_decl = decl;
@@ -10477,7 +10478,7 @@
??? Duplicated blocks have been rewritten to use .debug_ranges. */
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. */
add_AT_die_ref (var_die, DW_AT_specification, old_die);
@@ -11559,7 +11560,7 @@
void *ptr ATTRIBUTE_UNUSED;
{
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);
}
@@ -12165,7 +12166,7 @@
add_child_die (comp_unit_die, die);
else if (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)
&& (context = TYPE_CONTEXT (node->created_for))))
&& TREE_CODE (context) == FUNCTION_DECL)
@@ -12291,7 +12292,7 @@
/* Have to end the primary source file. */
if (debug_info_level >= DINFO_LEVEL_VERBOSE)
- {
+ {
named_section_flags (DEBUG_MACINFO_SECTION, SECTION_DEBUG);
dw2_asm_output_data (1, DW_MACINFO_end_file, "End file");
}
Index: varasm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/varasm.c,v
retrieving revision 1.267
diff -u -r1.267 varasm.c
--- varasm.c 1 May 2002 17:56:55 -0000 1.267
+++ varasm.c 4 May 2002 14:49:46 -0000
@@ -268,6 +268,7 @@
in_section = in_data;
}
}
+
/* Tell assembler to ALWAYS switch to data section, in case
it's not sure where it is. */
@@ -339,7 +340,7 @@
{
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_hash_string (section), NO_INSERT);
@@ -347,7 +348,7 @@
}
/* 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. */
bool
@@ -356,15 +357,15 @@
{
struct in_named_entry **slot;
- slot = (struct in_named_entry**)
- htab_find_slot_with_hash (in_named_htab, name,
+ slot = (struct in_named_entry **)
+ htab_find_slot_with_hash (in_named_htab, name,
htab_hash_string (name), NO_INSERT);
if (! (*slot)->declared)
{
(*slot)->declared = true;
return true;
}
- else
+ else
{
return false;
}
@@ -381,7 +382,7 @@
{
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_hash_string (section), INSERT);
entry = *slot;
@@ -412,7 +413,7 @@
if (! set_named_section_flags (name, flags))
abort ();
- (* targetm.asm_out.named_section) (name, flags);
+ (*targetm.asm_out.named_section) (name, flags);
if (flags & SECTION_FORGET)
in_section = no_section;
@@ -624,9 +625,9 @@
void
mergeable_string_section (decl, align, flags)
- tree decl ATTRIBUTE_UNUSED;
- unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED;
- unsigned int flags ATTRIBUTE_UNUSED;
+ tree decl ATTRIBUTE_UNUSED;
+ unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED;
+ unsigned int flags ATTRIBUTE_UNUSED;
{
#ifdef HAVE_GAS_SHF_MERGE
if (flag_merge_constants
@@ -657,7 +658,7 @@
for (i = 0; i < len; i += unit)
{
for (j = 0; j < unit; j++)
- if (str [i + j] != '\0')
+ if (str[i + j] != '\0')
break;
if (j == unit)
break;
@@ -693,15 +694,15 @@
}
#endif
readonly_data_section ();
-}
+}
/* Tell assembler to switch to the section for constant merging. */
void
mergeable_constant_section (mode, align, flags)
- enum machine_mode mode ATTRIBUTE_UNUSED;
- unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED;
- unsigned int flags ATTRIBUTE_UNUSED;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
+ unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED;
+ unsigned int flags ATTRIBUTE_UNUSED;
{
#ifdef HAVE_GAS_SHF_MERGE
unsigned int modesize = GET_MODE_BITSIZE (mode);
@@ -720,7 +721,7 @@
flags |= (align / 8) | SECTION_MERGE;
named_section_flags (name, flags);
return;
- }
+ }
#endif
readonly_data_section ();
}
@@ -729,7 +730,7 @@
static const char *
strip_reg_name (name)
- const char *name;
+ const char *name;
{
#ifdef REGISTER_PREFIX
if (!strncmp (name, REGISTER_PREFIX, strlen (REGISTER_PREFIX)))
@@ -750,7 +751,7 @@
int
decode_reg_name (asmspec)
- const char *asmspec;
+ const char *asmspec;
{
if (asmspec != 0)
{
@@ -1203,7 +1204,7 @@
{
#ifdef ASM_OUTPUT_MAX_SKIP_ALIGN
ASM_OUTPUT_MAX_SKIP_ALIGN (asm_out_file,
- align_functions_log, align_functions-1);
+ align_functions_log, align_functions - 1);
#else
ASM_OUTPUT_ALIGN (asm_out_file, align_functions_log);
#endif
@@ -1373,7 +1374,7 @@
static void
asm_emit_uninitialised (decl, name, size, rounded)
tree decl;
- const char * name;
+ const char *name;
int size ATTRIBUTE_UNUSED;
int rounded ATTRIBUTE_UNUSED;
{
@@ -2486,7 +2487,7 @@
static void
const_str_htab_del (dfsp)
- void *dfsp;
+ void *dfsp;
{
free (dfsp);
}
@@ -2778,7 +2779,7 @@
&& TREE_CODE (TREE_PURPOSE (link)) == FIELD_DECL)
{
if (memcmp ((char *) &TREE_PURPOSE (link), p,
- sizeof TREE_PURPOSE (link)))
+ sizeof TREE_PURPOSE (link)))
return 0;
p += sizeof TREE_PURPOSE (link);
@@ -2839,7 +2840,7 @@
tree new = (*lang_hooks.expand_constant) (exp);
if (new != exp)
- return compare_constant_1 (new, p);
+ return compare_constant_1 (new, p);
else
return 0;
}
@@ -2935,7 +2936,7 @@
obstack_grow (&permanent_obstack, &nbytes, sizeof (nbytes));
obstack_blank (&permanent_obstack, nbytes);
get_set_constructor_bytes
- (exp, (unsigned char *) permanent_obstack.next_free-nbytes,
+ (exp, (unsigned char *) permanent_obstack.next_free - nbytes,
nbytes);
return;
}
@@ -3053,7 +3054,7 @@
tree new = (*lang_hooks.expand_constant) (exp);
if (new != exp)
- record_constant_1 (new);
+ record_constant_1 (new);
return;
}
}
@@ -3631,16 +3632,16 @@
if (value->kind == RTX_INT && value->un.addr.base != 0
&& GET_CODE (value->un.addr.base) == UNSPEC)
- {
+ {
/* For a simple UNSPEC, the base is set to the
operand, the kind field is set to the index of
- the unspec expression.
+ the unspec expression.
Together with the code below, in case that
- the operand is a SYMBOL_REF or LABEL_REF,
- the address of the string or the code_label
+ the operand is a SYMBOL_REF or LABEL_REF,
+ the address of the string or the code_label
is taken as base. */
if (XVECLEN (value->un.addr.base, 0) == 1)
- {
+ {
value->kind = RTX_UNSPEC + XINT (value->un.addr.base, 1);
value->un.addr.base = XVECEXP (value->un.addr.base, 0, 0);
}
@@ -3768,7 +3769,7 @@
return 0;
}
-
+
/* 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. */
@@ -3797,7 +3798,7 @@
desc = record_constant_rtx (mode, x);
desc->next = const_rtx_hash_table[hash];
const_rtx_hash_table[hash] = desc;
-
+
/* Align the location counter as required by EXP's data type. */
align = GET_MODE_ALIGNMENT (mode == VOIDmode ? word_mode : mode);
#ifdef CONSTANT_ALIGNMENT
@@ -3826,7 +3827,7 @@
first_pool = pool;
else
last_pool->next = pool;
-
+
last_pool = pool;
pool_offset += GET_MODE_SIZE (mode);
@@ -3944,8 +3945,8 @@
void
output_constant_pool (fnname, fndecl)
- const char *fnname ATTRIBUTE_UNUSED;
- tree fndecl ATTRIBUTE_UNUSED;
+ const char *fnname ATTRIBUTE_UNUSED;
+ tree fndecl ATTRIBUTE_UNUSED;
{
struct pool_constant *pool;
rtx x;
@@ -4055,7 +4056,7 @@
}
break;
- case MODE_VECTOR_INT:
+ case MODE_VECTOR_INT:
{
int i, units;
rtx elt;
@@ -4202,10 +4203,11 @@
if (CONSTANT_POOL_ADDRESS_P (x))
{
struct pool_constant *pool = find_pool_constant (cfun, x);
- if (pool->mark == 0) {
- pool->mark = 1;
- for_each_rtx (&(pool->constant), &mark_constant, NULL);
- }
+ if (pool->mark == 0)
+ {
+ pool->mark = 1;
+ for_each_rtx (&(pool->constant), &mark_constant, NULL);
+ }
else
return -1;
}
@@ -4279,7 +4281,7 @@
case CONSTRUCTOR:
for (tem = CONSTRUCTOR_ELTS (exp); tem; tem = TREE_CHAIN (tem))
if (TREE_VALUE (tem) != 0)
- reloc |= output_addressed_constants (TREE_VALUE (tem));
+ reloc |= output_addressed_constants (TREE_VALUE (tem));
break;
@@ -4397,7 +4399,7 @@
case PLUS_EXPR:
if (! INTEGRAL_TYPE_P (endtype)
|| TYPE_PRECISION (endtype) >= POINTER_SIZE)
- {
+ {
tree valid0 = initializer_constant_valid_p (TREE_OPERAND (value, 0),
endtype);
tree valid1 = initializer_constant_valid_p (TREE_OPERAND (value, 1),
@@ -4407,7 +4409,7 @@
return valid1;
if (valid1 == null_pointer_node)
return valid0;
- }
+ }
break;
case MINUS_EXPR:
@@ -4614,7 +4616,7 @@
if (TREE_CODE (exp) == INTEGER_CST)
assemble_integer (expand_expr (exp, NULL_RTX,
VOIDmode, EXPAND_INITIALIZER),
- thissize, align, 1);
+ thissize, align, 1);
else if (TREE_CODE (exp) == CONSTRUCTOR)
{
unsigned char *buffer = (unsigned char *) alloca (thissize);
@@ -4656,7 +4658,7 @@
return TREE_STRING_LENGTH (val);
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);
@@ -5050,7 +5052,7 @@
{
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);
const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
@@ -5234,7 +5236,7 @@
init_varasm_once ()
{
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_entry_eq, NULL);