Commit e9d1b155 by Kazu Hirata Committed by Kazu Hirata

unwind-dw2.c: Fix formatting.

	* unwind-dw2.c: Fix formatting.
	* unwind-dw2-fde.c: Likewise.
	* unwind-dw2-fde.h: Likewise.
	* unwind-pe.h: Likewise.
	* varasm.c: Likewise.
	* varray.h: Likewise.

From-SVN: r49045
parent e23baf78
2002-01-21 Kazu Hirata <kazu@hxi.com>
* unwind-dw2.c: Fix formatting.
* unwind-dw2-fde.c: Likewise.
* unwind-dw2-fde.h: Likewise.
* unwind-pe.h: Likewise.
* varasm.c: Likewise.
* varray.h: Likewise.
2002-01-21 Hans-Peter Nilsson <hp@bitrange.com> 2002-01-21 Hans-Peter Nilsson <hp@bitrange.com>
Remove workaround for register stack overwrite bug in mmix. Remove workaround for register stack overwrite bug in mmix.
......
...@@ -76,7 +76,7 @@ __register_frame_info_bases (void *begin, struct object *ob, ...@@ -76,7 +76,7 @@ __register_frame_info_bases (void *begin, struct object *ob,
void *tbase, void *dbase) void *tbase, void *dbase)
{ {
/* If .eh_frame is empty, don't register at all. */ /* If .eh_frame is empty, don't register at all. */
if (*(uword *)begin == 0) if (*(uword *) begin == 0)
return; return;
ob->pc_begin = (void *)-1; ob->pc_begin = (void *)-1;
...@@ -107,7 +107,7 @@ __register_frame (void *begin) ...@@ -107,7 +107,7 @@ __register_frame (void *begin)
struct object *ob; struct object *ob;
/* If .eh_frame is empty, don't register at all. */ /* If .eh_frame is empty, don't register at all. */
if (*(uword *)begin == 0) if (*(uword *) begin == 0)
return; return;
ob = (struct object *) malloc (sizeof (struct object)); ob = (struct object *) malloc (sizeof (struct object));
...@@ -171,7 +171,7 @@ __deregister_frame_info_bases (void *begin) ...@@ -171,7 +171,7 @@ __deregister_frame_info_bases (void *begin)
struct object *ob = 0; struct object *ob = 0;
/* If .eh_frame is empty, we haven't registered. */ /* If .eh_frame is empty, we haven't registered. */
if (*(uword *)begin == 0) if (*(uword *) begin == 0)
return ob; return ob;
init_object_mutex_once (); init_object_mutex_once ();
...@@ -224,7 +224,7 @@ void ...@@ -224,7 +224,7 @@ void
__deregister_frame (void *begin) __deregister_frame (void *begin)
{ {
/* If .eh_frame is empty, we haven't registered. */ /* If .eh_frame is empty, we haven't registered. */
if (*(uword *)begin != 0) if (*(uword *) begin != 0)
free (__deregister_frame_info (begin)); free (__deregister_frame_info (begin));
} }
...@@ -443,10 +443,10 @@ fde_split (struct object *ob, fde_compare_t fde_compare, ...@@ -443,10 +443,10 @@ fde_split (struct object *ob, fde_compare_t fde_compare,
probe != &marker && fde_compare (ob, linear->array[i], *probe) < 0; probe != &marker && fde_compare (ob, linear->array[i], *probe) < 0;
probe = chain_end) probe = chain_end)
{ {
chain_end = (fde **)erratic->array[probe - linear->array]; chain_end = (fde **) erratic->array[probe - linear->array];
erratic->array[probe - linear->array] = NULL; erratic->array[probe - linear->array] = NULL;
} }
erratic->array[i] = (fde *)chain_end; erratic->array[i] = (fde *) chain_end;
chain_end = &linear->array[i]; chain_end = &linear->array[i];
} }
...@@ -642,8 +642,8 @@ classify_object_over_fdes (struct object *ob, fde *this_fde) ...@@ -642,8 +642,8 @@ classify_object_over_fdes (struct object *ob, fde *this_fde)
continue; continue;
count += 1; count += 1;
if ((void *)pc_begin < ob->pc_begin) if ((void *) pc_begin < ob->pc_begin)
ob->pc_begin = (void *)pc_begin; ob->pc_begin = (void *) pc_begin;
} }
return count; return count;
...@@ -679,7 +679,7 @@ add_fdes (struct object *ob, struct fde_accumulator *accu, fde *this_fde) ...@@ -679,7 +679,7 @@ add_fdes (struct object *ob, struct fde_accumulator *accu, fde *this_fde)
if (encoding == DW_EH_PE_absptr) if (encoding == DW_EH_PE_absptr)
{ {
if (*(_Unwind_Ptr *)this_fde->pc_begin == 0) if (*(_Unwind_Ptr *) this_fde->pc_begin == 0)
continue; continue;
} }
else else
...@@ -797,8 +797,8 @@ linear_search_fdes (struct object *ob, fde *this_fde, void *pc) ...@@ -797,8 +797,8 @@ linear_search_fdes (struct object *ob, fde *this_fde, void *pc)
if (encoding == DW_EH_PE_absptr) if (encoding == DW_EH_PE_absptr)
{ {
pc_begin = ((_Unwind_Ptr *)this_fde->pc_begin)[0]; pc_begin = ((_Unwind_Ptr *) this_fde->pc_begin)[0];
pc_range = ((_Unwind_Ptr *)this_fde->pc_begin)[1]; pc_range = ((_Unwind_Ptr *) this_fde->pc_begin)[1];
if (pc_begin == 0) if (pc_begin == 0)
continue; continue;
} }
...@@ -825,7 +825,7 @@ linear_search_fdes (struct object *ob, fde *this_fde, void *pc) ...@@ -825,7 +825,7 @@ linear_search_fdes (struct object *ob, fde *this_fde, void *pc)
continue; continue;
} }
if ((_Unwind_Ptr)pc - pc_begin < pc_range) if ((_Unwind_Ptr) pc - pc_begin < pc_range)
return this_fde; return this_fde;
} }
...@@ -848,8 +848,8 @@ binary_search_unencoded_fdes (struct object *ob, void *pc) ...@@ -848,8 +848,8 @@ binary_search_unencoded_fdes (struct object *ob, void *pc)
void *pc_begin; void *pc_begin;
uaddr pc_range; uaddr pc_range;
pc_begin = ((void **)f->pc_begin)[0]; pc_begin = ((void **) f->pc_begin)[0];
pc_range = ((uaddr *)f->pc_begin)[1]; pc_range = ((uaddr *) f->pc_begin)[1];
if (pc < pc_begin) if (pc < pc_begin)
hi = i; hi = i;
...@@ -881,9 +881,9 @@ binary_search_single_encoding_fdes (struct object *ob, void *pc) ...@@ -881,9 +881,9 @@ binary_search_single_encoding_fdes (struct object *ob, void *pc)
&pc_begin); &pc_begin);
read_encoded_value_with_base (encoding & 0x0F, 0, p, &pc_range); read_encoded_value_with_base (encoding & 0x0F, 0, p, &pc_range);
if ((_Unwind_Ptr)pc < pc_begin) if ((_Unwind_Ptr) pc < pc_begin)
hi = i; hi = i;
else if ((_Unwind_Ptr)pc >= pc_begin + pc_range) else if ((_Unwind_Ptr) pc >= pc_begin + pc_range)
lo = i + 1; lo = i + 1;
else else
return f; return f;
...@@ -912,9 +912,9 @@ binary_search_mixed_encoding_fdes (struct object *ob, void *pc) ...@@ -912,9 +912,9 @@ binary_search_mixed_encoding_fdes (struct object *ob, void *pc)
f->pc_begin, &pc_begin); f->pc_begin, &pc_begin);
read_encoded_value_with_base (encoding & 0x0F, 0, p, &pc_range); read_encoded_value_with_base (encoding & 0x0F, 0, p, &pc_range);
if ((_Unwind_Ptr)pc < pc_begin) if ((_Unwind_Ptr) pc < pc_begin)
hi = i; hi = i;
else if ((_Unwind_Ptr)pc >= pc_begin + pc_range) else if ((_Unwind_Ptr) pc >= pc_begin + pc_range)
lo = i + 1; lo = i + 1;
else else
return f; return f;
......
...@@ -156,7 +156,7 @@ get_cie (struct dwarf_fde *f) ...@@ -156,7 +156,7 @@ get_cie (struct dwarf_fde *f)
static inline fde * static inline fde *
next_fde (fde *f) next_fde (fde *f)
{ {
return (fde *)((char *)f + f->length + sizeof (f->length)); return (fde *) ((char *) f + f->length + sizeof (f->length));
} }
extern fde * _Unwind_Find_FDE (void *, struct dwarf_eh_bases *); extern fde * _Unwind_Find_FDE (void *, struct dwarf_eh_bases *);
...@@ -132,10 +132,10 @@ static inline void * ...@@ -132,10 +132,10 @@ static inline void *
read_pointer (const void *p) { const union unaligned *up = p; return up->p; } read_pointer (const void *p) { const union unaligned *up = p; return up->p; }
static inline int static inline int
read_1u (const void *p) { return *(const unsigned char *)p; } read_1u (const void *p) { return *(const unsigned char *) p; }
static inline int static inline int
read_1s (const void *p) { return *(const signed char *)p; } read_1s (const void *p) { return *(const signed char *) p; }
static inline int static inline int
read_2u (const void *p) { const union unaligned *up = p; return up->u2; } read_2u (const void *p) { const union unaligned *up = p; return up->u2; }
...@@ -600,13 +600,13 @@ execute_stack_op (const unsigned char *op_ptr, const unsigned char *op_end, ...@@ -600,13 +600,13 @@ execute_stack_op (const unsigned char *op_ptr, const unsigned char *op_end,
result = second & first; result = second & first;
break; break;
case DW_OP_div: case DW_OP_div:
result = (_Unwind_Sword)second / (_Unwind_Sword)first; result = (_Unwind_Sword) second / (_Unwind_Sword) first;
break; break;
case DW_OP_minus: case DW_OP_minus:
result = second - first; result = second - first;
break; break;
case DW_OP_mod: case DW_OP_mod:
result = (_Unwind_Sword)second % (_Unwind_Sword)first; result = (_Unwind_Sword) second % (_Unwind_Sword) first;
break; break;
case DW_OP_mul: case DW_OP_mul:
result = second * first; result = second * first;
...@@ -624,28 +624,28 @@ execute_stack_op (const unsigned char *op_ptr, const unsigned char *op_end, ...@@ -624,28 +624,28 @@ execute_stack_op (const unsigned char *op_ptr, const unsigned char *op_end,
result = second >> first; result = second >> first;
break; break;
case DW_OP_shra: case DW_OP_shra:
result = (_Unwind_Sword)second >> first; result = (_Unwind_Sword) second >> first;
break; break;
case DW_OP_xor: case DW_OP_xor:
result = second ^ first; result = second ^ first;
break; break;
case DW_OP_le: case DW_OP_le:
result = (_Unwind_Sword)first <= (_Unwind_Sword)second; result = (_Unwind_Sword) first <= (_Unwind_Sword) second;
break; break;
case DW_OP_ge: case DW_OP_ge:
result = (_Unwind_Sword)first >= (_Unwind_Sword)second; result = (_Unwind_Sword) first >= (_Unwind_Sword) second;
break; break;
case DW_OP_eq: case DW_OP_eq:
result = (_Unwind_Sword)first == (_Unwind_Sword)second; result = (_Unwind_Sword) first == (_Unwind_Sword) second;
break; break;
case DW_OP_lt: case DW_OP_lt:
result = (_Unwind_Sword)first < (_Unwind_Sword)second; result = (_Unwind_Sword) first < (_Unwind_Sword) second;
break; break;
case DW_OP_gt: case DW_OP_gt:
result = (_Unwind_Sword)first > (_Unwind_Sword)second; result = (_Unwind_Sword) first > (_Unwind_Sword) second;
break; break;
case DW_OP_ne: case DW_OP_ne:
result = (_Unwind_Sword)first != (_Unwind_Sword)second; result = (_Unwind_Sword) first != (_Unwind_Sword) second;
break; break;
default: default:
...@@ -725,7 +725,7 @@ execute_cfa_program (const unsigned char *insn_ptr, ...@@ -725,7 +725,7 @@ execute_cfa_program (const unsigned char *insn_ptr,
{ {
reg = insn & 0x3f; reg = insn & 0x3f;
insn_ptr = read_uleb128 (insn_ptr, &utmp); insn_ptr = read_uleb128 (insn_ptr, &utmp);
offset = (_Unwind_Sword)utmp * fs->data_align; offset = (_Unwind_Sword) utmp * fs->data_align;
fs->regs.reg[reg].how = REG_SAVED_OFFSET; fs->regs.reg[reg].how = REG_SAVED_OFFSET;
fs->regs.reg[reg].loc.offset = offset; fs->regs.reg[reg].loc.offset = offset;
} }
...@@ -757,7 +757,7 @@ execute_cfa_program (const unsigned char *insn_ptr, ...@@ -757,7 +757,7 @@ execute_cfa_program (const unsigned char *insn_ptr,
case DW_CFA_offset_extended: case DW_CFA_offset_extended:
insn_ptr = read_uleb128 (insn_ptr, &reg); insn_ptr = read_uleb128 (insn_ptr, &reg);
insn_ptr = read_uleb128 (insn_ptr, &utmp); insn_ptr = read_uleb128 (insn_ptr, &utmp);
offset = (_Unwind_Sword)utmp * fs->data_align; offset = (_Unwind_Sword) utmp * fs->data_align;
fs->regs.reg[reg].how = REG_SAVED_OFFSET; fs->regs.reg[reg].how = REG_SAVED_OFFSET;
fs->regs.reg[reg].loc.offset = offset; fs->regs.reg[reg].loc.offset = offset;
break; break;
...@@ -878,7 +878,7 @@ execute_cfa_program (const unsigned char *insn_ptr, ...@@ -878,7 +878,7 @@ execute_cfa_program (const unsigned char *insn_ptr,
older PowerPC code. */ older PowerPC code. */
insn_ptr = read_uleb128 (insn_ptr, &reg); insn_ptr = read_uleb128 (insn_ptr, &reg);
insn_ptr = read_uleb128 (insn_ptr, &utmp); insn_ptr = read_uleb128 (insn_ptr, &utmp);
offset = (_Unwind_Word)utmp * fs->data_align; offset = (_Unwind_Word) utmp * fs->data_align;
fs->regs.reg[reg].how = REG_SAVED_OFFSET; fs->regs.reg[reg].how = REG_SAVED_OFFSET;
fs->regs.reg[reg].loc.offset = -offset; fs->regs.reg[reg].loc.offset = -offset;
break; break;
...@@ -929,7 +929,7 @@ uw_frame_state_for (struct _Unwind_Context *context, _Unwind_FrameState *fs) ...@@ -929,7 +929,7 @@ uw_frame_state_for (struct _Unwind_Context *context, _Unwind_FrameState *fs)
execute_cfa_program (insn, end, context, fs); execute_cfa_program (insn, end, context, fs);
/* Locate augmentation for the fde. */ /* Locate augmentation for the fde. */
aug = (unsigned char *)fde + sizeof (*fde); aug = (unsigned char *) fde + sizeof (*fde);
aug += 2 * size_of_encoded_value (fs->fde_encoding); aug += 2 * size_of_encoded_value (fs->fde_encoding);
insn = NULL; insn = NULL;
if (fs->saw_z) if (fs->saw_z)
......
...@@ -183,10 +183,10 @@ read_encoded_value_with_base (unsigned char encoding, _Unwind_Ptr base, ...@@ -183,10 +183,10 @@ read_encoded_value_with_base (unsigned char encoding, _Unwind_Ptr base,
if (encoding == DW_EH_PE_aligned) if (encoding == DW_EH_PE_aligned)
{ {
_Unwind_Ptr a = (_Unwind_Ptr)p; _Unwind_Ptr a = (_Unwind_Ptr) p;
a = (a + sizeof (void *) - 1) & - sizeof(void *); a = (a + sizeof (void *) - 1) & - sizeof(void *);
result = *(_Unwind_Ptr *) a; result = *(_Unwind_Ptr *) a;
p = (const unsigned char *)(a + sizeof (void *)); p = (const unsigned char *) (a + sizeof (void *));
} }
else else
{ {
...@@ -201,7 +201,7 @@ read_encoded_value_with_base (unsigned char encoding, _Unwind_Ptr base, ...@@ -201,7 +201,7 @@ read_encoded_value_with_base (unsigned char encoding, _Unwind_Ptr base,
{ {
_Unwind_Word tmp; _Unwind_Word tmp;
p = read_uleb128 (p, &tmp); p = read_uleb128 (p, &tmp);
result = (_Unwind_Ptr)tmp; result = (_Unwind_Ptr) tmp;
} }
break; break;
...@@ -209,7 +209,7 @@ read_encoded_value_with_base (unsigned char encoding, _Unwind_Ptr base, ...@@ -209,7 +209,7 @@ read_encoded_value_with_base (unsigned char encoding, _Unwind_Ptr base,
{ {
_Unwind_Sword tmp; _Unwind_Sword tmp;
p = read_sleb128 (p, &tmp); p = read_sleb128 (p, &tmp);
result = (_Unwind_Ptr)tmp; result = (_Unwind_Ptr) tmp;
} }
break; break;
...@@ -246,9 +246,9 @@ read_encoded_value_with_base (unsigned char encoding, _Unwind_Ptr base, ...@@ -246,9 +246,9 @@ read_encoded_value_with_base (unsigned char encoding, _Unwind_Ptr base,
if (result != 0) if (result != 0)
{ {
result += ((encoding & 0x70) == DW_EH_PE_pcrel result += ((encoding & 0x70) == DW_EH_PE_pcrel
? (_Unwind_Ptr)u : base); ? (_Unwind_Ptr) u : base);
if (encoding & DW_EH_PE_indirect) if (encoding & DW_EH_PE_indirect)
result = *(_Unwind_Ptr *)result; result = *(_Unwind_Ptr *) result;
} }
} }
......
...@@ -2684,7 +2684,7 @@ compare_constant_1 (exp, p) ...@@ -2684,7 +2684,7 @@ compare_constant_1 (exp, p)
if ((enum machine_mode) *p++ != TYPE_MODE (TREE_TYPE (exp))) if ((enum machine_mode) *p++ != TYPE_MODE (TREE_TYPE (exp)))
return 0; return 0;
strp = (const unsigned char *)TREE_STRING_POINTER (exp); strp = (const unsigned char *) TREE_STRING_POINTER (exp);
len = TREE_STRING_LENGTH (exp); len = TREE_STRING_LENGTH (exp);
if (memcmp ((char *) &TREE_STRING_LENGTH (exp), p, if (memcmp ((char *) &TREE_STRING_LENGTH (exp), p,
sizeof TREE_STRING_LENGTH (exp))) sizeof TREE_STRING_LENGTH (exp)))
......
/* Virtual array support. /* Virtual array support.
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
Contributed by Cygnus Solutions. Contributed by Cygnus Solutions.
This file is part of GCC. This file is part of GCC.
...@@ -159,7 +159,7 @@ extern varray_type varray_init PARAMS ((size_t, size_t, const char *)); ...@@ -159,7 +159,7 @@ extern varray_type varray_init PARAMS ((size_t, size_t, const char *));
/* Free up memory allocated by the virtual array, but do not free any of the /* Free up memory allocated by the virtual array, but do not free any of the
elements involved. */ elements involved. */
#define VARRAY_FREE(vp) \ #define VARRAY_FREE(vp) \
do { if (vp) { free (vp); vp = (varray_type)0; } } while (0) do { if (vp) { free (vp); vp = (varray_type) 0; } } while (0)
/* Grow/shrink the virtual array VA to N elements. */ /* Grow/shrink the virtual array VA to N elements. */
extern varray_type varray_grow PARAMS ((varray_type, size_t)); extern varray_type varray_grow PARAMS ((varray_type, size_t));
......
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