Re: Porting to a custom ISA

2023-08-21 Thread Georg-Johann Lay
Am 15.08.23 um 14:06 schrieb Richard Biener via Gcc: On Tue, Aug 15, 2023 at 1:38 PM MegaIng via Gcc wrote: Also, on another backend I saw comments relating to libgcc (or newlib?) not working that well on systems where int is 16bit. Is that still true, and what is the best workaround? You

Re: Porting to a custom ISA

2023-08-15 Thread MegaIng via Gcc
On 2023-08-15 15:30, Paul Koning wrote: On Aug 15, 2023, at 8:56 AM, MegaIng wrote: Am 2023-08-15 um 14:48 schrieb Paul Koning: On Aug 15, 2023, at 8:06 AM, Richard Biener via Gcc wrote: On Tue, Aug 15, 2023 at 1:38 PM MegaIng via Gcc wrote: ... And a bit more concrete with something

Re: Porting to a custom ISA

2023-08-15 Thread Jeff Law via Gcc
On 8/15/23 05:37, MegaIng via Gcc wrote: One of the big challenges I am facing is that for our backend we sometimes support 16bit as the max size a CPU supports, including for pointers, and sometimes 32bit or 64bit. Am I seeing it correctly that POINTER_SIZE has to be a compile time constant

Re: Porting to a custom ISA

2023-08-15 Thread Paul Koning via Gcc
> On Aug 15, 2023, at 8:49 AM, MegaIng wrote: > > > On Aug 15, 2023, at 7:37 AM, Paul Koning wrote: > >> >>> On Aug 15, 2023, at 7:37 AM, MegaIng via Gcc wrote: >>> >>> ... >>> Also, on another backend I saw comments relating to libgcc (or newlib?) not >>> working that well on systems wh

Re: Porting to a custom ISA

2023-08-15 Thread MegaIng via Gcc
On Aug 15, 2023, at 7:37 AM, Paul Koning wrote: On Aug 15, 2023, at 7:37 AM, MegaIng via Gcc wrote: ... Also, on another backend I saw comments relating to libgcc (or newlib?) not working that well on systems where int is 16bit. Is that still true, and what is the best workaround? I hav

Re: Porting to a custom ISA

2023-08-15 Thread Paul Koning via Gcc
> On Aug 15, 2023, at 8:06 AM, Richard Biener via Gcc wrote: > > On Tue, Aug 15, 2023 at 1:38 PM MegaIng via Gcc wrote: >> ... >> And a bit more concrete with something I am having a hard time >> debugging. I am getting errors `invalid_void`, seemingly triggered by an >> absent of `gen_return

Re: Porting to a custom ISA

2023-08-15 Thread Paul Koning via Gcc
> On Aug 15, 2023, at 7:37 AM, MegaIng via Gcc wrote: > > ... > Also, on another backend I saw comments relating to libgcc (or newlib?) not > working that well on systems where int is 16bit. Is that still true, and what > is the best workaround? I haven't seen that comment and it doesn't ma

Re: Porting to a custom ISA

2023-08-15 Thread Richard Biener via Gcc
On Tue, Aug 15, 2023 at 1:38 PM MegaIng via Gcc wrote: > > Hello everyone, > > I am currently in the process of porting gcc to an ISA I designed with a > few others (spec [1]). Using the old ggx/moxie tutorial as a guideline > and looking at the source of other backends, as well as the quite decen

Porting to a custom ISA

2023-08-15 Thread MegaIng via Gcc
Hello everyone, I am currently in the process of porting gcc to an ISA I designed with a few others (spec [1]). Using the old ggx/moxie tutorial as a guideline and looking at the source of other backends, as well as the quite decent gccint document, I managed to get basic programs running (bin