1 /* Target-dependent code for PowerPC systems using the SVR4 ABI
2 for GDB, the GNU debugger.
4 Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
28 #include "gdb_string.h"
29 #include "gdb_assert.h"
32 /* Pass the arguments in either registers, or in the stack. Using the
33 ppc sysv ABI, the first eight words of the argument list (that might
34 be less than eight parameters if some parameters occupy more than one
35 word) are passed in r3..r10 registers. float and double parameters are
36 passed in fpr's, in addition to that. Rest of the parameters if any
37 are passed in user stack.
39 If the function is returning a structure, then the return address is passed
40 in r3, then the first 7 words of the parametes can be passed in registers,
44 ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
45 struct regcache *regcache, CORE_ADDR bp_addr,
46 int nargs, struct value **args, CORE_ADDR sp,
47 int struct_return, CORE_ADDR struct_addr)
49 struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
50 const CORE_ADDR saved_sp = read_sp ();
51 int argspace = 0; /* 0 is an initial wrong guess. */
54 /* Go through the argument list twice.
56 Pass 1: Figure out how much new stack space is required for
57 arguments and pushed values. Unlike the PowerOpen ABI, the SysV
58 ABI doesn't reserve any extra space for parameters which are put
59 in registers, but does always push structures and then pass their
62 Pass 2: Replay the same computation but this time also write the
63 values out to the target. */
65 for (write_pass = 0; write_pass < 2; write_pass++)
68 /* Next available floating point register for float and double
71 /* Next available general register for non-float, non-vector
74 /* Next available vector register for vector arguments. */
76 /* Arguments start above the "LR save word" and "Back chain". */
77 int argoffset = 2 * tdep->wordsize;
78 /* Structures start after the arguments. */
79 int structoffset = argoffset + argspace;
81 /* If the function is returning a `struct', then the first word
82 (which will be passed in r3) is used for struct return
83 address. In that case we should advance one word and start
84 from r4 register to copy parameters. */
88 regcache_cooked_write_signed (regcache,
89 tdep->ppc_gp0_regnum + greg,
94 for (argno = 0; argno < nargs; argno++)
96 struct value *arg = args[argno];
97 struct type *type = check_typedef (VALUE_TYPE (arg));
98 int len = TYPE_LENGTH (type);
99 char *val = VALUE_CONTENTS (arg);
101 if (TYPE_CODE (type) == TYPE_CODE_FLT
102 && ppc_floating_point_unit_p (current_gdbarch) && len <= 8)
104 /* Floating point value converted to "double" then
105 passed in an FP register, when the registers run out,
106 8 byte aligned stack is used. */
111 /* Always store the floating point value using
112 the register's floating-point format. */
113 char regval[MAX_REGISTER_SIZE];
115 = register_type (gdbarch, FP0_REGNUM + freg);
116 convert_typed_floating (val, type, regval, regtype);
117 regcache_cooked_write (regcache, FP0_REGNUM + freg,
124 /* SysV ABI converts floats to doubles before
125 writing them to an 8 byte aligned stack location. */
126 argoffset = align_up (argoffset, 8);
130 struct type *memtype;
131 switch (TARGET_BYTE_ORDER)
134 memtype = builtin_type_ieee_double_big;
136 case BFD_ENDIAN_LITTLE:
137 memtype = builtin_type_ieee_double_little;
140 internal_error (__FILE__, __LINE__, "bad switch");
142 convert_typed_floating (val, type, memval, memtype);
143 write_memory (sp + argoffset, val, len);
148 else if (len == 8 && (TYPE_CODE (type) == TYPE_CODE_INT /* long long */
149 || (!ppc_floating_point_unit_p (current_gdbarch) && TYPE_CODE (type) == TYPE_CODE_FLT))) /* double */
151 /* "long long" or "double" passed in an odd/even
152 register pair with the low addressed word in the odd
153 register and the high addressed word in the even
154 register, or when the registers run out an 8 byte
155 aligned stack location. */
158 /* Just in case GREG was 10. */
160 argoffset = align_up (argoffset, 8);
162 write_memory (sp + argoffset, val, len);
165 else if (tdep->wordsize == 8)
168 regcache_cooked_write (regcache,
169 tdep->ppc_gp0_regnum + greg, val);
174 /* Must start on an odd register - r3/r4 etc. */
179 regcache_cooked_write (regcache,
180 tdep->ppc_gp0_regnum + greg + 0,
182 regcache_cooked_write (regcache,
183 tdep->ppc_gp0_regnum + greg + 1,
190 && TYPE_CODE (type) == TYPE_CODE_ARRAY
191 && TYPE_VECTOR (type) && tdep->ppc_vr0_regnum >= 0)
193 /* Vector parameter passed in an Altivec register, or
194 when that runs out, 16 byte aligned stack location. */
198 regcache_cooked_write (current_regcache,
199 tdep->ppc_vr0_regnum + vreg, val);
204 argoffset = align_up (argoffset, 16);
206 write_memory (sp + argoffset, val, 16);
211 && TYPE_CODE (type) == TYPE_CODE_ARRAY
212 && TYPE_VECTOR (type) && tdep->ppc_ev0_regnum >= 0)
214 /* Vector parameter passed in an e500 register, or when
215 that runs out, 8 byte aligned stack location. Note
216 that since e500 vector and general purpose registers
217 both map onto the same underlying register set, a
218 "greg" and not a "vreg" is consumed here. A cooked
219 write stores the value in the correct locations
220 within the raw register cache. */
224 regcache_cooked_write (current_regcache,
225 tdep->ppc_ev0_regnum + greg, val);
230 argoffset = align_up (argoffset, 8);
232 write_memory (sp + argoffset, val, 8);
238 /* Reduce the parameter down to something that fits in a
240 char word[MAX_REGISTER_SIZE];
241 memset (word, 0, MAX_REGISTER_SIZE);
242 if (len > tdep->wordsize
243 || TYPE_CODE (type) == TYPE_CODE_STRUCT
244 || TYPE_CODE (type) == TYPE_CODE_UNION)
246 /* Structs and large values are put on an 8 byte
248 structoffset = align_up (structoffset, 8);
250 write_memory (sp + structoffset, val, len);
251 /* ... and then a "word" pointing to that address is
252 passed as the parameter. */
253 store_unsigned_integer (word, tdep->wordsize,
257 else if (TYPE_CODE (type) == TYPE_CODE_INT)
258 /* Sign or zero extend the "int" into a "word". */
259 store_unsigned_integer (word, tdep->wordsize,
260 unpack_long (type, val));
262 /* Always goes in the low address. */
263 memcpy (word, val, len);
264 /* Store that "word" in a register, or on the stack.
265 The words have "4" byte alignment. */
269 regcache_cooked_write (regcache,
270 tdep->ppc_gp0_regnum + greg, word);
275 argoffset = align_up (argoffset, tdep->wordsize);
277 write_memory (sp + argoffset, word, tdep->wordsize);
278 argoffset += tdep->wordsize;
283 /* Compute the actual stack space requirements. */
286 /* Remember the amount of space needed by the arguments. */
287 argspace = argoffset;
288 /* Allocate space for both the arguments and the structures. */
289 sp -= (argoffset + structoffset);
290 /* Ensure that the stack is still 16 byte aligned. */
291 sp = align_down (sp, 16);
296 regcache_cooked_write_signed (regcache, SP_REGNUM, sp);
298 /* Write the backchain (it occupies WORDSIZED bytes). */
299 write_memory_signed_integer (sp, tdep->wordsize, saved_sp);
301 /* Point the inferior function call's return address at the dummy's
303 regcache_cooked_write_signed (regcache, tdep->ppc_lr_regnum, bp_addr);
308 /* Structures 8 bytes or less long are returned in the r3 & r4
309 registers, according to the SYSV ABI. */
311 ppc_sysv_abi_use_struct_convention (int gcc_p, struct type *value_type)
313 if ((TYPE_LENGTH (value_type) == 16 || TYPE_LENGTH (value_type) == 8)
314 && TYPE_VECTOR (value_type))
317 return (TYPE_LENGTH (value_type) > 8);
320 /* Pass the arguments in either registers, or in the stack. Using the
323 This implements a dumbed down version of the ABI. It always writes
324 values to memory, GPR and FPR, even when not necessary. Doing this
325 greatly simplifies the logic. */
328 ppc64_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
329 struct regcache *regcache, CORE_ADDR bp_addr,
330 int nargs, struct value **args, CORE_ADDR sp,
331 int struct_return, CORE_ADDR struct_addr)
333 struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
334 /* By this stage in the proceedings, SP has been decremented by "red
335 zone size" + "struct return size". Fetch the stack-pointer from
336 before this and use that as the BACK_CHAIN. */
337 const CORE_ADDR back_chain = read_sp ();
338 /* See for-loop comment below. */
340 /* Size of the Altivec's vector parameter region, the final value is
341 computed in the for-loop below. */
342 LONGEST vparam_size = 0;
343 /* Size of the general parameter region, the final value is computed
344 in the for-loop below. */
345 LONGEST gparam_size = 0;
346 /* Kevin writes ... I don't mind seeing tdep->wordsize used in the
347 calls to align_up(), align_down(), etc. because this makes it
348 easier to reuse this code (in a copy/paste sense) in the future,
349 but it is a 64-bit ABI and asserting that the wordsize is 8 bytes
350 at some point makes it easier to verify that this function is
351 correct without having to do a non-local analysis to figure out
352 the possible values of tdep->wordsize. */
353 gdb_assert (tdep->wordsize == 8);
355 /* Go through the argument list twice.
357 Pass 1: Compute the function call's stack space and register
360 Pass 2: Replay the same computation but this time also write the
361 values out to the target. */
363 for (write_pass = 0; write_pass < 2; write_pass++)
366 /* Next available floating point register for float and double
369 /* Next available general register for non-vector (but possibly
372 /* Next available vector register for vector arguments. */
374 /* The address, at which the next general purpose parameter
375 (integer, struct, float, ...) should be saved. */
377 /* Address, at which the next Altivec vector parameter should be
383 /* During the first pass, GPARAM and VPARAM are more like
384 offsets (start address zero) than addresses. That way
385 the accumulate the total stack space each region
392 /* Decrement the stack pointer making space for the Altivec
393 and general on-stack parameters. Set vparam and gparam
394 to their corresponding regions. */
395 vparam = align_down (sp - vparam_size, 16);
396 gparam = align_down (vparam - gparam_size, 16);
397 /* Add in space for the TOC, link editor double word,
398 compiler double word, LR save area, CR save area. */
399 sp = align_down (gparam - 48, 16);
402 /* If the function is returning a `struct', then there is an
403 extra hidden parameter (which will be passed in r3)
404 containing the address of that struct.. In that case we
405 should advance one word and start from r4 register to copy
406 parameters. This also consumes one on-stack parameter slot. */
410 regcache_cooked_write_signed (regcache,
411 tdep->ppc_gp0_regnum + greg,
414 gparam = align_up (gparam + tdep->wordsize, tdep->wordsize);
417 for (argno = 0; argno < nargs; argno++)
419 struct value *arg = args[argno];
420 struct type *type = check_typedef (VALUE_TYPE (arg));
421 char *val = VALUE_CONTENTS (arg);
422 if (TYPE_CODE (type) == TYPE_CODE_FLT && TYPE_LENGTH (type) <= 8)
424 /* Floats and Doubles go in f1 .. f13. They also
425 consume a left aligned GREG,, and can end up in
429 if (ppc_floating_point_unit_p (current_gdbarch)
432 char regval[MAX_REGISTER_SIZE];
433 struct type *regtype = register_type (gdbarch,
435 convert_typed_floating (val, type, regval, regtype);
436 regcache_cooked_write (regcache, FP0_REGNUM + freg,
441 /* The ABI states "Single precision floating
442 point values are mapped to the first word in
443 a single doubleword" and "... floating point
444 values mapped to the first eight doublewords
445 of the parameter save area are also passed in
448 This code interprets that to mean: store it,
449 left aligned, in the general register. */
450 char regval[MAX_REGISTER_SIZE];
451 memset (regval, 0, sizeof regval);
452 memcpy (regval, val, TYPE_LENGTH (type));
453 regcache_cooked_write (regcache,
454 tdep->ppc_gp0_regnum + greg,
457 write_memory (gparam, val, TYPE_LENGTH (type));
459 /* Always consume parameter stack space. */
462 gparam = align_up (gparam + TYPE_LENGTH (type), tdep->wordsize);
464 else if (TYPE_LENGTH (type) == 16 && TYPE_VECTOR (type)
465 && TYPE_CODE (type) == TYPE_CODE_ARRAY
466 && tdep->ppc_vr0_regnum >= 0)
468 /* In the Altivec ABI, vectors go in the vector
469 registers v2 .. v13, or when that runs out, a vector
470 annex which goes above all the normal parameters.
471 NOTE: cagney/2003-09-21: This is a guess based on the
472 PowerOpen Altivec ABI. */
476 regcache_cooked_write (regcache,
477 tdep->ppc_vr0_regnum + vreg, val);
483 write_memory (vparam, val, TYPE_LENGTH (type));
484 vparam = align_up (vparam + TYPE_LENGTH (type), 16);
487 else if ((TYPE_CODE (type) == TYPE_CODE_INT
488 || TYPE_CODE (type) == TYPE_CODE_ENUM)
489 && TYPE_LENGTH (type) <= 8)
491 /* Scalars get sign[un]extended and go in gpr3 .. gpr10.
492 They can also end up in memory. */
495 /* Sign extend the value, then store it unsigned. */
496 ULONGEST word = unpack_long (type, val);
498 regcache_cooked_write_unsigned (regcache,
499 tdep->ppc_gp0_regnum +
501 write_memory_unsigned_integer (gparam, tdep->wordsize,
505 gparam = align_up (gparam + TYPE_LENGTH (type), tdep->wordsize);
510 for (byte = 0; byte < TYPE_LENGTH (type);
511 byte += tdep->wordsize)
513 if (write_pass && greg <= 10)
515 char regval[MAX_REGISTER_SIZE];
516 int len = TYPE_LENGTH (type) - byte;
517 if (len > tdep->wordsize)
518 len = tdep->wordsize;
519 memset (regval, 0, sizeof regval);
520 /* WARNING: cagney/2003-09-21: As best I can
521 tell, the ABI specifies that the value should
522 be left aligned. Unfortunately, GCC doesn't
523 do this - it instead right aligns even sized
524 values and puts odd sized values on the
525 stack. Work around that by putting both a
526 left and right aligned value into the
527 register (hopefully no one notices :-^).
529 /* Left aligned (8 byte values such as pointers
531 memcpy (regval, val + byte, len);
532 /* Right aligned (but only if even). */
533 if (len == 1 || len == 2 || len == 4)
534 memcpy (regval + tdep->wordsize - len,
536 regcache_cooked_write (regcache, greg, regval);
541 /* WARNING: cagney/2003-09-21: Strictly speaking, this
542 isn't necessary, unfortunately, GCC appears to get
543 "struct convention" parameter passing wrong putting
544 odd sized structures in memory instead of in a
545 register. Work around this by always writing the
546 value to memory. Fortunately, doing this
547 simplifies the code. */
548 write_memory (gparam, val, TYPE_LENGTH (type));
549 /* Always consume parameter stack space. */
550 gparam = align_up (gparam + TYPE_LENGTH (type), tdep->wordsize);
556 /* Save the true region sizes ready for the second pass. */
557 vparam_size = vparam;
558 /* Make certain that the general parameter save area is at
559 least the minimum 8 registers (or doublewords) in size. */
561 gparam_size = 8 * tdep->wordsize;
563 gparam_size = gparam;
568 regcache_cooked_write_signed (regcache, SP_REGNUM, sp);
570 /* Write the backchain (it occupies WORDSIZED bytes). */
571 write_memory_signed_integer (sp, tdep->wordsize, back_chain);
573 /* Point the inferior function call's return address at the dummy's
575 regcache_cooked_write_signed (regcache, tdep->ppc_lr_regnum, bp_addr);
577 /* Find a value for the TOC register. Every symbol should have both
578 ".FN" and "FN" in the minimal symbol table. "FN" points at the
579 FN's descriptor, while ".FN" points at the entry point (which
580 matches FUNC_ADDR). Need to reverse from FUNC_ADDR back to the
581 FN's descriptor address. */
583 /* Find the minimal symbol that corresponds to FUNC_ADDR (should
584 have the name ".FN"). */
585 struct minimal_symbol *dot_fn = lookup_minimal_symbol_by_pc (func_addr);
586 if (dot_fn != NULL && SYMBOL_LINKAGE_NAME (dot_fn)[0] == '.')
588 /* Now find the corresponding "FN" (dropping ".") minimal
590 struct minimal_symbol *fn =
591 lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (dot_fn) + 1, NULL,
595 /* Got the address of that descriptor. The TOC is the
596 second double word. */
598 read_memory_unsigned_integer (SYMBOL_VALUE_ADDRESS (fn) +
599 tdep->wordsize, tdep->wordsize);
600 regcache_cooked_write_unsigned (regcache,
601 tdep->ppc_gp0_regnum + 2, toc);
610 /* The 64 bit ABI retun value convention.
612 Return non-zero if the return-value is stored in a register, return
613 0 if the return-value is instead stored on the stack (a.k.a.,
614 struct return convention).
616 For a return-value stored in a register: when INVAL is non-NULL,
617 copy the buffer to the corresponding register return-value location
618 location; when OUTVAL is non-NULL, fill the buffer from the
619 corresponding register return-value location. */
621 /* Potential ways that a function can return a value of a given type. */
622 enum return_value_convention
624 /* Where the return value has been squeezed into one or more
626 RETURN_VALUE_REGISTER_CONVENTION,
627 /* Commonly known as the "struct return convention". The caller
628 passes an additional hidden first parameter to the caller. That
629 parameter contains the address at which the value being returned
630 should be stored. While typically, and historically, used for
631 large structs, this is convention is applied to values of many
633 RETURN_VALUE_STRUCT_CONVENTION
636 static enum return_value_convention
637 ppc64_sysv_abi_return_value (struct type *valtype, struct regcache *regcache,
638 const void *inval, void *outval)
640 struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
641 /* Floats and doubles in F1. */
642 if (TYPE_CODE (valtype) == TYPE_CODE_FLT && TYPE_LENGTH (valtype) <= 8)
644 char regval[MAX_REGISTER_SIZE];
645 struct type *regtype = register_type (current_gdbarch, FP0_REGNUM);
648 convert_typed_floating (inval, valtype, regval, regtype);
649 regcache_cooked_write (regcache, FP0_REGNUM + 1, regval);
653 regcache_cooked_read (regcache, FP0_REGNUM + 1, regval);
654 convert_typed_floating (regval, regtype, outval, valtype);
656 return RETURN_VALUE_REGISTER_CONVENTION;
658 if (TYPE_CODE (valtype) == TYPE_CODE_INT && TYPE_LENGTH (valtype) <= 8)
660 /* Integers in r3. */
663 /* Be careful to sign extend the value. */
664 regcache_cooked_write_unsigned (regcache, tdep->ppc_gp0_regnum + 3,
665 unpack_long (valtype, inval));
669 /* Extract the integer from r3. Since this is truncating the
670 value, there isn't a sign extension problem. */
672 regcache_cooked_read_unsigned (regcache, tdep->ppc_gp0_regnum + 3,
674 store_unsigned_integer (outval, TYPE_LENGTH (valtype), regval);
676 return RETURN_VALUE_REGISTER_CONVENTION;
678 /* All pointers live in r3. */
679 if (TYPE_CODE (valtype) == TYPE_CODE_PTR)
681 /* All pointers live in r3. */
683 regcache_cooked_write (regcache, tdep->ppc_gp0_regnum + 3, inval);
685 regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 3, outval);
686 return RETURN_VALUE_REGISTER_CONVENTION;
688 if (TYPE_CODE (valtype) == TYPE_CODE_ARRAY
689 && TYPE_LENGTH (valtype) <= 8
690 && TYPE_CODE (TYPE_TARGET_TYPE (valtype)) == TYPE_CODE_INT
691 && TYPE_LENGTH (TYPE_TARGET_TYPE (valtype)) == 1)
693 /* Small character arrays are returned, right justified, in r3. */
694 int offset = (register_size (current_gdbarch, tdep->ppc_gp0_regnum + 3)
695 - TYPE_LENGTH (valtype));
697 regcache_cooked_write_part (regcache, tdep->ppc_gp0_regnum + 3,
698 offset, TYPE_LENGTH (valtype), inval);
700 regcache_cooked_read_part (regcache, tdep->ppc_gp0_regnum + 3,
701 offset, TYPE_LENGTH (valtype), outval);
702 return RETURN_VALUE_REGISTER_CONVENTION;
704 /* Big floating point values get stored in adjacent floating
706 if (TYPE_CODE (valtype) == TYPE_CODE_FLT
707 && (TYPE_LENGTH (valtype) == 16 || TYPE_LENGTH (valtype) == 32))
709 if (inval || outval != NULL)
712 for (i = 0; i < TYPE_LENGTH (valtype) / 8; i++)
715 regcache_cooked_write (regcache, FP0_REGNUM + 1 + i,
716 (const bfd_byte *) inval + i * 8);
718 regcache_cooked_read (regcache, FP0_REGNUM + 1 + i,
719 (bfd_byte *) outval + i * 8);
722 return RETURN_VALUE_REGISTER_CONVENTION;
724 /* Complex values get returned in f1:f2, need to convert. */
725 if (TYPE_CODE (valtype) == TYPE_CODE_COMPLEX
726 && (TYPE_LENGTH (valtype) == 8 || TYPE_LENGTH (valtype) == 16))
728 if (regcache != NULL)
731 for (i = 0; i < 2; i++)
733 char regval[MAX_REGISTER_SIZE];
734 struct type *regtype =
735 register_type (current_gdbarch, FP0_REGNUM);
738 convert_typed_floating ((const bfd_byte *) inval +
739 i * (TYPE_LENGTH (valtype) / 2),
740 valtype, regval, regtype);
741 regcache_cooked_write (regcache, FP0_REGNUM + 1 + i,
746 regcache_cooked_read (regcache, FP0_REGNUM + 1 + i, regval);
747 convert_typed_floating (regval, regtype,
748 (bfd_byte *) outval +
749 i * (TYPE_LENGTH (valtype) / 2),
754 return RETURN_VALUE_REGISTER_CONVENTION;
756 /* Big complex values get stored in f1:f4. */
757 if (TYPE_CODE (valtype) == TYPE_CODE_COMPLEX && TYPE_LENGTH (valtype) == 32)
759 if (regcache != NULL)
762 for (i = 0; i < 4; i++)
765 regcache_cooked_write (regcache, FP0_REGNUM + 1 + i,
766 (const bfd_byte *) inval + i * 8);
768 regcache_cooked_read (regcache, FP0_REGNUM + 1 + i,
769 (bfd_byte *) outval + i * 8);
772 return RETURN_VALUE_REGISTER_CONVENTION;
774 return RETURN_VALUE_STRUCT_CONVENTION;
778 ppc64_sysv_abi_use_struct_convention (int gcc_p, struct type *value_type)
780 return (ppc64_sysv_abi_return_value (value_type, NULL, NULL, NULL)
781 == RETURN_VALUE_STRUCT_CONVENTION);
785 ppc64_sysv_abi_extract_return_value (struct type *valtype,
786 struct regcache *regbuf, void *valbuf)
788 if (ppc64_sysv_abi_return_value (valtype, regbuf, NULL, valbuf)
789 != RETURN_VALUE_REGISTER_CONVENTION)
790 error ("Function return value unknown");
794 ppc64_sysv_abi_store_return_value (struct type *valtype,
795 struct regcache *regbuf,
798 if (!ppc64_sysv_abi_return_value (valtype, regbuf, valbuf, NULL))
799 error ("Function return value location unknown");