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 via email to