From 8bf1e094893cb24796137b47ee0d46d18d299996 Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Sun, 9 Aug 2009 18:41:02 +0000 Subject: Refactor to remove un-named struct gnu extension usage. Now ISO C89 and C99 compliant. Comment trailing endifs git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@78537 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/fixunsdfsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/fixunsdfsi.c') diff --git a/lib/fixunsdfsi.c b/lib/fixunsdfsi.c index f9d2b6d8..a0cba79a 100644 --- a/lib/fixunsdfsi.c +++ b/lib/fixunsdfsi.c @@ -31,12 +31,12 @@ __fixunsdfsi(double a) { double_bits fb; fb.f = a; - int e = ((fb.u.high & 0x7FF00000) >> 20) - 1023; - if (e < 0 || (fb.u.high & 0x80000000)) + int e = ((fb.u.s.high & 0x7FF00000) >> 20) - 1023; + if (e < 0 || (fb.u.s.high & 0x80000000)) return 0; return ( 0x80000000u | - ((fb.u.high & 0x000FFFFF) << 11) | - (fb.u.low >> 21) + ((fb.u.s.high & 0x000FFFFF) << 11) | + (fb.u.s.low >> 21) ) >> (31 - e); } -- cgit v1.2.3