* Rename __builtin_rs6000_speculation_barrier
@ 2018-03-04 19:52 Bill Schmidt
2018-03-05 15:05 ` Segher Boessenkool
0 siblings, 1 reply; 4+ messages in thread
From: Bill Schmidt @ 2018-03-04 19:52 UTC (permalink / raw)
To: GCC Patches; +Cc: Segher Boessenkool
Hi,
We realized recently that the use of "rs6000" in a builtin name doesn't agree
with our normal naming conventions. Thus this patch changes such a builtin
to __builtin_powerpc_speculation_barrier instead.
Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is
this okay for trunk?
Thanks,
Bill
[gcc]
2018-03-04 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
Rename to powerpc_speculation_barrier.
* config/rs6000/rs6000.c (rs6000_expand_builtin): Rename called
function to gen_powerpc_speculation_barrier.
(rs6000_init_builtins): Rename builtin to
__builtin_powerpc_speculation_barrier.
* config/rs6000/rs6000.md (rs6000_speculation_barrier): Rename
define_insn to powerpc_speculation_barrier.
[gcc/testsuite]
2018-03-04 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* gcc.target/powerpc/spec-barr-1.c: Change called function name to
__builtin_powerpc_speculation_barrier.
Index: gcc/config/rs6000/rs6000-builtin.def
===================================================================
--- gcc/config/rs6000/rs6000-builtin.def (revision 258157)
+++ gcc/config/rs6000/rs6000-builtin.def (working copy)
@@ -2348,7 +2348,7 @@ BU_DFP_MISC_2 (DSCRIQ, "dscriq", CONST, dfp_dscri
/* 0 argument void function that we pretend was added in ISA 2.06.
It's a special nop recognized by 2018+ firmware for P7 and up,
with speculation barrier semantics. */
-BU_P7_MISC_X (SPEC_BARRIER, "rs6000_speculation_barrier", MISC)
+BU_P7_MISC_X (SPEC_BARRIER, "powerpc_speculation_barrier", MISC)
/* 1 argument BCD functions added in ISA 2.06. */
BU_P7_MISC_1 (CDTBCD, "cdtbcd", CONST, cdtbcd)
Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c (revision 258157)
+++ gcc/config/rs6000/rs6000.c (working copy)
@@ -16874,7 +16874,7 @@ rs6000_expand_builtin (tree exp, rtx target, rtx s
case MISC_BUILTIN_SPEC_BARRIER:
{
- emit_insn (gen_rs6000_speculation_barrier ());
+ emit_insn (gen_powerpc_speculation_barrier ());
return NULL_RTX;
}
@@ -17250,7 +17250,7 @@ rs6000_init_builtins (void)
ftype = build_function_type_list (void_type_node, NULL_TREE);
def_builtin ("__builtin_cpu_init", ftype, RS6000_BUILTIN_CPU_INIT);
- def_builtin ("__builtin_rs6000_speculation_barrier", ftype,
+ def_builtin ("__builtin_powerpc_speculation_barrier", ftype,
MISC_BUILTIN_SPEC_BARRIER);
ftype = build_function_type_list (bool_int_type_node, const_ptr_type_node,
Index: gcc/config/rs6000/rs6000.md
===================================================================
--- gcc/config/rs6000/rs6000.md (revision 258157)
+++ gcc/config/rs6000/rs6000.md (working copy)
@@ -12574,7 +12574,7 @@
return "ori 2,2,0";
})
-(define_insn "rs6000_speculation_barrier"
+(define_insn "powerpc_speculation_barrier"
[(unspec_volatile:BLK [(const_int 0)] UNSPECV_SPEC_BARRIER)]
""
"ori 31,31,0")
Index: gcc/testsuite/gcc.target/powerpc/spec-barr-1.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/spec-barr-1.c (revision 258157)
+++ gcc/testsuite/gcc.target/powerpc/spec-barr-1.c (working copy)
@@ -4,7 +4,7 @@
void foo ()
{
- __builtin_rs6000_speculation_barrier ();
+ __builtin_powerpc_speculation_barrier ();
}
/* { dg-final { scan-assembler "ori 31,31,0" } } */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Rename __builtin_rs6000_speculation_barrier
2018-03-04 19:52 Rename __builtin_rs6000_speculation_barrier Bill Schmidt
@ 2018-03-05 15:05 ` Segher Boessenkool
2018-03-05 15:58 ` Bill Schmidt
0 siblings, 1 reply; 4+ messages in thread
From: Segher Boessenkool @ 2018-03-05 15:05 UTC (permalink / raw)
To: Bill Schmidt; +Cc: GCC Patches
Hi!
On Sun, Mar 04, 2018 at 01:52:20PM -0600, Bill Schmidt wrote:
> We realized recently that the use of "rs6000" in a builtin name doesn't agree
> with our normal naming conventions. Thus this patch changes such a builtin
> to __builtin_powerpc_speculation_barrier instead.
>
> Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is
> this okay for trunk?
Most of our builtins have *no* powerpc or similar in the name, and the
two that do have "ppc".
Should we use __builtin_speculation_barrier? It sounds more likely
that other archs will want that as well, than that it will conflict.
For the .md patterns we already have various that are named rs6000_*
(and none ppc* or power*).
Segher
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Rename __builtin_rs6000_speculation_barrier
2018-03-05 15:05 ` Segher Boessenkool
@ 2018-03-05 15:58 ` Bill Schmidt
2018-03-05 16:29 ` Segher Boessenkool
0 siblings, 1 reply; 4+ messages in thread
From: Bill Schmidt @ 2018-03-05 15:58 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: GCC Patches
> On Mar 5, 2018, at 9:04 AM, Segher Boessenkool <segher@kernel.crashing.org> wrote:
>
> Hi!
>
> On Sun, Mar 04, 2018 at 01:52:20PM -0600, Bill Schmidt wrote:
>> We realized recently that the use of "rs6000" in a builtin name doesn't agree
>> with our normal naming conventions. Thus this patch changes such a builtin
>> to __builtin_powerpc_speculation_barrier instead.
>>
>> Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is
>> this okay for trunk?
>
> Most of our builtins have *no* powerpc or similar in the name, and the
> two that do have "ppc".
>
> Should we use __builtin_speculation_barrier? It sounds more likely
> that other archs will want that as well, than that it will conflict.
That was my initial proposal. Richard asked me to insert the "rs6000_" to keep this
in a separate namespace for the time being. There is still discussion about a
more general speculation barrier builtin for all targets, though that has languished
for over a month now.
>
> For the .md patterns we already have various that are named rs6000_*
> (and none ppc* or power*).
>
Would it be reasonable to go with __builtin_ppc_speculation_barrier for the
builtin name and revert to rs6000_* in the .md patterns, etc.?
Thanks,
Bill
>
> Segher
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Rename __builtin_rs6000_speculation_barrier
2018-03-05 15:58 ` Bill Schmidt
@ 2018-03-05 16:29 ` Segher Boessenkool
0 siblings, 0 replies; 4+ messages in thread
From: Segher Boessenkool @ 2018-03-05 16:29 UTC (permalink / raw)
To: Bill Schmidt; +Cc: GCC Patches
On Mon, Mar 05, 2018 at 09:58:50AM -0600, Bill Schmidt wrote:
>
> > On Mar 5, 2018, at 9:04 AM, Segher Boessenkool <segher@kernel.crashing.org> wrote:
> >
> > Hi!
> >
> > On Sun, Mar 04, 2018 at 01:52:20PM -0600, Bill Schmidt wrote:
> >> We realized recently that the use of "rs6000" in a builtin name doesn't agree
> >> with our normal naming conventions. Thus this patch changes such a builtin
> >> to __builtin_powerpc_speculation_barrier instead.
> >>
> >> Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is
> >> this okay for trunk?
> >
> > Most of our builtins have *no* powerpc or similar in the name, and the
> > two that do have "ppc".
> >
> > Should we use __builtin_speculation_barrier? It sounds more likely
> > that other archs will want that as well, than that it will conflict.
>
> That was my initial proposal. Richard asked me to insert the "rs6000_" to keep this
> in a separate namespace for the time being. There is still discussion about a
> more general speculation barrier builtin for all targets, though that has languished
> for over a month now.
> >
> > For the .md patterns we already have various that are named rs6000_*
> > (and none ppc* or power*).
> >
> Would it be reasonable to go with __builtin_ppc_speculation_barrier for the
> builtin name and revert to rs6000_* in the .md patterns, etc.?
Yeah that sounds fine. Okay for trunk with such changes. Thanks!
Segher
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-03-05 16:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-04 19:52 Rename __builtin_rs6000_speculation_barrier Bill Schmidt
2018-03-05 15:05 ` Segher Boessenkool
2018-03-05 15:58 ` Bill Schmidt
2018-03-05 16:29 ` Segher Boessenkool
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).