From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29219 invoked by alias); 18 Mar 2009 05:02:10 -0000 Received: (qmail 29073 invoked by uid 22791); 18 Mar 2009 05:02:08 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 18 Mar 2009 05:02:01 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n2I51IJf006671; Wed, 18 Mar 2009 01:01:18 -0400 Received: from localhost.localdomain (vpn-13-184.rdu.redhat.com [10.11.13.184]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n2I51JfO011876; Wed, 18 Mar 2009 01:01:19 -0400 Date: Wed, 18 Mar 2009 05:27:00 -0000 From: Kevin Buettner To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [RFC] mn10300: Rewrite prologue analyzer Message-ID: <20090317220116.30422bfc@redhat.com> In-Reply-To: <20090316172438.GG9294@adacore.com> References: <20090313162450.31a77332@redhat.com> <20090316172438.GG9294@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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: 2009-03/txt/msg00365.txt.bz2 On Mon, 16 Mar 2009 13:24:38 -0400 Joel Brobecker wrote: > > I've rewritten the prologue analyzer to use the "prologue-value" > > machinery. It already knows about more instructions than the existing > > prologue analyzer, and will accept instructions in any order. > > Nice! I've always wanted to take a look and see how it can simplify > prologue parsing... How did you find it? The prologue-value machinery is great. You basically write a simulator for the various instructions that might appear in a prologue. When the simulation is done, either due to running to the limit, or encountering an instruction that prologue analyzer doesn't handle, you look at the resulting state to figure out the various frame-related offsets, including those of saved registers. The prologue-value machinery is used to manipulate the state and for analyzing the state when the simulation is done. I've used this machinery twice now, both for mn10300 as well as for another port that I can't talk about yet. In both cases, construction of the prologue analyzer was quicker and required less debugging than the ad-hoc analyzers that I've written in the past. > Looks like overall your patch is a nice improvement compared to > the previous implementation. I quickly scanned the patch. I am not > very familiar with prologue-value, but everything seemed OK to me. Thanks for looking it over. Kevin