+2002-01-19 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * alpha-tdep.c (alpha_register_byte): New function.
+ (alpha_register_raw_size): Ditto.
+ (alpha_register_virtual_size): Ditto.
+ (alpha_skip_prologue_internal): Renamed from
+ alpha_skip_prologue.
+ (alpha_skip_prologue): New version that calls
+ alpha_skip_prologue_internal.
+ (alpha_in_lenient_prologue): Use alpha_skip_prologue_internal.
+ * config/alpha/tm-alpha.h (SKIP_PROLOGUE): Remove
+ second argument from alpha_skip_prologue.
+ (REGISTER_BYTE): Use alpha_register_byte.
+ (REGISTER_RAW_SIZE): Use alpha_register_raw_size.
+ (REGISTER_VIRTUAL_SIZE): Use alpha_register_virtual_size.
+ (FRAMELESS_FUNCTION_INVOCATION): Use
+ generic_frameless_function_invocation_not.
+ (FRAME_NUM_ARGS): Use frame_num_args_unknown.
+ (COERCE_FLOAT_TO_DOUBLE): Use standard_coerce_float_to_double.
+
2002-01-19 Andrew Cagney <ac131313@redhat.com>
* config/mips/xm-news-mips.h: Delete file.
return ((regno >= FP0_REGNUM && regno < (FP0_REGNUM+31))
? builtin_type_double : builtin_type_long);
}
+
+int
+alpha_register_byte (int regno)
+{
+ return (regno * 8);
+}
+
+int
+alpha_register_raw_size (int regno)
+{
+ return 8;
+}
+
+int
+alpha_register_virtual_size (int regno)
+{
+ return 8;
+}
\f
/* Guaranteed to set frame->saved_regs to some values (it never leaves it
Currently we must not skip more on the alpha, but we might need the
lenient stuff some day. */
-CORE_ADDR
-alpha_skip_prologue (CORE_ADDR pc, int lenient)
+static CORE_ADDR
+alpha_skip_prologue_internal (CORE_ADDR pc, int lenient)
{
unsigned long inst;
int offset;
return pc + offset;
}
+CORE_ADDR
+alpha_skip_prologue (CORE_ADDR addr)
+{
+ return (alpha_skip_prologue_internal (addr, 0));
+}
+
#if 0
/* Is address PC in the prologue (loosely defined) for function at
STARTADDR? */
static int
alpha_in_lenient_prologue (CORE_ADDR startaddr, CORE_ADDR pc)
{
- CORE_ADDR end_prologue = alpha_skip_prologue (startaddr, 1);
+ CORE_ADDR end_prologue = alpha_skip_prologue_internal (startaddr, 1);
return pc >= startaddr && pc < end_prologue;
}
#endif
/* Advance PC across any function entry prologue instructions
to reach some "real" code. */
-#define SKIP_PROLOGUE(pc) (alpha_skip_prologue(pc, 0))
-extern CORE_ADDR alpha_skip_prologue (CORE_ADDR addr, int lenient);
+#define SKIP_PROLOGUE(pc) alpha_skip_prologue((pc))
+extern CORE_ADDR alpha_skip_prologue (CORE_ADDR addr);
/* Immediately after a function call, return the saved pc.
Can't always go through the frames for this because on some machines
the new frame is not set up until the new function executes
some instructions. */
-#define SAVED_PC_AFTER_CALL(frame) alpha_saved_pc_after_call(frame)
+#define SAVED_PC_AFTER_CALL(frame) alpha_saved_pc_after_call(frame)
extern CORE_ADDR alpha_saved_pc_after_call (struct frame_info *);
/* Are we currently handling a signal ? */
/* Index within `registers' of the first byte of the space for
register N. */
-#define REGISTER_BYTE(N) ((N) * 8)
+#define REGISTER_BYTE(N) alpha_register_byte ((N))
+extern int alpha_register_byte (int);
/* Number of bytes of storage in the actual machine representation
for register N. On Alphas, all regs are 8 bytes. */
-#define REGISTER_RAW_SIZE(N) 8
+#define REGISTER_RAW_SIZE(N) alpha_register_raw_size ((N))
+extern int alpha_register_raw_size (int);
/* Number of bytes of storage in the program's representation
for register N. On Alphas, all regs are 8 bytes. */
-#define REGISTER_VIRTUAL_SIZE(N) 8
+#define REGISTER_VIRTUAL_SIZE(N) alpha_register_virtual_size ((N))
+extern int alpha_register_virtual_size (int);
/* Largest value REGISTER_RAW_SIZE can have. */
by FI does not have a frame on the stack associated with it. */
/* We handle this differently for alpha, and maybe we should not */
-#define FRAMELESS_FUNCTION_INVOCATION(FI) (0)
+#define FRAMELESS_FUNCTION_INVOCATION(FI) \
+ generic_frameless_function_invocation_not ((FI))
/* Saved Pc. */
-#define FRAME_SAVED_PC(FRAME) (alpha_frame_saved_pc(FRAME))
+#define FRAME_SAVED_PC(FRAME) alpha_frame_saved_pc(FRAME)
extern CORE_ADDR alpha_frame_saved_pc (struct frame_info *);
/* The alpha has two different virtual pointers for arguments and locals.
/* Return number of args passed to a frame.
Can return -1, meaning no way to tell. */
-#define FRAME_NUM_ARGS(fi) (-1)
+#define FRAME_NUM_ARGS(fi) frame_num_args_unknown ((fi))
/* Return number of bytes at start of arglist that are not really args. */
/* Push an empty stack frame, to record the current PC, etc. */
-#define PUSH_DUMMY_FRAME alpha_push_dummy_frame()
+#define PUSH_DUMMY_FRAME alpha_push_dummy_frame()
extern void alpha_push_dummy_frame (void);
/* Discard from the stack the innermost frame, restoring all registers. */
-#define POP_FRAME alpha_pop_frame()
+#define POP_FRAME alpha_pop_frame()
extern void alpha_pop_frame (void);
/* Alpha OSF/1 inhibits execution of code on the stack.
values are always passed in as doubles. Thus by setting this to 1, both
types of calls will work. */
-#define COERCE_FLOAT_TO_DOUBLE(formal, actual) (1)
+#define COERCE_FLOAT_TO_DOUBLE(formal, actual) \
+ standard_coerce_float_to_double ((formal), (actual))
/* Return TRUE if procedure descriptor PROC is a procedure descriptor
that refers to a dynamically generated sigtramp function.