⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sdk-cycle_count.asm

📁 ADI blackfin DSP的基于device friver的jpeg压缩算法
💻 ASM
字号:
/*******************************************************************************
Copyright(c) 2000 - 2002 Analog Devices. All Rights Reserved.
Developed by Joint Development Software Application Team, IPDC, Bangalore, India
for Blackfin DSPs  ( Micro Signal Architecture 1.0 specification).
    By using this module you agree to the terms of the Analog Devices License
Agreement for DSP Software. 
********************************************************************************/
.extern _f1;



// This function computes cycle count of the function pointed by an external variable f1.
// The calling function sets up the "f1" pointer, so it points to the function to be 
// measured.  The number of arguments varies, to the measured function, and so the
// argument list will also vary, to Compute_Cycle_Count.  Since most of the functions 
// that currently call this function. In the case of the BlackfinSDK image processing 
// and analysis functions, there are usually four arguments to the function being 
// measured, but sometimes five and sometimes three.  When there are fewer arguments, 
// dummy arguments of zero will be passed, to allow the function prototype to be defined
// with five arguments.



.section L1_code;
.global _Compute_Cycle_Count;
.align 8;
_Compute_Cycle_Count:
        P0.L = _Ret_Add;
        P0.H = _Ret_Add;
        R3 = RETS;
        [P0] = R3;

        P0.L = _Save_R7;
        P0.H = _Save_R7;
        [P0] = R7;

        P0.L = _f1;
        P0.H = _f1;
        P0 = [P0];

        NOP;NOP;NOP;NOP;

        R7 = CYCLES;
        CALL (P0);
        R0 = CYCLES;
        NOP;
        R0 = R0 - R7;
        R0 += -5;

        P0.L = _Save_R7;
        P0.H = _Save_R7;
        R7 = [P0];
        
        P0.L = _Ret_Add;
        P0.H = _Ret_Add;
        R3 = [P0];
        RETS = R3;
        
        NOP;NOP;NOP;NOP;
        RTS;

_Compute_Cycle_Count.end:
        
                
.section data1;
.align 4;
        .var _Ret_Add;
        .var _Save_R7;

⌨️ 快捷键说明

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