[PATCH 2/3] libstdc++: Remove local _Unwind_Word and _Unwind_Sword uses
Andreas Krebbel
Andreas.Krebbel@de.ibm.com
Mon Jan 22 13:28:00 GMT 2007
2007-01-22 Andreas Krebbel <krebbel1@de.ibm.com>
* libsupc++/eh_personality.cc (parse_lsda_header, check_exception_spec,
get_ttype_entry, empty_exception_spec, PERSONALITY_FUNCTION): Replaced
_Unwind_Word with _uleb128_t and _Unwind_SWord with _sleb128_t.
Index: libstdc++-v3/libsupc++/eh_personality.cc
===================================================================
*** libstdc++-v3/libsupc++/eh_personality.cc.orig 2007-01-22 09:52:31.000000000 +0100
--- libstdc++-v3/libsupc++/eh_personality.cc 2007-01-22 10:13:55.000000000 +0100
*************** static const unsigned char *
*** 56,62 ****
parse_lsda_header (_Unwind_Context *context, const unsigned char *p,
lsda_header_info *info)
{
! _Unwind_Word tmp;
unsigned char lpstart_encoding;
info->Start = (context ? _Unwind_GetRegionStart (context) : 0);
--- 56,62 ----
parse_lsda_header (_Unwind_Context *context, const unsigned char *p,
lsda_header_info *info)
{
! _uleb128_t tmp;
unsigned char lpstart_encoding;
info->Start = (context ? _Unwind_GetRegionStart (context) : 0);
*************** parse_lsda_header (_Unwind_Context *cont
*** 92,98 ****
// Return an element from a type table.
static const std::type_info*
! get_ttype_entry(lsda_header_info* info, _Unwind_Word i)
{
_Unwind_Ptr ptr;
--- 92,98 ----
// Return an element from a type table.
static const std::type_info*
! get_ttype_entry(lsda_header_info* info, _uleb128_t i)
{
_Unwind_Ptr ptr;
*************** typedef _Unwind_Control_Block _throw_typ
*** 112,126 ****
static bool
check_exception_spec(lsda_header_info* info, _throw_typet* throw_type,
! void* thrown_ptr, _Unwind_Sword filter_value)
{
! const _Unwind_Word* e = ((const _Unwind_Word*) info->TType)
- filter_value - 1;
while (1)
{
const std::type_info* catch_type;
! _Unwind_Word tmp;
tmp = *e;
--- 112,126 ----
static bool
check_exception_spec(lsda_header_info* info, _throw_typet* throw_type,
! void* thrown_ptr, _sleb128_t filter_value)
{
! const _uleb128_t* e = ((const _uleb128_t*) info->TType)
- filter_value - 1;
while (1)
{
const std::type_info* catch_type;
! _uleb128_t tmp;
tmp = *e;
*************** typedef const std::type_info _throw_type
*** 210,216 ****
// Return an element from a type table.
static const std::type_info *
! get_ttype_entry (lsda_header_info *info, _Unwind_Word i)
{
_Unwind_Ptr ptr;
--- 210,216 ----
// Return an element from a type table.
static const std::type_info *
! get_ttype_entry (lsda_header_info *info, _uleb128_t i)
{
_Unwind_Ptr ptr;
*************** get_adjusted_ptr (const std::type_info *
*** 253,266 ****
static bool
check_exception_spec(lsda_header_info* info, _throw_typet* throw_type,
! void* thrown_ptr, _Unwind_Sword filter_value)
{
const unsigned char *e = info->TType - filter_value - 1;
while (1)
{
const std::type_info *catch_type;
! _Unwind_Word tmp;
e = read_uleb128 (e, &tmp);
--- 253,266 ----
static bool
check_exception_spec(lsda_header_info* info, _throw_typet* throw_type,
! void* thrown_ptr, _sleb128_t filter_value)
{
const unsigned char *e = info->TType - filter_value - 1;
while (1)
{
const std::type_info *catch_type;
! _uleb128_t tmp;
e = read_uleb128 (e, &tmp);
*************** static bool
*** 329,335 ****
empty_exception_spec (lsda_header_info *info, _Unwind_Sword filter_value)
{
const unsigned char *e = info->TType - filter_value - 1;
! _Unwind_Word tmp;
e = read_uleb128 (e, &tmp);
return tmp == 0;
--- 329,335 ----
empty_exception_spec (lsda_header_info *info, _Unwind_Sword filter_value)
{
const unsigned char *e = info->TType - filter_value - 1;
! _uleb128_t tmp;
e = read_uleb128 (e, &tmp);
return tmp == 0;
*************** PERSONALITY_FUNCTION (int version,
*** 489,495 ****
while (p < info.action_table)
{
_Unwind_Ptr cs_start, cs_len, cs_lp;
! _Unwind_Word cs_action;
// Note that all call-site encodings are "absolute" displacements.
p = read_encoded_value (0, info.call_site_encoding, p, &cs_start);
--- 489,495 ----
while (p < info.action_table)
{
_Unwind_Ptr cs_start, cs_len, cs_lp;
! _uleb128_t cs_action;
// Note that all call-site encodings are "absolute" displacements.
p = read_encoded_value (0, info.call_site_encoding, p, &cs_start);
*************** PERSONALITY_FUNCTION (int version,
*** 535,541 ****
{
// Otherwise we have a catch handler or exception specification.
! _Unwind_Sword ar_filter, ar_disp;
const std::type_info* catch_type;
_throw_typet* throw_type;
bool saw_cleanup = false;
--- 535,541 ----
{
// Otherwise we have a catch handler or exception specification.
! _sleb128_t ar_filter, ar_disp;
const std::type_info* catch_type;
_throw_typet* throw_type;
bool saw_cleanup = false;
More information about the Gcc-patches
mailing list