From af934452af57df02100aa17836fdbb21c68a77a8 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Fri, 18 Nov 2016 18:08:20 +0000 Subject: [PATCH] ext: Update fputils to rev 13589cd This patch updates fputils to the latest revision (13589cd) from the upstream repository (github.com/andysan/fputils). --- ext/fputils/fpbits.h | 1 + ext/fputils/include/fputils/fptypes.h | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ext/fputils/fpbits.h b/ext/fputils/fpbits.h index f85a3b2f0..207531556 100644 --- a/ext/fputils/fpbits.h +++ b/ext/fputils/fpbits.h @@ -84,6 +84,7 @@ build_fp64(int sign, uint64_t frac, int exp) #define BUILD_FP80(sign, frac, exp) \ { \ + .repr.pad = { 0 }, \ .repr.se = BUILD_FP80_SE(sign, exp), \ .repr.fi = BUILD_FP80_FI(frac, exp) \ } diff --git a/ext/fputils/include/fputils/fptypes.h b/ext/fputils/include/fputils/fptypes.h index 714ddd439..2ccf6df26 100644 --- a/ext/fputils/include/fputils/fptypes.h +++ b/ext/fputils/include/fputils/fptypes.h @@ -69,12 +69,16 @@ typedef union { uint64_t fi; /** Raw representation of sign bit and exponent */ uint16_t se; + /** Add explicit padding to ensure this data structure + * is properly aligned. + */ + uint16_t pad[3]; } repr; /** * Represented as a char array, mainly intended for debug dumping * and serialization. */ - char bits[10]; + char bits[16]; } fp80_t; /** @} */ -- 2.30.2