From: <daw...@us...> - 2014-05-13 23:04:27
|
Revision: 6636 http://sourceforge.net/p/mingw-w64/code/6636 Author: dawncrow Date: 2014-05-13 23:04:21 +0000 (Tue, 13 May 2014) Log Message: ----------- math: Add ARM implementation for copysignl Modified Paths: -------------- trunk/mingw-w64-crt/math/copysignl.S Modified: trunk/mingw-w64-crt/math/copysignl.S =================================================================== --- trunk/mingw-w64-crt/math/copysignl.S 2014-05-13 23:03:11 UTC (rev 6635) +++ trunk/mingw-w64-crt/math/copysignl.S 2014-05-13 23:04:21 UTC (rev 6636) @@ -18,10 +18,10 @@ .align 4 #endif -.globl __MINGW_USYMBOL(copysignl) + .globl __MINGW_USYMBOL(copysignl) .def __MINGW_USYMBOL(copysignl); .scl 2; .type 32; .endef __MINGW_USYMBOL(copysignl): -#ifdef _WIN64 +#if defined(_AMD64_) || defined(__x86_64__) movq (%rdx), %rax movq %rax, (%rcx) movq 8(%rdx), %rax @@ -32,7 +32,19 @@ movq %rax, 8(%rcx) movq %rcx, %rax ret -#else +#elif defined(_ARM_) || defined(__arm__) + fcmpzd d1 + fmstat + bmi 1f /* jump if d1 is negative */ + fcmpzd d0 + fmstat + vnegmi.f64 d0, d0 /* negate d0 if it is negative */ + bx lr + 1: fcmpzd d0 + fmstat + vnegpl.f64 d0, d0 /* negate d0 if it is positive */ + bx lr +#elif defined(_X86_) || defined(__i386__) movl 24(%esp),%edx movl 12(%esp),%eax andl $0x8000,%edx This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |