bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Cc: Sun Haiyong <youbest@sina.com>
Subject: Re: [PATCH] stack-direction: Add support for loongarch CPU
Date: Sat, 04 Sep 2021 15:16:34 +0200	[thread overview]
Message-ID: <4764447.07ICAnoMbH@omega> (raw)
In-Reply-To: <20210831045126.11647-1-youbest@sina.com>

Hi,

Sun Haiyong wrote:
> * m4/stack-direction.m4 (SV_STACK_DIRECTION): When the CPU is loongarch,
> set "sv_cv_stack_direction" to "-1" .

Thanks for the patch. Do you know a document which explains the ABI of this
architecture (I mean: register usage, max number of arguments passed in
registers, stack direction, stack alignment, etc.)?

For the moment, I am only able to guess, based on [1] which says that
LoongArch is basically a clone of mips64 with different encoding of the
instructions. So, I've applied your patch.

[1] https://www.phoronix.com/scan.php?page=news_item&px=LoongArch-MIPS-Copy-Kernel


2021-09-04  Sun Haiyong  <youbest@sina.com>  (tiny change)

	sigsegv: Improve cross-compilation support for LoongArch CPU.
	* m4/stack-direction.m4 (SV_STACK_DIRECTION): Assume the stack grows
	down on LoongArch.

diff --git a/m4/stack-direction.m4 b/m4/stack-direction.m4
index 93287254b..e682be97d 100644
--- a/m4/stack-direction.m4
+++ b/m4/stack-direction.m4
@@ -1,4 +1,4 @@
-# stack-direction.m4 serial 7
+# stack-direction.m4 serial 8
 dnl Copyright (C) 2002-2021 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
@@ -32,6 +32,7 @@ AC_DEFUN([SV_STACK_DIRECTION],
       i?86 | x86_64 | \
       i860 | \
       ia64 | \
+      loongarch* | \
       m32r | \
       m68* | \
       m88k | \





  reply	other threads:[~2021-09-04 13:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-31  4:51 [PATCH] stack-direction: Add support for loongarch CPU Sun Haiyong
2021-09-04 13:16 ` Bruno Haible [this message]
2021-09-04 16:41   ` Paul Eggert
2021-09-04 18:44     ` Bruno Haible
  -- strict thread matches above, loose matches on Subject: below --
2021-09-08 15:25 孙海勇

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

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

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

  git send-email \
    --in-reply-to=4764447.07ICAnoMbH@omega \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    --cc=youbest@sina.com \
    /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).