Print this page
de-linting of .s files

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/sparc/ml/ip_ocsum.s
          +++ new/usr/src/uts/sparc/ml/ip_ocsum.s
↓ open down ↓ 20 lines elided ↑ open up ↑
  21   21   */
  22   22  /*
  23   23   * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
  27   27  #ident  "%Z%%M% %I%     %E% SMI"
  28   28  
  29   29  #include <sys/asm_linkage.h>
  30   30  
  31      -#if defined(lint)
  32      -#include <sys/types.h>
  33      -#endif  /* lint */
  34      -
  35   31  /*
  36   32   * ip_ocsum(address, halfword_count, sum)
  37   33   * Do a 16 bit one's complement sum of a given number of (16-bit)
  38   34   * halfwords. The halfword pointer must not be odd.
  39   35   *      %o0 address; %o1 count; %o2 sum accumulator; %o4 temp
  40   36   *      %g2 and %g3 used in main loop
  41   37   *
  42   38   * (from @(#)ocsum.s 1.3 89/02/24 SMI)
  43   39   *
  44   40   */
  45   41  
  46      -#if defined(lint) 
  47      -
  48      -/* ARGSUSED */
  49      -unsigned int
  50      -ip_ocsum(u_short *address, int halfword_count, unsigned int sum)
  51      -{ return (0); }
  52      -
  53      -#else   /* lint */
  54      -
  55   42          ENTRY(ip_ocsum)
  56   43          cmp     %o1, 31         ! less than 62 bytes?
  57   44          bl,a    .dohw           !   just do halfwords
  58   45          tst     %o1             ! delay slot, test count
  59   46  
  60   47          btst    31, %o0         ! (delay slot)
  61   48          bz      2f              ! if 32 byte aligned, skip
  62   49          nop
  63   50  
  64   51          !
↓ open down ↓ 52 lines elided ↑ open up ↑
 117  104          ! at this point the 32-bit accumulator
 118  105          ! has the result that needs to be returned in 16-bits
 119  106          !
 120  107          sll     %o2, 16, %o4    ! put low halfword in high halfword %o4
 121  108          addcc   %o4, %o2, %o2   ! add the 2 halfwords in high %o2, set carry
 122  109          srl     %o2, 16, %o2    ! shift to low halfword
 123  110          retl                    ! return
 124  111          addxcc  %o2, 0, %o0     ! add in carry if any. result in %o0
 125  112          SET_SIZE(ip_ocsum)
 126  113  
 127      -#endif  /* lint */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX