-/* Store the address of the place in which to copy the structure the
- subroutine will return. This is called from call_function.
-
- In RS/6000, struct return addresses are passed as an extra parameter in r3.
- In function return, callee is not responsible of returning this address
- back. Since gdb needs to find it, we will store in a designated variable
- `rs6000_struct_return_address'. */
-
-static void
-rs6000_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
-{
- write_register (3, addr);
- rs6000_struct_return_address = addr;
-}
-
-/* Write into appropriate registers a function return value
- of type TYPE, given in virtual format. */
-static void
-e500_store_return_value (struct type *type, char *valbuf)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
- /* Everything is returned in GPR3 and up. */
- int copied = 0;
- int i = 0;
- int len = TYPE_LENGTH (type);
- while (copied < len)
- {
- int regnum = gdbarch_tdep (current_gdbarch)->ppc_gp0_regnum + 3 + i;
- int reg_size = REGISTER_RAW_SIZE (regnum);
- char *reg_val_buf = alloca (reg_size);
-
- memcpy (reg_val_buf, valbuf + copied, reg_size);
- copied += reg_size;
- write_register_gen (regnum, reg_val_buf);
- i++;
- }
-}
-