PS3 Help!!! error: PIC register clobbered by 'r2' in 'asm' asm volatile

Houston, we have a problem. Never trust RPCS3...
On real PS3, RSX hangs on rsxtest and rsxtest_spu samples. Black screen. All other samples in PSL1GHT samples works and tiny3d samples don't work like rsxtest.
We need deep investigation.

Just for reference: last time I built my toolchain (some days ago, after some vectormath/makefile changes) I was testing rsxtest and it worked fine (on real ps3). At that time, I also tested rsxtest_spu and that didn't work.
 
Too many attemps.... just comments cant break source code.....
After rebuild of librsx from ps3dev/PSL1GHT, now works again (rsxtest)
Tiny3D no

rsxContextCallback where is asm volatile that uses r31, r0, etc etc is called by macro RSX_CONTEXT_CURRENT_BEGIN
That macro is (also) called by rsxSetSurface used into many rsx samples.... so tiny_rsxContextCallback inside tiny3d should work, they are the same.
 
Changed all inline extern functions in standard funcitons...... nothing... no works.

the silly thing is that the code was working with the old gcc 4.x , so it's probably something related to gcc 7 optimizations, the way it builds the code ends up not-working in a real PS3 console.

don't feel bad about it, I wonder if there's some other workaround to avoid this black-screen situation :sco hmmthink:
 
kudos to @Crystal who did a lot of work to figure this issue out :)

now it seems like a small issue "memcpy memory alignment", but to narrow it down to the exact point of Tiny3d required a lot of patience, tests, and hard work :encouragement:

the good news is that we'll be able to build tiny3d with the latest toolchain, and update/improve the library code when needed
 

Similar threads

Back
Top