Message ID | 20241108184705.2663932-1-torbjorn.svensson@foss.st.com |
---|---|
State | New |
Headers | show |
Series | testsuite: arm: Use effective-target for unsigned-extend-1.c | expand |
On Fri, 8 Nov 2024 at 19:49, Torbjörn SVENSSON <torbjorn.svensson@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.svensson@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 >
On 2024-11-14 16:32, Christophe Lyon wrote: > On Fri, 8 Nov 2024 at 19:49, Torbjörn SVENSSON > <torbjorn.svensson@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.svensson@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? For Cortex-M0 (thumb/cpu=cortex-m0/float-abi=soft): Testing arm/unsigned-extend-1.c check_compile tool: gcc for arm_arm_ok doing compile Executing on host: .../bin/arm-none-eabi-gcc arm_arm_ok21114.c -mthumb -mcpu=cortex-m0 -mfloat-abi=soft -fdiagnostics-plain-output -marm -Wno-complain-wrong-lang -S -o arm_arm_ok21114.s (timeout = 800) spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc arm_arm_ok21114.c -mthumb -mcpu=cortex-m0 -mfloat-abi=soft -fdiagnostics-plain-output -marm -Wno-complain-wrong-lang -S -o arm_arm_ok21114.s pid is 21254 -21254 cc1: error: target CPU does not support ARM mode pid is -1 close result is 21254 exp6 0 1 output is cc1: error: target CPU does not support ARM mode status 1 compiler exited with status 1 UNSUPPORTED: gcc.target/arm/unsigned-extend-1.c For Cortex-A7 (thumb/cpu=cortex-a7/float-abi=soft): Testing arm/unsigned-extend-1.c check_compile tool: gcc for arm_arm_ok doing compile Executing on host: .../bin/arm-none-eabi-gcc arm_arm_ok21296.c -mthumb -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -marm -Wno-complain-wrong-lang -S -o arm_arm_ok21296.s (timeout = 800) spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc arm_arm_ok21296.c -mthumb -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -marm -Wno-complain-wrong-lang -S -o arm_arm_ok21296.s pid is 21434 -21434 pid is -1 output is status 0 doing compile Executing on host: .../bin/arm-none-eabi-gcc .../gcc/testsuite/gcc.target/arm/unsigned-extend-1.c -mthumb -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -O2 -ffat-lto-objects -fno-ident -S -o unsigned-extend-1.s (timeout = 800) spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc .../gcc/testsuite/gcc.target/arm/unsigned-extend-1.c -mthumb -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -O2 -ffat-lto-objects -fno-ident -S -o unsigned-extend-1.s pid is 21438 -21438 pid is -1 output is status 0 check_compile tool: gcc for exceptions_enabled doing compile Executing on host: .../bin/arm-none-eabi-gcc exceptions_enabled21296.cc -mthumb -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -Wno-complain-wrong-lang -S -o exceptions_enabled21296.s (timeout = 800) spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc exceptions_enabled21296.cc -mthumb -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -Wno-complain-wrong-lang -S -o exceptions_enabled21296.s pid is 21442 -21442 pid is -1 output is status 0 PASS: gcc.target/arm/unsigned-extend-1.c (test for excess errors) PASS: gcc.target/arm/unsigned-extend-1.c scan-assembler-not uxtb For Cortex-A7 (cpu=cortex-a7/float-abi=soft): Testing arm/unsigned-extend-1.c check_compile tool: gcc for arm_arm_ok doing compile Executing on host: .../bin/arm-none-eabi-gcc arm_arm_ok21484.c -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -marm -Wno-complain-wrong-lang -S -o arm_arm_ok21484.s (timeout = 800) spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc arm_arm_ok21484.c -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -marm -Wno-complain-wrong-lang -S -o arm_arm_ok21484.s pid is 21622 -21622 pid is -1 output is status 0 doing compile Executing on host: .../bin/arm-none-eabi-gcc .../gcc/testsuite/gcc.target/arm/unsigned-extend-1.c -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -O2 -ffat-lto-objects -fno-ident -S -o unsigned-extend-1.s (timeout = 800) spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc .../gcc/testsuite/gcc.target/arm/unsigned-extend-1.c -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -O2 -ffat-lto-objects -fno-ident -S -o unsigned-extend-1.s pid is 21626 -21626 pid is -1 output is status 0 check_compile tool: gcc for exceptions_enabled doing compile Executing on host: .../bin/arm-none-eabi-gcc exceptions_enabled21484.cc -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -Wno-complain-wrong-lang -S -o exceptions_enabled21484.s (timeout = 800) spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc exceptions_enabled21484.cc -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -Wno-complain-wrong-lang -S -o exceptions_enabled21484.s pid is 21630 -21630 pid is -1 output is status 0 PASS: gcc.target/arm/unsigned-extend-1.c (test for excess errors) PASS: gcc.target/arm/unsigned-extend-1.c scan-assembler-not uxtb testcase .../gcc/testsuite/gcc.target/arm/arm.exp completed in 1 seconds > Since you don't add -marm, the test will be compiled in Thumb mode, > and still fail? Since my tests succeeded without it, it didn't think much of it. I can add -marm to the do-options just be safe. Should I send a V2 with it or can it be approved with that addition? Kind regards, Torbjörn > > Thanks, > > Christophe > >> unsigned char foo (unsigned char c) >> -- >> 2.25.1 >>
Gentle ping :) Kind regards, Torbjörn On 2024-11-14 17:16, Torbjorn SVENSSON wrote: > > > On 2024-11-14 16:32, Christophe Lyon wrote: >> On Fri, 8 Nov 2024 at 19:49, Torbjörn SVENSSON >> <torbjorn.svensson@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.svensson@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? > > > > For Cortex-M0 (thumb/cpu=cortex-m0/float-abi=soft): > > Testing arm/unsigned-extend-1.c > check_compile tool: gcc for arm_arm_ok > doing compile > Executing on host: .../bin/arm-none-eabi-gcc arm_arm_ok21114.c -mthumb > -mcpu=cortex-m0 -mfloat-abi=soft -fdiagnostics-plain-output -marm - > Wno-complain-wrong-lang -S -o arm_arm_ok21114.s (timeout = 800) > spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc arm_arm_ok21114.c -mthumb > -mcpu=cortex-m0 -mfloat-abi=soft -fdiagnostics-plain-output -marm -Wno- > complain-wrong-lang -S -o arm_arm_ok21114.s > pid is 21254 -21254 > cc1: error: target CPU does not support ARM mode > pid is -1 > close result is 21254 exp6 0 1 > output is cc1: error: target CPU does not support ARM mode > status 1 > compiler exited with status 1 > UNSUPPORTED: gcc.target/arm/unsigned-extend-1.c > > > For Cortex-A7 (thumb/cpu=cortex-a7/float-abi=soft): > > Testing arm/unsigned-extend-1.c > check_compile tool: gcc for arm_arm_ok > doing compile > Executing on host: .../bin/arm-none-eabi-gcc arm_arm_ok21296.c -mthumb > -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -marm - > Wno-complain-wrong-lang -S -o arm_arm_ok21296.s (timeout = 800) > spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc arm_arm_ok21296.c -mthumb > -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -marm -Wno- > complain-wrong-lang -S -o arm_arm_ok21296.s > pid is 21434 -21434 > pid is -1 > output is status 0 > doing compile > Executing on host: .../bin/arm-none-eabi-gcc .../gcc/testsuite/ > gcc.target/arm/unsigned-extend-1.c -mthumb -mcpu=cortex-a7 -mfloat- > abi=soft -fdiagnostics-plain-output -O2 -ffat-lto-objects -fno-ident > -S -o unsigned-extend-1.s (timeout = 800) > spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc .../gcc/testsuite/ > gcc.target/arm/unsigned-extend-1.c -mthumb -mcpu=cortex-a7 -mfloat- > abi=soft -fdiagnostics-plain-output -O2 -ffat-lto-objects -fno-ident -S > -o unsigned-extend-1.s > pid is 21438 -21438 > pid is -1 > output is status 0 > check_compile tool: gcc for exceptions_enabled > doing compile > Executing on host: .../bin/arm-none-eabi-gcc exceptions_enabled21296.cc > -mthumb -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output > -Wno-complain-wrong-lang -S -o exceptions_enabled21296.s (timeout > = 800) > spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc > exceptions_enabled21296.cc -mthumb -mcpu=cortex-a7 -mfloat-abi=soft - > fdiagnostics-plain-output -Wno-complain-wrong-lang -S -o > exceptions_enabled21296.s > pid is 21442 -21442 > pid is -1 > output is status 0 > PASS: gcc.target/arm/unsigned-extend-1.c (test for excess errors) > PASS: gcc.target/arm/unsigned-extend-1.c scan-assembler-not uxtb > > For Cortex-A7 (cpu=cortex-a7/float-abi=soft): > > > > Testing arm/unsigned-extend-1.c > check_compile tool: gcc for arm_arm_ok > doing compile > Executing on host: .../bin/arm-none-eabi-gcc arm_arm_ok21484.c - > mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -marm - > Wno-complain-wrong-lang -S -o arm_arm_ok21484.s (timeout = 800) > spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc arm_arm_ok21484.c - > mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -marm -Wno- > complain-wrong-lang -S -o arm_arm_ok21484.s > pid is 21622 -21622 > pid is -1 > output is status 0 > doing compile > Executing on host: .../bin/arm-none-eabi-gcc .../gcc/testsuite/ > gcc.target/arm/unsigned-extend-1.c -mcpu=cortex-a7 -mfloat-abi=soft - > fdiagnostics-plain-output -O2 -ffat-lto-objects -fno-ident -S -o > unsigned-extend-1.s (timeout = 800) > spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc .../gcc/testsuite/ > gcc.target/arm/unsigned-extend-1.c -mcpu=cortex-a7 -mfloat-abi=soft - > fdiagnostics-plain-output -O2 -ffat-lto-objects -fno-ident -S -o > unsigned-extend-1.s > pid is 21626 -21626 > pid is -1 > output is status 0 > check_compile tool: gcc for exceptions_enabled > doing compile > Executing on host: .../bin/arm-none-eabi-gcc exceptions_enabled21484.cc > -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -Wno- > complain-wrong-lang -S -o exceptions_enabled21484.s (timeout = 800) > spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc > exceptions_enabled21484.cc -mcpu=cortex-a7 -mfloat-abi=soft - > fdiagnostics-plain-output -Wno-complain-wrong-lang -S -o > exceptions_enabled21484.s > pid is 21630 -21630 > pid is -1 > output is status 0 > PASS: gcc.target/arm/unsigned-extend-1.c (test for excess errors) > PASS: gcc.target/arm/unsigned-extend-1.c scan-assembler-not uxtb > testcase .../gcc/testsuite/gcc.target/arm/arm.exp completed in 1 seconds > >> Since you don't add -marm, the test will be compiled in Thumb mode, >> and still fail? > > Since my tests succeeded without it, it didn't think much of it. I can > add -marm to the do-options just be safe. Should I send a V2 with it or > can it be approved with that addition? > > Kind regards, > Torbjörn > >> >> Thanks, >> >> Christophe >> >>> unsigned char foo (unsigned char c) >>> -- >>> 2.25.1 >>> >
Another ping... :) Kind regards, Torbjörn On 2024-12-18 18:35, Torbjorn SVENSSON wrote: > Gentle ping :) > > Kind regards, > Torbjörn > > On 2024-11-14 17:16, Torbjorn SVENSSON wrote: >> >> >> On 2024-11-14 16:32, Christophe Lyon wrote: >>> On Fri, 8 Nov 2024 at 19:49, Torbjörn SVENSSON >>> <torbjorn.svensson@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.svensson@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? >> >> >> >> For Cortex-M0 (thumb/cpu=cortex-m0/float-abi=soft): >> >> Testing arm/unsigned-extend-1.c >> check_compile tool: gcc for arm_arm_ok >> doing compile >> Executing on host: .../bin/arm-none-eabi-gcc arm_arm_ok21114.c - >> mthumb -mcpu=cortex-m0 -mfloat-abi=soft -fdiagnostics-plain-output >> -marm - Wno-complain-wrong-lang -S -o arm_arm_ok21114.s >> (timeout = 800) >> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc arm_arm_ok21114.c - >> mthumb -mcpu=cortex-m0 -mfloat-abi=soft -fdiagnostics-plain-output - >> marm -Wno- complain-wrong-lang -S -o arm_arm_ok21114.s >> pid is 21254 -21254 >> cc1: error: target CPU does not support ARM mode >> pid is -1 >> close result is 21254 exp6 0 1 >> output is cc1: error: target CPU does not support ARM mode >> status 1 >> compiler exited with status 1 >> UNSUPPORTED: gcc.target/arm/unsigned-extend-1.c >> >> >> For Cortex-A7 (thumb/cpu=cortex-a7/float-abi=soft): >> >> Testing arm/unsigned-extend-1.c >> check_compile tool: gcc for arm_arm_ok >> doing compile >> Executing on host: .../bin/arm-none-eabi-gcc arm_arm_ok21296.c - >> mthumb -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output >> -marm - Wno-complain-wrong-lang -S -o arm_arm_ok21296.s >> (timeout = 800) >> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc arm_arm_ok21296.c - >> mthumb -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output - >> marm -Wno- complain-wrong-lang -S -o arm_arm_ok21296.s >> pid is 21434 -21434 >> pid is -1 >> output is status 0 >> doing compile >> Executing on host: .../bin/arm-none-eabi-gcc .../gcc/testsuite/ >> gcc.target/arm/unsigned-extend-1.c -mthumb -mcpu=cortex-a7 -mfloat- >> abi=soft -fdiagnostics-plain-output -O2 -ffat-lto-objects -fno- >> ident -S -o unsigned-extend-1.s (timeout = 800) >> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc .../gcc/testsuite/ >> gcc.target/arm/unsigned-extend-1.c -mthumb -mcpu=cortex-a7 -mfloat- >> abi=soft -fdiagnostics-plain-output -O2 -ffat-lto-objects -fno-ident - >> S -o unsigned-extend-1.s >> pid is 21438 -21438 >> pid is -1 >> output is status 0 >> check_compile tool: gcc for exceptions_enabled >> doing compile >> Executing on host: .../bin/arm-none-eabi-gcc >> exceptions_enabled21296.cc -mthumb -mcpu=cortex-a7 -mfloat- >> abi=soft -fdiagnostics-plain-output -Wno-complain-wrong-lang -S >> -o exceptions_enabled21296.s (timeout = 800) >> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc >> exceptions_enabled21296.cc -mthumb -mcpu=cortex-a7 -mfloat-abi=soft - >> fdiagnostics-plain-output -Wno-complain-wrong-lang -S -o >> exceptions_enabled21296.s >> pid is 21442 -21442 >> pid is -1 >> output is status 0 >> PASS: gcc.target/arm/unsigned-extend-1.c (test for excess errors) >> PASS: gcc.target/arm/unsigned-extend-1.c scan-assembler-not uxtb >> >> For Cortex-A7 (cpu=cortex-a7/float-abi=soft): >> >> >> >> Testing arm/unsigned-extend-1.c >> check_compile tool: gcc for arm_arm_ok >> doing compile >> Executing on host: .../bin/arm-none-eabi-gcc arm_arm_ok21484.c - >> mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -marm - >> Wno-complain-wrong-lang -S -o arm_arm_ok21484.s (timeout = 800) >> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc arm_arm_ok21484.c - >> mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -marm -Wno- >> complain-wrong-lang -S -o arm_arm_ok21484.s >> pid is 21622 -21622 >> pid is -1 >> output is status 0 >> doing compile >> Executing on host: .../bin/arm-none-eabi-gcc .../gcc/testsuite/ >> gcc.target/arm/unsigned-extend-1.c -mcpu=cortex-a7 -mfloat-abi=soft >> - fdiagnostics-plain-output -O2 -ffat-lto-objects -fno-ident -S - >> o unsigned-extend-1.s (timeout = 800) >> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc .../gcc/testsuite/ >> gcc.target/arm/unsigned-extend-1.c -mcpu=cortex-a7 -mfloat-abi=soft - >> fdiagnostics-plain-output -O2 -ffat-lto-objects -fno-ident -S -o >> unsigned-extend-1.s >> pid is 21626 -21626 >> pid is -1 >> output is status 0 >> check_compile tool: gcc for exceptions_enabled >> doing compile >> Executing on host: .../bin/arm-none-eabi-gcc >> exceptions_enabled21484.cc -mcpu=cortex-a7 -mfloat-abi=soft - >> fdiagnostics-plain-output -Wno- complain-wrong-lang -S -o >> exceptions_enabled21484.s (timeout = 800) >> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc >> exceptions_enabled21484.cc -mcpu=cortex-a7 -mfloat-abi=soft - >> fdiagnostics-plain-output -Wno-complain-wrong-lang -S -o >> exceptions_enabled21484.s >> pid is 21630 -21630 >> pid is -1 >> output is status 0 >> PASS: gcc.target/arm/unsigned-extend-1.c (test for excess errors) >> PASS: gcc.target/arm/unsigned-extend-1.c scan-assembler-not uxtb >> testcase .../gcc/testsuite/gcc.target/arm/arm.exp completed in 1 seconds >> >>> Since you don't add -marm, the test will be compiled in Thumb mode, >>> and still fail? >> >> Since my tests succeeded without it, it didn't think much of it. I can >> add -marm to the do-options just be safe. Should I send a V2 with it >> or can it be approved with that addition? >> >> Kind regards, >> Torbjörn >> >>> >>> Thanks, >>> >>> Christophe >>> >>>> unsigned char foo (unsigned char c) >>>> -- >>>> 2.25.1 >>>> >> >
Hi Torbjorn, On Fri, 24 Jan 2025 at 18:45, Torbjorn SVENSSON <torbjorn.svensson@foss.st.com> wrote: > > Another ping... :) > > Kind regards, > Torbjörn > > On 2024-12-18 18:35, Torbjorn SVENSSON wrote: > > Gentle ping :) > > > > Kind regards, > > Torbjörn > > > > On 2024-11-14 17:16, Torbjorn SVENSSON wrote: > >> > >> > >> On 2024-11-14 16:32, Christophe Lyon wrote: > >>> On Fri, 8 Nov 2024 at 19:49, Torbjörn SVENSSON > >>> <torbjorn.svensson@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.svensson@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? > >> > >> Looking at our CI results, without your patch the test passes on: cortex-m33, m3, m55, m7, v7A in arm mode, v8A in thumb mode, and it fails only on cortex-m0 and m23. Does this match your observations? So your patch will make the test unsupported on m33, m3, m55 and m7 while it currently passes? Am I missing something? Thanks, Christophe > >> > >> For Cortex-M0 (thumb/cpu=cortex-m0/float-abi=soft): > >> > >> Testing arm/unsigned-extend-1.c > >> check_compile tool: gcc for arm_arm_ok > >> doing compile > >> Executing on host: .../bin/arm-none-eabi-gcc arm_arm_ok21114.c - > >> mthumb -mcpu=cortex-m0 -mfloat-abi=soft -fdiagnostics-plain-output > >> -marm - Wno-complain-wrong-lang -S -o arm_arm_ok21114.s > >> (timeout = 800) > >> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc arm_arm_ok21114.c - > >> mthumb -mcpu=cortex-m0 -mfloat-abi=soft -fdiagnostics-plain-output - > >> marm -Wno- complain-wrong-lang -S -o arm_arm_ok21114.s > >> pid is 21254 -21254 > >> cc1: error: target CPU does not support ARM mode > >> pid is -1 > >> close result is 21254 exp6 0 1 > >> output is cc1: error: target CPU does not support ARM mode > >> status 1 > >> compiler exited with status 1 > >> UNSUPPORTED: gcc.target/arm/unsigned-extend-1.c > >> > >> > >> For Cortex-A7 (thumb/cpu=cortex-a7/float-abi=soft): > >> > >> Testing arm/unsigned-extend-1.c > >> check_compile tool: gcc for arm_arm_ok > >> doing compile > >> Executing on host: .../bin/arm-none-eabi-gcc arm_arm_ok21296.c - > >> mthumb -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output > >> -marm - Wno-complain-wrong-lang -S -o arm_arm_ok21296.s > >> (timeout = 800) > >> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc arm_arm_ok21296.c - > >> mthumb -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output - > >> marm -Wno- complain-wrong-lang -S -o arm_arm_ok21296.s > >> pid is 21434 -21434 > >> pid is -1 > >> output is status 0 > >> doing compile > >> Executing on host: .../bin/arm-none-eabi-gcc .../gcc/testsuite/ > >> gcc.target/arm/unsigned-extend-1.c -mthumb -mcpu=cortex-a7 -mfloat- > >> abi=soft -fdiagnostics-plain-output -O2 -ffat-lto-objects -fno- > >> ident -S -o unsigned-extend-1.s (timeout = 800) > >> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc .../gcc/testsuite/ > >> gcc.target/arm/unsigned-extend-1.c -mthumb -mcpu=cortex-a7 -mfloat- > >> abi=soft -fdiagnostics-plain-output -O2 -ffat-lto-objects -fno-ident - > >> S -o unsigned-extend-1.s > >> pid is 21438 -21438 > >> pid is -1 > >> output is status 0 > >> check_compile tool: gcc for exceptions_enabled > >> doing compile > >> Executing on host: .../bin/arm-none-eabi-gcc > >> exceptions_enabled21296.cc -mthumb -mcpu=cortex-a7 -mfloat- > >> abi=soft -fdiagnostics-plain-output -Wno-complain-wrong-lang -S > >> -o exceptions_enabled21296.s (timeout = 800) > >> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc > >> exceptions_enabled21296.cc -mthumb -mcpu=cortex-a7 -mfloat-abi=soft - > >> fdiagnostics-plain-output -Wno-complain-wrong-lang -S -o > >> exceptions_enabled21296.s > >> pid is 21442 -21442 > >> pid is -1 > >> output is status 0 > >> PASS: gcc.target/arm/unsigned-extend-1.c (test for excess errors) > >> PASS: gcc.target/arm/unsigned-extend-1.c scan-assembler-not uxtb > >> > >> For Cortex-A7 (cpu=cortex-a7/float-abi=soft): > >> > >> > >> > >> Testing arm/unsigned-extend-1.c > >> check_compile tool: gcc for arm_arm_ok > >> doing compile > >> Executing on host: .../bin/arm-none-eabi-gcc arm_arm_ok21484.c - > >> mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -marm - > >> Wno-complain-wrong-lang -S -o arm_arm_ok21484.s (timeout = 800) > >> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc arm_arm_ok21484.c - > >> mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -marm -Wno- > >> complain-wrong-lang -S -o arm_arm_ok21484.s > >> pid is 21622 -21622 > >> pid is -1 > >> output is status 0 > >> doing compile > >> Executing on host: .../bin/arm-none-eabi-gcc .../gcc/testsuite/ > >> gcc.target/arm/unsigned-extend-1.c -mcpu=cortex-a7 -mfloat-abi=soft > >> - fdiagnostics-plain-output -O2 -ffat-lto-objects -fno-ident -S - > >> o unsigned-extend-1.s (timeout = 800) > >> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc .../gcc/testsuite/ > >> gcc.target/arm/unsigned-extend-1.c -mcpu=cortex-a7 -mfloat-abi=soft - > >> fdiagnostics-plain-output -O2 -ffat-lto-objects -fno-ident -S -o > >> unsigned-extend-1.s > >> pid is 21626 -21626 > >> pid is -1 > >> output is status 0 > >> check_compile tool: gcc for exceptions_enabled > >> doing compile > >> Executing on host: .../bin/arm-none-eabi-gcc > >> exceptions_enabled21484.cc -mcpu=cortex-a7 -mfloat-abi=soft - > >> fdiagnostics-plain-output -Wno- complain-wrong-lang -S -o > >> exceptions_enabled21484.s (timeout = 800) > >> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc > >> exceptions_enabled21484.cc -mcpu=cortex-a7 -mfloat-abi=soft - > >> fdiagnostics-plain-output -Wno-complain-wrong-lang -S -o > >> exceptions_enabled21484.s > >> pid is 21630 -21630 > >> pid is -1 > >> output is status 0 > >> PASS: gcc.target/arm/unsigned-extend-1.c (test for excess errors) > >> PASS: gcc.target/arm/unsigned-extend-1.c scan-assembler-not uxtb > >> testcase .../gcc/testsuite/gcc.target/arm/arm.exp completed in 1 seconds > >> > >>> Since you don't add -marm, the test will be compiled in Thumb mode, > >>> and still fail? > >> > >> Since my tests succeeded without it, it didn't think much of it. I can > >> add -marm to the do-options just be safe. Should I send a V2 with it > >> or can it be approved with that addition? > >> > >> Kind regards, > >> Torbjörn > >> > >>> > >>> Thanks, > >>> > >>> Christophe > >>> > >>>> unsigned char foo (unsigned char c) > >>>> -- > >>>> 2.25.1 > >>>> > >> > > >
Hi Christophe, On 2025-01-27 13:07, Christophe Lyon wrote: > Hi Torbjorn, > > On Fri, 24 Jan 2025 at 18:45, Torbjorn SVENSSON > <torbjorn.svensson@foss.st.com> wrote: >> >> Another ping... :) >> >> Kind regards, >> Torbjörn >> >> On 2024-12-18 18:35, Torbjorn SVENSSON wrote: >>> Gentle ping :) >>> >>> Kind regards, >>> Torbjörn >>> >>> On 2024-11-14 17:16, Torbjorn SVENSSON wrote: >>>> >>>> >>>> On 2024-11-14 16:32, Christophe Lyon wrote: >>>>> On Fri, 8 Nov 2024 at 19:49, Torbjörn SVENSSON >>>>> <torbjorn.svensson@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.svensson@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? >>>> >>>> > > Looking at our CI results, without your patch the test passes on: > cortex-m33, m3, m55, m7, v7A in arm mode, v8A in thumb mode, > and it fails only on cortex-m0 and m23. > Does this match your observations? Without my patch, I see failure on M0, M0+ and M23. With my patch, it goes to unsupported on all Cortex-M targets that I test. > So your patch will make the test unsupported on m33, m3, m55 and m7 > while it currently passes? > > Am I missing something? I think you might have missed my comment down.... > > Thanks, > > Christophe > >>>> >>>> For Cortex-M0 (thumb/cpu=cortex-m0/float-abi=soft): >>>> >>>> Testing arm/unsigned-extend-1.c >>>> check_compile tool: gcc for arm_arm_ok >>>> doing compile >>>> Executing on host: .../bin/arm-none-eabi-gcc arm_arm_ok21114.c - >>>> mthumb -mcpu=cortex-m0 -mfloat-abi=soft -fdiagnostics-plain-output >>>> -marm - Wno-complain-wrong-lang -S -o arm_arm_ok21114.s >>>> (timeout = 800) >>>> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc arm_arm_ok21114.c - >>>> mthumb -mcpu=cortex-m0 -mfloat-abi=soft -fdiagnostics-plain-output - >>>> marm -Wno- complain-wrong-lang -S -o arm_arm_ok21114.s >>>> pid is 21254 -21254 >>>> cc1: error: target CPU does not support ARM mode >>>> pid is -1 >>>> close result is 21254 exp6 0 1 >>>> output is cc1: error: target CPU does not support ARM mode >>>> status 1 >>>> compiler exited with status 1 >>>> UNSUPPORTED: gcc.target/arm/unsigned-extend-1.c >>>> >>>> >>>> For Cortex-A7 (thumb/cpu=cortex-a7/float-abi=soft): >>>> >>>> Testing arm/unsigned-extend-1.c >>>> check_compile tool: gcc for arm_arm_ok >>>> doing compile >>>> Executing on host: .../bin/arm-none-eabi-gcc arm_arm_ok21296.c - >>>> mthumb -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output >>>> -marm - Wno-complain-wrong-lang -S -o arm_arm_ok21296.s >>>> (timeout = 800) >>>> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc arm_arm_ok21296.c - >>>> mthumb -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output - >>>> marm -Wno- complain-wrong-lang -S -o arm_arm_ok21296.s >>>> pid is 21434 -21434 >>>> pid is -1 >>>> output is status 0 >>>> doing compile >>>> Executing on host: .../bin/arm-none-eabi-gcc .../gcc/testsuite/ >>>> gcc.target/arm/unsigned-extend-1.c -mthumb -mcpu=cortex-a7 -mfloat- >>>> abi=soft -fdiagnostics-plain-output -O2 -ffat-lto-objects -fno- >>>> ident -S -o unsigned-extend-1.s (timeout = 800) >>>> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc .../gcc/testsuite/ >>>> gcc.target/arm/unsigned-extend-1.c -mthumb -mcpu=cortex-a7 -mfloat- >>>> abi=soft -fdiagnostics-plain-output -O2 -ffat-lto-objects -fno-ident - >>>> S -o unsigned-extend-1.s >>>> pid is 21438 -21438 >>>> pid is -1 >>>> output is status 0 >>>> check_compile tool: gcc for exceptions_enabled >>>> doing compile >>>> Executing on host: .../bin/arm-none-eabi-gcc >>>> exceptions_enabled21296.cc -mthumb -mcpu=cortex-a7 -mfloat- >>>> abi=soft -fdiagnostics-plain-output -Wno-complain-wrong-lang -S >>>> -o exceptions_enabled21296.s (timeout = 800) >>>> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc >>>> exceptions_enabled21296.cc -mthumb -mcpu=cortex-a7 -mfloat-abi=soft - >>>> fdiagnostics-plain-output -Wno-complain-wrong-lang -S -o >>>> exceptions_enabled21296.s >>>> pid is 21442 -21442 >>>> pid is -1 >>>> output is status 0 >>>> PASS: gcc.target/arm/unsigned-extend-1.c (test for excess errors) >>>> PASS: gcc.target/arm/unsigned-extend-1.c scan-assembler-not uxtb >>>> >>>> For Cortex-A7 (cpu=cortex-a7/float-abi=soft): >>>> >>>> >>>> >>>> Testing arm/unsigned-extend-1.c >>>> check_compile tool: gcc for arm_arm_ok >>>> doing compile >>>> Executing on host: .../bin/arm-none-eabi-gcc arm_arm_ok21484.c - >>>> mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -marm - >>>> Wno-complain-wrong-lang -S -o arm_arm_ok21484.s (timeout = 800) >>>> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc arm_arm_ok21484.c - >>>> mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -marm -Wno- >>>> complain-wrong-lang -S -o arm_arm_ok21484.s >>>> pid is 21622 -21622 >>>> pid is -1 >>>> output is status 0 >>>> doing compile >>>> Executing on host: .../bin/arm-none-eabi-gcc .../gcc/testsuite/ >>>> gcc.target/arm/unsigned-extend-1.c -mcpu=cortex-a7 -mfloat-abi=soft >>>> - fdiagnostics-plain-output -O2 -ffat-lto-objects -fno-ident -S - >>>> o unsigned-extend-1.s (timeout = 800) >>>> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc .../gcc/testsuite/ >>>> gcc.target/arm/unsigned-extend-1.c -mcpu=cortex-a7 -mfloat-abi=soft - >>>> fdiagnostics-plain-output -O2 -ffat-lto-objects -fno-ident -S -o >>>> unsigned-extend-1.s >>>> pid is 21626 -21626 >>>> pid is -1 >>>> output is status 0 >>>> check_compile tool: gcc for exceptions_enabled >>>> doing compile >>>> Executing on host: .../bin/arm-none-eabi-gcc >>>> exceptions_enabled21484.cc -mcpu=cortex-a7 -mfloat-abi=soft - >>>> fdiagnostics-plain-output -Wno- complain-wrong-lang -S -o >>>> exceptions_enabled21484.s (timeout = 800) >>>> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc >>>> exceptions_enabled21484.cc -mcpu=cortex-a7 -mfloat-abi=soft - >>>> fdiagnostics-plain-output -Wno-complain-wrong-lang -S -o >>>> exceptions_enabled21484.s >>>> pid is 21630 -21630 >>>> pid is -1 >>>> output is status 0 >>>> PASS: gcc.target/arm/unsigned-extend-1.c (test for excess errors) >>>> PASS: gcc.target/arm/unsigned-extend-1.c scan-assembler-not uxtb >>>> testcase .../gcc/testsuite/gcc.target/arm/arm.exp completed in 1 seconds >>>> >>>>> Since you don't add -marm, the test will be compiled in Thumb mode, >>>>> and still fail? >>>> >>>> Since my tests succeeded without it, it didn't think much of it. I can >>>> add -marm to the do-options just be safe. Should I send a V2 with it >>>> or can it be approved with that addition? ... here. While arm_arm_ok is checking that it's possible to use -marm, I suppose we should also add the -marm to the dg-additional-options in the test. Is this enough to have a pass on your CI? Would it be easier for you if I send a V2 with that change? Based on the history, I assumed that it was expected for this test case to be executed in arm mode. I suppose we could do it in thumb2 mode instead or something similar, but not sure if that's better...? Kind regards, Torbjörn >>>> >>>> Kind regards, >>>> Torbjörn >>>> >>>>> >>>>> Thanks, >>>>> >>>>> Christophe >>>>> >>>>>> unsigned char foo (unsigned char c) >>>>>> -- >>>>>> 2.25.1 >>>>>> >>>> >>> >>
On Mon, 27 Jan 2025 at 13:30, Torbjorn SVENSSON <torbjorn.svensson@foss.st.com> wrote: > > Hi Christophe, > > On 2025-01-27 13:07, Christophe Lyon wrote: > > Hi Torbjorn, > > > > On Fri, 24 Jan 2025 at 18:45, Torbjorn SVENSSON > > <torbjorn.svensson@foss.st.com> wrote: > >> > >> Another ping... :) > >> > >> Kind regards, > >> Torbjörn > >> > >> On 2024-12-18 18:35, Torbjorn SVENSSON wrote: > >>> Gentle ping :) > >>> > >>> Kind regards, > >>> Torbjörn > >>> > >>> On 2024-11-14 17:16, Torbjorn SVENSSON wrote: > >>>> > >>>> > >>>> On 2024-11-14 16:32, Christophe Lyon wrote: > >>>>> On Fri, 8 Nov 2024 at 19:49, Torbjörn SVENSSON > >>>>> <torbjorn.svensson@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.svensson@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? > >>>> > >>>> > > > > Looking at our CI results, without your patch the test passes on: > > cortex-m33, m3, m55, m7, v7A in arm mode, v8A in thumb mode, > > and it fails only on cortex-m0 and m23. > > Does this match your observations? > > Without my patch, I see failure on M0, M0+ and M23. > With my patch, it goes to unsupported on all Cortex-M targets that I test. > > > So your patch will make the test unsupported on m33, m3, m55 and m7 > > while it currently passes? > > > > Am I missing something? > > I think you might have missed my comment down.... > > > > > Thanks, > > > > Christophe > > > >>>> > >>>> For Cortex-M0 (thumb/cpu=cortex-m0/float-abi=soft): > >>>> > >>>> Testing arm/unsigned-extend-1.c > >>>> check_compile tool: gcc for arm_arm_ok > >>>> doing compile > >>>> Executing on host: .../bin/arm-none-eabi-gcc arm_arm_ok21114.c - > >>>> mthumb -mcpu=cortex-m0 -mfloat-abi=soft -fdiagnostics-plain-output > >>>> -marm - Wno-complain-wrong-lang -S -o arm_arm_ok21114.s > >>>> (timeout = 800) > >>>> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc arm_arm_ok21114.c - > >>>> mthumb -mcpu=cortex-m0 -mfloat-abi=soft -fdiagnostics-plain-output - > >>>> marm -Wno- complain-wrong-lang -S -o arm_arm_ok21114.s > >>>> pid is 21254 -21254 > >>>> cc1: error: target CPU does not support ARM mode > >>>> pid is -1 > >>>> close result is 21254 exp6 0 1 > >>>> output is cc1: error: target CPU does not support ARM mode > >>>> status 1 > >>>> compiler exited with status 1 > >>>> UNSUPPORTED: gcc.target/arm/unsigned-extend-1.c > >>>> > >>>> > >>>> For Cortex-A7 (thumb/cpu=cortex-a7/float-abi=soft): > >>>> > >>>> Testing arm/unsigned-extend-1.c > >>>> check_compile tool: gcc for arm_arm_ok > >>>> doing compile > >>>> Executing on host: .../bin/arm-none-eabi-gcc arm_arm_ok21296.c - > >>>> mthumb -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output > >>>> -marm - Wno-complain-wrong-lang -S -o arm_arm_ok21296.s > >>>> (timeout = 800) > >>>> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc arm_arm_ok21296.c - > >>>> mthumb -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output - > >>>> marm -Wno- complain-wrong-lang -S -o arm_arm_ok21296.s > >>>> pid is 21434 -21434 > >>>> pid is -1 > >>>> output is status 0 > >>>> doing compile > >>>> Executing on host: .../bin/arm-none-eabi-gcc .../gcc/testsuite/ > >>>> gcc.target/arm/unsigned-extend-1.c -mthumb -mcpu=cortex-a7 -mfloat- > >>>> abi=soft -fdiagnostics-plain-output -O2 -ffat-lto-objects -fno- > >>>> ident -S -o unsigned-extend-1.s (timeout = 800) > >>>> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc .../gcc/testsuite/ > >>>> gcc.target/arm/unsigned-extend-1.c -mthumb -mcpu=cortex-a7 -mfloat- > >>>> abi=soft -fdiagnostics-plain-output -O2 -ffat-lto-objects -fno-ident - > >>>> S -o unsigned-extend-1.s > >>>> pid is 21438 -21438 > >>>> pid is -1 > >>>> output is status 0 > >>>> check_compile tool: gcc for exceptions_enabled > >>>> doing compile > >>>> Executing on host: .../bin/arm-none-eabi-gcc > >>>> exceptions_enabled21296.cc -mthumb -mcpu=cortex-a7 -mfloat- > >>>> abi=soft -fdiagnostics-plain-output -Wno-complain-wrong-lang -S > >>>> -o exceptions_enabled21296.s (timeout = 800) > >>>> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc > >>>> exceptions_enabled21296.cc -mthumb -mcpu=cortex-a7 -mfloat-abi=soft - > >>>> fdiagnostics-plain-output -Wno-complain-wrong-lang -S -o > >>>> exceptions_enabled21296.s > >>>> pid is 21442 -21442 > >>>> pid is -1 > >>>> output is status 0 > >>>> PASS: gcc.target/arm/unsigned-extend-1.c (test for excess errors) > >>>> PASS: gcc.target/arm/unsigned-extend-1.c scan-assembler-not uxtb > >>>> > >>>> For Cortex-A7 (cpu=cortex-a7/float-abi=soft): > >>>> > >>>> > >>>> > >>>> Testing arm/unsigned-extend-1.c > >>>> check_compile tool: gcc for arm_arm_ok > >>>> doing compile > >>>> Executing on host: .../bin/arm-none-eabi-gcc arm_arm_ok21484.c - > >>>> mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -marm - > >>>> Wno-complain-wrong-lang -S -o arm_arm_ok21484.s (timeout = 800) > >>>> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc arm_arm_ok21484.c - > >>>> mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -marm -Wno- > >>>> complain-wrong-lang -S -o arm_arm_ok21484.s > >>>> pid is 21622 -21622 > >>>> pid is -1 > >>>> output is status 0 > >>>> doing compile > >>>> Executing on host: .../bin/arm-none-eabi-gcc .../gcc/testsuite/ > >>>> gcc.target/arm/unsigned-extend-1.c -mcpu=cortex-a7 -mfloat-abi=soft > >>>> - fdiagnostics-plain-output -O2 -ffat-lto-objects -fno-ident -S - > >>>> o unsigned-extend-1.s (timeout = 800) > >>>> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc .../gcc/testsuite/ > >>>> gcc.target/arm/unsigned-extend-1.c -mcpu=cortex-a7 -mfloat-abi=soft - > >>>> fdiagnostics-plain-output -O2 -ffat-lto-objects -fno-ident -S -o > >>>> unsigned-extend-1.s > >>>> pid is 21626 -21626 > >>>> pid is -1 > >>>> output is status 0 > >>>> check_compile tool: gcc for exceptions_enabled > >>>> doing compile > >>>> Executing on host: .../bin/arm-none-eabi-gcc > >>>> exceptions_enabled21484.cc -mcpu=cortex-a7 -mfloat-abi=soft - > >>>> fdiagnostics-plain-output -Wno- complain-wrong-lang -S -o > >>>> exceptions_enabled21484.s (timeout = 800) > >>>> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc > >>>> exceptions_enabled21484.cc -mcpu=cortex-a7 -mfloat-abi=soft - > >>>> fdiagnostics-plain-output -Wno-complain-wrong-lang -S -o > >>>> exceptions_enabled21484.s > >>>> pid is 21630 -21630 > >>>> pid is -1 > >>>> output is status 0 > >>>> PASS: gcc.target/arm/unsigned-extend-1.c (test for excess errors) > >>>> PASS: gcc.target/arm/unsigned-extend-1.c scan-assembler-not uxtb > >>>> testcase .../gcc/testsuite/gcc.target/arm/arm.exp completed in 1 seconds > >>>> > >>>>> Since you don't add -marm, the test will be compiled in Thumb mode, > >>>>> and still fail? > >>>> > >>>> Since my tests succeeded without it, it didn't think much of it. I can > >>>> add -marm to the do-options just be safe. Should I send a V2 with it > >>>> or can it be approved with that addition? > > ... here. > While arm_arm_ok is checking that it's possible to use -marm, I suppose > we should also add the -marm to the dg-additional-options in the test. > No, I had read this comment :-) > Is this enough to have a pass on your CI? > Would it be easier for you if I send a V2 with that change? I don't expect any impact of the CI side, since the test passes in thumb mode on A-profile anyway. But yes, that would be more consistent.... My question (probably for Richard) is rather: is it OK to lose the PASSes on m3/m7/m33/m55? > > Based on the history, I assumed that it was expected for this test case > to be executed in arm mode. I suppose we could do it in thumb2 mode > instead or something similar, but not sure if that's better...? I'm not sure: the commit messages for this file are not very informative... Just realized that /* { dg-skip-if "" { arm_thumb1 } } */ might do what you want? Thanks, Christophe > > Kind regards, > Torbjörn > > > >>>> > >>>> Kind regards, > >>>> Torbjörn > >>>> > >>>>> > >>>>> Thanks, > >>>>> > >>>>> Christophe > >>>>> > >>>>>> unsigned char foo (unsigned char c) > >>>>>> -- > >>>>>> 2.25.1 > >>>>>> > >>>> > >>> > >> >
On 2025-01-27 14:37, Christophe Lyon wrote: > On Mon, 27 Jan 2025 at 13:30, Torbjorn SVENSSON > <torbjorn.svensson@foss.st.com> wrote: >> >> Hi Christophe, >> >> On 2025-01-27 13:07, Christophe Lyon wrote: >>> Hi Torbjorn, >>> >>> On Fri, 24 Jan 2025 at 18:45, Torbjorn SVENSSON >>> <torbjorn.svensson@foss.st.com> wrote: >>>> >>>> Another ping... :) >>>> >>>> Kind regards, >>>> Torbjörn >>>> >>>> On 2024-12-18 18:35, Torbjorn SVENSSON wrote: >>>>> Gentle ping :) >>>>> >>>>> Kind regards, >>>>> Torbjörn >>>>> >>>>> On 2024-11-14 17:16, Torbjorn SVENSSON wrote: >>>>>> >>>>>> >>>>>> On 2024-11-14 16:32, Christophe Lyon wrote: >>>>>>> On Fri, 8 Nov 2024 at 19:49, Torbjörn SVENSSON >>>>>>> <torbjorn.svensson@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.svensson@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? >>>>>> >>>>>> >>> >>> Looking at our CI results, without your patch the test passes on: >>> cortex-m33, m3, m55, m7, v7A in arm mode, v8A in thumb mode, >>> and it fails only on cortex-m0 and m23. >>> Does this match your observations? >> >> Without my patch, I see failure on M0, M0+ and M23. >> With my patch, it goes to unsupported on all Cortex-M targets that I test. >> >>> So your patch will make the test unsupported on m33, m3, m55 and m7 >>> while it currently passes? >>> >>> Am I missing something? >> >> I think you might have missed my comment down.... >> >>> >>> Thanks, >>> >>> Christophe >>> >>>>>> >>>>>> For Cortex-M0 (thumb/cpu=cortex-m0/float-abi=soft): >>>>>> >>>>>> Testing arm/unsigned-extend-1.c >>>>>> check_compile tool: gcc for arm_arm_ok >>>>>> doing compile >>>>>> Executing on host: .../bin/arm-none-eabi-gcc arm_arm_ok21114.c - >>>>>> mthumb -mcpu=cortex-m0 -mfloat-abi=soft -fdiagnostics-plain-output >>>>>> -marm - Wno-complain-wrong-lang -S -o arm_arm_ok21114.s >>>>>> (timeout = 800) >>>>>> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc arm_arm_ok21114.c - >>>>>> mthumb -mcpu=cortex-m0 -mfloat-abi=soft -fdiagnostics-plain-output - >>>>>> marm -Wno- complain-wrong-lang -S -o arm_arm_ok21114.s >>>>>> pid is 21254 -21254 >>>>>> cc1: error: target CPU does not support ARM mode >>>>>> pid is -1 >>>>>> close result is 21254 exp6 0 1 >>>>>> output is cc1: error: target CPU does not support ARM mode >>>>>> status 1 >>>>>> compiler exited with status 1 >>>>>> UNSUPPORTED: gcc.target/arm/unsigned-extend-1.c >>>>>> >>>>>> >>>>>> For Cortex-A7 (thumb/cpu=cortex-a7/float-abi=soft): >>>>>> >>>>>> Testing arm/unsigned-extend-1.c >>>>>> check_compile tool: gcc for arm_arm_ok >>>>>> doing compile >>>>>> Executing on host: .../bin/arm-none-eabi-gcc arm_arm_ok21296.c - >>>>>> mthumb -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output >>>>>> -marm - Wno-complain-wrong-lang -S -o arm_arm_ok21296.s >>>>>> (timeout = 800) >>>>>> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc arm_arm_ok21296.c - >>>>>> mthumb -mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output - >>>>>> marm -Wno- complain-wrong-lang -S -o arm_arm_ok21296.s >>>>>> pid is 21434 -21434 >>>>>> pid is -1 >>>>>> output is status 0 >>>>>> doing compile >>>>>> Executing on host: .../bin/arm-none-eabi-gcc .../gcc/testsuite/ >>>>>> gcc.target/arm/unsigned-extend-1.c -mthumb -mcpu=cortex-a7 -mfloat- >>>>>> abi=soft -fdiagnostics-plain-output -O2 -ffat-lto-objects -fno- >>>>>> ident -S -o unsigned-extend-1.s (timeout = 800) >>>>>> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc .../gcc/testsuite/ >>>>>> gcc.target/arm/unsigned-extend-1.c -mthumb -mcpu=cortex-a7 -mfloat- >>>>>> abi=soft -fdiagnostics-plain-output -O2 -ffat-lto-objects -fno-ident - >>>>>> S -o unsigned-extend-1.s >>>>>> pid is 21438 -21438 >>>>>> pid is -1 >>>>>> output is status 0 >>>>>> check_compile tool: gcc for exceptions_enabled >>>>>> doing compile >>>>>> Executing on host: .../bin/arm-none-eabi-gcc >>>>>> exceptions_enabled21296.cc -mthumb -mcpu=cortex-a7 -mfloat- >>>>>> abi=soft -fdiagnostics-plain-output -Wno-complain-wrong-lang -S >>>>>> -o exceptions_enabled21296.s (timeout = 800) >>>>>> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc >>>>>> exceptions_enabled21296.cc -mthumb -mcpu=cortex-a7 -mfloat-abi=soft - >>>>>> fdiagnostics-plain-output -Wno-complain-wrong-lang -S -o >>>>>> exceptions_enabled21296.s >>>>>> pid is 21442 -21442 >>>>>> pid is -1 >>>>>> output is status 0 >>>>>> PASS: gcc.target/arm/unsigned-extend-1.c (test for excess errors) >>>>>> PASS: gcc.target/arm/unsigned-extend-1.c scan-assembler-not uxtb >>>>>> >>>>>> For Cortex-A7 (cpu=cortex-a7/float-abi=soft): >>>>>> >>>>>> >>>>>> >>>>>> Testing arm/unsigned-extend-1.c >>>>>> check_compile tool: gcc for arm_arm_ok >>>>>> doing compile >>>>>> Executing on host: .../bin/arm-none-eabi-gcc arm_arm_ok21484.c - >>>>>> mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -marm - >>>>>> Wno-complain-wrong-lang -S -o arm_arm_ok21484.s (timeout = 800) >>>>>> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc arm_arm_ok21484.c - >>>>>> mcpu=cortex-a7 -mfloat-abi=soft -fdiagnostics-plain-output -marm -Wno- >>>>>> complain-wrong-lang -S -o arm_arm_ok21484.s >>>>>> pid is 21622 -21622 >>>>>> pid is -1 >>>>>> output is status 0 >>>>>> doing compile >>>>>> Executing on host: .../bin/arm-none-eabi-gcc .../gcc/testsuite/ >>>>>> gcc.target/arm/unsigned-extend-1.c -mcpu=cortex-a7 -mfloat-abi=soft >>>>>> - fdiagnostics-plain-output -O2 -ffat-lto-objects -fno-ident -S - >>>>>> o unsigned-extend-1.s (timeout = 800) >>>>>> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc .../gcc/testsuite/ >>>>>> gcc.target/arm/unsigned-extend-1.c -mcpu=cortex-a7 -mfloat-abi=soft - >>>>>> fdiagnostics-plain-output -O2 -ffat-lto-objects -fno-ident -S -o >>>>>> unsigned-extend-1.s >>>>>> pid is 21626 -21626 >>>>>> pid is -1 >>>>>> output is status 0 >>>>>> check_compile tool: gcc for exceptions_enabled >>>>>> doing compile >>>>>> Executing on host: .../bin/arm-none-eabi-gcc >>>>>> exceptions_enabled21484.cc -mcpu=cortex-a7 -mfloat-abi=soft - >>>>>> fdiagnostics-plain-output -Wno- complain-wrong-lang -S -o >>>>>> exceptions_enabled21484.s (timeout = 800) >>>>>> spawn -ignore SIGHUP .../bin/arm-none-eabi-gcc >>>>>> exceptions_enabled21484.cc -mcpu=cortex-a7 -mfloat-abi=soft - >>>>>> fdiagnostics-plain-output -Wno-complain-wrong-lang -S -o >>>>>> exceptions_enabled21484.s >>>>>> pid is 21630 -21630 >>>>>> pid is -1 >>>>>> output is status 0 >>>>>> PASS: gcc.target/arm/unsigned-extend-1.c (test for excess errors) >>>>>> PASS: gcc.target/arm/unsigned-extend-1.c scan-assembler-not uxtb >>>>>> testcase .../gcc/testsuite/gcc.target/arm/arm.exp completed in 1 seconds >>>>>> >>>>>>> Since you don't add -marm, the test will be compiled in Thumb mode, >>>>>>> and still fail? >>>>>> >>>>>> Since my tests succeeded without it, it didn't think much of it. I can >>>>>> add -marm to the do-options just be safe. Should I send a V2 with it >>>>>> or can it be approved with that addition? >> >> ... here. >> While arm_arm_ok is checking that it's possible to use -marm, I suppose >> we should also add the -marm to the dg-additional-options in the test. >> > > No, I had read this comment :-) > >> Is this enough to have a pass on your CI? >> Would it be easier for you if I send a V2 with that change? > I don't expect any impact of the CI side, since the test passes in > thumb mode on A-profile anyway. But yes, that would be more > consistent.... > > My question (probably for Richard) is rather: is it OK to lose the > PASSes on m3/m7/m33/m55? > >> >> Based on the history, I assumed that it was expected for this test case >> to be executed in arm mode. I suppose we could do it in thumb2 mode >> instead or something similar, but not sure if that's better...? > I'm not sure: the commit messages for this file are not very informative... > > Just realized that > /* { dg-skip-if "" { arm_thumb1 } } */ > might do what you want? I guess that would work too. The reason why I did not go this way was that the test case was introduced in arm mode and then later changed to be for all targets. What is preferred? To skip the test entirely on thumb1 or have a check that an uxtb instruction is used for thumb1 targets? Kind regards, Torbjörn > > Thanks, > > Christophe > >> >> Kind regards, >> Torbjörn >> >> >>>>>> >>>>>> Kind regards, >>>>>> Torbjörn >>>>>> >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Christophe >>>>>>> >>>>>>>> unsigned char foo (unsigned char c) >>>>>>>> -- >>>>>>>> 2.25.1 >>>>>>>> >>>>>> >>>>> >>>> >>
On 08/11/2024 18:47, Torbjörn SVENSSON 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 > Looking at this code, I think both the uxtb instructions are unnecessary. For the first UXTB. On entry, 'c' is a char (unsigned) so the value is passed by the caller in a 32-bit reg, but range-limited (by the ABI) to values between 0 and 255. We subtract 48 from that, so the range now, is from -48 to 207, but we're going to look at this as an unsigned value, so it's effectively 0..207 or UINT_MAX-48..UINT_MAX. The UXTB instruction then converts the range so that the range becomes 0..255 again (but importantly, the values between UINT_MAX-48 and UINT_MAX are mapped to the range 208..255. We then do an unsigned comparison between that value and the constant 9 to test whether the result is >= 9. Now, importantly, all the values that are in the range 208..255 are >= 9, but were also >= 9 before the UXTB instruction. In effect, the UXTB is completely redundant. The second UXTB is even more egregious. We have 0 in r0 and we then conditionally add 1 to it, so r0 is in the range 0..1. Zero extending that with a UXTB is therefore clearly pointless. So neither of the UXTB instructions should be present, even if generating Thumb1 code. I think the failures are, therefore, real and we should look to fix the compiler rather than 'fix' the scope of the test. R. > 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.svensson@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" } */ > > unsigned char foo (unsigned char c)
On 28/02/2025 16:12, Richard Earnshaw wrote: > On 08/11/2024 18:47, Torbjörn SVENSSON 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 >> > > Looking at this code, I think both the uxtb instructions are unnecessary. > > For the first UXTB. On entry, 'c' is a char (unsigned) so the value is > passed by the caller in a 32-bit reg, but range-limited (by the ABI) to > values between 0 and 255. > We subtract 48 from that, so the range now, is from -48 to 207, but > we're going to look at this as an unsigned value, so it's effectively > 0..207 or UINT_MAX-48..UINT_MAX. > The UXTB instruction then converts the range so that the range becomes > 0..255 again (but importantly, the values between UINT_MAX-48 and > UINT_MAX are mapped to the range 208..255. We then do an unsigned > comparison between that value and the constant 9 to test whether the > result is >= 9. > Now, importantly, all the values that are in the range 208..255 are >= > 9, but were also >= 9 before the UXTB instruction. In effect, the UXTB > is completely redundant. > I said, >= 9 above, but it should be > 9 (hence condition code 'hi'). That does affect the rest of the argument. R. > The second UXTB is even more egregious. We have 0 in r0 and we then > conditionally add 1 to it, so r0 is in the range 0..1. Zero extending > that with a UXTB is therefore clearly pointless. > > So neither of the UXTB instructions should be present, even if > generating Thumb1 code. > > I think the failures are, therefore, real and we should look to fix the > compiler rather than 'fix' the scope of the test. > > R. > >> 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.svensson@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" } */ >> unsigned char foo (unsigned char c) >
On 28/02/2025 16:18, Richard Earnshaw wrote: > On 28/02/2025 16:12, Richard Earnshaw wrote: >> On 08/11/2024 18:47, Torbjörn SVENSSON 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 >>> >> >> Looking at this code, I think both the uxtb instructions are unnecessary. >> >> For the first UXTB. On entry, 'c' is a char (unsigned) so the value is passed by the caller in a 32-bit reg, but range-limited (by the ABI) to values between 0 and 255. >> We subtract 48 from that, so the range now, is from -48 to 207, but we're going to look at this as an unsigned value, so it's effectively 0..207 or UINT_MAX-48..UINT_MAX. >> The UXTB instruction then converts the range so that the range becomes 0..255 again (but importantly, the values between UINT_MAX-48 and UINT_MAX are mapped to the range 208..255. We then do an unsigned comparison between that value and the constant 9 to test whether the result is >= 9. >> Now, importantly, all the values that are in the range 208..255 are >= 9, but were also >= 9 before the UXTB instruction. In effect, the UXTB is completely redundant. >> > I said, >= 9 above, but it should be > 9 (hence condition code 'hi'). That does affect the rest of the argument. > > R. > >> The second UXTB is even more egregious. We have 0 in r0 and we then conditionally add 1 to it, so r0 is in the range 0..1. Zero extending that with a UXTB is therefore clearly pointless. >> >> So neither of the UXTB instructions should be present, even if generating Thumb1 code. >> >> I think the failures are, therefore, real and we should look to fix the compiler rather than 'fix' the scope of the test. >> >> R. >> >>> 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.svensson@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" } */ >>> unsigned char foo (unsigned char c) >> > I've just pushed a patch to eliminate one of the redundant zero-extends. The other is harder to eliminate, so I've adjusted the test to xfail when compiling for thumb1. R.
On 2025-03-03 18:00, Richard Earnshaw wrote: > On 28/02/2025 16:18, Richard Earnshaw wrote: >> On 28/02/2025 16:12, Richard Earnshaw wrote: >>> On 08/11/2024 18:47, Torbjörn SVENSSON 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 >>>> >>> >>> Looking at this code, I think both the uxtb instructions are unnecessary. >>> >>> For the first UXTB. On entry, 'c' is a char (unsigned) so the value is passed by the caller in a 32-bit reg, but range-limited (by the ABI) to values between 0 and 255. >>> We subtract 48 from that, so the range now, is from -48 to 207, but we're going to look at this as an unsigned value, so it's effectively 0..207 or UINT_MAX-48..UINT_MAX. >>> The UXTB instruction then converts the range so that the range becomes 0..255 again (but importantly, the values between UINT_MAX-48 and UINT_MAX are mapped to the range 208..255. We then do an unsigned comparison between that value and the constant 9 to test whether the result is >= 9. >>> Now, importantly, all the values that are in the range 208..255 are >= 9, but were also >= 9 before the UXTB instruction. In effect, the UXTB is completely redundant. >>> >> I said, >= 9 above, but it should be > 9 (hence condition code 'hi'). That does affect the rest of the argument. >> >> R. >> >>> The second UXTB is even more egregious. We have 0 in r0 and we then conditionally add 1 to it, so r0 is in the range 0..1. Zero extending that with a UXTB is therefore clearly pointless. >>> >>> So neither of the UXTB instructions should be present, even if generating Thumb1 code. >>> >>> I think the failures are, therefore, real and we should look to fix the compiler rather than 'fix' the scope of the test. >>> >>> R. >>> >>>> 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.svensson@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" } */ >>>> unsigned char foo (unsigned char c) >>> >> > > I've just pushed a patch to eliminate one of the redundant zero-extends. The other is harder to eliminate, so I've adjusted the test to xfail when compiling for thumb1. Hi Richard, Can this be backported to releases/gcc-14 too? I can do the backport if you just approve it. Kind regards, Torbjörn
On 04/03/2025 14:49, Torbjorn SVENSSON wrote: > > > On 2025-03-03 18:00, Richard Earnshaw wrote: >> On 28/02/2025 16:18, Richard Earnshaw wrote: >>> On 28/02/2025 16:12, Richard Earnshaw wrote: >>>> On 08/11/2024 18:47, Torbjörn SVENSSON 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 >>>>> >>>> >>>> Looking at this code, I think both the uxtb instructions are unnecessary. >>>> >>>> For the first UXTB. On entry, 'c' is a char (unsigned) so the value is passed by the caller in a 32-bit reg, but range-limited (by the ABI) to values between 0 and 255. >>>> We subtract 48 from that, so the range now, is from -48 to 207, but we're going to look at this as an unsigned value, so it's effectively 0..207 or UINT_MAX-48..UINT_MAX. >>>> The UXTB instruction then converts the range so that the range becomes 0..255 again (but importantly, the values between UINT_MAX-48 and UINT_MAX are mapped to the range 208..255. We then do an unsigned comparison between that value and the constant 9 to test whether the result is >= 9. >>>> Now, importantly, all the values that are in the range 208..255 are >= 9, but were also >= 9 before the UXTB instruction. In effect, the UXTB is completely redundant. >>>> >>> I said, >= 9 above, but it should be > 9 (hence condition code 'hi'). That does affect the rest of the argument. >>> >>> R. >>> >>>> The second UXTB is even more egregious. We have 0 in r0 and we then conditionally add 1 to it, so r0 is in the range 0..1. Zero extending that with a UXTB is therefore clearly pointless. >>>> >>>> So neither of the UXTB instructions should be present, even if generating Thumb1 code. >>>> >>>> I think the failures are, therefore, real and we should look to fix the compiler rather than 'fix' the scope of the test. >>>> >>>> R. >>>> >>>>> 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.svensson@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" } */ >>>>> unsigned char foo (unsigned char c) >>>> >>> >> >> I've just pushed a patch to eliminate one of the redundant zero-extends. The other is harder to eliminate, so I've adjusted the test to xfail when compiling for thumb1. > > Hi Richard, > > Can this be backported to releases/gcc-14 too? > I can do the backport if you just approve it. > > Kind regards, > Torbjörn By all means backport the testsuite change, but not the change to thumb1.md, please. R.
On 2025-03-04 16:44, Richard Earnshaw (lists) wrote: > On 04/03/2025 14:49, Torbjorn SVENSSON wrote: >> >> >> On 2025-03-03 18:00, Richard Earnshaw wrote: >>> On 28/02/2025 16:18, Richard Earnshaw wrote: >>>> On 28/02/2025 16:12, Richard Earnshaw wrote: >>>>> On 08/11/2024 18:47, Torbjörn SVENSSON 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 >>>>>> >>>>> >>>>> Looking at this code, I think both the uxtb instructions are unnecessary. >>>>> >>>>> For the first UXTB. On entry, 'c' is a char (unsigned) so the value is passed by the caller in a 32-bit reg, but range-limited (by the ABI) to values between 0 and 255. >>>>> We subtract 48 from that, so the range now, is from -48 to 207, but we're going to look at this as an unsigned value, so it's effectively 0..207 or UINT_MAX-48..UINT_MAX. >>>>> The UXTB instruction then converts the range so that the range becomes 0..255 again (but importantly, the values between UINT_MAX-48 and UINT_MAX are mapped to the range 208..255. We then do an unsigned comparison between that value and the constant 9 to test whether the result is >= 9. >>>>> Now, importantly, all the values that are in the range 208..255 are >= 9, but were also >= 9 before the UXTB instruction. In effect, the UXTB is completely redundant. >>>>> >>>> I said, >= 9 above, but it should be > 9 (hence condition code 'hi'). That does affect the rest of the argument. >>>> >>>> R. >>>> >>>>> The second UXTB is even more egregious. We have 0 in r0 and we then conditionally add 1 to it, so r0 is in the range 0..1. Zero extending that with a UXTB is therefore clearly pointless. >>>>> >>>>> So neither of the UXTB instructions should be present, even if generating Thumb1 code. >>>>> >>>>> I think the failures are, therefore, real and we should look to fix the compiler rather than 'fix' the scope of the test. >>>>> >>>>> R. >>>>> >>>>>> 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.svensson@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" } */ >>>>>> unsigned char foo (unsigned char c) >>>>> >>>> >>> >>> I've just pushed a patch to eliminate one of the redundant zero-extends. The other is harder to eliminate, so I've adjusted the test to xfail when compiling for thumb1. >> >> Hi Richard, >> >> Can this be backported to releases/gcc-14 too? >> I can do the backport if you just approve it. >> >> Kind regards, >> Torbjörn > > By all means backport the testsuite change, but not the change to thumb1.md, please. Partial backport done in r14.2.0-853-g7fb1d7bff18. Kind regards, Torbjörn
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" } */ unsigned char foo (unsigned char c)
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.svensson@foss.st.com> --- gcc/testsuite/gcc.target/arm/unsigned-extend-1.c | 1 + 1 file changed, 1 insertion(+)