+2001-06-28 Jim Blandy <jimb@redhat.com>
+
+ * d10v-tdep.c (10v_frame_chain_valid, d10v_use_struct_convention,
+ d10v_breakpoint_from_pc, d10v_register_byte,
+ d10v_register_raw_size, d10v_register_virtual_size,
+ d10v_register_virtual_type, d10v_register_convertible,
+ d10v_register_convert_to_virtual, d10v_register_convert_to_raw,
+ d10v_make_daddr, d10v_make_iaddr, d10v_daddr_p, d10v_iaddr_p,
+ d10v_convert_iaddr_to_raw, d10v_convert_daddr_to_raw,
+ d10v_store_struct_return, d10v_store_return_value,
+ d10v_extract_struct_value_address, d10v_frame_saved_pc,
+ d10v_saved_pc_after_call, d10v_pop_frame, d10v_skip_prologue,
+ d10v_frame_chain, d10v_frame_init_saved_regs,
+ d10v_init_extra_frame_info, d10v_read_pc, d10v_write_pc,
+ d10v_read_sp, d10v_write_sp, d10v_write_fp, d10v_read_fp,
+ d10v_push_return_address, d10v_push_arguments,
+ d10v_extract_return_value): Make these functions static.
+
2001-06-28 Andrew Cagney <ac131313@redhat.com>
From Fernando Nasser:
static int prologue_find_regs (unsigned short op, struct frame_info *fi,
CORE_ADDR addr);
-extern void d10v_frame_init_saved_regs (struct frame_info *);
+static void d10v_frame_init_saved_regs (struct frame_info *);
static void do_d10v_pop_frame (struct frame_info *fi);
-int
+static int
d10v_frame_chain_valid (CORE_ADDR chain, struct frame_info *frame)
{
return ((chain) != 0 && (frame) != 0 && (frame)->pc > IMEM_START);
The d10v returns anything less than 8 bytes in size in
registers. */
-int
+static int
d10v_use_struct_convention (int gcc_p, struct type *type)
{
return (TYPE_LENGTH (type) > 8);
}
-unsigned char *
+static unsigned char *
d10v_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
{
static unsigned char breakpoint[] =
/* Index within `registers' of the first byte of the space for
register REG_NR. */
-int
+static int
d10v_register_byte (int reg_nr)
{
if (reg_nr < A0_REGNUM)
/* Number of bytes of storage in the actual machine representation for
register REG_NR. */
-int
+static int
d10v_register_raw_size (int reg_nr)
{
if (reg_nr < A0_REGNUM)
/* Number of bytes of storage in the program's representation
for register N. */
-int
+static int
d10v_register_virtual_size (int reg_nr)
{
return TYPE_LENGTH (REGISTER_VIRTUAL_TYPE (reg_nr));
/* Return the GDB type object for the "standard" data type
of data in register N. */
-struct type *
+static struct type *
d10v_register_virtual_type (int reg_nr)
{
if (reg_nr >= A0_REGNUM
}
/* convert $pc and $sp to/from virtual addresses */
-int
+static int
d10v_register_convertible (int nr)
{
return ((nr) == PC_REGNUM || (nr) == SP_REGNUM);
}
-void
+static void
d10v_register_convert_to_virtual (int regnum, struct type *type, char *from,
char *to)
{
store_unsigned_integer (to, TYPE_LENGTH (type), x);
}
-void
+static void
d10v_register_convert_to_raw (struct type *type, int regnum, char *from,
char *to)
{
}
-CORE_ADDR
+static CORE_ADDR
d10v_make_daddr (CORE_ADDR x)
{
return ((x) | DMEM_START);
}
-CORE_ADDR
+static CORE_ADDR
d10v_make_iaddr (CORE_ADDR x)
{
return (((x) << 2) | IMEM_START);
}
-int
+static int
d10v_daddr_p (CORE_ADDR x)
{
return (((x) & 0x3000000) == DMEM_START);
}
-int
+static int
d10v_iaddr_p (CORE_ADDR x)
{
return (((x) & 0x3000000) == IMEM_START);
}
-CORE_ADDR
+static CORE_ADDR
d10v_convert_iaddr_to_raw (CORE_ADDR x)
{
return (((x) >> 2) & 0xffff);
}
-CORE_ADDR
+static CORE_ADDR
d10v_convert_daddr_to_raw (CORE_ADDR x)
{
return ((x) & 0xffff);
We store structs through a pointer passed in the first Argument
register. */
-void
+static void
d10v_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
{
write_register (ARG1_REGNUM, (addr));
Things always get returned in RET1_REGNUM, RET2_REGNUM, ... */
-void
+static void
d10v_store_return_value (struct type *type, char *valbuf)
{
write_register_bytes (REGISTER_BYTE (RET1_REGNUM),
the address in which a function should return its structure value,
as a CORE_ADDR (or an expression that can be used as one). */
-CORE_ADDR
+static CORE_ADDR
d10v_extract_struct_value_address (char *regbuf)
{
return (extract_address ((regbuf) + REGISTER_BYTE (ARG1_REGNUM),
| DMEM_START);
}
-CORE_ADDR
+static CORE_ADDR
d10v_frame_saved_pc (struct frame_info *frame)
{
return ((frame)->extra_info->return_pc);
use frame->return_pc beause that is determined by reading R13 off
the stack and that may not be written yet. */
-CORE_ADDR
+static CORE_ADDR
d10v_saved_pc_after_call (struct frame_info *frame)
{
return ((read_register (LR_REGNUM) << 2)
/* Discard from the stack the innermost frame, restoring all saved
registers. */
-void
+static void
d10v_pop_frame (void)
{
generic_pop_current_frame (do_d10v_pop_frame);
return 0;
}
-CORE_ADDR
+static CORE_ADDR
d10v_skip_prologue (CORE_ADDR pc)
{
unsigned long op;
INIT_EXTRA_FRAME_INFO and INIT_FRAME_PC will be called for the new frame.
*/
-CORE_ADDR
+static CORE_ADDR
d10v_frame_chain (struct frame_info *fi)
{
d10v_frame_init_saved_regs (fi);
in the stack frame. sp is even more special: the address we return
for it IS the sp for the next frame. */
-void
+static void
d10v_frame_init_saved_regs (struct frame_info *fi)
{
CORE_ADDR fp, pc;
}
}
-void
+static void
d10v_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
fi->extra_info = (struct frame_extra_info *)
printf_filtered ("\n");
}
-CORE_ADDR
+static CORE_ADDR
d10v_read_pc (ptid_t ptid)
{
ptid_t save_ptid;
return retval;
}
-void
+static void
d10v_write_pc (CORE_ADDR val, ptid_t ptid)
{
ptid_t save_ptid;
inferior_ptid = save_ptid;
}
-CORE_ADDR
+static CORE_ADDR
d10v_read_sp (void)
{
return (D10V_MAKE_DADDR (read_register (SP_REGNUM)));
}
-void
+static void
d10v_write_sp (CORE_ADDR val)
{
write_register (SP_REGNUM, D10V_CONVERT_DADDR_TO_RAW (val));
}
-void
+static void
d10v_write_fp (CORE_ADDR val)
{
write_register (FP_REGNUM, D10V_CONVERT_DADDR_TO_RAW (val));
}
-CORE_ADDR
+static CORE_ADDR
d10v_read_fp (void)
{
return (D10V_MAKE_DADDR (read_register (FP_REGNUM)));
Set up the return address for the inferior function call.
Needed for targets where we don't actually execute a JSR/BSR instruction */
-CORE_ADDR
+static CORE_ADDR
d10v_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
{
write_register (LR_REGNUM, D10V_CONVERT_IADDR_TO_RAW (CALL_DUMMY_ADDRESS ()));
}
-CORE_ADDR
+static CORE_ADDR
d10v_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
/* Given a return value in `regbuf' with a type `valtype',
extract and copy its value into `valbuf'. */
-void
+static void
d10v_extract_return_value (struct type *type, char regbuf[REGISTER_BYTES],
char *valbuf)
{