/* Lane indices - must be within range of previous argument = a vector. */
qualifier_lane_index = 0x200,
/* Lane indices for single lane structure loads and stores. */
- qualifier_struct_load_store_lane_index = 0x400
+ qualifier_struct_load_store_lane_index = 0x400,
+ /* A void pointer. */
+ qualifier_void_pointer = 0x800,
+ /* A const void pointer. */
+ qualifier_const_void_pointer = 0x802
};
/* The qualifier_internal allows generation of a unary builtin from
static enum arm_type_qualifiers
arm_ldc_qualifiers[SIMD_MAX_BUILTIN_ARGS]
= { qualifier_void, qualifier_unsigned_immediate,
- qualifier_unsigned_immediate, qualifier_const_pointer };
+ qualifier_unsigned_immediate, qualifier_const_void_pointer };
#define LDC_QUALIFIERS \
(arm_ldc_qualifiers)
static enum arm_type_qualifiers
arm_stc_qualifiers[SIMD_MAX_BUILTIN_ARGS]
= { qualifier_void, qualifier_unsigned_immediate,
- qualifier_unsigned_immediate, qualifier_pointer };
+ qualifier_unsigned_immediate, qualifier_void_pointer };
#define STC_QUALIFIERS \
(arm_stc_qualifiers)
if (qualifiers & qualifier_pointer && VECTOR_MODE_P (op_mode))
op_mode = GET_MODE_INNER (op_mode);
- eltype = arm_simd_builtin_type
- (op_mode,
- (qualifiers & qualifier_unsigned) != 0,
- (qualifiers & qualifier_poly) != 0);
- gcc_assert (eltype != NULL);
-
- /* Add qualifiers. */
- if (qualifiers & qualifier_const)
- eltype = build_qualified_type (eltype, TYPE_QUAL_CONST);
-
- if (qualifiers & qualifier_pointer)
- eltype = build_pointer_type (eltype);
-
+ /* For void pointers we already have nodes constructed by the midend. */
+ if (qualifiers & qualifier_void_pointer)
+ eltype = qualifiers & qualifier_const
+ ? const_ptr_type_node : ptr_type_node;
+ else
+ {
+ eltype
+ = arm_simd_builtin_type (op_mode,
+ (qualifiers & qualifier_unsigned) != 0,
+ (qualifiers & qualifier_poly) != 0);
+ gcc_assert (eltype != NULL);
+
+ /* Add qualifiers. */
+ if (qualifiers & qualifier_const)
+ eltype = build_qualified_type (eltype, TYPE_QUAL_CONST);
+
+ if (qualifiers & qualifier_pointer)
+ eltype = build_pointer_type (eltype);
+ }
/* If we have reached arg_num == 0, we are at a non-void
return type. Otherwise, we are still processing
arguments. */
const unsigned int __CRd, const unsigned int __CRn,
const unsigned int __CRm, const unsigned int __opc2)
{
- return __builtin_arm_cdp (__coproc, __opc1, __CRd, __CRn, __CRm, __opc2);
+ __builtin_arm_cdp (__coproc, __opc1, __CRd, __CRn, __CRm, __opc2);
}
__extension__ static __inline void __attribute__ ((__always_inline__))
__arm_ldc (const unsigned int __coproc, const unsigned int __CRd,
const void * __p)
{
- return __builtin_arm_ldc (__coproc, __CRd, __p);
+ __builtin_arm_ldc (__coproc, __CRd, __p);
}
__extension__ static __inline void __attribute__ ((__always_inline__))
__arm_ldcl (const unsigned int __coproc, const unsigned int __CRd,
const void * __p)
{
- return __builtin_arm_ldcl (__coproc, __CRd, __p);
+ __builtin_arm_ldcl (__coproc, __CRd, __p);
}
__extension__ static __inline void __attribute__ ((__always_inline__))
__arm_stc (const unsigned int __coproc, const unsigned int __CRd,
void * __p)
{
- return __builtin_arm_stc (__coproc, __CRd, __p);
+ __builtin_arm_stc (__coproc, __CRd, __p);
}
__extension__ static __inline void __attribute__ ((__always_inline__))
__arm_stcl (const unsigned int __coproc, const unsigned int __CRd,
void * __p)
{
- return __builtin_arm_stcl (__coproc, __CRd, __p);
+ __builtin_arm_stcl (__coproc, __CRd, __p);
}
__extension__ static __inline void __attribute__ ((__always_inline__))
uint32_t __value, const unsigned int __CRn, const unsigned int __CRm,
const unsigned int __opc2)
{
- return __builtin_arm_mcr (__coproc, __opc1, __value, __CRn, __CRm, __opc2);
+ __builtin_arm_mcr (__coproc, __opc1, __value, __CRn, __CRm, __opc2);
}
__extension__ static __inline uint32_t __attribute__ ((__always_inline__))
const unsigned int __CRd, const unsigned int __CRn,
const unsigned int __CRm, const unsigned int __opc2)
{
- return __builtin_arm_cdp2 (__coproc, __opc1, __CRd, __CRn, __CRm, __opc2);
+ __builtin_arm_cdp2 (__coproc, __opc1, __CRd, __CRn, __CRm, __opc2);
}
__extension__ static __inline void __attribute__ ((__always_inline__))
__arm_ldc2 (const unsigned int __coproc, const unsigned int __CRd,
const void * __p)
{
- return __builtin_arm_ldc2 (__coproc, __CRd, __p);
+ __builtin_arm_ldc2 (__coproc, __CRd, __p);
}
__extension__ static __inline void __attribute__ ((__always_inline__))
__arm_ldc2l (const unsigned int __coproc, const unsigned int __CRd,
const void * __p)
{
- return __builtin_arm_ldc2l (__coproc, __CRd, __p);
+ __builtin_arm_ldc2l (__coproc, __CRd, __p);
}
__extension__ static __inline void __attribute__ ((__always_inline__))
__arm_stc2 (const unsigned int __coproc, const unsigned int __CRd,
void * __p)
{
- return __builtin_arm_stc2 (__coproc, __CRd, __p);
+ __builtin_arm_stc2 (__coproc, __CRd, __p);
}
__extension__ static __inline void __attribute__ ((__always_inline__))
__arm_stc2l (const unsigned int __coproc, const unsigned int __CRd,
void * __p)
{
- return __builtin_arm_stc2l (__coproc, __CRd, __p);
+ __builtin_arm_stc2l (__coproc, __CRd, __p);
}
__extension__ static __inline void __attribute__ ((__always_inline__))
uint32_t __value, const unsigned int __CRn,
const unsigned int __CRm, const unsigned int __opc2)
{
- return __builtin_arm_mcr2 (__coproc, __opc1, __value, __CRn, __CRm, __opc2);
+ __builtin_arm_mcr2 (__coproc, __opc1, __value, __CRn, __CRm, __opc2);
}
__extension__ static __inline uint32_t __attribute__ ((__always_inline__))
__arm_mcrr (const unsigned int __coproc, const unsigned int __opc1,
uint64_t __value, const unsigned int __CRm)
{
- return __builtin_arm_mcrr (__coproc, __opc1, __value, __CRm);
+ __builtin_arm_mcrr (__coproc, __opc1, __value, __CRm);
}
__extension__ static __inline uint64_t __attribute__ ((__always_inline__))
__arm_mcrr2 (const unsigned int __coproc, const unsigned int __opc1,
uint64_t __value, const unsigned int __CRm)
{
- return __builtin_arm_mcrr2 (__coproc, __opc1, __value, __CRm);
+ __builtin_arm_mcrr2 (__coproc, __opc1, __value, __CRm);
}
__extension__ static __inline uint64_t __attribute__ ((__always_inline__))
--- /dev/null
+# Specific regression driver for arm.
+# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>. */
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Exit immediately if this isn't an arm target.
+if {![istarget arm*-*-*] } then {
+ return
+}
+
+# Load support procs.
+load_lib g++-dg.exp
+
+global DEFAULT_CXXFLAGS
+if ![info exists DEFAULT_CXXFLAGS] then {
+ set DEFAULT_CXXFLAGS " -pedantic-errors"
+}
+
+
+global dg_runtest_extra_prunes
+set dg_runtest_extra_prunes ""
+lappend dg_runtest_extra_prunes "warning: switch -m(cpu|arch)=.* conflicts with -m(cpu|arch)=.* switch"
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C]] \
+ "" $DEFAULT_CXXFLAGS
+
+# All done.
+set dg_runtest_extra_prunes ""
+dg-finish
+