From 800d775e426b9c0af63f711b79b09bf540c97456 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 29 Aug 1997 21:01:47 +0000 Subject: Update. 1997-08-29 21:45 Ulrich Drepper * sunrpc/auth_des.c: New file. Copied from former secure_rpc add-on. * sunrpc/authdes_prot.c: New file. Likewise. * sunrpc/des.h: New file. Likewise. * sunrpc/des_crypt.c: New file. Likewise. * sunrpc/des_soft.c: New file. Likewise. * sunrpc/key_call.c: New file. Likewise. * sunrpc/key_prot.c: New file. Likewise. * sunrpc/netname.c: New file. Likewise. * sunrpc/openchild.c: New file. Likewise. * sunrpc/rtime.c: New file. Likewise. * sunrpc/svc_auth.c: New file. Likewise. * sunrpc/svcauth_des.c: New file. Likewise. * sunrpc/xcrypt.c: New file. Likewise. * sunrpc/rpc/auth.h: New file. Likewise. * sunrpc/rpc/auth_des.h: New file. Likewise. * sunrpc/rpc/des_crypt.h: New file. Likewise. * sunrpc/rpc/key_prot.h: New file. Likewise. * sunrpc/rpcsvc/key_prot.x: New file. Likewise. * sysdeps/generic/svc_auth.h: Removed. * sysdeps/generic/rpc/auth.h: Removed. * sysdeps/generic/rpc/auth_des.h: Removed. * sysdeps/stub/des_impl.c: New file. Stub version for DES. * sunrpc/Makefile (rpcsvc): Add keyprot.x. (headers): Add des_crypt.h and key_prot.h. (routines): Add auth_des, authdes_prot, des_crypt, des_impl, des_soft, key_call, key_prot, netname, openchild, rtime, svcauth_des, xcrypt. (distribute): Add des.h. * db2/Makefile: Add all headers and other files to distribute. (others): Add db_printlog. * sysdeps/mach/hurd/Dist: Add net/* headers. * sysdeps/mach/hurd/mips/Dist: New file. * sysdeps/powerpc/Dist: Add fe_nomask.c and t_sqrt.c. * sysdeps/sparc/Dist: Add sys/trap.h. * sysdeps/sparc/sparc32/Dist: Remove sys/trap.h. * sysdeps/sparc/sparc32/sparcv8/Dist: New file. * sysdeps/unix/sysv/linux/mips/Dist: Add sgidefs.h. * sysdeps/unix/sysv/linux/sparc/Dist: Add sys/trap.h. * sysdeps/unix/sysv/linux/sparc/sparc32/Dist: Remove sys/trap.h. Add previously missing assembler files for PPC. * sysdeps/powerpc/add_n.s: New file. * sysdeps/powerpc/addmul_1.s: New file. * sysdeps/powerpc/lshift.s: New file. * sysdeps/powerpc/memset.s: New file. * sysdeps/powerpc/mul_1.s: New file. * sysdeps/powerpc/rshift.s: New file. * sysdeps/powerpc/strchr.s: New file. * sysdeps/powerpc/strcmp.s: New file. * sysdeps/powerpc/sub_n.s: New file. * sysdeps/powerpc/submul_1.s: New file. 1997-08-28 18:42 Thorsten Kukuk * nis/nis_server.c: Rewritten to fix a lot of bugs. 1997-08-28 Andreas Schwab * md5-crypt/Makefile (LDFLAGS-md5crypt.so, libmd5crypt-map): New variables. in NLSPATH environment variable. Patch by HJ Lu . --- sysdeps/powerpc/lshift.s | 479 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 479 insertions(+) create mode 100644 sysdeps/powerpc/lshift.s (limited to 'sysdeps/powerpc/lshift.s') diff --git a/sysdeps/powerpc/lshift.s b/sysdeps/powerpc/lshift.s new file mode 100644 index 0000000..9612a3d --- /dev/null +++ b/sysdeps/powerpc/lshift.s @@ -0,0 +1,479 @@ + # Shift a limb left, low level routine. + # Copyright (C) 1996, 1997 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 + # 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 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 + # Library General Public License for more details. + # + # 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 not, + # write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + # Boston, MA 02111-1307, USA. + + # mp_limb_t mpn_lshift (mp_ptr wp, mp_srcptr up, mp_size_t usize, + # unsigned int cnt) + + .align 3 + .globl __mpn_lshift + .type __mpn_lshift,@function +__mpn_lshift: + mtctr %r5 # copy size into CTR + cmplwi %cr0,%r5,16 # is size < 16 + slwi %r0,%r5,2 + add %r7,%r3,%r0 # make r7 point at end of res + add %r4,%r4,%r0 # make r4 point at end of s1 + lwzu %r11,-4(%r4) # load first s1 limb + subfic %r8,%r6,32 + srw %r3,%r11,%r8 # compute function return value + bge %cr0,Lbig # branch if size >= 16 + + bdz Lend1 + +Loop: lwzu %r10,-4(%r4) + slw %r9,%r11,%r6 + srw %r12,%r10,%r8 + or %r9,%r9,%r12 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slw %r9,%r10,%r6 + srw %r12,%r11,%r8 + or %r9,%r9,%r12 + stwu %r9,-4(%r7) + bdnz Loop + b Lend1 + + # Guaranteed not to succeed. +LBoom: tweq %r0,%r0 + + # We imitate a case statement, by using (yuk!) fixed-length code chunks, + # of size 4*12 bytes. We have to do this (or something) to make this PIC. +Lbig: mflr %r9 + bltl %cr0,LBoom # Never taken, only used to set LR. + slwi %r10,%r6,4 + mflr %r12 + add %r10,%r12,%r10 + slwi %r8,%r6,5 + add %r10,%r8,%r10 + mtctr %r10 + addi %r5,%r5,-1 + mtlr %r9 + bctr + +Lend1: slw %r0,%r11,%r6 + stw %r0,-4(%r7) + blr + + mtctr %r5 +Loop1: lwzu %r10,-4(%r4) + slwi %r9,%r11,1 + inslwi %r9,%r10,1,31 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,1 + inslwi %r9,%r11,1,31 + stwu %r9,-4(%r7) + bdnz Loop1 + b Lend1 + + mtctr %r5 +Loop2: lwzu %r10,-4(%r4) + slwi %r9,%r11,2 + inslwi %r9,%r10,2,30 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,2 + inslwi %r9,%r11,2,30 + stwu %r9,-4(%r7) + bdnz Loop2 + b Lend1 + + mtctr %r5 +Loop3: lwzu %r10,-4(%r4) + slwi %r9,%r11,3 + inslwi %r9,%r10,3,29 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,3 + inslwi %r9,%r11,3,29 + stwu %r9,-4(%r7) + bdnz Loop3 + b Lend1 + + mtctr %r5 +Loop4: lwzu %r10,-4(%r4) + slwi %r9,%r11,4 + inslwi %r9,%r10,4,28 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,4 + inslwi %r9,%r11,4,28 + stwu %r9,-4(%r7) + bdnz Loop4 + b Lend1 + + mtctr %r5 +Loop5: lwzu %r10,-4(%r4) + slwi %r9,%r11,5 + inslwi %r9,%r10,5,27 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,5 + inslwi %r9,%r11,5,27 + stwu %r9,-4(%r7) + bdnz Loop5 + b Lend1 + + mtctr %r5 +Loop6: lwzu %r10,-4(%r4) + slwi %r9,%r11,6 + inslwi %r9,%r10,6,26 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,6 + inslwi %r9,%r11,6,26 + stwu %r9,-4(%r7) + bdnz Loop6 + b Lend1 + + mtctr %r5 +Loop7: lwzu %r10,-4(%r4) + slwi %r9,%r11,7 + inslwi %r9,%r10,7,25 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,7 + inslwi %r9,%r11,7,25 + stwu %r9,-4(%r7) + bdnz Loop7 + b Lend1 + + mtctr %r5 +Loop8: lwzu %r10,-4(%r4) + slwi %r9,%r11,8 + inslwi %r9,%r10,8,24 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,8 + inslwi %r9,%r11,8,24 + stwu %r9,-4(%r7) + bdnz Loop8 + b Lend1 + + mtctr %r5 +Loop9: lwzu %r10,-4(%r4) + slwi %r9,%r11,9 + inslwi %r9,%r10,9,23 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,9 + inslwi %r9,%r11,9,23 + stwu %r9,-4(%r7) + bdnz Loop9 + b Lend1 + + mtctr %r5 +Loop10: lwzu %r10,-4(%r4) + slwi %r9,%r11,10 + inslwi %r9,%r10,10,22 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,10 + inslwi %r9,%r11,10,22 + stwu %r9,-4(%r7) + bdnz Loop10 + b Lend1 + + mtctr %r5 +Loop11: lwzu %r10,-4(%r4) + slwi %r9,%r11,11 + inslwi %r9,%r10,11,21 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,11 + inslwi %r9,%r11,11,21 + stwu %r9,-4(%r7) + bdnz Loop11 + b Lend1 + + mtctr %r5 +Loop12: lwzu %r10,-4(%r4) + slwi %r9,%r11,12 + inslwi %r9,%r10,12,20 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,12 + inslwi %r9,%r11,12,20 + stwu %r9,-4(%r7) + bdnz Loop12 + b Lend1 + + mtctr %r5 +Loop13: lwzu %r10,-4(%r4) + slwi %r9,%r11,13 + inslwi %r9,%r10,13,19 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,13 + inslwi %r9,%r11,13,19 + stwu %r9,-4(%r7) + bdnz Loop13 + b Lend1 + + mtctr %r5 +Loop14: lwzu %r10,-4(%r4) + slwi %r9,%r11,14 + inslwi %r9,%r10,14,18 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,14 + inslwi %r9,%r11,14,18 + stwu %r9,-4(%r7) + bdnz Loop14 + b Lend1 + + mtctr %r5 +Loop15: lwzu %r10,-4(%r4) + slwi %r9,%r11,15 + inslwi %r9,%r10,15,17 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,15 + inslwi %r9,%r11,15,17 + stwu %r9,-4(%r7) + bdnz Loop15 + b Lend1 + + mtctr %r5 +Loop16: lwzu %r10,-4(%r4) + slwi %r9,%r11,16 + inslwi %r9,%r10,16,16 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,16 + inslwi %r9,%r11,16,16 + stwu %r9,-4(%r7) + bdnz Loop16 + b Lend1 + + mtctr %r5 +Loop17: lwzu %r10,-4(%r4) + slwi %r9,%r11,17 + inslwi %r9,%r10,17,15 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,17 + inslwi %r9,%r11,17,15 + stwu %r9,-4(%r7) + bdnz Loop17 + b Lend1 + + mtctr %r5 +Loop18: lwzu %r10,-4(%r4) + slwi %r9,%r11,18 + inslwi %r9,%r10,18,14 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,18 + inslwi %r9,%r11,18,14 + stwu %r9,-4(%r7) + bdnz Loop18 + b Lend1 + + mtctr %r5 +Loop19: lwzu %r10,-4(%r4) + slwi %r9,%r11,19 + inslwi %r9,%r10,19,13 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,19 + inslwi %r9,%r11,19,13 + stwu %r9,-4(%r7) + bdnz Loop19 + b Lend1 + + mtctr %r5 +Loop20: lwzu %r10,-4(%r4) + slwi %r9,%r11,20 + inslwi %r9,%r10,20,12 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,20 + inslwi %r9,%r11,20,12 + stwu %r9,-4(%r7) + bdnz Loop20 + b Lend1 + + mtctr %r5 +Loop21: lwzu %r10,-4(%r4) + slwi %r9,%r11,21 + inslwi %r9,%r10,21,11 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,21 + inslwi %r9,%r11,21,11 + stwu %r9,-4(%r7) + bdnz Loop21 + b Lend1 + + mtctr %r5 +Loop22: lwzu %r10,-4(%r4) + slwi %r9,%r11,22 + inslwi %r9,%r10,22,10 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,22 + inslwi %r9,%r11,22,10 + stwu %r9,-4(%r7) + bdnz Loop22 + b Lend1 + + mtctr %r5 +Loop23: lwzu %r10,-4(%r4) + slwi %r9,%r11,23 + inslwi %r9,%r10,23,9 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,23 + inslwi %r9,%r11,23,9 + stwu %r9,-4(%r7) + bdnz Loop23 + b Lend1 + + mtctr %r5 +Loop24: lwzu %r10,-4(%r4) + slwi %r9,%r11,24 + inslwi %r9,%r10,24,8 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,24 + inslwi %r9,%r11,24,8 + stwu %r9,-4(%r7) + bdnz Loop24 + b Lend1 + + mtctr %r5 +Loop25: lwzu %r10,-4(%r4) + slwi %r9,%r11,25 + inslwi %r9,%r10,25,7 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,25 + inslwi %r9,%r11,25,7 + stwu %r9,-4(%r7) + bdnz Loop25 + b Lend1 + + mtctr %r5 +Loop26: lwzu %r10,-4(%r4) + slwi %r9,%r11,26 + inslwi %r9,%r10,26,6 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,26 + inslwi %r9,%r11,26,6 + stwu %r9,-4(%r7) + bdnz Loop26 + b Lend1 + + mtctr %r5 +Loop27: lwzu %r10,-4(%r4) + slwi %r9,%r11,27 + inslwi %r9,%r10,27,5 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,27 + inslwi %r9,%r11,27,5 + stwu %r9,-4(%r7) + bdnz Loop27 + b Lend1 + + mtctr %r5 +Loop28: lwzu %r10,-4(%r4) + slwi %r9,%r11,28 + inslwi %r9,%r10,28,4 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,28 + inslwi %r9,%r11,28,4 + stwu %r9,-4(%r7) + bdnz Loop28 + b Lend1 + + mtctr %r5 +Loop29: lwzu %r10,-4(%r4) + slwi %r9,%r11,29 + inslwi %r9,%r10,29,3 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,29 + inslwi %r9,%r11,29,3 + stwu %r9,-4(%r7) + bdnz Loop29 + b Lend1 + + mtctr %r5 +Loop30: lwzu %r10,-4(%r4) + slwi %r9,%r11,30 + inslwi %r9,%r10,30,2 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,30 + inslwi %r9,%r11,30,2 + stwu %r9,-4(%r7) + bdnz Loop30 + b Lend1 + + mtctr %r5 +Loop31: lwzu %r10,-4(%r4) + slwi %r9,%r11,31 + inslwi %r9,%r10,31,1 + stwu %r9,-4(%r7) + bdz Lend2 + lwzu %r11,-4(%r4) + slwi %r9,%r10,31 + inslwi %r9,%r11,31,1 + stwu %r9,-4(%r7) + bdnz Loop31 + b Lend1 + +Lend2: slw %r0,%r10,%r6 + stw %r0,-4(%r7) + blr -- cgit v1.1