From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22594 invoked by alias); 20 May 2003 12:55:50 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 22482 invoked from network); 20 May 2003 12:55:48 -0000 Received: from unknown (HELO Cantor.suse.de) (213.95.15.193) by sources.redhat.com with SMTP; 20 May 2003 12:55:48 -0000 Received: from Hermes.suse.de (Hermes.suse.de [213.95.15.136]) by Cantor.suse.de (Postfix) with ESMTP id 29701147D3; Tue, 20 May 2003 14:55:48 +0200 (MEST) To: Michal Ludvig Cc: binutils@sources.redhat.com, Alan Modra Subject: Re: [RFA] CFI improvements References: <3ECA1DBE.7080603@suse.cz> From: Andreas Jaeger Date: Tue, 20 May 2003 12:55:00 -0000 In-Reply-To: <3ECA1DBE.7080603@suse.cz> (Michal Ludvig's message of "Tue, 20 May 2003 14:21:18 +0200") Message-ID: User-Agent: Gnus/5.1003 (Gnus v5.10.3) XEmacs/21.4 (Portable Code, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-05/txt/msg00571.txt.bz2 Michal Ludvig writes: > Hi, > the attached patch adds some new features to the CFI engine: > - register names can start with '%' as requested by GCC guys. > - CIEs are not duplicated anymore but instead reused if possible. > - tc_cfi_init() is moved from main() to dot_cfi_startproc() - > otherwise it didn't set correct values on amd64 because the output > format wasn't yet known in main(). > - .cfi_startproc takes optional parameter 'simple' that disables > emitting of architecture-dependent initial instructions. > - testsuite is modified to pass with CIE optimalization. > > I hope I haven't introduce any new C89 incompatibility (sorry for that one). > > Comments? Approvals? > > Michal Ludvig > Index: dw2gencfi.c > =================================================================== > RCS file: /cvs/src/src/gas/dw2gencfi.c,v > retrieving revision 1.2 > diff -u -p -r1.2 dw2gencfi.c > --- dw2gencfi.c 20 May 2003 11:35:45 -0000 1.2 > +++ dw2gencfi.c 20 May 2003 12:04:30 -0000 > @@ -23,24 +23,55 @@ > #include "as.h" > #include "dw2gencfi.h" > > +struct cie_entry > +{ > + unsigned long offset; > + size_t size; > + void *data; > + struct cie_entry *next; > +}; > + > +struct cfi_data > +{ > + enum cfi_insn insn; > + long param[2]; > + struct cfi_data *next; > +}; > + > +struct cfi_info > +{ > + addressT start_address; > + addressT end_address; > + addressT last_address; > + const char *labelname; > + struct cfi_data *data; > + struct cfi_info *next; > +}; > + > +/* Current open CFI entry. */ > +static struct cfi_info *cfi_info; > + > +/* List of CIEs so that they could be reused. */ > +static struct cie_entry *cie_root; > + > /* Current target config. */ > static struct cfi_config current_config; > > /* This is the main entry point to the CFI machinery. */ > static void dot_cfi (int arg); > > -const pseudo_typeS cfi_pseudo_table[] = > - { > - { "cfi_verbose", dot_cfi, CFI_verbose }, > - { "cfi_startproc", dot_cfi, CFI_startproc }, > - { "cfi_endproc", dot_cfi, CFI_endproc }, > - { "cfi_def_cfa", dot_cfi, CFA_def_cfa }, > - { "cfi_def_cfa_register", dot_cfi, CFA_def_cfa_register }, > - { "cfi_def_cfa_offset", dot_cfi, CFA_def_cfa_offset }, > - { "cfi_adjust_cfa_offset", dot_cfi, CFI_adjust_cfa_offset }, > - { "cfi_offset", dot_cfi, CFA_offset }, > - { NULL, NULL, 0 } > - }; > +const pseudo_typeS cfi_pseudo_table[] = { > + {"cfi_verbose", dot_cfi, CFI_verbose}, > + {"cfi_startproc", dot_cfi, CFI_startproc}, > + {"cfi_endproc", dot_cfi, CFI_endproc}, > + {"cfi_def_cfa", dot_cfi, CFA_def_cfa}, > + {"cfi_def_cfa_register", dot_cfi, CFA_def_cfa_register}, > + {"cfi_def_cfa_offset", dot_cfi, CFA_def_cfa_offset}, > + {"cfi_adjust_cfa_offset", dot_cfi, CFI_adjust_cfa_offset}, > + {"cfi_offset", dot_cfi, CFA_offset}, > + {"cfi_register", dot_cfi, CFA_register}, > + {NULL, NULL, 0} > +}; These look like whitespace changes. Alan has done a number of formatting changes, can you incorporate them cleanly into your patch and then resend the patch? Reverting Alan's formatting changes is not the right way IMO. > [...] > + char *simple = "simple"; const char? Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj