summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDave Watson <dade.watson@gmail.com>2022-05-24 11:06:17 -0700
committerDave Watson <dade.watson@gmail.com>2022-05-24 11:06:17 -0700
commit7cf6e84bb86ff5840896b4910ccc3865d4f00ffb (patch)
tree584017df7ceb1b14c86733e276d4260fdbc367b6 /include
parent7dc184fbeb550c8710a7b25a1462968c7bfed92a (diff)
downloadlibunwind-7cf6e84bb86ff5840896b4910ccc3865d4f00ffb.tar.gz
Revert "Address CA issue using existing libunwind macros and explicit casting"
This reverts commit a9d50ef5066e8ff959dee5df5f997cc72c528f26.
Diffstat (limited to 'include')
-rw-r--r--include/dwarf_i.h2
-rw-r--r--include/remote.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/include/dwarf_i.h b/include/dwarf_i.h
index ff2c3282..58f80340 100644
--- a/include/dwarf_i.h
+++ b/include/dwarf_i.h
@@ -136,7 +136,7 @@ static inline int
dwarf_readu8 (unw_addr_space_t as, unw_accessors_t *a, unw_word_t *addr,
uint8_t *valp, void *arg)
{
- unw_word_t val, aligned_addr = UNW_ALIGN(*addr, sizeof (unw_word_t));
+ unw_word_t val, aligned_addr = *addr & (~sizeof (unw_word_t) + 1);
unw_word_t off = *addr - aligned_addr;
int ret;
diff --git a/include/remote.h b/include/remote.h
index 0c55208a..814e532c 100644
--- a/include/remote.h
+++ b/include/remote.h
@@ -51,7 +51,7 @@ static inline int
fetch8 (unw_addr_space_t as, unw_accessors_t *a,
unw_word_t *addr, int8_t *valp, void *arg)
{
- unw_word_t val, aligned_addr = UNW_ALIGN(*addr, WSIZE), off = *addr - aligned_addr;
+ unw_word_t val, aligned_addr = *addr & (~WSIZE + 1), off = *addr - aligned_addr;
int ret;
*addr += 1;
@@ -71,7 +71,7 @@ static inline int
fetch16 (unw_addr_space_t as, unw_accessors_t *a,
unw_word_t *addr, int16_t *valp, void *arg)
{
- unw_word_t val, aligned_addr = UNW_ALIGN(*addr, WSIZE), off = *addr - aligned_addr;
+ unw_word_t val, aligned_addr = *addr & (~WSIZE + 1), off = *addr - aligned_addr;
int ret;
if ((off & 0x1) != 0)
@@ -94,7 +94,7 @@ static inline int
fetch32 (unw_addr_space_t as, unw_accessors_t *a,
unw_word_t *addr, int32_t *valp, void *arg)
{
- unw_word_t val, aligned_addr = UNW_ALIGN(*addr, WSIZE), off = *addr - aligned_addr;
+ unw_word_t val, aligned_addr = *addr & (~WSIZE + 1), off = *addr - aligned_addr;
int ret;
if ((off & 0x3) != 0)