From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8029 invoked by alias); 24 Sep 2013 16:33:44 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 7977 invoked by uid 89); 24 Sep 2013 16:33:44 -0000 Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 24 Sep 2013 16:33:44 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 5642F11670F; Tue, 24 Sep 2013 12:33:57 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id yxhjiQx+sxUA; Tue, 24 Sep 2013 12:33:57 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 21BC411670E; Tue, 24 Sep 2013 12:33:57 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id C0260E0314; Tue, 24 Sep 2013 09:33:39 -0700 (PDT) From: Joel Brobecker To: gdb-patches@sourceware.org Cc: Pierre Muller , Mark Kettenis Subject: [commit 2/4] Revert use of integer_param_regs_saved_in_caller_frame in i386 gdbarch_tdep. Date: Tue, 24 Sep 2013 16:33:00 -0000 Message-Id: <1380040404-16932-3-git-send-email-brobecker@adacore.com> In-Reply-To: <1380040404-16932-1-git-send-email-brobecker@adacore.com> References: <20130920232017.GU3132@adacore.com> <1380040404-16932-1-git-send-email-brobecker@adacore.com> X-SW-Source: 2013-09/txt/msg00868.txt.bz2 This is no longer useful, as it was introduced to reuse the funcall handling code in amd64-tdep.c in the context of x64-windows. But we have since then changed the implementations to be completely independent of each other. This reverts the non-windows-specific part of the change called: amd64-windows: 32 bytes allocated on stack by caller for integer parameter regs (the x64-windows portion has already been reverted) gdb/ChangeLog: Revert: * i386-tdep.h (struct gdbarch_tdep): Add new field integer_param_regs_saved_in_caller_frame. * amd64-tdep.c (amd64_push_dummy_call): Allocate some memory on stack if tdep->integer_param_regs_saved_in_caller_frame is set. Tested on x86_64-linux, checked in. --- gdb/ChangeLog | 8 ++++++++ gdb/amd64-tdep.c | 5 ----- gdb/i386-tdep.h | 18 ++++-------------- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 71602a0..1977ff0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,13 @@ 2013-09-24 Joel Brobecker + Revert: + * i386-tdep.h (struct gdbarch_tdep): Add new field + integer_param_regs_saved_in_caller_frame. + * amd64-tdep.c (amd64_push_dummy_call): Allocate some memory on + stack if tdep->integer_param_regs_saved_in_caller_frame is set. + +2013-09-24 Joel Brobecker + * amd64-tdep.c: #include "value.h" (amd64_windows_classify): Delete. (amd64_windows_passed_by_integer_register) diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index 3ab74f0..ec6bfc6 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -926,11 +926,6 @@ amd64_push_dummy_call (struct gdbarch *gdbarch, struct value *function, regcache_cooked_write (regcache, arg_regnum, buf); } - /* Reserve some memory on the stack for the integer-parameter registers, - if required by the ABI. */ - if (tdep->integer_param_regs_saved_in_caller_frame) - sp -= tdep->call_dummy_num_integer_regs * 8; - /* Store return address. */ sp -= 8; store_unsigned_integer (buf, 8, byte_order, bp_addr); diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h index 69bd281..8113dcc 100644 --- a/gdb/i386-tdep.h +++ b/gdb/i386-tdep.h @@ -81,12 +81,12 @@ struct gdbarch_tdep int call_dummy_num_integer_regs; int *call_dummy_integer_regs; - /* Used on amd64 only. Classify TYPE according to calling conventions, - and store the result in CLASS. */ + /* Classify TYPE according to calling conventions, and store + the result in CLASS. Used on amd64 only. */ void (*classify) (struct type *type, enum amd64_reg_class class[2]); - /* Used on amd64 only. Non-zero if the first few MEMORY arguments - should be passed by pointer. + /* Non-zero if the first few MEMORY arguments should be passed by + pointer. More precisely, MEMORY arguments are passed through the stack. But certain architectures require that their address be passed @@ -94,16 +94,6 @@ struct gdbarch_tdep available for argument passing. */ int memory_args_by_pointer; - /* Used on amd64 only. - - If non-zero, then the callers of a function are expected to reserve - some space in the stack just before the area where the PC is saved - so that the callee may save the integer-parameter registers there. - The amount of space is dependent on the list of registers used for - integer parameter passing (see component call_dummy_num_integer_regs - above). */ - int integer_param_regs_saved_in_caller_frame; - /* Floating-point registers. */ struct regset *fpregset; size_t sizeof_fpregset; -- 1.8.1.2