public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jochen Barth <jpunktbarth@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: arm_neon.h / vext_u64 (uint64x1_t __a, uint64x1_t __b, __const int __c)
Date: Wed, 2 Sep 2020 23:10:03 +0200	[thread overview]
Message-ID: <a2c81947-3c16-0ade-ac4a-60775a0d971a@gmail.com> (raw)

Dear reader,

the definition of aarch64/arm_neon.h (gcc 10.2) is

__extension__ extern __inline uint64x1_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
vext_u64 (uint64x1_t __a, uint64x1_t __b, __const int __c)
{
   __AARCH64_LANE_CHECK (__a, __c);
   /* The only possible index to the assembler instruction returns 
element 0.  */
   return __a;
}

So this function does essentially »return __a«.

If the function name »vext_...« has, as the name suggests, something to 
do with the »ext« neon simd instruction,

then I do not understand where the asm-equivalent »ext« neon instrinct 
is, because in the »Arm Architecture Reference Manual«, chapter C7.2.543 
states: »<index> Is the lowest numbered byte element to be 
extracted...«, ranging from 0..7 for Q=8 and 0..15 for Q=16 (extraction 
over the whole 128 bit register).

PS: gcc with vector expressions does not (?) use »ext« for y=(x<<(c*8)) 
| (x>>(64-c*8)); // for Q=8

Kind regards, Jochen


             reply	other threads:[~2020-09-02 21:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02 21:10 Jochen Barth [this message]
2020-09-02 21:11 ` Jochen Barth
     [not found] ` <VI1PR08MB53253664D3E7644526965E27FF260@VI1PR08MB5325.eurprd08.prod.outlook.com>
     [not found]   ` <e06ec9ce-78ec-8eb2-83c4-4d3eda9e18f4@gmail.com>
2020-09-10  7:54     ` Tamar Christina
2020-09-10  8:14       ` Jochen Barth
2020-09-10  8:34         ` Tamar Christina
2020-09-10 10:35           ` Jochen Barth

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=a2c81947-3c16-0ade-ac4a-60775a0d971a@gmail.com \
    --to=jpunktbarth@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /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).