1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Removed files from the HEAD revision, because they are now in another

repository
This commit is contained in:
Werner Koch 2000-12-19 17:20:22 +00:00
parent edb40153c0
commit 07ca4eaa9d
165 changed files with 0 additions and 35058 deletions

View file

@ -1,8 +0,0 @@
syntax.h
mpih-lshift.S
mpih-rshift.S
mpih-add1.S
mpih-sub1.S

View file

@ -1,3 +0,0 @@
mpih-mul1.S
mpih-mul2.S
mpih-mul3.S

View file

@ -1,97 +0,0 @@
/* mc68020 __mpn_mul_1 -- Multiply a limb vector with a limb and store
the result in a second limb vector.
Copyright (C) 1992, 1994, 1996 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 "sysdep.h"
#include "asm-syntax.h"
/*******************
* mpi_limb_t
* mpihelp_mul_1( mpi_ptr_t res_ptr, (sp + 4)
* mpi_ptr_t s1_ptr, (sp + 8)
* mpi_size_t s1_size, (sp + 12)
* mpi_limb_t s2_limb) (sp + 16)
*/
TEXT
ALIGN
GLOBL C_SYMBOL_NAME(mpihelp_mul_1)
C_SYMBOL_NAME(mpihelp_mul_1:)
PROLOG(mpihelp_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(mpihelp_mul_1)

View file

@ -1,87 +0,0 @@
/* mc68020 __mpn_addmul_1 -- Multiply a limb vector with a limb and add
the result to a second limb vector.
Copyright (C) 1992, 1994, 1996 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 "sysdep.h"
#include "asm-syntax.h"
/*******************
* mpi_limb_t
* mpihelp_addmul_1( mpi_ptr_t res_ptr, (sp + 4)
* mpi_ptr_t s1_ptr, (sp + 8)
* mpi_size_t s1_size, (sp + 12)
* mpi_limb_t s2_limb) (sp + 16)
*/
TEXT
ALIGN
GLOBL C_SYMBOL_NAME(mpihelp_addmul_1)
C_SYMBOL_NAME(mpihelp_addmul_1:)
PROLOG(mpihelp_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(mpihelp_addmul_1)

View file

@ -1,89 +0,0 @@
/* mc68020 __mpn_submul_1 -- Multiply a limb vector with a limb and subtract
the result from a second limb vector.
Copyright (C) 1992, 1994, 1996 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 "sysdep.h"
#include "asm-syntax.h"
/*******************
* mpi_limb_t
* mpihelp_submul_1( mpi_ptr_t res_ptr, (sp + 4)
* mpi_ptr_t s1_ptr, (sp + 8)
* mpi_size_t s1_size, (sp + 12)
* mpi_limb_t s2_limb) (sp + 16)
*/
TEXT
ALIGN
GLOBL C_SYMBOL_NAME(mpihelp_submul_1)
C_SYMBOL_NAME(mpihelp_submul_1:)
PROLOG(mpihelp_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(mpihelp_submul_1)

View file

@ -1,85 +0,0 @@
/* mc68020 __mpn_add_n -- Add two limb vectors of the same length > 0 and store
sum in a third limb vector.
Copyright (C) 1992, 1994, 1996 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 "sysdep.h"
#include "asm-syntax.h"
/*******************
* mpi_limb_t
* mpihelp_add_n( mpi_ptr_t res_ptr, (sp + 4)
* mpi_ptr_t s1_ptr, (sp + 8)
* mpi_ptr_t s2_ptr, (sp + 16)
* mpi_size_t size) (sp + 12)
*/
TEXT
ALIGN
GLOBL C_SYMBOL_NAME(mpihelp_add_n)
C_SYMBOL_NAME(mpihelp_add_n:)
PROLOG(mpihelp_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(mpihelp_add_n)

View file

@ -1,158 +0,0 @@
/* mc68020 lshift -- Shift left a low-level natural-number integer.
Copyright (C) 1996, 1998 Free Software Foundation, Inc.
This file is part of GNUPG.
GNUPG 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.
GNUPG 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 "sysdep.h"
#include "asm-syntax.h"
/*******************
* mpi_limb_t
* mpihelp_lshift( mpi_ptr_t wp, (sp + 4)
* mpi_ptr_t up, (sp + 8)
* mpi_size_t usize, (sp + 12)
* unsigned cnt) (sp + 16)
*/
#define res_ptr a1
#define s_ptr a0
#define s_size d6
#define cnt d4
TEXT
ALIGN
GLOBL C_SYMBOL_NAME(mpihelp_lshift)
C_SYMBOL_NAME(mpihelp_lshift:)
PROLOG(mpihelp_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(mpihelp_lshift)

View file

@ -1,156 +0,0 @@
/* mc68020 rshift -- Shift right a low-level natural-number integer.
Copyright (C) 1996, 1998 Free Software Foundation, Inc.
This file is part of GNUPG.
GNUPG 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.
GNUPG 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 "sysdep.h"
#include "asm-syntax.h"
/*******************
* mpi_limb_t
* mpihelp_rshift( mpi_ptr_t wp, (sp + 4)
* mpi_ptr_t up, (sp + 8)
* mpi_size_t usize, (sp + 12)
* unsigned cnt) (sp + 16)
*/
#define res_ptr a1
#define s_ptr a0
#define s_size d6
#define cnt d4
TEXT
ALIGN
GLOBL C_SYMBOL_NAME(mpihelp_rshift)
C_SYMBOL_NAME(mpihelp_rshift:)
PROLOG(mpihelp_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(Rnormal)
cmpl R(res_ptr),R(s_ptr)
bls L(Rspecial) /* 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(Rspecial) /* jump if s_ptr >= res_ptr + s_size */
L(Rnormal:)
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(Rend)
lsrl #1,R(s_size)
bcs L(R1)
subql #1,R(s_size)
L(Roop:)
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(R1:)
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(Roop)
subl #0x10000,R(s_size)
bcc L(Roop)
L(Rend:)
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(Rspecial:)
#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(LR1)
subql #1,R(s_size)
L(LRoop:)
movel MEM_PREDEC(s_ptr),R(d2)
roxrl #1,R(d2)
movel R(d2),MEM_PREDEC(res_ptr)
L(LR1:)
movel MEM_PREDEC(s_ptr),R(d2)
roxrl #1,R(d2)
movel R(d2),MEM_PREDEC(res_ptr)
dbf R(s_size),L(LRoop)
roxrl #1,R(d0) /* save cy in msb */
subl #0x10000,R(s_size)
bcs L(LRend)
addl R(d0),R(d0) /* restore cy */
bra L(LRoop)
L(LRend:)
/* Restore used registers from stack frame. */
moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2)
rts
EPILOG(mpihelp_rshift)

View file

@ -1,85 +0,0 @@
/* mc68020 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
store difference in a third limb vector.
Copyright (C) 1992, 1994, 1996 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 "sysdep.h"
#include "asm-syntax.h"
/*******************
* mpi_limb_t
* mpihelp_sub_n( mpi_ptr_t res_ptr, (sp + 4)
* mpi_ptr_t s1_ptr, (sp + 8)
* mpi_ptr_t s2_ptr, (sp + 16)
* mpi_size_t size) (sp + 12)
*/
TEXT
ALIGN
GLOBL C_SYMBOL_NAME(mpihelp_sub_n)
C_SYMBOL_NAME(mpihelp_sub_n:)
PROLOG(mpihelp_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(mpihelp_sub_n)

View file

@ -1,177 +0,0 @@
/* asm.h -- Definitions for 68k syntax variations.
Copyright (C) 1992, 1994, 1996 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. */
#undef ALIGN
#ifdef MIT_SYNTAX
#define PROLOG(name)
#define EPILOG(name)
#define R(r)r
#define MEM(base)base@
#define MEM_DISP(base,displacement)base@(displacement)
#define MEM_INDX(base,idx,size_suffix)base@(idx:size_suffix)
#define MEM_INDX1(base,idx,size_suffix,scale)base@(idx:size_suffix:scale)
#define MEM_PREDEC(memory_base)memory_base@-
#define MEM_POSTINC(memory_base)memory_base@+
#define L(label) label
#define TEXT .text
#define ALIGN .even
#define GLOBL .globl
#define moveql moveq
/* Use variable sized opcodes. */
#define bcc jcc
#define bcs jcs
#define bls jls
#define beq jeq
#define bne jne
#define bra jra
#endif
#ifdef SONY_SYNTAX
#define PROLOG(name)
#define EPILOG(name)
#define R(r)r
#define MEM(base)(base)
#define MEM_DISP(base,displacement)(displacement,base)
#define MEM_INDX(base,idx,size_suffix)(base,idx.size_suffix)
#define MEM_INDX1(base,idx,size_suffix,scale)(base,idx.size_suffix*scale)
#define MEM_PREDEC(memory_base)-(memory_base)
#define MEM_POSTINC(memory_base)(memory_base)+
#define L(label) label
#define TEXT .text
#define ALIGN .even
#define GLOBL .globl
#endif
#ifdef MOTOROLA_SYNTAX
#define PROLOG(name)
#define EPILOG(name)
#define R(r)r
#define MEM(base)(base)
#define MEM_DISP(base,displacement)(displacement,base)
#define MEM_INDX(base,idx,size_suffix)(base,idx.size_suffix)
#define MEM_INDX1(base,idx,size_suffix,scale)(base,idx.size_suffix*scale)
#define MEM_PREDEC(memory_base)-(memory_base)
#define MEM_POSTINC(memory_base)(memory_base)+
#define L(label) label
#define TEXT
#define ALIGN
#define GLOBL XDEF
#define lea LEA
#define movel MOVE.L
#define moveml MOVEM.L
#define moveql MOVEQ.L
#define cmpl CMP.L
#define orl OR.L
#define clrl CLR.L
#define eorw EOR.W
#define lsrl LSR.L
#define lsll LSL.L
#define roxrl ROXR.L
#define roxll ROXL.L
#define addl ADD.L
#define addxl ADDX.L
#define addql ADDQ.L
#define subl SUB.L
#define subxl SUBX.L
#define subql SUBQ.L
#define negl NEG.L
#define mulul MULU.L
#define bcc BCC
#define bcs BCS
#define bls BLS
#define beq BEQ
#define bne BNE
#define bra BRA
#define dbf DBF
#define rts RTS
#define d0 D0
#define d1 D1
#define d2 D2
#define d3 D3
#define d4 D4
#define d5 D5
#define d6 D6
#define d7 D7
#define a0 A0
#define a1 A1
#define a2 A2
#define a3 A3
#define a4 A4
#define a5 A5
#define a6 A6
#define a7 A7
#define sp SP
#endif
#ifdef ELF_SYNTAX
#define PROLOG(name) .type name,@function
#define EPILOG(name) .size name,.-name
#define MEM(base)(R(base))
#define MEM_DISP(base,displacement)(displacement,R(base))
#define MEM_PREDEC(memory_base)-(R(memory_base))
#define MEM_POSTINC(memory_base)(R(memory_base))+
#ifdef __STDC__
#define R_(r)%##r
#define R(r)R_(r)
#define MEM_INDX_(base,idx,size_suffix)(R(base),R(idx##.##size_suffix))
#define MEM_INDX(base,idx,size_suffix)MEM_INDX_(base,idx,size_suffix)
#define MEM_INDX1_(base,idx,size_suffix,scale)(R(base),R(idx##.##size_suffix*scale))
#define MEM_INDX1(base,idx,size_suffix,scale)MEM_INDX1_(base,idx,size_suffix,scale)
#define L(label) .##label
#else
#define R(r)%/**/r
#define MEM_INDX(base,idx,size_suffix)(R(base),R(idx).size_suffix)
#define MEM_INDX1(base,idx,size_suffix,scale)(R(base),R(idx).size_suffix*scale)
#define L(label) ./**/label
#endif
#define TEXT .text
#define ALIGN .align 2
#define GLOBL .globl
#define bcc jbcc
#define bcs jbcs
#define bls jbls
#define beq jbeq
#define bne jbne
#define bra jbra
#endif
#if defined (SONY_SYNTAX) || defined (ELF_SYNTAX)
#define movel move.l
#define moveml movem.l
#define moveql moveq.l
#define cmpl cmp.l
#define orl or.l
#define clrl clr.l
#define eorw eor.w
#define lsrl lsr.l
#define lsll lsl.l
#define roxrl roxr.l
#define roxll roxl.l
#define addl add.l
#define addxl addx.l
#define addql addq.l
#define subl sub.l
#define subxl subx.l
#define subql subq.l
#define negl neg.l
#define mulul mulu.l
#endif