From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 88CAC1F8C6 for ; Sat, 4 Sep 2021 13:16:57 +0000 (UTC) Received: from localhost ([::1]:38046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mMVXT-0007dO-TO for normalperson@yhbt.net; Sat, 04 Sep 2021 09:16:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50486) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMVXQ-0007bL-Dk for bug-gnulib@gnu.org; Sat, 04 Sep 2021 09:16:52 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.20]:18183) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMVXO-00018R-12 for bug-gnulib@gnu.org; Sat, 04 Sep 2021 09:16:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1630761395; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=t2XrkYLCJ1rjl6xARl1dkYvrGtefy2QdX6fSC2wbu74=; b=HUIaUZmQcNMg7rcEU466jubCv1vNifgE9bWry8zL9FFdPJrwkIEAQAdRB3OA44Dh4l 9cokOL+eZS+snYfnKEQmUQQtmtx7NdRa7MxdduqPBVr0r4FiaglEiIXy/dF+omg5cVvU j51OIgy1ILH6KzJq0uPe1Es4SshdNJOvxggyk60Cg9glCVmrHPM/8CJPgdwHQZkUgfzA ZFFN4xl2JzKr3ZSUlXltCKPEZ7bm1hmvl/LrzvV0mF9o0q0Ad0ITt1qmMVbwo1d6etpE 4Fhzv84Ggrktad/ZWQN06C2rXxEs6oEezhbtdbtVKX9LZaCpofz4w5ZBN/6Sr6T6Db0C Iz+A== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH0WWb0LN8XZoH94z26ll5ip69lwUHjRbX2x/7kYsakWtKZP5IL1Q==" X-RZG-CLASS-ID: mo00 Received: from omega.localnet by smtp.strato.de (RZmta 47.33.0 AUTH) with ESMTPSA id 606ef5x84DGYJIB (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sat, 4 Sep 2021 15:16:34 +0200 (CEST) From: Bruno Haible To: bug-gnulib@gnu.org Subject: Re: [PATCH] stack-direction: Add support for loongarch CPU Date: Sat, 04 Sep 2021 15:16:34 +0200 Message-ID: <4764447.07ICAnoMbH@omega> In-Reply-To: <20210831045126.11647-1-youbest@sina.com> References: <20210831045126.11647-1-youbest@sina.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: none client-ip=85.215.255.20; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sun Haiyong Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" 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 (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 | \