1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-25 16:47:38 +01:00

(ia64_getfp): Change from macro to inline function. Check "loc" argument for

being NULL before dereferencing it.
(ia64_putfp): Ditto.
(ia64_get): Ditto.
(ia64_put): Ditto.

(Logical change 1.21)
This commit is contained in:
mostang.com!davidm 2002-11-09 03:59:27 +00:00
parent dee2508b2c
commit e633236827

View file

@ -190,14 +190,46 @@ extern void *_Uia64_uc_addr (ucontext_t *uc, unw_regnum_t regnum);
_Uia64_glibc_acquire_unwind_info((ip), (i), (c)->uc) _Uia64_glibc_acquire_unwind_info((ip), (i), (c)->uc)
# define ia64_release_unwind_info(c,ip,i) \ # define ia64_release_unwind_info(c,ip,i) \
_Uia64_glibc_release_unwind_info((i), (c)->uc) _Uia64_glibc_release_unwind_info((i), (c)->uc)
# define ia64_get(c,l,v) \
(*(v) = *(unw_word_t *) IA64_MASK_LOC_TYPE(l), 0) /* Note: the register accessors (ia64_{get,set}{,fp}()) must check for
# define ia64_put(c,l,v) \ NULL locations because _Uia64_uc_addr() returns NULL for unsaved
(*(unw_word_t *) IA64_MASK_LOC_TYPE(l) = (v), 0) registers. */
# define ia64_getfp(c,l,v) \
(*(v) = *(unw_fpreg_t *) IA64_MASK_LOC_TYPE(l), 0) static inline int
# define ia64_putfp(c,l,v) \ ia64_getfp (struct ia64_cursor *c, unw_word_t loc, unw_fpreg_t *val)
(*(unw_fpreg_t *) IA64_MASK_LOC_TYPE(l) = (v), 0) {
if (!loc)
return -1;
*val = *(unw_fpreg_t *) IA64_MASK_LOC_TYPE(loc);
return 0;
}
static inline int
ia64_putfp (struct ia64_cursor *c, unw_word_t loc, unw_fpreg_t val)
{
if (!loc)
return -1;
*(unw_fpreg_t *) IA64_MASK_LOC_TYPE(loc) = val;
return 0;
}
static inline int
ia64_get (struct ia64_cursor *c, unw_word_t loc, unw_word_t *val)
{
if (!loc)
return -1;
*val = *(unw_word_t *) IA64_MASK_LOC_TYPE(loc);
return 0;
}
static inline int
ia64_put (struct ia64_cursor *c, unw_word_t loc, unw_word_t val)
{
if (!loc)
return -1;
*(unw_word_t *) IA64_MASK_LOC_TYPE(loc) = (val);
return 0;
}
#else /* !UNW_LOCAL_ONLY */ #else /* !UNW_LOCAL_ONLY */