17c478bd9Sstevel@tonic-gate! 2*5c7544f7SDavid Plauger! Copyright 2008 Sun Microsystems, Inc. All rights reserved. 37c478bd9Sstevel@tonic-gate! Use is subject to license terms. 47c478bd9Sstevel@tonic-gate! 57c478bd9Sstevel@tonic-gate! CDDL HEADER START 67c478bd9Sstevel@tonic-gate! 77c478bd9Sstevel@tonic-gate! The contents of this file are subject to the terms of the 8*5c7544f7SDavid Plauger! Common Development and Distribution License (the "License"). 9*5c7544f7SDavid Plauger! You may not use this file except in compliance with the License. 107c478bd9Sstevel@tonic-gate! 117c478bd9Sstevel@tonic-gate! You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 127c478bd9Sstevel@tonic-gate! or http://www.opensolaris.org/os/licensing. 137c478bd9Sstevel@tonic-gate! See the License for the specific language governing permissions 147c478bd9Sstevel@tonic-gate! and limitations under the License. 157c478bd9Sstevel@tonic-gate! 167c478bd9Sstevel@tonic-gate! When distributing Covered Code, include this CDDL HEADER in each 177c478bd9Sstevel@tonic-gate! file and include the License file at usr/src/OPENSOLARIS.LICENSE. 187c478bd9Sstevel@tonic-gate! If applicable, add the following below this CDDL HEADER, with the 197c478bd9Sstevel@tonic-gate! fields enclosed by brackets "[]" replaced with your own identifying 207c478bd9Sstevel@tonic-gate! information: Portions Copyright [yyyy] [name of copyright owner] 217c478bd9Sstevel@tonic-gate! 227c478bd9Sstevel@tonic-gate! CDDL HEADER END 237c478bd9Sstevel@tonic-gate! 247c478bd9Sstevel@tonic-gate! 257c478bd9Sstevel@tonic-gate! In-line functions for sparc kernels. 267c478bd9Sstevel@tonic-gate! 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gate! return current thread pointer 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate .inline threadp,0 317c478bd9Sstevel@tonic-gate .register %g7, #scratch 327c478bd9Sstevel@tonic-gate mov %g7, %o0 337c478bd9Sstevel@tonic-gate .end 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gate! return caller 367c478bd9Sstevel@tonic-gate 377c478bd9Sstevel@tonic-gate .inline caller,0 387c478bd9Sstevel@tonic-gate mov %i7, %o0 397c478bd9Sstevel@tonic-gate .end 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gate! return callee 427c478bd9Sstevel@tonic-gate 437c478bd9Sstevel@tonic-gate .inline callee,0 447c478bd9Sstevel@tonic-gate mov %o7, %o0 457c478bd9Sstevel@tonic-gate .end 467c478bd9Sstevel@tonic-gate 477c478bd9Sstevel@tonic-gate! needed by krtld 487c478bd9Sstevel@tonic-gate 497c478bd9Sstevel@tonic-gate .inline doflush,0 507c478bd9Sstevel@tonic-gate andn %o0, 3, %o0 517c478bd9Sstevel@tonic-gate flush %o0 527c478bd9Sstevel@tonic-gate .end 53*5c7544f7SDavid Plauger 54*5c7544f7SDavid Plauger! prefetch 64 bytes into L2-cache 55*5c7544f7SDavid Plauger 56*5c7544f7SDavid Plauger .inline prefetch64,8 57*5c7544f7SDavid Plauger prefetch [%o0], #n_writes 58*5c7544f7SDavid Plauger .end 59