Sorry for all the questions recently, its been probably 8 years since I last had to do fixed point and I guess I've grown accustomed to having accurate 3d calculations that floats provide.
I'm using 16.16 fixed point as my standard element for vectors, matricies, etc and had originally be using intels GPP libraries. Now I'm trying to free myself from GPP, and am writing my own fixed point stuff.
I wrote a fixed point macro:
#define FixedMUL(x,y) (int)((__int64(x)*__int64(y)) >> 16)
And it seems to not only give the same results of the GPP multiply function (gppMul_16_32s), but its quite a bit faster. Is the int64 a native type on an Xscale or something? I originally figured the macro would end up being a bit slow, but seeing as I was ok with the GPP's performance, this macro seems to be more than fast enough.
My question is, is this the best way on an Xscale? What about a strongarm processor?
I'm using 16.16 fixed point as my standard element for vectors, matricies, etc and had originally be using intels GPP libraries. Now I'm trying to free myself from GPP, and am writing my own fixed point stuff.
I wrote a fixed point macro:
#define FixedMUL(x,y) (int)((__int64(x)*__int64(y)) >> 16)
And it seems to not only give the same results of the GPP multiply function (gppMul_16_32s), but its quite a bit faster. Is the int64 a native type on an Xscale or something? I originally figured the macro would end up being a bit slow, but seeing as I was ok with the GPP's performance, this macro seems to be more than fast enough.
My question is, is this the best way on an Xscale? What about a strongarm processor?