- return sp;
-}
-
-/* Function: push_return_address (pc)
- Set up the return address for the inferior function call.
- Needed for targets where we don't actually execute a JSR/BSR instruction */
-
-static CORE_ADDR
-mn10300_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
-{
- unsigned char buf[4];
-
- store_unsigned_integer (buf, 4, CALL_DUMMY_ADDRESS ());
- write_memory (sp - 4, buf, 4);
- return sp - 4;
-}
-
-/* Function: store_struct_return (addr,sp)
- Store the structure value return address for an inferior function
- call. */
-
-static void
-mn10300_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
-{
- /* The structure return address is passed as the first argument. */
- write_register (0, addr);
-}
-
-/* Function: frame_saved_pc
- Find the caller of this frame. We do this by seeing if RP_REGNUM
- is saved in the stack anywhere, otherwise we get it from the
- registers. If the inner frame is a dummy frame, return its PC
- instead of RP, because that's where "caller" of the dummy-frame
- will be found. */
-
-static CORE_ADDR
-mn10300_frame_saved_pc (struct frame_info *fi)
-{
- int adjust = saved_regs_size (fi);
-
- return (read_memory_integer (get_frame_base (fi) + adjust, REGISTER_SIZE));
-}
-
-/* Function: mn10300_init_extra_frame_info
- Setup the frame's frame pointer, pc, and frame addresses for saved
- registers. Most of the work is done in mn10300_analyze_prologue().
-
- Note that when we are called for the last frame (currently active frame),
- that get_frame_pc (fi) and fi->frame will already be setup. However, fi->frame will
- be valid only if this routine uses FP. For previous frames, fi-frame will
- always be correct. mn10300_analyze_prologue will fix fi->frame if
- it's not valid.
-
- We can be called with the PC in the call dummy under two
- circumstances. First, during normal backtracing, second, while
- figuring out the frame pointer just prior to calling the target
- function (see call_function_by_hand). */
-
-static void
-mn10300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
-{
- if (get_next_frame (fi))
- deprecated_update_frame_pc_hack (fi, DEPRECATED_FRAME_SAVED_PC (get_next_frame (fi)));
-
- frame_saved_regs_zalloc (fi);
- frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
-
- get_frame_extra_info (fi)->status = 0;
- get_frame_extra_info (fi)->stack_size = 0;
-
- mn10300_analyze_prologue (fi, 0);
-}
-
-
-/* This function's job is handled by init_extra_frame_info. */
-static void
-mn10300_frame_init_saved_regs (struct frame_info *frame)
-{
-}
-
-
-/* Function: mn10300_virtual_frame_pointer
- Return the register that the function uses for a frame pointer,
- plus any necessary offset to be applied to the register before
- any frame pointer offsets. */
-
-static void
-mn10300_virtual_frame_pointer (CORE_ADDR pc,
- int *reg,
- LONGEST *offset)
-{
- struct frame_info *dummy = analyze_dummy_frame (pc, 0);
- /* Set up a dummy frame_info, Analyze the prolog and fill in the
- extra info. */
- /* Results will tell us which type of frame it uses. */
- if (get_frame_extra_info (dummy)->status & MY_FRAME_IN_SP)
- {
- *reg = SP_REGNUM;
- *offset = -(get_frame_extra_info (dummy)->stack_size);
- }
- else
- {
- *reg = A3_REGNUM;
- *offset = 0;
- }
-}
-
-static int
-mn10300_reg_struct_has_addr (int gcc_p, struct type *type)
-{
- return (TYPE_LENGTH (type) > 8);
-}
-
-static struct type *
-mn10300_register_virtual_type (int reg)
-{
- return builtin_type_int;
-}