public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Patrick O'Neill <patrick@rivosinc.com>
To: Palmer Dabbelt <palmer@dabbelt.com>, jeffreyalaw@gmail.com
Cc: best124612@gmail.com, gcc-patches@gcc.gnu.org,
	Kito Cheng <kito.cheng@gmail.com>
Subject: Re: [RFC][V2] RISC-V: Support -mcmodel=large.
Date: Wed, 20 Dec 2023 13:13:50 -0800	[thread overview]
Message-ID: <60bda519-e391-447a-affe-75037e189a46@rivosinc.com> (raw)
In-Reply-To: <mhng-df938432-117a-4c79-b2b4-4f879ca494ac@palmer-ri-x1c9a>


On 12/20/23 10:41, Palmer Dabbelt wrote:
> On Wed, 20 Dec 2023 10:25:00 PST (-0800), jeffreyalaw@gmail.com wrote:
>>
>>
>> On 12/20/23 11:21, Palmer Dabbelt wrote:
>>
>>>> Yea, the implementation relies largely on just pushing stuff into the
>>>> constant pool, so we're largely independent ABI stuff with the likely
>>>> exception being relocations.
>>>
>>> Ya, but I think we'd only need the relocations if we were going to try
>>> relaxing stuff.  We'd kicked around some ideas there: we could
>>> de-duplicate constant pools or inline smaller constants. That's all way
>>> to complex to try and get into this upcoming binutils release, though
>>> (doubly so with this LEB128 ABI break we're still trying to deal with).
>> Agreed.  And note that de-duplication is mostly implemented without need
>> for the target to do anything.  I was kindof amazed to see some of the
>> places it kicked in on other ports I've worked with.
>
> I think all we'd need from GCC is some way to get the "this load is a 
> constant pool address that can be messed with" relocation in there, 
> the linker would do all the heavy lifting.  That's probably just a new 
> assembler pseudo, so pretty much nothing on the compiler side of things.
>
>>>> In theory (and I did not test this), it should be possible to use 
>>>> large
>>>> code model codegen in a smaller mode and it should interoperate.  I
>>>> seriously pondered doing that as an additional test, then figured I 
>>>> had
>>>> other higher priority items on my list.
>>>
>>> IMO we should test that.  At least the common case of a medlow libc
>>> linked into medany programs should be easy.
>>>
>>> +Patrick: let's add some configs to the CI for this?
>> I was pondering a one-off by turning on the large code model by default,
>> then doing a bootstrap & regression test in QEMU.  But integrated into
>> CI is even better.
>
> OK, let's just add it to CI -- it'd be essentially the same testing, 
> just it'll stick around.
ACK :)

Patrick
>
>>
>> Jeff

      reply	other threads:[~2023-12-20 21:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-10  9:00 KuanLin Chen
2023-11-10  9:10 ` KuanLin Chen
2023-12-17 19:15   ` Jeff Law
2023-12-18  7:46     ` KuanLin Chen
2023-12-20 17:55       ` Jeff Law
2023-12-20 18:05         ` Palmer Dabbelt
2023-12-20 18:12           ` Jeff Law
2023-12-20 18:21             ` Palmer Dabbelt
2023-12-20 18:25               ` Jeff Law
2023-12-20 18:41                 ` Palmer Dabbelt
2023-12-20 21:13                   ` Patrick O'Neill [this message]

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=60bda519-e391-447a-affe-75037e189a46@rivosinc.com \
    --to=patrick@rivosinc.com \
    --cc=best124612@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=kito.cheng@gmail.com \
    --cc=palmer@dabbelt.com \
    /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).