From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id 0D1593858C2C for ; Fri, 25 Aug 2023 15:32:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0D1593858C2C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dabbelt.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dabbelt.com Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-68c0d886ea0so437730b3a.2 for ; Fri, 25 Aug 2023 08:32:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20221208.gappssmtp.com; s=20221208; t=1692977545; x=1693582345; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=ta1pPNHcOZhx+e7iM/LGaM1IeBXQ+JEW+m8U8orz464=; b=BMScTHtt0MAujt+D4he6ptkMtli0IhR7mbRZ9UrygirV/pEWTVSh+H4siUMlv8X9fZ 2TqP7JNnNVveuku30jEOVACbGPs6h7z9VFVKMQWdrFp6ohIq/kKmkSKQ50mjv6Fsq5K3 zrNcvWgPBkn9jVYkZw+glPFjmrrWQDW86QdKQohw1uGTG9UpxWaC13KlZcldKSLNxPWw ErnWazYtH/lJcjBA+EDyxsGDN5L5tYamX5siKPXos7w8FPj44cnK8yYju+kqHXaE9WQU Rvus3jkB2YTaqEo9OmzyMVqJYB5fC1bVm2J0dkaYW2bB8QuRGomSiRRqAoZFISwtBNZg Bvow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692977545; x=1693582345; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ta1pPNHcOZhx+e7iM/LGaM1IeBXQ+JEW+m8U8orz464=; b=iYarNVX+Z45LnRnssox8nkWNRRci+rl3MBTBifHWkRB3I2rIP/cMFR7ptshdd9xzUW wWm7DgUIamDabLwBtY0NLL7qbidAFIZLYuLEumQJWsDDXnxhwY5k/lXgxGEfEDuGtpz1 lLFHofJigOAY7VtIIY3/EM/BTbx6wEbwPiBxo9byaWaJr7n3cPFE8RIez3MtBNv+v4h8 RURdNesW6p/Fp/NRzxENhVgl8xw/K9RmU4NAmFiZAITIQGDMVUC6GTCiBrVpURrroAGK t7/8AHazFx3kFefNVThNgh6/W73epXPEP7Oi0w5MSMTslhqbtoPPDBdmLJktEW8mxcw4 81ag== X-Gm-Message-State: AOJu0Yze3jVkeUYB8q4v86Mwqa93b21w0iSgKRHaIUz3S0KFMWnH0UFA xFVZzyCY9DVvqK0crwNWAlyGrw== X-Google-Smtp-Source: AGHT+IFyCD+UlNyZwC/nrbxBqLoZ1xAp+slh/vflHrhzDQpEN92APtirz9Cp2CQ3s6ZaDe1tVinSEg== X-Received: by 2002:a05:6a20:938d:b0:129:d944:2e65 with SMTP id x13-20020a056a20938d00b00129d9442e65mr25263538pzh.13.1692977544859; Fri, 25 Aug 2023 08:32:24 -0700 (PDT) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id k12-20020aa7820c000000b0068beb77468esm1711895pfi.0.2023.08.25.08.32.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 08:32:24 -0700 (PDT) Date: Fri, 25 Aug 2023 08:32:24 -0700 (PDT) X-Google-Original-Date: Fri, 25 Aug 2023 08:32:21 PDT (-0700) Subject: Re: P.S. Follow up to my last post In-Reply-To: CC: jacob@jacob.remcomp.fr, jbeulich@suse.com, binutils@sourceware.org From: Palmer Dabbelt To: jacob@jacob.remcomp.fr Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP 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 Fri, 25 Aug 2023 07:12:39 PDT (-0700), jacob@jacob.remcomp.fr wrote: > OF COURSE « march » is mentioned. But -march=rv64gc_zbb is NOT. > > Where please give me a link) that option is mentioned? > > It is NOT mentioned in > > https://gcc.gnu.org/onlinedocs/gcc/RISC-V-Options.html The "-march" argument is documented int the "-march" section of the argument documentation, specifically: -march=ISA-string Generate code for given RISC-V ISA (e.g. ‘rv64im’). ISA strings must be lower-case. Examples include ‘rv64i’, ‘rv32g’, ‘rv32e’, and ‘rv32imaf’. When -march= is not specified, use the setting from -mcpu. If both -march and -mcpu= are not specified, the default for this argument is system dependent, users who want a specific architecture extensions should specify one explicitly. Pretty much every port has a "-march" argument to control the subtarget to generate code for. It's true that the GCC docs for RISC-V's -march should be improved (there's even an unfinished patch out to do it, you're more than welcome to finish it), but the argument itself is definately documented. Those are all GCC problems, though. I suppose we could improve the binutils -march documentation as well, it'd essentially just be a duplicate of the GCC docs (aside from some quirks like Zihintpause). > The idea that the compiler could figure out the processor it is running on it is completely far fetched isn’t it? > > Jacob > > > >> Le 25 août 2023 à 15:07, jacob navia a écrit : >> >> OK, there is no bug, I didn’t expect anything else. >> >> SO: >> >> To use all the instruction of the processor he/she is running on, the user should: >> >> 1)Be aware that gcc doesn’t see crucial instructions of the processor by verifying its assembler output. >> >> 2) Be aware that there is an (undocumented) option -march… that will enable the assembler and the compiler to generate all the instructions of the current processor. >> >> Well, there is NO BUG! >> >> This is by design then. >> >> Thank you very much. >> >> Jacob >> >> >> >>> Le 25 août 2023 à 14:00, Jan Beulich a écrit : >>> >>> On 25.08.2023 13:52, jacob navia wrote: >>>> The lack of the Ebb instructions is CRUCIAL for performance when accessing tables / arrays! >>>> This instructions allow to combine an addition and a shift by 1, 2 or 3, to access tables of shorts, ints or doubles. >>>> This speeds up the access to tables enormously and would allow gcc to generate much better code. >>> >>> Since you're writing to binutils@, you may want to also mention what gas >>> bug you think you see. So far (also in the other mail) you've talked of >>> only gcc. If you meant to say that like in gcc you need to enable use of >>> the instructions in gas, then yes, that's the way the RISC-V assembler >>> works (like e.g. also the PPC one, but unlike e.g. the x86 one). >>> >>> Jan >>