/* Target machine sub-parameters for SPARC, for GDB, the GNU debugger.
This is included by other tm-*.h files to define SPARC cpu-related info.
Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000
+ 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
stack rather than with the other registers, and this causes hair
and confusion in places like pop_frame. It might be better to
remove the ins and locals from `registers', make sure that
- get_saved_register can get them from the stack (even in the
- innermost frame), and make this the way to access them. For the
- frame pointer we would do that via TARGET_READ_FP. On the other
- hand, that is likely to be confusing or worse for flat frames. */
+ frame_register() can get them from the stack (even in the innermost
+ frame), and make this the way to access them. For the frame
+ pointer we would do that via TARGET_READ_FP. On the other hand,
+ that is likely to be confusing or worse for flat frames. */
#define REGISTER_BYTES (32*4+32*4+8*4)
/* Largest value REGISTER_RAW_SIZE can have. */
-#define MAX_REGISTER_RAW_SIZE 8
+#define DEPRECATED_MAX_REGISTER_RAW_SIZE 8
/* Largest value REGISTER_VIRTUAL_SIZE can have. */
-#define MAX_REGISTER_VIRTUAL_SIZE 8
+#define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE 8
/* Return the GDB type object for the "standard" data type
of data in register N. */
extern CORE_ADDR sparc_extract_struct_value_address (char *);
-/* If the current gcc for for this target does not produce correct
- debugging information for float parameters, both prototyped and
- unprototyped, then define this macro. This forces gdb to always
- assume that floats are passed as doubles and then converted in the
- callee. */
-
-#define COERCE_FLOAT_TO_DOUBLE(FORMAL, ACTUAL) (1)
-
/* Stack must be aligned on 64-bit boundaries when synthesizing
function calls (128-bit for sparc64). */
#define CANNOT_STORE_REGISTER(regno) ((regno) == G0_REGNUM)
/*
- * FRAME_CHAIN and FRAME_INFO definitions, collected here for convenience.
- */
+ * DEPRECATED_FRAME_CHAIN and FRAME_INFO definitions, collected here
+ * for convenience. */
#if !defined (GDB_MULTI_ARCH) || (GDB_MULTI_ARCH == 0)
/*
/* Describe the pointer in each stack frame to the previous stack frame
(its caller). */
-/* FRAME_CHAIN takes a frame's nominal address
- and produces the frame's chain-pointer. */
+/* DEPRECATED_FRAME_CHAIN takes a frame's nominal address and produces
+ the frame's chain-pointer. */
/* In the case of the Sun 4, the frame-chain's nominal address
is held in the frame pointer register.
/* time of the register saves. */ \
int sp_offset;
-/* We need to override GET_SAVED_REGISTER so that we can deal with the
- way outs change into ins in different frames. */
+/* We need to override DEPRECATED_GET_SAVED_REGISTER so that we can
+ deal with the way outs change into ins in different frames. */
void sparc_get_saved_register (char *raw_buffer,
int *optimized,
struct frame_info *frame,
int regnum, enum lval_type *lvalp);
-#define GET_SAVED_REGISTER(RAW_BUFFER, OPTIMIZED, ADDRP, FRAME, REGNUM, LVAL) \
+#define DEPRECATED_GET_SAVED_REGISTER(RAW_BUFFER, OPTIMIZED, ADDRP, FRAME, REGNUM, LVAL) \
sparc_get_saved_register (RAW_BUFFER, OPTIMIZED, ADDRP, \
FRAME, REGNUM, LVAL)
-#define FRAME_INIT_SAVED_REGS(FP) /*no-op */
+#define DEPRECATED_FRAME_INIT_SAVED_REGS(FP) /*no-op */
-#define INIT_EXTRA_FRAME_INFO(FROMLEAF, FCI) \
+#define DEPRECATED_INIT_EXTRA_FRAME_INFO(FROMLEAF, FCI) \
sparc_init_extra_frame_info (FROMLEAF, FCI)
extern void sparc_init_extra_frame_info (int, struct frame_info *);
-#define FRAME_CHAIN(THISFRAME) (sparc_frame_chain (THISFRAME))
+#define DEPRECATED_FRAME_CHAIN(THISFRAME) (sparc_frame_chain (THISFRAME))
extern CORE_ADDR sparc_frame_chain (struct frame_info *);
/* A macro that tells us whether the function invocation represented
/* Where is the PC for a specific frame */
-#define FRAME_SAVED_PC(FRAME) sparc_frame_saved_pc (FRAME)
+#define DEPRECATED_FRAME_SAVED_PC(FRAME) sparc_frame_saved_pc (FRAME)
extern CORE_ADDR sparc_frame_saved_pc (struct frame_info *);
/* If the argument is on the stack, it will be here. */
-#define FRAME_ARGS_ADDRESS(FI) ((FI)->frame)
+#define FRAME_ARGS_ADDRESS(FI) (get_frame_base (FI))
-#define FRAME_LOCALS_ADDRESS(FI) ((FI)->frame)
+#define FRAME_LOCALS_ADDRESS(FI) (get_frame_base (FI))
/* Set VAL to the number of args passed to frame described by FI.
Can set VAL to -1, meaning no way to tell. */
sparc_print_extra_frame_info (FI)
extern void sparc_print_extra_frame_info (struct frame_info *);
-/* INIT_EXTRA_FRAME_INFO needs the PC to detect flat frames. */
+/* DEPRECATED_INIT_EXTRA_FRAME_INFO needs the PC to detect flat
+ frames. */
-#define INIT_FRAME_PC(FROMLEAF, PREV) /* nothing */
-#define INIT_FRAME_PC_FIRST(FROMLEAF, PREV) \
- (PREV)->pc = ((FROMLEAF) ? SAVED_PC_AFTER_CALL ((PREV)->next) : \
- (PREV)->next ? FRAME_SAVED_PC ((PREV)->next) : read_pc ());
+/* NOTE: cagney/2002-12-08: Add local declaration of
+ init_frame_pc_noop() because it isn't possible to include
+ "arch-utils.h" here. */
+extern CORE_ADDR init_frame_pc_noop (int fromleaf, struct frame_info *prev);
+#define DEPRECATED_INIT_FRAME_PC(FROMLEAF, PREV) (init_frame_pc_noop (FROMLEAF, PREV))
+#define DEPRECATED_INIT_FRAME_PC_FIRST(FROMLEAF, PREV) \
+ ((FROMLEAF) ? SAVED_PC_AFTER_CALL ((PREV)->next) : \
+ (PREV)->next ? DEPRECATED_FRAME_SAVED_PC ((PREV)->next) : read_pc ())
/* Define other aspects of the stack frame. */
#define FRAME_SAVED_L0 0
#define FRAME_SAVED_I0 (8 * REGISTER_RAW_SIZE (L0_REGNUM))
-#define FRAME_STRUCT_ARGS_ADDRESS(FI) ((FI)->frame)
+#define FRAME_STRUCT_ARGS_ADDRESS(FI) (get_frame_base (FI))
/* Things needed for making the inferior call functions. */
/*
* I understand everything in this picture except what the space
* between fp - 0xe0 and fp - 0x140 is used for. Oh, and I don't
* understand why there's a large chunk of CALL_DUMMY that never gets
- * executed (its function is superceeded by PUSH_DUMMY_FRAME; they
- * are designed to do the same thing).
+ * executed (its function is superceeded by
+ * DEPRECATED_PUSH_DUMMY_FRAME; they are designed to do the same
+ * thing).
*
- * PUSH_DUMMY_FRAME saves the registers above sp' and pushes the
- * register file stack down one.
+ * DEPRECATED_PUSH_DUMMY_FRAME saves the registers above sp' and
+ * pushes the * register file stack down one.
*
* call_function then writes CALL_DUMMY, pushes the args onto the
* stack, and adjusts the stack pointer.
*
* run_stack_dummy then starts execution (in the middle of
- * CALL_DUMMY, as directed by call_function).
- */
+ * CALL_DUMMY, as directed by call_function). */
#ifndef CALL_DUMMY
/* This sequence of words is the instructions
#define CALL_DUMMY_BREAKPOINT_OFFSET (CALL_DUMMY_START_OFFSET + 0x30)
-#define CALL_DUMMY_STACK_ADJUST 68
+#define DEPRECATED_CALL_DUMMY_STACK_ADJUST 68
/* Call dummy method (eg. on stack, at entry point, etc.) */
#define CALL_DUMMY_LOCATION ON_STACK
-#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_on_stack (pc, sp, frame_address)
/* Method for detecting dummy frames. */
/* Push an empty stack frame, to record the current PC, etc. */
-#define PUSH_DUMMY_FRAME sparc_push_dummy_frame ()
-#define POP_FRAME sparc_pop_frame ()
+#define DEPRECATED_PUSH_DUMMY_FRAME sparc_push_dummy_frame ()
+#define DEPRECATED_POP_FRAME sparc_pop_frame ()
void sparc_push_dummy_frame (void);
void sparc_pop_frame (void);
#define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
sparc32_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)
-extern CORE_ADDR
-sparc32_push_arguments (int, struct value **, CORE_ADDR, int, CORE_ADDR);
+extern CORE_ADDR sparc32_push_arguments (int, struct value **, CORE_ADDR, int,
+ CORE_ADDR);
/* Store the address of the place in which to copy the structure the
subroutine will return. This is called from call_function_by_hand.