[testsuite patch]: scan for .global in additon to .globl

Kaveh R. Ghazi ghazi@caipclassic.rutgers.edu
Wed Jan 4 18:17:00 GMT 2006


 > On Sat, 24 Dec 2005, Kaveh R. Ghazi wrote:
 > 
 > > Some assembler dialects use .global instead of .globl, right?
 > 
 > And don't forget leading-underscore targets: prepend the _Z
 > (really: all symbols) with _?
 > 
 > > diff -rup orig/egcc-4.0-SVN20051223/gcc/testsuite/g++.dg/rtti/tinfo1.C egcc-4.0-SVN20051223/gcc/testsuite/g++.dg/rtti/tinfo1.C
 > > --- orig/egcc-4.0-SVN20051223/gcc/testsuite/g++.dg/rtti/tinfo1.C 2005-11-03 10:42:57.000000000 -0500
 > > -// { dg-final { scan-assembler-not ".globl\[		\]+_ZTIP9CTemplateIhE" } }
 > > +// { dg-final { scan-assembler-not "(.globl|.global)\[		       \]+_ZTIP9CTemplateIhE" } }
 > 
 >   +// { dg-final { scan-assembler-not "(.globl|.global)\[ 	\]+_?_ZTIP9CTemplateIhE" } }
 > brgds, H-P


On reflection, now I'm confused about how we use tcl regexp in the
testsuite.  Doesn't dot mean any one character?  Doesn't question mark
mean zero or one of the preceeding expression?

1.  If so, why do we use "i?86-*-*" in all our target patterns?

Doesn't the use of question mark here really mean zero or one "i", not
what we really meant which is "i" followed by one character, usually
3,4,5,6,... ?  This matches e.g. i686-unknown-linux-gnu by chance by
using zero "i" characters followed by "86-", we should change these
all to "i.86-*-*" right?

2.  Should the dots in assembler patterns like ".globl", ".global"
    (and ".weak", etc for that matter) be escaped?  I.e. "\.globl",
    "\.global", "\.weak" ?

		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu



More information about the Gcc-patches mailing list