From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5865 invoked by alias); 5 Apr 2002 22:04:11 -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 5855 invoked from network); 5 Apr 2002 22:04:10 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 5 Apr 2002 22:04:10 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 017863C9F for ; Fri, 5 Apr 2002 17:04:08 -0500 (EST) Message-ID: <3CAE1F58.4070601@cygnus.com> Date: Fri, 05 Apr 2002 14:04:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.9) Gecko/20020328 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [rfa:sparc] Remove write_fp() from sparc-tdep.c Content-Type: multipart/mixed; boundary="------------040106090005000900050401" X-SW-Source: 2002-04/txt/msg00189.txt.bz2 This is a multi-part message in MIME format. --------------040106090005000900050401 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 202 Hello, The attached deletes the write_fp() function from the sparc-tdep.c code. Ok? Once this is in, I'll commit the other patch that simply deletes write_fp() from the architecture vector. Andrew --------------040106090005000900050401 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 2320 2002-04-04 Andrew Cagney * sparc-tdep.c (sparc64_write_fp): Delete. (sparc_push_dummy_frame): Replace write_fp call with code to store the FP directly. (sparc_gdbarch_init): Do not initialize write_fp. Index: sparc-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sparc-tdep.c,v retrieving revision 1.23 diff -u -r1.23 sparc-tdep.c --- sparc-tdep.c 2002/02/20 10:42:59 1.23 +++ sparc-tdep.c 2002/04/05 21:58:56 @@ -986,8 +986,18 @@ if (strcmp (target_shortname, "sim") != 0) { - write_fp (old_sp); - + if (gdbarch_tdep (current_gdbarch)->intreg_size == 8) + { + CORE_ADDR oldfp = read_register (FP_REGNUM); + if (oldfp & 1) + write_register (FP_REGNUM, old_sp - 2047); + else + write_register (FP_REGNUM, old_sp); + } + else + { + write_register (FP_REGNUM, old_sp); + } /* Set return address register for the call dummy to the current PC. */ write_register (I7_REGNUM, read_pc () - 8); } @@ -2261,16 +2271,6 @@ write_register (SP_REGNUM, val); } -void -sparc64_write_fp (CORE_ADDR val) -{ - CORE_ADDR oldfp = read_register (FP_REGNUM); - if (oldfp & 1) - write_register (FP_REGNUM, val - 2047); - else - write_register (FP_REGNUM, val); -} - /* The SPARC 64 ABI passes floating-point arguments in FP0 to FP31, and all other arguments in O0 to O5. They are also copied onto the stack in the correct places. Apparently (empirically), @@ -3038,7 +3038,6 @@ set_gdbarch_store_struct_return (gdbarch, sparc32_store_struct_return); set_gdbarch_use_struct_convention (gdbarch, generic_use_struct_convention); - set_gdbarch_write_fp (gdbarch, generic_target_write_fp); set_gdbarch_write_sp (gdbarch, generic_target_write_sp); tdep->y_regnum = SPARC32_Y_REGNUM; tdep->fp_max_regnum = SPARC_FP0_REGNUM + 32; @@ -3097,7 +3096,6 @@ set_gdbarch_store_struct_return (gdbarch, sparc64_store_struct_return); set_gdbarch_use_struct_convention (gdbarch, sparc64_use_struct_convention); - set_gdbarch_write_fp (gdbarch, sparc64_write_fp); set_gdbarch_write_sp (gdbarch, sparc64_write_sp); tdep->y_regnum = SPARC64_Y_REGNUM; tdep->fp_max_regnum = SPARC_FP0_REGNUM + 48; --------------040106090005000900050401--