Posts: 543
Threads: 16
Joined: Dec 2008
Reputation:
7
Location: Las Vegas, NV
It is on the to-do list, but given that the information the functions report is used, IIRC, on something else that's also on the to-do list, I've felt safe in ignoring it for the moment.
The include could probably be nuked for the moment, but spu2-x is going to eventually need x86emitter anyways. Spu2-x normally checks if your cpu can handle sse2, and the cpu identification code is in x86emitter. That code just happens to be ifdeffed out for Linux right now, as it was something I was going to get back to.
And in some tests a day or two ago, I was getting sound even with all the code that uses liba52 commented out, so the no sound issue is probably unrelated...
Posts: 6.069
Threads: 68
Joined: May 2010
Reputation:
167
Location: Grenoble, France
Yes I saw that spu2x will need x86emitter. I see no problem that spu2x depends on both x86emitter and utilies. However I see no reason to make utilies depends on x86emitter. Inter-dependancy between lib for no reason, is not a good idea in my opinion. It is more to avoid strange behavior in the future and also broke the circular dependancy for free. X86emitter will still depends on utilities in all cases.
Well for the nosound problem, I need to figure out how it is working then find what it is doing wrong in my computer. I will probably compare the non-optimized and the optimized version, it just a question of time. Fortunately I have plenty of free time.
Posts: 6.069
Threads: 68
Joined: May 2010
Reputation:
167
Location: Grenoble, France
Well inlining stuff are too black magic.
I still attached a patch to convert the function MulShr32 in asm. It will be probably faster but I do not know how much. I do not know if there are something to properly benchmark it. As you will see the asm it is shorter and easier than the C. Can probably be ported to windows.
I used the AT&T syntax (I try intel but I failed with some problem in the size of operand). The instruction is 'imul' (unsigned multiplication) + a second 'l' (to force it in long). 'g' constraint allow both register and memory (so you must tell the size and so the second 'l').
It fix also the problem of strict aliasing. Now I have sound with -O2.
I thinks it is equivalent to C (at least what I have understand). Do A (32b) * B (32b) -> result (64 bits) and keep only high 32 bits of results.
Posts: 543
Threads: 16
Joined: Dec 2008
Reputation:
7
Location: Las Vegas, NV
Well, cutting it down to one instruction's probably a good thing. And if that takes out the issues with strict aliasing, I probably ought to go with that, unless Jake points out any problems with it...