public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: MegaIng <trampchamp@hotmail.de>
To: Paul Koning <paulkoning@comcast.net>
Cc: gcc@gcc.gnu.org
Subject: Re: Porting to a custom ISA
Date: Tue, 15 Aug 2023 14:49:52 +0200	[thread overview]
Message-ID: <DU0PR03MB97290F0C873CB041133538C2A214A@DU0PR03MB9729.eurprd03.prod.outlook.com> (raw)
In-Reply-To: <FBB49BD5-27C1-4ED6-AD5F-238A9F591107@comcast.net>


On Aug 15, 2023, at 7:37 AM, Paul Koning wrote:

>
>> On Aug 15, 2023, at 7:37 AM, MegaIng via Gcc <gcc@gcc.gnu.org> 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 make sense to me.  Libgcc certainly is fine for 16 bit targets -- after all, GCC supports pdp11 which is such a target.  And while newlib doesn't have pdp11 support I have done some fragments of pdp11 support for it, to give me a way to run the execution part of the GCC test suite.  One of these days I should do a better job.  As far as I know it's entirely doable.
The comment is in msp430.h and rl78.h, line 160. And it appears quite 
common to artifically set `UNITS_PER_WORD` to 4 instead of the correct 2 
or 1 when compiling libgcc accross other backends as well, including 
avr, gcn. Is this out-of-date and no longer required for libgcc?
> pdp11, in GCC, can have either 16 or 32 bit int, it's a compiler option.  Pointers are 16 bits, of course.  And it does support larger types (even 64 bits), expanding into multiple instructions or libgcc calls.  A lot of that is handled by common code; the pdp11.md machine description handles a few of them to optimize those cases beyond what the common code would produce.  If you're doing a 16 bit target you might look at pdp11 for ideas.  One limitation is that right now it does only C, mainly because the object format is a.out rather than ELF.  That could be fixed.
Thank you, I will take a closer look at pdp11.
>
> 	paul

  reply	other threads:[~2023-08-15 12:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-15 11:37 MegaIng
2023-08-15 12:06 ` Richard Biener
2023-08-15 12:48   ` Paul Koning
     [not found]     ` <DU0PR03MB972974FA63A93A6D67754428A214A@DU0PR03MB9729.eurprd03.prod.outlook.com>
     [not found]       ` <D0E7DFB2-A980-4376-8DE4-6936A2714FC9@comcast.net>
2023-08-15 14:38         ` MegaIng
2023-08-21 14:16   ` Georg-Johann Lay
2023-08-15 12:40 ` Paul Koning
2023-08-15 12:49   ` MegaIng [this message]
2023-08-15 13:01     ` Paul Koning
2023-08-15 13:26 ` Jeff Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DU0PR03MB97290F0C873CB041133538C2A214A@DU0PR03MB9729.eurprd03.prod.outlook.com \
    --to=trampchamp@hotmail.de \
    --cc=gcc@gcc.gnu.org \
    --cc=paulkoning@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).