From: Andrew Cagney Date: Mon, 14 Apr 2003 19:06:48 +0000 (+0000) Subject: 2003-04-14 Andrew Cagney X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=36712a20aad57709975438ceae0b4cc802635a19;p=binutils-gdb.git 2003-04-14 Andrew Cagney * mips-tdep.c (mips_push_dummy_frame): Delete function. (MASK, PUSH_FP_REGNUM, GEN_REG_SAVE_MASK): Delete macros. (FLOAT_REG_SAVE_MASK, FLOAT_SINGLE_REG_SAVE_MASK): Delete macro. (mips_push_register): Delete function. (mips_dump_tdep): Delete references to GEN_REG_SAVE_MASK and PUSH_FP_REGNUM. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 35e0c333cc8..12c213dd5db 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2003-04-14 Andrew Cagney + + * mips-tdep.c (mips_push_dummy_frame): Delete function. + (MASK, PUSH_FP_REGNUM, GEN_REG_SAVE_MASK): Delete macros. + (FLOAT_REG_SAVE_MASK, FLOAT_SINGLE_REG_SAVE_MASK): Delete macro. + (mips_push_register): Delete function. + (mips_dump_tdep): Delete references to GEN_REG_SAVE_MASK and + PUSH_FP_REGNUM. + 2003-04-14 Jim Blandy * symmisc.c: #include "gdb_regex.h". diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 4652e03b975..e65331208a7 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -3747,111 +3747,6 @@ mips_push_return_address (CORE_ADDR pc, CORE_ADDR sp) return sp; } -static void -mips_push_register (CORE_ADDR * sp, int regno) -{ - char *buffer = alloca (MAX_REGISTER_RAW_SIZE); - int regsize; - int offset; - if (MIPS_SAVED_REGSIZE < REGISTER_RAW_SIZE (regno)) - { - regsize = MIPS_SAVED_REGSIZE; - offset = (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG - ? REGISTER_RAW_SIZE (regno) - MIPS_SAVED_REGSIZE - : 0); - } - else - { - regsize = REGISTER_RAW_SIZE (regno); - offset = 0; - } - *sp -= regsize; - deprecated_read_register_gen (regno, buffer); - write_memory (*sp, buffer + offset, regsize); -} - -/* MASK(i,j) == (1<info; - CORE_ADDR sp = ADDR_BITS_REMOVE (read_signed_register (SP_REGNUM)); - CORE_ADDR old_sp = sp; - link->next = linked_proc_desc_table; - linked_proc_desc_table = link; - -/* FIXME! are these correct ? */ -#define PUSH_FP_REGNUM 16 /* must be a register preserved across calls */ -#define GEN_REG_SAVE_MASK MASK(1,16)|MASK(24,28)|(1<<(MIPS_NUMREGS-1)) -#define FLOAT_REG_SAVE_MASK MASK(0,19) -#define FLOAT_SINGLE_REG_SAVE_MASK \ - ((1<<18)|(1<<16)|(1<<14)|(1<<12)|(1<<10)|(1<<8)|(1<<6)|(1<<4)|(1<<2)|(1<<0)) - /* - * The registers we must save are all those not preserved across - * procedure calls. Dest_Reg (see tm-mips.h) must also be saved. - * In addition, we must save the PC, PUSH_FP_REGNUM, MMLO/-HI - * and FP Control/Status registers. - * - * - * Dummy frame layout: - * (high memory) - * Saved PC - * Saved MMHI, MMLO, FPC_CSR - * Saved R31 - * Saved R28 - * ... - * Saved R1 - * Saved D18 (i.e. F19, F18) - * ... - * Saved D0 (i.e. F1, F0) - * Argument build area and stack arguments written via mips_push_arguments - * (low memory) - */ - - /* Save special registers (PC, MMHI, MMLO, FPC_CSR) */ - PROC_FRAME_REG (proc_desc) = PUSH_FP_REGNUM; - PROC_FRAME_OFFSET (proc_desc) = 0; - PROC_FRAME_ADJUST (proc_desc) = 0; - mips_push_register (&sp, PC_REGNUM); - mips_push_register (&sp, HI_REGNUM); - mips_push_register (&sp, LO_REGNUM); - mips_push_register (&sp, MIPS_FPU_TYPE == MIPS_FPU_NONE ? 0 : FCRCS_REGNUM); - - /* Save general CPU registers */ - PROC_REG_MASK (proc_desc) = GEN_REG_SAVE_MASK; - /* PROC_REG_OFFSET is the offset of the first saved register from FP. */ - PROC_REG_OFFSET (proc_desc) = sp - old_sp - MIPS_SAVED_REGSIZE; - for (ireg = 32; --ireg >= 0;) - if (PROC_REG_MASK (proc_desc) & (1 << ireg)) - mips_push_register (&sp, ireg); - - /* Save floating point registers starting with high order word */ - PROC_FREG_MASK (proc_desc) = - MIPS_FPU_TYPE == MIPS_FPU_DOUBLE ? FLOAT_REG_SAVE_MASK - : MIPS_FPU_TYPE == MIPS_FPU_SINGLE ? FLOAT_SINGLE_REG_SAVE_MASK : 0; - /* PROC_FREG_OFFSET is the offset of the first saved *double* register - from FP. */ - PROC_FREG_OFFSET (proc_desc) = sp - old_sp - 8; - for (ireg = 32; --ireg >= 0;) - if (PROC_FREG_MASK (proc_desc) & (1 << ireg)) - mips_push_register (&sp, ireg + FP0_REGNUM); - - /* Update the frame pointer for the call dummy and the stack pointer. - Set the procedure's starting and ending addresses to point to the - call dummy address at the entry point. */ - write_register (PUSH_FP_REGNUM, old_sp); - write_register (SP_REGNUM, sp); - PROC_LOW_ADDR (proc_desc) = CALL_DUMMY_ADDRESS (); - PROC_HIGH_ADDR (proc_desc) = CALL_DUMMY_ADDRESS () + 4; - SET_PROC_DESC_IS_DUMMY (proc_desc); - PROC_PC_REG (proc_desc) = RA_REGNUM; -} - static void mips_pop_frame (void) { @@ -6238,9 +6133,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file) fprintf_unfiltered (file, "mips_dump_tdep: GDB_TARGET_IS_MIPS64 = %d\n", GDB_TARGET_IS_MIPS64); - fprintf_unfiltered (file, - "mips_dump_tdep: GEN_REG_SAVE_MASK = %d\n", - GEN_REG_SAVE_MASK); fprintf_unfiltered (file, "mips_dump_tdep: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n", XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT)); @@ -6354,9 +6246,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file) fprintf_unfiltered (file, "mips_dump_tdep: PS_REGNUM = %d\n", PS_REGNUM); - fprintf_unfiltered (file, - "mips_dump_tdep: PUSH_FP_REGNUM = %d\n", - PUSH_FP_REGNUM); fprintf_unfiltered (file, "mips_dump_tdep: RA_REGNUM = %d\n", RA_REGNUM);