public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: LuluCheng <chenglulu@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-3571] Libvtv: Add loongarch support.
Date: Mon, 31 Oct 2022 09:35:56 +0000 (GMT)	[thread overview]
Message-ID: <20221031093556.6AE183856251@sourceware.org> (raw)

https://gcc.gnu.org/g:27b9e1158b3e819ba77367b6b0d6161186b0ca7f

commit r13-3571-g27b9e1158b3e819ba77367b6b0d6161186b0ca7f
Author: Lulu Cheng <chenglulu@loongson.cn>
Date:   Tue Sep 27 15:28:43 2022 +0800

    Libvtv: Add loongarch support.
    
    The loongarch64 specification permits page sizes of 4KiB, 16KiB and 64KiB,
    but only 16KiB pages are supported for now.
    
    Co-Authored-By: qijingwen <qijingwen@loongson.cn>
    
    include/ChangeLog:
    
            * vtv-change-permission.h (defined): Determines whether the macro
            __loongarch_lp64 is defined
            (VTV_PAGE_SIZE): Set VTV_PAGE_SIZE to 16KiB for loongarch64.
    
    libvtv/ChangeLog:
    
            * configure.tgt: Add loongarch support.

Diff:
---
 include/vtv-change-permission.h | 4 ++++
 libvtv/configure.tgt            | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/include/vtv-change-permission.h b/include/vtv-change-permission.h
index 70bdad92bca..e7b9294a081 100644
--- a/include/vtv-change-permission.h
+++ b/include/vtv-change-permission.h
@@ -48,6 +48,10 @@ extern void __VLTChangePermission (int);
 #else 
 #if defined(__sun__) && defined(__svr4__) && defined(__sparc__)
 #define VTV_PAGE_SIZE 8192
+#elif defined(__loongarch_lp64)
+/* The page size is configurable by the kernel to be 4, 16 or 64 KiB.
+   For now, only the default page size of 16KiB is supported.  */
+#define VTV_PAGE_SIZE 16384
 #else
 #define VTV_PAGE_SIZE 4096
 #endif
diff --git a/libvtv/configure.tgt b/libvtv/configure.tgt
index aa2a3f675b8..6cdd1e97ab1 100644
--- a/libvtv/configure.tgt
+++ b/libvtv/configure.tgt
@@ -50,6 +50,9 @@ case "${target}" in
 	;;
   x86_64-*-darwin[1]* | i?86-*-darwin[1]*)
 	;;
+  loongarch*-*-linux*)
+	VTV_SUPPORTED=yes
+	;;
   *)
 	;;
 esac

                 reply	other threads:[~2022-10-31  9:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221031093556.6AE183856251@sourceware.org \
    --to=chenglulu@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).