summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Munday <mike.munday@ibm.com>2018-06-12 02:58:01 -0400
committerDave Watson <davejwatson@fb.com>2018-06-20 10:37:18 -0700
commit2991e70f09af3e0297994ce5024e814aae72a659 (patch)
tree1af84fc16a65ab16e2777d9f47263229af8392fb
parent038556f57e3433cbaaa7b087c9798143709caa9c (diff)
downloadlibunwind-2991e70f09af3e0297994ce5024e814aae72a659.tar.gz
s390x: fix build when long double is more than 64 bits
The floating point registers on s390x are 64-bits wide so type them as double precision rather than long double. Also, GCC on Ubuntu 18.04 complains about the sizeof calls so fix those too.
-rw-r--r--include/libunwind-s390x.h2
-rw-r--r--include/tdep-s390x/libunwind_i.h8
2 files changed, 5 insertions, 5 deletions
diff --git a/include/libunwind-s390x.h b/include/libunwind-s390x.h
index d95d700e..ebda40d5 100644
--- a/include/libunwind-s390x.h
+++ b/include/libunwind-s390x.h
@@ -51,7 +51,7 @@ extern "C" {
typedef uint64_t unw_word_t;
typedef int64_t unw_sword_t;
-typedef long double unw_tdep_fpreg_t;
+typedef double unw_tdep_fpreg_t;
typedef enum
{
diff --git a/include/tdep-s390x/libunwind_i.h b/include/tdep-s390x/libunwind_i.h
index 4296ea4b..137a0b8a 100644
--- a/include/tdep-s390x/libunwind_i.h
+++ b/include/tdep-s390x/libunwind_i.h
@@ -117,7 +117,7 @@ dwarf_get_uc(const struct dwarf_cursor *cursor)
static inline int
dwarf_getfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t *val)
{
- assert(sizeof unw_fpreg_t == sizeof unw_word_t);
+ assert(sizeof(unw_fpreg_t) == sizeof(unw_word_t));
if (DWARF_IS_NULL_LOC (loc))
return -UNW_EBADREG;
@@ -140,7 +140,7 @@ dwarf_getfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t *val)
static inline int
dwarf_putfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t val)
{
- assert(sizeof unw_fpreg_t == sizeof unw_word_t);
+ assert(sizeof(unw_fpreg_t) == sizeof(unw_word_t));
assert(!DWARF_IS_VAL_LOC (loc));
if (DWARF_IS_NULL_LOC (loc))
@@ -162,7 +162,7 @@ dwarf_putfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t val)
static inline int
dwarf_get (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t *val)
{
- assert(sizeof unw_fpreg_t == sizeof unw_word_t);
+ assert(sizeof(unw_fpreg_t) == sizeof(unw_word_t));
if (DWARF_IS_NULL_LOC (loc))
return -UNW_EBADREG;
@@ -185,7 +185,7 @@ dwarf_get (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t *val)
static inline int
dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val)
{
- assert(sizeof unw_fpreg_t == sizeof unw_word_t);
+ assert(sizeof(unw_fpreg_t) == sizeof(unw_word_t));
assert(!DWARF_IS_VAL_LOC (loc));
if (DWARF_IS_NULL_LOC (loc))