On Fri, 8 Nov 2024 at 19:49, Torbjörn SVENSSON
<torbjorn.svens...@foss.st.com> wrote:
>
> Ok for trunk and releases/gcc-14?
>
> --
>
> A long time ago, this test forced -march=armv6.
>
> With -marm, the generated assembler is:
> foo:
>         sub     r0, r0, #48
>         cmp     r0, #9
>         movhi   r0, #0
>         movls   r0, #1
>         bx      lr
>
> With -mthumb, the generated assembler is:
> foo:
>         subs    r0, r0, #48
>         movs    r2, #9
>         uxtb    r3, r0
>         movs    r0, #0
>         cmp     r2, r3
>         adcs    r0, r0, r0
>         uxtb    r0, r0
>         bx      lr
>
> Require effective-target arm_arm_ok to skip the test for thumb-only
> targets (Cortex-M).
>
> gcc/testsuite/ChangeLog:
>
>         * gcc.target/arm/unsigned-extend-1.c: Use effective-target
>         arm_arm_ok.
>
> Signed-off-by: Torbjörn SVENSSON <torbjorn.svens...@foss.st.com>
> ---
>  gcc/testsuite/gcc.target/arm/unsigned-extend-1.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/gcc/testsuite/gcc.target/arm/unsigned-extend-1.c 
> b/gcc/testsuite/gcc.target/arm/unsigned-extend-1.c
> index 3b4ab048fb0..73f2e1a556d 100644
> --- a/gcc/testsuite/gcc.target/arm/unsigned-extend-1.c
> +++ b/gcc/testsuite/gcc.target/arm/unsigned-extend-1.c
> @@ -1,4 +1,5 @@
>  /* { dg-do compile } */
> +/* { dg-require-effective-target arm_arm_ok } */
>  /* { dg-options "-O2" } */
>

So I'm guessing arm_arm_ok fails when you are testing for M-profile targets?
What happens when you test for A-profile, providing -mthumb as part of
your runtest flags?
Since you don't add -marm, the test will be compiled in Thumb mode,
and still fail?

Thanks,

Christophe

>  unsigned char foo (unsigned char c)
> --
> 2.25.1
>

Reply via email to