From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20975 invoked by alias); 1 Jun 2003 18:13:06 -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 20876 invoked from network); 1 Jun 2003 18:13:02 -0000 Received: from unknown (HELO are.twiddle.net) (64.81.246.98) by sources.redhat.com with SMTP; 1 Jun 2003 18:13:02 -0000 Received: from are.twiddle.net (localhost.localdomain [127.0.0.1]) by are.twiddle.net (8.12.8/8.12.8) with ESMTP id h51ID0LH004375; Sun, 1 Jun 2003 11:13:00 -0700 Received: (from rth@localhost) by are.twiddle.net (8.12.8/8.12.8/Submit) id h51ID0wD004373; Sun, 1 Jun 2003 11:13:00 -0700 X-Authentication-Warning: are.twiddle.net: rth set sender to rth@twiddle.net using -f Date: Sun, 01 Jun 2003 18:13:00 -0000 From: Richard Henderson To: gdb-patches@sources.redhat.com Cc: cagney@redhat.com Subject: [committed] store sp in alpha_push_dummy_call Message-ID: <20030601181300.GA4357@twiddle.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2003-06/txt/msg00024.txt.bz2 Apparently, push_dummy_call is expected to update the sp: /* NOTE: cagney/2003-03-23: Disable this code when there is a push_dummy_call() method. Since that method will have already stored the stack pointer (as part of creating the fake call frame), and none of the code following that code adjusts the stack-pointer value, the below call is entirely redundant. */ if (DEPRECATED_DUMMY_WRITE_SP_P ()) DEPRECATED_DUMMY_WRITE_SP (sp); Andrew, you have the same problem in your mips push_dummy_call routines, from which I was pattern matching. r~ * alpha-tdep.c (alpha_push_dummy_call): Store sp. Tidy copies from arg_reg_buffer to regcache to avoid double conversion. Index: alpha-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/alpha-tdep.c,v retrieving revision 1.89 diff -c -p -d -r1.89 alpha-tdep.c *** alpha-tdep.c 1 Jun 2003 16:02:50 -0000 1.89 --- alpha-tdep.c 1 Jun 2003 17:00:25 -0000 *************** alpha_push_dummy_call (struct gdbarch *g *** 314,326 **** /* Load the argument registers. */ for (i = 0; i < required_arg_regs; i++) { ! LONGEST val; ! ! val = extract_unsigned_integer (arg_reg_buffer + i*ALPHA_REGISTER_SIZE, ! ALPHA_REGISTER_SIZE); ! regcache_cooked_write_signed (regcache, ALPHA_A0_REGNUM + i, val); ! regcache_cooked_write_signed (regcache, ALPHA_FPA0_REGNUM + i, val); } return sp; } --- 314,327 ---- /* Load the argument registers. */ for (i = 0; i < required_arg_regs; i++) { ! regcache_cooked_write (regcache, ALPHA_A0_REGNUM + i, ! arg_reg_buffer + i*ALPHA_REGISTER_SIZE); ! regcache_cooked_write (regcache, ALPHA_FPA0_REGNUM + i, ! arg_reg_buffer + i*ALPHA_REGISTER_SIZE); } + + /* Finally, update the stack pointer. */ + regcache_cooked_write_signed (regcache, ALPHA_SP_REGNUM, sp); return sp; }