📄 flushdc.src
字号:
;
; Copyright(C) Renesas Technology Corp. 2004. All rights reserved.
;
; generic cache routines for ITS-DS7 Ver.0.8.0
;
; FILE : flushdc.src
; CREATED : 2004.09.01
; MODIFIED :
; AUTHOR : Renesas Technology Corp.
; HARDWARE : RENESAS ITS-DS7
; HISTORY :
; 2004.09.01
; - Created release code.
; (based on ASPEN for WCE5.0)
;
;
; 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 "kxshx.h"
.include "shx.inc"
.align 4
.import _SH4CacheLines
;
;++
; Routine Description:
; Flush and invalidate the entire data cache
;
; Syntax:
; void SH4FlushDCache(DWORD dwCacheLines);
;
; Arguments:
; dwCacheLines -- number of lines in the data cache
;
; Return Value:
; -- none --
;--
LEAF_ENTRY _SH4FlushDCache
mov r4, r2
shlr2 r2 ; (r2) = # of cache entries / 4
mov #h'F4000000, r1 ; (r1) = ptr to memory mapped cache
mov #0, r0 ; (r0) = 0 for clearing cache tags
; Flush & validate all cache lines.
; (r0) = 0
; (r1) = ptr to memory mapped cache address array
; (r2) = # of cache entries / 4
; (r4) = original SR
fc10:
mov r0, @r1 ; invalidate 4 cache lines at a time
mov r0, @(32,r1)
add #64, r1
mov r0, @r1 ; invalidate 4 cache lines at a time
mov r0, @(32,r1)
dt r2 ; (r2) = # of entries remaining
bf/s fc10
add #64, r1 ; (r1) = ptr to next set of 4 entries
rts
nop
.endf
.end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -