mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-11 20:00:07 +00:00
Initialize quotient' and
mask'.
This commit is contained in:
parent
1059fb7661
commit
cb23ff1f57
@ -1,7 +1,6 @@
|
|||||||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||||
Contributed by Richard Henderson (rth@tamu.edu)
|
|
||||||
|
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
Contributed by Richard Henderson <rth@tamu.edu>.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public License as
|
modify it under the terms of the GNU Library General Public License as
|
||||||
@ -14,10 +13,9 @@
|
|||||||
Library General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
You should have received a copy of the GNU Library General Public
|
||||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
Cambridge, MA 02139, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
|
||||||
#include <sysdep.h>
|
#include <sysdep.h>
|
||||||
|
|
||||||
@ -44,7 +42,6 @@ div:
|
|||||||
.prologue 0
|
.prologue 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define dividend t0
|
|
||||||
#define divisor t1
|
#define divisor t1
|
||||||
#define mask t2
|
#define mask t2
|
||||||
#define quotient t3
|
#define quotient t3
|
||||||
@ -54,11 +51,13 @@ div:
|
|||||||
#define compare t7
|
#define compare t7
|
||||||
|
|
||||||
/* find correct sign for input to unsigned divide loop. */
|
/* find correct sign for input to unsigned divide loop. */
|
||||||
|
negl a1, modulus # e0 :
|
||||||
|
negl a2, divisor # .. e1 :
|
||||||
sextl a1, a1 # e0 :
|
sextl a1, a1 # e0 :
|
||||||
sextl a2, a2 # .. e1 :
|
sextl a2, a2 # .. e1 :
|
||||||
negl a1, dividend # e0 :
|
mov zero, quotient # e0 :
|
||||||
negl a2, divisor # .. e1 :
|
mov 1, mask # .. e1 :
|
||||||
cmovge a1, a1, dividend # e0 :
|
cmovge a1, a1, modulus # e0 :
|
||||||
cmovge a2, a2, divisor # .. e1 :
|
cmovge a2, a2, divisor # .. e1 :
|
||||||
beq a2, $divbyzero # e1 :
|
beq a2, $divbyzero # e1 :
|
||||||
unop # :
|
unop # :
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
/* Copyright (C) 1996 Free Software Foundation, Inc.
|
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||||
Contributed by Richard Henderson (rth@tamu.edu)
|
|
||||||
|
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
Contributed by Richard Henderson <rth@tamu.edu>.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public License as
|
modify it under the terms of the GNU Library General Public License as
|
||||||
@ -14,10 +13,9 @@
|
|||||||
Library General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
You should have received a copy of the GNU Library General Public
|
||||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
Cambridge, MA 02139, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
|
||||||
#include <sysdep.h>
|
#include <sysdep.h>
|
||||||
|
|
||||||
@ -44,7 +42,6 @@ ldiv:
|
|||||||
.prologue 0
|
.prologue 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define dividend t0
|
|
||||||
#define divisor t1
|
#define divisor t1
|
||||||
#define mask t2
|
#define mask t2
|
||||||
#define quotient t3
|
#define quotient t3
|
||||||
@ -54,11 +51,13 @@ ldiv:
|
|||||||
#define compare t7
|
#define compare t7
|
||||||
|
|
||||||
/* find correct sign for input to unsigned divide loop. */
|
/* find correct sign for input to unsigned divide loop. */
|
||||||
mov a1, dividend # e0 :
|
mov a1, modulus # e0 :
|
||||||
mov a2, divisor # .. e1 :
|
mov a2, divisor # .. e1 :
|
||||||
negq a1, tmp1 # e0 :
|
negq a1, tmp1 # e0 :
|
||||||
negq a2, tmp2 # .. e1 :
|
negq a2, tmp2 # .. e1 :
|
||||||
cmovlt a1, tmp1, dividend # e0 :
|
mov zero, quotient # e0 :
|
||||||
|
mov 1, mask # .. e1 :
|
||||||
|
cmovlt a1, tmp1, modulus # e0 :
|
||||||
cmovlt a2, tmp2, divisor # .. e1 :
|
cmovlt a2, tmp2, divisor # .. e1 :
|
||||||
beq a2, $divbyzero # e1 :
|
beq a2, $divbyzero # e1 :
|
||||||
unop # :
|
unop # :
|
||||||
|
Loading…
Reference in New Issue
Block a user