Print this page
de-linting of .s files


   6  * (the "License").  You may not use this file except in compliance
   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*
  23  * Copyright (c) 2007 by Sun Microsystems, Inc.
  24  */
  25 
  26 #pragma ident   "%Z%%M% %I%     %E% SMI"
  27 
  28 /*
  29  * General machine architecture & implementation specific
  30  * assembly language routines.
  31  */
  32 #if defined(lint)
  33 #include <sys/types.h>
  34 #include <sys/machsystm.h>
  35 #include <sys/t_lock.h>
  36 #else   /* lint */
  37 #include "assym.h"
  38 #endif  /* lint */
  39 
  40 #include <sys/asm_linkage.h>
  41 #include <sys/eeprom.h>
  42 #include <sys/param.h>
  43 #include <sys/async.h>
  44 #include <sys/intreg.h>
  45 #include <sys/machthread.h>
  46 #include <sys/iocache.h>
  47 #include <sys/privregs.h>
  48 #include <sys/archsystm.h>
  49 
  50 #if defined(lint)
  51 
  52 /*ARGSUSED*/
  53 void
  54 memscrub_read(caddr_t vaddr, u_int blks)
  55 {}
  56 
  57 #else   /* lint */
  58 
  59         !
  60         ! void  memscrub_read(caddr_t src, u_int blks)
  61         !
  62 
  63         .seg ".text"
  64         .align  4
  65 
  66         ENTRY(memscrub_read)
  67         srl     %o1, 0, %o1                     ! clear upper word of blk count
  68         rd      %fprs, %o2                      ! get the status of fp
  69         wr      %g0, FPRS_FEF, %fprs            ! enable fp
  70 
  71 1:
  72         prefetch [%o0 + 8*64], 0
  73         ldda    [%o0]ASI_BLK_P, %d0
  74         add     %o0, 64, %o0
  75         prefetch [%o0 + 8*64], 0
  76         ldda    [%o0]ASI_BLK_P, %d16
  77         add     %o0, 64, %o0
  78         prefetch [%o0 + 8*64], 0
  79         ldda    [%o0]ASI_BLK_P, %d32
  80         add     %o0, 64, %o0
  81         prefetch [%o0 + 8*64], 0
  82         ldda    [%o0]ASI_BLK_P, %d48
  83         dec     %o1
  84         brnz,a  %o1, 1b
  85         add     %o0, 64, %o0
  86 
  87         retl
  88         wr      %o2, 0, %fprs                   ! restore fprs (disabled)
  89         SET_SIZE(memscrub_read)
  90 
  91 #endif  /* lint */


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


  26 /*
  27  * General machine architecture & implementation specific
  28  * assembly language routines.
  29  */





  30 #include "assym.h"

  31 
  32 #include <sys/asm_linkage.h>
  33 #include <sys/eeprom.h>
  34 #include <sys/param.h>
  35 #include <sys/async.h>
  36 #include <sys/intreg.h>
  37 #include <sys/machthread.h>
  38 #include <sys/iocache.h>
  39 #include <sys/privregs.h>
  40 #include <sys/archsystm.h>
  41 









  42         !
  43         ! void  memscrub_read(caddr_t src, u_int blks)
  44         !
  45 
  46         .seg ".text"
  47         .align  4
  48 
  49         ENTRY(memscrub_read)
  50         srl     %o1, 0, %o1                     ! clear upper word of blk count
  51         rd      %fprs, %o2                      ! get the status of fp
  52         wr      %g0, FPRS_FEF, %fprs            ! enable fp
  53 
  54 1:
  55         prefetch [%o0 + 8*64], 0
  56         ldda    [%o0]ASI_BLK_P, %d0
  57         add     %o0, 64, %o0
  58         prefetch [%o0 + 8*64], 0
  59         ldda    [%o0]ASI_BLK_P, %d16
  60         add     %o0, 64, %o0
  61         prefetch [%o0 + 8*64], 0
  62         ldda    [%o0]ASI_BLK_P, %d32
  63         add     %o0, 64, %o0
  64         prefetch [%o0 + 8*64], 0
  65         ldda    [%o0]ASI_BLK_P, %d48
  66         dec     %o1
  67         brnz,a  %o1, 1b
  68         add     %o0, 64, %o0
  69 
  70         retl
  71         wr      %o2, 0, %fprs                   ! restore fprs (disabled)
  72         SET_SIZE(memscrub_read)
  73