bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] stack-direction: Add support for loongarch CPU


From: 孙海勇
Subject: Re: [PATCH] stack-direction: Add support for loongarch CPU
Date: Wed, 8 Sep 2021 23:25:49 +0800

> -----邮件原件-----
> 发件人: Bruno Haible <bruno@clisp.org>
> 发送时间: 2021年9月4日 21:17
> 收件人: bug-gnulib@gnu.org
> 抄送: Sun Haiyong <youbest@sina.com>
> 主题: Re: [PATCH] stack-direction: Add support for loongarch CPU
> 
> 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.)?
> 
Thanks.

> 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
> 

About LoongArch, see the link:
https://lore.kernel.org/linux-arch/20210903095213.797973-2-chenhuacai@loongs
on.cn/T/#u

> 
> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]