public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch, AArch64, AArch64-4.7] Map scalar types in arm_neon.h to standard types.
@ 2013-01-18 10:25 Tejas Belagod
  2013-01-18 10:33 ` Marcus Shawcroft
  0 siblings, 1 reply; 2+ messages in thread
From: Tejas Belagod @ 2013-01-18 10:25 UTC (permalink / raw)
  To: gcc-patches; +Cc: Marcus Shawcroft

[-- Attachment #1: Type: text/plain, Size: 912 bytes --]


Hi,

The attached patch fixes one of arm_neon.h's issues with C++. All scalar types 
<type>x1_t are mapped to internal __builtin_aarch64_simd_<type> types. This 
creates duplicate function name symbols when one attempts overloading a standard 
type and one of these builtin types that are of the same size. For example, 
int8x1_t when overloaded with signed char creates a duplicate function name 
symbol. This patch increases the strictness and maps scalar types <type>x1_t to 
standard types. This means overloading is not possible, but that will not make a 
difference as we can now define it this way and needless to say it was broken 
till now anyway.

Tested for aarch64-none-elf. OK for trunk and aarch64-4.7-branch?

Thanks,
Tejas Belagod
ARM.

Changelog:

2013-01-18  Tejas Belagod  <tejas.belagod@arm.com>

gcc/
	* config/aarch64/arm_neon.h: Map scalar types to standard types.

[-- Attachment #2: builtin-type.txt --]
[-- Type: text/plain, Size: 1550 bytes --]

diff --git a/gcc/config/aarch64/arm_neon.h b/gcc/config/aarch64/arm_neon.h
index 5a72029..50e0a7b 100644
--- a/gcc/config/aarch64/arm_neon.h
+++ b/gcc/config/aarch64/arm_neon.h
@@ -35,11 +35,11 @@ typedef __builtin_aarch64_simd_hi int16x4_t
   __attribute__ ((__vector_size__ (8)));
 typedef __builtin_aarch64_simd_si int32x2_t
   __attribute__ ((__vector_size__ (8)));
-typedef __builtin_aarch64_simd_di int64x1_t;
-typedef __builtin_aarch64_simd_si int32x1_t;
-typedef __builtin_aarch64_simd_hi int16x1_t;
-typedef __builtin_aarch64_simd_qi int8x1_t;
-typedef __builtin_aarch64_simd_df float64x1_t;
+typedef int64_t int64x1_t;
+typedef int32_t int32x1_t;
+typedef int16_t int16x1_t;
+typedef int8_t int8x1_t;
+typedef double float64x1_t;
 typedef __builtin_aarch64_simd_sf float32x2_t
   __attribute__ ((__vector_size__ (8)));
 typedef __builtin_aarch64_simd_poly8 poly8x8_t
@@ -52,10 +52,10 @@ typedef __builtin_aarch64_simd_uhi uint16x4_t
   __attribute__ ((__vector_size__ (8)));
 typedef __builtin_aarch64_simd_usi uint32x2_t
   __attribute__ ((__vector_size__ (8)));
-typedef __builtin_aarch64_simd_udi uint64x1_t;
-typedef __builtin_aarch64_simd_usi uint32x1_t;
-typedef __builtin_aarch64_simd_uhi uint16x1_t;
-typedef __builtin_aarch64_simd_uqi uint8x1_t;
+typedef uint64_t uint64x1_t;
+typedef uint32_t uint32x1_t;
+typedef uint16_t uint16x1_t;
+typedef uint8_t uint8x1_t;
 typedef __builtin_aarch64_simd_qi int8x16_t
   __attribute__ ((__vector_size__ (16)));
 typedef __builtin_aarch64_simd_hi int16x8_t

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Patch, AArch64, AArch64-4.7] Map scalar types in arm_neon.h to standard types.
  2013-01-18 10:25 [Patch, AArch64, AArch64-4.7] Map scalar types in arm_neon.h to standard types Tejas Belagod
@ 2013-01-18 10:33 ` Marcus Shawcroft
  0 siblings, 0 replies; 2+ messages in thread
From: Marcus Shawcroft @ 2013-01-18 10:33 UTC (permalink / raw)
  To: Tejas Belagod; +Cc: gcc-patches

On 18/01/13 10:25, Tejas Belagod wrote:
>
> Hi,
>
> The attached patch fixes one of arm_neon.h's issues with C++. All scalar types
> <type>x1_t are mapped to internal __builtin_aarch64_simd_<type> types. This
> creates duplicate function name symbols when one attempts overloading a standard
> type and one of these builtin types that are of the same size. For example,
> int8x1_t when overloaded with signed char creates a duplicate function name
> symbol. This patch increases the strictness and maps scalar types <type>x1_t to
> standard types. This means overloading is not possible, but that will not make a
> difference as we can now define it this way and needless to say it was broken
> till now anyway.
>
> Tested for aarch64-none-elf. OK for trunk and aarch64-4.7-branch?
>
> Thanks,
> Tejas Belagod
> ARM.
>
> Changelog:
>
> 2013-01-18  Tejas Belagod  <tejas.belagod@arm.com>
>
> gcc/
> 	* config/aarch64/arm_neon.h: Map scalar types to standard types.
>

OK

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-18 10:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-18 10:25 [Patch, AArch64, AArch64-4.7] Map scalar types in arm_neon.h to standard types Tejas Belagod
2013-01-18 10:33 ` Marcus Shawcroft

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).