/*;*******************************************************************************
;* Function Name : void c_func(void *out, void *in, uint16_t n)
;* Description : linkable function with C language
;* Input : - R0 = out:
;* - R1 = in:
;* - R2 = n:
;* Output : None
;* Return : None
;********************************************************************************/
.cpu cortex-m3
.fpu softvfp
.syntax unified
.thumb
.text
.global c_func
;* #define N 64
.equ N, 64
.thumb_func
c_func:
STMFD SP!, {R4-R11, LR}
;* operation
LDRSR rx, [ry, #+0]
SUBS rx, ry, #+1 /* decrement */
MUL rz, rx, ry
MLA r4, r5, r4, r6
;* end of operation
LDMFD SP!, {R4-R11, PC}
BX LR /* return */
.end
댓글 없음:
댓글 쓰기