View Single Post
Re: YaPB ARM Port
Old
  (#11)
jeefo
путинхуйлоебаное
 
jeefo's Avatar
 
Status: Offline
Posts: 452
Join Date: Nov 2005
Location: Saint-Petersburg
Default Re: YaPB ARM Port - 18-12-2015

Replace function SineCosine in corelib.h

Code:
   static inline void SineCosine (float rad, float *sin, float *cos)
   {
#if defined (_WIN32) && defined (_MSC_VER)
      __asm
      {
         fld dword ptr[rad]
         fsincos
         mov ebx, [cos]
         fstp dword ptr[ebx]
         mov ebx, [sin]
         fstp dword ptr[ebx]
      }
#elif defined (__linux__) || defined (GCC) || defined (__APPLE__)
      register double _cos, _sin;
      __asm __volatile__ ("fsincos" : "=t" (_cos), "=u" (_sin) : "0" (rad));

      *cos = _cos;
      *sin = _sin;
#else
      *sin = sinf (rad);
      *cos = cosf (rad);
#endif
   }
with:

Code:
   static inline void SineCosine (float rad, float *sin, float *cos)
   {
      *sin = sinf (rad);
      *cos = cosf (rad);
   }
  
Reply With Quote