* [PATCH][GCC] aarch64: Add +flagm to -march
@ 2020-11-30 22:35 Przemyslaw Wirkus
2020-12-02 18:13 ` Richard Sandiford
0 siblings, 1 reply; 7+ messages in thread
From: Przemyslaw Wirkus @ 2020-11-30 22:35 UTC (permalink / raw)
To: gcc-patches
Cc: Kyrylo Tkachov, Richard Earnshaw, Richard Sandiford, Marcus Shawcroft
[-- Attachment #1: Type: text/plain, Size: 507 bytes --]
New +flagm (Condition flag manipulation from Armv8.4-A) feature option for
-march command line option.
Please note that FLAGM stays an Armv8.4-A feature but now can be
assigned to other architectures or CPUs.
OK for master?
gcc/ChangeLog:
* config/aarch64/aarch64-option-extensions.def
(AARCH64_OPT_EXTENSION): New +flagm option in -march for AArch64.
* config/aarch64/aarch64.h (AARCH64_FL_FLAGM): Add new flagm extension bit
mask.
(AARCH64_FL_FOR_ARCH8_4): Add flagm to Armv8.4-A.
[-- Attachment #2: rb13807.patch --]
[-- Type: application/octet-stream, Size: 1747 bytes --]
diff --git a/gcc/config/aarch64/aarch64-option-extensions.def b/gcc/config/aarch64/aarch64-option-extensions.def
index ca0864220da615566994c41e5f7e250954d9ec90..ec4530179278df9ec2189b52342cc6d57cafc8dd 100644
--- a/gcc/config/aarch64/aarch64-option-extensions.def
+++ b/gcc/config/aarch64/aarch64-option-extensions.def
@@ -226,4 +226,7 @@ AARCH64_OPT_EXTENSION("f64mm", AARCH64_FL_F64MM, \
AARCH64_OPT_EXTENSION("bf16", AARCH64_FL_BF16, \
AARCH64_FL_SIMD | AARCH64_FL_FP, 0, false, "bf16")
+/* Enabling/Disabling "flagm" only changes "flagm". */
+AARCH64_OPT_EXTENSION("flagm", AARCH64_FL_FLAGM, 0, 0, false, "flagm")
+
#undef AARCH64_OPT_EXTENSION
diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
index d241c5b873dd97dfc9bff141614e6405392a97b0..0bdcc74ace5878fda5b56e1b697dedbaca78ed05 100644
--- a/gcc/config/aarch64/aarch64.h
+++ b/gcc/config/aarch64/aarch64.h
@@ -224,6 +224,9 @@ extern unsigned aarch64_architecture_version;
/* 64-bit Floating-point Matrix Multiply (F64MM) extensions. */
#define AARCH64_FL_F64MM (1ULL << 38)
+/* Flag Manipulation Instructions (FLAGM) extension. */
+#define AARCH64_FL_FLAGM (1ULL << 39)
+
/* Has FP and SIMD. */
#define AARCH64_FL_FPSIMD (AARCH64_FL_FP | AARCH64_FL_SIMD)
@@ -241,7 +244,7 @@ extern unsigned aarch64_architecture_version;
(AARCH64_FL_FOR_ARCH8_2 | AARCH64_FL_V8_3)
#define AARCH64_FL_FOR_ARCH8_4 \
(AARCH64_FL_FOR_ARCH8_3 | AARCH64_FL_V8_4 | AARCH64_FL_F16FML \
- | AARCH64_FL_DOTPROD | AARCH64_FL_RCPC8_4)
+ | AARCH64_FL_DOTPROD | AARCH64_FL_RCPC8_4 | AARCH64_FL_FLAGM)
#define AARCH64_FL_FOR_ARCH8_5 \
(AARCH64_FL_FOR_ARCH8_4 | AARCH64_FL_V8_5 \
| AARCH64_FL_SB | AARCH64_FL_SSBS | AARCH64_FL_PREDRES)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH][GCC] aarch64: Add +flagm to -march
2020-11-30 22:35 [PATCH][GCC] aarch64: Add +flagm to -march Przemyslaw Wirkus
@ 2020-12-02 18:13 ` Richard Sandiford
2020-12-02 19:35 ` Richard Sandiford
0 siblings, 1 reply; 7+ messages in thread
From: Richard Sandiford @ 2020-12-02 18:13 UTC (permalink / raw)
To: Przemyslaw Wirkus
Cc: gcc-patches, Kyrylo Tkachov, Richard Earnshaw, Marcus Shawcroft
Przemyslaw Wirkus <Przemyslaw.Wirkus@arm.com> writes:
> New +flagm (Condition flag manipulation from Armv8.4-A) feature option for
> -march command line option.
>
> Please note that FLAGM stays an Armv8.4-A feature but now can be
> assigned to other architectures or CPUs.
>
> OK for master?
>
> gcc/ChangeLog:
>
> * config/aarch64/aarch64-option-extensions.def
> (AARCH64_OPT_EXTENSION): New +flagm option in -march for AArch64.
> * config/aarch64/aarch64.h (AARCH64_FL_FLAGM): Add new flagm extension bit
> mask.
> (AARCH64_FL_FOR_ARCH8_4): Add flagm to Armv8.4-A.
OK, thanks, and sorry for the slow review.
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH][GCC] aarch64: Add +flagm to -march
2020-12-02 18:13 ` Richard Sandiford
@ 2020-12-02 19:35 ` Richard Sandiford
2020-12-03 9:29 ` Przemyslaw Wirkus
0 siblings, 1 reply; 7+ messages in thread
From: Richard Sandiford @ 2020-12-02 19:35 UTC (permalink / raw)
To: Przemyslaw Wirkus
Cc: gcc-patches, Kyrylo Tkachov, Richard Earnshaw, Marcus Shawcroft
Richard Sandiford via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> Przemyslaw Wirkus <Przemyslaw.Wirkus@arm.com> writes:
>> New +flagm (Condition flag manipulation from Armv8.4-A) feature option for
>> -march command line option.
>>
>> Please note that FLAGM stays an Armv8.4-A feature but now can be
>> assigned to other architectures or CPUs.
>>
>> OK for master?
>>
>> gcc/ChangeLog:
>>
>> * config/aarch64/aarch64-option-extensions.def
>> (AARCH64_OPT_EXTENSION): New +flagm option in -march for AArch64.
>> * config/aarch64/aarch64.h (AARCH64_FL_FLAGM): Add new flagm extension bit
>> mask.
>> (AARCH64_FL_FOR_ARCH8_4): Add flagm to Armv8.4-A.
>
> OK, thanks, and sorry for the slow review.
Just remembered that we also need documentation for the new feature flag
in doc/invoke.texi.
Thanks,
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH][GCC] aarch64: Add +flagm to -march
2020-12-02 19:35 ` Richard Sandiford
@ 2020-12-03 9:29 ` Przemyslaw Wirkus
2020-12-03 10:13 ` Richard Sandiford
0 siblings, 1 reply; 7+ messages in thread
From: Przemyslaw Wirkus @ 2020-12-03 9:29 UTC (permalink / raw)
To: Richard Sandiford
Cc: gcc-patches, Kyrylo Tkachov, Richard Earnshaw, Marcus Shawcroft
> >> gcc/ChangeLog:
> >>
> >> * config/aarch64/aarch64-option-extensions.def
> >> (AARCH64_OPT_EXTENSION): New +flagm option in -march for AArch64.
> >> * config/aarch64/aarch64.h (AARCH64_FL_FLAGM): Add new flagm
> >> extension bit mask.
> >> (AARCH64_FL_FOR_ARCH8_4): Add flagm to Armv8.4-A.
> >
> > OK, thanks, and sorry for the slow review.
>
> Just remembered that we also need documentation for the new feature flag in
> doc/invoke.texi.
Done. Thank you for the reminder.
commit 48ff86adfd96a0f5132273719932b48a14941881
> Thanks,
> Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH][GCC] aarch64: Add +flagm to -march
2020-12-03 9:29 ` Przemyslaw Wirkus
@ 2020-12-03 10:13 ` Richard Sandiford
2020-12-03 10:18 ` Przemyslaw Wirkus
0 siblings, 1 reply; 7+ messages in thread
From: Richard Sandiford @ 2020-12-03 10:13 UTC (permalink / raw)
To: Przemyslaw Wirkus
Cc: gcc-patches, Kyrylo Tkachov, Richard Earnshaw, Marcus Shawcroft
Przemyslaw Wirkus <Przemyslaw.Wirkus@arm.com> writes:
>> >> gcc/ChangeLog:
>> >>
>> >> * config/aarch64/aarch64-option-extensions.def
>> >> (AARCH64_OPT_EXTENSION): New +flagm option in -march for AArch64.
>> >> * config/aarch64/aarch64.h (AARCH64_FL_FLAGM): Add new flagm
>> >> extension bit mask.
>> >> (AARCH64_FL_FOR_ARCH8_4): Add flagm to Armv8.4-A.
>> >
>> > OK, thanks, and sorry for the slow review.
>>
>> Just remembered that we also need documentation for the new feature flag in
>> doc/invoke.texi.
>
> Done. Thank you for the reminder.
>
> commit 48ff86adfd96a0f5132273719932b48a14941881
I think you also need to add flagm to:
-----------------------------------------------------------------------
The table below summarizes the permissible values for @var{arch}
and the features that they enable by default:
@multitable @columnfractions 0.20 0.20 0.60
@headitem @var{arch} value @tab Architecture @tab Includes by default
…
@item @samp{armv8.4-a} @tab Armv8.4-A @tab @samp{armv8.3-a}, @samp{+fp16fml}, @samp{+dotprod}
-----------------------------------------------------------------------
Thanks,
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH][GCC] aarch64: Add +flagm to -march
2020-12-03 10:13 ` Richard Sandiford
@ 2020-12-03 10:18 ` Przemyslaw Wirkus
2020-12-03 10:19 ` Richard Sandiford
0 siblings, 1 reply; 7+ messages in thread
From: Przemyslaw Wirkus @ 2020-12-03 10:18 UTC (permalink / raw)
To: Richard Sandiford
Cc: gcc-patches, Kyrylo Tkachov, Richard Earnshaw, Marcus Shawcroft
> >> >> gcc/ChangeLog:
> >> >>
> >> >> * config/aarch64/aarch64-option-extensions.def
> >> >> (AARCH64_OPT_EXTENSION): New +flagm option in -march for AArch64.
> >> >> * config/aarch64/aarch64.h (AARCH64_FL_FLAGM): Add new flagm
> >> >> extension bit mask.
> >> >> (AARCH64_FL_FOR_ARCH8_4): Add flagm to Armv8.4-A.
> >> >
> >> > OK, thanks, and sorry for the slow review.
> >>
> >> Just remembered that we also need documentation for the new feature
> >> flag in doc/invoke.texi.
> >
> > Done. Thank you for the reminder.
> >
> > commit 48ff86adfd96a0f5132273719932b48a14941881
>
> I think you also need to add flagm to:
>
> -----------------------------------------------------------------------
> The table below summarizes the permissible values for @var{arch} and the
> features that they enable by default:
>
> @multitable @columnfractions 0.20 0.20 0.60 @headitem @var{arch} value
> @tab Architecture @tab Includes by default … @item @samp{armv8.4-a}
> @tab Armv8.4-A @tab @samp{armv8.3-a}, @samp{+fp16fml},
> @samp{+dotprod}
> -----------------------------------------------------------------------
Yes, I've just noticed that :/
I will update this with my next patch which adds yet another -march flag if that's OK with you?
> Thanks,
> Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH][GCC] aarch64: Add +flagm to -march
2020-12-03 10:18 ` Przemyslaw Wirkus
@ 2020-12-03 10:19 ` Richard Sandiford
0 siblings, 0 replies; 7+ messages in thread
From: Richard Sandiford @ 2020-12-03 10:19 UTC (permalink / raw)
To: Przemyslaw Wirkus
Cc: gcc-patches, Kyrylo Tkachov, Richard Earnshaw, Marcus Shawcroft
Przemyslaw Wirkus <Przemyslaw.Wirkus@arm.com> writes:
>> >> >> gcc/ChangeLog:
>> >> >>
>> >> >> * config/aarch64/aarch64-option-extensions.def
>> >> >> (AARCH64_OPT_EXTENSION): New +flagm option in -march for AArch64.
>> >> >> * config/aarch64/aarch64.h (AARCH64_FL_FLAGM): Add new flagm
>> >> >> extension bit mask.
>> >> >> (AARCH64_FL_FOR_ARCH8_4): Add flagm to Armv8.4-A.
>> >> >
>> >> > OK, thanks, and sorry for the slow review.
>> >>
>> >> Just remembered that we also need documentation for the new feature
>> >> flag in doc/invoke.texi.
>> >
>> > Done. Thank you for the reminder.
>> >
>> > commit 48ff86adfd96a0f5132273719932b48a14941881
>>
>> I think you also need to add flagm to:
>>
>> -----------------------------------------------------------------------
>> The table below summarizes the permissible values for @var{arch} and the
>> features that they enable by default:
>>
>> @multitable @columnfractions 0.20 0.20 0.60 @headitem @var{arch} value
>> @tab Architecture @tab Includes by default … @item @samp{armv8.4-a}
>> @tab Armv8.4-A @tab @samp{armv8.3-a}, @samp{+fp16fml},
>> @samp{+dotprod}
>> -----------------------------------------------------------------------
>
> Yes, I've just noticed that :/
> I will update this with my next patch which adds yet another -march flag if that's OK with you?
Yeah, that'd be fine.
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-12-03 10:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-30 22:35 [PATCH][GCC] aarch64: Add +flagm to -march Przemyslaw Wirkus
2020-12-02 18:13 ` Richard Sandiford
2020-12-02 19:35 ` Richard Sandiford
2020-12-03 9:29 ` Przemyslaw Wirkus
2020-12-03 10:13 ` Richard Sandiford
2020-12-03 10:18 ` Przemyslaw Wirkus
2020-12-03 10:19 ` Richard Sandiford
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).