From ae803653f2cdd9191b31e8f47853abbc454bdcce Mon Sep 17 00:00:00 2001 From: borutr Date: Mon, 23 Apr 2007 19:11:03 +0000 Subject: [PATCH] * doc/sdccman.lyx, src/SDCCmain.c: peep-hole comments are generated only if --fverbose-asm option is specified and --no-peep-comments is not, as proposed by Frieder. * support/regression/Makefile.in: compile regression tests with --fverbose-asm option so one can "grep" whether a new (or an old) peephole is (still) applied; requested by Frieder. git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4769 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 9 +++++++++ doc/sdccman.lyx | 15 ++++++++------- src/SDCCmain.c | 16 ++++++++++++++++ support/regression/Makefile.in | 2 +- 4 files changed, 34 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index b9b9901f..46b63248 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-04-23 Borut Razem + + * doc/sdccman.lyx, src/SDCCmain.c: + peep-hole comments are generated only if --fverbose-asm option is + specified and --no-peep-comments is not, as proposed by Frieder. + * support/regression/Makefile.in: compile regression tests with + --fverbose-asm option so one can "grep" whether a new (or an old) + peephole is (still) applied; requested by Frieder. + 2007-04-23 Kevin Buettner * device/include/pic/pic16f886.h, diff --git a/doc/sdccman.lyx b/doc/sdccman.lyx index 683daf16..074ccaeb 100644 --- a/doc/sdccman.lyx +++ b/doc/sdccman.lyx @@ -9630,14 +9630,14 @@ status collapsed \end_inset --no-peep-comments -\begin_inset LatexCommand \index{-\/-no-peep-comments} +-fverbose-asm +\begin_inset LatexCommand \index{-\/-no-gen-comments} \end_inset \series default - Will not include peep-hole comments in the generated files. + Include code generator and peep-hole comments in the generated asm files. \end_layout \begin_layout List @@ -9657,14 +9657,15 @@ status collapsed \end_inset --fverbose-asm -\begin_inset LatexCommand \index{-\/-no-gen-comments} +-no-peep-comments +\begin_inset LatexCommand \index{-\/-no-peep-comments} \end_inset \series default - Include code generator comments in the generated asm files. + Don't include peep-hole comments in the generated asm files even if --fverbose- +asm option is specified. \end_layout \begin_layout List @@ -10068,7 +10069,7 @@ status collapsed \InsetSpace ~ The name to be used for the const -\begin_inset LatexCommand \index{code} +\begin_inset LatexCommand \index{const} \end_inset diff --git a/src/SDCCmain.c b/src/SDCCmain.c index 98366928..f4c21bf1 100644 --- a/src/SDCCmain.c +++ b/src/SDCCmain.c @@ -1480,6 +1480,17 @@ parseCmdLine (int argc, char **argv) return 0; } +/*-----------------------------------------------------------------*/ +/* finalizeOptions - finalize (post-process( options */ +/*-----------------------------------------------------------------*/ +static void +finalizeOptions (void) +{ + /* no peephole comments if not verbose asm */ + if (!options.verboseAsm) + options.noPeepComments = 1; +} + /*-----------------------------------------------------------------*/ /* linkEdit : - calls the linkage editor with options */ /*-----------------------------------------------------------------*/ @@ -2433,8 +2444,13 @@ main (int argc, char **argv, char **envp) And the z80 port needs port->finaliseOptions(), even if we're only linking. */ initMem (); + + /* finalize target specific options */ port->finaliseOptions (); + /* finalize common options */ + finalizeOptions (); + if (fullSrcFileName || options.c1mode) { preProcess (envp); diff --git a/support/regression/Makefile.in b/support/regression/Makefile.in index d65b07c0..7bf2b91b 100644 --- a/support/regression/Makefile.in +++ b/support/regression/Makefile.in @@ -154,7 +154,7 @@ INC_DIR = $(top_srcdir)/device/include # Path to SDCC SDCC = $(top_builddir)/bin/sdcc # Base flags. -SDCCFLAGS += -DNO_VARARGS +SDCCFLAGS += --fverbose-asm -DNO_VARARGS # Extension of object intermediate files OBJEXT = .o # Extension of files that can be run in the emulator -- 2.30.2