/* Target-dependent code for the Tilera TILE-Gx processor.
- Copyright (C) 2012-2017 Free Software Foundation, Inc.
+ Copyright (C) 2012-2019 Free Software Foundation, Inc.
This file is part of GDB.
#include "dis-asm.h"
#include "inferior.h"
#include "arch-utils.h"
-#include "floatformat.h"
#include "regcache.h"
#include "regset.h"
-#include "doublest.h"
#include "osabi.h"
#include "linux-tdep.h"
#include "objfiles.h"
#include "tilegx-tdep.h"
#include "opcode/tilegx.h"
#include <algorithm>
-#include "common/byte-vector.h"
+#include "gdbsupport/byte-vector.h"
struct tilegx_frame_cache
{
int i, regnum = TILEGX_R0_REGNUM;
for (i = 0; i < len; i += tilegx_reg_size)
- regcache_raw_read (regcache, regnum++, valbuf + i);
+ regcache->raw_read (regnum++, valbuf + i);
}
/* Copy the function return value from VALBUF into the proper
gdb_byte buf[tilegx_reg_size] = { 0 };
memcpy (buf, valbuf, TYPE_LENGTH (type));
- regcache_raw_write (regcache, TILEGX_R0_REGNUM, buf);
+ regcache->raw_write (TILEGX_R0_REGNUM, buf);
}
else
{
int i, regnum = TILEGX_R0_REGNUM;
for (i = 0; i < len; i += tilegx_reg_size)
- regcache_raw_write (regcache, regnum++, (gdb_byte *) valbuf + i);
+ regcache->raw_write (regnum++, (gdb_byte *) valbuf + i);
}
}
struct regcache *regcache,
CORE_ADDR bp_addr, int nargs,
struct value **args,
- CORE_ADDR sp, int struct_return,
+ CORE_ADDR sp, function_call_return_method return_method,
CORE_ADDR struct_addr)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
/* If struct_return is 1, then the struct return address will
consume one argument-passing register. */
- if (struct_return)
+ if (return_method == return_method_struct)
regcache_cooked_write_unsigned (regcache, argreg++, struct_addr);
/* Arguments are passed in R0 - R9, and as soon as an argument
tilegx_frame_base_address
};
-static CORE_ADDR
-tilegx_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
- return frame_unwind_register_unsigned (next_frame, TILEGX_SP_REGNUM);
-}
-
-static CORE_ADDR
-tilegx_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
- return frame_unwind_register_unsigned (next_frame, TILEGX_PC_REGNUM);
-}
-
-static struct frame_id
-tilegx_unwind_dummy_id (struct gdbarch *gdbarch,
- struct frame_info *this_frame)
-{
- CORE_ADDR sp;
-
- sp = get_frame_register_unsigned (this_frame, TILEGX_SP_REGNUM);
- return frame_id_build (sp, get_frame_pc (this_frame));
-}
-
-
/* We cannot read/write the "special" registers. */
static int
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
/* Frame Info. */
- set_gdbarch_unwind_sp (gdbarch, tilegx_unwind_sp);
- set_gdbarch_unwind_pc (gdbarch, tilegx_unwind_pc);
- set_gdbarch_dummy_id (gdbarch, tilegx_unwind_dummy_id);
set_gdbarch_frame_align (gdbarch, tilegx_frame_align);
frame_base_set_default (gdbarch, &tilegx_frame_base);