* [Patch, testsuite]: Allow MicroBlaze .weakext pattern in regex match
@ 2014-02-14 6:07 David Holsgrove
2014-02-14 8:01 ` Mike Stump
0 siblings, 1 reply; 6+ messages in thread
From: David Holsgrove @ 2014-02-14 6:07 UTC (permalink / raw)
To: gcc-patches
Cc: Michael Eager (eager@eagerm.com),
Vidhumouli Hunsigida, Nagaraju Mekala, John Williams,
Edgar Iglesias
[-- Attachment #1: Type: text/plain, Size: 637 bytes --]
Hi All,
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++ testcases.
The only other rule in these tests was for ! { *-*-darwin* }, so I'm not sure if it's appropriate to modify
the scan-assembler line in this fashion for a specific architecture's pattern?
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 ext after .weak.
* gcc/testsuite/g++.dg/abi/thunk4.C: Likewise.
thanks,
David
[-- Attachment #2: 0005-Patch-testsuite-Allow-MicroBlaze-.weakext-pattern-in.patch --]
[-- Type: application/octet-stream, Size: 3026 bytes --]
From 5a20dcc699745b4476a69bcecf2b3ea307af43ae 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, testsuite]: Allow MicroBlaze .weakext pattern in regex match
Extend regex pattern to include optional ext at the end of
.weak to match the MicroBlaze weak label .weakext
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 ext after .weak.
* gcc/testsuite/g++.dg/abi/thunk4.C: Likewise.
Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
---
gcc/testsuite/g++.dg/abi/rtti3.C | 4 ++--
gcc/testsuite/g++.dg/abi/thunk3.C | 2 +-
gcc/testsuite/g++.dg/abi/thunk4.C | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gcc/testsuite/g++.dg/abi/rtti3.C b/gcc/testsuite/g++.dg/abi/rtti3.C
index c03e461..5a39a08 100644
--- a/gcc/testsuite/g++.dg/abi/rtti3.C
+++ b/gcc/testsuite/g++.dg/abi/rtti3.C
@@ -3,8 +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(ext)?\[ \t\]_?_ZTSPP1A" { target { ! { *-*-darwin* } } } } }
+// { dg-final { scan-assembler-not ".weak(ext)?\[ \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* } } } }
diff --git a/gcc/testsuite/g++.dg/abi/thunk3.C b/gcc/testsuite/g++.dg/abi/thunk3.C
index f2347f7..dcec8a7 100644
--- a/gcc/testsuite/g++.dg/abi/thunk3.C
+++ b/gcc/testsuite/g++.dg/abi/thunk3.C
@@ -1,5 +1,5 @@
// { dg-require-weak "" }
-// { dg-final { scan-assembler-not ".weak\[\t \]_?_ZThn._N7Derived3FooEv" { target { ! { *-*-darwin* } } } } }
+// { dg-final { scan-assembler-not ".weak(ext)?\[\t \]_?_ZThn._N7Derived3FooEv" { target { ! { *-*-darwin* } } } } }
// { dg-final { scan-assembler-not ".weak_definition\[\t \]_?_ZThn._N7Derived3FooEv" { target { *-*-darwin* } } } }
struct Base
diff --git a/gcc/testsuite/g++.dg/abi/thunk4.C b/gcc/testsuite/g++.dg/abi/thunk4.C
index fa5fbd4..79cb311 100644
--- a/gcc/testsuite/g++.dg/abi/thunk4.C
+++ b/gcc/testsuite/g++.dg/abi/thunk4.C
@@ -1,6 +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(ext)?\[ \t\]_?_ZThn._N7Derived3FooEv" { target { ! { *-*-darwin* } } } } }
// { dg-final { scan-assembler ".weak_definition\[ \t\]_?_ZThn._N7Derived3FooEv" { target { *-*-darwin* } } } }
struct Base
--
1.7.9.5
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Patch, testsuite]: Allow MicroBlaze .weakext pattern in regex match
2014-02-14 6:07 [Patch, testsuite]: Allow MicroBlaze .weakext pattern in regex match David Holsgrove
@ 2014-02-14 8:01 ` Mike Stump
2014-02-17 0:21 ` David Holsgrove
0 siblings, 1 reply; 6+ messages in thread
From: Mike Stump @ 2014-02-14 8:01 UTC (permalink / raw)
To: David Holsgrove
Cc: gcc-patches, Michael Eager (eager@eagerm.com),
Vidhumouli Hunsigida, Nagaraju Mekala, John Williams,
Edgar Iglesias
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. :-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [Patch, testsuite]: Allow MicroBlaze .weakext pattern in regex match
2014-02-14 8:01 ` Mike Stump
@ 2014-02-17 0:21 ` David Holsgrove
2014-02-20 20:17 ` Mike Stump
0 siblings, 1 reply; 6+ messages in thread
From: David Holsgrove @ 2014-02-17 0:21 UTC (permalink / raw)
To: Mike Stump
Cc: gcc-patches, Michael Eager (eager@eagerm.com),
Vidhumouli Hunsigida, Nagaraju Mekala, John Williams,
Edgar Iglesias
[-- 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Patch, testsuite]: Allow MicroBlaze .weakext pattern in regex match
2014-02-17 0:21 ` David Holsgrove
@ 2014-02-20 20:17 ` Mike Stump
2014-02-27 0:29 ` David Holsgrove
0 siblings, 1 reply; 6+ messages in thread
From: Mike Stump @ 2014-02-20 20:17 UTC (permalink / raw)
To: David Holsgrove
Cc: gcc-patches, Michael Eager (eager@eagerm.com),
Vidhumouli Hunsigida, Nagaraju Mekala, John Williams,
Edgar Iglesias
On Feb 16, 2014, at 4:21 PM, David Holsgrove <david.holsgrove@xilinx.com> wrote:
> I've attached an updated patch
Ok, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [Patch, testsuite]: Allow MicroBlaze .weakext pattern in regex match
2014-02-20 20:17 ` Mike Stump
@ 2014-02-27 0:29 ` David Holsgrove
2014-02-28 0:55 ` Michael Eager
0 siblings, 1 reply; 6+ messages in thread
From: David Holsgrove @ 2014-02-27 0:29 UTC (permalink / raw)
To: Mike Stump, Michael Eager (eager@eagerm.com)
Cc: gcc-patches, Vidhumouli Hunsigida, Nagaraju Mekala,
John Williams, Edgar Iglesias
Hi Mike S., Michael E.,
> -----Original Message-----
> From: Mike Stump [mailto:mikestump@comcast.net]
> Sent: Friday, 21 February 2014 6:17 am
> 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 16, 2014, at 4:21 PM, David Holsgrove <david.holsgrove@xilinx.com>
> wrote:
> > I've attached an updated patch
>
> Ok, thanks.
If no one has any objections on this updated patch, would either of you be able to approve and apply?
thanks,
David
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Patch, testsuite]: Allow MicroBlaze .weakext pattern in regex match
2014-02-27 0:29 ` David Holsgrove
@ 2014-02-28 0:55 ` Michael Eager
0 siblings, 0 replies; 6+ messages in thread
From: Michael Eager @ 2014-02-28 0:55 UTC (permalink / raw)
To: David Holsgrove, Mike Stump
Cc: gcc-patches, Vidhumouli Hunsigida, Nagaraju Mekala,
John Williams, Edgar Iglesias
On 02/26/14 16:29, David Holsgrove wrote:
> Hi Mike S., Michael E.,
>
>> -----Original Message-----
>> From: Mike Stump [mailto:mikestump@comcast.net]
>> Sent: Friday, 21 February 2014 6:17 am
>> 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 16, 2014, at 4:21 PM, David Holsgrove <david.holsgrove@xilinx.com>
>> wrote:
>>> I've attached an updated patch
>>
>> Ok, thanks.
>
> If no one has any objections on this updated patch, would either of you be able to approve and apply?
What targets have you tested this patch with?
It isn't sufficient to test it only with MicroBlaze,
since this code is used by all other targets.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-02-28 0:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-14 6:07 [Patch, testsuite]: Allow MicroBlaze .weakext pattern in regex match David Holsgrove
2014-02-14 8:01 ` Mike Stump
2014-02-17 0:21 ` David Holsgrove
2014-02-20 20:17 ` Mike Stump
2014-02-27 0:29 ` David Holsgrove
2014-02-28 0:55 ` Michael Eager
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).