idle.s

来自「Windows CE 6.0 BSP for VOIPAC Board (PXA」· S 代码 · 共 49 行

S
49
字号
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
#include <kxmips.h>

//------------------------------------------------------------------------------

LEAF_ENTRY(OALCPUIdle)

        .set noreorder

        addu    sp, -0x18
        sw      ra, 0x10(sp)

        jal     INTERRUPTS_ON
        nop

10:     la      t0, 10b                 // Obtain the address of this function
        cache   0x14, 0(t0)             // Cache-fill the 1st 32 bytes (1 line)
        cache   0x14, 32(t0)            // Cache-fill the 2nd 32 bytes
        nop

        .word   0x42000020              // Execute the wait 0 instruction

        nop                             // The wait and at least 4 instructions
        nop                             // ... must be cached
        nop
        nop

        jal     INTERRUPTS_OFF
        nop

        lw      ra, 0x10(sp)
        j       ra
        addu    sp, 0x18

        .set reorder
        .end OALCPUIdle

//------------------------------------------------------------------------------

⌨️ 快捷键说明

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