/* Target-dependent code for the IA-64 for GDB, the GNU debugger.
- Copyright (C) 1999-2017 Free Software Foundation, Inc.
+ Copyright (C) 1999-2018 Free Software Foundation, Inc.
This file is part of GDB.
#include "frame.h"
#include "frame-base.h"
#include "frame-unwind.h"
-#include "doublest.h"
+#include "target-float.h"
#include "value.h"
#include "objfiles.h"
#include "elf/common.h" /* for DT_PLTGOT value */
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;
in, optimizedp, unavailablep))
return 0;
- convert_typed_floating (in, ia64_ext_type (gdbarch), out, valtype);
+ target_float_convert (in, ia64_ext_type (gdbarch), out, valtype);
*optimizedp = *unavailablep = 0;
return 1;
}
{
struct gdbarch *gdbarch = get_frame_arch (frame);
gdb_byte out[IA64_FP_REGISTER_SIZE];
- convert_typed_floating (in, valtype, out, ia64_ext_type (gdbarch));
+ target_float_convert (in, valtype, out, ia64_ext_type (gdbarch));
put_frame_register (frame, regnum, out);
}
while (n-- > 0)
{
regcache_cooked_read (regcache, regnum, from);
- convert_typed_floating (from, ia64_ext_type (gdbarch),
- (char *)valbuf + offset, float_elt_type);
+ target_float_convert (from, ia64_ext_type (gdbarch),
+ valbuf + offset, float_elt_type);
offset += TYPE_LENGTH (float_elt_type);
regnum++;
}
while (n-- > 0)
{
- convert_typed_floating ((char *)valbuf + offset, float_elt_type,
- to, ia64_ext_type (gdbarch));
+ target_float_convert (valbuf + offset, float_elt_type,
+ to, ia64_ext_type (gdbarch));
regcache_cooked_write (regcache, regnum, to);
offset += TYPE_LENGTH (float_elt_type);
regnum++;
while (len > 0 && floatreg < IA64_FR16_REGNUM)
{
gdb_byte to[IA64_FP_REGISTER_SIZE];
- convert_typed_floating (value_contents (arg) + argoffset,
- float_elt_type, to,
- ia64_ext_type (gdbarch));
+ target_float_convert (value_contents (arg) + argoffset,
+ float_elt_type, to,
+ ia64_ext_type (gdbarch));
regcache_cooked_write (regcache, floatreg, to);
floatreg++;
argoffset += TYPE_LENGTH (float_elt_type);