This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Mixing assembly with C

2100.hwafft.txt

Hi,

I am trying to write C callable assembly functions for 5515 device. I would like to know which registers should be saved on stack by the called assembly function? I looked the code for hardware fft routines (see attached file), but some function in these files saved nothing to stack!! for example

 

;******************************************************************************

; Bit-reverses data vector

;******************************************************************************

_hwafft_br:

                ; XAR0 : input vector address

                ; XAR1 : output vector address

                ; T0 : data_len -- size of input/output vectors


                bit(ST2, #15) = #0           ; clear ARMS


                T1 = T0 - #1

                BRC0 = T1

                localrepeat {

                    AC3 = dbl(*AR0+)                   

                    dbl(*(AR1 + T0B)) = AC3

                }


                bit(ST2, #15) = #1           ; set ARMS


                return

 

Thanking You,

Ras