Trying again, hopefully formatted correctly this time, and now including a test
case. Test case fails with original code, passes with patch. Command to execute
test case:
make check-c RUNTESTFLAGS="--target-board='arm-sim/-march=armv5t'
arm.exp=pr117366.c"
gcc/ChangeLog:
* arm.cc: fix
Fixing issue with thumb1 code generation clobbering register. Detailed in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117468
Test case included; run with:
make check-c RUNTESTFLAGS="--target-board='arm-sim/-march=armv5t'
arm.exp=pr117468.c"
gcc/ChangeLog:
* arm.cc: fix thumb1 prologue
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117366 where it was suggested
I send this bug fix as a patch to gcc-patches. I have never submitted to this
alias so I apologize if I am not "doing it right", but here is the diff, and
the Bugzilla ticket has an example written up with good/bad as
d_or_fixed_reg_p (reg_base + n_free) &&
!fixed_reg[reg_base + n_free])))
{
live_regs_mask >>= 1;
n_free++;
> On 06/11/2025 7:13 PM EDT Matt Parks wrote:
>
>
> See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117366 where it was
> suggested I s
This patch fixes PR117468:
ARM thumb1 compilation using -ffixed-reg with r4-r7, without -Os (which
prohibits use of high registers), produces bad high register restoration
code that clobbers the fixed register.
gcc/ChangeLog:
PR target/117468
* arm.cc (thumb1_prologue_unused_call_c
7;ll
> have to wait for Richard (in cc) as he is the maintainer.
> However I have a few comments below:
>
> On Thu, 26 Jun 2025 at 00:57, Matt Parks wrote:
> >
> > Trying again, hopefully formatted correctly this time, and now including a
> > test case. Test case
This patch fixes PR117366:
arm thumb1 epilogue size optimizer violates -ffixed-r4.
gcc/ChangeLog:
PR target/117366
* arm.cc (thumb1_extra_regs_pushed): Take fixed regs into account.
---
diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc
index bde06f3fa86..7bb829dbb04 100
> caused by your mailer.
>
> I manually applied the patch and manually triggered CI, the new test
> passed without regression.
>
> Here is the version I tested, let's wait for Richard's feedback.
>
> Christophe
>
> On Thu, 10 Jul 2025 at 01:27, Matt Parks wrot