RFA: AIX 64-bit mega-patch

David Edelsohn dje@watson.ibm.com
Tue Jun 13 13:54:00 GMT 2000

	Looks good to finally have this implemented using the GDB
multi-arch framework.

	There are a couple of problems with dummy frames:

1) The call dummy instruction sequence (e.g., rs6000_call_dummy_words[])
is not up to date.  AIX 3.1 used "cror 15,15,15", but AIX 3.2.4 changed
this to "cror 31,31,31" which doesn't trample a saved condition register.
In AIX 4.1 and above, the POWER architecture uses "cror 31,31,31" and the
PowerPC architecture uses the new "nop" instruction (ori 0,0,0).

2) The call dummy instruction sequence has never fixed up the TOC after
returning from a call.  I guess that this never is used to call a function
in a different module.  The "cror 15,15,15" , "cror 31,31,31" , or "nop"
would be changed by the linker to restore the TOC which the call dummy
sequence is storing in the stack frame.

3) rs6000_fix_call_dummy() defines TOC_ADDR_OFFSET as 20, but the location
to store the TOC in the stack frame depends on 32-bit versus 64-bit mode.
In 64-bit mode, it is at an offset of 40.  See the comments above
gcc/config/rs6000/rs6000.c:rs6000_stack_info() for details.

4) Please contact me about the processor "variants".

4) RS/6000 (with slash) is a platform, not an architecture.  Informational
messages mentioning "PowerPC / RS6000" seem very confusing to me.

Thanks, David
David Edelsohn                                      T.J. Watson Research Center
dje@watson.ibm.com                                  P.O. Box 218
+1 914 945 4364 (TL 862)                            Yorktown Heights, NY 10598

More information about the Gdb-patches mailing list