Print this page
de-linting of .s files
*** 21,32 ****
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
- #pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/param.h>
#include <sys/errno.h>
#include <sys/asm_linkage.h>
#include <sys/vtrace.h>
#include <sys/machthread.h>
--- 21,30 ----
*** 33,45 ****
#include <sys/clock.h>
#include <sys/asi.h>
#include <sys/fsr.h>
#include <sys/privregs.h>
- #if !defined(lint)
#include "assym.h"
- #endif /* lint */
/*
* Error barrier:
* We use membar sync to establish an error barrier for
* deferred errors. Membar syncs are added before any update
--- 31,41 ----
*** 58,76 ****
* copystr(from, to, maxlength, lencopied)
* caddr_t from, to;
* u_int maxlength, *lencopied;
*/
- #if defined(lint)
-
- /* ARGSUSED */
- int
- copystr(const char *from, char *to, size_t maxlength, size_t *lencopied)
- { return(0); }
-
- #else /* lint */
-
ENTRY(copystr)
orcc %o2, %g0, %o4 ! save original count
bg,a %ncc, 1f
sub %o0, %o1, %o0 ! o0 gets the difference of src and dst
--- 54,63 ----
*** 111,137 ****
2:
retl
nop
SET_SIZE(copystr)
- #endif /* lint */
-
/*
* Copy a null terminated string from the user address space into
* the kernel address space.
*/
- #if defined(lint)
- /* ARGSUSED */
- int
- copyinstr(const char *uaddr, char *kaddr, size_t maxlength,
- size_t *lencopied)
- { return (0); }
-
- #else /* lint */
-
ENTRY(copyinstr)
sethi %hi(.copyinstr_err), %o4
ldn [THREAD_REG + T_LOFAULT], %o5 ! catch faults
or %o4, %lo(.copyinstr_err), %o4
membar #Sync ! sync error barrier
--- 98,113 ----
*** 192,213 ****
2:
membar #Sync ! sync error barrier
retl
stn %o5, [THREAD_REG + T_LOFAULT] ! stop catching faults
SET_SIZE(copyinstr)
- #endif
- #if defined(lint)
-
- /* ARGSUSED */
- int
- copyinstr_noerr(const char *uaddr, char *kaddr, size_t maxlength,
- size_t *lencopied)
- { return (0); }
-
- #else /* lint */
-
ENTRY(copyinstr_noerr)
mov %o2, %o4 ! save original count
! maxlength is unsigned so the only error is if it's 0
brz,a,pn %o2, .copyinstr_noerr_out
--- 168,178 ----
*** 245,271 ****
2:
retl
nop
SET_SIZE(copyinstr_noerr)
- #endif /* lint */
-
/*
* Copy a null terminated string from the kernel
* address space to the user address space.
*/
- #if defined(lint)
-
- /* ARGSUSED */
- int
- copyoutstr(const char *kaddr, char *uaddr, size_t maxlength,
- size_t *lencopied)
- { return (0); }
-
- #else /* lint */
-
ENTRY(copyoutstr)
sethi %hi(.copyoutstr_err), %o5
ldn [THREAD_REG + T_LOFAULT], %o4 ! catch faults
or %o5, %lo(.copyoutstr_err), %o5
membar #Sync ! sync error barrier
--- 210,224 ----
*** 328,349 ****
membar #Sync ! sync error barrier
retl
stn %o5, [THREAD_REG + T_LOFAULT] ! stop catching faults
SET_SIZE(copyoutstr)
- #endif /* lint */
-
- #if defined(lint)
-
- /* ARGSUSED */
- int
- copyoutstr_noerr(const char *kaddr, char *uaddr, size_t maxlength,
- size_t *lencopied)
- { return (0); }
-
- #else /* lint */
-
ENTRY(copyoutstr_noerr)
mov %o2, %o4 ! save original count
brz,a,pn %o2, .copyoutstr_noerr_out
mov ENAMETOOLONG, %o0
--- 281,290 ----
*** 380,407 ****
2:
retl
nop
SET_SIZE(copyoutstr_noerr)
- #endif /* lint */
-
/*
* Copy a block of storage. If the source and target regions overlap,
* one or both of the regions will be silently corrupted.
* No fault handler installed (to be called under on_fault())
*/
- #if defined(lint)
-
- /* ARGSUSED */
- void
- ucopy(const void *ufrom, void *uto, size_t ulength)
- {}
-
- #else /* lint */
-
ENTRY(ucopy)
save %sp, -SA(MINFRAME), %sp ! get another window
subcc %g0, %i2, %i3
add %i0, %i2, %i0
--- 321,337 ----
*** 415,441 ****
5:
ret
restore %g0, 0, %o0 ! return (0)
SET_SIZE(ucopy)
- #endif /* lint */
/*
* Copy a user-land string. If the source and target regions overlap,
* one or both of the regions will be silently corrupted.
* No fault handler installed (to be called under on_fault())
*/
- #if defined(lint)
-
- /* ARGSUSED */
- void
- ucopystr(const char *ufrom, char *uto, size_t umaxlength, size_t *ulencopied)
- {}
-
- #else /* lint */
-
ENTRY(ucopystr)
save %sp, -SA(MINFRAME), %sp ! get another window
brz %i2, 5f
clr %i5
--- 345,361 ----
*** 453,458 ****
6:
ret
restore %g0, 0, %o0 ! return (0)
SET_SIZE(ucopystr)
- #endif /* lint */
--- 373,377 ----