diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2018-05-30 14:54:42 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2018-05-30 14:54:42 -0400 |
commit | b66f5587de2a096f357124b20376b2bab980238b (patch) | |
tree | 54bff71969b64a818820a645ce4ee8046401cbb8 /gdb/sparc64-tdep.c | |
parent | 6aa7d72401387cacc5a7699520045ce9083a526a (diff) | |
download | gdb-b66f5587de2a096f357124b20376b2bab980238b.zip gdb-b66f5587de2a096f357124b20376b2bab980238b.tar.gz gdb-b66f5587de2a096f357124b20376b2bab980238b.tar.bz2 |
Remove regcache_cooked_write
Remove regcache_cooked_write, update callers to use
regcache::cooked_write.
gdb/ChangeLog:
* regcache.h (regcache_cooked_write): Remove, update callers to
use regcache::cooked_write.
* regcache.c (regcache_cooked_write): Remove.
Diffstat (limited to 'gdb/sparc64-tdep.c')
-rw-r--r-- | gdb/sparc64-tdep.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c index ed1aaff..dea8e4d 100644 --- a/gdb/sparc64-tdep.c +++ b/gdb/sparc64-tdep.c @@ -1226,7 +1226,7 @@ sparc64_store_floating_fields (struct regcache *regcache, struct type *type, len = 8; } for (int n = 0; n < (len + 3) / 4; n++) - regcache_cooked_write (regcache, regnum + n, valbuf + n * 4); + regcache->cooked_write (regnum + n, valbuf + n * 4); } else if (sparc64_floating_p (type) || (sparc64_complex_floating_p (type) && len <= 16)) @@ -1239,7 +1239,7 @@ sparc64_store_floating_fields (struct regcache *regcache, struct type *type, gdb_assert ((element % 2) == 0); regnum = gdbarch_num_regs (gdbarch) + SPARC64_Q0_REGNUM + element / 2; - regcache_cooked_write (regcache, regnum, valbuf); + regcache->cooked_write (regnum, valbuf); } else if (len == 8) { @@ -1247,7 +1247,7 @@ sparc64_store_floating_fields (struct regcache *regcache, struct type *type, regnum = gdbarch_num_regs (gdbarch) + SPARC64_D0_REGNUM + element + bitpos / 64; - regcache_cooked_write (regcache, regnum, valbuf + (bitpos / 8)); + regcache->cooked_write (regnum, valbuf + (bitpos / 8)); } else { @@ -1255,7 +1255,7 @@ sparc64_store_floating_fields (struct regcache *regcache, struct type *type, gdb_assert (bitpos % 32 == 0 && bitpos >= 0 && bitpos < 128); regnum = SPARC_F0_REGNUM + element * 2 + bitpos / 32; - regcache_cooked_write (regcache, regnum, valbuf + (bitpos / 8)); + regcache->cooked_write (regnum, valbuf + (bitpos / 8)); } } else if (sparc64_structure_or_union_p (type)) @@ -1285,7 +1285,7 @@ sparc64_store_floating_fields (struct regcache *regcache, struct type *type, struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, 0)); if (sparc64_floating_p (subtype) && TYPE_LENGTH (subtype) == 4) - regcache_cooked_write (regcache, SPARC_F1_REGNUM, valbuf); + regcache->cooked_write (SPARC_F1_REGNUM, valbuf); } } } @@ -1506,7 +1506,7 @@ sparc64_store_arguments (struct regcache *regcache, int nargs, { regnum = SPARC_O0_REGNUM + element; if (len > 8 && element < 5) - regcache_cooked_write (regcache, regnum + 1, valbuf + 8); + regcache->cooked_write (regnum + 1, valbuf + 8); } if (element < 16) @@ -1522,11 +1522,10 @@ sparc64_store_arguments (struct regcache *regcache, int nargs, if (len == 16) { if (regnum < gdbarch_num_regs (gdbarch) + SPARC64_D30_REGNUM) - regcache_cooked_write (regcache, regnum + 1, valbuf + 8); + regcache->cooked_write (regnum + 1, valbuf + 8); if (regnum < gdbarch_num_regs (gdbarch) + SPARC64_D10_REGNUM) - regcache_cooked_write (regcache, - SPARC_O0_REGNUM + element + 1, - valbuf + 8); + regcache->cooked_write (SPARC_O0_REGNUM + element + 1, + valbuf + 8); } } } @@ -1574,7 +1573,7 @@ sparc64_store_arguments (struct regcache *regcache, int nargs, if (regnum != -1) { - regcache_cooked_write (regcache, regnum, valbuf); + regcache->cooked_write (regnum, valbuf); /* If we're storing the value in a floating-point register, also store it in the corresponding %0 register(s). */ @@ -1586,14 +1585,14 @@ sparc64_store_arguments (struct regcache *regcache, int nargs, { gdb_assert (element < 6); regnum = SPARC_O0_REGNUM + element; - regcache_cooked_write (regcache, regnum, valbuf); + regcache->cooked_write (regnum, valbuf); } else if (regnum >= SPARC64_Q0_REGNUM && regnum <= SPARC64_Q8_REGNUM) { gdb_assert (element < 5); regnum = SPARC_O0_REGNUM + element; - regcache_cooked_write (regcache, regnum, valbuf); - regcache_cooked_write (regcache, regnum + 1, valbuf + 8); + regcache->cooked_write (regnum, valbuf); + regcache->cooked_write (regnum + 1, valbuf + 8); } } } @@ -1715,7 +1714,7 @@ sparc64_store_return_value (struct type *type, struct regcache *regcache, 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); + regcache->cooked_write (SPARC_O0_REGNUM + i, buf + i * 8); if (TYPE_CODE (type) != TYPE_CODE_UNION) sparc64_store_floating_fields (regcache, type, buf, 0, 0); } @@ -1724,7 +1723,7 @@ sparc64_store_return_value (struct type *type, struct regcache *regcache, /* Floating return values. */ memcpy (buf, valbuf, len); for (i = 0; i < len / 4; i++) - regcache_cooked_write (regcache, SPARC_F0_REGNUM + i, buf + i * 4); + regcache->cooked_write (SPARC_F0_REGNUM + i, buf + i * 4); } else if (TYPE_CODE (type) == TYPE_CODE_ARRAY) { @@ -1734,7 +1733,7 @@ sparc64_store_return_value (struct type *type, struct regcache *regcache, 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); + regcache->cooked_write (SPARC_O0_REGNUM + i, buf + i * 8); } else { @@ -1744,7 +1743,7 @@ sparc64_store_return_value (struct type *type, struct regcache *regcache, /* ??? Do we need to do any sign-extension here? */ memset (buf, 0, 8); memcpy (buf + 8 - len, valbuf, len); - regcache_cooked_write (regcache, SPARC_O0_REGNUM, buf); + regcache->cooked_write (SPARC_O0_REGNUM, buf); } } |