counter.s

来自「WinCE 3.0 BSP, 包含Inter SA1110, Intel_815」· S 代码 · 共 59 行

S
59
字号
/*++
Copyright (c) 1997  Microsoft Corporation

Module Name:

    counter.s

Abstract:

    Routines to work the cpu counter

Author:

    John Cooper (johncoop) 97-oct-24

--*/

#include <kxmips.h>


/////////////////////////////////////////////////////////////////
//
// startcount()
//
// Reset the counter register inside the cpu to zero.
//

LEAF_ENTRY(startcount)

    .set    noreorder
    .set    noat


    mtc0    zero,count                 // move 0 to count register
    j       ra
    nop

    .end    startcount

/////////////////////////////////////////////////////////////////
//
// checkcount()
//
// Read the counter register inside the cpu
// return the value in v0.
//

LEAF_ENTRY(checkcount)

    .set    noreorder
    .set    noat


    mfc0    v0,count                 // move count register to return reg
    j       ra
    nop

    .end    checkcount

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?