-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEBUGGER_REGNO #31
Comments
Yes, i agree. It will make things much simpler. We don't have to care about debuggers for sun-3. I've done that in my branch already. One of the few settings that should be copied from m68kelf.h to mint.h when you get rid of m68kelf.h. I think that is even required, because most of the code in gdb was copied/modelled after bsd sources, and i don't think the register numbers are mapped back there. |
I'm trying to check that regno.c: float f(float p)
{
register float v = p*3;
return v;
}
We can see that the only FPU register used is fp2.
I guess that the relevant code is:
where r18 means fp2. So fp0 would be 16, as expected. If I'm brave enough, I will try to recompile gcc with the other setting (bad m68k default value) to see if that r18 is replaced by r20. |
Ah, I guessed wrong.
So the relevant keyword is |
To write it explicitly: the right setting for m68k-atari-mint* targets is:
|
As mentioned by @th-otto here: #23 (comment)
There is a question about how to configure
DEBUGGER_REGNO
.Official GCC documentation:
https://gcc.gnu.org/onlinedocs/gccint/All-Debuggers.html#index-DEBUGGER_005fREGNO
This is a mapping between internal GCC register numbers and gdb register numbers. As I understand, this matters for DWARF-2 debug information and maybe DWARF-2 exceptions.
Default GCC implementation:
m68k-atari-mint-gcc/gcc/defaults.h
Lines 432 to 437 in cf877a4
Default m68k implementation (Sun-3):
m68k-atari-mint-gcc/gcc/config/m68k/m68k.h
Lines 711 to 713 in cf877a4
m68k-linux implementation:
m68k-atari-mint-gcc/gcc/config/m68k/linux.h
Lines 227 to 228 in cf877a4
m68k-elf implementation (SVR4):
m68k-atari-mint-gcc/gcc/config/m68k/m68kelf.h
Lines 98 to 104 in cf877a4
So for this parameter, the default m68k value is hacked for Sun-3 compatibility. This affects the numbering of FPU registers. While m68k-elf reverts it to the default GCC value.
So what to do for the m68k-atari-mintelf target?
As the default m68k value seems to be hacked specifically for Sun-3 compatibility, I don't think we need that. So I think we should revert
DEBUGGER_REGNO
back to normal, just like m68k-elf.The text was updated successfully, but these errors were encountered: