Closed mheyer32 closed 1 year ago
I tested devel1 last night and it seemed to have fixed that particular issue. I noticed way less "read from invalid memory locations" in ROTT. I also recompiled DOpus5 and could not find regressions there... sometimes instructions got a bit reshuffled, but that has no ill effect. Th upshot: the latest toolchain produces slightly smaller (up to a few hundred bytes) output files, likely attributed to ypur latest work on libnix and/or the startup code.
I tested devel1 last night and it seemed to have fixed that particular issue. I noticed way less "read from invalid memory locations" in ROTT. I also recompiled DOpus5 and could not find regressions there... sometimes instructions got a bit reshuffled, but that has no ill effect. Th upshot: the latest toolchain produces slightly smaller (up to a few hundred bytes) output files, likely attributed to your latest work on libnix and/or the startup code.
Thanks for testing. Unfortunately the devel1 changes do not pass the gcc testsuite checks... ... if nothing helps, I'll disable my fancy double indirect addressing stuff...
... if nothing helps, I'll disable my fancy double indirect addressing stuff...
That would be a real pity :-(
... if nothing helps, I'll disable my fancy double indirect addressing stuff...
That would be a real pity :-(
Some people claim, that double indirect doesn't provide any gain...
It looks like all the issue I hit before are gone now. I'll close this issue. How confident are you in the double-indirect reload code now? Is there a fbbb option to disable it (in case I run into another issue and quickly want o triage)?
It looks like all the issue I hit before are gone now. I'll close this issue. How confident are you in the double-indirect reload code now? Is there a fbbb option to disable it (in case I run into another issue and quickly want o triage)?
I don't run life critical applications in WinUAE^^ ... ... but I could add a '-fdouble-indirect' option which would be disable using '-fno-double-indirect' (or similar...)
btw: the new default branch for gcc is now amiga6
. I'll update the old gcc-6-branch
for a while, but sometimes I forget that^^
btw: the new default branch for gcc is now amiga6. I'll update the old gcc-6-branch for a while, but sometimes I forget that^^
Is this reflected in the make update
script? Or would that require a clean new checkout of the toolchain?
make branch branch=<branch> mod=<module> switch the module to the given branch
=>
make branch branch=amiga6 mod=gcc
Awesome!
So, I did switch to the amiga6 branch with the commandline above. That seems to affect not only the GCC project, but also others(?). For instance, seems, only now it actually switched me over to the OS3.2 NDK... I then recompiled the toolchain and Dopus5 and compared old and new disassembly.
Some observations:
An example excerpt showing 1) and 2)
only now it actually switched me over to the OS3.2 NDK...
That's a different change I made in the last days since the web site for NDK3.9 is down. That's a bad experience for new users. And NDK3.9 seems to be ok. Some programs will need changes, due to parameter type fixes, e.g. FindToolType in icon.library.
You can still (try to) use NDK3.9 by adding NDK=3.9
to the make parameters.
And since you like optimizations, try adding -D__CONSTLIBBASEDECL__=const
to avoid a6 reloads.
Only the files where libraries are loaded must not use this. If all is done via libnix`s auto-open feature, then you are fine.
Another way to work around the base pointer reload is to declare a local variable of the same name as shown here: https://github.com/mheyer32/camd_tools/blob/main/musplay.c#L38
You may try out -fno-double-indirect
Looking into Enforcer hits with: https://github.com/mheyer32/ROTT
This time, a piece of code is suspicious in rt_actor.c, function "CheckLine" caused read access at random(?) memory locations
a0 seems to be never actually be assigned to the
maskobjlist
array. Also, which register is being used seems random. when compiling the whole executable (instead of just the single file) and disassembled that, I got:The file in question can be built and disassembled via:
what is impressive, though, is how the compiler boiled down the two conditions into just one test: