/*
================================ COPYRIGHT ================================
The contents of this file are subject to the VTech Informations Ltd. License
of VT-OS Ver. 1.1 operating system (the "License"); you may not use this 
file except in compliance with the License.  
 
Software distributed under the License is distributed on an "AS IS" basis, 
WITHOUT WARRANTY OF ANY KIND, either express or implied.  See the License 
for the specific language governing rights and limitations under the License.
 
The Original Code is VT-OS Ver. 1.1 Operating System, released 
on October 1st, 1999

The Initial Developer of the Original Code is VTech Informations Ltd.  All 
codes are Copyright (C) VTech Informations Ltd. 1999.  All Rights Reserved.
===========================================================================
*/

/*
===========================================================================
File        :   tlb.s
Author(s)   :   Thomas Cheng
Company     :   VTech Informations Ltd.
Project     :   Helio 
Date:	    :   October 1st, 1999
Purpose:	:   TLB
Revision    :   1.1
Note        :   None
===========================================================================
*/              


	.globl	TlbSetRandEntry
	.ent	TlbSetRandEntry
TlbSetRandEntry:
	.set	noat
	.set noreorder
	mfc0	$8, $10
 	mtc0	$4, $10
 	mtc0	$5, $2
 	nop
 	tlbwr
 	nop
 	mtc0	$8, $10
 	j		$31
 	nop
 	.set reorder
	.end	TlbSetRandEntry

	.globl	TlbSetEntry
	.ent	TlbSetEntry
TlbSetEntry:
	.set	noat
	.set noreorder
	mfc0	$8, $10
 	mtc0	$4, $0
 	mtc0	$5, $10
 	mtc0	$6, $2
 	nop
 	tlbwi
 	nop
 	mtc0	$8, $10
 	j		$31
 	nop
 	.set reorder
	.end	TlbSetEntry

	.globl	TlbGetEntry
	.ent	TlbGetEntry
TlbGetEntry:
	.set	noat
	.set noreorder
	mfc0	$8, $10
 	mtc0	$4, $0
 	nop
 	tlbr
 	nop
 	mfc0 $9, $10
 	sw	$9, 0($5)
 	mfc0	$9, $2
 	sw	$9, 0($6)
 	mtc0	$8, $10
 	j		$31
 	nop
 	.set reorder
	.end	TlbGetEntry
