Skip to content
Snippets Groups Projects
Commit 2aab8110 authored by Roberto Hexsel's avatar Roberto Hexsel
Browse files

stopCount missing in handlers.s

parent ed8eb887
No related branches found
No related tags found
No related merge requests found
......@@ -178,6 +178,24 @@ startCount:
#----------------------------------------------------------------
#================================================================
# stopCount disables the COUNT register, returns new CAUSE
# CAUSE.dc <= 1 to disable counting
#----------------------------------------------------------------
.text
.set noreorder
.global stopCount
.ent stopCount
stopCount:
mfc0 $v0, c0_cause
lui $v1, 0x0800
or $v0, $v0, $v1
jr $ra
mtc0 $v0, c0_cause
.end stopCount
#----------------------------------------------------------------
#================================================================
# readCount returns the value of the COUNT register
#----------------------------------------------------------------
......
//-------------------------------------------------------------------------
// test if COUNT register counts up monotonically
// returns error if the time to compute every 11th element of the Fibonacci
// sequence, as measured by COUNT is not monotonically increasing
// sequence, as measured by COUNT, is not monotonically increasing
//-------------------------------------------------------------------------
#include "cMIPS.h"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment