From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id 2A5993858C50 for ; Mon, 28 Mar 2022 22:19:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2A5993858C50 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pf1-x430.google.com with SMTP id w7so11436732pfu.11 for ; Mon, 28 Mar 2022 15:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=RAYFoauXiXa74v8kzVsr7gvf8Q+nYZTuZFHhxttruIs=; b=3lKsfYW7dE30PtDAv+BEutIo5s3czfBe0G22oLd20WM5AXnPdcc+By9TOem4eYDTL3 7/4FkdIMAg+8uDzKOhgVSRDYhGn/cJ+JBaLIa7pAI+d3x7RsykwcgCzhTgxM1SG/fAo7 EYUosRvscDJ4MZGngAoS+Vic6HodVdy/W/w/RMa3IAQkaPBE0r5emhUDIdH2ZGfRBIL7 cOH98IeYelCyD1iWn6KGhlRe51G7vV+qkhZ+DD+QOjUhrqc5U4fX8isTpjLrzlhNCDei RRFQBJfBo/zu4bSbRmCL9T1UsfotbqR8PUyGi1MPyLMtLAJVLnfTsSNkw8u/nCXp7DyA L4ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=RAYFoauXiXa74v8kzVsr7gvf8Q+nYZTuZFHhxttruIs=; b=XSSvU6HP450o9wUZrMQdc0t8PVWiqSoEada2OUh1jV4jQPycAYeDs8ijccWR4juxhu Ne5xGj9glWC5/xxQUfNB3YFb3poM2YwX/uZv/KrbgKqr7jvFQOWlmRIDTbrOMakinGtZ O8cv7Wg/R81pwPbTA4Gzc3Ob2EcpLQNyL1UgA2q1mKNGyd2e1L8CU11dE4RQvoUsQQG1 Enyi1gHqUBcuY5J1yg4gbFuRWbzrvbngUJTJzJMTT6vNUszy0ZG8FbR3NHYcTnPObrC0 dusZMaKbKE76SPFQo6rUZfRsEQEVG48siaZCGp49UIHamuLf//PCxXGl4Za0jn6Jq5W9 XqGQ== X-Gm-Message-State: AOAM5321GzTDizWw72SkR6rqICg52Faoj6mw3NgvyhTSDQ885W+DU1i3 ctDNfKJXN21R4yJJG3omm2KHoQ== X-Google-Smtp-Source: ABdhPJwMHxQQKHGY++ykopPSGln1ejoIs89eQXNXsX43Ll1pn8Bol1AEuFTGDA8ZavoBzM3ReIH0xg== X-Received: by 2002:a05:6a00:887:b0:4f2:6d3f:5b53 with SMTP id q7-20020a056a00088700b004f26d3f5b53mr25330501pfj.21.1648505983733; Mon, 28 Mar 2022 15:19:43 -0700 (PDT) Received: from [10.0.17.150] ([12.3.194.138]) by smtp.gmail.com with ESMTPSA id x2-20020a63aa42000000b0038265eb2495sm13766696pgo.88.2022.03.28.15.19.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Mar 2022 15:19:43 -0700 (PDT) Message-ID: <1c93855c-3a4c-3877-844b-ff3bac7ce2c7@rivosinc.com> Date: Mon, 28 Mar 2022 15:19:41 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [RFC] RISCV: Align using RVC insns Content-Language: en-US To: Jan Beulich Cc: gnu-toolchain@rivosinc.com, binutils@sourceware.org References: <20220325231543.1505904-1-patrick@rivosinc.com> From: Patrick O'Neill In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2022 22:19:49 -0000 On 3/28/22 00:54, Jan Beulich wrote: > On 26.03.2022 00:15, Patrick O'Neill wrote: >> Currently, .align and .balign directives only use nops to achieve >> alignment. On RVC targets, the linker can selectively compress >> instructions to achieve alignment without introducing nops. >> >> This increases the code size of unlinked binaries since instruction >> compression is deferred to the linker. Linked binaries with align >> directives may be smaller/run faster due to less nops. >> >> Binaries without align directives should be unaffected by this change. >> >> This change requires adding a reloc for compressable instructions. The >> addend of that reloc stores the compressed instruction's opcode. >> >> Signed-off-by: Patrick O'Neill > May I ask where the specification for this lives? I've just pulled down > the latest version of the psABI, but that doesn't even mention the new > relocation type you use here. Going over > https://github.com/riscv-non-isa/riscv-elf-psabi-doc/issues also didn't > turn up anything obvious. > > Jan > Jan, Thank you for the link, I just opened a pull request proposing the addition of this relocation type. Patrick