Here is a simple bit of math, good for someone (like me) who has never written VFP code.
We know that an array can be accessed by its member index.
We know that an array in C is just a pointer to the first (0) member.
We know that other fft implementations use either a lookup table or hard code something to "bit reverse" the member index numbers.
We know that C allows us to do "pointer math".
We know the VFP does not do "indexed load/store".
But it certainly does scaler, vector math.
We know the address of a member is: Maddr = (base + (index * (size_of(member)))
So how do we do "pointer math" for an 8 member array as a vector?
For an 8 element array, the bit reverse relationship looks like:
Fixed now
http://drpbox.knetconnect.com/fft/bits.html
Hmm (the intended algorithm, not the actual code) ...
* fill multiple with (size_of(member)) - bank 0
* load multiple with "magic index" - bank 1
* mul bank-0 bank-1 bank-0
* fill multiple with (array base) - bank 1
* add bank-0 bank-1 bank-0
and like magic we now have the pointer addresses in S0 .. S7 of the reordered input array.
C "pointer math" on steroids