diff options
author | Kevin Ryde <user42@zip.com.au> | 2001-04-11 01:56:47 +0200 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2001-04-11 01:56:47 +0200 |
commit | 61ebf7d203e37962f2717d747acddbe268053cf1 (patch) | |
tree | a54e3e1673eef1226d48338efb951b1139b84e82 /mpn | |
parent | 2d4b25da968a82d4981a35c293571e0488d06fa3 (diff) | |
download | gmp-61ebf7d203e37962f2717d747acddbe268053cf1.tar.gz |
* mpn/m68k/*.S,*/*.S: Remove files.
Diffstat (limited to 'mpn')
-rw-r--r-- | mpn/m68k/add_n.S | 79 | ||||
-rw-r--r-- | mpn/m68k/lshift.S | 150 | ||||
-rw-r--r-- | mpn/m68k/mc68020/addmul_1.S | 83 | ||||
-rw-r--r-- | mpn/m68k/mc68020/mul_1.S | 90 | ||||
-rw-r--r-- | mpn/m68k/mc68020/submul_1.S | 83 | ||||
-rw-r--r-- | mpn/m68k/mc68020/udiv.S | 31 | ||||
-rw-r--r-- | mpn/m68k/mc68020/umul.S | 31 | ||||
-rw-r--r-- | mpn/m68k/rshift.S | 149 | ||||
-rw-r--r-- | mpn/m68k/sub_n.S | 79 |
9 files changed, 0 insertions, 775 deletions
diff --git a/mpn/m68k/add_n.S b/mpn/m68k/add_n.S deleted file mode 100644 index 033b806cc..000000000 --- a/mpn/m68k/add_n.S +++ /dev/null @@ -1,79 +0,0 @@ -/* mc68020 __gmpn_add_n -- Add two limb vectors of the same length > 0 and store - sum in a third limb vector. - -Copyright 1992, 1994, 1996, 1999, 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 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 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 Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser 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 (sp + 4) - s1_ptr (sp + 8) - s2_ptr (sp + 16) - size (sp + 12) -*/ - -#include "asm-syntax.h" - - TEXT - ALIGN - GLOBL C_SYMBOL_NAME(__gmpn_add_n) - -C_SYMBOL_NAME(__gmpn_add_n:) -PROLOG(__gmpn_add_n) -/* Save used registers on the stack. */ - movel R(d2),MEM_PREDEC(sp) - movel R(a2),MEM_PREDEC(sp) - -/* Copy the arguments to registers. Better use movem? */ - movel MEM_DISP(sp,12),R(a2) - movel MEM_DISP(sp,16),R(a0) - movel MEM_DISP(sp,20),R(a1) - movel MEM_DISP(sp,24),R(d2) - - eorw #1,R(d2) - lsrl #1,R(d2) - bcc L(L1) - subql #1,R(d2) /* clears cy as side effect */ - -L(Loop:) - movel MEM_POSTINC(a0),R(d0) - movel MEM_POSTINC(a1),R(d1) - addxl R(d1),R(d0) - movel R(d0),MEM_POSTINC(a2) -L(L1:) movel MEM_POSTINC(a0),R(d0) - movel MEM_POSTINC(a1),R(d1) - addxl R(d1),R(d0) - movel R(d0),MEM_POSTINC(a2) - - dbf R(d2),L(Loop) /* loop until 16 lsb of %4 == -1 */ - subxl R(d0),R(d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */ - subl #0x10000,R(d2) - bcs L(L2) - addl R(d0),R(d0) /* restore cy */ - bra L(Loop) - -L(L2:) - negl R(d0) - -/* Restore used registers from stack frame. */ - movel MEM_POSTINC(sp),R(a2) - movel MEM_POSTINC(sp),R(d2) - - rts -EPILOG(__gmpn_add_n) diff --git a/mpn/m68k/lshift.S b/mpn/m68k/lshift.S deleted file mode 100644 index c7f00541e..000000000 --- a/mpn/m68k/lshift.S +++ /dev/null @@ -1,150 +0,0 @@ -/* mc68020 __gmpn_lshift -- Shift left a low-level natural-number integer. - -Copyright 1996, 1999, 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 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 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 Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser 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 (sp + 4) - s_ptr (sp + 8) - s_size (sp + 16) - cnt (sp + 12) -*/ - -#include "asm-syntax.h" - -#define res_ptr a1 -#define s_ptr a0 -#define s_size d6 -#define cnt d4 - - TEXT - ALIGN - GLOBL C_SYMBOL_NAME(__gmpn_lshift) - -C_SYMBOL_NAME(__gmpn_lshift:) -PROLOG(__gmpn_lshift) - -/* Save used registers on the stack. */ - moveml R(d2)-R(d6)/R(a2),MEM_PREDEC(sp) - -/* Copy the arguments to registers. */ - movel MEM_DISP(sp,28),R(res_ptr) - movel MEM_DISP(sp,32),R(s_ptr) - movel MEM_DISP(sp,36),R(s_size) - movel MEM_DISP(sp,40),R(cnt) - - moveql #1,R(d5) - cmpl R(d5),R(cnt) - bne L(Lnormal) - cmpl R(s_ptr),R(res_ptr) - bls L(Lspecial) /* jump if s_ptr >= res_ptr */ -#if (defined (__mc68020__) || defined (__NeXT__) || defined(mc68020)) - lea MEM_INDX1(s_ptr,s_size,l,4),R(a2) -#else /* not mc68020 */ - movel R(s_size),R(d0) - asll #2,R(d0) - lea MEM_INDX(s_ptr,d0,l),R(a2) -#endif - cmpl R(res_ptr),R(a2) - bls L(Lspecial) /* jump if res_ptr >= s_ptr + s_size */ - -L(Lnormal:) - moveql #32,R(d5) - subl R(cnt),R(d5) - -#if (defined (__mc68020__) || defined (__NeXT__) || defined(mc68020)) - lea MEM_INDX1(s_ptr,s_size,l,4),R(s_ptr) - lea MEM_INDX1(res_ptr,s_size,l,4),R(res_ptr) -#else /* not mc68000 */ - movel R(s_size),R(d0) - asll #2,R(d0) - addl R(s_size),R(s_ptr) - addl R(s_size),R(res_ptr) -#endif - movel MEM_PREDEC(s_ptr),R(d2) - movel R(d2),R(d0) - lsrl R(d5),R(d0) /* compute carry limb */ - - lsll R(cnt),R(d2) - movel R(d2),R(d1) - subql #1,R(s_size) - beq L(Lend) - lsrl #1,R(s_size) - bcs L(L1) - subql #1,R(s_size) - -L(Loop:) - movel MEM_PREDEC(s_ptr),R(d2) - movel R(d2),R(d3) - lsrl R(d5),R(d3) - orl R(d3),R(d1) - movel R(d1),MEM_PREDEC(res_ptr) - lsll R(cnt),R(d2) -L(L1:) - movel MEM_PREDEC(s_ptr),R(d1) - movel R(d1),R(d3) - lsrl R(d5),R(d3) - orl R(d3),R(d2) - movel R(d2),MEM_PREDEC(res_ptr) - lsll R(cnt),R(d1) - - dbf R(s_size),L(Loop) - subl #0x10000,R(s_size) - bcc L(Loop) - -L(Lend:) - movel R(d1),MEM_PREDEC(res_ptr) /* store least significant limb */ - -/* Restore used registers from stack frame. */ - moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2) - rts - -/* We loop from least significant end of the arrays, which is only - permissable if the source and destination don't overlap, since the - function is documented to work for overlapping source and destination. */ - -L(Lspecial:) - clrl R(d0) /* initialize carry */ - eorw #1,R(s_size) - lsrl #1,R(s_size) - bcc L(LL1) - subql #1,R(s_size) - -L(LLoop:) - movel MEM_POSTINC(s_ptr),R(d2) - addxl R(d2),R(d2) - movel R(d2),MEM_POSTINC(res_ptr) -L(LL1:) - movel MEM_POSTINC(s_ptr),R(d2) - addxl R(d2),R(d2) - movel R(d2),MEM_POSTINC(res_ptr) - - dbf R(s_size),L(LLoop) - addxl R(d0),R(d0) /* save cy in lsb */ - subl #0x10000,R(s_size) - bcs L(LLend) - lsrl #1,R(d0) /* restore cy */ - bra L(LLoop) - -L(LLend:) -/* Restore used registers from stack frame. */ - moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2) - rts -EPILOG(__gmpn_lshift) diff --git a/mpn/m68k/mc68020/addmul_1.S b/mpn/m68k/mc68020/addmul_1.S deleted file mode 100644 index 4d6785bcf..000000000 --- a/mpn/m68k/mc68020/addmul_1.S +++ /dev/null @@ -1,83 +0,0 @@ -/* mc68020 __gmpn_addmul_1 -- Multiply a limb vector with a limb and add - the result to a second limb vector. - -Copyright 1992, 1994, 1996, 1999, 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 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 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 Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser 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 (sp + 4) - s1_ptr (sp + 8) - s1_size (sp + 12) - s2_limb (sp + 16) -*/ - -#include "asm-syntax.h" - - TEXT - ALIGN - GLOBL C_SYMBOL_NAME(__gmpn_addmul_1) - -C_SYMBOL_NAME(__gmpn_addmul_1:) -PROLOG(__gmpn_addmul_1) - -#define res_ptr a0 -#define s1_ptr a1 -#define s1_size d2 -#define s2_limb d4 - -/* Save used registers on the stack. */ - moveml R(d2)-R(d5),MEM_PREDEC(sp) - -/* Copy the arguments to registers. Better use movem? */ - movel MEM_DISP(sp,20),R(res_ptr) - movel MEM_DISP(sp,24),R(s1_ptr) - movel MEM_DISP(sp,28),R(s1_size) - movel MEM_DISP(sp,32),R(s2_limb) - - eorw #1,R(s1_size) - clrl R(d1) - clrl R(d5) - lsrl #1,R(s1_size) - bcc L(L1) - subql #1,R(s1_size) - subl R(d0),R(d0) /* (d0,cy) <= (0,0) */ - -L(Loop:) - movel MEM_POSTINC(s1_ptr),R(d3) - mulul R(s2_limb),R(d1):R(d3) - addxl R(d0),R(d3) - addxl R(d5),R(d1) - addl R(d3),MEM_POSTINC(res_ptr) -L(L1:) movel MEM_POSTINC(s1_ptr),R(d3) - mulul R(s2_limb),R(d0):R(d3) - addxl R(d1),R(d3) - addxl R(d5),R(d0) - addl R(d3),MEM_POSTINC(res_ptr) - - dbf R(s1_size),L(Loop) - addxl R(d5),R(d0) - subl #0x10000,R(s1_size) - bcc L(Loop) - -/* Restore used registers from stack frame. */ - moveml MEM_POSTINC(sp),R(d2)-R(d5) - - rts -EPILOG(__gmpn_addmul_1) diff --git a/mpn/m68k/mc68020/mul_1.S b/mpn/m68k/mc68020/mul_1.S deleted file mode 100644 index 2275e4376..000000000 --- a/mpn/m68k/mc68020/mul_1.S +++ /dev/null @@ -1,90 +0,0 @@ -/* mc68020 __gmpn_mul_1 -- Multiply a limb vector with a limb and store - the result in a second limb vector. - -Copyright 1992, 1994, 1996, 1999, 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 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 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 Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser 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 (sp + 4) - s1_ptr (sp + 8) - s1_size (sp + 12) - s2_limb (sp + 16) -*/ - -#include "asm-syntax.h" - - TEXT - ALIGN - GLOBL C_SYMBOL_NAME(__gmpn_mul_1) - -C_SYMBOL_NAME(__gmpn_mul_1:) -PROLOG(__gmpn_mul_1) - -#define res_ptr a0 -#define s1_ptr a1 -#define s1_size d2 -#define s2_limb d4 - -/* Save used registers on the stack. */ - moveml R(d2)-R(d4),MEM_PREDEC(sp) -#if 0 - movel R(d2),MEM_PREDEC(sp) - movel R(d3),MEM_PREDEC(sp) - movel R(d4),MEM_PREDEC(sp) -#endif - -/* Copy the arguments to registers. Better use movem? */ - movel MEM_DISP(sp,16),R(res_ptr) - movel MEM_DISP(sp,20),R(s1_ptr) - movel MEM_DISP(sp,24),R(s1_size) - movel MEM_DISP(sp,28),R(s2_limb) - - eorw #1,R(s1_size) - clrl R(d1) - lsrl #1,R(s1_size) - bcc L(L1) - subql #1,R(s1_size) - subl R(d0),R(d0) /* (d0,cy) <= (0,0) */ - -L(Loop:) - movel MEM_POSTINC(s1_ptr),R(d3) - mulul R(s2_limb),R(d1):R(d3) - addxl R(d0),R(d3) - movel R(d3),MEM_POSTINC(res_ptr) -L(L1:) movel MEM_POSTINC(s1_ptr),R(d3) - mulul R(s2_limb),R(d0):R(d3) - addxl R(d1),R(d3) - movel R(d3),MEM_POSTINC(res_ptr) - - dbf R(s1_size),L(Loop) - clrl R(d3) - addxl R(d3),R(d0) - subl #0x10000,R(s1_size) - bcc L(Loop) - -/* Restore used registers from stack frame. */ - moveml MEM_POSTINC(sp),R(d2)-R(d4) -#if 0 - movel MEM_POSTINC(sp),R(d4) - movel MEM_POSTINC(sp),R(d3) - movel MEM_POSTINC(sp),R(d2) -#endif - rts -EPILOG(__gmpn_mul_1) diff --git a/mpn/m68k/mc68020/submul_1.S b/mpn/m68k/mc68020/submul_1.S deleted file mode 100644 index 2b3ddab5c..000000000 --- a/mpn/m68k/mc68020/submul_1.S +++ /dev/null @@ -1,83 +0,0 @@ -/* mc68020 __gmpn_submul_1 -- Multiply a limb vector with a limb and subtract - the result from a second limb vector. - -Copyright 1992, 1994, 1996, 1999, 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 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 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 Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser 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 (sp + 4) - s1_ptr (sp + 8) - s1_size (sp + 12) - s2_limb (sp + 16) -*/ - -#include "asm-syntax.h" - - TEXT - ALIGN - GLOBL C_SYMBOL_NAME(__gmpn_submul_1) - -C_SYMBOL_NAME(__gmpn_submul_1:) -PROLOG(__gmpn_submul_1) - -#define res_ptr a0 -#define s1_ptr a1 -#define s1_size d2 -#define s2_limb d4 - -/* Save used registers on the stack. */ - moveml R(d2)-R(d5),MEM_PREDEC(sp) - -/* Copy the arguments to registers. Better use movem? */ - movel MEM_DISP(sp,20),R(res_ptr) - movel MEM_DISP(sp,24),R(s1_ptr) - movel MEM_DISP(sp,28),R(s1_size) - movel MEM_DISP(sp,32),R(s2_limb) - - eorw #1,R(s1_size) - clrl R(d1) - clrl R(d5) - lsrl #1,R(s1_size) - bcc L(L1) - subql #1,R(s1_size) - subl R(d0),R(d0) /* (d0,cy) <= (0,0) */ - -L(Loop:) - movel MEM_POSTINC(s1_ptr),R(d3) - mulul R(s2_limb),R(d1):R(d3) - addxl R(d0),R(d3) - addxl R(d5),R(d1) - subl R(d3),MEM_POSTINC(res_ptr) -L(L1:) movel MEM_POSTINC(s1_ptr),R(d3) - mulul R(s2_limb),R(d0):R(d3) - addxl R(d1),R(d3) - addxl R(d5),R(d0) - subl R(d3),MEM_POSTINC(res_ptr) - - dbf R(s1_size),L(Loop) - addxl R(d5),R(d0) - subl #0x10000,R(s1_size) - bcc L(Loop) - -/* Restore used registers from stack frame. */ - moveml MEM_POSTINC(sp),R(d2)-R(d5) - - rts -EPILOG(__gmpn_submul_1) diff --git a/mpn/m68k/mc68020/udiv.S b/mpn/m68k/mc68020/udiv.S deleted file mode 100644 index d9cc101c4..000000000 --- a/mpn/m68k/mc68020/udiv.S +++ /dev/null @@ -1,31 +0,0 @@ -/* -Copyright 1999, 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 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 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 Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser 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. -*/ - -.text - .even -.globl ___udiv_qrnnd -___udiv_qrnnd: - movel sp@(4),a0 - movel sp@(8),d1 - movel sp@(12),d0 - divul sp@(16),d1:d0 - movel d1,a0@ - rts diff --git a/mpn/m68k/mc68020/umul.S b/mpn/m68k/mc68020/umul.S deleted file mode 100644 index dfce55b65..000000000 --- a/mpn/m68k/mc68020/umul.S +++ /dev/null @@ -1,31 +0,0 @@ -/* -Copyright 1999, 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 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 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 Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser 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. -*/ - -.text - .even -.globl ___umul_ppmm -___umul_ppmm: - movel sp@(4),a0 - movel sp@(8),d1 - movel sp@(12),d0 - mulul d0,d0:d1 - movel d1,a0@ - rts diff --git a/mpn/m68k/rshift.S b/mpn/m68k/rshift.S deleted file mode 100644 index f93ece82d..000000000 --- a/mpn/m68k/rshift.S +++ /dev/null @@ -1,149 +0,0 @@ -/* mc68020 __gmpn_rshift -- Shift right a low-level natural-number integer. - -Copyright 1996, 1999, 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 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 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 Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser 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 (sp + 4) - s_ptr (sp + 8) - s_size (sp + 16) - cnt (sp + 12) -*/ - -#include "asm-syntax.h" - -#define res_ptr a1 -#define s_ptr a0 -#define s_size d6 -#define cnt d4 - - TEXT - ALIGN - GLOBL C_SYMBOL_NAME(__gmpn_rshift) - -C_SYMBOL_NAME(__gmpn_rshift:) -PROLOG(__gmpn_rshift) -/* Save used registers on the stack. */ - moveml R(d2)-R(d6)/R(a2),MEM_PREDEC(sp) - -/* Copy the arguments to registers. */ - movel MEM_DISP(sp,28),R(res_ptr) - movel MEM_DISP(sp,32),R(s_ptr) - movel MEM_DISP(sp,36),R(s_size) - movel MEM_DISP(sp,40),R(cnt) - - moveql #1,R(d5) - cmpl R(d5),R(cnt) - bne L(Lnormal) - cmpl R(res_ptr),R(s_ptr) - bls L(Lspecial) /* jump if res_ptr >= s_ptr */ -#if (defined (__mc68020__) || defined (__NeXT__) || defined(mc68020)) - lea MEM_INDX1(res_ptr,s_size,l,4),R(a2) -#else /* not mc68020 */ - movel R(s_size),R(d0) - asll #2,R(d0) - lea MEM_INDX(res_ptr,d0,l),R(a2) -#endif - cmpl R(s_ptr),R(a2) - bls L(Lspecial) /* jump if s_ptr >= res_ptr + s_size */ - -L(Lnormal:) - moveql #32,R(d5) - subl R(cnt),R(d5) - movel MEM_POSTINC(s_ptr),R(d2) - movel R(d2),R(d0) - lsll R(d5),R(d0) /* compute carry limb */ - - lsrl R(cnt),R(d2) - movel R(d2),R(d1) - subql #1,R(s_size) - beq L(Lend) - lsrl #1,R(s_size) - bcs L(L1) - subql #1,R(s_size) - -L(Loop:) - movel MEM_POSTINC(s_ptr),R(d2) - movel R(d2),R(d3) - lsll R(d5),R(d3) - orl R(d3),R(d1) - movel R(d1),MEM_POSTINC(res_ptr) - lsrl R(cnt),R(d2) -L(L1:) - movel MEM_POSTINC(s_ptr),R(d1) - movel R(d1),R(d3) - lsll R(d5),R(d3) - orl R(d3),R(d2) - movel R(d2),MEM_POSTINC(res_ptr) - lsrl R(cnt),R(d1) - - dbf R(s_size),L(Loop) - subl #0x10000,R(s_size) - bcc L(Loop) - -L(Lend:) - movel R(d1),MEM(res_ptr) /* store most significant limb */ - -/* Restore used registers from stack frame. */ - moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2) - rts - -/* We loop from most significant end of the arrays, which is only - permissable if the source and destination don't overlap, since the - function is documented to work for overlapping source and destination. */ - -L(Lspecial:) -#if (defined (__mc68020__) || defined (__NeXT__) || defined(mc68020)) - lea MEM_INDX1(s_ptr,s_size,l,4),R(s_ptr) - lea MEM_INDX1(res_ptr,s_size,l,4),R(res_ptr) -#else /* not mc68000 */ - movel R(s_size),R(d0) - asll #2,R(d0) - addl R(s_size),R(s_ptr) - addl R(s_size),R(res_ptr) -#endif - - clrl R(d0) /* initialize carry */ - eorw #1,R(s_size) - lsrl #1,R(s_size) - bcc L(LL1) - subql #1,R(s_size) - -L(LLoop:) - movel MEM_PREDEC(s_ptr),R(d2) - roxrl #1,R(d2) - movel R(d2),MEM_PREDEC(res_ptr) -L(LL1:) - movel MEM_PREDEC(s_ptr),R(d2) - roxrl #1,R(d2) - movel R(d2),MEM_PREDEC(res_ptr) - - dbf R(s_size),L(LLoop) - roxrl #1,R(d0) /* save cy in msb */ - subl #0x10000,R(s_size) - bcs L(LLend) - addl R(d0),R(d0) /* restore cy */ - bra L(LLoop) - -L(LLend:) -/* Restore used registers from stack frame. */ - moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2) - rts -EPILOG(__gmpn_rshift) diff --git a/mpn/m68k/sub_n.S b/mpn/m68k/sub_n.S deleted file mode 100644 index cfe961584..000000000 --- a/mpn/m68k/sub_n.S +++ /dev/null @@ -1,79 +0,0 @@ -/* mc68020 __gmpn_sub_n -- Subtract two limb vectors of the same length > 0 and - store difference in a third limb vector. - -Copyright 1992, 1994, 1996, 1999, 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 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 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 Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser 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 (sp + 4) - s1_ptr (sp + 8) - s2_ptr (sp + 16) - size (sp + 12) -*/ - -#include "asm-syntax.h" - - TEXT - ALIGN - GLOBL C_SYMBOL_NAME(__gmpn_sub_n) - -C_SYMBOL_NAME(__gmpn_sub_n:) -PROLOG(__gmpn_sub_n) -/* Save used registers on the stack. */ - movel R(d2),MEM_PREDEC(sp) - movel R(a2),MEM_PREDEC(sp) - -/* Copy the arguments to registers. Better use movem? */ - movel MEM_DISP(sp,12),R(a2) - movel MEM_DISP(sp,16),R(a0) - movel MEM_DISP(sp,20),R(a1) - movel MEM_DISP(sp,24),R(d2) - - eorw #1,R(d2) - lsrl #1,R(d2) - bcc L(L1) - subql #1,R(d2) /* clears cy as side effect */ - -L(Loop:) - movel MEM_POSTINC(a0),R(d0) - movel MEM_POSTINC(a1),R(d1) - subxl R(d1),R(d0) - movel R(d0),MEM_POSTINC(a2) -L(L1:) movel MEM_POSTINC(a0),R(d0) - movel MEM_POSTINC(a1),R(d1) - subxl R(d1),R(d0) - movel R(d0),MEM_POSTINC(a2) - - dbf R(d2),L(Loop) /* loop until 16 lsb of %4 == -1 */ - subxl R(d0),R(d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */ - subl #0x10000,R(d2) - bcs L(L2) - addl R(d0),R(d0) /* restore cy */ - bra L(Loop) - -L(L2:) - negl R(d0) - -/* Restore used registers from stack frame. */ - movel MEM_POSTINC(sp),R(a2) - movel MEM_POSTINC(sp),R(d2) - - rts -EPILOG(__gmpn_sub_n) |