From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) by sourceware.org (Postfix) with ESMTPS id 6A4BC3858C41 for ; Wed, 20 Dec 2023 18:25:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6A4BC3858C41 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6A4BC3858C41 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703096704; cv=none; b=SFIyZl+oJHwNy0urboaoECEhCOWOFJuNoY2tH7RjhFSpEx8oYpwiO18+Uf8/Rm2ef0tbS9dOOqTxePlKmSP/q0BCIPSxv7Mntn9i5z8SWAqGXV2lw8ZyTNCp7xRyEULFCEX5UPYRwHpfDc4L+hwZAdN9oLNu1Q/WuPZyssse35E= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703096704; c=relaxed/simple; bh=Fl9FHbCymg8cWV6wg1BDRuTd2tpxn1A2htdRijEDP2A=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=rru2BEnMQcsnBxs6cD65uba5a7fbF9wLDN2xtzXcQ7bGAahRdumxuK1w2XRIyND3o9fAoSFE26+KoLMLxL4D8508O1jQqteR+CgdWK6WMieH7m4EGONs6S8rIrAoOCMMgxo5I+9dKiwYyCVebhIqzmiz3rWH7ltWWWbCCQhdHWo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-il1-x131.google.com with SMTP id e9e14a558f8ab-35d67aa6951so2821105ab.0 for ; Wed, 20 Dec 2023 10:25:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703096702; x=1703701502; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=cGdj/9cV1ugKXP1wYDc7/+U1OeYow2ID/DOjS7OD8fw=; b=QCZjmixsGfRsztRSwMIu3VMqFwRk0X6rVdAZzW/TdI2x2wI3uUBKipFm+uhha61Gpv pfHSoxuhC9GAKbLMRX02RraCNEfTeQ5nXlH7wuGH/Wlq04dMzROeMIAEfScz7ym4m/1g YpDUT+3OWuxMGZoyTH7F4oETUSToe8n5Ks8g9fGP9WWPndiH8axQgRs2slvUjmX4/J8K uc08VeTzbUhVQvCfHtPSnI3rsvfMGrm3fYUp2F9iClMC/n2zIkCtHzCUUKuZ1vBrUgF8 1GPV5Qm0neVxgex9sHWhYerXekTLvLTBLq6/65BvNejzvbQ79wptCTyQTj3poC9njFzo CYww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703096702; x=1703701502; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cGdj/9cV1ugKXP1wYDc7/+U1OeYow2ID/DOjS7OD8fw=; b=ec4VhB9h9JMpE0a2EgBXTkK6QMylmbtj0f3L5xpk624cqYz4wyCGSXQz229cYpF3X+ jCDF7SUGS1jJf9KaojSlcl4LNTtG1YLtSy+GT78qKlwpq0oY401JQEcAXbJcrOY85Ofe l2pgX8WXae5aRCYfM0Fdvi7nBRlRPi1xKoOC+PqRc58yvQHZK5Tbiw8hffJf5QS13vA3 96X4DI30k/tlxJZrsPrEZM/0yDC5EAt8rW6VPRWg+mkw5SF+P5HJc5gZTjA48gPqSx7Q 4ap8gGZuhdoArC9SjLX4GHFlu18QXltj7sjXw5U9EG4JLB/QURt4j0gc1cHF4v2UBwZc cl7A== X-Gm-Message-State: AOJu0Yz0s+qFtFBoyk5ON5BCh/HQ/ASZZzP9K8TgpDh+DWs46EkX1+fE AaZlVdZK7/2r2TzSruqkdhiv1XeW2XI= X-Google-Smtp-Source: AGHT+IEEIdE+jpqUY+tq3XwWLp6ikZjYoTFgx2m9jrM7jXdpLmtuMEj/WQXmsWrp3VeAULx4lIvSYA== X-Received: by 2002:a05:6e02:34a0:b0:35c:789a:ccb6 with SMTP id bp32-20020a056e0234a000b0035c789accb6mr3205591ilb.5.1703096702674; Wed, 20 Dec 2023 10:25:02 -0800 (PST) Received: from [172.31.0.109] ([136.36.72.243]) by smtp.gmail.com with ESMTPSA id be1-20020a056e02304100b00351287f213bsm17683ilb.14.2023.12.20.10.25.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 20 Dec 2023 10:25:02 -0800 (PST) Message-ID: Date: Wed, 20 Dec 2023 11:25:00 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC][V2] RISC-V: Support -mcmodel=large. Content-Language: en-US To: Palmer Dabbelt , Patrick O'Neill Cc: best124612@gmail.com, gcc-patches@gcc.gnu.org, Kito Cheng References: From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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. >> 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. Jeff