diff options
author | Edward O'Callaghan <eocallaghan@auroraux.org> | 2009-08-09 18:41:02 +0000 |
---|---|---|
committer | Edward O'Callaghan <eocallaghan@auroraux.org> | 2009-08-09 18:41:02 +0000 |
commit | ccf48131d045e9baf92d215a0b6ca79cafee89b4 (patch) | |
tree | f3bff39c21726a511b32f2dff5d6db9390b7db44 /compiler-rt/lib/fixunsdfsi.c | |
parent | f48123b4136d80b1a00f3bd5bd186d40cac11ead (diff) | |
download | bcm5719-llvm-ccf48131d045e9baf92d215a0b6ca79cafee89b4.tar.gz bcm5719-llvm-ccf48131d045e9baf92d215a0b6ca79cafee89b4.zip |
Refactor to remove un-named struct gnu extension usage. Now ISO C89 and C99 compliant. Comment trailing endifs
llvm-svn: 78537
Diffstat (limited to 'compiler-rt/lib/fixunsdfsi.c')
-rw-r--r-- | compiler-rt/lib/fixunsdfsi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler-rt/lib/fixunsdfsi.c b/compiler-rt/lib/fixunsdfsi.c index f9d2b6d866a..a0cba79aabb 100644 --- a/compiler-rt/lib/fixunsdfsi.c +++ b/compiler-rt/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); } |