Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Im trying to port gcc to a new architecture, the compiler builds, but it is unusable.
-
Lkml is a better venue for this question. Send it to either linux-kernel@vger.kernel.org, cc gcc@vger.kernel.org.
-
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.
Related Rants
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
question
build
cross compiler
gcc
code