public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@mengyan1223.wang>
To: Chenghua Xu <xuchenghua@loongson.cn>, gcc-patches@gcc.gnu.org
Cc: yangyujie@loongson.cn, chenglulu@loongson.cn
Subject: Re: [PATCH v3 03/12] LoongArch Port: Machine Decsription files.
Date: Mon, 20 Dec 2021 20:34:02 +0800	[thread overview]
Message-ID: <b901655d0fb04de9d0a9b8a7c131710eddd36933.camel@mengyan1223.wang> (raw)
In-Reply-To: <20211210074359.988056-4-xuchenghua@loongson.cn>

On Fri, 2021-12-10 at 15:43 +0800, Chenghua Xu wrote:
> +
> +INT_MODE (OI, 32);
> +
> +/* Keep the OI modes from confusing the compiler into thinking
> +   that these modes could actually be used for computation.  They are
> +   only holders for vectors during data movement.  */
> +#define MAX_BITSIZE_MODE_ANY_INT (128)

This can't prevent the compiler from using OImode for calculation.  And
to make things even worse, in wide-int.h we have:

> #define WIDE_INT_MAX_ELTS \
>   ((MAX_BITSIZE_MODE_ANY_INT + HOST_BITS_PER_WIDE_INT) / HOST_BITS_PER_WIDE_INT)

/* ... */

> class GTY(()) wide_int_storage
> {
> private:
>   HOST_WIDE_INT val[WIDE_INT_MAX_ELTS];

When the compiler uses OImode, this array will eventually be accessed
out-of-bound, causing ICE on fp-uint64-convert-double-{1,2}.c.

All other ports don't define it (and let genmode to determine the value
automatically).  I drafted https://github.com/loongson/gcc/pull/64 to
remove the MAX_BITSIZE_MODE_ANY_INT definition.  Not sure if it's the
"proper" fix though.
-- 
Xi Ruoyao <xry111@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University

  reply	other threads:[~2021-12-20 12:34 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-10  7:43 [PATCH v3 00/12] Add LoongArch support Chenghua Xu
2021-12-10  7:43 ` [PATCH v3 01/12] LoongArch Port: gcc build Chenghua Xu
2021-12-10  7:43 ` [PATCH v3 02/12] LoongArch Port: Regenerate gcc/configure Chenghua Xu
2021-12-10  7:43 ` [PATCH v3 03/12] LoongArch Port: Machine Decsription files Chenghua Xu
2021-12-20 12:34   ` Xi Ruoyao [this message]
2021-12-10  7:43 ` [PATCH v3 04/12] LoongArch Port: Machine description C files and .h files Chenghua Xu
2021-12-18 17:53   ` Xi Ruoyao
2021-12-10  7:43 ` [PATCH v3 05/12] LoongArch Port: Builtin functions Chenghua Xu
2021-12-10  7:43 ` [PATCH v3 06/12] LoongArch Port: Builtin macros Chenghua Xu
2021-12-14  0:13   ` Joseph Myers
2021-12-17  7:45     ` Paul Hua
2021-12-18  9:37       ` Xi Ruoyao
2021-12-19  1:31         ` Paul Hua
2021-12-20  7:35           ` Xi Ruoyao
2021-12-20 14:08             ` Xi Ruoyao
2021-12-10  7:43 ` [PATCH v3 07/12] LoongArch Port: libgcc Chenghua Xu
2021-12-10  7:43 ` [PATCH v3 08/12] LoongArch Port: Regenerate libgcc/configure Chenghua Xu
2021-12-10  7:43 ` [PATCH v3 09/12] LoongArch Port: libgomp Chenghua Xu
2021-12-10  7:43 ` [PATCH v3 10/12] LoongArch Port: gcc/testsuite Chenghua Xu
2021-12-10  7:43 ` [PATCH v3 11/12] LoongArch Port: Regenerate configure Chenghua Xu
2021-12-10  7:43 ` [PATCH v3 12/12] LoongArch Port: Add doc Chenghua Xu

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=b901655d0fb04de9d0a9b8a7c131710eddd36933.camel@mengyan1223.wang \
    --to=xry111@mengyan1223.wang \
    --cc=chenglulu@loongson.cn \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=xuchenghua@loongson.cn \
    --cc=yangyujie@loongson.cn \
    /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).