diff options
author | Andreas Jaeger <aj@suse.de> | 2002-07-23 19:36:20 +0000 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2002-07-23 19:36:20 +0000 |
commit | 83a5fcc0b4ea84bf6d8f786d7c7e4949cf22e43f (patch) | |
tree | ab3d21ddf6423e5a820b4197d07637ae3998b9ff /sysdeps/x86_64/fpu/s_copysignf.S | |
parent | 67ee6db0fdc36dc8760e44893db9675ea6899dbe (diff) | |
download | glibc-83a5fcc0b4ea84bf6d8f786d7c7e4949cf22e43f.tar.gz glibc-83a5fcc0b4ea84bf6d8f786d7c7e4949cf22e43f.tar.xz glibc-83a5fcc0b4ea84bf6d8f786d7c7e4949cf22e43f.zip |
Use optimized version.
Diffstat (limited to 'sysdeps/x86_64/fpu/s_copysignf.S')
-rw-r--r-- | sysdeps/x86_64/fpu/s_copysignf.S | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/sysdeps/x86_64/fpu/s_copysignf.S b/sysdeps/x86_64/fpu/s_copysignf.S index 46919580d2..415e39bb42 100644 --- a/sysdeps/x86_64/fpu/s_copysignf.S +++ b/sysdeps/x86_64/fpu/s_copysignf.S @@ -20,17 +20,29 @@ #include <machine/asm.h> +#ifdef __ELF__ + .section .rodata +#else + .text +#endif + + .align ALIGNARG(4) + ASM_TYPE_DIRECTIVE(mask,@object) +mask: + .byte 0xff, 0xff, 0xff, 0x7f + ASM_SIZE_DIRECTIVE(mask) + +#ifdef PIC +#define MO(op) op##(%rip) +#else +#define MO(op) op +#endif + ENTRY(__copysignf) - movss %xmm0,-4(%rsp) - mov -4(%rsp,1),%edx - movss %xmm1,-4(%rsp) - mov -4(%rsp),%eax - and $0x7fffffff,%edx - and $0x80000000,%eax - or %eax,%edx - mov %edx,-4(%rsp) - movss -4(%rsp),%xmm1 - movaps %xmm1,%xmm0 + movlps MO(mask),%xmm3 + andps %xmm3,%xmm0 + andnps %xmm1,%xmm3 + orps %xmm3,%xmm0 retq END (__copysignf) |