home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / crypt / crypt.sparc.s < prev    next >
Encoding:
Text File  |  1992-09-02  |  2.7 KB  |  137 lines

  1. !
  2. ! UFC-crypt: ultra fast crypt(3) implementation
  3. ! Copyright (C) 1991, 1992, Free Software Foundation, Inc.
  4. !
  5. ! This library is free software, you can redistribute it and/or
  6. ! modify it under the terms of the GNU Library General Public
  7. ! License as published by the Free Software Foundation, either
  8. ! version 2 of the License, or (at your option) any later version.
  9. !
  10. ! This library is distributed in the hope that it will be useful,
  11. ! but WITHOUT ANY WARRANTY, without even the implied warranty of
  12. ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13. ! Library General Public License for more details.
  14. !
  15. ! You should have received a copy of the GNU Library General Public
  16. ! License along with this library, if not, write to the Free
  17. ! Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. !
  19. ! @(#)crypt.sparc.s    1.3 5/28/92
  20. !
  21. ! Assembly code for SPARC architecture machines: 
  22. ! derived from gcc 2.1 assembly language output from
  23. ! crypt.c, rev. 2.17
  24. !
  25.  
  26. gcc2_compiled.:
  27. .text
  28.     .align 4
  29.     .global __ufc_doit
  30.     .proc 1
  31. __ufc_doit:
  32.     !#PROLOGUE# 0
  33.     save %sp,-112,%sp
  34.     !#PROLOGUE# 1
  35.     mov %i0,%o7
  36.     mov %i1,%o0
  37.     mov %i2,%o1
  38.     add %i4,-1,%o4
  39.     cmp %o4,-1
  40.     be L3
  41.     mov %i3,%o2
  42.     sethi %hi(65535),%g2
  43.     or %g2,%lo(65535),%l1
  44.     sethi %hi(__ufc_sb1),%g2
  45.     or %g2,%lo(__ufc_sb1),%l6
  46. L8:
  47.     sethi %hi(__ufc_keytab),%l7
  48.     or %l7,%lo(__ufc_keytab),%g1
  49.     mov 7,%o3
  50.     sethi %hi(__ufc_sb0),%g2
  51.     or %g2,%lo(__ufc_sb0),%l2
  52.     add %l2,4,%l5
  53.     sethi %hi(__ufc_sb3),%g2
  54.     or %g2,%lo(__ufc_sb3),%l0
  55.     add %l0,4,%l4
  56.     sethi %hi(__ufc_sb2),%g2
  57.     or %g2,%lo(__ufc_sb2),%o5
  58.     add %o5,4,%l3
  59. L7:
  60.     ld [%g1],%g2
  61.     add %g1,4,%g1
  62.     ld [%g1],%i0
  63.     add %g1,4,%g1
  64.     ld [%g1],%i3
  65.     add %g1,4,%g1
  66.     ld [%g1],%i4
  67.     add %g1,4,%g1
  68.     add %o3,-1,%o3
  69.     cmp %o3,-1
  70.     sethi %hi(__ufc_sb1+4),%l7
  71.     xor %o1,%g2,%i5
  72.     and %i5,%l1,%g3
  73.     srl %i5,16,%i5
  74.     ld [%i5+%l2],%i1
  75.     ld [%i5+%l5],%i2
  76.     or %l7,%lo(__ufc_sb1+4),%l7
  77.     xor %o2,%i0,%i5
  78.     and %i5,%l1,%i0
  79.     ld [%g3+%l6],%g2
  80.     srl %i5,16,%i5
  81.     ld [%g3+%l7],%g3
  82.     xor %o7,%g2,%o7
  83.     xor %o0,%g3,%o0
  84.     xor %o7,%i1,%o7
  85.     ld [%i0+%l0],%g2
  86.     ld [%i0+%l4],%g3
  87.     xor %o0,%i2,%o0
  88.     ld [%i5+%l3],%i0
  89.     xor %o7,%g2,%o7
  90.     ld [%i5+%o5],%g2
  91.     xor %o0,%g3,%o0
  92.     xor %o7,%g2,%o7
  93.     xor %o7,%i3,%i5
  94.     and %i5,%l1,%g3
  95.     srl %i5,16,%i5
  96.     ld [%i5+%l2],%i1
  97.     ld [%i5+%l5],%i2
  98.     xor %o0,%i0,%o0
  99.     xor %o0,%i4,%i5
  100.     and %i5,%l1,%i0
  101.     ld [%g3+%l6],%g2
  102.     srl %i5,16,%i5
  103.     ld [%g3+%l7],%g3
  104.     xor %o1,%g2,%o1
  105.     xor %o2,%g3,%o2
  106.     xor %o1,%i1,%o1
  107.     xor %o2,%i2,%o2
  108.     ld [%i0+%l0],%g2
  109.     ld [%i0+%l4],%g3
  110.     xor %o1,%g2,%o1
  111.     xor %o2,%g3,%o2
  112.     ld [%i5+%o5],%g2
  113.     ld [%i5+%l3],%g3
  114.     xor %o1,%g2,%o1
  115.     bne L7
  116.     xor %o2,%g3,%o2
  117.     mov %o7,%i5
  118.     mov %o1,%o7
  119.     mov %i5,%o1
  120.     mov %o0,%i5
  121.     mov %o2,%o0
  122.     add %o4,-1,%o4
  123.     cmp %o4,-1
  124.     bne L8
  125.     mov %i5,%o2
  126. L3:
  127.     sethi %hi(_ary),%i0
  128.     st %o7,[%i0+%lo(_ary)]
  129.     or %i0,%lo(_ary),%i0
  130.     st %o0,[%i0+4]
  131.     st %o1,[%i0+8]
  132.     st %o2,[%i0+12]
  133.     ret
  134.     restore
  135.  
  136.     .reserve _ary,16,"bss"
  137.