diff options
Diffstat (limited to 'sysdeps/sparc/sparc32')
162 files changed, 1621 insertions, 388 deletions
diff --git a/sysdeps/sparc/sparc32/Makefile b/sysdeps/sparc/sparc32/Makefile index fb7132ee95..59edf2b616 100644 --- a/sysdeps/sparc/sparc32/Makefile +++ b/sysdeps/sparc/sparc32/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1991-1998, 2000, 2011, 2012 Free Software Foundation, Inc. +# Copyright (C) 1991-2014 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/sparc/sparc32/__longjmp.S b/sysdeps/sparc/sparc32/__longjmp.S index e4caf7b024..c8d6328063 100644 --- a/sysdeps/sparc/sparc32/__longjmp.S +++ b/sysdeps/sparc/sparc32/__longjmp.S @@ -1,5 +1,4 @@ -/* Copyright (C) 1991, 1993, 1996, 1997, 1998, 1999, 2000, 2006 - Free Software Foundation, Inc. +/* Copyright (C) 1991-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -31,8 +30,8 @@ ENTRY(__longjmp) PTR_DEMANGLE (%g3, %g3, %g4) #endif mov %o0, %g1 /* ENV in %g1 */ - orcc %o1, %g0, %g2 /* VAL in %g2 */ - be,a 0f /* Branch if zero; else skip delay slot. */ + orcc %o1, %g0, %g2 /* VAL in %g2 */ + be,a 0f /* Branch if zero; else skip delay slot. */ mov 1, %g2 /* Delay slot only hit if zero: VAL = 1. */ 0: xor %fp, %g3, %o0 diff --git a/sysdeps/sparc/sparc32/add_n.S b/sysdeps/sparc/sparc32/add_n.S index d540945cc6..63291cc301 100644 --- a/sysdeps/sparc/sparc32/add_n.S +++ b/sysdeps/sparc/sparc32/add_n.S @@ -1,7 +1,7 @@ ! SPARC __mpn_add_n -- Add two limb vectors of the same length > 0 and store ! sum in a third limb vector. ! -! Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +! Copyright (C) 1995-2014 Free Software Foundation, Inc. ! ! This file is part of the GNU MP Library. ! diff --git a/sysdeps/sparc/sparc32/addmul_1.S b/sysdeps/sparc/sparc32/addmul_1.S index c0d36a65fd..66630efb6b 100644 --- a/sysdeps/sparc/sparc32/addmul_1.S +++ b/sysdeps/sparc/sparc32/addmul_1.S @@ -1,7 +1,7 @@ ! SPARC __mpn_addmul_1 -- Multiply a limb vector with a limb and add ! the result to a second limb vector. ! -! Copyright (C) 1992, 1993, 1994, 1997 Free Software Foundation, Inc. +! Copyright (C) 1992-2014 Free Software Foundation, Inc. ! ! This file is part of the GNU MP Library. ! diff --git a/sysdeps/sparc/sparc32/alloca.S b/sysdeps/sparc/sparc32/alloca.S index 73de51fd04..2536d97422 100644 --- a/sysdeps/sparc/sparc32/alloca.S +++ b/sysdeps/sparc/sparc32/alloca.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1997, 2012 Free Software Foundation, Inc. +/* Copyright (C) 1994-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/sparc/sparc32/backtrace.h b/sysdeps/sparc/sparc32/backtrace.h new file mode 100644 index 0000000000..089f8b4d28 --- /dev/null +++ b/sysdeps/sparc/sparc32/backtrace.h @@ -0,0 +1,7 @@ +/* Private macros for guiding the backtrace implementation, sparc32 + version. */ + +#define backtrace_flush_register_windows() \ + asm volatile ("ta %0" : : "i" (ST_FLUSH_WINDOWS)) + +#define BACKTRACE_STACK_BIAS 0 diff --git a/sysdeps/sparc/sparc32/bits/atomic.h b/sysdeps/sparc/sparc32/bits/atomic.h index fb16fc29d5..39c2b37655 100644 --- a/sysdeps/sparc/sparc32/bits/atomic.h +++ b/sysdeps/sparc/sparc32/bits/atomic.h @@ -1,5 +1,5 @@ /* Atomic operations. sparc32 version. - Copyright (C) 2003, 2004, 2006, 2011 Free Software Foundation, Inc. + Copyright (C) 2003-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. diff --git a/sysdeps/sparc/sparc32/bits/setjmp.h b/sysdeps/sparc/sparc32/bits/setjmp.h index 7dbda98ca2..1608199f3a 100644 --- a/sysdeps/sparc/sparc32/bits/setjmp.h +++ b/sysdeps/sparc/sparc32/bits/setjmp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/sparc/sparc32/dl-irel.h b/sysdeps/sparc/sparc32/dl-irel.h index cd3b94050b..03441ec4a5 100644 --- a/sysdeps/sparc/sparc32/dl-irel.h +++ b/sysdeps/sparc/sparc32/dl-irel.h @@ -1,6 +1,6 @@ /* Machine-dependent ELF indirect relocation inline functions. SPARC 32-bit version. - Copyright (C) 2010 Free Software Foundation, Inc. + Copyright (C) 2010-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h index 04ce7854a1..91b125dd7a 100644 --- a/sysdeps/sparc/sparc32/dl-machine.h +++ b/sysdeps/sparc/sparc32/dl-machine.h @@ -1,6 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. SPARC version. - Copyright (C) 1996-2003, 2004, 2005, 2006, 2007, 2010, 2011, 2012 - Free Software Foundation, Inc. + Copyright (C) 1996-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -412,8 +411,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); _dl_error_printf ("\ %s: Symbol `%s' has different size in shared object, consider re-linking\n", - rtld_progname ?: "<program name unknown>", - strtab + refsym->st_name); + RTLD_PROGNAME, strtab + refsym->st_name); } memcpy (reloc_addr_arg, (void *) value, MIN (sym->st_size, refsym->st_size)); diff --git a/sysdeps/sparc/sparc32/dl-plt.h b/sysdeps/sparc/sparc32/dl-plt.h index 5c3d092221..4466f41382 100644 --- a/sysdeps/sparc/sparc32/dl-plt.h +++ b/sysdeps/sparc/sparc32/dl-plt.h @@ -1,6 +1,5 @@ /* PLT fixups. Sparc 32-bit version. - Copyright (C) 1996-2003, 2004, 2005, 2006, 2007, 2010 - Free Software Foundation, Inc. + Copyright (C) 1996-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/sparc/sparc32/dl-trampoline.S b/sysdeps/sparc/sparc32/dl-trampoline.S index 44794592aa..2aa2bf1c83 100644 --- a/sysdeps/sparc/sparc32/dl-trampoline.S +++ b/sysdeps/sparc/sparc32/dl-trampoline.S @@ -1,5 +1,5 @@ /* PLT trampolines. Sparc 32-bit version. - Copyright (C) 2005, 2012 Free Software Foundation, Inc. + Copyright (C) 2005-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -175,7 +175,7 @@ _dl_runtime_profile: cmp %l0, 0 bl 1f nop - + call _dl_profile_invoke nop diff --git a/sysdeps/sparc/sparc32/dotmul.S b/sysdeps/sparc/sparc32/dotmul.S index 821aa8bdb4..d497ca672d 100644 --- a/sysdeps/sparc/sparc32/dotmul.S +++ b/sysdeps/sparc/sparc32/dotmul.S @@ -65,7 +65,7 @@ ENTRY(.mul) bge 1f rd %y, %o0 - ! %o0 was indeed negative; fix upper 32 bits of result by subtracting + ! %o0 was indeed negative; fix upper 32 bits of result by subtracting ! %o1 (i.e., return %o4 - %o1 in %o1). retl sub %o4, %o1, %o1 @@ -79,7 +79,7 @@ ENTRY(.mul) and %o1, %o2, %o2 ! %o2 = 0 or %o1, depending on sign of %o0 rd %y, %o0 ! get lower half of product retl - sub %o4, %o2, %o1 ! subtract compensation + sub %o4, %o2, %o1 ! subtract compensation ! and put upper half in place #endif diff --git a/sysdeps/sparc/sparc32/e_sqrt.c b/sysdeps/sparc/sparc32/e_sqrt.c index 30165192c6..c13f6fd9e5 100644 --- a/sysdeps/sparc/sparc32/e_sqrt.c +++ b/sysdeps/sparc/sparc32/e_sqrt.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1997, 2011 Free Software Foundation, Inc. +/* Copyright (C) 1991-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/sparc/sparc32/fpu/s_copysign.S b/sysdeps/sparc/sparc32/fpu/s_copysign.S index 18c44c5d3c..e371bdd770 100644 --- a/sysdeps/sparc/sparc32/fpu/s_copysign.S +++ b/sysdeps/sparc/sparc32/fpu/s_copysign.S @@ -1,5 +1,5 @@ /* copysign function, sparc32 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/fpu/s_copysignf.S b/sysdeps/sparc/sparc32/fpu/s_copysignf.S index 7753c35e87..dbf7897b53 100644 --- a/sysdeps/sparc/sparc32/fpu/s_copysignf.S +++ b/sysdeps/sparc/sparc32/fpu/s_copysignf.S @@ -1,5 +1,5 @@ /* float copysign function, sparc32 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/fpu/s_fabs.S b/sysdeps/sparc/sparc32/fpu/s_fabs.S index eaf7f90025..28331120f6 100644 --- a/sysdeps/sparc/sparc32/fpu/s_fabs.S +++ b/sysdeps/sparc/sparc32/fpu/s_fabs.S @@ -1,5 +1,5 @@ /* Float absolute value, sparc32 version. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/sparc/sparc32/fpu/s_fabsf.S b/sysdeps/sparc/sparc32/fpu/s_fabsf.S index bd0f68d44f..a8b6fcff27 100644 --- a/sysdeps/sparc/sparc32/fpu/s_fabsf.S +++ b/sysdeps/sparc/sparc32/fpu/s_fabsf.S @@ -1,5 +1,5 @@ /* Float absolute value, sparc32 version. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2006. diff --git a/sysdeps/sparc/sparc32/fpu/s_fdim.S b/sysdeps/sparc/sparc32/fpu/s_fdim.S new file mode 100644 index 0000000000..04a410ea61 --- /dev/null +++ b/sysdeps/sparc/sparc32/fpu/s_fdim.S @@ -0,0 +1,42 @@ +/* Compute positive difference, sparc 32-bit. + Copyright (C) 2013-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> +#include <math_ldbl_opt.h> + +ENTRY(__fdim) + std %o0, [%sp + 72] + std %o2, [%sp + 80] + ldd [%sp + 72], %f0 + ldd [%sp + 80], %f2 + fcmpd %f0, %f2 + st %g0, [%sp + 72] + fbug 1f + st %g0, [%sp + 76] + ldd [%sp + 72], %f0 + fnegs %f0, %f2 + fmovs %f1, %f3 +1: retl + fsubd %f0, %f2, %f0 +END(__fdim) +weak_alias (__fdim, fdim) + +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) +compat_symbol (libm, __fdim, fdiml, GLIBC_2_1); +#endif diff --git a/sysdeps/sparc/sparc32/fpu/s_fdimf.S b/sysdeps/sparc/sparc32/fpu/s_fdimf.S new file mode 100644 index 0000000000..a29ed84bae --- /dev/null +++ b/sysdeps/sparc/sparc32/fpu/s_fdimf.S @@ -0,0 +1,35 @@ +/* Compute positive difference, sparc 32-bit. + Copyright (C) 2013-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY(__fdimf) + st %o0, [%sp + 72] + st %o1, [%sp + 76] + ld [%sp + 72], %f0 + ld [%sp + 76], %f1 + fcmps %f0, %f1 + fbug 1f + st %g0, [%sp + 72] + ld [%sp + 72], %f0 + fnegs %f0, %f1 +1: retl + fsubs %f0, %f1, %f0 +END(__fdimf) +weak_alias (__fdimf, fdimf) diff --git a/sysdeps/sparc/sparc32/fpu/s_signbit.S b/sysdeps/sparc/sparc32/fpu/s_signbit.S index 3756bf431a..94403c0c94 100644 --- a/sysdeps/sparc/sparc32/fpu/s_signbit.S +++ b/sysdeps/sparc/sparc32/fpu/s_signbit.S @@ -1,5 +1,5 @@ /* signbit(). sparc32 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/sparc/sparc32/fpu/s_signbitl.S b/sysdeps/sparc/sparc32/fpu/s_signbitl.S index 2feaee0361..64813f1913 100644 --- a/sysdeps/sparc/sparc32/fpu/s_signbitl.S +++ b/sysdeps/sparc/sparc32/fpu/s_signbitl.S @@ -1,5 +1,5 @@ /* signbitl(). sparc32 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/sparc/sparc32/fpu/w_sqrt.S b/sysdeps/sparc/sparc32/fpu/w_sqrt.S index 667c71c625..786308a57b 100644 --- a/sysdeps/sparc/sparc32/fpu/w_sqrt.S +++ b/sysdeps/sparc/sparc32/fpu/w_sqrt.S @@ -1,5 +1,5 @@ /* sqrt function. sparc32 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/sparc/sparc32/fpu/w_sqrtf.S b/sysdeps/sparc/sparc32/fpu/w_sqrtf.S index 5260bec373..e8930a55c5 100644 --- a/sysdeps/sparc/sparc32/fpu/w_sqrtf.S +++ b/sysdeps/sparc/sparc32/fpu/w_sqrtf.S @@ -1,5 +1,5 @@ /* sqrtf function. sparc32 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/sparc/sparc32/ieee754.h b/sysdeps/sparc/sparc32/ieee754.h index 4a7a207a44..d77b83592f 100644 --- a/sysdeps/sparc/sparc32/ieee754.h +++ b/sysdeps/sparc/sparc32/ieee754.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1996, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1992-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/sparc/sparc32/jmpbuf-offsets.h b/sysdeps/sparc/sparc32/jmpbuf-offsets.h index b6d33530b3..14c45551c7 100644 --- a/sysdeps/sparc/sparc32/jmpbuf-offsets.h +++ b/sysdeps/sparc/sparc32/jmpbuf-offsets.h @@ -1,5 +1,5 @@ /* Private macros for accessing __jmp_buf contents. SPARC version. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/sparc/sparc32/jmpbuf-unwind.h b/sysdeps/sparc/sparc32/jmpbuf-unwind.h index cc82d667b0..3ec444a62f 100644 --- a/sysdeps/sparc/sparc32/jmpbuf-unwind.h +++ b/sysdeps/sparc/sparc32/jmpbuf-unwind.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2003-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. diff --git a/sysdeps/sparc/sparc32/lshift.S b/sysdeps/sparc/sparc32/lshift.S index 8fc09e7da5..be319b1a17 100644 --- a/sysdeps/sparc/sparc32/lshift.S +++ b/sysdeps/sparc/sparc32/lshift.S @@ -1,6 +1,6 @@ ! Sparc __mpn_lshift -- ! -! Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +! Copyright (C) 1995-2014 Free Software Foundation, Inc. ! ! This file is part of the GNU MP Library. ! diff --git a/sysdeps/sparc/sparc32/memchr.S b/sysdeps/sparc/sparc32/memchr.S index b7a77298ab..088e538d77 100644 --- a/sysdeps/sparc/sparc32/memchr.S +++ b/sysdeps/sparc/sparc32/memchr.S @@ -1,7 +1,7 @@ /* memchr (str, ch, n) -- Return pointer to first occurrence of CH in STR less than N. For SPARC v7. - Copyright (C) 1996, 1999, 2000, 2003 Free Software Foundation, Inc. + Copyright (C) 1996-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jj@ultra.linux.cz> and David S. Miller <davem@caip.rutgers.edu>. @@ -139,7 +139,4 @@ ENTRY(__memchr) END(__memchr) weak_alias (__memchr, memchr) -#if !__BOUNDED_POINTERS__ -weak_alias (__memchr, __ubp_memchr) -#endif libc_hidden_builtin_def (memchr) diff --git a/sysdeps/sparc/sparc32/memcpy.S b/sysdeps/sparc/sparc32/memcpy.S index 82fa6d1045..643add8900 100644 --- a/sysdeps/sparc/sparc32/memcpy.S +++ b/sysdeps/sparc/sparc32/memcpy.S @@ -1,6 +1,6 @@ /* Copy SIZE bytes from SRC to DEST. For SPARC v7. - Copyright (C) 1996, 1999, 2003 Free Software Foundation, Inc. + Copyright (C) 1996-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@caip.rutgers.edu>, Eddie C. Dost <ecd@skynet.be> and @@ -306,7 +306,7 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */ mov 32, %g2 be 4f sub %g2, %g4, %g6 - + blu 3f cmp %g3, 0x8 @@ -539,7 +539,7 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */ add %o1, 64, %o1 bne 41b add %o0, 64, %o0 - + andcc %o2, 0x30, %o3 be,a 1f srl %g1, 16, %g2 @@ -584,7 +584,7 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */ add %o1, 64, %o1 bne 42b add %o0, 64, %o0 - + andcc %o2, 0x30, %o3 be,a 1f srl %g1, 16, %g2 @@ -598,7 +598,7 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */ 1: sth %g2, [%o0 - 2] /* Fall through */ - + 88: and %o2, 0xe, %o3 mov %o7, %g2 sll %o3, 3, %o4 diff --git a/sysdeps/sparc/sparc32/memset.S b/sysdeps/sparc/sparc32/memset.S index ee2ceca815..9120a1c657 100644 --- a/sysdeps/sparc/sparc32/memset.S +++ b/sysdeps/sparc/sparc32/memset.S @@ -1,6 +1,6 @@ /* Set a block of memory to some byte value. For SPARC v7. - Copyright (C) 1996, 1999, 2003 Free Software Foundation, Inc. + Copyright (C) 1996-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@caip.rutgers.edu> and Jakub Jelinek <jj@ultra.linux.cz>. diff --git a/sysdeps/sparc/sparc32/mul_1.S b/sysdeps/sparc/sparc32/mul_1.S index 81266f0f08..08431ef496 100644 --- a/sysdeps/sparc/sparc32/mul_1.S +++ b/sysdeps/sparc/sparc32/mul_1.S @@ -1,7 +1,7 @@ ! SPARC __mpn_mul_1 -- Multiply a limb vector with a limb and store ! the result in a second limb vector. ! -! Copyright (C) 1992, 1993, 1994, 1997 Free Software Foundation, Inc. +! Copyright (C) 1992-2014 Free Software Foundation, Inc. ! ! This file is part of the GNU MP Library. ! diff --git a/sysdeps/sparc/sparc32/rem.S b/sysdeps/sparc/sparc32/rem.S index effacee0d0..349d7c0115 100644 --- a/sysdeps/sparc/sparc32/rem.S +++ b/sysdeps/sparc/sparc32/rem.S @@ -181,14 +181,14 @@ LOC(divloop): subcc %o3,%o5,%o3 b 9f add %o2, (7*2+1), %o2 - + LOC(4.23): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (7*2-1), %o2 - - + + LOC(3.19): ! remainder is negative addcc %o3,%o5,%o3 @@ -199,15 +199,15 @@ LOC(3.19): subcc %o3,%o5,%o3 b 9f add %o2, (5*2+1), %o2 - + LOC(4.21): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (5*2-1), %o2 - - - + + + LOC(2.17): ! remainder is negative addcc %o3,%o5,%o3 @@ -223,14 +223,14 @@ LOC(2.17): subcc %o3,%o5,%o3 b 9f add %o2, (3*2+1), %o2 - + LOC(4.19): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (3*2-1), %o2 - - + + LOC(3.17): ! remainder is negative addcc %o3,%o5,%o3 @@ -241,16 +241,16 @@ LOC(3.17): subcc %o3,%o5,%o3 b 9f add %o2, (1*2+1), %o2 - + LOC(4.17): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (1*2-1), %o2 - - - - + + + + LOC(1.16): ! remainder is negative addcc %o3,%o5,%o3 @@ -271,14 +271,14 @@ LOC(1.16): subcc %o3,%o5,%o3 b 9f add %o2, (-1*2+1), %o2 - + LOC(4.15): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (-1*2-1), %o2 - - + + LOC(3.15): ! remainder is negative addcc %o3,%o5,%o3 @@ -289,15 +289,15 @@ LOC(3.15): subcc %o3,%o5,%o3 b 9f add %o2, (-3*2+1), %o2 - + LOC(4.13): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (-3*2-1), %o2 - - - + + + LOC(2.15): ! remainder is negative addcc %o3,%o5,%o3 @@ -313,14 +313,14 @@ LOC(2.15): subcc %o3,%o5,%o3 b 9f add %o2, (-5*2+1), %o2 - + LOC(4.11): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (-5*2-1), %o2 - - + + LOC(3.13): ! remainder is negative addcc %o3,%o5,%o3 @@ -331,16 +331,16 @@ LOC(3.13): subcc %o3,%o5,%o3 b 9f add %o2, (-7*2+1), %o2 - + LOC(4.9): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (-7*2-1), %o2 - - - - + + + + 9: LOC(end_regular_divide): subcc %o4, 1, %o4 diff --git a/sysdeps/sparc/sparc32/rshift.S b/sysdeps/sparc/sparc32/rshift.S index 6c0b618a0f..3cc1e72f71 100644 --- a/sysdeps/sparc/sparc32/rshift.S +++ b/sysdeps/sparc/sparc32/rshift.S @@ -1,6 +1,6 @@ ! sparc __mpn_rshift -- ! -! Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +! Copyright (C) 1995-2014 Free Software Foundation, Inc. ! ! This file is part of the GNU MP Library. ! diff --git a/sysdeps/sparc/sparc32/sdiv.S b/sysdeps/sparc/sparc32/sdiv.S index 4b325476d7..d1d4ee31f8 100644 --- a/sysdeps/sparc/sparc32/sdiv.S +++ b/sysdeps/sparc/sparc32/sdiv.S @@ -181,14 +181,14 @@ LOC(divloop): subcc %o3,%o5,%o3 b 9f add %o2, (7*2+1), %o2 - + LOC(4.23): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (7*2-1), %o2 - - + + LOC(3.19): ! remainder is negative addcc %o3,%o5,%o3 @@ -199,15 +199,15 @@ LOC(3.19): subcc %o3,%o5,%o3 b 9f add %o2, (5*2+1), %o2 - + LOC(4.21): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (5*2-1), %o2 - - - + + + LOC(2.17): ! remainder is negative addcc %o3,%o5,%o3 @@ -223,14 +223,14 @@ LOC(2.17): subcc %o3,%o5,%o3 b 9f add %o2, (3*2+1), %o2 - + LOC(4.19): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (3*2-1), %o2 - - + + LOC(3.17): ! remainder is negative addcc %o3,%o5,%o3 @@ -241,16 +241,16 @@ LOC(3.17): subcc %o3,%o5,%o3 b 9f add %o2, (1*2+1), %o2 - + LOC(4.17): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (1*2-1), %o2 - - - - + + + + LOC(1.16): ! remainder is negative addcc %o3,%o5,%o3 @@ -271,14 +271,14 @@ LOC(1.16): subcc %o3,%o5,%o3 b 9f add %o2, (-1*2+1), %o2 - + LOC(4.15): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (-1*2-1), %o2 - - + + LOC(3.15): ! remainder is negative addcc %o3,%o5,%o3 @@ -289,15 +289,15 @@ LOC(3.15): subcc %o3,%o5,%o3 b 9f add %o2, (-3*2+1), %o2 - + LOC(4.13): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (-3*2-1), %o2 - - - + + + LOC(2.15): ! remainder is negative addcc %o3,%o5,%o3 @@ -313,14 +313,14 @@ LOC(2.15): subcc %o3,%o5,%o3 b 9f add %o2, (-5*2+1), %o2 - + LOC(4.11): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (-5*2-1), %o2 - - + + LOC(3.13): ! remainder is negative addcc %o3,%o5,%o3 @@ -331,16 +331,16 @@ LOC(3.13): subcc %o3,%o5,%o3 b 9f add %o2, (-7*2+1), %o2 - + LOC(4.9): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (-7*2-1), %o2 - - - - + + + + 9: LOC(end_regular_divide): subcc %o4, 1, %o4 diff --git a/sysdeps/sparc/sparc32/setjmp.S b/sysdeps/sparc/sparc32/setjmp.S index 3fda4afc25..64dccdecb5 100644 --- a/sysdeps/sparc/sparc32/setjmp.S +++ b/sysdeps/sparc/sparc32/setjmp.S @@ -1,5 +1,4 @@ -/* Copyright (C) 1991, 1993, 1994, 1996, 1997, 1998, 2002, 2006 - Free Software Foundation, Inc. +/* Copyright (C) 1991-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/sparc/sparc32/soft-fp/Makefile b/sysdeps/sparc/sparc32/soft-fp/Makefile index 23d75a7264..38d14e714b 100644 --- a/sysdeps/sparc/sparc32/soft-fp/Makefile +++ b/sysdeps/sparc/sparc32/soft-fp/Makefile @@ -1,6 +1,6 @@ # Software floating-point emulation. # Makefile for SPARC v8 long double utility functions (_Q_*). -# Copyright (C) 1999, 2000, 2006 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by Jakub Jelinek (jj@ultra.linux.cz). # diff --git a/sysdeps/sparc/sparc32/soft-fp/q_add.c b/sysdeps/sparc/sparc32/soft-fp/q_add.c index 67e07c285b..ec8c1c2e9c 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_add.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_add.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a + b - Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_cmp.c b/sysdeps/sparc/sparc32/soft-fp/q_cmp.c index 8c7f005e07..837b3dd091 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_cmp.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_cmp.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Compare a and b, return float condition code. - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_cmpe.c b/sysdeps/sparc/sparc32/soft-fp/q_cmpe.c index 60d6c36280..d4ac7bd67c 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_cmpe.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_cmpe.c @@ -1,7 +1,7 @@ /* Software floating-point emulation. Compare a and b, return float condition code. Signal exception (unless masked) if unordered. - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_div.c b/sysdeps/sparc/sparc32/soft-fp/q_div.c index 14249f4274..39105d1975 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_div.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_div.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a / b - Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_dtoq.c b/sysdeps/sparc/sparc32/soft-fp/q_dtoq.c index 05b1643ee8..8f20594029 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_dtoq.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_dtoq.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return (long double)(a) - Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_feq.c b/sysdeps/sparc/sparc32/soft-fp/q_feq.c index cee667c109..61a8ff1b18 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_feq.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_feq.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return 1 if a == b - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_fge.c b/sysdeps/sparc/sparc32/soft-fp/q_fge.c index 997990e7a1..7fca34926a 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_fge.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_fge.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return 1 if a >= b - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_fgt.c b/sysdeps/sparc/sparc32/soft-fp/q_fgt.c index 5f95f82cdc..f5b2acf4c4 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_fgt.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_fgt.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return 1 if a > b - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_fle.c b/sysdeps/sparc/sparc32/soft-fp/q_fle.c index 1a7587021e..c108fb9e3f 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_fle.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_fle.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return 1 if a <= b - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_flt.c b/sysdeps/sparc/sparc32/soft-fp/q_flt.c index c76a0c7bfd..56d140e6e9 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_flt.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_flt.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return 1 if a < b - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_fne.c b/sysdeps/sparc/sparc32/soft-fp/q_fne.c index 1df561eac5..78c2d6f971 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_fne.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_fne.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return 1 if a != b - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_itoq.c b/sysdeps/sparc/sparc32/soft-fp/q_itoq.c index 8de7cd155c..3640506973 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_itoq.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_itoq.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return (long double)(a) - Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_lltoq.c b/sysdeps/sparc/sparc32/soft-fp/q_lltoq.c index b718b35d66..52b2712161 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_lltoq.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_lltoq.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return (long double)a - Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_mul.c b/sysdeps/sparc/sparc32/soft-fp/q_mul.c index d45b3890a6..e4845ab1f3 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_mul.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_mul.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return a * b - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_neg.c b/sysdeps/sparc/sparc32/soft-fp/q_neg.c index 0e6162651a..b5049cd6df 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_neg.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_neg.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return !a - Copyright (C) 1997,1999 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). @@ -24,9 +24,8 @@ long double _Q_neg(const long double a) { - FP_DECL_EX; long double c = a; - + #if (__BYTE_ORDER == __BIG_ENDIAN) ((UWtype *)&c)[0] ^= (((UWtype)1) << (W_TYPE_SIZE - 1)); #elif (__BYTE_ORDER == __LITTLE_ENDIAN) && (W_TYPE_SIZE == 64) @@ -36,11 +35,9 @@ long double _Q_neg(const long double a) #else FP_DECL_Q(A); FP_DECL_Q(C); - FP_UNPACK_Q(A, a); + FP_UNPACK_RAW_Q(A, a); FP_NEG_Q(C, A); - FP_PACK_Q(c, C); + FP_PACK_RAW_Q(c, C); #endif - FP_CLEAR_EXCEPTIONS; - FP_HANDLE_EXCEPTIONS; return c; } diff --git a/sysdeps/sparc/sparc32/soft-fp/q_qtod.c b/sysdeps/sparc/sparc32/soft-fp/q_qtod.c index 91ec6945d7..41527e7275 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_qtod.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_qtod.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return (double)a - Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_qtoi.c b/sysdeps/sparc/sparc32/soft-fp/q_qtoi.c index 19484f3e1c..4f116cbc8c 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_qtoi.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_qtoi.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return (int)a - Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_qtoll.c b/sysdeps/sparc/sparc32/soft-fp/q_qtoll.c index ba053d936c..77530964f6 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_qtoll.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_qtoll.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return (long long)a - Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_qtos.c b/sysdeps/sparc/sparc32/soft-fp/q_qtos.c index 030d5b9a5e..c8c2fd89c1 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_qtos.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_qtos.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return (float)a - Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_qtou.c b/sysdeps/sparc/sparc32/soft-fp/q_qtou.c index 6b199c9547..7b75902996 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_qtou.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_qtou.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return (unsigned int)a - Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_qtoull.c b/sysdeps/sparc/sparc32/soft-fp/q_qtoull.c index cdd2b617da..4980de8ccf 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_qtoull.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_qtoull.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return (unsigned long long)a - Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_sqrt.c b/sysdeps/sparc/sparc32/soft-fp/q_sqrt.c index 4a83fa57fc..3b411ff9ac 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_sqrt.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_sqrt.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return sqrtl(a) - Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_stoq.c b/sysdeps/sparc/sparc32/soft-fp/q_stoq.c index c5d1755353..bf6c5cd046 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_stoq.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_stoq.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. c = (long double)(a) - Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_sub.c b/sysdeps/sparc/sparc32/soft-fp/q_sub.c index 7d319d0668..f186ead4d4 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_sub.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_sub.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. c = a - b - Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c b/sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c index 930d296da9..7512557f9a 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. Return (long double)(a) - Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_util.c b/sysdeps/sparc/sparc32/soft-fp/q_util.c index 47e34c7c59..eb9b6259bb 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_util.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_util.c @@ -1,7 +1,7 @@ /* Software floating-point emulation. Helper routine for _Q_* routines. Simulate exceptions using double arithmetics. - Copyright (C) 1999, 2012 Free Software Foundation, Inc. + Copyright (C) 1999-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/q_utoq.c b/sysdeps/sparc/sparc32/soft-fp/q_utoq.c index 6b9cb6059e..0fb645c5de 100644 --- a/sysdeps/sparc/sparc32/soft-fp/q_utoq.c +++ b/sysdeps/sparc/sparc32/soft-fp/q_utoq.c @@ -1,6 +1,6 @@ /* Software floating-point emulation. c = (long double)(a) - Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com) and Jakub Jelinek (jj@ultra.linux.cz). diff --git a/sysdeps/sparc/sparc32/soft-fp/sfp-machine.h b/sysdeps/sparc/sparc32/soft-fp/sfp-machine.h index e60f1cadaa..025b3ab196 100644 --- a/sysdeps/sparc/sparc32/soft-fp/sfp-machine.h +++ b/sysdeps/sparc/sparc32/soft-fp/sfp-machine.h @@ -1,6 +1,6 @@ /* Machine-dependent software floating-point definitions. Sparc userland (_Q_*) version. - Copyright (C) 1997,1998,1999,2002,2006,2012 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson (rth@cygnus.com), Jakub Jelinek (jj@ultra.linux.cz) and @@ -47,6 +47,7 @@ #define _FP_NANSIGN_Q 0 #define _FP_KEEPNANFRACP 1 +#define _FP_QNANNEGATEDP 0 /* If one NaN is signaling and the other is not, * we choose that one, otherwise we choose X. diff --git a/sysdeps/sparc/sparc32/sparcv8/addmul_1.S b/sysdeps/sparc/sparc32/sparcv8/addmul_1.S index ff01739cd3..bb81915397 100644 --- a/sysdeps/sparc/sparc32/sparcv8/addmul_1.S +++ b/sysdeps/sparc/sparc32/sparcv8/addmul_1.S @@ -1,7 +1,7 @@ ! SPARC v8 __mpn_addmul_1 -- Multiply a limb vector with a limb and ! add the result to a second limb vector. -! Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. +! Copyright (C) 1992-2014 Free Software Foundation, Inc. ! This file is part of the GNU MP Library. diff --git a/sysdeps/sparc/sparc32/sparcv8/mul_1.S b/sysdeps/sparc/sparc32/sparcv8/mul_1.S index 86db0da4d2..4532eb1789 100644 --- a/sysdeps/sparc/sparc32/sparcv8/mul_1.S +++ b/sysdeps/sparc/sparc32/sparcv8/mul_1.S @@ -1,7 +1,7 @@ ! SPARC v8 __mpn_mul_1 -- Multiply a limb vector with a single limb and ! store the product in a second limb vector. -! Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. +! Copyright (C) 1992-2014 Free Software Foundation, Inc. ! This file is part of the GNU MP Library. diff --git a/sysdeps/sparc/sparc32/sparcv8/submul_1.S b/sysdeps/sparc/sparc32/sparcv8/submul_1.S index 4886310eec..7f3b0492d8 100644 --- a/sysdeps/sparc/sparc32/sparcv8/submul_1.S +++ b/sysdeps/sparc/sparc32/sparcv8/submul_1.S @@ -1,7 +1,7 @@ ! SPARC v8 __mpn_submul_1 -- Multiply a limb vector with a limb and ! subtract the result from a second limb vector. -! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. +! Copyright (C) 1992-2014 Free Software Foundation, Inc. ! This file is part of the GNU MP Library. diff --git a/sysdeps/sparc/sparc32/sparcv9/Makefile b/sysdeps/sparc/sparc32/sparcv9/Makefile index 8a9330f7a6..7d475b0897 100644 --- a/sysdeps/sparc/sparc32/sparcv9/Makefile +++ b/sysdeps/sparc/sparc32/sparcv9/Makefile @@ -10,13 +10,11 @@ ASFLAGS-.o += -Wa,-Av9d ASFLAGS-.os += -Wa,-Av9d ASFLAGS-.op += -Wa,-Av9d ASFLAGS-.og += -Wa,-Av9d -ASFLAGS-.ob += -Wa,-Av9d ASFLAGS-.oS += -Wa,-Av9d else ASFLAGS-.o += -Wa,-Av9a ASFLAGS-.os += -Wa,-Av9a ASFLAGS-.op += -Wa,-Av9a ASFLAGS-.og += -Wa,-Av9a -ASFLAGS-.ob += -Wa,-Av9a ASFLAGS-.oS += -Wa,-Av9a endif diff --git a/sysdeps/sparc/sparc32/sparcv9/addmul_1.S b/sysdeps/sparc/sparc32/sparcv9/addmul_1.S index 563bfb1c0a..a96a9a2db7 100644 --- a/sysdeps/sparc/sparc32/sparcv9/addmul_1.S +++ b/sysdeps/sparc/sparc32/sparcv9/addmul_1.S @@ -1 +1,81 @@ -#include <sparcv8/addmul_1.S> +! SPARC v9 32-bit __mpn_addmul_1 -- Multiply a limb vector with a limb +! and add the result to a second limb vector. +! +! Copyright (C) 2013-2014 Free Software Foundation, Inc. +! This file is part of the GNU C Library. +! Contributed by David S. Miller <davem@davemloft.net> +! +! The GNU C Library is free software; you can redistribute it and/or +! modify it under the terms of the GNU Lesser General Public +! License as published by the Free Software Foundation; either +! version 2.1 of the License, or (at your option) any later version. +! +! The GNU C Library is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +! Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with the GNU C Library; if not, see +! <http://www.gnu.org/licenses/>. + +#include <sysdep.h> + +#define res_ptr %i0 +#define s1_ptr %i1 +#define sz_arg %i2 +#define s2l_arg %i3 +#define sz %o4 +#define carry %o5 +#define s2_limb %g1 +#define tmp1 %l0 +#define tmp2 %l1 +#define tmp3 %l2 +#define tmp4 %l3 +#define tmp64_1 %g3 +#define tmp64_2 %o3 + +ENTRY(__mpn_addmul_1) + save %sp, -96, %sp + srl sz_arg, 0, sz + srl s2l_arg, 0, s2_limb + subcc sz, 1, sz + be,pn %icc, .Lfinal_limb + clr carry + +.Lloop: + lduw [s1_ptr + 0x00], tmp1 + lduw [res_ptr + 0x00], tmp3 + lduw [s1_ptr + 0x04], tmp2 + lduw [res_ptr + 0x04], tmp4 + mulx tmp1, s2_limb, tmp64_1 + add s1_ptr, 8, s1_ptr + mulx tmp2, s2_limb, tmp64_2 + sub sz, 2, sz + add res_ptr, 8, res_ptr + add tmp3, tmp64_1, tmp64_1 + add carry, tmp64_1, tmp64_1 + stw tmp64_1, [res_ptr - 0x08] + srlx tmp64_1, 32, carry + add tmp4, tmp64_2, tmp64_2 + add carry, tmp64_2, tmp64_2 + stw tmp64_2, [res_ptr - 0x04] + brgz sz, .Lloop + srlx tmp64_2, 32, carry + + brlz,pt sz, .Lfinish + nop + +.Lfinal_limb: + lduw [s1_ptr + 0x00], tmp1 + lduw [res_ptr + 0x00], tmp3 + mulx tmp1, s2_limb, tmp64_1 + add tmp3, tmp64_1, tmp64_1 + add carry, tmp64_1, tmp64_1 + stw tmp64_1, [res_ptr + 0x00] + srlx tmp64_1, 32, carry + +.Lfinish: + jmpl %i7 + 0x8, %g0 + restore carry, 0, %o0 +END(__mpn_addmul_1) diff --git a/sysdeps/sparc/sparc32/sparcv9/backtrace.h b/sysdeps/sparc/sparc32/sparcv9/backtrace.h new file mode 100644 index 0000000000..8d6c756717 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/backtrace.h @@ -0,0 +1,7 @@ +/* Private macros for guiding the backtrace implementation, sparc32 v9 + version. */ + +#define backtrace_flush_register_windows() \ + asm volatile ("flushw") + +#define BACKTRACE_STACK_BIAS 0 diff --git a/sysdeps/sparc/sparc32/sparcv9/bits/atomic.h b/sysdeps/sparc/sparc32/sparcv9/bits/atomic.h index efa60036bb..4835019202 100644 --- a/sysdeps/sparc/sparc32/sparcv9/bits/atomic.h +++ b/sysdeps/sparc/sparc32/sparcv9/bits/atomic.h @@ -1,5 +1,5 @@ /* Atomic operations. sparcv9 version. - Copyright (C) 2003, 2006 Free Software Foundation, Inc. + Copyright (C) 2003-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. @@ -55,10 +55,16 @@ typedef uintmax_t uatomic_max_t; ({ \ __typeof (*(mem)) __acev_tmp; \ __typeof (mem) __acev_mem = (mem); \ - __asm __volatile ("cas [%4], %2, %0" \ - : "=r" (__acev_tmp), "=m" (*__acev_mem) \ - : "r" (oldval), "m" (*__acev_mem), "r" (__acev_mem), \ - "0" (newval) : "memory"); \ + if (__builtin_constant_p (oldval) && (oldval) == 0) \ + __asm __volatile ("cas [%3], %%g0, %0" \ + : "=r" (__acev_tmp), "=m" (*__acev_mem) \ + : "m" (*__acev_mem), "r" (__acev_mem), \ + "0" (newval) : "memory"); \ + else \ + __asm __volatile ("cas [%4], %2, %0" \ + : "=r" (__acev_tmp), "=m" (*__acev_mem) \ + : "r" (oldval), "m" (*__acev_mem), "r" (__acev_mem), \ + "0" (newval) : "memory"); \ __acev_tmp; }) /* This can be implemented if needed. */ diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile index ee9f6ffce7..0d92813d7b 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile @@ -1,11 +1,15 @@ ifeq ($(subdir),math) +libm-sysdep_routines += s_ceil-vis2 s_ceilf-vis2 \ + s_floor-vis2 s_floorf-vis2 ifeq ($(have-as-vis3),yes) libm-sysdep_routines += m_copysignf-vis3 m_copysign-vis3 s_ceilf-vis3 \ s_ceil-vis3 s_fabs-vis3 s_fabsf-vis3 s_floor-vis3 \ s_floorf-vis3 s_llrintf-vis3 s_llrint-vis3 \ s_rintf-vis3 s_rint-vis3 w_sqrt-vis3 w_sqrtf-vis3 \ s_fminf-vis3 s_fmin-vis3 s_fmaxf-vis3 s_fmax-vis3 \ - s_fmaf-vis3 s_fma-vis3 + s_fmaf-vis3 s_fma-vis3 s_fdimf-vis3 s_fdim-vis3 \ + s_nearbyint-vis3 s_nearbyintf-vis3 s_truncf-vis3 \ + s_trunc-vis3 sysdep_routines += s_copysignf-vis3 s_copysign-vis3 endif endif diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis2.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis2.S new file mode 100644 index 0000000000..98b5f59bf6 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis2.S @@ -0,0 +1,61 @@ +/* ceil function, sparc32 v9 vis2 version. + Copyright (C) 2013-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>, 2013. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + + /* 'siam' (Set Interval Arithmetic Mode) is used to quickly override + the rounding mode during this routine. + + We add then subtract (or subtract than add if the initial + value was negative) 2**23 to the value, then subtract it + back out. + + This will clear out the fractional portion of the value and, + with suitable 'siam' initiated rouding mode settings, round + the final result in the proper direction. */ + +#define TWO_FIFTYTWO 0x43300000 /* 2**52 */ + +#define ZERO %f10 /* 0.0 */ +#define SIGN_BIT %f12 /* -0.0 */ + +ENTRY (__ceil_vis2) + sethi %hi(TWO_FIFTYTWO), %o2 + sllx %o0, 32, %o0 + or %o0, %o1, %o0 + stx %o0, [%sp + 72] + sllx %o2, 32, %o2 + fzero ZERO + ldd [%sp + 72], %f0 + fnegd ZERO, SIGN_BIT + stx %o2, [%sp + 72] + fabsd %f0, %f14 + ldd [%sp + 72], %f16 + fcmpd %fcc3, %f14, %f16 + fmovduge %fcc3, ZERO, %f16 + fand %f0, SIGN_BIT, SIGN_BIT + for %f16, SIGN_BIT, %f16 + siam (1 << 2) | 2 + faddd %f0, %f16, %f18 + siam (1 << 2) | 0 + fsubd %f18, %f16, %f18 + siam (0 << 2) + retl + for %f18, SIGN_BIT, %f0 +END (__ceil_vis2) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis3.S index be41219cef..7759736e3f 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis3.S @@ -1,5 +1,5 @@ /* ceil function, sparc32 v9 vis3 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. @@ -19,27 +19,21 @@ #include <sysdep.h> - /* Since changing the rounding mode is extremely expensive, we - try to round up using a method that is rounding mode - agnostic. + /* 'siam' (Set Interval Arithmetic Mode) is used to quickly override + the rounding mode during this routine. We add then subtract (or subtract than add if the initial value was negative) 2**23 to the value, then subtract it back out. - This will clear out the fractional portion of the value. - One of two things will happen for non-whole initial values. - Either the rounding mode will round it up, or it will be - rounded down. If the value started out whole, it will be - equal after the addition and subtraction. This means we - can accurately detect with one test whether we need to add - another 1.0 to round it up properly. + This will clear out the fractional portion of the value and, + with suitable 'siam' initiated rouding mode settings, round + the final result in the proper direction. - VIS instructions are used to facilitate the formation of - easier constants, and the propagation of the sign bit. */ + We also use VIS3 moves to avoid using the stack to transfer + values between float and integer registers. */ #define TWO_FIFTYTWO 0x43300000 /* 2**52 */ -#define ONE_DOT_ZERO 0x3ff00000 /* 1.0 */ #define ZERO %f10 /* 0.0 */ #define SIGN_BIT %f12 /* -0.0 */ @@ -47,32 +41,22 @@ ENTRY (__ceil_vis3) sethi %hi(TWO_FIFTYTWO), %o2 sllx %o0, 32, %o0 - sethi %hi(ONE_DOT_ZERO), %o3 + sllx %o2, 32, %o2 or %o0, %o1, %o0 movxtod %o0, %f0 - sllx %o2, 32, %o2 fzero ZERO - sllx %o3, 32, %o3 - fnegd ZERO, SIGN_BIT - movxtod %o2, %f16 fabsd %f0, %f14 - fcmpd %fcc3, %f14, %f16 - fmovduge %fcc3, ZERO, %f16 fand %f0, SIGN_BIT, SIGN_BIT - for %f16, SIGN_BIT, %f16 + siam (1 << 2) | 2 faddd %f0, %f16, %f18 + siam (1 << 2) | 0 fsubd %f18, %f16, %f18 - fcmpd %fcc2, %f18, %f0 - movxtod %o3, %f20 - - fmovduge %fcc2, ZERO, %f20 - faddd %f18, %f20, %f0 - fabsd %f0, %f0 + siam (0 << 2) retl - for %f0, SIGN_BIT, %f0 + for %f18, SIGN_BIT, %f0 END (__ceil_vis3) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S index 835703fb9b..efc8d49365 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S @@ -1,7 +1,7 @@ #include <sparc-ifunc.h> #include <math_ldbl_opt.h> -SPARC_ASM_VIS3_IFUNC(ceil) +SPARC_ASM_VIS3_VIS2_IFUNC(ceil) weak_alias (__ceil, ceil) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis2.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis2.S new file mode 100644 index 0000000000..f51a083c99 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis2.S @@ -0,0 +1,58 @@ +/* Float ceil function, sparc32 v9 vis2 version. + Copyright (C) 2013-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>, 2013. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + + /* 'siam' (Set Interval Arithmetic Mode) is used to quickly override + the rounding mode during this routine. + + We add then subtract (or subtract than add if the initial + value was negative) 2**23 to the value, then subtract it + back out. + + This will clear out the fractional portion of the value and, + with suitable 'siam' initiated rouding mode settings, round + the final result in the proper direction. */ + +#define TWO_TWENTYTHREE 0x4b000000 /* 2**23 */ + +#define ZERO %f10 /* 0.0 */ +#define SIGN_BIT %f12 /* -0.0 */ + +ENTRY (__ceilf_vis2) + st %o0, [%sp + 68] + sethi %hi(TWO_TWENTYTHREE), %o2 + fzeros ZERO + ld [%sp + 68], %f0 + fnegs ZERO, SIGN_BIT + st %o2, [%sp + 68] + fabss %f0, %f14 + ld [%sp + 68], %f16 + fcmps %fcc3, %f14, %f16 + fmovsuge %fcc3, ZERO, %f16 + fands %f0, SIGN_BIT, SIGN_BIT + fors %f16, SIGN_BIT, %f16 + siam (1 << 2) | 2 + fadds %f0, %f16, %f1 + siam (1 << 2) | 0 + fsubs %f1, %f16, %f1 + siam (0 << 2) + retl + fors %f1, SIGN_BIT, %f0 +END (__ceilf_vis2) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis3.S index c35a85f24f..46023a1218 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis3.S @@ -1,5 +1,5 @@ /* Float ceil function, sparc32 v9 vis3 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. @@ -19,27 +19,21 @@ #include <sysdep.h> - /* Since changing the rounding mode is extremely expensive, we - try to round up using a method that is rounding mode - agnostic. + /* 'siam' (Set Interval Arithmetic Mode) is used to quickly override + the rounding mode during this routine. We add then subtract (or subtract than add if the initial value was negative) 2**23 to the value, then subtract it back out. - This will clear out the fractional portion of the value. - One of two things will happen for non-whole initial values. - Either the rounding mode will round it up, or it will be - rounded down. If the value started out whole, it will be - equal after the addition and subtraction. This means we - can accurately detect with one test whether we need to add - another 1.0 to round it up properly. + This will clear out the fractional portion of the value and, + with suitable 'siam' initiated rouding mode settings, round + the final result in the proper direction. - VIS instructions are used to facilitate the formation of - easier constants, and the propagation of the sign bit. */ + We also use VIS3 moves to avoid using the stack to transfer + values between float and integer registers. */ #define TWO_TWENTYTHREE 0x4b000000 /* 2**23 */ -#define ONE_DOT_ZERO 0x3f800000 /* 1.0 */ #define ZERO %f10 /* 0.0 */ #define SIGN_BIT %f12 /* -0.0 */ @@ -47,28 +41,19 @@ ENTRY (__ceilf_vis3) movwtos %o0, %f0 sethi %hi(TWO_TWENTYTHREE), %o2 - sethi %hi(ONE_DOT_ZERO), %o3 fzeros ZERO - fnegs ZERO, SIGN_BIT - movwtos %o2, %f16 fabss %f0, %f14 - fcmps %fcc3, %f14, %f16 - fmovsuge %fcc3, ZERO, %f16 fands %f0, SIGN_BIT, SIGN_BIT - fors %f16, SIGN_BIT, %f16 + siam (1 << 2) | 2 fadds %f0, %f16, %f1 + siam (1 << 2) | 0 fsubs %f1, %f16, %f1 - fcmps %fcc2, %f1, %f0 - movwtos %o3, %f9 - - fmovsuge %fcc2, ZERO, %f9 - fadds %f1, %f9, %f0 - fabss %f0, %f0 + siam (0 << 2) retl - fors %f0, SIGN_BIT, %f0 + fors %f1, SIGN_BIT, %f0 END (__ceilf_vis3) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf.S index 3047dd8faa..1c72a5728e 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf.S @@ -1,6 +1,6 @@ #include <sparc-ifunc.h> -SPARC_ASM_VIS3_IFUNC(ceilf) +SPARC_ASM_VIS3_VIS2_IFUNC(ceilf) weak_alias (__ceilf, ceilf) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-vis3.S index db27bb7f52..ac6843cfb7 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-vis3.S @@ -1,5 +1,5 @@ /* copysign function, sparc32 vis3 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-vis3.S index 7cdc540842..e738c83499 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-vis3.S @@ -1,5 +1,5 @@ /* float copysign function, sparc32 vis3 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-vis3.S index 733ec90e42..7a32b6962d 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-vis3.S @@ -1,5 +1,5 @@ /* Float absolute value, sparc32+v9 vis3 version. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-vis3.S index 82b577580e..a5ec9299df 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-vis3.S @@ -1,5 +1,5 @@ /* Float absolute value, sparc32 vis3 version. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2006. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.S new file mode 100644 index 0000000000..3a90730ab5 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.S @@ -0,0 +1,34 @@ +/* Compute positive difference, sparc 32-bit+v9+vis3. + Copyright (C) 2013-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY(__fdim_vis3) + movwtos %o0, %f0 + movwtos %o1, %f1 + movwtos %o2, %f2 + movwtos %o3, %f3 + fcmpd %f0, %f2 + fbug 1f + nop + fzero %f0 + fnegd %f0, %f2 +1: retl + fsubd %f0, %f2, %f0 +END(__fdim_vis3) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.S new file mode 100644 index 0000000000..4b13408244 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.S @@ -0,0 +1,19 @@ +#include <sparc-ifunc.h> +#include <math_ldbl_opt.h> + +SPARC_ASM_VIS3_IFUNC(fdim) + +weak_alias (__fdim, fdim) + +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) +compat_symbol (libm, __fdim, fdiml, GLIBC_2_1); +#endif + +# undef weak_alias +# define weak_alias(a, b) +# undef compat_symbol +# define compat_symbol(a, b, c, d) + +#define __fdim __fdim_generic + +#include "../s_fdim.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.S new file mode 100644 index 0000000000..04ba613f2d --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.S @@ -0,0 +1,32 @@ +/* Compute positive difference, sparc 32-bit+v9+vis3. + Copyright (C) 2013-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY(__fdimf_vis3) + movwtos %o0, %f0 + movwtos %o1, %f1 + fcmps %f0, %f1 + fbug 1f + nop + fzeros %f0 + fnegs %f0, %f1 +1: retl + fsubs %f0, %f1, %f0 +END(__fdimf_vis3) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.S new file mode 100644 index 0000000000..30381d6a59 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.S @@ -0,0 +1,12 @@ +#include <sparc-ifunc.h> + +SPARC_ASM_VIS3_IFUNC(fdimf) + +weak_alias (__fdimf, fdimf) + +# undef weak_alias +# define weak_alias(a, b) + +#define __fdimf __fdimf_generic + +#include "../s_fdimf.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis2.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis2.S new file mode 100644 index 0000000000..7b3f954132 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis2.S @@ -0,0 +1,61 @@ +/* floor function, sparc32 v9 vis2 version. + Copyright (C) 2013-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>, 2013. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + + /* 'siam' (Set Interval Arithmetic Mode) is used to quickly override + the rounding mode during this routine. + + We add then subtract (or subtract than add if the initial + value was negative) 2**23 to the value, then subtract it + back out. + + This will clear out the fractional portion of the value and, + with suitable 'siam' initiated rouding mode settings, round + the final result in the proper direction. */ + +#define TWO_FIFTYTWO 0x43300000 /* 2**52 */ + +#define ZERO %f10 /* 0.0 */ +#define SIGN_BIT %f12 /* -0.0 */ + +ENTRY (__floor_vis2) + sethi %hi(TWO_FIFTYTWO), %o2 + sllx %o0, 32, %o0 + or %o0, %o1, %o0 + stx %o0, [%sp + 72] + sllx %o2, 32, %o2 + fzero ZERO + ldd [%sp + 72], %f0 + fnegd ZERO, SIGN_BIT + stx %o2, [%sp + 72] + fabsd %f0, %f14 + ldd [%sp + 72], %f16 + fcmpd %fcc3, %f14, %f16 + fmovduge %fcc3, ZERO, %f16 + fand %f0, SIGN_BIT, SIGN_BIT + for %f16, SIGN_BIT, %f16 + siam (1 << 2) | 3 + faddd %f0, %f16, %f18 + siam (1 << 2) | 0 + fsubd %f18, %f16, %f18 + siam (0 << 2) + retl + for %f18, SIGN_BIT, %f0 +END (__floor_vis2) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis3.S index dfaf55458f..20b41a7841 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis3.S @@ -1,5 +1,5 @@ /* floor function, sparc32 v9 vis3 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. @@ -19,27 +19,21 @@ #include <sysdep.h> - /* Since changing the rounding mode is extremely expensive, we - try to round up using a method that is rounding mode - agnostic. + /* 'siam' (Set Interval Arithmetic Mode) is used to quickly override + the rounding mode during this routine. We add then subtract (or subtract than add if the initial value was negative) 2**23 to the value, then subtract it back out. - This will clear out the fractional portion of the value. - One of two things will happen for non-whole initial values. - Either the rounding mode will round it up, or it will be - rounded down. If the value started out whole, it will be - equal after the addition and subtraction. This means we - can accurately detect with one test whether we need to add - another 1.0 to round it up properly. + This will clear out the fractional portion of the value and, + with suitable 'siam' initiated rouding mode settings, round + the final result in the proper direction. - VIS instructions are used to facilitate the formation of - easier constants, and the propagation of the sign bit. */ + We also use VIS3 moves to avoid using the stack to transfer + values between float and integer registers. */ #define TWO_FIFTYTWO 0x43300000 /* 2**52 */ -#define ONE_DOT_ZERO 0x3ff00000 /* 1.0 */ #define ZERO %f10 /* 0.0 */ #define SIGN_BIT %f12 /* -0.0 */ @@ -47,32 +41,22 @@ ENTRY (__floor_vis3) sethi %hi(TWO_FIFTYTWO), %o2 sllx %o0, 32, %o0 - sethi %hi(ONE_DOT_ZERO), %o3 + sllx %o2, 32, %o2 or %o0, %o1, %o0 movxtod %o0, %f0 - sllx %o2, 32, %o2 fzero ZERO - sllx %o3, 32, %o3 - fnegd ZERO, SIGN_BIT - movxtod %o2, %f16 fabsd %f0, %f14 - fcmpd %fcc3, %f14, %f16 - fmovduge %fcc3, ZERO, %f16 fand %f0, SIGN_BIT, SIGN_BIT - for %f16, SIGN_BIT, %f16 + siam (1 << 2) | 3 faddd %f0, %f16, %f18 + siam (1 << 2) | 0 fsubd %f18, %f16, %f18 - fcmpd %fcc2, %f18, %f0 - movxtod %o3, %f20 - - fmovdule %fcc2, ZERO, %f20 - fsubd %f18, %f20, %f0 - fabsd %f0, %f0 + siam (0 << 2) retl - for %f0, SIGN_BIT, %f0 + for %f18, SIGN_BIT, %f0 END (__floor_vis3) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S index 37aeb43b90..1fe4b95ea6 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S @@ -1,7 +1,7 @@ #include <sparc-ifunc.h> #include <math_ldbl_opt.h> -SPARC_ASM_VIS3_IFUNC(floor) +SPARC_ASM_VIS3_VIS2_IFUNC(floor) weak_alias (__floor, floor) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis2.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis2.S new file mode 100644 index 0000000000..6040164dc2 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis2.S @@ -0,0 +1,58 @@ +/* Float floor function, sparc32 v9 vis2 version. + Copyright (C) 2013-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>, 2013. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + + /* 'siam' (Set Interval Arithmetic Mode) is used to quickly override + the rounding mode during this routine. + + We add then subtract (or subtract than add if the initial + value was negative) 2**23 to the value, then subtract it + back out. + + This will clear out the fractional portion of the value and, + with suitable 'siam' initiated rouding mode settings, round + the final result in the proper direction. */ + +#define TWO_TWENTYTHREE 0x4b000000 /* 2**23 */ + +#define ZERO %f10 /* 0.0 */ +#define SIGN_BIT %f12 /* -0.0 */ + +ENTRY (__floorf_vis2) + st %o0, [%sp + 68] + sethi %hi(TWO_TWENTYTHREE), %o2 + fzeros ZERO + ld [%sp + 68], %f0 + fnegs ZERO, SIGN_BIT + st %o2, [%sp + 68] + fabss %f0, %f14 + ld [%sp + 68], %f16 + fcmps %fcc3, %f14, %f16 + fmovsuge %fcc3, ZERO, %f16 + fands %f0, SIGN_BIT, SIGN_BIT + fors %f16, SIGN_BIT, %f16 + siam (1 << 2) | 3 + fadds %f0, %f16, %f1 + siam (1 << 2) | 0 + fsubs %f1, %f16, %f1 + siam (0 << 2) + retl + fors %f1, SIGN_BIT, %f0 +END (__floorf_vis2) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis3.S index 24c8764fa6..66fa964f25 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis3.S @@ -1,5 +1,5 @@ /* Float floor function, sparc32 v9 vis3 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. @@ -19,27 +19,21 @@ #include <sysdep.h> - /* Since changing the rounding mode is extremely expensive, we - try to round up using a method that is rounding mode - agnostic. + /* 'siam' (Set Interval Arithmetic Mode) is used to quickly override + the rounding mode during this routine. We add then subtract (or subtract than add if the initial value was negative) 2**23 to the value, then subtract it back out. - This will clear out the fractional portion of the value. - One of two things will happen for non-whole initial values. - Either the rounding mode will round it up, or it will be - rounded down. If the value started out whole, it will be - equal after the addition and subtraction. This means we - can accurately detect with one test whether we need to add - another 1.0 to round it up properly. + This will clear out the fractional portion of the value and, + with suitable 'siam' initiated rouding mode settings, round + the final result in the proper direction. - VIS instructions are used to facilitate the formation of - easier constants, and the propagation of the sign bit. */ + We also use VIS3 moves to avoid using the stack to transfer + values between float and integer registers. */ #define TWO_TWENTYTHREE 0x4b000000 /* 2**23 */ -#define ONE_DOT_ZERO 0x3f800000 /* 1.0 */ #define ZERO %f10 /* 0.0 */ #define SIGN_BIT %f12 /* -0.0 */ @@ -47,28 +41,19 @@ ENTRY (__floorf_vis3) movwtos %o0, %f0 sethi %hi(TWO_TWENTYTHREE), %o2 - sethi %hi(ONE_DOT_ZERO), %o3 fzeros ZERO - fnegs ZERO, SIGN_BIT - movwtos %o2, %f16 fabss %f0, %f14 - fcmps %fcc3, %f14, %f16 - fmovsuge %fcc3, ZERO, %f16 fands %f0, SIGN_BIT, SIGN_BIT - fors %f16, SIGN_BIT, %f16 + siam (1 << 2) | 3 fadds %f0, %f16, %f1 + siam (1 << 2) | 0 fsubs %f1, %f16, %f1 - fcmps %fcc2, %f1, %f0 - movwtos %o3, %f9 - - fmovsule %fcc2, ZERO, %f9 - fsubs %f1, %f9, %f0 - fabss %f0, %f0 + siam (0 << 2) retl - fors %f0, SIGN_BIT, %f0 + fors %f1, SIGN_BIT, %f0 END (__floorf_vis3) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S index 31cda385b7..d2a83cb9b8 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S @@ -1,6 +1,6 @@ #include <sparc-ifunc.h> -SPARC_ASM_VIS3_IFUNC(floorf) +SPARC_ASM_VIS3_VIS2_IFUNC(floorf) weak_alias (__floorf, floorf) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-vis3.S index ee2790023e..a168f25f6f 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma-vis3.S @@ -1,5 +1,5 @@ /* fma function, sparc32 vis3 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-vis3.S index 1a934f614c..e356723600 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaf-vis3.S @@ -1,5 +1,5 @@ /* fmaf function, sparc32 vis3 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S index 9fdee2c4c9..7dc6b3113e 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S @@ -1,5 +1,5 @@ /* fmax function, sparc32 vis3 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S index 731a04aefc..0488c5bebd 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S @@ -1,5 +1,5 @@ /* fmaxf function, sparc32 vis3 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S index 54c32bd5b7..719a82617d 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S @@ -1,5 +1,5 @@ /* fmin function, sparc32 vis3 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf-vis3.S index a13f33238f..9f8d1c5e83 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf-vis3.S @@ -1,5 +1,5 @@ /* fminf function, sparc32 vis3 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint-vis3.S index 8a90722b54..09140b8701 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint-vis3.S @@ -1,5 +1,5 @@ /* llrint(), sparc32 v9 vis3 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-vis3.S index 8590af2bb4..2f6c5719fd 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-vis3.S @@ -1,5 +1,5 @@ /* llrintf(), sparc32 v9 vis3 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint-vis3.S new file mode 100644 index 0000000000..07548c3a1f --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint-vis3.S @@ -0,0 +1,65 @@ +/* Round float to int floating-point values without generating + an inexact exception, sparc32 v9 vis3 version. + + Copyright (C) 2013-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>, 2013. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> +#include <math_ldbl_opt.h> + + /* We pop constants into the FPU registers using the incoming + argument stack slots, since this avoid having to use any PIC + references. We also thus avoid having to allocate a register + window. + + VIS instructions are used to facilitate the formation of + easier constants, and the propagation of the sign bit. */ + +#define TWO_FIFTYTWO 0x43300000 /* 2**52 */ + +#define ZERO %f10 /* 0.0 */ +#define SIGN_BIT %f12 /* -0.0 */ + +ENTRY (__nearbyint_vis3) + st %fsr, [%sp + 88] + sethi %hi(TWO_FIFTYTWO), %o2 + sethi %hi(0xf8003e0), %o5 + ld [%sp + 88], %o4 + sllx %o0, 32, %o0 + or %o5, %lo(0xf8003e0), %o5 + or %o0, %o1, %o0 + movxtod %o0, %f0 + andn %o4, %o5, %o4 + fzero ZERO + st %o4, [%sp + 80] + sllx %o2, 32, %o2 + fnegd ZERO, SIGN_BIT + ld [%sp + 80], %fsr + movxtod %o2, %f16 + fabsd %f0, %f14 + fcmpd %fcc3, %f14, %f16 + fmovduge %fcc3, ZERO, %f16 + fand %f0, SIGN_BIT, SIGN_BIT + for %f16, SIGN_BIT, %f16 + faddd %f0, %f16, %f6 + fsubd %f6, %f16, %f0 + fabsd %f0, %f0 + for %f0, SIGN_BIT, %f0 + retl + ld [%sp + 88], %fsr +END (__nearbyint_vis3) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.S new file mode 100644 index 0000000000..47da9eaafe --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyint.S @@ -0,0 +1,19 @@ +#include <sparc-ifunc.h> +#include <math_ldbl_opt.h> + +SPARC_ASM_VIS3_IFUNC(nearbyint) + +weak_alias (__nearbyint, nearbyint) + +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) +compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_1) +#endif + +# undef weak_alias +# define weak_alias(a, b) +# undef compat_symbol +# define compat_symbol(a, b, c, d) + +#define __nearbyint __nearbyint_generic + +#include "../s_nearbyint.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf-vis3.S new file mode 100644 index 0000000000..c69df92c35 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf-vis3.S @@ -0,0 +1,61 @@ +/* Round float to int floating-point values without generating + an inexact exception, sparc32 v9 vis3 version. + + Copyright (C) 2013-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>, 2013. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + + /* We pop constants into the FPU registers using the incoming + argument stack slots, since this avoid having to use any PIC + references. We also thus avoid having to allocate a register + window. + + VIS instructions are used to facilitate the formation of + easier constants, and the propagation of the sign bit. */ + +#define TWO_TWENTYTHREE 0x4b000000 /* 2**23 */ + +#define ZERO %f10 /* 0.0 */ +#define SIGN_BIT %f12 /* -0.0 */ + +ENTRY (__nearbyintf_vis3) + st %fsr, [%sp + 88] + movwtos %o0, %f1 + sethi %hi(TWO_TWENTYTHREE), %o2 + sethi %hi(0xf8003e0), %o5 + ld [%sp + 88], %o4 + fzeros ZERO + or %o5, %lo(0xf8003e0), %o5 + fnegs ZERO, SIGN_BIT + andn %o4, %o5, %o4 + st %o4, [%sp + 80] + ld [%sp + 80], %fsr + movwtos %o2, %f16 + fabss %f1, %f14 + fcmps %fcc3, %f14, %f16 + fmovsuge %fcc3, ZERO, %f16 + fands %f1, SIGN_BIT, SIGN_BIT + fors %f16, SIGN_BIT, %f16 + fadds %f1, %f16, %f5 + fsubs %f5, %f16, %f0 + fabss %f0, %f0 + fors %f0, SIGN_BIT, %f0 + retl + ld [%sp + 88], %fsr +END (__nearbyintf_vis3) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf.S new file mode 100644 index 0000000000..95100c1bfc --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_nearbyintf.S @@ -0,0 +1,12 @@ +#include <sparc-ifunc.h> + +SPARC_ASM_VIS3_IFUNC(nearbyintf) + +weak_alias (__nearbyintf, nearbyintf) + +# undef weak_alias +# define weak_alias(a, b) + +#define __nearbyintf __nearbyintf_generic + +#include "../s_nearbyintf.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-vis3.S index 6c4a3e00dd..f6e431c923 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-vis3.S @@ -1,5 +1,5 @@ /* Round float to int floating-point values, sparc32 v9 vis3 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-vis3.S index ec0bb37b13..ec79df65aa 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-vis3.S @@ -1,5 +1,5 @@ /* Round float to int floating-point values, sparc32 v9 vis3 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_trunc-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_trunc-vis3.S new file mode 100644 index 0000000000..d66e847afb --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_trunc-vis3.S @@ -0,0 +1,57 @@ +/* Truncate argument to nearest integral value not larger than + the argument, sparc32 v9 vis3 version. + + Copyright (C) 2013-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>, 2013. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> +#include <math_ldbl_opt.h> + + /* We pop constants into the FPU registers using the incoming + argument stack slots, since this avoid having to use any PIC + references. We also thus avoid having to allocate a register + window. + + VIS instructions are used to facilitate the formation of + easier constants, and the propagation of the sign bit. */ + +#define TWO_FIFTYTWO 0x43300000 /* 2**52 */ + +#define ZERO %f10 /* 0.0 */ +#define SIGN_BIT %f12 /* -0.0 */ + +ENTRY (__trunc_vis3) + sethi %hi(TWO_FIFTYTWO), %o2 + sllx %o0, 32, %o0 + or %o0, %o1, %o0 + fzero ZERO + movxtod %o0, %f0 + sllx %o2, 32, %o2 + fnegd ZERO, SIGN_BIT + movxtod %o2, %f16 + fabsd %f0, %f14 + fcmpd %fcc3, %f14, %f16 + fmovduge %fcc3, ZERO, %f14 + fand %f0, SIGN_BIT, SIGN_BIT + fdtox %f14, %f14 + fxtod %f14, %f14 + faddd %f0, ZERO, %f18 + fmovduge %fcc3, %f18, %f14 + retl + for %f14, SIGN_BIT, %f0 +END (__trunc_vis3) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_trunc.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_trunc.S new file mode 100644 index 0000000000..3787fa1f11 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_trunc.S @@ -0,0 +1,19 @@ +#include <sparc-ifunc.h> +#include <math_ldbl_opt.h> + +SPARC_ASM_VIS3_IFUNC(trunc) + +weak_alias (__trunc, trunc) + +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) +compat_symbol (libm, __trunc, truncl, GLIBC_2_1) +#endif + +# undef weak_alias +# define weak_alias(a, b) +# undef compat_symbol +# define compat_symbol(a, b, c, d) + +#define __trunc __trunc_generic + +#include "../s_trunc.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_truncf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_truncf-vis3.S new file mode 100644 index 0000000000..c4f0c7a12e --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_truncf-vis3.S @@ -0,0 +1,53 @@ +/* Truncate argument to nearest integral value not larger than + the argument, sparc32 v9 vis3 version. + + Copyright (C) 2013-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>, 2013. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + + /* We pop constants into the FPU registers using the incoming + argument stack slots, since this avoid having to use any PIC + references. We also thus avoid having to allocate a register + window. + + VIS instructions are used to facilitate the formation of + easier constants, and the propagation of the sign bit. */ + +#define TWO_TWENTYTHREE 0x4b000000 /* 2**23 */ + +#define ZERO %f10 /* 0.0 */ +#define SIGN_BIT %f12 /* -0.0 */ + +ENTRY (__truncf_vis3) + movwtos %o0, %f1 + sethi %hi(TWO_TWENTYTHREE), %o2 + fzeros ZERO + fnegs ZERO, SIGN_BIT + movwtos %o2, %f16 + fabss %f1, %f14 + fcmps %fcc3, %f14, %f16 + fmovsuge %fcc3, ZERO, %f14 + fands %f1, SIGN_BIT, SIGN_BIT + fstoi %f14, %f14 + fitos %f14, %f14 + fadds %f1, ZERO, %f18 + fmovsuge %fcc3, %f18, %f14 + retl + fors %f14, SIGN_BIT, %f0 +END (__truncf_vis3) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_truncf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_truncf.S new file mode 100644 index 0000000000..2ca2517334 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_truncf.S @@ -0,0 +1,12 @@ +#include <sparc-ifunc.h> + +SPARC_ASM_VIS3_IFUNC(truncf) + +weak_alias (__truncf, truncf) + +# undef weak_alias +# define weak_alias(a, b) + +#define __truncf __truncf_generic + +#include "../s_truncf.S" diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S index 3880da0d8e..6fe920f68a 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S @@ -1,5 +1,5 @@ /* sqrt function. sparc32 v9 vis3 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S index 2d4270f9cd..f0affc44e9 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S @@ -1,5 +1,5 @@ /* sqrtf function. sparc32 v9 vis3 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceil.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceil.S index 90564e8021..6eafb51681 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceil.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceil.S @@ -1,5 +1,5 @@ /* ceil function, sparc32 v9 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceilf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceilf.S index 1407423fef..9673664493 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceilf.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_ceilf.S @@ -1,5 +1,5 @@ /* Float ceil function, sparc32 v9 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S index 1142c171f6..a3b44804ed 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S @@ -1,5 +1,5 @@ /* Float absolute value, sparc32+v9 version. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fdim.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fdim.S new file mode 100644 index 0000000000..51535d9331 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fdim.S @@ -0,0 +1,40 @@ +/* Compute positive difference, sparc 32-bit+v9. + Copyright (C) 2013-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> +#include <math_ldbl_opt.h> + +ENTRY(__fdim) + std %o0, [%sp + 72] + std %o2, [%sp + 80] + ldd [%sp + 72], %f0 + ldd [%sp + 80], %f2 + fcmpd %f0, %f2 + fbug 1f + nop + fzero %f0 + fnegd %f0, %f2 +1: retl + fsubd %f0, %f2, %f0 +END(__fdim) +weak_alias (__fdim, fdim) + +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) +compat_symbol (libm, __fdim, fdiml, GLIBC_2_1); +#endif diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fdimf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fdimf.S new file mode 100644 index 0000000000..fab345c62a --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fdimf.S @@ -0,0 +1,35 @@ +/* Compute positive difference, sparc 32-bit+v9. + Copyright (C) 2013-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + +ENTRY(__fdimf) + st %o0, [%sp + 72] + st %o1, [%sp + 76] + ld [%sp + 72], %f0 + ld [%sp + 76], %f1 + fcmps %f0, %f1 + fbug 1f + nop + fzeros %f0 + fnegs %f0, %f1 +1: retl + fsubs %f0, %f1, %f0 +END(__fdimf) +weak_alias (__fdimf, fdimf) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_floor.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_floor.S index 9ac3f5022e..f3dd4e4d46 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_floor.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_floor.S @@ -1,5 +1,5 @@ /* floor function, sparc32 v9 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_floorf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_floorf.S index 864644f4cf..f9922781c2 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_floorf.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_floorf.S @@ -1,5 +1,5 @@ /* Float floor function, sparc32 v9 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S index a6ef860af2..1928c78012 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S @@ -1,5 +1,5 @@ /* fmax function, sparc32 v9 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmaxf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmaxf.S index 3018210566..8325b09e40 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmaxf.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmaxf.S @@ -1,5 +1,5 @@ /* fmaxf function, sparc32 v9 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmin.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmin.S index 4266a087e7..17b89aac23 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmin.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmin.S @@ -1,5 +1,5 @@ /* fmin function, sparc32 v9 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fminf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fminf.S index 168020bb60..5830ce4ef4 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_fminf.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_fminf.S @@ -1,5 +1,5 @@ /* fminf function, sparc32 v9 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_isnan.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_isnan.S index a1c0c61766..f2e40b1249 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_isnan.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_isnan.S @@ -1,5 +1,5 @@ /* isnan(). sparc32 v9 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S index 55383907e7..fda7efc429 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrint.S @@ -1,5 +1,5 @@ /* llrint(), sparc32 v9 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrintf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrintf.S index 73e9d64875..66e153e960 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrintf.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_llrintf.S @@ -1,5 +1,5 @@ /* llrintf(), sparc32 v9 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrint.S index 2fd0695552..0336660cdc 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrint.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrint.S @@ -1,5 +1,5 @@ /* lrint(), sparc32 v9 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrintf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrintf.S index c546e67c27..3b48cc4359 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrintf.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_lrintf.S @@ -1,5 +1,5 @@ /* lrintf(), sparc32 v9 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S new file mode 100644 index 0000000000..4904878aca --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyint.S @@ -0,0 +1,72 @@ +/* Round float to int floating-point values without generating + an inexact exception, sparc32 v9 version. + + Copyright (C) 2013-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>, 2013. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> +#include <math_ldbl_opt.h> + + /* We pop constants into the FPU registers using the incoming + argument stack slots, since this avoid having to use any PIC + references. We also thus avoid having to allocate a register + window. + + VIS instructions are used to facilitate the formation of + easier constants, and the propagation of the sign bit. */ + +#define TWO_FIFTYTWO 0x43300000 /* 2**52 */ + +#define ZERO %f10 /* 0.0 */ +#define SIGN_BIT %f12 /* -0.0 */ + +ENTRY (__nearbyint) + st %fsr, [%sp + 88] + sethi %hi(TWO_FIFTYTWO), %o2 + sethi %hi(0xf8003e0), %o5 + ld [%sp + 88], %o4 + sllx %o0, 32, %o0 + or %o5, %lo(0xf8003e0), %o5 + or %o0, %o1, %o0 + andn %o4, %o5, %o4 + fzero ZERO + st %o4, [%sp + 80] + stx %o0, [%sp + 72] + sllx %o2, 32, %o2 + fnegd ZERO, SIGN_BIT + ldd [%sp + 72], %f0 + ld [%sp + 80], %fsr + stx %o2, [%sp + 72] + fabsd %f0, %f14 + ldd [%sp + 72], %f16 + fcmpd %fcc3, %f14, %f16 + fmovduge %fcc3, ZERO, %f16 + fand %f0, SIGN_BIT, SIGN_BIT + for %f16, SIGN_BIT, %f16 + faddd %f0, %f16, %f6 + fsubd %f6, %f16, %f0 + fabsd %f0, %f0 + for %f0, SIGN_BIT, %f0 + retl + ld [%sp + 88], %fsr +END (__nearbyint) +weak_alias (__nearbyint, nearbyint) + +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) +compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_1) +#endif diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyintf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyintf.S new file mode 100644 index 0000000000..aec04a0218 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_nearbyintf.S @@ -0,0 +1,64 @@ +/* Round float to int floating-point values without generating + an inexact exception, sparc32 v9 version. + + Copyright (C) 2013-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>, 2013. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + + /* We pop constants into the FPU registers using the incoming + argument stack slots, since this avoid having to use any PIC + references. We also thus avoid having to allocate a register + window. + + VIS instructions are used to facilitate the formation of + easier constants, and the propagation of the sign bit. */ + +#define TWO_TWENTYTHREE 0x4b000000 /* 2**23 */ + +#define ZERO %f10 /* 0.0 */ +#define SIGN_BIT %f12 /* -0.0 */ + +ENTRY (__nearbyintf) + st %fsr, [%sp + 88] + st %o0, [%sp + 68] + sethi %hi(TWO_TWENTYTHREE), %o2 + sethi %hi(0xf8003e0), %o5 + ld [%sp + 88], %o4 + fzeros ZERO + or %o5, %lo(0xf8003e0), %o5 + fnegs ZERO, SIGN_BIT + andn %o4, %o5, %o4 + st %o4, [%sp + 80] + ld [%sp + 68], %f1 + ld [%sp + 80], %fsr + st %o2, [%sp + 68] + fabss %f1, %f14 + ld [%sp + 68], %f16 + fcmps %fcc3, %f14, %f16 + fmovsuge %fcc3, ZERO, %f16 + fands %f1, SIGN_BIT, SIGN_BIT + fors %f16, SIGN_BIT, %f16 + fadds %f1, %f16, %f5 + fsubs %f5, %f16, %f0 + fabss %f0, %f0 + fors %f0, SIGN_BIT, %f0 + retl + ld [%sp + 88], %fsr +END (__nearbyintf) +weak_alias (__nearbyintf, nearbyintf) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S index 32cfce8ee9..e7db7989ca 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_rint.S @@ -1,5 +1,5 @@ /* Round float to int floating-point values, sparc32 v9 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_rintf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_rintf.S index c053c55b8d..008ac26f6b 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/s_rintf.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_rintf.S @@ -1,5 +1,5 @@ /* Round float to int floating-point values, sparc32 v9 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@davemloft.net>, 2012. diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_trunc.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_trunc.S new file mode 100644 index 0000000000..5cb70ee743 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_trunc.S @@ -0,0 +1,64 @@ +/* Truncate argument to nearest integral value not larger than + the argument, sparc32 v9 version. + + Copyright (C) 2013-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>, 2013. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> +#include <math_ldbl_opt.h> + + /* We pop constants into the FPU registers using the incoming + argument stack slots, since this avoid having to use any PIC + references. We also thus avoid having to allocate a register + window. + + VIS instructions are used to facilitate the formation of + easier constants, and the propagation of the sign bit. */ + +#define TWO_FIFTYTWO 0x43300000 /* 2**52 */ + +#define ZERO %f10 /* 0.0 */ +#define SIGN_BIT %f12 /* -0.0 */ + +ENTRY (__trunc) + sethi %hi(TWO_FIFTYTWO), %o2 + sllx %o0, 32, %o0 + or %o0, %o1, %o0 + fzero ZERO + stx %o0, [%sp + 72] + sllx %o2, 32, %o2 + fnegd ZERO, SIGN_BIT + ldd [%sp + 72], %f0 + stx %o2, [%sp + 72] + fabsd %f0, %f14 + ldd [%sp + 72], %f16 + fcmpd %fcc3, %f14, %f16 + fmovduge %fcc3, ZERO, %f14 + fand %f0, SIGN_BIT, SIGN_BIT + fdtox %f14, %f14 + fxtod %f14, %f14 + faddd %f0, ZERO, %f18 + fmovduge %fcc3, %f18, %f14 + retl + for %f14, SIGN_BIT, %f0 +END (__trunc) +weak_alias (__trunc, trunc) + +#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) +compat_symbol (libm, __trunc, truncl, GLIBC_2_1) +#endif diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/s_truncf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/s_truncf.S new file mode 100644 index 0000000000..8f34d182c8 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/s_truncf.S @@ -0,0 +1,56 @@ +/* Truncate argument to nearest integral value not larger than + the argument, sparc32 v9 version. + + Copyright (C) 2013-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by David S. Miller <davem@davemloft.net>, 2013. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> + + /* We pop constants into the FPU registers using the incoming + argument stack slots, since this avoid having to use any PIC + references. We also thus avoid having to allocate a register + window. + + VIS instructions are used to facilitate the formation of + easier constants, and the propagation of the sign bit. */ + +#define TWO_TWENTYTHREE 0x4b000000 /* 2**23 */ + +#define ZERO %f10 /* 0.0 */ +#define SIGN_BIT %f12 /* -0.0 */ + +ENTRY (__truncf) + st %o0, [%sp + 68] + sethi %hi(TWO_TWENTYTHREE), %o2 + fzeros ZERO + ld [%sp + 68], %f1 + fnegs ZERO, SIGN_BIT + st %o2, [%sp + 68] + fabss %f1, %f14 + ld [%sp + 68], %f16 + fcmps %fcc3, %f14, %f16 + fmovsuge %fcc3, ZERO, %f14 + fands %f1, SIGN_BIT, SIGN_BIT + fstoi %f14, %f14 + fitos %f14, %f14 + fadds %f1, ZERO, %f18 + fmovsuge %fcc3, %f18, %f14 + retl + fors %f14, SIGN_BIT, %f0 +END (__truncf) +weak_alias (__truncf, truncf) diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/unix/sysv/linux/multiarch/Implies b/sysdeps/sparc/sparc32/sparcv9/fpu/unix/sysv/linux/multiarch/Implies deleted file mode 100644 index a380d8a739..0000000000 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/unix/sysv/linux/multiarch/Implies +++ /dev/null @@ -1,4 +0,0 @@ -# We must list this here to move it ahead of the ldbl-opt code. -sparc/sparc32/sparcv9/fpu/multiarch -sparc/sparc32/sparcv9/fpu -sparc/sparc32/fpu diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt.S b/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt.S index ce7491e438..abfd5df765 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrt.S @@ -1,5 +1,5 @@ /* sqrt function. sparc32 v9 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf.S b/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf.S index 0e00b66964..cc38b5777d 100644 --- a/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf.S +++ b/sysdeps/sparc/sparc32/sparcv9/fpu/w_sqrtf.S @@ -1,5 +1,5 @@ /* sqrtf function. sparc32 v9 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/sparc/sparc32/sparcv9/hp-timing.c b/sysdeps/sparc/sparc32/sparcv9/hp-timing.c index ac06494ce7..2224099940 100644 --- a/sysdeps/sparc/sparc32/sparcv9/hp-timing.c +++ b/sysdeps/sparc/sparc32/sparcv9/hp-timing.c @@ -1,5 +1,5 @@ /* Support for high precision, low overhead timing functions. sparcv9 version. - Copyright (C) 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2001-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@redhat.com>, 2001. diff --git a/sysdeps/sparc/sparc32/sparcv9/hp-timing.h b/sysdeps/sparc/sparc32/sparcv9/hp-timing.h index d0f896da5c..fd7e76ecae 100644 --- a/sysdeps/sparc/sparc32/sparcv9/hp-timing.h +++ b/sysdeps/sparc/sparc32/sparcv9/hp-timing.h @@ -1,5 +1,5 @@ /* High precision, low overhead timing functions. sparcv9 version. - Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2001-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David S. Miller <davem@redhat.com>, 2001. diff --git a/sysdeps/sparc/sparc32/sparcv9/mul_1.S b/sysdeps/sparc/sparc32/sparcv9/mul_1.S index 42284eada6..992d61b052 100644 --- a/sysdeps/sparc/sparc32/sparcv9/mul_1.S +++ b/sysdeps/sparc/sparc32/sparcv9/mul_1.S @@ -1 +1,70 @@ -#include <sparcv8/mul_1.S> +! SPARC v9 32-bit __mpn_mul_1 -- Multiply a limb vector with a single +! limb and store the product in a second limb vector. +! +! Copyright (C) 2013-2014 Free Software Foundation, Inc. +! This file is part of the GNU C Library. +! Contributed by David S. Miller <davem@davemloft.net> +! +! The GNU C Library is free software; you can redistribute it and/or +! modify it under the terms of the GNU Lesser General Public +! License as published by the Free Software Foundation; either +! version 2.1 of the License, or (at your option) any later version. +! +! The GNU C Library is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +! Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with the GNU C Library; if not, see +! <http://www.gnu.org/licenses/>. + +#include <sysdep.h> + +#define res_ptr %o0 +#define s1_ptr %o1 +#define sz %o2 +#define s2_limb %o3 +#define carry %o5 +#define tmp1 %g1 +#define tmp2 %g2 +#define tmp3 %g3 +#define tmp4 %o4 + +ENTRY(__mpn_mul_1) + srl sz, 0, sz + srl s2_limb, 0, s2_limb + subcc sz, 1, sz + be,pn %icc, .Lfinal_limb + clr carry + +.Lloop: + lduw [s1_ptr + 0x00], tmp1 + lduw [s1_ptr + 0x04], tmp2 + mulx tmp1, s2_limb, tmp3 + add s1_ptr, 8, s1_ptr + mulx tmp2, s2_limb, tmp4 + sub sz, 2, sz + add res_ptr, 8, res_ptr + add carry, tmp3, tmp3 + stw tmp3, [res_ptr - 0x08] + srlx tmp3, 32, carry + add carry, tmp4, tmp4 + stw tmp4, [res_ptr - 0x04] + brgz sz, .Lloop + srlx tmp4, 32, carry + + brlz,pt sz, .Lfinish + nop + +.Lfinal_limb: + lduw [s1_ptr + 0x00], tmp1 + mulx tmp1, s2_limb, tmp3 + add carry, tmp3, tmp3 + stw tmp3, [res_ptr + 0x00] + srlx tmp3, 32, carry + +.Lfinish: + retl + mov carry, %o0 +END(__mpn_mul_1) diff --git a/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile b/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile index 7358bdb167..4ad7aff914 100644 --- a/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile +++ b/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile @@ -1,3 +1,11 @@ +ifeq ($(subdir),crypt) +libcrypt-sysdep_routines += md5-crop sha256-crop sha512-crop +endif + +ifeq ($(subdir),locale) +localedef-aux += md5-crop +endif + ifeq ($(subdir),string) sysdep_routines += memcpy-ultra3 memcpy-niagara1 memcpy-niagara2 \ memset-niagara1 memcpy-niagara4 memset-niagara4 diff --git a/sysdeps/sparc/sparc32/sparcv9/multiarch/md5-block.c b/sysdeps/sparc/sparc32/sparcv9/multiarch/md5-block.c new file mode 100644 index 0000000000..3765cabae7 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/multiarch/md5-block.c @@ -0,0 +1 @@ +#include <sparc64/multiarch/md5-block.c> diff --git a/sysdeps/sparc/sparc32/sparcv9/multiarch/md5-crop.S b/sysdeps/sparc/sparc32/sparcv9/multiarch/md5-crop.S new file mode 100644 index 0000000000..11a3a81482 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/multiarch/md5-crop.S @@ -0,0 +1 @@ +#include <sparc64/multiarch/md5-crop.S> diff --git a/sysdeps/sparc/sparc32/sparcv9/multiarch/sha256-block.c b/sysdeps/sparc/sparc32/sparcv9/multiarch/sha256-block.c new file mode 100644 index 0000000000..600c602b61 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/multiarch/sha256-block.c @@ -0,0 +1 @@ +#include <sparc64/multiarch/sha256-block.c> diff --git a/sysdeps/sparc/sparc32/sparcv9/multiarch/sha256-crop.S b/sysdeps/sparc/sparc32/sparcv9/multiarch/sha256-crop.S new file mode 100644 index 0000000000..4895405853 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/multiarch/sha256-crop.S @@ -0,0 +1 @@ +#include <sparc64/multiarch/sha256-crop.S> diff --git a/sysdeps/sparc/sparc32/sparcv9/multiarch/sha512-block.c b/sysdeps/sparc/sparc32/sparcv9/multiarch/sha512-block.c new file mode 100644 index 0000000000..7c7c54e5a6 --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/multiarch/sha512-block.c @@ -0,0 +1 @@ +#include <sparc64/multiarch/sha512-block.c> diff --git a/sysdeps/sparc/sparc32/sparcv9/multiarch/sha512-crop.S b/sysdeps/sparc/sparc32/sparcv9/multiarch/sha512-crop.S new file mode 100644 index 0000000000..cc74a99d3c --- /dev/null +++ b/sysdeps/sparc/sparc32/sparcv9/multiarch/sha512-crop.S @@ -0,0 +1 @@ +#include <sparc64/multiarch/sha512-crop.S> diff --git a/sysdeps/sparc/sparc32/sparcv9/submul_1.S b/sysdeps/sparc/sparc32/sparcv9/submul_1.S index de69533f63..afd9a3b24c 100644 --- a/sysdeps/sparc/sparc32/sparcv9/submul_1.S +++ b/sysdeps/sparc/sparc32/sparcv9/submul_1.S @@ -1 +1,82 @@ -#include <sparcv8/submul_1.S> +! SPARC v9 32-bit __mpn_submul_1 -- Multiply a limb vector with a limb +! and subtract the result from a second limb vector. +! +! Copyright (C) 2013-2014 Free Software Foundation, Inc. +! This file is part of the GNU C Library. +! Contributed by David S. Miller <davem@davemloft.net> +! +! The GNU C Library is free software; you can redistribute it and/or +! modify it under the terms of the GNU Lesser General Public +! License as published by the Free Software Foundation; either +! version 2.1 of the License, or (at your option) any later version. +! +! The GNU C Library is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +! Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with the GNU C Library; if not, see +! <http://www.gnu.org/licenses/>. + +#include <sysdep.h> + +#define res_ptr %i0 +#define s1_ptr %i1 +#define sz_arg %i2 +#define s2l_arg %i3 +#define sz %o4 +#define carry %o5 +#define s2_limb %g1 +#define tmp1 %l0 +#define tmp2 %l1 +#define tmp3 %l2 +#define tmp4 %l3 +#define tmp64_1 %g3 +#define tmp64_2 %o3 + +ENTRY(__mpn_submul_1) + save %sp, -96, %sp + srl sz_arg, 0, sz + srl s2l_arg, 0, s2_limb + subcc sz, 1, sz + be,pn %icc, .Lfinal_limb + subcc %g0, 0, carry + +.Lloop: + lduw [s1_ptr + 0x00], tmp1 + lduw [res_ptr + 0x00], tmp3 + lduw [s1_ptr + 0x04], tmp2 + lduw [res_ptr + 0x04], tmp4 + mulx tmp1, s2_limb, tmp64_1 + add s1_ptr, 8, s1_ptr + mulx tmp2, s2_limb, tmp64_2 + sub sz, 2, sz + add res_ptr, 8, res_ptr + addx carry, tmp64_1, tmp64_1 + srlx tmp64_1, 32, carry + subcc tmp3, tmp64_1, tmp64_1 + stw tmp64_1, [res_ptr - 0x08] + addx carry, tmp64_2, tmp64_2 + srlx tmp64_2, 32, carry + subcc tmp4, tmp64_2, tmp64_2 + brgz sz, .Lloop + stw tmp64_2, [res_ptr - 0x04] + + brlz,pt sz, .Lfinish + nop + +.Lfinal_limb: + lduw [s1_ptr + 0x00], tmp1 + lduw [res_ptr + 0x00], tmp3 + mulx tmp1, s2_limb, tmp64_1 + addx carry, tmp64_1, tmp64_1 + srlx tmp64_1, 32, carry + subcc tmp3, tmp64_1, tmp64_1 + stw tmp64_1, [res_ptr + 0x00] + +.Lfinish: + addx carry, 0, carry + jmpl %i7 + 0x8, %g0 + restore carry, 0, %o0 +END(__mpn_submul_1) diff --git a/sysdeps/sparc/sparc32/stackguard-macros.h b/sysdeps/sparc/sparc32/stackguard-macros.h index c0b02b0bbd..1eef0f19f0 100644 --- a/sysdeps/sparc/sparc32/stackguard-macros.h +++ b/sysdeps/sparc/sparc32/stackguard-macros.h @@ -2,3 +2,6 @@ #define STACK_CHK_GUARD \ ({ uintptr_t x; asm ("ld [%%g7+0x14], %0" : "=r" (x)); x; }) + +#define POINTER_CHK_GUARD \ + ({ uintptr_t x; asm ("ld [%%g7+0x18], %0" : "=r" (x)); x; }) diff --git a/sysdeps/sparc/sparc32/start.S b/sysdeps/sparc/sparc32/start.S index 1efa8e8393..5c5490c8d6 100644 --- a/sysdeps/sparc/sparc32/start.S +++ b/sysdeps/sparc/sparc32/start.S @@ -1,6 +1,5 @@ /* Startup code for elf32-sparc - Copyright (C) 1997, 1998, 2002, 2004, 2007, 2009 - Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson <richard@gnu.ai.mit.edu>, 1997. diff --git a/sysdeps/sparc/sparc32/stpcpy.S b/sysdeps/sparc/sparc32/stpcpy.S index b93b94c3d2..c7e649d507 100644 --- a/sysdeps/sparc/sparc32/stpcpy.S +++ b/sysdeps/sparc/sparc32/stpcpy.S @@ -1,6 +1,6 @@ /* Copy SRC to DEST returning the address of the terminating '\0' in DEST. For SPARC v7. - Copyright (C) 1996, 1999, 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 1996-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jj@ultra.linux.cz>. diff --git a/sysdeps/sparc/sparc32/strcat.S b/sysdeps/sparc/sparc32/strcat.S index de5369e444..aef7a908c6 100644 --- a/sysdeps/sparc/sparc32/strcat.S +++ b/sysdeps/sparc/sparc32/strcat.S @@ -1,6 +1,6 @@ /* strcat (dest, src) -- Append SRC on the end of DEST. For SPARC v7. - Copyright (C) 1996, 1999, 2003 Free Software Foundation, Inc. + Copyright (C) 1996-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jj@ultra.linux.cz>. diff --git a/sysdeps/sparc/sparc32/strchr.S b/sysdeps/sparc/sparc32/strchr.S index f2ee2d2ea9..a8467f9d82 100644 --- a/sysdeps/sparc/sparc32/strchr.S +++ b/sysdeps/sparc/sparc32/strchr.S @@ -1,6 +1,6 @@ /* strchr (str, ch) -- Return pointer to first occurrence of CH in STR. For SPARC v7. - Copyright (C) 1996, 1999, 2003 Free Software Foundation, Inc. + Copyright (C) 1996-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jj@ultra.linux.cz> and David S. Miller <davem@caip.rutgers.edu>. @@ -92,13 +92,13 @@ ENTRY(strchr) #else sub %g5, %o2, %g5 #endif - or %g5, %o4, %o4 + or %g5, %o4, %o4 andcc %o4, %o3, %g0 be 7b add %o0, 4, %o0 /* Check every byte. */ -8: srl %g4, 24, %g5 +8: srl %g4, 24, %g5 7: andcc %g5, 0xff, %g5 be 9f cmp %g5, %o1 @@ -243,13 +243,13 @@ ENTRY(strrchr) #else sub %g5, %o2, %g5 #endif - or %g5, %o4, %o4 + or %g5, %o4, %o4 andcc %o4, %o3, %g0 be 6b add %o0, 4, %o0 /* Check every byte. */ -3: srl %g4, 24, %g5 +3: srl %g4, 24, %g5 8: andcc %g5, 0xff, %g5 be 9f cmp %g5, %o1 diff --git a/sysdeps/sparc/sparc32/strcmp.S b/sysdeps/sparc/sparc32/strcmp.S index efeb3232a2..8373f45aba 100644 --- a/sysdeps/sparc/sparc32/strcmp.S +++ b/sysdeps/sparc/sparc32/strcmp.S @@ -1,6 +1,6 @@ /* Compare two strings for differences. For SPARC v7. - Copyright (C) 1996, 97, 99, 2003 Free Software Foundation, Inc. + Copyright (C) 1996-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jj@ultra.linux.cz>. diff --git a/sysdeps/sparc/sparc32/strcpy.S b/sysdeps/sparc/sparc32/strcpy.S index ccae638ad1..3cd2395fba 100644 --- a/sysdeps/sparc/sparc32/strcpy.S +++ b/sysdeps/sparc/sparc32/strcpy.S @@ -1,6 +1,6 @@ /* Copy SRC to DEST returning DEST. For SPARC v7. - Copyright (C) 1996, 1999, 2003 Free Software Foundation, Inc. + Copyright (C) 1996-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jj@ultra.linux.cz>. diff --git a/sysdeps/sparc/sparc32/strlen.S b/sysdeps/sparc/sparc32/strlen.S index ae8c6f3cf0..75a246072f 100644 --- a/sysdeps/sparc/sparc32/strlen.S +++ b/sysdeps/sparc/sparc32/strlen.S @@ -1,6 +1,6 @@ /* Determine the length of a string. For SPARC v7. - Copyright (C) 1996, 1999, 2003, 2010 Free Software Foundation, Inc. + Copyright (C) 1996-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jj@ultra.linux.cz> and David S. Miller <davem@davemloft.net>. diff --git a/sysdeps/sparc/sparc32/sub_n.S b/sysdeps/sparc/sparc32/sub_n.S index 050566dc48..c9895368b7 100644 --- a/sysdeps/sparc/sparc32/sub_n.S +++ b/sysdeps/sparc/sparc32/sub_n.S @@ -1,7 +1,7 @@ ! SPARC __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and ! store difference in a third limb vector. ! -! Copyright (C) 1995, 1996 Free Software Foundation, Inc. +! Copyright (C) 1995-2014 Free Software Foundation, Inc. ! ! This file is part of the GNU MP Library. ! diff --git a/sysdeps/sparc/sparc32/submul_1.S b/sysdeps/sparc/sparc32/submul_1.S index e101633de9..24812a9269 100644 --- a/sysdeps/sparc/sparc32/submul_1.S +++ b/sysdeps/sparc/sparc32/submul_1.S @@ -1,7 +1,7 @@ ! SPARC __mpn_submul_1 -- Multiply a limb vector with a limb and subtract ! the result from a second limb vector. ! -! Copyright (C) 1992, 1993, 1994, 1997 Free Software Foundation, Inc. +! Copyright (C) 1992-2014 Free Software Foundation, Inc. ! ! This file is part of the GNU MP Library. ! diff --git a/sysdeps/sparc/sparc32/tst-audit.h b/sysdeps/sparc/sparc32/tst-audit.h index f3aaf13d88..e95838326d 100644 --- a/sysdeps/sparc/sparc32/tst-audit.h +++ b/sysdeps/sparc/sparc32/tst-audit.h @@ -1,6 +1,6 @@ /* Definitions for testing PLT entry/exit auditing. SPARC32 version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/sysdeps/sparc/sparc32/udiv.S b/sysdeps/sparc/sparc32/udiv.S index 0dd48f32b5..8dfff66158 100644 --- a/sysdeps/sparc/sparc32/udiv.S +++ b/sysdeps/sparc/sparc32/udiv.S @@ -168,14 +168,14 @@ LOC(divloop): subcc %o3,%o5,%o3 b 9f add %o2, (7*2+1), %o2 - + LOC(4.23): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (7*2-1), %o2 - - + + LOC(3.19): ! remainder is negative addcc %o3,%o5,%o3 @@ -186,15 +186,15 @@ LOC(3.19): subcc %o3,%o5,%o3 b 9f add %o2, (5*2+1), %o2 - + LOC(4.21): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (5*2-1), %o2 - - - + + + LOC(2.17): ! remainder is negative addcc %o3,%o5,%o3 @@ -210,14 +210,14 @@ LOC(2.17): subcc %o3,%o5,%o3 b 9f add %o2, (3*2+1), %o2 - + LOC(4.19): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (3*2-1), %o2 - - + + LOC(3.17): ! remainder is negative addcc %o3,%o5,%o3 @@ -228,16 +228,16 @@ LOC(3.17): subcc %o3,%o5,%o3 b 9f add %o2, (1*2+1), %o2 - + LOC(4.17): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (1*2-1), %o2 - - - - + + + + LOC(1.16): ! remainder is negative addcc %o3,%o5,%o3 @@ -258,14 +258,14 @@ LOC(1.16): subcc %o3,%o5,%o3 b 9f add %o2, (-1*2+1), %o2 - + LOC(4.15): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (-1*2-1), %o2 - - + + LOC(3.15): ! remainder is negative addcc %o3,%o5,%o3 @@ -276,15 +276,15 @@ LOC(3.15): subcc %o3,%o5,%o3 b 9f add %o2, (-3*2+1), %o2 - + LOC(4.13): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (-3*2-1), %o2 - - - + + + LOC(2.15): ! remainder is negative addcc %o3,%o5,%o3 @@ -300,14 +300,14 @@ LOC(2.15): subcc %o3,%o5,%o3 b 9f add %o2, (-5*2+1), %o2 - + LOC(4.11): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (-5*2-1), %o2 - - + + LOC(3.13): ! remainder is negative addcc %o3,%o5,%o3 @@ -318,16 +318,16 @@ LOC(3.13): subcc %o3,%o5,%o3 b 9f add %o2, (-7*2+1), %o2 - + LOC(4.9): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (-7*2-1), %o2 - - - - + + + + 9: LOC(end_regular_divide): subcc %o4, 1, %o4 diff --git a/sysdeps/sparc/sparc32/urem.S b/sysdeps/sparc/sparc32/urem.S index 5644e7a892..d3a1a441fd 100644 --- a/sysdeps/sparc/sparc32/urem.S +++ b/sysdeps/sparc/sparc32/urem.S @@ -168,14 +168,14 @@ LOC(divloop): subcc %o3,%o5,%o3 b 9f add %o2, (7*2+1), %o2 - + LOC(4.23): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (7*2-1), %o2 - - + + LOC(3.19): ! remainder is negative addcc %o3,%o5,%o3 @@ -186,15 +186,15 @@ LOC(3.19): subcc %o3,%o5,%o3 b 9f add %o2, (5*2+1), %o2 - + LOC(4.21): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (5*2-1), %o2 - - - + + + LOC(2.17): ! remainder is negative addcc %o3,%o5,%o3 @@ -210,14 +210,14 @@ LOC(2.17): subcc %o3,%o5,%o3 b 9f add %o2, (3*2+1), %o2 - + LOC(4.19): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (3*2-1), %o2 - - + + LOC(3.17): ! remainder is negative addcc %o3,%o5,%o3 @@ -228,16 +228,16 @@ LOC(3.17): subcc %o3,%o5,%o3 b 9f add %o2, (1*2+1), %o2 - + LOC(4.17): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (1*2-1), %o2 - - - - + + + + LOC(1.16): ! remainder is negative addcc %o3,%o5,%o3 @@ -258,14 +258,14 @@ LOC(1.16): subcc %o3,%o5,%o3 b 9f add %o2, (-1*2+1), %o2 - + LOC(4.15): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (-1*2-1), %o2 - - + + LOC(3.15): ! remainder is negative addcc %o3,%o5,%o3 @@ -276,15 +276,15 @@ LOC(3.15): subcc %o3,%o5,%o3 b 9f add %o2, (-3*2+1), %o2 - + LOC(4.13): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (-3*2-1), %o2 - - - + + + LOC(2.15): ! remainder is negative addcc %o3,%o5,%o3 @@ -300,14 +300,14 @@ LOC(2.15): subcc %o3,%o5,%o3 b 9f add %o2, (-5*2+1), %o2 - + LOC(4.11): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (-5*2-1), %o2 - - + + LOC(3.13): ! remainder is negative addcc %o3,%o5,%o3 @@ -318,16 +318,16 @@ LOC(3.13): subcc %o3,%o5,%o3 b 9f add %o2, (-7*2+1), %o2 - + LOC(4.9): ! remainder is negative addcc %o3,%o5,%o3 b 9f add %o2, (-7*2-1), %o2 - - - - + + + + 9: LOC(end_regular_divide): subcc %o4, 1, %o4 |