* configure.host, configure.tgt: Add entries for
powerpc64-*-linux, selecting powerpc/ppc64-linux.mh and
powerpc/linux.mt.
* config/powerpc/ppc64-linux.mh, config/powerpc/nm-ppc64-linux.mh:
New files.

* ppc-linux-nat.c (ppc_register_u_addr, fill_gregset): If PT_MQ
isn't #defined, assume the register doesn't exist: act as if
tdep->ppc_mq_regnum were -1.
* configure.host, configure.tgt: Add entries for
powerpc64-*-linux, selecting powerpc/ppc64-linux.mh and
powerpc/linux.mt.
* config/powerpc/ppc64-linux.mh, config/powerpc/nm-ppc64-linux.mh:
New files.

* ppc-linux-nat.c (ppc_register_u_addr, fill_gregset): If PT_MQ
isn't #defined, assume the register doesn't exist: act as if
tdep->ppc_mq_regnum were -1.
* gdb.asm/asm-source.exp: Don't handle powerpc64-*-* along with
powerpc-*-*; treat the former as an architecture this test doesn't
support.  At the moment, the asm-source test program hangs and
becomes an unkillable process on PPC64 Linux.
* config/powerpc/nm-ppc64-linux.h (PTRACE_XFER_TYPE): This is
'long' on ppc64-*-linux*.
* ppc-linux-nat.c (ppc_register_u_addr): Compute u-area offsets
using the tdep's wordsize, not just '4'.
* ppc-linux-nat.c (store_altivec_registers): Don't cast fourth
argument to ptrace to int; the system headers should give it the
right type, and pointers don't fit in ints on powerpc64-*-*.
* linux-low.c (usr_store_inferior_registers): Transfer buf in
PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
away part of the register's value.
gdb/ChangeLog:
2003-05-29  Jim Blandy  <jimb@redhat.com>

	Support gdbserver on 64-bit PowerPC Linux.
	* configure.tgt (powerpc64-*-linux*): Build gdbserver, please.
	* regformats/reg-ppc64.dat: New file.

gdb/gdbserver/ChangeLog:
2003-05-29  Jim Blandy  <jimb@redhat.com>

	Add support for Linux on the 64-bit PowerPC.
	* linux-ppc64-low.c: New file.
	* configure.srv (powerpc64-*-linux*): New case.
	(powerpc*-*-linux*): Adjust case pattern not to match
	powerpc64-*-linux*.
	* Makefile.in (linux-ppc64-low.o, reg-ppc64.o, reg-ppc64.c): New
	rules.
	(clean): Delete reg-ppc64.c, too.
Use gdbarch methods for solib stuff on PowerPC Linux.
* config/powerpc/tm-linux.h (IN_SOLIB_CALL_TRAMPOLINE,
SKIP_TRAMPOLINE_CODE): #undef these, so the gdbarch methods will
show through.
* ppc-linux-tdep.c (ppc_linux_init_abi): Register
IN_SOLIB_CALL_TRAMPOLINE and SKIP_TRAMPOLINE_CODE methods here,
giving the same effect as the #definitions above.
Revert patch for revision.
* linux-low.c (usr_store_inferior_registers): Transfer buf in
PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
away part of the register's value.
Revert previous patch for revision.
Revert change for revisions.
gdb/ChangeLog:
2003-05-29  Jim Blandy  <jimb@redhat.com>

	Support gdbserver on 64-bit PowerPC Linux.
	* configure.tgt (powerpc64-*-linux*): Build gdbserver, please.
	* regformats/reg-ppc64.dat: New file.

gdb/gdbserver/ChangeLog:
2003-05-29  Jim Blandy  <jimb@redhat.com>

	Add support for Linux on the 64-bit PowerPC.
	* linux-ppc64-low.c: New file.
	* configure.srv (powerpc64-*-linux*): New case.
	(powerpc*-*-linux*): Adjust case pattern not to match
	powerpc64-*-linux*.
	* Makefile.in (linux-ppc64-low.o, reg-ppc64.o, reg-ppc64.c): New
	rules.
	(clean): Delete reg-ppc64.c, too.
Revert patch for revision.
Use gdbarch methods for solib stuff on PowerPC Linux.
* config/powerpc/tm-linux.h (IN_SOLIB_CALL_TRAMPOLINE,
SKIP_TRAMPOLINE_CODE): #undef these, so the gdbarch methods will
show through.  Remove later #definition of SKIP_TRAMPOLINE_CODE.
(ppc_linux_skip_trampoline_code): Delete declaration.
* ppc-linux-tdep.c (ppc_linux_init_abi): Register
IN_SOLIB_CALL_TRAMPOLINE and SKIP_TRAMPOLINE_CODE methods here,
giving the same effect as the #definitions above.
(ppc_linux_skip_trampoline_code): Make this static.
Recognize and skip 64-bit PowerPC Linux linkage functions.
* ppc-linux-tdep.c (insn_d, insn_ds, insn_xfx, read_insn, struct
insn_pattern, insns_match_pattern, d_field, ds_field): New
functions, macros, and types for working with PPC instructions.
(ppc64_standard_linkage, PPC64_STANDARD_LINKAGE_LEN,
ppc64_in_solib_call_trampoline, ppc64_standard_linkage_target,
ppc64_skip_trampoline_code): New functions, variables, and macros
for recognizing and skipping linkage functions.
(ppc_linux_init_abi): Use ppc64_in_solib_call_trampoline and
ppc64_skip_trampoline_code for the 64-bit PowerPC Linux ABI.

Use gdbarch methods for solib stuff on PowerPC Linux.
* config/powerpc/tm-linux.h (IN_SOLIB_CALL_TRAMPOLINE,
SKIP_TRAMPOLINE_CODE): #undef these, so the gdbarch methods will
show through.  Remove later #definition of SKIP_TRAMPOLINE_CODE.
(ppc_linux_skip_trampoline_code): Delete declaration.
* ppc-linux-tdep.c (ppc_linux_init_abi): Register
IN_SOLIB_CALL_TRAMPOLINE and SKIP_TRAMPOLINE_CODE methods here,
giving the same effect as the #definitions above.
(ppc_linux_skip_trampoline_code): Make this static.
* ppc-linux-nat.c (ppc_register_u_addr): Correctly compute u-area
offsets for floating-point registers in both 32- and 64-bit
interfaces.
Merged from trunk:

2003-05-29  Kevin Buettner  <kevinb@redhat.com>

From Jimi X <jimix@watson.ibm.com>:
* rs6000-tdep.c (skip_prologue): Improve support for 64-bit code.
* ppc-linux-tdep.c (ppc64_desc_entry_point): New function.
(ppc64_standard_linkage_target): Use it.