194e7edb1Slucy wang - Sun Microsystems - Beijing China /* 294e7edb1Slucy wang - Sun Microsystems - Beijing China * CDDL HEADER START 394e7edb1Slucy wang - Sun Microsystems - Beijing China * 494e7edb1Slucy wang - Sun Microsystems - Beijing China * The contents of this file are subject to the terms of the 594e7edb1Slucy wang - Sun Microsystems - Beijing China * Common Development and Distribution License (the "License"). 694e7edb1Slucy wang - Sun Microsystems - Beijing China * You may not use this file except in compliance with the License. 794e7edb1Slucy wang - Sun Microsystems - Beijing China * 894e7edb1Slucy wang - Sun Microsystems - Beijing China * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 994e7edb1Slucy wang - Sun Microsystems - Beijing China * or http://www.opensolaris.org/os/licensing. 1094e7edb1Slucy wang - Sun Microsystems - Beijing China * See the License for the specific language governing permissions 1194e7edb1Slucy wang - Sun Microsystems - Beijing China * and limitations under the License. 1294e7edb1Slucy wang - Sun Microsystems - Beijing China * 1394e7edb1Slucy wang - Sun Microsystems - Beijing China * When distributing Covered Code, include this CDDL HEADER in each 1494e7edb1Slucy wang - Sun Microsystems - Beijing China * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1594e7edb1Slucy wang - Sun Microsystems - Beijing China * If applicable, add the following below this CDDL HEADER, with the 1694e7edb1Slucy wang - Sun Microsystems - Beijing China * fields enclosed by brackets "[]" replaced with your own identifying 1794e7edb1Slucy wang - Sun Microsystems - Beijing China * information: Portions Copyright [yyyy] [name of copyright owner] 1894e7edb1Slucy wang - Sun Microsystems - Beijing China * 1994e7edb1Slucy wang - Sun Microsystems - Beijing China * CDDL HEADER END 2094e7edb1Slucy wang - Sun Microsystems - Beijing China */ 2194e7edb1Slucy wang - Sun Microsystems - Beijing China 2294e7edb1Slucy wang - Sun Microsystems - Beijing China /* 2394e7edb1Slucy wang - Sun Microsystems - Beijing China * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 2494e7edb1Slucy wang - Sun Microsystems - Beijing China * Use is subject to license terms. 2594e7edb1Slucy wang - Sun Microsystems - Beijing China */ 2694e7edb1Slucy wang - Sun Microsystems - Beijing China 2794e7edb1Slucy wang - Sun Microsystems - Beijing China #ifndef _ASM_CPU_H 2894e7edb1Slucy wang - Sun Microsystems - Beijing China #define _ASM_CPU_H 2994e7edb1Slucy wang - Sun Microsystems - Beijing China 30*6b7143d7SRichard Lowe #include <sys/ccompile.h> 3194e7edb1Slucy wang - Sun Microsystems - Beijing China #include <sys/types.h> 3294e7edb1Slucy wang - Sun Microsystems - Beijing China 3394e7edb1Slucy wang - Sun Microsystems - Beijing China #ifdef __cplusplus 3494e7edb1Slucy wang - Sun Microsystems - Beijing China extern "C" { 3594e7edb1Slucy wang - Sun Microsystems - Beijing China #endif 3694e7edb1Slucy wang - Sun Microsystems - Beijing China 3794e7edb1Slucy wang - Sun Microsystems - Beijing China #if !defined(__lint) && defined(__GNUC__) 3894e7edb1Slucy wang - Sun Microsystems - Beijing China 39*6b7143d7SRichard Lowe extern __GNU_INLINE void 4094e7edb1Slucy wang - Sun Microsystems - Beijing China prefetch_read_many(void *addr) 4194e7edb1Slucy wang - Sun Microsystems - Beijing China { 4294e7edb1Slucy wang - Sun Microsystems - Beijing China #if defined(__sparcv9) 4394e7edb1Slucy wang - Sun Microsystems - Beijing China __asm__ __volatile__( 4494e7edb1Slucy wang - Sun Microsystems - Beijing China "prefetch [%0],#n_reads\n\t" 4594e7edb1Slucy wang - Sun Microsystems - Beijing China : "=r" (addr) 4694e7edb1Slucy wang - Sun Microsystems - Beijing China : "0" (addr)); 4794e7edb1Slucy wang - Sun Microsystems - Beijing China #else 4894e7edb1Slucy wang - Sun Microsystems - Beijing China #error "port me" 4994e7edb1Slucy wang - Sun Microsystems - Beijing China #endif 5094e7edb1Slucy wang - Sun Microsystems - Beijing China } 5194e7edb1Slucy wang - Sun Microsystems - Beijing China 52*6b7143d7SRichard Lowe extern __GNU_INLINE void 5394e7edb1Slucy wang - Sun Microsystems - Beijing China prefetch_read_once(void *addr) 5494e7edb1Slucy wang - Sun Microsystems - Beijing China { 5594e7edb1Slucy wang - Sun Microsystems - Beijing China #if defined(__sparcv9) 5694e7edb1Slucy wang - Sun Microsystems - Beijing China __asm__ __volatile__( 5794e7edb1Slucy wang - Sun Microsystems - Beijing China "prefetch [%0],#one_read\n\t" 5894e7edb1Slucy wang - Sun Microsystems - Beijing China : "=r" (addr) 5994e7edb1Slucy wang - Sun Microsystems - Beijing China : "0" (addr)); 6094e7edb1Slucy wang - Sun Microsystems - Beijing China #else 6194e7edb1Slucy wang - Sun Microsystems - Beijing China #error "port me" 6294e7edb1Slucy wang - Sun Microsystems - Beijing China #endif 6394e7edb1Slucy wang - Sun Microsystems - Beijing China } 6494e7edb1Slucy wang - Sun Microsystems - Beijing China 65*6b7143d7SRichard Lowe extern __GNU_INLINE void 6694e7edb1Slucy wang - Sun Microsystems - Beijing China prefetch_write_many(void *addr) 6794e7edb1Slucy wang - Sun Microsystems - Beijing China { 6894e7edb1Slucy wang - Sun Microsystems - Beijing China #if defined(__sparcv9) 6994e7edb1Slucy wang - Sun Microsystems - Beijing China __asm__ __volatile__( 7094e7edb1Slucy wang - Sun Microsystems - Beijing China "prefetch [%0],#n_writes\n\t" 7194e7edb1Slucy wang - Sun Microsystems - Beijing China : "=r" (addr) 7294e7edb1Slucy wang - Sun Microsystems - Beijing China : "0" (addr)); 7394e7edb1Slucy wang - Sun Microsystems - Beijing China #else 7494e7edb1Slucy wang - Sun Microsystems - Beijing China #error "port me" 7594e7edb1Slucy wang - Sun Microsystems - Beijing China #endif 7694e7edb1Slucy wang - Sun Microsystems - Beijing China } 7794e7edb1Slucy wang - Sun Microsystems - Beijing China 78*6b7143d7SRichard Lowe extern __GNU_INLINE void 7994e7edb1Slucy wang - Sun Microsystems - Beijing China prefetch_write_once(void *addr) 8094e7edb1Slucy wang - Sun Microsystems - Beijing China { 8194e7edb1Slucy wang - Sun Microsystems - Beijing China #if defined(__sparcv9) 8294e7edb1Slucy wang - Sun Microsystems - Beijing China __asm__ __volatile__( 8394e7edb1Slucy wang - Sun Microsystems - Beijing China "prefetch [%0],#one_write\n\t" 8494e7edb1Slucy wang - Sun Microsystems - Beijing China : "=r" (addr) 8594e7edb1Slucy wang - Sun Microsystems - Beijing China : "0" (addr)); 8694e7edb1Slucy wang - Sun Microsystems - Beijing China #else 8794e7edb1Slucy wang - Sun Microsystems - Beijing China #error "port me" 8894e7edb1Slucy wang - Sun Microsystems - Beijing China #endif 8994e7edb1Slucy wang - Sun Microsystems - Beijing China } 9094e7edb1Slucy wang - Sun Microsystems - Beijing China 9194e7edb1Slucy wang - Sun Microsystems - Beijing China #endif /* !__lint && __GNUC__ */ 9294e7edb1Slucy wang - Sun Microsystems - Beijing China 9394e7edb1Slucy wang - Sun Microsystems - Beijing China #ifdef __cplusplus 9494e7edb1Slucy wang - Sun Microsystems - Beijing China } 9594e7edb1Slucy wang - Sun Microsystems - Beijing China #endif 9694e7edb1Slucy wang - Sun Microsystems - Beijing China 9794e7edb1Slucy wang - Sun Microsystems - Beijing China #endif /* _ASM_CPU_H */ 98