+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>
Remove workaround for register stack overwrite bug in mmix.
void *tbase, void *dbase)
{
/* If .eh_frame is empty, don't register at all. */
- if (*(uword *)begin == 0)
+ if (*(uword *) begin == 0)
return;
ob->pc_begin = (void *)-1;
struct object *ob;
/* If .eh_frame is empty, don't register at all. */
- if (*(uword *)begin == 0)
+ if (*(uword *) begin == 0)
return;
ob = (struct object *) malloc (sizeof (struct object));
struct object *ob = 0;
/* If .eh_frame is empty, we haven't registered. */
- if (*(uword *)begin == 0)
+ if (*(uword *) begin == 0)
return ob;
init_object_mutex_once ();
__deregister_frame (void *begin)
{
/* If .eh_frame is empty, we haven't registered. */
- if (*(uword *)begin != 0)
+ if (*(uword *) begin != 0)
free (__deregister_frame_info (begin));
}
probe != &marker && fde_compare (ob, linear->array[i], *probe) < 0;
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[i] = (fde *)chain_end;
+ erratic->array[i] = (fde *) chain_end;
chain_end = &linear->array[i];
}
continue;
count += 1;
- if ((void *)pc_begin < ob->pc_begin)
- ob->pc_begin = (void *)pc_begin;
+ if ((void *) pc_begin < ob->pc_begin)
+ ob->pc_begin = (void *) pc_begin;
}
return count;
if (encoding == DW_EH_PE_absptr)
{
- if (*(_Unwind_Ptr *)this_fde->pc_begin == 0)
+ if (*(_Unwind_Ptr *) this_fde->pc_begin == 0)
continue;
}
else
if (encoding == DW_EH_PE_absptr)
{
- pc_begin = ((_Unwind_Ptr *)this_fde->pc_begin)[0];
- pc_range = ((_Unwind_Ptr *)this_fde->pc_begin)[1];
+ pc_begin = ((_Unwind_Ptr *) this_fde->pc_begin)[0];
+ pc_range = ((_Unwind_Ptr *) this_fde->pc_begin)[1];
if (pc_begin == 0)
continue;
}
continue;
}
- if ((_Unwind_Ptr)pc - pc_begin < pc_range)
+ if ((_Unwind_Ptr) pc - pc_begin < pc_range)
return this_fde;
}
void *pc_begin;
uaddr pc_range;
- pc_begin = ((void **)f->pc_begin)[0];
- pc_range = ((uaddr *)f->pc_begin)[1];
+ pc_begin = ((void **) f->pc_begin)[0];
+ pc_range = ((uaddr *) f->pc_begin)[1];
if (pc < pc_begin)
hi = i;
&pc_begin);
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;
- else if ((_Unwind_Ptr)pc >= pc_begin + pc_range)
+ else if ((_Unwind_Ptr) pc >= pc_begin + pc_range)
lo = i + 1;
else
return f;
f->pc_begin, &pc_begin);
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;
- else if ((_Unwind_Ptr)pc >= pc_begin + pc_range)
+ else if ((_Unwind_Ptr) pc >= pc_begin + pc_range)
lo = i + 1;
else
return f;
static inline fde *
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 *);
read_pointer (const void *p) { const union unaligned *up = p; return up->p; }
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
-read_1s (const void *p) { return *(const signed char *)p; }
+read_1s (const void *p) { return *(const signed char *) p; }
static inline int
read_2u (const void *p) { const union unaligned *up = p; return up->u2; }
result = second & first;
break;
case DW_OP_div:
- result = (_Unwind_Sword)second / (_Unwind_Sword)first;
+ result = (_Unwind_Sword) second / (_Unwind_Sword) first;
break;
case DW_OP_minus:
result = second - first;
break;
case DW_OP_mod:
- result = (_Unwind_Sword)second % (_Unwind_Sword)first;
+ result = (_Unwind_Sword) second % (_Unwind_Sword) first;
break;
case DW_OP_mul:
result = second * first;
result = second >> first;
break;
case DW_OP_shra:
- result = (_Unwind_Sword)second >> first;
+ result = (_Unwind_Sword) second >> first;
break;
case DW_OP_xor:
result = second ^ first;
break;
case DW_OP_le:
- result = (_Unwind_Sword)first <= (_Unwind_Sword)second;
+ result = (_Unwind_Sword) first <= (_Unwind_Sword) second;
break;
case DW_OP_ge:
- result = (_Unwind_Sword)first >= (_Unwind_Sword)second;
+ result = (_Unwind_Sword) first >= (_Unwind_Sword) second;
break;
case DW_OP_eq:
- result = (_Unwind_Sword)first == (_Unwind_Sword)second;
+ result = (_Unwind_Sword) first == (_Unwind_Sword) second;
break;
case DW_OP_lt:
- result = (_Unwind_Sword)first < (_Unwind_Sword)second;
+ result = (_Unwind_Sword) first < (_Unwind_Sword) second;
break;
case DW_OP_gt:
- result = (_Unwind_Sword)first > (_Unwind_Sword)second;
+ result = (_Unwind_Sword) first > (_Unwind_Sword) second;
break;
case DW_OP_ne:
- result = (_Unwind_Sword)first != (_Unwind_Sword)second;
+ result = (_Unwind_Sword) first != (_Unwind_Sword) second;
break;
default:
{
reg = insn & 0x3f;
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].loc.offset = offset;
}
case DW_CFA_offset_extended:
insn_ptr = read_uleb128 (insn_ptr, ®);
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].loc.offset = offset;
break;
older PowerPC code. */
insn_ptr = read_uleb128 (insn_ptr, ®);
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].loc.offset = -offset;
break;
execute_cfa_program (insn, end, context, fs);
/* 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);
insn = NULL;
if (fs->saw_z)
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 *);
result = *(_Unwind_Ptr *) a;
- p = (const unsigned char *)(a + sizeof (void *));
+ p = (const unsigned char *) (a + sizeof (void *));
}
else
{
{
_Unwind_Word tmp;
p = read_uleb128 (p, &tmp);
- result = (_Unwind_Ptr)tmp;
+ result = (_Unwind_Ptr) tmp;
}
break;
{
_Unwind_Sword tmp;
p = read_sleb128 (p, &tmp);
- result = (_Unwind_Ptr)tmp;
+ result = (_Unwind_Ptr) tmp;
}
break;
if (result != 0)
{
result += ((encoding & 0x70) == DW_EH_PE_pcrel
- ? (_Unwind_Ptr)u : base);
+ ? (_Unwind_Ptr) u : base);
if (encoding & DW_EH_PE_indirect)
- result = *(_Unwind_Ptr *)result;
+ result = *(_Unwind_Ptr *) result;
}
}
if ((enum machine_mode) *p++ != TYPE_MODE (TREE_TYPE (exp)))
return 0;
- strp = (const unsigned char *)TREE_STRING_POINTER (exp);
+ strp = (const unsigned char *) TREE_STRING_POINTER (exp);
len = TREE_STRING_LENGTH (exp);
if (memcmp ((char *) &TREE_STRING_LENGTH (exp), p,
sizeof TREE_STRING_LENGTH (exp)))
/* 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.
This file is part of GCC.
/* Free up memory allocated by the virtual array, but do not free any of the
elements involved. */
#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. */
extern varray_type varray_grow PARAMS ((varray_type, size_t));