?? rf_readcc.s
字號:
/* * rf_readcc.s *//* * Copyright (c) 1996 Carnegie-Mellon University. * All rights reserved. * * Author: Jim Zelenka * * Permission to use, copy, modify and distribute this software and * its documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * * Carnegie Mellon requests users of this software to return to * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. *//* * Various clock-reading assembly stubs. */#ifdef __alpha/* * Read the process cycle counter, return its contents * (invoke the OSF/1 palcode rpcc operation) * * Assumes Alpha AXP architecture, OSF/1 palcode */#ifdef DEC_OSF#include <machine/asm.h>#include <machine/regdef.h>LEAF(rf_rpcc) rpcc v0 ret zero,(ra)END(rf_rpcc)#endif /* DEC_OSF */#ifdef NETBSD_ALPHA#include <machine/asm.h> .textLEAF(rf_rpcc,1) rpcc v0 RETEND(rf_rpcc)#endif /* NETBSD_ALPHA */#endif /* __alpha */#ifdef _IBMR2 .file "rf_readcc.s" .machine "pwr" # will this work on truly ancient machines? .toc .csect .rf_rtclock[PR] .globl .rf_rtclock .align 1 # word boundary.rf_rtclock: mfrtcu 6 # get upper word of rtclock st 6,0(3) # store indirect through arg1 mfrtcl 7 # get lower word of rtclock st 7,0(4) # store indirect through arg2 mfrtcu 0 # get upper word of rtclock again cmp 0,0,6 # make sure upper word hasn't changed (rolled) bne 0,.rf_rtclock # start over if rolled br cror 15,15,15tbtab: .long 0 .long 0x00002043 # hascodelen,namepres,saveslr,savescr .long 0x00000000 # nothin' (no backchain, no gp reg) .long tbtab-.rf_rtclock # code len .short 8 .string "rf_rtclock " .align 4.tocrf_rtclock: .tc rf_rtclock[tc],.rf_rtclock[PR],TOC[TC0],0 .globl rf_rtclock[tc]#endif /* _IBMR2 */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -