aboutsummaryrefslogtreecommitdiff
path: root/lib/builtins/mulxc3.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-12-30 11:52:19 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-12-30 11:52:19 +0000
commit5c909fa013fc285f010a95e8d387e0ef3412da9c (patch)
tree1059d068ad281f4776ff44cd414574f99a460023 /lib/builtins/mulxc3.c
parentf31bcc68c72371a2bf63aead9f3373a1ff2053b6 (diff)
downloadsrc-5c909fa013fc285f010a95e8d387e0ef3412da9c.tar.gz
src-5c909fa013fc285f010a95e8d387e0ef3412da9c.zip
Vendor import of compiler-rt trunk r256633:vendor/compiler-rt/compiler-rt-trunk-r256633
Notes
Notes: svn path=/vendor/compiler-rt/dist/; revision=292925 svn path=/vendor/compiler-rt/compiler-rt-trunk-r256633/; revision=292926; tag=vendor/compiler-rt/compiler-rt-trunk-r256633
Diffstat (limited to 'lib/builtins/mulxc3.c')
-rw-r--r--lib/builtins/mulxc3.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/builtins/mulxc3.c b/lib/builtins/mulxc3.c
index 161fd0ce0dd4..ba3221691821 100644
--- a/lib/builtins/mulxc3.c
+++ b/lib/builtins/mulxc3.c
@@ -19,17 +19,17 @@
/* Returns: the product of a + ib and c + id */
-COMPILER_RT_ABI long double _Complex
+COMPILER_RT_ABI Lcomplex
__mulxc3(long double __a, long double __b, long double __c, long double __d)
{
long double __ac = __a * __c;
long double __bd = __b * __d;
long double __ad = __a * __d;
long double __bc = __b * __c;
- long double _Complex z;
- __real__ z = __ac - __bd;
- __imag__ z = __ad + __bc;
- if (crt_isnan(__real__ z) && crt_isnan(__imag__ z))
+ Lcomplex z;
+ COMPLEX_REAL(z) = __ac - __bd;
+ COMPLEX_IMAGINARY(z) = __ad + __bc;
+ if (crt_isnan(COMPLEX_REAL(z)) && crt_isnan(COMPLEX_IMAGINARY(z)))
{
int __recalc = 0;
if (crt_isinf(__a) || crt_isinf(__b))
@@ -67,8 +67,8 @@ __mulxc3(long double __a, long double __b, long double __c, long double __d)
}
if (__recalc)
{
- __real__ z = CRT_INFINITY * (__a * __c - __b * __d);
- __imag__ z = CRT_INFINITY * (__a * __d + __b * __c);
+ COMPLEX_REAL(z) = CRT_INFINITY * (__a * __c - __b * __d);
+ COMPLEX_IMAGINARY(z) = CRT_INFINITY * (__a * __d + __b * __c);
}
}
return z;