From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22316 invoked by alias); 29 Apr 2004 23:39:26 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 22308 invoked from network); 29 Apr 2004 23:39:25 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 29 Apr 2004 23:39:25 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i3TNdPKI003979 for ; Thu, 29 Apr 2004 19:39:25 -0400 Received: from localhost.redhat.com (to-dhcp51.toronto.redhat.com [172.16.14.151]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i3TNdOv24440; Thu, 29 Apr 2004 19:39:24 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 23A852B9D; Thu, 29 Apr 2004 19:39:26 -0400 (EDT) Message-ID: <4091922E.4030805@gnu.org> Date: Thu, 29 Apr 2004 23:39:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [commit] Eliminate mips_fp_register_double Content-Type: multipart/mixed; boundary="------------080108090005080504090603" X-SW-Source: 2004-04/txt/msg00698.txt.bz2 This is a multi-part message in MIME format. --------------080108090005080504090603 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 55 It's redundant, this eliminates it. committed, Andrew --------------080108090005080504090603 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 9208 2004-04-29 Andrew Cagney * mips-tdep.c (struct gdbarch_tdep): Delete mips_fp_register_double. (FP_REGISTER_DOUBLE): Delete macro, replace with test for mips_abi_regsize. (mips_gdbarch_init): Do not set mips_fp_register_double. (mips_dump_tdep): Do not print FP_REGISTER_DOUBLE. Index: mips-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mips-tdep.c,v retrieving revision 1.290 diff -p -u -r1.290 mips-tdep.c --- mips-tdep.c 29 Apr 2004 19:42:01 -0000 1.290 +++ mips-tdep.c 29 Apr 2004 23:37:35 -0000 @@ -107,8 +107,7 @@ static const char *size_enums[] = { }; /* Some MIPS boards don't support floating point while others only - support single-precision floating-point operations. See also - FP_REGISTER_DOUBLE. */ + support single-precision floating-point operations. */ enum mips_fpu_type { @@ -137,7 +136,6 @@ struct gdbarch_tdep enum mips_fpu_type mips_fpu_type; int mips_last_arg_regnum; int mips_last_fp_arg_regnum; - int mips_fp_register_double; int default_mask_address_p; /* Is the target using 64-bit raw integer registers but only storing a left-aligned 32-bit value in each? */ @@ -375,11 +373,6 @@ mips2_fp_compat (void) return 0; } -/* Indicate that the ABI makes use of double-precision registers - provided by the FPU (rather than combining pairs of registers to - form double-precision values). See also MIPS_FPU_TYPE. */ -#define FP_REGISTER_DOUBLE (gdbarch_tdep (current_gdbarch)->mips_fp_register_double) - /* The amount of space reserved on the stack for registers. This is different to MIPS_ABI_REGSIZE as it determines the alignment of data allocated after the registers have run out. */ @@ -2646,10 +2639,10 @@ return_value_location (struct type *valt && ((MIPS_FPU_TYPE == MIPS_FPU_DOUBLE && (len == 4 || len == 8)) || (MIPS_FPU_TYPE == MIPS_FPU_SINGLE && len == 4))) { - if (!FP_REGISTER_DOUBLE && len == 8) + if (mips_abi_regsize (current_gdbarch) < 8 && len == 8) { /* We need to break a 64bit float in two 32 bit halves and - spread them across a floating-point register pair. */ + spread them across a floating-point register pair. */ lo->buf_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 4 : 0; hi->buf_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 0 : 4; lo->reg_offset = ((TARGET_BYTE_ORDER == BFD_ENDIAN_BIG @@ -2857,7 +2850,8 @@ mips_eabi_push_dummy_call (struct gdbarc up before the check to see if there are any FP registers left. Non MIPS_EABI targets also pass the FP in the integer registers so also round up normal registers. */ - if (!FP_REGISTER_DOUBLE && fp_register_arg_p (typecode, arg_type)) + if (mips_abi_regsize (gdbarch) < 8 + && fp_register_arg_p (typecode, arg_type)) { if ((float_argreg & 1)) float_argreg++; @@ -2878,7 +2872,7 @@ mips_eabi_push_dummy_call (struct gdbarc if (fp_register_arg_p (typecode, arg_type) && float_argreg <= MIPS_LAST_FP_ARG_REGNUM) { - if (!FP_REGISTER_DOUBLE && len == 8) + if (mips_abi_regsize (gdbarch) < 8 && len == 8) { int low_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 4 : 0; unsigned long regval; @@ -3496,7 +3490,8 @@ mips_o32_push_dummy_call (struct gdbarch up before the check to see if there are any FP registers left. O32/O64 targets also pass the FP in the integer registers so also round up normal registers. */ - if (!FP_REGISTER_DOUBLE && fp_register_arg_p (typecode, arg_type)) + if (mips_abi_regsize (gdbarch) < 8 + && fp_register_arg_p (typecode, arg_type)) { if ((float_argreg & 1)) float_argreg++; @@ -3515,7 +3510,7 @@ mips_o32_push_dummy_call (struct gdbarch if (fp_register_arg_p (typecode, arg_type) && float_argreg <= MIPS_LAST_FP_ARG_REGNUM) { - if (!FP_REGISTER_DOUBLE && len == 8) + if (mips_abi_regsize (gdbarch) < 8 && len == 8) { int low_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 4 : 0; unsigned long regval; @@ -3562,7 +3557,7 @@ mips_o32_push_dummy_call (struct gdbarch fprintf_unfiltered (gdb_stdlog, " - reg=%d val=%s", argreg, phex (regval, len)); write_register (argreg, regval); - argreg += FP_REGISTER_DOUBLE ? 1 : 2; + argreg += (mips_abi_regsize (gdbarch) == 8) ? 1 : 2; } /* Reserve space for the FP register. */ stack_offset += align_up (len, mips_stack_argsize (gdbarch)); @@ -3948,7 +3943,8 @@ mips_o64_push_dummy_call (struct gdbarch up before the check to see if there are any FP registers left. O32/O64 targets also pass the FP in the integer registers so also round up normal registers. */ - if (!FP_REGISTER_DOUBLE && fp_register_arg_p (typecode, arg_type)) + if (mips_abi_regsize (gdbarch) < 8 + && fp_register_arg_p (typecode, arg_type)) { if ((float_argreg & 1)) float_argreg++; @@ -3967,7 +3963,7 @@ mips_o64_push_dummy_call (struct gdbarch if (fp_register_arg_p (typecode, arg_type) && float_argreg <= MIPS_LAST_FP_ARG_REGNUM) { - if (!FP_REGISTER_DOUBLE && len == 8) + if (mips_abi_regsize (gdbarch) < 8 && len == 8) { int low_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 4 : 0; unsigned long regval; @@ -4014,7 +4010,7 @@ mips_o64_push_dummy_call (struct gdbarch fprintf_unfiltered (gdb_stdlog, " - reg=%d val=%s", argreg, phex (regval, len)); write_register (argreg, regval); - argreg += FP_REGISTER_DOUBLE ? 1 : 2; + argreg += (mips_abi_regsize (gdbarch) == 8) ? 1 : 2; } /* Reserve space for the FP register. */ stack_offset += align_up (len, mips_stack_argsize (gdbarch)); @@ -5626,7 +5622,6 @@ mips_gdbarch_init (struct gdbarch_info i case MIPS_ABI_O32: set_gdbarch_push_dummy_call (gdbarch, mips_o32_push_dummy_call); set_gdbarch_return_value (gdbarch, mips_o32_return_value); - tdep->mips_fp_register_double = 0; tdep->mips_last_arg_regnum = A0_REGNUM + 4 - 1; tdep->mips_last_fp_arg_regnum = tdep->regnum->fp0 + 12 + 4 - 1; tdep->default_mask_address_p = 0; @@ -5640,7 +5635,6 @@ mips_gdbarch_init (struct gdbarch_info i mips_o64_store_return_value); set_gdbarch_deprecated_extract_return_value (gdbarch, mips_o64_extract_return_value); - tdep->mips_fp_register_double = 1; tdep->mips_last_arg_regnum = A0_REGNUM + 4 - 1; tdep->mips_last_fp_arg_regnum = tdep->regnum->fp0 + 12 + 4 - 1; tdep->default_mask_address_p = 0; @@ -5656,7 +5650,6 @@ mips_gdbarch_init (struct gdbarch_info i mips_eabi_store_return_value); set_gdbarch_deprecated_extract_return_value (gdbarch, mips_eabi_extract_return_value); - tdep->mips_fp_register_double = 0; tdep->mips_last_arg_regnum = A0_REGNUM + 8 - 1; tdep->mips_last_fp_arg_regnum = tdep->regnum->fp0 + 12 + 8 - 1; tdep->default_mask_address_p = 0; @@ -5674,7 +5667,6 @@ mips_gdbarch_init (struct gdbarch_info i mips_eabi_store_return_value); set_gdbarch_deprecated_extract_return_value (gdbarch, mips_eabi_extract_return_value); - tdep->mips_fp_register_double = 1; tdep->mips_last_arg_regnum = A0_REGNUM + 8 - 1; tdep->mips_last_fp_arg_regnum = tdep->regnum->fp0 + 12 + 8 - 1; tdep->default_mask_address_p = 0; @@ -5689,7 +5681,6 @@ mips_gdbarch_init (struct gdbarch_info i case MIPS_ABI_N32: set_gdbarch_push_dummy_call (gdbarch, mips_n32n64_push_dummy_call); set_gdbarch_return_value (gdbarch, mips_n32n64_return_value); - tdep->mips_fp_register_double = 1; tdep->mips_last_arg_regnum = A0_REGNUM + 8 - 1; tdep->mips_last_fp_arg_regnum = tdep->regnum->fp0 + 12 + 8 - 1; tdep->default_mask_address_p = 0; @@ -5700,7 +5691,6 @@ mips_gdbarch_init (struct gdbarch_info i case MIPS_ABI_N64: set_gdbarch_push_dummy_call (gdbarch, mips_n32n64_push_dummy_call); set_gdbarch_return_value (gdbarch, mips_n32n64_return_value); - tdep->mips_fp_register_double = 1; tdep->mips_last_arg_regnum = A0_REGNUM + 8 - 1; tdep->mips_last_fp_arg_regnum = tdep->regnum->fp0 + 12 + 8 - 1; tdep->default_mask_address_p = 0; @@ -5905,9 +5895,6 @@ mips_dump_tdep (struct gdbarch *current_ tdep->default_mask_address_p); } fprintf_unfiltered (file, - "mips_dump_tdep: FP_REGISTER_DOUBLE = %d\n", - FP_REGISTER_DOUBLE); - fprintf_unfiltered (file, "mips_dump_tdep: MIPS_DEFAULT_FPU_TYPE = %d (%s)\n", MIPS_DEFAULT_FPU_TYPE, (MIPS_DEFAULT_FPU_TYPE == MIPS_FPU_NONE ? "none" @@ -5922,9 +5909,6 @@ mips_dump_tdep (struct gdbarch *current_ : MIPS_FPU_TYPE == MIPS_FPU_SINGLE ? "single" : MIPS_FPU_TYPE == MIPS_FPU_DOUBLE ? "double" : "???")); - fprintf_unfiltered (file, - "mips_dump_tdep: FP_REGISTER_DOUBLE = %d\n", - FP_REGISTER_DOUBLE); fprintf_unfiltered (file, "mips_dump_tdep: mips_stack_argsize() = %d\n", mips_stack_argsize (current_gdbarch)); --------------080108090005080504090603--