public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@xry111.site>
To: chenxiaolong <chenxiaolong@loongson.cn>, gcc-patches@gcc.gnu.org
Cc: i@xen0n.name, xuchenghua@loongson.cn, chenglulu@loongson.cn
Subject: Re: [PATCH v1] LoongArch: Add modifiers for lsx and lasx.
Date: Tue, 07 Nov 2023 19:13:01 +0800	[thread overview]
Message-ID: <ed8d7cc8ba0092c5ac2cfc6e93bfe19ebe169ffe.camel@xry111.site> (raw)
In-Reply-To: <d6830811341c66dac8df527c59deae7c161e60c6.camel@xry111.site>

On Tue, 2023-11-07 at 19:10 +0800, Xi Ruoyao wrote:
> On Tue, 2023-11-07 at 12:06 +0800, chenxiaolong wrote:
> > +__m128i  a,b,c;
> > +
> > +__asm__ ("vadd.d %w0,%w1,%w2\n\t"
> > +   :"=f" (c)
> > +   :"f" (a),"f" (b)
> > +   :"cc");
> 
> This example does not work for me, with the definition of __m128i in
> another patch:
> 
> typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__));
> 
> __m128i  a,b,c;
> 
> void t(void) {
> __asm__ ("vadd.d %w0,%w1,%w2\n\t"
>    :"=f" (c)
>    :"f" (a),"f" (b)
>    :"cc");
> }
> 
> t1.c: In function ‘t’:
> t1.c:6:1: error: inconsistent operand constraints in an ‘asm’
>     6 | __asm__ ("vadd.d %w0,%w1,%w2\n\t"
> 
> Please recheck.

Sorry, I didn't added -mlasx :(.

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

      reply	other threads:[~2023-11-07 11:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-07  4:06 chenxiaolong
2023-11-07 11:10 ` Xi Ruoyao
2023-11-07 11:13   ` Xi Ruoyao [this message]

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=ed8d7cc8ba0092c5ac2cfc6e93bfe19ebe169ffe.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=chenglulu@loongson.cn \
    --cc=chenxiaolong@loongson.cn \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=i@xen0n.name \
    --cc=xuchenghua@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).