* [PATCH][AArch64][v2] Skip gcc.target/aarch64/assembler_arch_1.c if assembler does not support it
@ 2016-02-17 16:06 Kyrill Tkachov
2016-02-18 10:31 ` Christophe Lyon
2016-02-19 21:57 ` Jeff Law
0 siblings, 2 replies; 5+ messages in thread
From: Kyrill Tkachov @ 2016-02-17 16:06 UTC (permalink / raw)
To: GCC Patches; +Cc: James Greenhalgh, Christophe Lyon
[-- Attachment #1: Type: text/plain, Size: 1119 bytes --]
Hi all,
I've thought about this check a bit more and I think we can compactly auto-generate checks
for any aarch64 architecture extension support in the assembler.
This is done in a similar way we autogenerate the arm_arch_*_ok checks for arm.
So in this revision we autogenerate aarch64_asm_<ext>_ok checks for every architecture extension
using some of the expect machinery. This should make this approach a bit more general to handle
checks for any .arch_extension argument without much extra cost.
This still assumes that the assembler supports the .arch_extension pseudo-op, the effective
target check will fail if it doesn't. This is what we want for this testcase.
Is this patch ok instead of https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01052.html ?
Thanks,
Kyrill
2016-02-17 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* lib/target-supports.exp: Define aarch64_asm_FUNC_ok checks
for fp, simd, crypto, crc, lse.
* doc/sourcebuild.texi (AArch64-specific attributes): Document the
above.
* gcc.target/aarch64/assembler_arch_1.c: Add aarch64_asm_lse_ok
effective target check.
[-- Attachment #2: aarch64-asm-feats.patch --]
[-- Type: text/x-patch, Size: 2296 bytes --]
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 6d548aad7aa24c59b40ec13d9c99733d94ec0aa6..19fd938afff9bb480e2262d07ce5c8ff9ca167c7 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -1606,6 +1606,10 @@ ARM target prefers @code{LDRD} and @code{STRD} instructions over
@subsubsection AArch64-specific attributes
@table @code
+@item aarch64_asm_<ext>_ok
+AArch64 assembler supports the architecture extension @code{ext} via the
+@code{.arch_extension} pseudo-op. The values of @code{ext} are defined in
+the file config/aarch64/aarch64-option-extensions.def.
@item aarch64_tiny
AArch64 target which generates instruction sequences for tiny memory model.
@item aarch64_small
diff --git a/gcc/testsuite/gcc.target/aarch64/assembler_arch_1.c b/gcc/testsuite/gcc.target/aarch64/assembler_arch_1.c
index 901e50a178d7a4a443a5ad0abe63f624688db268..5deea5cf0ee9306743bc47bace6f762d0e35ce65 100644
--- a/gcc/testsuite/gcc.target/aarch64/assembler_arch_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/assembler_arch_1.c
@@ -1,4 +1,5 @@
/* { dg-do assemble } */
+/* { dg-require-effective-target aarch64_asm_lse_ok } */
/* { dg-options "-march=armv8-a" } */
/* Make sure that the function header in assembly doesn't override
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 66fb1eaf7bd4aa58d23cfc9203e9f27573c7a303..f399f185d25aa5a947b7a17fd6020dc311b18f58 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -6719,6 +6719,23 @@ proc check_effective_target_aarch64_tiny { } {
}
}
+# Create functions to check that the AArch64 assembler supports the
+# various architecture extensions via the .arch_extension pseudo-op.
+
+foreach { aarch64_ext } { "fp" "simd" "crypto" "crc" "lse"} {
+ eval [string map [list FUNC $aarch64_ext] {
+ proc check_effective_target_aarch64_asm_FUNC_ok { } {
+ if { [istarget aarch64*-*-*] } {
+ return [check_no_compiler_messages aarch64_lse_assembler object {
+ __asm__ (".arch_extension FUNC");
+ } "-march=armv8-a+FUNC"]
+ } else {
+ return 0
+ }
+ }
+ }]
+}
+
proc check_effective_target_aarch64_small { } {
if { [istarget aarch64*-*-*] } {
return [check_no_compiler_messages aarch64_small object {
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][AArch64][v2] Skip gcc.target/aarch64/assembler_arch_1.c if assembler does not support it
2016-02-17 16:06 [PATCH][AArch64][v2] Skip gcc.target/aarch64/assembler_arch_1.c if assembler does not support it Kyrill Tkachov
@ 2016-02-18 10:31 ` Christophe Lyon
2016-02-18 14:24 ` James Greenhalgh
2016-02-19 21:57 ` Jeff Law
1 sibling, 1 reply; 5+ messages in thread
From: Christophe Lyon @ 2016-02-18 10:31 UTC (permalink / raw)
To: Kyrill Tkachov; +Cc: GCC Patches, James Greenhalgh
On 17 February 2016 at 17:06, Kyrill Tkachov
<kyrylo.tkachov@foss.arm.com> wrote:
> Hi all,
>
> I've thought about this check a bit more and I think we can compactly
> auto-generate checks
> for any aarch64 architecture extension support in the assembler.
> This is done in a similar way we autogenerate the arm_arch_*_ok checks for
> arm.
>
> So in this revision we autogenerate aarch64_asm_<ext>_ok checks for every
> architecture extension
> using some of the expect machinery. This should make this approach a bit
> more general to handle
> checks for any .arch_extension argument without much extra cost.
>
> This still assumes that the assembler supports the .arch_extension
> pseudo-op, the effective
> target check will fail if it doesn't. This is what we want for this
> testcase.
>
> Is this patch ok instead of
> https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01052.html ?
>
Nice indeed.
Regarding the doc, it's not accurate to say that the values of ext
are defined in aarch64-option-extensions.def, since that file is not
actually parsed by DJ. I mean there is no guarantee the two lists
will be kept in sync.
In the new test itself, I think that
return [check_no_compiler_messages aarch64_lse_assembler object
should be:
return [check_no_compiler_messages aarch64_FUNC_assembler object
for consistency although your patch is functional as-is.
Thanks
Christophe.
> Thanks,
> Kyrill
>
> 2016-02-17 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>
> * lib/target-supports.exp: Define aarch64_asm_FUNC_ok checks
> for fp, simd, crypto, crc, lse.
> * doc/sourcebuild.texi (AArch64-specific attributes): Document the
> above.
> * gcc.target/aarch64/assembler_arch_1.c: Add aarch64_asm_lse_ok
> effective target check.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][AArch64][v2] Skip gcc.target/aarch64/assembler_arch_1.c if assembler does not support it
2016-02-18 10:31 ` Christophe Lyon
@ 2016-02-18 14:24 ` James Greenhalgh
2016-02-19 14:20 ` Kyrill Tkachov
0 siblings, 1 reply; 5+ messages in thread
From: James Greenhalgh @ 2016-02-18 14:24 UTC (permalink / raw)
To: Christophe Lyon; +Cc: Kyrill Tkachov, GCC Patches
On Thu, Feb 18, 2016 at 11:31:02AM +0100, Christophe Lyon wrote:
> On 17 February 2016 at 17:06, Kyrill Tkachov
> <kyrylo.tkachov@foss.arm.com> wrote:
> > Hi all,
> >
> > I've thought about this check a bit more and I think we can compactly
> > auto-generate checks
> > for any aarch64 architecture extension support in the assembler.
> > This is done in a similar way we autogenerate the arm_arch_*_ok checks for
> > arm.
> >
> > So in this revision we autogenerate aarch64_asm_<ext>_ok checks for every
> > architecture extension
> > using some of the expect machinery. This should make this approach a bit
> > more general to handle
> > checks for any .arch_extension argument without much extra cost.
> >
> > This still assumes that the assembler supports the .arch_extension
> > pseudo-op, the effective
> > target check will fail if it doesn't. This is what we want for this
> > testcase.
> >
> > Is this patch ok instead of
> > https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01052.html ?
> >
> Nice indeed.
>
> Regarding the doc, it's not accurate to say that the values of ext
> are defined in aarch64-option-extensions.def, since that file is not
> actually parsed by DJ. I mean there is no guarantee the two lists
> will be kept in sync.
>
> In the new test itself, I think that
> return [check_no_compiler_messages aarch64_lse_assembler object
> should be:
> return [check_no_compiler_messages aarch64_FUNC_assembler object
>
> for consistency although your patch is functional as-is.
Agreed.
OK with that change.
Thanks,
James
> > 2016-02-17 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
> >
> > * lib/target-supports.exp: Define aarch64_asm_FUNC_ok checks
> > for fp, simd, crypto, crc, lse.
> > * doc/sourcebuild.texi (AArch64-specific attributes): Document the
> > above.
> > * gcc.target/aarch64/assembler_arch_1.c: Add aarch64_asm_lse_ok
> > effective target check.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][AArch64][v2] Skip gcc.target/aarch64/assembler_arch_1.c if assembler does not support it
2016-02-18 14:24 ` James Greenhalgh
@ 2016-02-19 14:20 ` Kyrill Tkachov
0 siblings, 0 replies; 5+ messages in thread
From: Kyrill Tkachov @ 2016-02-19 14:20 UTC (permalink / raw)
To: James Greenhalgh, Christophe Lyon; +Cc: GCC Patches
[-- Attachment #1: Type: text/plain, Size: 2379 bytes --]
On 18/02/16 14:24, James Greenhalgh wrote:
> On Thu, Feb 18, 2016 at 11:31:02AM +0100, Christophe Lyon wrote:
>> On 17 February 2016 at 17:06, Kyrill Tkachov
>> <kyrylo.tkachov@foss.arm.com> wrote:
>>> Hi all,
>>>
>>> I've thought about this check a bit more and I think we can compactly
>>> auto-generate checks
>>> for any aarch64 architecture extension support in the assembler.
>>> This is done in a similar way we autogenerate the arm_arch_*_ok checks for
>>> arm.
>>>
>>> So in this revision we autogenerate aarch64_asm_<ext>_ok checks for every
>>> architecture extension
>>> using some of the expect machinery. This should make this approach a bit
>>> more general to handle
>>> checks for any .arch_extension argument without much extra cost.
>>>
>>> This still assumes that the assembler supports the .arch_extension
>>> pseudo-op, the effective
>>> target check will fail if it doesn't. This is what we want for this
>>> testcase.
>>>
>>> Is this patch ok instead of
>>> https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01052.html ?
>>>
>> Nice indeed.
>>
>> Regarding the doc, it's not accurate to say that the values of ext
>> are defined in aarch64-option-extensions.def, since that file is not
>> actually parsed by DJ. I mean there is no guarantee the two lists
>> will be kept in sync.
>>
>> In the new test itself, I think that
>> return [check_no_compiler_messages aarch64_lse_assembler object
>> should be:
>> return [check_no_compiler_messages aarch64_FUNC_assembler object
>>
>> for consistency although your patch is functional as-is.
> Agreed.
>
> OK with that change.
Thanks, here's what I committed with r233559.
Kyrill
2016-02-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* lib/target-supports.exp: Define aarch64_asm_FUNC_ok checks
for fp, simd, crypto, crc, lse.
* doc/sourcebuild.texi (AArch64-specific attributes): Document the
above.
* gcc.target/aarch64/assembler_arch_1.c: Add aarch64_asm_lse_ok
effective target check.
> Thanks,
> James
>
>>> 2016-02-17 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>>>
>>> * lib/target-supports.exp: Define aarch64_asm_FUNC_ok checks
>>> for fp, simd, crypto, crc, lse.
>>> * doc/sourcebuild.texi (AArch64-specific attributes): Document the
>>> above.
>>> * gcc.target/aarch64/assembler_arch_1.c: Add aarch64_asm_lse_ok
>>> effective target check.
[-- Attachment #2: aarch64-asm-feat.patch --]
[-- Type: text/x-patch, Size: 2199 bytes --]
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 6d548aad7aa24c59b40ec13d9c99733d94ec0aa6..c5354cfc8f36f453fedf0b6879b1dc1ec663f1b5 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -1606,6 +1606,9 @@ ARM target prefers @code{LDRD} and @code{STRD} instructions over
@subsubsection AArch64-specific attributes
@table @code
+@item aarch64_asm_<ext>_ok
+AArch64 assembler supports the architecture extension @code{ext} via the
+@code{.arch_extension} pseudo-op.
@item aarch64_tiny
AArch64 target which generates instruction sequences for tiny memory model.
@item aarch64_small
diff --git a/gcc/testsuite/gcc.target/aarch64/assembler_arch_1.c b/gcc/testsuite/gcc.target/aarch64/assembler_arch_1.c
index 901e50a178d7a4a443a5ad0abe63f624688db268..5deea5cf0ee9306743bc47bace6f762d0e35ce65 100644
--- a/gcc/testsuite/gcc.target/aarch64/assembler_arch_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/assembler_arch_1.c
@@ -1,4 +1,5 @@
/* { dg-do assemble } */
+/* { dg-require-effective-target aarch64_asm_lse_ok } */
/* { dg-options "-march=armv8-a" } */
/* Make sure that the function header in assembly doesn't override
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 66fb1eaf7bd4aa58d23cfc9203e9f27573c7a303..0b4252f6434fb8223423e06882a061ccf0f5a015 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -6719,6 +6719,23 @@ proc check_effective_target_aarch64_tiny { } {
}
}
+# Create functions to check that the AArch64 assembler supports the
+# various architecture extensions via the .arch_extension pseudo-op.
+
+foreach { aarch64_ext } { "fp" "simd" "crypto" "crc" "lse"} {
+ eval [string map [list FUNC $aarch64_ext] {
+ proc check_effective_target_aarch64_asm_FUNC_ok { } {
+ if { [istarget aarch64*-*-*] } {
+ return [check_no_compiler_messages aarch64_FUNC_assembler object {
+ __asm__ (".arch_extension FUNC");
+ } "-march=armv8-a+FUNC"]
+ } else {
+ return 0
+ }
+ }
+ }]
+}
+
proc check_effective_target_aarch64_small { } {
if { [istarget aarch64*-*-*] } {
return [check_no_compiler_messages aarch64_small object {
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][AArch64][v2] Skip gcc.target/aarch64/assembler_arch_1.c if assembler does not support it
2016-02-17 16:06 [PATCH][AArch64][v2] Skip gcc.target/aarch64/assembler_arch_1.c if assembler does not support it Kyrill Tkachov
2016-02-18 10:31 ` Christophe Lyon
@ 2016-02-19 21:57 ` Jeff Law
1 sibling, 0 replies; 5+ messages in thread
From: Jeff Law @ 2016-02-19 21:57 UTC (permalink / raw)
To: Kyrill Tkachov, GCC Patches; +Cc: James Greenhalgh, Christophe Lyon
On 02/17/2016 09:06 AM, Kyrill Tkachov wrote:
> Hi all,
>
> I've thought about this check a bit more and I think we can compactly
> auto-generate checks
> for any aarch64 architecture extension support in the assembler.
> This is done in a similar way we autogenerate the arm_arch_*_ok checks
> for arm.
>
> So in this revision we autogenerate aarch64_asm_<ext>_ok checks for
> every architecture extension
> using some of the expect machinery. This should make this approach a bit
> more general to handle
> checks for any .arch_extension argument without much extra cost.
>
> This still assumes that the assembler supports the .arch_extension
> pseudo-op, the effective
> target check will fail if it doesn't. This is what we want for this
> testcase.
>
> Is this patch ok instead of
> https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01052.html ?
>
> Thanks,
> Kyrill
>
> 2016-02-17 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>
> * lib/target-supports.exp: Define aarch64_asm_FUNC_ok checks
> for fp, simd, crypto, crc, lse.
> * doc/sourcebuild.texi (AArch64-specific attributes): Document the
> above.
> * gcc.target/aarch64/assembler_arch_1.c: Add aarch64_asm_lse_ok
> effective target check.
Yes, this is fine.
jeff
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-02-19 21:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-17 16:06 [PATCH][AArch64][v2] Skip gcc.target/aarch64/assembler_arch_1.c if assembler does not support it Kyrill Tkachov
2016-02-18 10:31 ` Christophe Lyon
2016-02-18 14:24 ` James Greenhalgh
2016-02-19 14:20 ` Kyrill Tkachov
2016-02-19 21:57 ` Jeff Law
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).