diff options
author | Jim Wilson <wilson@cygnus.com> | 2000-08-23 20:55:01 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 2000-08-23 13:55:01 -0700 |
commit | b97644fc89bb84542f03753d7f8fcffb8c716871 (patch) | |
tree | 30e5acffc53f84be5fe764d223b781d7a701f781 | |
parent | 215e4ee73e98f68b4a0b6eabcfee10baac02f388 (diff) | |
download | gcc-b97644fc89bb84542f03753d7f8fcffb8c716871.zip gcc-b97644fc89bb84542f03753d7f8fcffb8c716871.tar.gz gcc-b97644fc89bb84542f03753d7f8fcffb8c716871.tar.bz2 |
Minor cleanup of ia64 unwind handler code.
* frame.h (IA64_UNW_EHANDLER, IA64_UNW_UHANDLER): New.
* config/ia64/frame-ia64.c (__get_personality): Return zero if neither
EHANDLER nor UHANDLER bit is set.
(__get_except_table): Likewise.
From-SVN: r35922
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/ia64/frame-ia64.c | 23 | ||||
-rw-r--r-- | gcc/frame.h | 4 |
3 files changed, 28 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0ada585..7c28f4b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2000-08-23 Jim Wilson <wilson@cygnus.com> + + * frame.h (IA64_UNW_EHANDLER, IA64_UNW_UHANDLER): New. + * config/ia64/frame-ia64.c (__get_personality): Return zero if neither + EHANDLER nor UHANDLER bit is set. + (__get_except_table): Likewise. + 2000-08-23 Nick Clifton <nickc@redhat.com> * config/arm/lib1funcs.asm: Replace upper case condition codes diff --git a/gcc/config/ia64/frame-ia64.c b/gcc/config/ia64/frame-ia64.c index efddd9f..5d5e3a3 100644 --- a/gcc/config/ia64/frame-ia64.c +++ b/gcc/config/ia64/frame-ia64.c @@ -1376,27 +1376,38 @@ __build_ia64_frame_state (pc, frame, bsp, sp, pc_base_ptr) return unw_info_ptr; } -/* Given an unwind info pointer, return the personailty routine. */ +/* Given an unwind info pointer, return the personality routine. */ void * __get_personality (ptr) unwind_info_ptr *ptr; { void **p; + + /* There is a personality routine only if one of the EHANDLER or UHANDLER + bits is set. */ + if (! (IA64_UNW_HDR_FLAGS (ptr->header) + & (IA64_UNW_EHANDLER|IA64_UNW_UHANDLER))) + return 0; + p = (void **) (ptr->unwind_descriptors + IA64_UNW_HDR_LENGTH (ptr->header) * 8); return *p; } +/* Given an unwind info pointer, return the exception table. */ void * __get_except_table (ptr) unwind_info_ptr *ptr; { - void **p, *table; - p = (void **) (ptr->unwind_descriptors - + IA64_UNW_HDR_LENGTH (ptr->header) * 8); - /* If there is no personality, there is no handler data. */ - if (*p == 0) + void *table; + + /* If there is no personality, there is no handler data. + There is a personality routine only if one of the EHANDLER or UHANDLER + bits is set. */ + if (! (IA64_UNW_HDR_FLAGS (ptr->header) + & (IA64_UNW_EHANDLER|IA64_UNW_UHANDLER))) return 0; + table = (void *) (ptr->unwind_descriptors + IA64_UNW_HDR_LENGTH (ptr->header) * 8 + 8); return table; diff --git a/gcc/frame.h b/gcc/frame.h index 472d358..d8ebb6e 100644 --- a/gcc/frame.h +++ b/gcc/frame.h @@ -267,6 +267,10 @@ typedef struct unwind_info_ptr #define IA64_UNW_HDR_FLAGS(x) (((x) >> 32) & 0xffffUL) #define IA64_UNW_HDR_VERSION(x) (((x) >> 48) & 0xffffUL) +/* Header flag bits, after extraction by IA64_UNW_HDR_FLAGS. */ +#define IA64_UNW_EHANDLER 0x1 +#define IA64_UNW_UHANDLER 0x2 + extern unwind_info_ptr *__build_ia64_frame_state (unsigned char *, ia64_frame_state *, void *, void *, |