diff mbox series

ARM: add test case for -masm-syntax-unified (PR88648)

Message ID 6eae751715f22d8e6deddb25d6674ce93306ce5e.1546465663.git.stefan@agner.ch
State New
Headers show
Series ARM: add test case for -masm-syntax-unified (PR88648) | expand

Commit Message

Stefan Agner Jan. 2, 2019, 9:47 p.m. UTC
Add a test case to check whether -masm-syntax-unified is indeed
emitting the inline assembler with .syntax unified.
---
 .../gcc.target/arm/pr88648-asm-syntax-unified.c    | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 gcc/testsuite/gcc.target/arm/pr88648-asm-syntax-unified.c

Comments

Kyrill Tkachov Jan. 8, 2019, 9:35 a.m. UTC | #1
Hi Stefan,

On 02/01/19 21:47, Stefan Agner wrote:
> Add a test case to check whether -masm-syntax-unified is indeed
> emitting the inline assembler with .syntax unified.

Can you please provide a ChangeLog entry for this change.

> ---
>  .../gcc.target/arm/pr88648-asm-syntax-unified.c    | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>  create mode 100644 gcc/testsuite/gcc.target/arm/pr88648-asm-syntax-unified.c
>
> diff --git a/gcc/testsuite/gcc.target/arm/pr88648-asm-syntax-unified.c b/gcc/testsuite/gcc.target/arm/pr88648-asm-syntax-unified.c
> new file mode 100644
> index 00000000000..2bd9d891b9e
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/arm/pr88648-asm-syntax-unified.c
> @@ -0,0 +1,14 @@
> +/* Test for unified syntax assembly generation.  */
> +/* { dg-do compile } */
> +/* { dg-require-effective-target arm_arch_v7a_ok } */
> +/* { dg-add-options arm_arch_v7a } */
> +/* { dg-options "-marm -march=armv7-a -masm-syntax-unified" } */
> +
> +void test ()
> +{
> +  asm("nop");
> +}
> +
> +/* { dg-final { scan-assembler-times {\.syntax\sunified} 3 } } */
> +/* { dg-final { scan-assembler-times {\.syntax\sdivided} 0 } } */
> +

Please use scan-assembler-not here to check for the absence of the ".syntax divided".

Looks ok to me otherwise.
Do you need someone to commit these for you?

Thanks,
Kyrill

> -- 
> 2.20.1
>
Stefan Agner Jan. 8, 2019, 9:56 p.m. UTC | #2
On 08.01.2019 10:35, Kyrill  Tkachov wrote:
> Hi Stefan,
> 
> On 02/01/19 21:47, Stefan Agner wrote:
>> Add a test case to check whether -masm-syntax-unified is indeed
>> emitting the inline assembler with .syntax unified.
> 
> Can you please provide a ChangeLog entry for this change.
> 
>> ---
>>  .../gcc.target/arm/pr88648-asm-syntax-unified.c    | 14 ++++++++++++++
>>  1 file changed, 14 insertions(+)
>>  create mode 100644 gcc/testsuite/gcc.target/arm/pr88648-asm-syntax-unified.c
>>
>> diff --git a/gcc/testsuite/gcc.target/arm/pr88648-asm-syntax-unified.c b/gcc/testsuite/gcc.target/arm/pr88648-asm-syntax-unified.c
>> new file mode 100644
>> index 00000000000..2bd9d891b9e
>> --- /dev/null
>> +++ b/gcc/testsuite/gcc.target/arm/pr88648-asm-syntax-unified.c
>> @@ -0,0 +1,14 @@
>> +/* Test for unified syntax assembly generation.  */
>> +/* { dg-do compile } */
>> +/* { dg-require-effective-target arm_arch_v7a_ok } */
>> +/* { dg-add-options arm_arch_v7a } */
>> +/* { dg-options "-marm -march=armv7-a -masm-syntax-unified" } */
>> +
>> +void test ()
>> +{
>> +  asm("nop");
>> +}
>> +
>> +/* { dg-final { scan-assembler-times {\.syntax\sunified} 3 } } */
>> +/* { dg-final { scan-assembler-times {\.syntax\sdivided} 0 } } */
>> +
> 
> Please use scan-assembler-not here to check for the absence of the
> ".syntax divided".

Ok, will send a v2 soon.

> 
> Looks ok to me otherwise.
> Do you need someone to commit these for you?

Yes please, I do not have commit rights.

--
Stefan
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/arm/pr88648-asm-syntax-unified.c b/gcc/testsuite/gcc.target/arm/pr88648-asm-syntax-unified.c
new file mode 100644
index 00000000000..2bd9d891b9e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr88648-asm-syntax-unified.c
@@ -0,0 +1,14 @@ 
+/* Test for unified syntax assembly generation.  */
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v7a_ok } */
+/* { dg-add-options arm_arch_v7a } */
+/* { dg-options "-marm -march=armv7-a -masm-syntax-unified" } */
+
+void test ()
+{
+  asm("nop");
+}
+
+/* { dg-final { scan-assembler-times {\.syntax\sunified} 3 } } */
+/* { dg-final { scan-assembler-times {\.syntax\sdivided} 0 } } */
+