Print this page
de-linting of .s files


   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 1998 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 #pragma ident   "%Z%%M% %I%     %E% SMI"
  28 
  29 #include <sys/param.h>
  30 #include <sys/errno.h>
  31 #include <sys/asm_linkage.h>
  32 #include <sys/vtrace.h>
  33 #include <sys/machthread.h>
  34 #include <sys/clock.h>
  35 #include <sys/asi.h>
  36 #include <sys/fsr.h>
  37 #include <sys/privregs.h>
  38 #include <sys/pte.h>
  39 #include <sys/mmu.h>
  40 #include <sys/spitregs.h>
  41 
  42 #if defined(lint)
  43 
  44 #else   /* lint */
  45 #include "assym.h"
  46 #endif  /* lint */
  47 
  48 #define TT_HSM  0x99
  49 
  50 #if defined(lint)
  51 /* ARGSUSED */
  52 void
  53 ac_blkcopy(caddr_t src, caddr_t dst, u_int linecount, u_int linesize)
  54 {}
  55 #else /* !lint */
  56 !
  57 ! Move a single cache line of data.  Survive UE and CE on the read
  58 !
  59 ! i0 = src va
  60 ! i1 = dst va
  61 ! i2 = line count
  62 ! i3 = line size
  63 ! i4 = cache of fpu state
  64 !
  65         ENTRY(ac_blkcopy)
  66 
  67         ! TODO: can we safely SAVE here
  68         save    %sp, -SA(MINFRAME + 2*64), %sp
  69 
  70         ! XXX do we need to save the state of the fpu?
  71         rd      %fprs, %i4
  72         btst    (FPRS_DU|FPRS_DL|FPRS_FEF), %i4
  73 
  74         ! always enable FPU
  75         wr      %g0, FPRS_FEF, %fprs


 100 
 101 2:
 102         membar  #Sync
 103 
 104         ! restore fp to the way we got it
 105         btst    (FPRS_DU|FPRS_DL|FPRS_FEF), %i4
 106         bz,a    3f
 107          nop
 108 
 109         ! restore fpregs from stack
 110         add     %fp, STACK_BIAS - 81, %o2
 111         and     %o2, -64, %o2
 112         ldda    [%o2]ASI_BLK_P, %d0
 113         membar  #Sync
 114 
 115 3:
 116         wr      %g0, %i4, %fprs                 ! fpu back to the way it was
 117         ret
 118          restore
 119         SET_SIZE(ac_blkcopy)
 120 #endif /* lint */


   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 1998 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 


  27 #include <sys/param.h>
  28 #include <sys/errno.h>
  29 #include <sys/asm_linkage.h>
  30 #include <sys/vtrace.h>
  31 #include <sys/machthread.h>
  32 #include <sys/clock.h>
  33 #include <sys/asi.h>
  34 #include <sys/fsr.h>
  35 #include <sys/privregs.h>
  36 #include <sys/pte.h>
  37 #include <sys/mmu.h>
  38 #include <sys/spitregs.h>
  39 



  40 #include "assym.h"

  41 
  42 #define TT_HSM  0x99
  43 






  44 !
  45 ! Move a single cache line of data.  Survive UE and CE on the read
  46 !
  47 ! i0 = src va
  48 ! i1 = dst va
  49 ! i2 = line count
  50 ! i3 = line size
  51 ! i4 = cache of fpu state
  52 !
  53         ENTRY(ac_blkcopy)
  54 
  55         ! TODO: can we safely SAVE here
  56         save    %sp, -SA(MINFRAME + 2*64), %sp
  57 
  58         ! XXX do we need to save the state of the fpu?
  59         rd      %fprs, %i4
  60         btst    (FPRS_DU|FPRS_DL|FPRS_FEF), %i4
  61 
  62         ! always enable FPU
  63         wr      %g0, FPRS_FEF, %fprs


  88 
  89 2:
  90         membar  #Sync
  91 
  92         ! restore fp to the way we got it
  93         btst    (FPRS_DU|FPRS_DL|FPRS_FEF), %i4
  94         bz,a    3f
  95          nop
  96 
  97         ! restore fpregs from stack
  98         add     %fp, STACK_BIAS - 81, %o2
  99         and     %o2, -64, %o2
 100         ldda    [%o2]ASI_BLK_P, %d0
 101         membar  #Sync
 102 
 103 3:
 104         wr      %g0, %i4, %fprs                 ! fpu back to the way it was
 105         ret
 106          restore
 107         SET_SIZE(ac_blkcopy)