public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/81426] [SH]: unable to find a register to spill in class 'R0_REGS' when building webkit2gtk
       [not found] <bug-81426-4@http.gcc.gnu.org/bugzilla/>
@ 2020-03-08  6:53 ` olegendo at gcc dot gnu.org
  2023-10-16 18:33 ` glaubitz at physik dot fu-berlin.de
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: olegendo at gcc dot gnu.org @ 2020-03-08  6:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81426

Oleg Endo <olegendo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |olegendo at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-03-08
             Status|UNCONFIRMED                 |NEW

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

* [Bug target/81426] [SH]: unable to find a register to spill in class 'R0_REGS' when building webkit2gtk
       [not found] <bug-81426-4@http.gcc.gnu.org/bugzilla/>
  2020-03-08  6:53 ` [Bug target/81426] [SH]: unable to find a register to spill in class 'R0_REGS' when building webkit2gtk olegendo at gcc dot gnu.org
@ 2023-10-16 18:33 ` glaubitz at physik dot fu-berlin.de
  2023-10-16 22:46 ` olegendo at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2023-10-16 18:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81426

--- Comment #11 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
Created attachment 56123
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56123&action=edit
Preprocessed source from building GHC with gcc-13

This is still present in gcc-13, I just ran into it while cross-building the
Haskell compiler GHC for sh4:

"inplace/bin/ghc-stage1" -optc-Wall -optc-Wall -optc-Wextra
-optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations
-optc-Winline -optc-Wpointer-ari
th -optc-Wmissing-noreturn -optc-Wnested-externs -optc-Wredundant-decls
-optc-Wno-aggregate-return -optc-Wno-unused-label -optc-DNOSMP
-optc-fno-strict-aliasing -optc-fno-
common -optc-Irts/dist-install/build/./autogen
-optc-Irts/include/../dist-install/build/include -optc-Irts/include/.
-optc-Irts/. -optc-DCOMPILING_RTS -optc-DFS_NAMESPACE=
rts -optc-Werror=unused-but-set-variable -optc-Wno-error=inline -optc-O2
-optc-fomit-frame-pointer -optc-g -optc-fno-omit-frame-pointer -optc-O0
-optc-g3 -optc-DRtsWay=\"r
ts_thr_debug\" -optc-ffunction-sections -optc-fdata-sections -static
-optc-DTHREADED_RTS -optc-DDEBUG  -H32m -O -lffi -optl-pthread -O0 -H64m -Wall 
-this-unit-id rts -opt
c-DNOSMP -dcmm-lint     -package-env - -i -irts -irts/dist-install/build
-Irts/dist-install/build -irts/dist-install/build/./autogen
-Irts/dist-install/build/./autogen -Ir
ts/include/../dist-install/build/include -Irts/include/. -Irts/.
-optP-DCOMPILING_RTS -optP-DFS_NAMESPACE=rts        -O2 -Wcpp-undef -O0  
-Wnoncanonical-monad-instances  
-c rts/ProfilerReport.c -o rts/dist-install/build/ProfilerReport.thr_debug_o
rts/sm/NonMovingMark.c: In function ‘mark_closure’:

rts/sm/NonMovingMark.c:1763:1: error:
     error: unable to find a register to spill in class ‘R0_REGS’
     1763 | }
          | ^
     |
1763 | }
     | ^

rts/sm/NonMovingMark.c:1763:1: error:  error: this is the insn:
     |
1763 | }
     | ^
(insn 1553 3768 1554 115 (parallel [
            (set (subreg:SI (reg:QI 7 r7 [803]) 0)
                (unspec_volatile:SI [
                        (mem/v:QI (reg/f:SI 3 r3 [orig:299 _160 ] [299]) [-1 
S1 A8])
                        (reg:QI 800 [ MEM[(struct StgStack *)_313].marking ])
                        (reg:QI 5 r5 [orig:802 nonmovingMarkEpoch ] [802])
                    ] UNSPECV_CMPXCHG_1))
            (set (mem/v:QI (reg/f:SI 3 r3 [orig:299 _160 ] [299]) [-1  S1 A8])
                (unspec_volatile:QI [
                        (const_int 0 [0])
                    ] UNSPECV_CMPXCHG_2))
            (set (reg:SI 147 t)
                (unspec_volatile:SI [
                        (const_int 0 [0])
                    ] UNSPECV_CMPXCHG_3))
            (clobber (scratch:SI))
            (clobber (reg:SI 0 r0))
            (clobber (reg:SI 1 r1))

        ]) "rts/include/stg/SMP.h":325:0: error:
    5 405 {atomic_compare_and_swapqi_soft_gusa}
         (expr_list:REG_DEAD (reg:QI 5 r5 [orig:802 nonmovingMarkEpoch ] [802])
            (expr_list:REG_DEAD (reg:QI 800 [ MEM[(struct StgStack
*)_313].marking ])
                (expr_list:REG_DEAD (reg/f:SI 3 r3 [orig:299 _160 ] [299])
                    (expr_list:REG_UNUSED (reg:SI 147 t)
                        (expr_list:REG_UNUSED (reg:SI 1 r1)
                            (expr_list:REG_UNUSED (reg:SI 0 r0)
                                (nil))))))))

rts/sm/NonMovingMark.c:1763:0: error:
     confused by earlier errors, bailing out
     |
1763 | }
     | ^

Attaching the preprocessed source for that.

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

* [Bug target/81426] [SH]: unable to find a register to spill in class 'R0_REGS' when building webkit2gtk
       [not found] <bug-81426-4@http.gcc.gnu.org/bugzilla/>
  2020-03-08  6:53 ` [Bug target/81426] [SH]: unable to find a register to spill in class 'R0_REGS' when building webkit2gtk olegendo at gcc dot gnu.org
  2023-10-16 18:33 ` glaubitz at physik dot fu-berlin.de
@ 2023-10-16 22:46 ` olegendo at gcc dot gnu.org
  2023-10-20  9:43 ` glaubitz at physik dot fu-berlin.de
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: olegendo at gcc dot gnu.org @ 2023-10-16 22:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81426

--- Comment #12 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to John Paul Adrian Glaubitz from comment #11)
> Created attachment 56123 [details]
> Preprocessed source from building GHC with gcc-13
> 
> This is still present in gcc-13, I just ran into it while cross-building the
> Haskell compiler GHC for sh4:
> 

Have you tried using the -mlra option for this build?

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

* [Bug target/81426] [SH]: unable to find a register to spill in class 'R0_REGS' when building webkit2gtk
       [not found] <bug-81426-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2023-10-16 22:46 ` olegendo at gcc dot gnu.org
@ 2023-10-20  9:43 ` glaubitz at physik dot fu-berlin.de
  2024-09-19  9:21 ` glaubitz at physik dot fu-berlin.de
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2023-10-20  9:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81426

--- Comment #13 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
(In reply to Oleg Endo from comment #12)
> > This is still present in gcc-13, I just ran into it while cross-building the
> > Haskell compiler GHC for sh4:
> > 
> 
> Have you tried using the -mlra option for this build?

I have, but for some reason GHC doesn't seem to pass -mlra to the C compiler.

Needs more investigation.

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

* [Bug target/81426] [SH]: unable to find a register to spill in class 'R0_REGS' when building webkit2gtk
       [not found] <bug-81426-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2023-10-20  9:43 ` glaubitz at physik dot fu-berlin.de
@ 2024-09-19  9:21 ` glaubitz at physik dot fu-berlin.de
  2024-09-19 13:08 ` olegendo at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 8+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2024-09-19  9:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81426

--- Comment #14 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
This particular bug is resolved when building with an LRA-enabled gcc-15.

See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212

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

* [Bug target/81426] [SH]: unable to find a register to spill in class 'R0_REGS' when building webkit2gtk
       [not found] <bug-81426-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2024-09-19  9:21 ` glaubitz at physik dot fu-berlin.de
@ 2024-09-19 13:08 ` olegendo at gcc dot gnu.org
  2024-09-19 13:22 ` glaubitz at physik dot fu-berlin.de
  2024-09-19 13:59 ` olegendo at gcc dot gnu.org
  7 siblings, 0 replies; 8+ messages in thread
From: olegendo at gcc dot gnu.org @ 2024-09-19 13:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81426

--- Comment #15 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to John Paul Adrian Glaubitz from comment #14)
> This particular bug is resolved when building with an LRA-enabled gcc-15.
> 
> See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212

That's great!  Is there a way to find out whether the generated code is
correct?  Does it have a runtime testsuite or something like that?

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

* [Bug target/81426] [SH]: unable to find a register to spill in class 'R0_REGS' when building webkit2gtk
       [not found] <bug-81426-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2024-09-19 13:08 ` olegendo at gcc dot gnu.org
@ 2024-09-19 13:22 ` glaubitz at physik dot fu-berlin.de
  2024-09-19 13:59 ` olegendo at gcc dot gnu.org
  7 siblings, 0 replies; 8+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2024-09-19 13:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81426

--- Comment #16 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
(In reply to Oleg Endo from comment #15)
> (In reply to John Paul Adrian Glaubitz from comment #14)
> > This particular bug is resolved when building with an LRA-enabled gcc-15.
> > 
> > See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212
> 
> That's great!  Is there a way to find out whether the generated code is
> correct?  Does it have a runtime testsuite or something like that?

It does. However, I'm currently having unreleated problems with CMake which
means I cannot build the whole project at the moment. I need to debug that
first, but I'm currently busy with my dayjob.

But at least we're seeing some progress here.

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

* [Bug target/81426] [SH]: unable to find a register to spill in class 'R0_REGS' when building webkit2gtk
       [not found] <bug-81426-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2024-09-19 13:22 ` glaubitz at physik dot fu-berlin.de
@ 2024-09-19 13:59 ` olegendo at gcc dot gnu.org
  7 siblings, 0 replies; 8+ messages in thread
From: olegendo at gcc dot gnu.org @ 2024-09-19 13:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81426

--- Comment #17 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to John Paul Adrian Glaubitz from comment #16)

> It does. However, I'm currently having unreleated problems with CMake which
> means I cannot build the whole project at the moment. I need to debug that
> first, but I'm currently busy with my dayjob.
> 
> But at least we're seeing some progress here.

Yes, definitely!

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

end of thread, other threads:[~2024-09-19 13:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-81426-4@http.gcc.gnu.org/bugzilla/>
2020-03-08  6:53 ` [Bug target/81426] [SH]: unable to find a register to spill in class 'R0_REGS' when building webkit2gtk olegendo at gcc dot gnu.org
2023-10-16 18:33 ` glaubitz at physik dot fu-berlin.de
2023-10-16 22:46 ` olegendo at gcc dot gnu.org
2023-10-20  9:43 ` glaubitz at physik dot fu-berlin.de
2024-09-19  9:21 ` glaubitz at physik dot fu-berlin.de
2024-09-19 13:08 ` olegendo at gcc dot gnu.org
2024-09-19 13:22 ` glaubitz at physik dot fu-berlin.de
2024-09-19 13:59 ` olegendo at gcc dot gnu.org

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