From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id BAB8A3858D28 for ; Mon, 8 Jan 2024 12:12:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BAB8A3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BAB8A3858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704715980; cv=none; b=faA3APk3461qx4ZuVkbuaV3IW2nzk7+fKlQ4D94iz7wHRZgzYWCmEUsAoa9LPm5PvBufsFhVCXJf2Zbb04gAlTD9IaRTLrzvPjscWA5oXvOBNDwthf3SqOTXVY51QDLp6swp8z1e7c8Sj2ncs0aVCaOZ8g1i9rz6Xmmo8XxlaGs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704715980; c=relaxed/simple; bh=JuHLP52ZxGgtQLXmyvqv7zTUcAQaZozWKto39Jf0qKQ=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=qaP9hq9c5ZFAJcHlyk2mYvp7vEXs7e5VWop7PgZuPZ3deWn0ckl1KMqwz6UHK2pbEhbZ+xIPBuAhxVV9ZXGf4DUMl52UC75qroklHVhmE0CUewRBruM+yXU4DOqYm0KjDuKPEhJmbIq2phCGEUk1Q3kWq7KoO3bC+TyXyhufrJE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704715978; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=jx1Dl9fwfb7pzZcQoh2cAmeHX0w30HbbXxrfQhHa520=; b=bwQ4QRqRYZ0dpVuZy4efmzVwfXLo5YQCyGN1WtHllatqiBWfgvxFXfFoKwgn+jAMo/1RtO JTbIGWQ3ODk0OSdRtEV6r2g8dy5yjU8NKLUPyAvS4KjdKWjBpbOxjIsxJsA8Vlup2hXkrV Vd4Uzvem7rXaMNxVGMibsltYD4lgm/g= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-205-e_E_VtPBMeiXIkgBuiLvDQ-1; Mon, 08 Jan 2024 07:12:49 -0500 X-MC-Unique: e_E_VtPBMeiXIkgBuiLvDQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C28D483514B; Mon, 8 Jan 2024 12:12:48 +0000 (UTC) Received: from calimero.vinschen.de (unknown [10.39.195.34]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9C8AB2026D66; Mon, 8 Jan 2024 12:12:48 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 7B6D7A808A0; Mon, 8 Jan 2024 13:12:47 +0100 (CET) Date: Mon, 8 Jan 2024 13:12:47 +0100 From: Corinna Vinschen To: Hau Hsu Cc: newlib@sourceware.org, kito.cheng@gmail.com Subject: Re: [PATCH v2] RISC-V: Initialize the jvt CSR Message-ID: Reply-To: newlib@sourceware.org Mail-Followup-To: Hau Hsu , newlib@sourceware.org, kito.cheng@gmail.com References: <20240105070639.404903-1-hau.hsu@sifive.com> MIME-Version: 1.0 In-Reply-To: <20240105070639.404903-1-hau.hsu@sifive.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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 Jan 5 15:06, Hau Hsu wrote: > Set symbol '__jvt_base$' as weak. So if the symbol is not set in the > linker script, the address would be 0. We initialize jvt CSR only if > the address is not 0. > > Also use csr number directly instead of using symbolic name to prevent the > backward incompatible issue. > > psabi reference: > https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/2d770815dc9a8b11e61ea1abd487cb25ee56ad5e/riscv-elf.adoc#table-jump-relaxation > --- > libgloss/riscv/crt0.S | 11 +++++++++++ > 1 file changed, 11 insertions(+) Pushed. Thanks, Corinna