2

HELP
Why does gcc fails to compile?

main.c:10:1: error: unrecognizable insn:
10 | }
| ^
(insn/f 18 4 19 (set (mem:SI (pre_dec:SI (reg:SI 1 bx)) [0 S4 A32])
(reg:HI 0 ax)) "main.c":8:1 -1
(nil))
during RTL pass: shorten
main.c:10:1: internal compiler error: in insn_default_length, at insn-attrtab.c:221
0x61f93f _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
../../gcc/rtl-error.c:108
0x61f95b _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
../../gcc/rtl-error.c:116
0x742291 insn_default_length(rtx_insn*)
/home/user/Documents/gcc/build-d16i/gcc/insn-attrtab.c:221
0x9ee716 shorten_branches(rtx_insn*)
../../gcc/final.c:1118
0x9ee78f rest_of_handle_shorten_branches
../../gcc/final.c:4753
0x9ee78f execute
../../gcc/final.c:4782

Comments
  • 0
    Im trying to port gcc to a new architecture, the compiler builds, but it is unusable.
  • 3
    Because it not werks
  • 0
    @electrineer Duh, but is there a way to fix it?
  • 2
    Sorry, Ich nyet speaking assembly/c
  • 1
    Lkml is a better venue for this question. Send it to either linux-kernel@vger.kernel.org, cc gcc@vger.kernel.org.
  • 0
    @SortOfTested Thanks, are they like stackoverflow? I don't want to get yelled at.
  • 2
    @Bybit260 they will help you, not yell at you.
  • 0
    Damn, I was really dumb. I had to provide extended RTL templates to support the 16bits of my target architecture. I had the ignorance of not knowing that GCC only supports 32bits and 64bits. Meaning that I can only go as low as 32bits without doing some hacking. The issue here is that I provided templates without knowing that they work on 32bits+ operations and also because my registers were 16bits wide GCC failed to match the correct templates. So I had to extend the GCC templates that I provided to support 16bits, hence doing some hacking on the backend side.
Add Comment