public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] rs6000: Fix HTM tcheck assembly encoding
@ 2015-02-20 18:13 Adhemerval Zanella
  2015-02-20 20:43 ` Peter Bergner
  2015-02-20 21:47 ` David Edelsohn
  0 siblings, 2 replies; 10+ messages in thread
From: Adhemerval Zanella @ 2015-02-20 18:13 UTC (permalink / raw)
  To: gcc-patches; +Cc: Peter Bergner, David Edelsohn

gcc/ChangeLog:

	* config/rs6000/htm.md (tcheck): Fix assembly encoding.

gcc/testsuite/ChangeLog

	* gcc.target/powerpc/htm-builtin-1.c: Fix tcheck expect value.

---

diff --git a/gcc/config/rs6000/htm.md b/gcc/config/rs6000/htm.md
index 2c4689f..79fb740 100644
--- a/gcc/config/rs6000/htm.md
+++ b/gcc/config/rs6000/htm.md
@@ -252,7 +252,7 @@
 	(unspec_volatile:CC [(match_operand 0 "u3bit_cint_operand" "n")]
 			    UNSPECV_HTM_TCHECK))]
   "TARGET_HTM"
-  "tcheck. %0"
+  "tcheck %0"
   [(set_attr "type" "htm")
    (set_attr "length" "4")])
 
diff --git a/gcc/testsuite/gcc.target/powerpc/htm-builtin-1.c b/gcc/testsuite/gcc.target/powerpc/htm-builtin-1.c
index e58816a..62d64e6 100644
--- a/gcc/testsuite/gcc.target/powerpc/htm-builtin-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/htm-builtin-1.c
@@ -10,7 +10,7 @@
 /* { dg-final { scan-assembler-times "tabortdci\\." 1 } } */
 /* { dg-final { scan-assembler-times "tabortwc\\." 1 } } */
 /* { dg-final { scan-assembler-times "tabortwci\\." 2 } } */
-/* { dg-final { scan-assembler-times "tcheck\\." 1 } } */
+/* { dg-final { scan-assembler-times "tcheck" 1 } } */
 /* { dg-final { scan-assembler-times "trechkpt\\." 1 } } */
 /* { dg-final { scan-assembler-times "treclaim\\." 1 } } */
 /* { dg-final { scan-assembler-times "tsr\\." 3 } } */

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] rs6000: Fix HTM tcheck assembly encoding
  2015-02-20 18:13 [PATCH] rs6000: Fix HTM tcheck assembly encoding Adhemerval Zanella
@ 2015-02-20 20:43 ` Peter Bergner
  2015-02-20 21:47 ` David Edelsohn
  1 sibling, 0 replies; 10+ messages in thread
From: Peter Bergner @ 2015-02-20 20:43 UTC (permalink / raw)
  To: Adhemerval Zanella; +Cc: gcc-patches, David Edelsohn

On Fri, 2015-02-20 at 15:44 -0200, Adhemerval Zanella wrote:
> gcc/ChangeLog:
> 
> 	* config/rs6000/htm.md (tcheck): Fix assembly encoding.
> 
> gcc/testsuite/ChangeLog
> 
> 	* gcc.target/powerpc/htm-builtin-1.c: Fix tcheck expect value.

You are correct that the tcheck insn does not have a '.' in its mnemonic,
so maybe this patch falls under the obvious rule?

It also goes to show that no one has actually used __builtin_tcheck()
before in a real progran, since the assembler would have flagged this
as an unknown opcode.

Thanks for fixing my mistake!

Peter


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] rs6000: Fix HTM tcheck assembly encoding
  2015-02-20 18:13 [PATCH] rs6000: Fix HTM tcheck assembly encoding Adhemerval Zanella
  2015-02-20 20:43 ` Peter Bergner
@ 2015-02-20 21:47 ` David Edelsohn
  2015-02-23 18:42   ` Peter Bergner
  1 sibling, 1 reply; 10+ messages in thread
From: David Edelsohn @ 2015-02-20 21:47 UTC (permalink / raw)
  To: Adhemerval Zanella; +Cc: GCC Patches, Peter Bergner

On Fri, Feb 20, 2015 at 12:44 PM, Adhemerval Zanella
<azanella@linux.vnet.ibm.com> wrote:
> gcc/ChangeLog:
>
>         * config/rs6000/htm.md (tcheck): Fix assembly encoding.
>
> gcc/testsuite/ChangeLog
>
>         * gcc.target/powerpc/htm-builtin-1.c: Fix tcheck expect value.


Okay.

Thanks, David

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] rs6000: Fix HTM tcheck assembly encoding
  2015-02-20 21:47 ` David Edelsohn
@ 2015-02-23 18:42   ` Peter Bergner
  2015-02-23 20:46     ` David Edelsohn
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Bergner @ 2015-02-23 18:42 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Adhemerval Zanella, GCC Patches

On Fri, 2015-02-20 at 15:43 -0500, David Edelsohn wrote:
> On Fri, Feb 20, 2015 at 12:44 PM, Adhemerval Zanella
> <azanella@linux.vnet.ibm.com> wrote:
> > gcc/ChangeLog:
> >
> >         * config/rs6000/htm.md (tcheck): Fix assembly encoding.
> >
> > gcc/testsuite/ChangeLog
> >
> >         * gcc.target/powerpc/htm-builtin-1.c: Fix tcheck expect value.
> 
> 
> Okay.

This is broken on 4.9 and 4.8, so can we get those fixed as well?

Peter


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] rs6000: Fix HTM tcheck assembly encoding
  2015-02-23 18:42   ` Peter Bergner
@ 2015-02-23 20:46     ` David Edelsohn
  2015-02-25 23:02       ` Peter Bergner
  2015-02-26  2:53       ` Peter Bergner
  0 siblings, 2 replies; 10+ messages in thread
From: David Edelsohn @ 2015-02-23 20:46 UTC (permalink / raw)
  To: Peter Bergner; +Cc: Adhemerval Zanella, GCC Patches

On Mon, Feb 23, 2015 at 1:26 PM, Peter Bergner <bergner@vnet.ibm.com> wrote:
> On Fri, 2015-02-20 at 15:43 -0500, David Edelsohn wrote:
>> On Fri, Feb 20, 2015 at 12:44 PM, Adhemerval Zanella
>> <azanella@linux.vnet.ibm.com> wrote:
>> > gcc/ChangeLog:
>> >
>> >         * config/rs6000/htm.md (tcheck): Fix assembly encoding.
>> >
>> > gcc/testsuite/ChangeLog
>> >
>> >         * gcc.target/powerpc/htm-builtin-1.c: Fix tcheck expect value.
>>
>>
>> Okay.
>
> This is broken on 4.9 and 4.8, so can we get those fixed as well?

Yes, please backport.

Again, a testcase is highly encouraged.

Thanks, David

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] rs6000: Fix HTM tcheck assembly encoding
  2015-02-23 20:46     ` David Edelsohn
@ 2015-02-25 23:02       ` Peter Bergner
  2015-02-26 16:42         ` Peter Bergner
  2015-02-26  2:53       ` Peter Bergner
  1 sibling, 1 reply; 10+ messages in thread
From: Peter Bergner @ 2015-02-25 23:02 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Adhemerval Zanella, GCC Patches

On Mon, 2015-02-23 at 13:42 -0500, David Edelsohn wrote:
> On Mon, Feb 23, 2015 at 1:26 PM, Peter Bergner <bergner@vnet.ibm.com> wrote:
> > This is broken on 4.9 and 4.8, so can we get those fixed as well?
> 
> Yes, please backport.

I committed this to trunk on Adhemerval's behalf as revision 220992.
I'll commit it to 4.9 and 4.8 after I bootstrap/regtest it there.


> Again, a testcase is highly encouraged.

I have a separate HTM fix coming which will fix PR64579 as well as
a few things that popped up when looking into that one.  I'm adding
a test case to that patch which should cover this.

Peter



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] rs6000: Fix HTM tcheck assembly encoding
  2015-02-23 20:46     ` David Edelsohn
  2015-02-25 23:02       ` Peter Bergner
@ 2015-02-26  2:53       ` Peter Bergner
  2015-02-26  5:33         ` David Edelsohn
  1 sibling, 1 reply; 10+ messages in thread
From: Peter Bergner @ 2015-02-26  2:53 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Adhemerval Zanella, GCC Patches

On Mon, 2015-02-23 at 13:42 -0500, David Edelsohn wrote:
> Again, a testcase is highly encouraged.

Actually, this additional change to the test case would be enough
to have the assembler catch the bad opcode mnemonic.  Should I
just go ahead and make this change?

I still plan on adding a test case that actually executes when
we're on power8.

Peter


Index: gcc.target/powerpc/htm-builtin-1.c
===================================================================
--- gcc.target/powerpc/htm-builtin-1.c	(revision 220992)
+++ gcc.target/powerpc/htm-builtin-1.c	(working copy)
@@ -1,7 +1,7 @@
-/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-do assemble { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
 /* { dg-require-effective-target powerpc_htm_ok } */
-/* { dg-options "-O2 -mhtm" } */
+/* { dg-options "-O2 -mhtm -save-temps" } */
 
 /* { dg-final { scan-assembler-times "tbegin\\." 1 } } */
 /* { dg-final { scan-assembler-times "tend\\." 2 } } */
@@ -49,3 +49,4 @@ void use_builtins (long *p, char code, l
   __builtin_set_tfhar (a[22]);
   __builtin_set_tfiar (a[23]);
 }
+/* { dg-final { cleanup-saved-temps } } */


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] rs6000: Fix HTM tcheck assembly encoding
  2015-02-26  2:53       ` Peter Bergner
@ 2015-02-26  5:33         ` David Edelsohn
  2015-02-26  5:55           ` Peter Bergner
  0 siblings, 1 reply; 10+ messages in thread
From: David Edelsohn @ 2015-02-26  5:33 UTC (permalink / raw)
  To: Peter Bergner; +Cc: Adhemerval Zanella, GCC Patches

On Wed, Feb 25, 2015 at 9:42 PM, Peter Bergner <bergner@vnet.ibm.com> wrote:
> On Mon, 2015-02-23 at 13:42 -0500, David Edelsohn wrote:
>> Again, a testcase is highly encouraged.
>
> Actually, this additional change to the test case would be enough
> to have the assembler catch the bad opcode mnemonic.  Should I
> just go ahead and make this change?
>
> I still plan on adding a test case that actually executes when
> we're on power8.
>
> Peter
>
>
> Index: gcc.target/powerpc/htm-builtin-1.c
> ===================================================================
> --- gcc.target/powerpc/htm-builtin-1.c  (revision 220992)
> +++ gcc.target/powerpc/htm-builtin-1.c  (working copy)
> @@ -1,7 +1,7 @@
> -/* { dg-do compile { target { powerpc*-*-* } } } */
> +/* { dg-do assemble { target { powerpc*-*-* } } } */
>  /* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
>  /* { dg-require-effective-target powerpc_htm_ok } */
> -/* { dg-options "-O2 -mhtm" } */
> +/* { dg-options "-O2 -mhtm -save-temps" } */
>
>  /* { dg-final { scan-assembler-times "tbegin\\." 1 } } */
>  /* { dg-final { scan-assembler-times "tend\\." 2 } } */
> @@ -49,3 +49,4 @@ void use_builtins (long *p, char code, l
>    __builtin_set_tfhar (a[22]);
>    __builtin_set_tfiar (a[23]);
>  }
> +/* { dg-final { cleanup-saved-temps } } */

Okay.

Thanks, David

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] rs6000: Fix HTM tcheck assembly encoding
  2015-02-26  5:33         ` David Edelsohn
@ 2015-02-26  5:55           ` Peter Bergner
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Bergner @ 2015-02-26  5:55 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Adhemerval Zanella, GCC Patches

On Wed, 2015-02-25 at 21:57 -0500, David Edelsohn wrote:
> Okay.

Ok, committed as revision 220998 with the following ChangeLog entry:

       * gcc.target/powerpc/htm-builtin-1.c (dg-do) Change to assemble.
        (dg-options): Add -save-temps.
        (dg-final): Add cleanup-saved-temps.

I'll add it to the backports as well when I commit those after their
bootstrap/regtests are finished.

Peter

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] rs6000: Fix HTM tcheck assembly encoding
  2015-02-25 23:02       ` Peter Bergner
@ 2015-02-26 16:42         ` Peter Bergner
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Bergner @ 2015-02-26 16:42 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Adhemerval Zanella, GCC Patches

On Wed, 2015-02-25 at 16:22 -0600, Peter Bergner wrote:
> On Mon, 2015-02-23 at 13:42 -0500, David Edelsohn wrote:
> > On Mon, Feb 23, 2015 at 1:26 PM, Peter Bergner <bergner@vnet.ibm.com> wrote:
> > > This is broken on 4.9 and 4.8, so can we get those fixed as well?
> > 
> > Yes, please backport.
> 
> I committed this to trunk on Adhemerval's behalf as revision 220992.
> I'll commit it to 4.9 and 4.8 after I bootstrap/regtest it there.

Ok, committed to 4.9 as revision 221018 and 4.8 as revision 221019.
Thanks.

Peter


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-02-26 16:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-20 18:13 [PATCH] rs6000: Fix HTM tcheck assembly encoding Adhemerval Zanella
2015-02-20 20:43 ` Peter Bergner
2015-02-20 21:47 ` David Edelsohn
2015-02-23 18:42   ` Peter Bergner
2015-02-23 20:46     ` David Edelsohn
2015-02-25 23:02       ` Peter Bergner
2015-02-26 16:42         ` Peter Bergner
2015-02-26  2:53       ` Peter Bergner
2015-02-26  5:33         ` David Edelsohn
2015-02-26  5:55           ` Peter Bergner

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).