From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) by sourceware.org (Postfix) with ESMTPS id 3705C38930C2 for ; Fri, 24 Apr 2020 02:38:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3705C38930C2 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nelson.chu@sifive.com Received: by mail-il1-x144.google.com with SMTP id x2so7877780ilp.13 for ; Thu, 23 Apr 2020 19:38:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=genxSmqeOTeHVqdPl9SCzDeL+rlSrgAQb2Arbt4OG40=; b=dXD2iKNpDLW1p0ahl09oCFxI0wBlnMwS80qB/32nHzlnxcekT3ucpM89MMz5COBowh Q8cEpq2bkprJ/MS5JIDhgi33VgAGBKMb8Cklq3ZTireRz7845QBBwqSjqXfiqWTyCH+W jNw8BwJNJtB1ffco21rvoExkFjvckGwS8WzfnmxlmqloprSNvHvAVUudDCrVl+7VWl0Y QUebi20Oad8Lh3Bas9FdxfUeP43CJtuiTMo/ca2SJ0lMMBLfPLrPrULZ0J+UO0OLAdMt f+ttJjWQUGURKxiaNXXJ5of2sJEh1Y8NYr5WPs7oywwEfZDLXP6S8cTPCVf+Y2Tf2OmY oS3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=genxSmqeOTeHVqdPl9SCzDeL+rlSrgAQb2Arbt4OG40=; b=oOPkGTzdmok7FjXm/RlJwrKvHmlifK6Ac6UeZs2WHCyLmPPNwXMZ+KMRnjw29TC53V Tw5dz/Kit6EDrsFijKG79n80oLtaGGALRgP5e4/X+djfIFU2PmexuOETo4zcBWSpCmS9 VnoqitCeGXKlvmgO/iR8Z6/f3fd+5N3LYsDv3ReJIaN1mlH47lRCNqFcokkktI0UhwZc AOkeQRj/9pNeByLw6NHScHGWxNfpI4Oilc8X4DlvLfydlcNOIrxr8EoJDXDifuBRbtJ7 QLg/6yaCwj2ksUDP3jUxuoGIrmiur2sIm3LGzn5Yv99nJBPl9DyLyA7XvCh8H1pWscWx 7NgQ== X-Gm-Message-State: AGi0Pube/cRvvUoLv+bUVRIM02EbI3BbW9Kqbyhsen49qebiwoglF0s7 rFoZ3U3145roPoeVbq4rRhMiJ4fsvLjAyeziwxdSxA== X-Google-Smtp-Source: APiQypLJQu0wqV7lt8yBHxMuIINjRKIYlsKMd1ZMubXLYn+jz+fZ2I78QOhQ/hbx2FqFOxYXcT01Db2UJtq8ScIjfPQ= X-Received: by 2002:a92:5dc4:: with SMTP id e65mr6609467ilg.161.1587695881643; Thu, 23 Apr 2020 19:38:01 -0700 (PDT) MIME-Version: 1.0 References: <1587208075-2462-4-git-send-email-nelson.chu@sifive.com> In-Reply-To: From: Nelson Chu Date: Fri, 24 Apr 2020 10:37:53 +0800 Message-ID: Subject: Re: [PATCH 3/7] RISC-V: Support new GAS options and configure options to set ISA versions. To: Palmer Dabbelt Cc: Binutils , gdb-patches@sourceware.org, Andrew Waterman , asb@lowrisc.org, Maxim Blinov , Kito Cheng Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 02:38:03 -0000 Hi Palmer, On Fri, Apr 24, 2020 at 6:59 AM Palmer Dabbelt wrote: > > * -mriscv-isa-version =3D > > The syntax of is same as -march option, but without rv32 o= r rv64 > > prefix. There are two reasons that you may need this option, > > > > 1. Some versions of extensions defined in the ISA spec are not matched = to the > > toolchain=E2=80=99s implementation. For example, V-ext is defined to v= ersion 0.7 in > > ISA spec, but we only have implementations for 0.8 and 0.9. Therefore,= you > > have to use this option to choose the correct version for V-ext. > > > > 2. You want to update the version for the specific standard extensions = if the > > version are not set in the ELF arch attributes and -march option. > > I don't buy the argument for this. The V extension stuff isn't relevant:= those > are all draft versions, and this is a perfect reason why we don't want to= take > drafts upstream. When we have a defined V ISA it'll be part of a versio= ned > RISC-V specification and any users that want it can just use at least tha= t ISA > spec. I think I got your point, we all have reached consensus that it's better not to take draft spec upstream. The v-extension might be a little different, the latest released ISA spec defines the v-ext as 0.7, even if the released riscv-v-spec is up to 0.8. According to our consensus, we should accept the 0.8 and 0.9 v-ext on upstream until we have a released ISA spec defining them. Otherwise, we can just accept the 0.7 v-ext for now. I guess that is why we just have v-ext 0.8 and 0.9 on riscv/riscv-binutils-gdb rather than upstream. This makes sense, thank you :) And we can still use -march to choose the version we want, including v-ext. If users use the rvv-0.9.x in riscv/riscv-binutils-gdb, they have to set the v-ext with version 0.9 by -march. Otherwise, we will give them v0p0 if they only set -misa-spec=3D20191213. > For the second argument, why not just provide those via -march? I can bu= y that > it's a pain to build up valid -march strings in build scripts, but this j= ust > fixes a specific instance of that problem (and that's not going to be tha= t > common, as most users just want a single ISA version). Umm I have to think about this again. > I haven't really looked at the code, as dropping this will change the pat= ches pretty drasticly. Yes dropping this need to rewrite the code structure. I must think about that if we can have a better solution to reduce the overhead of -march setting in the build script. Thanks for the suggestions, they are really helpful :) Nelson