📄 cmove.asm
字号:
******************************************************************
*
* CMOVE.ASM : TMS320C30 C-callable routine to move a complex float
* vector pointed by src, to an address pointed by dst.
*
* Calling conventions:
*
* void cmove((float *)src,(float *)dst,int src_displ,int dst_displ,int lenght)
* ar2 r2 r3 rc rs
*
* where src : Vector Source Address
* dst : Vector Destination Address
* src_displ: Source offsset (real)
* dst_displ: Destination offsset (real)
* lenght : Vector lenght (complex)
*
*****************************************************************
.global _cmove
.text
_cmove:
.if .REGPARM == 0
LDI SP,AR0
LDI *-AR0(1),AR2 ; Source address
LDI *-AR0(4),IR1 ; Destination index (real)
LDI *-AR0(5),RC ; Complex lenght
SUBI 2,RC ; RC=lenght-2
LDI *-AR0(2),AR1 ; Destination address
LDI *-AR0(3),IR0 ; Source index (real)
LDF *+AR2(1),R0
RPTB CMOVE
.else
LDI RC,IR1 ; destination index (real)
LDI RS,RC ; modified from 1st version
SUBI 2,RC ; complex lenght -2
LDI R2,AR1 ; source address
LDI R3,IR0 ; source index (real)
LDF *+AR2(1),R0
RPTB CMOVE
.endif
* loop
LDF *AR2++(IR0),R1
|| STF R0,*+AR1(1)
CMOVE LDF *+AR2(1),R0
|| STF R1,*AR1++(IR1)
POP AR0
BUD AR0
LDF *AR2++(IR0),R1
|| STF R0,*+AR1(1)
STF R1,*AR1
NOP
.end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -