From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28499 invoked by alias); 31 Jul 2002 22:54:46 -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 28482 invoked from network); 31 Jul 2002 22:54:45 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 31 Jul 2002 22:54:45 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g6VMgKl13296 for ; Wed, 31 Jul 2002 18:42:20 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g6VMshu02825 for ; Wed, 31 Jul 2002 18:54:43 -0400 Received: from romulus.sfbay.redhat.com (IDENT:lqEnlZZMzyyzhCsji9H7LH+cVckH3RXV@romulus.sfbay.redhat.com [172.16.27.251]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g6VMsgm01779 for ; Wed, 31 Jul 2002 15:54:42 -0700 Received: (from kev@localhost) by romulus.sfbay.redhat.com (8.11.6/8.11.6) id g6VMsef24079 for gdb-patches@sources.redhat.com; Wed, 31 Jul 2002 15:54:40 -0700 Date: Wed, 31 Jul 2002 16:02:00 -0000 From: Kevin Buettner Message-Id: <1020731225440.ZM24078@localhost.localdomain> To: gdb-patches@sources.redhat.com Subject: [RFA] mips-tdep.c: Set mips_default_saved_regsize to 8 for N32 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-07/txt/msg00638.txt.bz2 For the N32 ABI, registers are 64 bits wide, and all 64-bits are sometimes used for certain data types (e.g. when passing structs). So, when a register is saved in a function prologue, it is necessary to save all 64 bits of the register. I've verified this by looking at some function prologues created by SGI's compiler; the "sd" (which saves the entire 64-bit register) instruction is used to save registers. With this change in place, the following FAILs are fixed for n32: FAIL: gdb.base/call-ar-st.exp: print print_small_structs, pattern 1 FAIL: gdb.base/call-ar-st.exp: print print_ten_doubles, pattern 5 + sentinel FAIL: gdb.base/call-ar-st.exp: print print_small_structs from print_long_arg_list, pattern 1 FAIL: gdb.base/call-ar-st.exp: print print_bit_flags_combo from init_bit_flags_combo FAIL: gdb.base/call-ar-st.exp: print print_long_arg_list, pattern 7 FAIL: gdb.base/call-ar-st.exp: print sum_struct_print(10, *struct1, *struct2, *struct3, *struct4) FAIL: gdb.base/call-ar-st.exp: print print_struct_rep(*struct1, *struct2, *struct3), pattern 2 FAIL: gdb.base/call-ar-st.exp: print print_one_large_struct(*list1) Okay to commit? * mips-tdep.c (mips_gdbarch_init): For the N32 ABI, set mips_default_saved_regsize to 8. Index: mips-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mips-tdep.c,v retrieving revision 1.85 diff -u -p -r1.85 mips-tdep.c --- mips-tdep.c 31 Jul 2002 20:26:49 -0000 1.85 +++ mips-tdep.c 31 Jul 2002 22:34:59 -0000 @@ -4480,7 +4480,7 @@ mips_gdbarch_init (struct gdbarch_info i set_gdbarch_long_long_bit (gdbarch, 64); break; case MIPS_ABI_N32: - tdep->mips_default_saved_regsize = 4; + tdep->mips_default_saved_regsize = 8; tdep->mips_default_stack_argsize = 8; tdep->mips_fp_register_double = 1; tdep->mips_last_arg_regnum = A0_REGNUM + 8 - 1;