AROS's hosted task-switch / signal-return path exp...
# aros
k
AROS's hosted task-switch / signal-return path explicitly save and restore`x18`so it stays usable
j
I wrote some more tools to confirm and found this: • The platforms reserve register
x18
. Don’t use this register. • Here: developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms So I'm planning to go with `-ffixed-x18`but I feel that's not ideal so in case you have a btter idea,
k
the problem is that prevents all AROS code on aarch64 using it, which isnt desirable - the host code should be switching it in/out and conserving it as needed.
its similar to using A6 on m68k, but we do not use -ffixed-A6 there to prevent it (or similar on x86 to reserve registers)
j
I might have missed something because my tests are indicating that when the save macro is trying to preserve what's in x18, it's too late already and darwin has wiped its content... if you're willing to take a look, I have a 30 lines test program that shows how I test... because the effect is random crashes, like probably every time we switch context and I don't have this problem anymore when I compile with
-ffixed-x18
and to be honest, I have no idea of what else to do.
k
you might want to see if @bsek will take a look since he also uses darwin and I believe is planning on working on the aarch64 code for raspi soon.
j
I'll do that, and thanks for being so welcoming here, especially to someone that shows up out on nowhere and asks a lot of questions right way 😛
k
always happy to see new faces 😃