* [trans-mem] fix memopt-1.c for 32bits
@ 2011-11-08 20:50 Patrick Marlier
2011-11-08 21:54 ` Richard Henderson
0 siblings, 1 reply; 7+ messages in thread
From: Patrick Marlier @ 2011-11-08 20:50 UTC (permalink / raw)
To: GCC Patches; +Cc: Richard Henderson, Aldy Hernandez, Torvald Riegel
In x86/32bits, long is 4bytes, and the test checks for _ITM_RU8
(8bytes). I propose to change to long long (it is C99 but it should not
be a problem, right?). The other way could be to change the regex but we
don't want that.
Tested on x86.
Richard/Aldy, can you apply it to trunk and trans-mem? (of course if
approved). It removes a unexpected failure on x86/32.
Patrick.
* testsuite/gcc.dg/tm/memopt-1.c: Use long long.
Index: testsuite/gcc.dg/tm/memopt-1.c
===================================================================
--- testsuite/gcc.dg/tm/memopt-1.c (revision 181162)
+++ testsuite/gcc.dg/tm/memopt-1.c (working copy)
@@ -1,7 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-fgnu-tm -O -fdump-tree-tmmemopt" } */
-long g, xxx, yyy;
+long long g, xxx, yyy;
extern george() __attribute__((transaction_callable));
extern ringo(long int);
int i;
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [trans-mem] fix memopt-1.c for 32bits
2011-11-08 20:50 [trans-mem] fix memopt-1.c for 32bits Patrick Marlier
@ 2011-11-08 21:54 ` Richard Henderson
2011-11-08 23:01 ` Patrick Marlier
0 siblings, 1 reply; 7+ messages in thread
From: Richard Henderson @ 2011-11-08 21:54 UTC (permalink / raw)
To: Patrick Marlier; +Cc: GCC Patches, Aldy Hernandez, Torvald Riegel
On 11/08/2011 12:21 PM, Patrick Marlier wrote:
> The other way could be to change the regex but we don't want that.
Why not?
r~
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [trans-mem] fix memopt-1.c for 32bits
2011-11-08 21:54 ` Richard Henderson
@ 2011-11-08 23:01 ` Patrick Marlier
2011-11-08 23:04 ` Richard Henderson
0 siblings, 1 reply; 7+ messages in thread
From: Patrick Marlier @ 2011-11-08 23:01 UTC (permalink / raw)
To: Richard Henderson; +Cc: GCC Patches, Aldy Hernandez, Torvald Riegel
On 11/08/2011 04:29 PM, Richard Henderson wrote:
> On 11/08/2011 12:21 PM, Patrick Marlier wrote:
>> The other way could be to change the regex but we don't want that.
>
> Why not?
My guess was that the purpose to have "long" in the testcase was to test
the generation of another TM-builtin than _ITM_RU4.
3 possibilities to fix:
- change g to "long long"
- change g to "int" and match _ITM_RU4 for g
- change the match for g to _ITM_RU[48]
Patrick.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [trans-mem] fix memopt-1.c for 32bits
2011-11-08 23:01 ` Patrick Marlier
@ 2011-11-08 23:04 ` Richard Henderson
2011-11-09 15:42 ` Patrick Marlier
0 siblings, 1 reply; 7+ messages in thread
From: Richard Henderson @ 2011-11-08 23:04 UTC (permalink / raw)
To: Patrick Marlier; +Cc: GCC Patches, Aldy Hernandez, Torvald Riegel
On 11/08/2011 02:08 PM, Patrick Marlier wrote:
> - change the match for g to _ITM_RU[48]
Change the match to [248].
r~
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [trans-mem] fix memopt-1.c for 32bits
2011-11-08 23:04 ` Richard Henderson
@ 2011-11-09 15:42 ` Patrick Marlier
2011-11-09 21:09 ` Jakub Jelinek
0 siblings, 1 reply; 7+ messages in thread
From: Patrick Marlier @ 2011-11-09 15:42 UTC (permalink / raw)
To: Richard Henderson; +Cc: GCC Patches, Aldy Hernandez, Torvald Riegel
[-- Attachment #1: Type: text/plain, Size: 453 bytes --]
On 11/08/2011 05:25 PM, Richard Henderson wrote:
> On 11/08/2011 02:08 PM, Patrick Marlier wrote:
>> - change the match for g to _ITM_RU[48]
>
> Change the match to [248].
I have never seen a "long" type to have a size of 2 bytes but I am
probably wrong. (I did not find the C specification but I found on many
website that long should be at least 4 bytes (32 bits)).
Patrick.
(Please commit if ok)
* gcc.dg/tm/memopt-1.c: Adjust regexp.
[-- Attachment #2: memopt-1-fix.patch --]
[-- Type: text/plain, Size: 732 bytes --]
Index: gcc/testsuite/gcc.dg/tm/memopt-1.c
===================================================================
--- gcc/testsuite/gcc.dg/tm/memopt-1.c (revision 181178)
+++ gcc/testsuite/gcc.dg/tm/memopt-1.c (working copy)
@@ -22,7 +22,7 @@
}
}
-/* { dg-final { scan-tree-dump-times "transforming: .*_ITM_RaWU8 \\(&g\\);" 1 "tmmemopt" } } */
+/* { dg-final { scan-tree-dump-times "transforming: .*_ITM_RaWU[248] \\(&g\\);" 1 "tmmemopt" } } */
/* { dg-final { scan-tree-dump-times "transforming: .*_ITM_WaRU4 \\(&i," 1 "tmmemopt" } } */
/* { dg-final { scan-tree-dump-times "transforming: .*_ITM_RaWU4 \\(&i\\);" 1 "tmmemopt" } } */
/* { dg-final { scan-tree-dump-times "transforming: .*_ITM_WaWU4 \\(&i," 1 "tmmemopt" } } */
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [trans-mem] fix memopt-1.c for 32bits
2011-11-09 15:42 ` Patrick Marlier
@ 2011-11-09 21:09 ` Jakub Jelinek
2011-11-09 21:15 ` Patrick Marlier
0 siblings, 1 reply; 7+ messages in thread
From: Jakub Jelinek @ 2011-11-09 21:09 UTC (permalink / raw)
To: Patrick Marlier
Cc: Richard Henderson, GCC Patches, Aldy Hernandez, Torvald Riegel
On Wed, Nov 09, 2011 at 09:32:28AM -0500, Patrick Marlier wrote:
>
> * gcc.dg/tm/memopt-1.c: Adjust regexp.
This results in
ERROR: (DejaGnu) proc "248" does not exist.
- [] is tcl procedure invocation.
Testing following, will commit soon if it succeeds:
2011-11-09 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/tm/memopt-1.c: Fix up regexp.
--- gcc/testsuite/gcc.dg/tm/memopt-1.c.jj 2011-11-09 19:34:04.642647773 +0100
+++ gcc/testsuite/gcc.dg/tm/memopt-1.c 2011-11-09 21:19:55.579803957 +0100
@@ -22,7 +22,7 @@ f()
}
}
-/* { dg-final { scan-tree-dump-times "transforming: .*_ITM_RaWU[248] \\(&g\\);" 1 "tmmemopt" } } */
+/* { dg-final { scan-tree-dump-times "transforming: .*_ITM_RaWU\[248\] \\(&g\\);" 1 "tmmemopt" } } */
/* { dg-final { scan-tree-dump-times "transforming: .*_ITM_WaRU4 \\(&i," 1 "tmmemopt" } } */
/* { dg-final { scan-tree-dump-times "transforming: .*_ITM_RaWU4 \\(&i\\);" 1 "tmmemopt" } } */
/* { dg-final { scan-tree-dump-times "transforming: .*_ITM_WaWU4 \\(&i," 1 "tmmemopt" } } */
Jakub
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [trans-mem] fix memopt-1.c for 32bits
2011-11-09 21:09 ` Jakub Jelinek
@ 2011-11-09 21:15 ` Patrick Marlier
0 siblings, 0 replies; 7+ messages in thread
From: Patrick Marlier @ 2011-11-09 21:15 UTC (permalink / raw)
To: Jakub Jelinek
Cc: Richard Henderson, GCC Patches, Aldy Hernandez, Torvald Riegel
On 11/09/2011 03:23 PM, Jakub Jelinek wrote:
> On Wed, Nov 09, 2011 at 09:32:28AM -0500, Patrick Marlier wrote:
>>
>> * gcc.dg/tm/memopt-1.c: Adjust regexp.
>
> This results in
> ERROR: (DejaGnu) proc "248" does not exist.
>
> - [] is tcl procedure invocation.
>
> Testing following, will commit soon if it succeeds:
>
> 2011-11-09 Jakub Jelinek<jakub@redhat.com>
>
> * gcc.dg/tm/memopt-1.c: Fix up regexp.
Good grief. Thanks Jakub!
Patrick.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-11-09 20:31 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-08 20:50 [trans-mem] fix memopt-1.c for 32bits Patrick Marlier
2011-11-08 21:54 ` Richard Henderson
2011-11-08 23:01 ` Patrick Marlier
2011-11-08 23:04 ` Richard Henderson
2011-11-09 15:42 ` Patrick Marlier
2011-11-09 21:09 ` Jakub Jelinek
2011-11-09 21:15 ` Patrick Marlier
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).