diff options
author | tege <tege@gmplib.org> | 2000-03-03 18:53:36 +0100 |
---|---|---|
committer | tege <tege@gmplib.org> | 2000-03-03 18:53:36 +0100 |
commit | dbf002026b9bb9aa86c3bc16c40798d1e92a6ec4 (patch) | |
tree | 0f7f9e753b77bed138ae7794450b4dada1101486 /mpn/powerpc32 | |
parent | 8bf8ea3d6e94cfe8bfc40e24a4ea027538eaef22 (diff) | |
download | gmp-dbf002026b9bb9aa86c3bc16c40798d1e92a6ec4.tar.gz |
Misc cleanups.
Diffstat (limited to 'mpn/powerpc32')
-rw-r--r-- | mpn/powerpc32/add_n.asm | 27 | ||||
-rw-r--r-- | mpn/powerpc32/addmul_1.asm | 14 | ||||
-rw-r--r-- | mpn/powerpc32/lshift.asm | 13 | ||||
-rw-r--r-- | mpn/powerpc32/mul_1.asm | 17 | ||||
-rw-r--r-- | mpn/powerpc32/rshift.asm | 13 | ||||
-rw-r--r-- | mpn/powerpc32/sub_n.asm | 29 | ||||
-rw-r--r-- | mpn/powerpc32/submul_1.asm | 14 | ||||
-rw-r--r-- | mpn/powerpc32/umul.asm | 13 |
8 files changed, 71 insertions, 69 deletions
diff --git a/mpn/powerpc32/add_n.asm b/mpn/powerpc32/add_n.asm index c580da2ad..2f11c9922 100644 --- a/mpn/powerpc32/add_n.asm +++ b/mpn/powerpc32/add_n.asm @@ -1,25 +1,26 @@ # PowerPC-32 mpn_add_n -- Add two limb vectors of the same length > 0 and # store sum in a third limb vector. -# -# Copyright (C) 1995, 1997 Free Software Foundation, Inc. -# + +# Copyright (C) 1995, 1997, 2000 Free Software Foundation, Inc. + # This file is part of the GNU MP Library. -# + # The GNU MP Library is free software; you can redistribute it and/or modify # it under the terms of the GNU Library General Public License as published by # the Free Software Foundation; either version 2 of the License, or (at your # option) any later version. -# + # The GNU MP 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 Library General Public # License for more details. -# + # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. + # INPUT PARAMETERS # res_ptr r3 # s1_ptr r4 @@ -35,26 +36,24 @@ PROLOGUE(mpn_add_n) lwz r8,0(r4) # load least significant s1 limb lwz r0,0(r5) # load least significant s2 limb addi r3,r3,-4 # offset res_ptr, it's updated before it's used - bdz L(end) # If done, skip loop -L(loop): - lwz r9,4(r4) # load s1 limb + bdz .Lend # If done, skip loop +.Loop: lwz r9,4(r4) # load s1 limb lwz r10,4(r5) # load s2 limb adde r7,r0,r8 # add limbs with cy, set cy stw r7,4(r3) # store result limb - bdz L(exit) # decrement CTR and exit if done + bdz .Lexit # decrement CTR and exit if done lwzu r8,8(r4) # load s1 limb and update s1_ptr lwzu r0,8(r5) # load s2 limb and update s2_ptr adde r7,r10,r9 # add limbs with cy, set cy stwu r7,8(r3) # store result limb and update res_ptr - bdnz L(loop) # decrement CTR and loop back + bdnz .Loop # decrement CTR and loop back -L(end): adde r7,r0,r8 +.Lend: adde r7,r0,r8 stw r7,4(r3) # store ultimate result limb li r3,0 # load cy into ... addze r3,r3 # ... return value register blr -L(exit): - adde r7,r10,r9 +.Lexit: adde r7,r10,r9 stw r7,8(r3) li r3,0 # load cy into ... addze r3,r3 # ... return value register diff --git a/mpn/powerpc32/addmul_1.asm b/mpn/powerpc32/addmul_1.asm index 85b75f12d..80f07d6ad 100644 --- a/mpn/powerpc32/addmul_1.asm +++ b/mpn/powerpc32/addmul_1.asm @@ -1,20 +1,20 @@ -# PowerPC-32 __mpn_addmul_1 -- Multiply a limb vector with a limb and add +# PowerPC-32 mpn_addmul_1 -- Multiply a limb vector with a limb and add # the result to a second limb vector. -# -# Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc. -# + +# Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc. + # This file is part of the GNU MP Library. -# + # The GNU MP Library is free software; you can redistribute it and/or modify # it under the terms of the GNU Library General Public License as published by # the Free Software Foundation; either version 2 of the License, or (at your # option) any later version. -# + # The GNU MP 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 Library General Public # License for more details. -# + # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, diff --git a/mpn/powerpc32/lshift.asm b/mpn/powerpc32/lshift.asm index a0680dbca..e624e46ba 100644 --- a/mpn/powerpc32/lshift.asm +++ b/mpn/powerpc32/lshift.asm @@ -1,24 +1,25 @@ # PowerPC-32 mpn_lshift -- Shift a number left. -# -# Copyright (C) 1995, 1998 Free Software Foundation, Inc. -# + +# Copyright (C) 1995, 1998, 2000 Free Software Foundation, Inc. + # This file is part of the GNU MP Library. -# + # The GNU MP Library is free software; you can redistribute it and/or modify # it under the terms of the GNU Library General Public License as published by # the Free Software Foundation; either version 2 of the License, or (at your # option) any later version. -# + # The GNU MP 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 Library General Public # License for more details. -# + # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. + # INPUT PARAMETERS # res_ptr r3 # s1_ptr r4 diff --git a/mpn/powerpc32/mul_1.asm b/mpn/powerpc32/mul_1.asm index c090a827a..dae8e675b 100644 --- a/mpn/powerpc32/mul_1.asm +++ b/mpn/powerpc32/mul_1.asm @@ -1,31 +1,32 @@ -# PowerPC-32 __mpn_mul_1 -- Multiply a limb vector with a limb and store +# PowerPC-32 mpn_mul_1 -- Multiply a limb vector with a limb and store # the result in a second limb vector. -# -# Copyright (C) 1995, 1997 Free Software Foundation, Inc. -# + +# Copyright (C) 1995, 1997, 2000 Free Software Foundation, Inc. + # This file is part of the GNU MP Library. -# + # The GNU MP Library is free software; you can redistribute it and/or modify # it under the terms of the GNU Library General Public License as published by # the Free Software Foundation; either version 2 of the License, or (at your # option) any later version. -# + # The GNU MP 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 Library General Public # License for more details. -# + # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. + # INPUT PARAMETERS # res_ptr r3 # s1_ptr r4 # size r5 # s2_limb r6 -# + # This is optimized for the PPC604 but it runs decently even on PPC601. It # has not been tested on a PPC603 since I don't have access to any such # machines. diff --git a/mpn/powerpc32/rshift.asm b/mpn/powerpc32/rshift.asm index 3b111cb02..6ac3de6a2 100644 --- a/mpn/powerpc32/rshift.asm +++ b/mpn/powerpc32/rshift.asm @@ -1,24 +1,25 @@ # PowerPC-32 mpn_rshift -- Shift a number right. -# -# Copyright (C) 1995 Free Software Foundation, Inc. -# + +# Copyright (C) 1995, 2000 Free Software Foundation, Inc. + # This file is part of the GNU MP Library. -# + # The GNU MP Library is free software; you can redistribute it and/or modify # it under the terms of the GNU Library General Public License as published by # the Free Software Foundation; either version 2 of the License, or (at your # option) any later version. -# + # The GNU MP 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 Library General Public # License for more details. -# + # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. + # INPUT PARAMETERS # res_ptr r3 # s1_ptr r4 diff --git a/mpn/powerpc32/sub_n.asm b/mpn/powerpc32/sub_n.asm index 8d91d8dd7..a368b4ddd 100644 --- a/mpn/powerpc32/sub_n.asm +++ b/mpn/powerpc32/sub_n.asm @@ -1,25 +1,26 @@ -# PowerPC-32 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 +# PowerPC-32 mpn_sub_n -- Subtract two limb vectors of the same length > 0 # and store difference in a third limb vector. -# -# Copyright (C) 1995, 1997 Free Software Foundation, Inc. -# + +# Copyright (C) 1995, 1997, 2000 Free Software Foundation, Inc. + # This file is part of the GNU MP Library. -# + # The GNU MP Library is free software; you can redistribute it and/or modify # it under the terms of the GNU Library General Public License as published by # the Free Software Foundation; either version 2 of the License, or (at your # option) any later version. -# + # The GNU MP 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 Library General Public # License for more details. -# + # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. + # INPUT PARAMETERS # res_ptr r3 # s1_ptr r4 @@ -35,26 +36,24 @@ PROLOGUE(mpn_sub_n) lwz r8,0(r4) # load least significant s1 limb lwz r0,0(r5) # load least significant s2 limb addi r3,r3,-4 # offset res_ptr, it's updated before it's used - bdz L(end) # If done, skip loop -L(loop): - lwz r9,4(r4) # load s1 limb + bdz .Lend # If done, skip loop +.Loop: lwz r9,4(r4) # load s1 limb lwz r10,4(r5) # load s2 limb subfe r7,r0,r8 # subtract limbs with cy, set cy stw r7,4(r3) # store result limb - bdz L(exit) # decrement CTR and exit if done + bdz .Lexit # decrement CTR and exit if done lwzu r8,8(r4) # load s1 limb and update s1_ptr lwzu r0,8(r5) # load s2 limb and update s2_ptr subfe r7,r10,r9 # subtract limbs with cy, set cy stwu r7,8(r3) # store result limb and update res_ptr - bdnz L(loop) # decrement CTR and loop back + bdnz .Loop # decrement CTR and loop back -L(end): subfe r7,r0,r8 +.Lend: subfe r7,r0,r8 stw r7,4(r3) # store ultimate result limb subfe r3,r0,r0 # load !cy into ... subfic r3,r3,0 # ... return value register blr -L(exit): - subfe r7,r10,r9 +.Lexit: subfe r7,r10,r9 stw r7,8(r3) subfe r3,r0,r0 # load !cy into ... subfic r3,r3,0 # ... return value register diff --git a/mpn/powerpc32/submul_1.asm b/mpn/powerpc32/submul_1.asm index d48fbe293..f7de6fd3c 100644 --- a/mpn/powerpc32/submul_1.asm +++ b/mpn/powerpc32/submul_1.asm @@ -1,20 +1,20 @@ -# PowerPC-32 __mpn_submul_1 -- Multiply a limb vector with a limb and subtract +# PowerPC-32 mpn_submul_1 -- Multiply a limb vector with a limb and subtract # the result from a second limb vector. -# -# Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc. -# + +# Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc. + # This file is part of the GNU MP Library. -# + # The GNU MP Library is free software; you can redistribute it and/or modify # it under the terms of the GNU Library General Public License as published by # the Free Software Foundation; either version 2 of the License, or (at your # option) any later version. -# + # The GNU MP 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 Library General Public # License for more details. -# + # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, diff --git a/mpn/powerpc32/umul.asm b/mpn/powerpc32/umul.asm index 40bcca43f..dd4e2ef57 100644 --- a/mpn/powerpc32/umul.asm +++ b/mpn/powerpc32/umul.asm @@ -1,24 +1,25 @@ -# PowerPC-32 umul_ppmm -- suport for longlong.h -# +# PowerPC-32 umul_ppmm -- support for longlong.h + # Copyright (C) 2000 Free Software Foundation, Inc. -# + # This file is part of the GNU MP Library. -# + # The GNU MP Library is free software; you can redistribute it and/or modify # it under the terms of the GNU Library General Public License as published by # the Free Software Foundation; either version 2 of the License, or (at your # option) any later version. -# + # The GNU MP 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 Library General Public # License for more details. -# + # You should have received a copy of the GNU Library General Public License # along with the GNU MP Library; see the file COPYING.LIB. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA. + include(`../config.m4') ASM_START() |