?? updatefilt.asm.bak
字號:
/*********************************************************************************
Module Name : .asm
Label Name :
Version Date Author Comments
1.0 15/02/2007 HuBo Original
Description : This function performs FIR filter operation on given input.
Prototype : void _updatafilt(short *h, short *pSig, short send)
return : None
Performance :
*******************************************************************************/
.section L1_code;
.global _updatefilt;
.align 8;
/*h(k)=(h(k)<<16+(r(n)<<16)*s(n-k))>>16*/
_updatefilt:
LINK 0x30 ;
[ -- SP ] = (R7:4);
I0 = R0;
I2 = R0;
I1 = R1;
P2 = 256;
R0 = [I0++]; //load h[0] and increase I0;
R7 = 0x7fff;
M0 = 4;
M1 = 2;
R1 = I1; /*store address of s_register[256+i]*/
R3 = 0x00000003;
R3 = R1 & R3;
CC = R3 == 0;
if !CC JUMP offset_1;
offset_0:
/*initiate a0, a1 and R3, a0 and a1 left ashift 15*/
R1.L = W[I1--];
LSETUP(update_coef_beg_0, update_coef_end_0) LC0 = P2>>1;
update_coef_beg_0: A0 = R0.L * R7.L, A1 = R0.H * R7.L || R1.H = W[I1--] ; /*a0 and a1 left shift 16 bit*/
/*the high half of the result is extracted and stored in the 16-bit destination registers */
R0.L = (A0 += R2.L * R1.L) , R0.H = (A1 += R2.L * R1.H) || R1.L = W[I1--];
update_coef_end_0: MNOP ||[I2++M0] = R0 || R0 = [I0++M0];//store R0 and increase I0;
jump update_end;
offset_1:/*the address of s_register[256+i] isn't aligned by 4-byte */
I1 -= M1;
LSETUP(update_coef_beg_1, update_coef_end_1) LC0 = P2>>1;
update_coef_beg_1: A0 = R0.L * R7.L, A1 = R0.H * R7.L || R1 = [I1--] ;/*a0 and a1 left shift 16 bit*/
/*the high half of the result is extracted and stored in the 16-bit destination registers */
R0.L = (A0 += R2.L * R1.L), R0.H = (A1 += R2.L * R1.H);// || R1.L = W[I1--];
update_coef_end_1: MNOP || [I2++M0]=R0 || R0 = [I0++M0];//store R0 and increase I0;
update_end:
(R7:4) = [ SP++ ] ; //Load register R7-R4
UNLINK;
RTS;
_updatefilt.end:
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -