summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/mips/clock/clock.S
blob: eb5e31431c17899e54c247e61f1f4c1bbc90b74f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*  clock.s 
 *
 *  This file contains the assembly code for the IDT 4650 clock driver.
 *
 *  Author:     Craig Lebakken <craigl@transition.com>
 *
 *  COPYRIGHT (c) 1996 by Transition Networks Inc.
 *
 *  To anyone who acknowledges that this file is provided "AS IS"
 *  without any express or implied warranty:
 *      permission to use, copy, modify, and distribute this file
 *      for any purpose is hereby granted without fee, provided that
 *      the above copyright notice and this notice appears in all
 *      copies, and that the name of Transition Networks not be used in
 *      advertising or publicity pertaining to distribution of the
 *      software without specific, written prior permission.
 *      Transition Networks makes no representations about the suitability
 *      of this software for any purpose.
 *
 *  $Id$
 */
/* @(#)clock.S       08/20/96     1.2 */

#include <iregdef.h>
#include <idtcpu.h>
#include <asm.h>

FRAME(mips_set_timer,sp,0,ra)
	.set noreorder
        mfc0 t0,C0_COUNT
        nop
        addu t0,a0,t0
        mtc0 t0,C0_COMPARE
        j ra
	nop
	.set reorder
ENDFRAME(mips_set_timer)

FRAME(mips_get_timer,sp,0,ra)
	.set noreorder
        mfc0 v0,C0_COUNT
        j ra
	nop
	.set reorder
ENDFRAME(mips_get_timer)