Print this page
de-linting of .s files

@@ -21,76 +21,31 @@
 /*
  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#if defined(lint) || defined(__lint)
-#include <sys/dtrace_impl.h>
-#else
 #include <sys/asm_linkage.h>
 #include <sys/privregs.h>
 #include <sys/fsr.h>
 #include <sys/asi.h>
 #include "assym.h"
-#endif
 
-#if defined(lint) || defined(__lint)
-
-int
-dtrace_getipl(void)
-{ return (0); }
-
-#else   /* lint */
-
         ENTRY_NP(dtrace_getipl)
         retl
         rdpr    %pil, %o0
         SET_SIZE(dtrace_getipl)
 
-#endif  /* lint */
-
-#if defined(lint) || defined(__lint)
-
-uint_t
-dtrace_getotherwin(void)
-{ return (0); }
-
-#else   /* lint */
-
         ENTRY_NP(dtrace_getotherwin)
         retl
         rdpr    %otherwin, %o0
         SET_SIZE(dtrace_getotherwin)
 
-#endif  /* lint */
-
-#if defined(lint) || defined(__lint)
-
-uint_t
-dtrace_getfprs(void)
-{ return (0); }
-
-#else   /* lint */
-
         ENTRY_NP(dtrace_getfprs)
         retl
         rd      %fprs, %o0
         SET_SIZE(dtrace_getfprs)
 
-#endif  /* lint */
-
-#if defined(lint) || defined(__lint)
-
-/*ARGSUSED*/
-void
-dtrace_getfsr(uint64_t *val)
-{}
-
-#else   /* lint */
-
         ENTRY_NP(dtrace_getfsr)
         rdpr    %pstate, %o1
         andcc   %o1, PSTATE_PEF, %g0
         bz,pn   %xcc, 1f
         nop

@@ -103,35 +58,15 @@
 1:
         retl
         stx     %g0, [%o0]
         SET_SIZE(dtrace_getfsr)
 
-#endif  /* lint */
-
-#if defined(lint) || defined(__lint)
-
-greg_t
-dtrace_getfp(void)
-{ return (0); }
-
-#else   /* lint */
-
         ENTRY_NP(dtrace_getfp)
         retl
         mov     %fp, %o0
         SET_SIZE(dtrace_getfp)
 
-#endif  /* lint */
-
-#if defined(lint) || defined(__lint)
-
-void
-dtrace_flush_user_windows(void)
-{}
-
-#else
-
         ENTRY_NP(dtrace_flush_user_windows)
         rdpr    %otherwin, %g1
         brz     %g1, 3f
         clr     %g2
 1:

@@ -146,36 +81,10 @@
 3:
         retl
         nop
         SET_SIZE(dtrace_flush_user_windows)
 
-#endif  /* lint */
-
-#if defined(lint) || defined(__lint)
-
-uint32_t
-dtrace_cas32(uint32_t *target, uint32_t cmp, uint32_t new)
-{
-        uint32_t old;
-
-        if ((old = *target) == cmp)
-                *target = new;
-        return (old);
-}
-
-void *
-dtrace_casptr(void *target, void *cmp, void *new)
-{
-        void *old;
-
-        if ((old = *(void **)target) == cmp)
-                *(void **)target = new;
-        return (old);
-}
-
-#else   /* lint */
-
         ENTRY(dtrace_cas32)
         cas     [%o0], %o1, %o2
         retl
         mov     %o2, %o0
         SET_SIZE(dtrace_cas32)

@@ -184,23 +93,10 @@
         casn    [%o0], %o1, %o2
         retl
         mov     %o2, %o0
         SET_SIZE(dtrace_casptr)
 
-#endif  /* lint */
-
-#if defined(lint)
-
-/*ARGSUSED*/
-uintptr_t
-dtrace_caller(int aframes)
-{
-        return (0);
-}
-
-#else   /* lint */
-
         ENTRY(dtrace_caller)
         sethi   %hi(nwin_minus_one), %g4
         ld      [%g4 + %lo(nwin_minus_one)], %g4
         rdpr    %canrestore, %g2
         cmp     %g2, %o0

@@ -231,23 +127,10 @@
         !
         retl
         mov     -1, %o0
         SET_SIZE(dtrace_caller)
 
-#endif
-
-#if defined(lint)
-
-/*ARGSUSED*/
-int
-dtrace_fish(int aframes, int reg, uintptr_t *regval)
-{
-        return (0);
-}
-
-#else   /* lint */
-
         ENTRY(dtrace_fish)
 
         rd      %pc, %g5
         ba      0f
         add     %g5, 12, %g5

@@ -309,22 +192,10 @@
         !
         retl
         add     %g2, 1, %o0             ! Failure; return deepest frame + 1
         SET_SIZE(dtrace_fish)
 
-#endif
-
-#if defined(lint)
-
-/*ARGSUSED*/
-void
-dtrace_copyin(uintptr_t uaddr, uintptr_t kaddr, size_t size,
-    volatile uint16_t *flags)
-{}
-
-#else
-
         ENTRY(dtrace_copyin)
         tst     %o2
         bz      2f
         clr     %g1
         lduba   [%o0 + %g1]ASI_USER, %g2

@@ -346,22 +217,10 @@
         retl
         nop
 
         SET_SIZE(dtrace_copyin)
 
-#endif
-
-#if defined(lint)
-
-/*ARGSUSED*/
-void
-dtrace_copyinstr(uintptr_t uaddr, uintptr_t kaddr, size_t size,
-    volatile  uint16_t *flags)
-{}
-
-#else
-
         ENTRY(dtrace_copyinstr)
         tst     %o2
         bz      2f
         clr     %g1
         lduba   [%o0 + %g1]ASI_USER, %g2

@@ -386,22 +245,10 @@
         retl
         nop
 
         SET_SIZE(dtrace_copyinstr)
 
-#endif
-
-#if defined(lint)
-
-/*ARGSUSED*/
-void
-dtrace_copyout(uintptr_t kaddr, uintptr_t uaddr, size_t size,
-    volatile  uint16_t *flags)
-{}
-
-#else
-
         ENTRY(dtrace_copyout)
         tst     %o2
         bz      2f
         clr     %g1
         ldub    [%o0 + %g1], %g2

@@ -422,22 +269,10 @@
 2:
         retl
         nop
         SET_SIZE(dtrace_copyout)
 
-#endif
-        
-#if defined(lint)
-
-/*ARGSUSED*/
-void
-dtrace_copyoutstr(uintptr_t kaddr, uintptr_t uaddr, size_t size,
-    volatile  uint16_t *flags)
-{}
-
-#else
-
         ENTRY(dtrace_copyoutstr)
         tst     %o2
         bz      2f
         clr     %g1
         ldub    [%o0 + %g1], %g2

@@ -461,111 +296,45 @@
 2:
         retl
         nop
         SET_SIZE(dtrace_copyoutstr)
 
-#endif
-
-#if defined(lint)
-
-/*ARGSUSED*/
-uintptr_t
-dtrace_fulword(void *addr)
-{ return (0); }
-
-#else
-
         ENTRY(dtrace_fulword)
         clr     %o1
         ldna    [%o0]ASI_USER, %o1
         retl
         mov     %o1, %o0
         SET_SIZE(dtrace_fulword)
 
-#endif
-
-#if defined(lint)
-
-/*ARGSUSED*/
-uint8_t
-dtrace_fuword8(void *addr)
-{ return (0); }
-
-#else
-
         ENTRY(dtrace_fuword8)
         clr     %o1
         lduba   [%o0]ASI_USER, %o1
         retl
         mov     %o1, %o0
         SET_SIZE(dtrace_fuword8)
 
-#endif
-
-#if defined(lint)
-
-/*ARGSUSED*/
-uint16_t
-dtrace_fuword16(void *addr)
-{ return (0); }
-
-#else
-
         ENTRY(dtrace_fuword16)
         clr     %o1
         lduha   [%o0]ASI_USER, %o1
         retl
         mov     %o1, %o0
         SET_SIZE(dtrace_fuword16)
 
-#endif
-
-#if defined(lint)
-
-/*ARGSUSED*/
-uint32_t
-dtrace_fuword32(void *addr)
-{ return (0); }
-
-#else
-
         ENTRY(dtrace_fuword32)
         clr     %o1
         lda     [%o0]ASI_USER, %o1
         retl
         mov     %o1, %o0
         SET_SIZE(dtrace_fuword32)
 
-#endif
-
-#if defined(lint)
-
-/*ARGSUSED*/
-uint64_t
-dtrace_fuword64(void *addr)
-{ return (0); }
-
-#else
-
         ENTRY(dtrace_fuword64)
         clr     %o1
         ldxa    [%o0]ASI_USER, %o1
         retl
         mov     %o1, %o0
         SET_SIZE(dtrace_fuword64)
 
-#endif
-
-#if defined(lint)
-
-/*ARGSUSED*/
-int
-dtrace_getupcstack_top(uint64_t *pcstack, int pcstack_limit, uintptr_t *sp)
-{ return (0); }
-
-#else
-
         /*
          * %g1  pcstack
          * %g2  current window
          * %g3  maxwin (nwindows - 1)
          * %g4  saved %cwp (so we can get back to the original window)

@@ -626,21 +395,10 @@
 2:
         retl
         nop
         SET_SIZE(dtrace_getupcstack_top)
 
-#endif
-
-#if defined(lint)
-
-/*ARGSUSED*/
-int
-dtrace_getustackdepth_top(uintptr_t *sp)
-{ return (0); }
-
-#else
-
         ENTRY(dtrace_getustackdepth_top)
         mov     %o0, %o2
         rdpr    %otherwin, %o0
 
         brlez,a,pn %o0, 2f              ! return 0 if there are no user wins

@@ -667,21 +425,10 @@
 2:
         retl
         nop
         SET_SIZE(dtrace_getustackdepth_top)
 
-#endif
-
-#if defined(lint) || defined(__lint)
-
-/* ARGSUSED */
-ulong_t
-dtrace_getreg_win(uint_t reg, uint_t depth)
-{ return (0); }
-
-#else   /* lint */
-
         ENTRY(dtrace_getreg_win)
         sub     %o0, 16, %o0
         cmp     %o0, 16                 ! %o0 must begin in the range [16..32)
         blu,pt  %xcc, 1f
         nop

@@ -733,21 +480,10 @@
         mov     %i5, %g1
         mov     %i6, %g1
         mov     %i7, %g1
         SET_SIZE(dtrace_getreg_win)
 
-#endif  /* lint */
-
-#if defined(lint) || defined(__lint)
-
-/* ARGSUSED */
-void
-dtrace_putreg_win(uint_t reg, ulong_t value)
-{}
-
-#else   /* lint */
-
         ENTRY(dtrace_putreg_win)
         sub     %o0, 16, %o0
         cmp     %o0, 16                 ! %o0 must be in the range [16..32)
         blu,pt  %xcc, 1f
         nop

@@ -800,22 +536,10 @@
         mov     %g1, %i5
         mov     %g1, %i6
         mov     %g1, %i7
         SET_SIZE(dtrace_putreg_win)
 
-#endif  /* lint */
-
-#if defined(lint) || defined(__lint)
-
-/*ARGSUSED*/
-void
-dtrace_probe_error(dtrace_state_t *state, dtrace_epid_t epid, int which,
-    int fault, int fltoffs, uintptr_t illval)
-{}
-
-#else   /* lint */
-
         ENTRY(dtrace_probe_error)
         save    %sp, -SA(MINFRAME), %sp
         sethi   %hi(dtrace_probeid_error), %l0
         ld      [%l0 + %lo(dtrace_probeid_error)], %o0
         mov     %i0, %o1

@@ -826,6 +550,5 @@
         mov     %i4, %o5
         ret
         restore
         SET_SIZE(dtrace_probe_error)
 
-#endif