+2018-01-22 Yao Qi <yao.qi@linaro.org>
+
+ * ia64-tdep.c (ia64_pseudo_register_read): Call
+ regcache->cooked_read instead of regcache_cooked_read_unsigned.
+ * m32c-tdep.c (m32c_cat_read): Likewise.
+ (m32c_r3r2r1r0_read): Likewise.
+ * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
+ * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
+
2018-01-22 Yao Qi <yao.qi@linaro.org>
* aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
ULONGEST bsp;
CORE_ADDR reg;
- status = regcache_cooked_read_unsigned (regcache,
- IA64_BSP_REGNUM, &bsp);
+ status = regcache->cooked_read (IA64_BSP_REGNUM, &bsp);
if (status != REG_VALID)
return status;
- status = regcache_cooked_read_unsigned (regcache,
- IA64_CFM_REGNUM, &cfm);
+ status = regcache->cooked_read (IA64_CFM_REGNUM, &cfm);
if (status != REG_VALID)
return status;
{
ULONGEST unatN_val;
ULONGEST unat;
- status = regcache_cooked_read_unsigned (regcache, IA64_UNAT_REGNUM, &unat);
+
+ status = regcache->cooked_read (IA64_UNAT_REGNUM, &unat);
if (status != REG_VALID)
return status;
unatN_val = (unat & (1LL << (regnum - IA64_NAT0_REGNUM))) != 0;
ULONGEST bsp;
ULONGEST cfm;
CORE_ADDR gr_addr = 0;
- status = regcache_cooked_read_unsigned (regcache, IA64_BSP_REGNUM, &bsp);
+
+ status = regcache->cooked_read (IA64_BSP_REGNUM, &bsp);
if (status != REG_VALID)
return status;
- status = regcache_cooked_read_unsigned (regcache, IA64_CFM_REGNUM, &cfm);
+
+ status = regcache->cooked_read (IA64_CFM_REGNUM, &cfm);
if (status != REG_VALID)
return status;
{
/* Compute address of nat collection bits. */
CORE_ADDR nat_addr = gr_addr | 0x1f8;
- CORE_ADDR nat_collection;
+ ULONGEST nat_collection;
int nat_bit;
/* If our nat collection address is bigger than bsp, we have to get
the nat collection from rnat. Otherwise, we fetch the nat
collection from the computed address. */
if (nat_addr >= bsp)
- regcache_cooked_read_unsigned (regcache, IA64_RNAT_REGNUM,
- &nat_collection);
+ regcache->cooked_read (IA64_RNAT_REGNUM, &nat_collection);
else
nat_collection = read_memory_integer (nat_addr, 8, byte_order);
nat_bit = (gr_addr >> 3) & 0x3f;
It can be calculated as the bsp - sof (sizeof frame). */
ULONGEST bsp, vbsp;
ULONGEST cfm;
- status = regcache_cooked_read_unsigned (regcache, IA64_BSP_REGNUM, &bsp);
+
+ status = regcache->cooked_read (IA64_BSP_REGNUM, &bsp);
if (status != REG_VALID)
return status;
- status = regcache_cooked_read_unsigned (regcache, IA64_CFM_REGNUM, &cfm);
+ status = regcache->cooked_read (IA64_CFM_REGNUM, &cfm);
if (status != REG_VALID)
return status;
ULONGEST pr;
ULONGEST cfm;
ULONGEST prN_val;
- status = regcache_cooked_read_unsigned (regcache, IA64_PR_REGNUM, &pr);
+
+ status = regcache->cooked_read (IA64_PR_REGNUM, &pr);
if (status != REG_VALID)
return status;
- status = regcache_cooked_read_unsigned (regcache, IA64_CFM_REGNUM, &cfm);
+ status = regcache->cooked_read (IA64_CFM_REGNUM, &cfm);
if (status != REG_VALID)
return status;
if (gdbarch_byte_order (reg->arch) == BFD_ENDIAN_BIG)
{
- status = regcache_cooked_read (cache, reg->rx->num, buf);
+ status = cache->cooked_read (reg->rx->num, buf);
if (status == REG_VALID)
- status = regcache_cooked_read (cache, reg->ry->num, buf + high_bytes);
+ status = cache->cooked_read (reg->ry->num, buf + high_bytes);
}
else
{
- status = regcache_cooked_read (cache, reg->rx->num, buf + low_bytes);
+ status = cache->cooked_read (reg->rx->num, buf + low_bytes);
if (status == REG_VALID)
- status = regcache_cooked_read (cache, reg->ry->num, buf);
+ status = cache->cooked_read (reg->ry->num, buf);
}
-
return status;
}
if (gdbarch_byte_order (reg->arch) == BFD_ENDIAN_BIG)
{
- status = regcache_cooked_read (cache, tdep->r0->num, buf + len * 3);
+ status = cache->cooked_read (tdep->r0->num, buf + len * 3);
if (status == REG_VALID)
- status = regcache_cooked_read (cache, tdep->r1->num, buf + len * 2);
+ status = cache->cooked_read (tdep->r1->num, buf + len * 2);
if (status == REG_VALID)
- status = regcache_cooked_read (cache, tdep->r2->num, buf + len * 1);
+ status = cache->cooked_read (tdep->r2->num, buf + len * 1);
if (status == REG_VALID)
- status = regcache_cooked_read (cache, tdep->r3->num, buf);
+ status = cache->cooked_read (tdep->r3->num, buf);
}
else
{
- status = regcache_cooked_read (cache, tdep->r0->num, buf);
+ status = cache->cooked_read (tdep->r0->num, buf);
if (status == REG_VALID)
- status = regcache_cooked_read (cache, tdep->r1->num, buf + len * 1);
+ status = cache->cooked_read (tdep->r1->num, buf + len * 1);
if (status == REG_VALID)
- status = regcache_cooked_read (cache, tdep->r2->num, buf + len * 2);
+ status = cache->cooked_read (tdep->r2->num, buf + len * 2);
if (status == REG_VALID)
- status = regcache_cooked_read (cache, tdep->r3->num, buf + len * 3);
+ status = cache->cooked_read (tdep->r3->num, buf + len * 3);
}
return status;
const int regsize = 4;
enum register_status status;
- status = regcache_cooked_read_unsigned (regcache, HARD_PC_REGNUM, &pc);
+ status = regcache->cooked_read (HARD_PC_REGNUM, &pc);
if (status != REG_VALID)
return status;
if (pc >= 0x8000 && pc < 0xc000)
{
ULONGEST page;
- regcache_cooked_read_unsigned (regcache, HARD_PAGE_REGNUM, &page);
+ regcache->cooked_read (HARD_PAGE_REGNUM, &page);
pc -= 0x8000;
pc += (page << 14);
pc += 0x1000000;
enum register_status status;
ULONGEST val;
- status = regcache_cooked_read_unsigned (regcache, r, &val);
+ status = regcache->cooked_read (r, &val);
if (status != REG_VALID)
return status;
regval = (unsigned int) val;