Hi,
I am curious about the IRP usage in spra291. It is in a C callable assembly function. All other registers are saved to dummy (memory), except B4 (an input argument, which is restored in the end of the asm function later) which is saved to IRP. On page 230, TMS320C6000 Optimizing Compiler v7.4 user guide, it says:
The IRP's value must be saved and restored if you use the IRP as a temporary register.
I do not see IRP is saved before it uses as a temporary register(?).
What do you think about this?
Thanks,
....................
.global dummy
.global _radix4
.bss dummy,52 ; Reserve space for dummy.
.text
_radix4:
MVK .S1 dummy, A0 ; New dummy pointer in A0 and B1
|| MVK .S2 dummy, B1
MVKH .S1 dummy, A0 ; New dummy pointer in A0 and B1
|| MVKH .S2 dummy, B1
STW .D2 B3, *B1 ; Push return address on dummy.
STW .D1 A10, *+A0[1] ; Push A10 on dummy.
|| STW .D2 B10, *+B1[2] ; Push B10 on dummy.
; *** BEGIN Benchmark Timing ***
B_START:
MVK .S1 32, A1 ; A1 = 32
|| LMBD .L1 1, A4, A2 ; 31 – log2(n)
|| SHR .S2X A4, 2, B6 ; n2 = n / 4
|| ZERO .L2 B7 ; Mask
|| STW .D1 A11, *+A0[3] ; Push A11 on dummy.
|| STW .D2 B11, *+B1[4] ; Push B11 on dummy.
SUB .L1 A1, A2, A4 ; log2(n)+1 (circ buff size in bytes)
|| SHR .S1 A4, 1, A7 ; 2 * n2 = n / 2, a–side
|| SHR .S2X A4, 1, B9 ; 2 * n2 = n / 2, b–side
|| MV .L2 B6, B0 ; n / 4
|| STW .D1 A12, *+A0[5] ; Push A12 on dummy.
|| STW .D2 B12, *+B1[6] ; Push B12 on dummy.
SHL .S1 A4, 16, A4 ; Shift into BK0 field.
|| MVC .S2 B4, IRP ; Save off x.
|| STW .D1 A13, *+A0[7] ; Push A13 on dummy.
|| STW .D2 B13, *+B1[8] ; Push B13 on dummy.