From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15631 invoked by alias); 19 Nov 2010 22:50:03 -0000 Received: (qmail 15617 invoked by uid 22791); 19 Nov 2010 22:50:02 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT,TW_OV X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.158) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 19 Nov 2010 22:49:56 +0000 Received: from md1.u-strasbg.fr (md1.u-strasbg.fr [IPv6:2001:660:2402::186]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id oAJMnTv6014717 ; Fri, 19 Nov 2010 23:49:30 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms8.u-strasbg.fr [130.79.204.17]) by md1.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id oAJMnTEg065473 ; Fri, 19 Nov 2010 23:49:29 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id oAJMnRF1076840 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) ; Fri, 19 Nov 2010 23:49:28 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Joel Brobecker'" , Cc: References: <001701cb84ea$6883c170$398b4450$@muller@ics-cnrs.unistra.fr> <20101118172209.GE2634@adacore.com> <004201cb87c1$dab95cd0$902c1670$@muller@ics-cnrs.unistra.fr> <20101119172011.GI2634@adacore.com> In-Reply-To: <20101119172011.GI2634@adacore.com> Subject: RE: [RFC] Improve amd64 prologue analysis Date: Fri, 19 Nov 2010 22:50:00 -0000 Message-ID: <000901cb883c$067a8860$136f9920$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2010-11/txt/msg00275.txt.bz2 I think that your code does indeed catch some instructions that are not covered by my patch, especially in Windows DLL. Concerning your pre_prologue function, I think that I found the explanation in "amd64 Prolog and Epilog" description page from MSDN. This page states that before storing non-volatile registers and allocating the local stack, the register parameters should be placed into the stack space that must be allocated anyhow when calling a function according to the ABI. http://msdn.microsoft.com/en-us/library/tawsa7cb.aspx This means that basically only 8 patterns should be possible: movq %rcx, 8(%rsp) or movq %xmm0, 8(%rsp) movq %rdx, 16(%rsp) or movq %xmm1, 16(%rsp) movq %r8, 24(%rsp) or movq %xmm2, 24(%rsp) movq %r9, 32(%rsp) or movq %xmm3, 32(%rsp) But apparently KernelBase DLL doesn't itself follow this rule, and other registers are saved into this stack space allocated for register parameters... So that keeping it general makes sense. Mark, what should we do about those patches? Pierre