public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch, ARM]: remove TARGET_ASM_FILE_START_APP_OFF
@ 2015-06-30 12:19 Christian Bruel
  2015-07-06 11:52 ` [PATCH, ARM]: PING " Christian Bruel
  2015-07-06 15:15 ` [Patch, ARM]: " Ramana Radhakrishnan
  0 siblings, 2 replies; 3+ messages in thread
From: Christian Bruel @ 2015-06-30 12:19 UTC (permalink / raw)
  To: kyrylo.tkachov, Ramana.Radhakrishnan; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 884 bytes --]

Hi,

A little bit of polishing around arm/thumb attribute_target emission and 
testing: Since the arch mode is emitted for each function, the file 
setting becomes useless or redundant.

for example with attr_thumb.c:

=>	.arm
=>	.syntax divided
	.file	"attr_thumb.c"
	.text
	.align	2
	.global	foo
=>	.syntax unified
=>	.code	16
	.thumb_func
	.type	foo, %function

This patch cleans this up and relaxes the attribute target tests to run 
on any thumb1/thumb2.

no new failure on arm-cortex-linux-gnueabi

and arm-none-eabi for
       arm-sim/
       arm-sim//-march=armv7-a
       arm-sim//-mthumb
       arm-sim//-mthumb/-march=armv7-a
       arm-sim/-mflip-thumb/
       arm-sim/-mflip-thumb//-march=armv7-a
       arm-sim/-mflip-thumb//-mthumb
       arm-sim/-mflip-thumb//-mthumb/-march=armv7-a

is still running but OK so far. OK for trunk once done ?

many thanks,

Christian



[-- Attachment #2: p.patch --]
[-- Type: text/x-patch, Size: 3507 bytes --]

2015-06-30  Christian Bruel  <christian.bruel@st.com>

	PR target/52144
	* config/arm/elf.h (TARGET_ASM_FILE_START_APP_OFF): Delete.

2015-06-30  Christian Bruel  <christian.bruel@st.com>

	PR target/52144
	* gcc.target/arm/flip-thumb.c: Fix scan.
	* gcc.target/arm/attr_thumb.c: Test for all targets. Fix scan.
	* gcc.target/arm/attr_arm.c: Test for all targets. Fix scan.
	* gcc.target/arm/attr_thumb-static.c: Test for all targets.
	Fix return value.

Index: gcc/config/arm/elf.h
===================================================================
--- gcc/config/arm/elf.h	(revision 225159)
+++ gcc/config/arm/elf.h	(working copy)
@@ -120,7 +120,6 @@
   { "marm", "mlittle-endian", "mfloat-abi=soft", "mno-thumb-interwork", "fno-leading-underscore" }
 #endif
 \f
-#define TARGET_ASM_FILE_START_APP_OFF true
 #define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
 \f
 
Index: gcc/testsuite/gcc.target/arm/attr_arm.c
===================================================================
--- gcc/testsuite/gcc.target/arm/attr_arm.c	(revision 225159)
+++ gcc/testsuite/gcc.target/arm/attr_arm.c	(working copy)
@@ -1,9 +1,7 @@
 /* Check that attribute target arm is recognized.  */
 /* { dg-do compile } */
-/* { dg-require-effective-target arm_arm_ok } */
-/* { dg-options "-O2" } */
-/* { dg-final { scan-assembler ".arm" } } */
-/* { dg-final { scan-assembler-not "ite" } } */
+/* { dg-final { scan-assembler "\.arm" } } */
+/* { dg-final { scan-assembler-not "\.thumb_func" } } */
 
 int __attribute__((target("arm")))
 foo(int a)
Index: gcc/testsuite/gcc.target/arm/attr_thumb-static.c
===================================================================
--- gcc/testsuite/gcc.target/arm/attr_thumb-static.c	(revision 225159)
+++ gcc/testsuite/gcc.target/arm/attr_thumb-static.c	(working copy)
@@ -1,6 +1,5 @@
 /* Check that a change mode to a static function is correctly handled. */
 /* { dg-do run } */
-/* { dg-require-effective-target arm_thumb1_ok } */
 
 static void
  __attribute__((__noinline__)) 
@@ -17,8 +16,10 @@
   __asm__ ("");
 }
 
-int main()
+int
+main (void)
 {
   foo();
   bar();
+  return 0;
 }
Index: gcc/testsuite/gcc.target/arm/attr_thumb.c
===================================================================
--- gcc/testsuite/gcc.target/arm/attr_thumb.c	(revision 225159)
+++ gcc/testsuite/gcc.target/arm/attr_thumb.c	(working copy)
@@ -1,13 +1,13 @@
 /* Check that attribute target thumb is recognized. */
 /* { dg-do compile } */
-/* { dg-require-effective-target arm_thumb2_ok } */
 /* { dg-options "-O2 -mno-restrict-it" } */
-/* { dg-final { scan-assembler ".thumb" } } */
-/* { dg-final { scan-assembler "ite" } } */
+/* { dg-final { scan-assembler-not "\.arm" } } */
+/* { dg-final { scan-assembler "\.thumb_func" } } */
 
 int __attribute__((target("thumb")))
 foo(int a)
 {
+  /* { dg-final { scan-assembler "ite" { target { arm_thumb2_ok } } } } */
   return a ? 1 : 5;
 }
 
Index: gcc/testsuite/gcc.target/arm/flip-thumb.c
===================================================================
--- gcc/testsuite/gcc.target/arm/flip-thumb.c	(revision 225159)
+++ gcc/testsuite/gcc.target/arm/flip-thumb.c	(working copy)
@@ -1,8 +1,8 @@
 /* Check -mflip-thumb. */
 /* { dg-do compile } */
 /* { dg-options "-O2 -mflip-thumb -mno-restrict-it" } */
-/* { dg-final { scan-assembler ".arm" } } */
-/* { dg-final { scan-assembler-times ".thumb_func" 1} } */
+/* { dg-final { scan-assembler "\.arm" } } */
+/* { dg-final { scan-assembler-times "\.thumb_func" 1} } */
 
 int 
 foo(int a)

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

* [PATCH, ARM]: PING remove TARGET_ASM_FILE_START_APP_OFF
  2015-06-30 12:19 [Patch, ARM]: remove TARGET_ASM_FILE_START_APP_OFF Christian Bruel
@ 2015-07-06 11:52 ` Christian Bruel
  2015-07-06 15:15 ` [Patch, ARM]: " Ramana Radhakrishnan
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Bruel @ 2015-07-06 11:52 UTC (permalink / raw)
  To: kyrylo.tkachov, Ramana.Radhakrishnan; +Cc: gcc-patches

Hi,

ping https://gcc.gnu.org/ml/gcc-patches/2015-06/msg02196.html

many thanks,

Christian

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

* Re: [Patch, ARM]: remove TARGET_ASM_FILE_START_APP_OFF
  2015-06-30 12:19 [Patch, ARM]: remove TARGET_ASM_FILE_START_APP_OFF Christian Bruel
  2015-07-06 11:52 ` [PATCH, ARM]: PING " Christian Bruel
@ 2015-07-06 15:15 ` Ramana Radhakrishnan
  1 sibling, 0 replies; 3+ messages in thread
From: Ramana Radhakrishnan @ 2015-07-06 15:15 UTC (permalink / raw)
  To: gcc-patches



On 30/06/15 13:07, Christian Bruel wrote:
> Hi,
> 
> A little bit of polishing around arm/thumb attribute_target emission and testing: Since the arch mode is emitted for each function, the file setting becomes useless or redundant.
> 
> for example with attr_thumb.c:
> 
> =>    .arm
> =>    .syntax divided
>     .file    "attr_thumb.c"
>     .text
>     .align    2
>     .global    foo
> =>    .syntax unified
> =>    .code    16
>     .thumb_func
>     .type    foo, %function
> 
> This patch cleans this up and relaxes the attribute target tests to run on any thumb1/thumb2.
> 
> no new failure on arm-cortex-linux-gnueabi
> 
> and arm-none-eabi for
>       arm-sim/
>       arm-sim//-march=armv7-a
>       arm-sim//-mthumb
>       arm-sim//-mthumb/-march=armv7-a
>       arm-sim/-mflip-thumb/
>       arm-sim/-mflip-thumb//-march=armv7-a
>       arm-sim/-mflip-thumb//-mthumb
>       arm-sim/-mflip-thumb//-mthumb/-march=armv7-a
> 
> is still running but OK so far. OK for trunk once done ?

OK.


regards
Ramana

> 
> many thanks,
> 
> Christian
> 
> 

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

end of thread, other threads:[~2015-07-06 15:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-30 12:19 [Patch, ARM]: remove TARGET_ASM_FILE_START_APP_OFF Christian Bruel
2015-07-06 11:52 ` [PATCH, ARM]: PING " Christian Bruel
2015-07-06 15:15 ` [Patch, ARM]: " Ramana Radhakrishnan

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