FWIW, here's a patch to use the multiply/accumulate macros in the Layer III IMDCT.
Dan, if you want, you can just write something in fixed.h to define these macros for the PowerPC.
Cheers, -rob
Rob Leslie wrote:
FWIW, here's a patch to use the multiply/accumulate macros in the Layer III IMDCT.
Cool! I would like to request one change. The lowest level MLA inline functions assume a pointer to memory locations, and this isn't the most efficient for the PowerPC implementation. I can shave about another 5 percent or so off the decoding time if I let the compiler actually think these are registers, and not just memory locations.
What I would like to do is have the code in layer3.c and synth.c do something like: mad_f_mla(hi, lo, x, y), which I can use directly, then: #define mad_f_mla(hi, lo, x, y) mad_f_amla(&(hi), &(lo), x, y) and change the names of the processor accelerated inlines to be "mad_f_amla" instead of "mad_f_mla".
Does this make sense? Sorry to be a pain about this........
-- Dan
FWIW, here's a patch to use the multiply/accumulate macros in the Layer III IMDCT.
Cool! I would like to request one change. The lowest level MLA inline functions assume a pointer to memory locations, and this isn't the most efficient for the PowerPC implementation. I can shave about another 5 percent or so off the decoding time if I let the compiler actually think these are registers, and not just memory locations.
Are you sure the compiler won't optimize these references into direct register accesses?
Cheers, -rob
Rob Leslie wrote:
Are you sure the compiler won't optimize these references into direct register accesses?
It sort of does. I haven't gone through the code with a fine comb, I just based it on the profile results after changing it, which were improved. I guess I'll shut up for a while and go away to do more testing. I am amazed with your combination of options on the "OPTIMIZER" line, and how much of a difference that makes. This is where I am finding compiler bugs with PowerPC (2.95.2 gcc).
Going into hiding.........
-- Dan