add i386 arch specific overrides of appropriate math functions using the 387 fpu.
[AROS.git] / arch / i386-all / stdc / math / s_copysignl.s
blobd4ae3d2c716cb401dcb94fe1da740681aee0cfce
1 /*
2 * Based on code written by J.T. Conklin <jtc@NetBSD.org>.
3 * Public domain.
4 */
6 #include "aros/i386/asm.h"
8 .text
9 _ALIGNMENT
10 .globl AROS_CDEFNAME(copysignl)
11 _FUNCTION(AROS_CDEFNAME(copysignl))
13 .set FirstArg, 4 /* Skip Return-Adress */
14 .set arg_x, FirstArg
15 .set FirstArg_lo, 12 /* Skip Return-Adress */
16 .set arg_x_lo, FirstArg_lo
18 .set SecondArg, 24 /* Skip FirstArg */
19 .set arg_y, SecondArg
21 AROS_CDEFNAME(copysignl):
22 movl arg_y(%esp),%edx
23 andl $0x8000,%edx
24 movl arg_x_lo(%esp),%eax
25 andl $0x7fff,%eax
26 orl %edx,%eax
27 movl %eax,arg_x_lo(%esp)
28 fldt arg_x(%esp)
30 ret