Print this page
de-linting of .s files

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/sun4u/ml/mach_subr_asm.s
          +++ new/usr/src/uts/sun4u/ml/mach_subr_asm.s
↓ open down ↓ 19 lines elided ↑ open up ↑
  20   20   */
  21   21  /*
  22   22   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  
  26   26  /*
  27   27   * General machine architecture & implementation specific
  28   28   * assembly language routines.
  29   29   */
  30      -#if defined(lint)
  31      -#include <sys/types.h>
  32      -#include <sys/t_lock.h>
  33      -#else   /* lint */
  34   30  #include "assym.h"
  35      -#endif  /* lint */
  36   31  
  37   32  #include <sys/asm_linkage.h>
  38   33  #include <sys/machsystm.h>
  39   34  #include <sys/machthread.h>
  40   35  #include <sys/privregs.h>
  41   36  #include <sys/cmpregs.h>
  42   37  #include <sys/clock.h>
  43   38  #include <sys/fpras.h>
  44   39  
  45      -#if defined(lint)
  46      -
  47      -uint64_t
  48      -ultra_gettick(void)
  49      -{ return (0); }
  50      -
  51      -#else   /* lint */
  52      -
  53   40  /*
  54   41   * This isn't the routine you're looking for.
  55   42   *
  56   43   * The routine simply returns the value of %tick on the *current* processor.
  57   44   * Most of the time, gettick() [which in turn maps to %stick on platforms
  58   45   * that have different CPU %tick rates] is what you want.
  59   46   */
  60   47  
  61   48          ENTRY(ultra_gettick)
  62   49          retl
  63   50          rdpr    %tick, %o0
  64   51          SET_SIZE(ultra_gettick)
  65   52  
  66      -#endif  /* lint */
  67      -
  68      -#if defined(lint)
  69      -
  70      -/*ARGSUSED*/
  71      -int
  72      -getprocessorid(void)
  73      -{ return (0); }
  74      -
  75      -#else   /* lint */
  76      -
  77   53  /*
  78   54   * Get the processor ID.
  79   55   * === MID reg as specified in 15dec89 sun4u spec, sec 5.4.3
  80   56   */
  81   57  
  82   58          ENTRY(getprocessorid)
  83   59          CPU_INDEX(%o0, %o1)
  84   60          retl
  85   61          nop
  86   62          SET_SIZE(getprocessorid)
  87   63  
  88      -#endif  /* lint */
  89      -
  90      -#if defined(lint)
  91      -/*ARGSUSED*/
  92      -void
  93      -set_error_enable_tl1(uint64_t neer, uint64_t action)
  94      -{}
  95      -
  96      -/* ARGSUSED */
  97      -void
  98      -set_error_enable(uint64_t neer)
  99      -{}
 100      -
 101      -uint64_t
 102      -get_error_enable()
 103      -{
 104      -        return ((uint64_t)0);
 105      -}
 106      -#else /* lint */
 107      -
 108   64          ENTRY(set_error_enable_tl1)
 109   65          cmp     %g2, EER_SET_ABSOLUTE
 110   66          be      %xcc, 1f
 111   67            nop
 112   68          ldxa    [%g0]ASI_ESTATE_ERR, %g3
 113   69          membar  #Sync
 114   70          cmp     %g2, EER_SET_SETBITS
 115   71          be,a    %xcc, 1f
 116   72            or    %g3, %g1, %g1
 117   73          andn    %g3, %g1, %g1                   /* EER_SET_CLRBITS */
↓ open down ↓ 8 lines elided ↑ open up ↑
 126   82          membar  #Sync
 127   83          retl
 128   84          nop
 129   85          SET_SIZE(set_error_enable)
 130   86  
 131   87          ENTRY(get_error_enable)
 132   88          retl
 133   89          ldxa    [%g0]ASI_ESTATE_ERR, %o0        /* ecache error enable reg */
 134   90          SET_SIZE(get_error_enable)
 135   91  
 136      -#endif /* lint */
 137      -
 138      -#if defined(lint)
 139      -void
 140      -get_asyncflt(uint64_t *afsr)
 141      -{
 142      -        afsr = afsr;
 143      -}
 144      -#else /* lint */
 145      -
 146   92          ENTRY(get_asyncflt)
 147   93          ldxa    [%g0]ASI_AFSR, %o1              ! afsr reg
 148   94          retl
 149   95          stx     %o1, [%o0]
 150   96          SET_SIZE(get_asyncflt)
 151   97  
 152      -#endif /* lint */
 153      -
 154      -#if defined(lint)
 155      -void
 156      -set_asyncflt(uint64_t afsr)
 157      -{
 158      -        afsr = afsr;
 159      -}
 160      -#else /* lint */
 161      -
 162   98          ENTRY(set_asyncflt)
 163   99          stxa    %o0, [%g0]ASI_AFSR              ! afsr reg
 164  100          membar  #Sync
 165  101          retl
 166  102          nop
 167  103          SET_SIZE(set_asyncflt)
 168  104  
 169      -#endif /* lint */
 170      -
 171      -#if defined(lint)
 172      -void
 173      -get_asyncaddr(uint64_t *afar)
 174      -{
 175      -        afar = afar;
 176      -}
 177      -#else /* lint */
 178      -
 179  105          ENTRY(get_asyncaddr)
 180  106          ldxa    [%g0]ASI_AFAR, %o1              ! afar reg
 181  107          retl
 182  108          stx     %o1, [%o0]
 183  109          SET_SIZE(get_asyncaddr)
 184  110  
 185      -#endif /* lint */
 186      -
 187      -#if defined(lint) || defined(__lint)
 188      -
 189      -/* ARGSUSED */
 190      -hrtime_t
 191      -tick2ns(hrtime_t tick, uint_t cpuid)
 192      -{ return 0; }
 193      -
 194      -#else   /* lint */
 195      -
 196  111          ENTRY_NP(tick2ns)
 197  112          sethi   %hi(cpunodes), %o4
 198  113          or      %o4, %lo(cpunodes), %o4         ! %o4 = &cpunodes
 199  114          ! Register usage:
 200  115          !
 201  116          ! o0 = timestamp
 202  117          ! o2 = byte offset into cpunodes for tick_nsec_scale of this CPU
 203  118          ! o4 = &cpunodes
 204  119          !
 205  120          mulx    %o1, CPU_NODE_SIZE, %o2 ! %o2 = byte offset into cpunodes
 206  121          add     %o2, TICK_NSEC_SCALE, %o2
 207  122          ld      [%o4 + %o2], %o2        ! %o2 = cpunodes[cpuid].tick_nsec_scale
 208  123          NATIVE_TIME_TO_NSEC_SCALE(%o0, %o2, %o3, TICK_NSEC_SHIFT)
 209  124          retl
 210  125          nop
 211  126          SET_SIZE(tick2ns)
 212  127  
 213      -#endif  /* lint */
 214      -
 215      -#if defined(lint)
 216      -
 217      -/* ARGSUSED */
 218      -void
 219      -set_cmp_error_steering(void)
 220      -{}
 221      -
 222      -#else   /* lint */
 223      -
 224  128          ENTRY(set_cmp_error_steering)
 225  129          membar  #Sync
 226  130          set     ASI_CORE_ID, %o0                ! %o0 = ASI_CORE_ID
 227  131          ldxa    [%o0]ASI_CMP_PER_CORE, %o0      ! get ASI_CORE_ID
 228  132          and     %o0, COREID_MASK, %o0
 229  133          set     ASI_CMP_ERROR_STEERING, %o1     ! %o1 = ERROR_STEERING_REG
 230  134          stxa    %o0, [%o1]ASI_CMP_SHARED        ! this core now hadles
 231  135          membar  #Sync                           !  non-core specific errors
 232  136          retl
 233  137          nop
 234  138          SET_SIZE(set_cmp_error_steering)
 235  139  
 236      -#endif  /* lint */
 237      -
 238      -#if defined(lint)
 239      -
 240      -/* ARGSUSED */
 241      -uint64_t
 242      -ultra_getver(void)
 243      -{
 244      -        return (0); 
 245      -}
 246      -
 247      -#else /* lint */
 248      -
 249  140          ENTRY(ultra_getver)
 250  141          retl
 251  142          rdpr    %ver, %o0
 252  143          SET_SIZE(ultra_getver)
 253  144  
 254      -#endif /* lint */
 255      -
 256      -#if defined(lint)
 257      -
 258      -int
 259      -fpras_chkfn_type1(void)
 260      -{ return 0; }
 261      -
 262      -#else   /* lint */
 263      -
 264  145          /*
 265  146           * Check instructions using just the AX pipelines, designed by
 266  147           * C.B. Liaw of PNP.
 267  148           *
 268  149           * This function must match a struct fpras_chkfn and must be
 269  150           * block aligned.  A zero return means all was well.  These
 270  151           * instructions are chosen to be sensitive to bit corruptions
 271  152           * on the fpras rewrite, so if a bit corruption still produces
 272  153           * a valid instruction we should still get an incorrect result
 273  154           * here.  This function is never called directly - it is copied
↓ open down ↓ 140 lines elided ↑ open up ↑
 414  295            mov   CBO2, CBR2              ! 6, restore borrowed register
 415  296          .skip 4*(13-7+1)                ! 7 - 13
 416  297                                          !
 417  298                                          ! illegal instr'n trap comes here
 418  299                                          !
 419  300          mov     CBO2, CBR2              ! 14, restore borrowed register
 420  301          retl                            ! 15
 421  302            mov   FPRAS_BADTRAP, %o0      ! 16, how detected
 422  303          SET_SIZE(fpras_chkfn_type1)
 423  304  
 424      -#endif  /* lint */
 425      -
 426  305  /*
 427  306   * fp_zero() - clear all fp data registers and the fsr
 428  307   */
 429  308  
 430      -#if defined(lint) || defined(__lint)
 431      -
 432      -void
 433      -fp_zero(void)
 434      -{}
 435      -
 436      -#else   /* lint */
 437      -
 438  309          ENTRY_NP(fp_zero)
 439  310          std     %g0, [%sp + ARGPUSH + STACK_BIAS]
 440  311          fzero   %f0
 441  312          fzero   %f2
 442  313          ldd     [%sp + ARGPUSH + STACK_BIAS], %fsr
 443  314          faddd   %f0, %f2, %f4
 444  315          fmuld   %f0, %f2, %f6
 445  316          faddd   %f0, %f2, %f8
 446  317          fmuld   %f0, %f2, %f10
 447  318          faddd   %f0, %f2, %f12
↓ open down ↓ 18 lines elided ↑ open up ↑
 466  337          fmuld   %f0, %f2, %f50
 467  338          faddd   %f0, %f2, %f52
 468  339          fmuld   %f0, %f2, %f54
 469  340          faddd   %f0, %f2, %f56
 470  341          fmuld   %f0, %f2, %f58
 471  342          faddd   %f0, %f2, %f60
 472  343          retl
 473  344          fmuld   %f0, %f2, %f62
 474  345          SET_SIZE(fp_zero)
 475  346  
 476      -#endif  /* lint */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX