* sparc64-tdep.c (sparc64_extract_return_value): Add handling
for array types. (sparc64_store_return_value): Likewise.
This commit is contained in:
parent
cbe5be5a1d
commit
4bd8771477
2 changed files with 25 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2006-12-26 Joel brobecker <brobecker@adacore.com>
|
||||
|
||||
* sparc64-tdep.c (sparc64_extract_return_value): Add handling
|
||||
for array types.
|
||||
(sparc64_store_return_value): Likewise.
|
||||
|
||||
2006-12-18 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* breakpoint.c (watchpoint_check): Double-check the found frame.
|
||||
|
|
|
@ -1086,6 +1086,15 @@ sparc64_extract_return_value (struct type *type, struct regcache *regcache,
|
|||
regcache_cooked_read (regcache, SPARC_F0_REGNUM + i, buf + i * 4);
|
||||
memcpy (valbuf, buf, len);
|
||||
}
|
||||
else if (TYPE_CODE (type) == TYPE_CODE_ARRAY)
|
||||
{
|
||||
/* Small arrays are returned the same way as small structures. */
|
||||
gdb_assert (len <= 32);
|
||||
|
||||
for (i = 0; i < ((len + 7) / 8); i++)
|
||||
regcache_cooked_read (regcache, SPARC_O0_REGNUM + i, buf + i * 8);
|
||||
memcpy (valbuf, buf, len);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Integral and pointer return values. */
|
||||
|
@ -1131,6 +1140,16 @@ sparc64_store_return_value (struct type *type, struct regcache *regcache,
|
|||
for (i = 0; i < len / 4; i++)
|
||||
regcache_cooked_write (regcache, SPARC_F0_REGNUM + i, buf + i * 4);
|
||||
}
|
||||
else if (TYPE_CODE (type) == TYPE_CODE_ARRAY)
|
||||
{
|
||||
/* Small arrays are returned the same way as small structures. */
|
||||
gdb_assert (len <= 32);
|
||||
|
||||
memset (buf, 0, sizeof (buf));
|
||||
memcpy (buf, valbuf, len);
|
||||
for (i = 0; i < ((len + 7) / 8); i++)
|
||||
regcache_cooked_write (regcache, SPARC_O0_REGNUM + i, buf + i * 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Integral and pointer return values. */
|
||||
|
|
Loading…
Add table
Reference in a new issue