From: David Holsgrove <david.holsgrove@xilinx.com>
To: Mike Stump <mikestump@comcast.net>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
"Michael Eager (eager@eagerm.com)" <eager@eagerm.com>,
Vidhumouli Hunsigida <vidhum@xilinx.com>,
Nagaraju Mekala <nmekala@xilinx.com>,
John Williams <jwilliams@xilinx.com>,
Edgar Iglesias <edgari@xilinx.com>
Subject: RE: [Patch, testsuite]: Allow MicroBlaze .weakext pattern in regex match
Date: Mon, 17 Feb 2014 00:21:00 -0000 [thread overview]
Message-ID: <713637bd-a8af-45f5-9075-b9780eb6eaa8@TX2EHSMHS024.ehs.local> (raw)
In-Reply-To: <A8AD5AA3-A36C-444C-AB5B-06351BEE942A@comcast.net>
[-- Attachment #1: Type: text/plain, Size: 1902 bytes --]
Hi Mike,
> -----Original Message-----
> From: Mike Stump [mailto:mikestump@comcast.net]
> Sent: Friday, 14 February 2014 6:01 pm
> To: David Holsgrove
> Cc: gcc-patches@gcc.gnu.org; Michael Eager (eager@eagerm.com); Vidhumouli
> Hunsigida; Nagaraju Mekala; John Williams; Edgar Iglesias
> Subject: Re: [Patch, testsuite]: Allow MicroBlaze .weakext pattern in regex match
>
> On Feb 13, 2014, at 10:07 PM, David Holsgrove <david.holsgrove@xilinx.com>
> wrote:
> > I've attached a patch to extend the regex pattern to include optional 'ext' at the
> end of
> > '.weak' to match the MicroBlaze weak label '.weakext' in two of the g++ test
> cases.
>
> I don’t feel strongly either way. I'd like think weak(_definition)?(ext)?….. is good
> enough, as this test doesn’t much care beyond that.
>
> spec34 does:
>
> { dg-final { scan-assembler ".weak(_definition)?\[\t \]*_?_Z2f2IiEvT_”
>
> for example. Which I think is fairly readable/maintainable.
>
> Let’s give others that might disagree with me an opportunity to do so… I’m
> happy to defer to anyone that has a stronger opinion than mine. If no one steps
> forward, I’ll ok either way you want to go.
>
> Wearing my hat as darwin/testsuite maintainer. :-)
Thanks for the reply, I'd be happy with reducing the number of matches in those tests to use optional 'ext' or optional '_definition' as you suggested.
I've attached an updated patch to consolidate and remove the separate Darwin tests, so we can go with either approach if anyone else has an opinion.
ChangeLog/testsuite
2014-02-14 David Holsgrove <david.holsgrove@xilinx.com>
* gcc/testsuite/g++.dg/abi/rtti3.C: Extend scan-assembler
pattern to take optional patterns and remove darwin test.
* gcc/testsuite/g++.dg/abi/thunk3.C: Likewise.
* gcc/testsuite/g++.dg/abi/thunk4.C: Likewise.
thanks,
David
[-- Attachment #2: 0005-Patch-testsuite-Extend-.weak-pattern-in-regex-match.patch --]
[-- Type: application/octet-stream, Size: 3235 bytes --]
From 61c55c1cd8feb544186859d482ba986eee117d6a Mon Sep 17 00:00:00 2001
From: David Holsgrove <david.holsgrove@xilinx.com>
Date: Fri, 14 Feb 2014 09:36:45 +1000
Subject: [PATCH] [Patch, testsuite]: Extend .weak pattern in regex match
Extend regex pattern to include optional 'ext' at the end of
'.weak' to match the MicroBlaze weak label '.weakext', or optional
'_definition' to match the darwin '.weak_definition' pattern,
which removes the need for separate darwin tests.
ChangeLog/testsuite
2014-02-14 David Holsgrove <david.holsgrove@xilinx.com>
* gcc/testsuite/g++.dg/abi/rtti3.C: Extend scan-assembler
pattern to take optional pattern and remove darwin test.
* gcc/testsuite/g++.dg/abi/thunk3.C: Likewise.
* gcc/testsuite/g++.dg/abi/thunk4.C: Likewise.
Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
fix tests
Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
---
gcc/testsuite/g++.dg/abi/rtti3.C | 6 ++----
gcc/testsuite/g++.dg/abi/thunk3.C | 3 +--
gcc/testsuite/g++.dg/abi/thunk4.C | 3 +--
3 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/gcc/testsuite/g++.dg/abi/rtti3.C b/gcc/testsuite/g++.dg/abi/rtti3.C
index c03e461..2318dd9 100644
--- a/gcc/testsuite/g++.dg/abi/rtti3.C
+++ b/gcc/testsuite/g++.dg/abi/rtti3.C
@@ -3,10 +3,8 @@
// { dg-require-weak "" }
// { dg-skip-if "Linkonce not weak" { *-*-mingw* *-*-cygwin } { "*" } { "" } }
-// { dg-final { scan-assembler ".weak\[ \t\]_?_ZTSPP1A" { target { ! { *-*-darwin* } } } } }
-// { dg-final { scan-assembler-not ".weak\[ \t\]_?_ZTIPP1A" { target { ! { *-*-darwin* } } } } }
-// { dg-final { scan-assembler ".weak_definition\[ \t\]_?_ZTSPP1A" { target { *-*-darwin* } } } }
-// { dg-final { scan-assembler-not ".weak_definition\[ \t\]_?_ZTIPP1A" { target { *-*-darwin* } } } }
+// { dg-final { scan-assembler ".weak(_definition)?(ext)?\[ \t\]_?_ZTSPP1A" } }
+// { dg-final { scan-assembler-not ".weak(_definition)?(ext)?\[ \t\]_?_ZTIPP1A" } }
struct A;
diff --git a/gcc/testsuite/g++.dg/abi/thunk3.C b/gcc/testsuite/g++.dg/abi/thunk3.C
index f2347f7..ef872ee 100644
--- a/gcc/testsuite/g++.dg/abi/thunk3.C
+++ b/gcc/testsuite/g++.dg/abi/thunk3.C
@@ -1,6 +1,5 @@
// { dg-require-weak "" }
-// { dg-final { scan-assembler-not ".weak\[\t \]_?_ZThn._N7Derived3FooEv" { target { ! { *-*-darwin* } } } } }
-// { dg-final { scan-assembler-not ".weak_definition\[\t \]_?_ZThn._N7Derived3FooEv" { target { *-*-darwin* } } } }
+// { dg-final { scan-assembler-not ".weak(_definition)?(ext)?\[\t \]_?_ZThn._N7Derived3FooEv" } }
struct Base
{
diff --git a/gcc/testsuite/g++.dg/abi/thunk4.C b/gcc/testsuite/g++.dg/abi/thunk4.C
index fa5fbd4..a1e96b9 100644
--- a/gcc/testsuite/g++.dg/abi/thunk4.C
+++ b/gcc/testsuite/g++.dg/abi/thunk4.C
@@ -1,7 +1,6 @@
// { dg-require-weak "" }
// { dg-skip-if "Linkonce not weak" { *-*-mingw* *-*-cygwin } { "*" } { "" } }
-// { dg-final { scan-assembler ".weak\[ \t\]_?_ZThn._N7Derived3FooEv" { target { ! { *-*-darwin* } } } } }
-// { dg-final { scan-assembler ".weak_definition\[ \t\]_?_ZThn._N7Derived3FooEv" { target { *-*-darwin* } } } }
+// { dg-final { scan-assembler ".weak(_definition)?(ext)?\[ \t\]_?_ZThn._N7Derived3FooEv" } }
struct Base
{
--
1.7.9.5
next prev parent reply other threads:[~2014-02-17 0:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-14 6:07 David Holsgrove
2014-02-14 8:01 ` Mike Stump
2014-02-17 0:21 ` David Holsgrove [this message]
2014-02-20 20:17 ` Mike Stump
2014-02-27 0:29 ` David Holsgrove
2014-02-28 0:55 ` Michael Eager
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=713637bd-a8af-45f5-9075-b9780eb6eaa8@TX2EHSMHS024.ehs.local \
--to=david.holsgrove@xilinx.com \
--cc=eager@eagerm.com \
--cc=edgari@xilinx.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jwilliams@xilinx.com \
--cc=mikestump@comcast.net \
--cc=nmekala@xilinx.com \
--cc=vidhum@xilinx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).