public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "yufeng at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/60825] New: [AArch64] int64x1_t, uint64x1_t and float64x1_t are not treated as vector types
Date: Fri, 11 Apr 2014 14:24:00 -0000	[thread overview]
Message-ID: <bug-60825-4@http.gcc.gnu.org/bugzilla/> (raw)

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60825

            Bug ID: 60825
           Summary: [AArch64] int64x1_t, uint64x1_t and float64x1_t are
                    not treated as vector types
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: yufeng at gcc dot gnu.org

int64x1_t, uint64x1_t and float64x1_t in AArch64 arm_neon.h shall be vector
types.  However currently they are treated as different names for the
corresponding C/C++ types: int64_t, uint64_t and double in the GCC AArch64
backend.

Function parameters of such types shall be passed in NEON SIMD registers and
the names of C++ functions with parameters of any of those types shall be
mangled properly.

The following test cases demonstrate the issue:

---------------- test.c ----------------
/* Parameter passing issue  */
#include "arm_neon.h"

int64x1_t aaaa;
uint64x1_t bbbb;
float64x1_t cccc;

void ffff (int64x1_t);
void gggg (uint64x1_t);
void hhhh (float64x1_t);

void test (void)
{
  ffff (aaaa);
  gggg (bbbb);
  hhhh (cccc);
}

---------------- CUT ----------------

'aaaa', 'bbbb' and 'cccc' shall be passed in register 'd0', however 'aaaa' and
'bbbb' are currently passed in 'x0' instead.  'cccc' is correctly passed in
'd0', but only by chance, as parameters of double are passed in FP registers
which overlay with SIMD registers.


---------------- test.cpp ----------------
/* C++ name mangling issue  */
#include "arm_neon.h"

void ffff (int64x1_t aaaa)
{}

void gggg (uint64x1_t bbbb)
{}

void hhhh (float64x1_t cccc)
{}


---------------- CUT ----------------

Instead of the following expected mangled names:

_Z4ffff11__Int64x1_t
_Z4gggg12__Uint64x1_t
_Z4hhhh13__Float64x1_t

the function names are currently mangled to

_Z4ffffl
_Z4ggggm
_Z4hhhhd


             reply	other threads:[~2014-04-11 14:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-11 14:24 yufeng at gcc dot gnu.org [this message]
2014-04-11 14:30 ` [Bug target/60825] " yufeng at gcc dot gnu.org
2014-04-11 14:33 ` yufeng at gcc dot gnu.org
2014-04-11 16:03 ` pinskia at gcc dot gnu.org
2014-06-23 12:47 ` alalaw01 at gcc dot gnu.org
2014-06-23 14:08 ` alalaw01 at gcc dot gnu.org
2014-07-16 13:31 ` jakub at gcc dot gnu.org
2014-10-30 10:43 ` jakub at gcc dot gnu.org
2015-06-26 20:10 ` jakub at gcc dot gnu.org
2015-06-26 20:36 ` jakub at gcc dot gnu.org
2015-06-26 21:29 ` pinskia at gcc dot gnu.org

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=bug-60825-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).