diff mbox

[GCC/testsuite/ARM,ping] Fix empty_fiq_handler target selector

Message ID 90542165-4a24-3a5a-219d-7d00ccbc71e8@foss.arm.com
State New
Headers show

Commit Message

Thomas Preudhomme Jan. 4, 2017, 3:44 p.m. UTC
On 04/01/17 09:42, Kyrill Tkachov wrote:
>

> On 03/01/17 17:22, Thomas Preudhomme wrote:

>> Happy new year!

>>

>> Ping?

>>

>> Best regards,

>>

>> Thomas

>>

>> On 09/12/16 15:28, Thomas Preudhomme wrote:

>>> Hi,

>>>

>>> The current target selector for empty_fiq_handler.c testcase skips the test when

>>> targeting Thumb mode on a device with ARM execution state. Because it checks

>>> Thumb mode by looking for an -mthumb option it fails to work when GCC was

>>> configured with --with-mode=thumb. It is also too restrictive because interrupt

>>> handler can be compiled in Thumb-2. This patch checks the arm_thumb1 effective

>>> target instead of the -mthumb flag to fix both issues.

>>>

>>> ChangeLog entry is as follows:

>>>

>>>

>>> *** gcc/testsuite/ChangeLog ***

>>>

>>> 2016-12-09  Thomas Preud'homme <thomas.preudhomme@arm.com>

>>>

>>>         * gcc.target/arm/empty_fiq_handler: Skip instead if targeting Thumb-1

>>>         on a non Thumb-only target.

>>>

>>>

>>> Tested with GCC built for ARMv5T and ARMv7-A with --with-mode=thumb and

>>> --with-mode=arm and for ARMv6S-M with --with-mode=thumb:

>>>

>>> * test pass in all cases for ARMv5T and ARMv7-A with -marm

>>> * test pass in all cases for ARMv6S-M and ARMv7-A with -mthumb

>>> * test pass without option when defaulting to ARM for ARMv5T and ARMv7-A

>>> * test pass without option when defaulting to Thumb for ARMv6S-M and ARMv7-A

>>> * test is unsupported with -marm for ARMv5T

>>> * test is unsupported without option when defaulting to Thumb for ARMv5T

>>>

>>> Is this ok for stage3?

>>>

>>> Best regards,

>>>

>>> Thomas

>>

>> fix_empty_fiq_handler_testcase_selector.patch

>>

>>

>> diff --git a/gcc/testsuite/gcc.target/arm/empty_fiq_handler.c

>> b/gcc/testsuite/gcc.target/arm/empty_fiq_handler.c

>> index

>> 8313f2199122be153a737946e817a5e3bee60372..69bb0669dd416e1fcb015c278d62961d071fc42f

>> 100644

>> --- a/gcc/testsuite/gcc.target/arm/empty_fiq_handler.c

>> +++ b/gcc/testsuite/gcc.target/arm/empty_fiq_handler.c

>> @@ -1,5 +1,4 @@

>> -/* { dg-do compile } */

>> -/* { dg-skip-if "" { ! arm_cortex_m } { "-mthumb" } } */

>> +/* { dg-do compile { target { {! arm_thumb1 } || arm_cortex_m } } } */

>>

>

> I think you want to add a space between the '{' and '!'.

> Otherwise this is ok.


Right.

Did testing with ARMv4T defaulting to Thumb and ARMv7-A defaulting to Thumb and 
ARM to make sure it didn't seem to affect the behavior. Committed as r244057 
with suggested change (attached for reference).

Best regards,

Thomas
diff mbox

Patch

diff --git a/gcc/testsuite/gcc.target/arm/empty_fiq_handler.c b/gcc/testsuite/gcc.target/arm/empty_fiq_handler.c
index 8313f2199122be153a737946e817a5e3bee60372..7b8296bfc903780d35059e2e63ed7ef35daf51d1 100644
--- a/gcc/testsuite/gcc.target/arm/empty_fiq_handler.c
+++ b/gcc/testsuite/gcc.target/arm/empty_fiq_handler.c
@@ -1,5 +1,4 @@ 
-/* { dg-do compile } */
-/* { dg-skip-if "" { ! arm_cortex_m } { "-mthumb" } } */
+/* { dg-do compile { target { { ! arm_thumb1 } || arm_cortex_m } } } */
 
 /* Below code used to trigger an ICE due to missing constraints for
    sp = fp + cst pattern.  */