arm: MVE: Add C++ polymorphism and fix some more issues
This patch adds C++ polymorphism for the MVE intrinsics, by using the native C++ polymorphic functions when C++ is used. It also moves the PRESERVE name macro definitions to the right place so that the variants without the '__arm_' prefix are not available if we define the PRESERVE NAMESPACE macro. This patch further fixes two testisms that were brought to light by C++ testing added in this patch. gcc/ChangeLog: 2020-04-07 Andre Vieira <andre.simoesdiasvieira@arm.com> * config/arm/arm_mve.h: Add C++ polymorphism and fix preserve MACROs. gcc/testsuite/ChangeLog: 2020-04-07 Andre Vieira <andre.simoesdiasvieira@arm.com> * g++.target/arm/mve.exp: New. * gcc.target/arm/mve/intrinsics/vcmpneq_n_f16: Fix testism. * gcc.target/arm/mve/intrinsics/vcmpneq_n_f32: Likewise.
This commit is contained in:
parent
ff0597dcd9
commit
6a90680bff
6 changed files with 17032 additions and 785 deletions
|
@ -1,3 +1,7 @@
|
|||
2020-04-07 Andre Vieira <andre.simoesdiasvieira@arm.com>
|
||||
|
||||
* config/arm/arm_mve.h: Add C++ polymorphism and fix preserve MACROs.
|
||||
|
||||
2020-04-07 Andre Vieira <andre.simoesdiasvieira@arm.com>
|
||||
|
||||
* config/arm/arm_mve.h: Cast some pointers to expected types.
|
||||
|
|
17754
gcc/config/arm/arm_mve.h
17754
gcc/config/arm/arm_mve.h
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,9 @@
|
|||
2020-04-07 Andre Vieira <andre.simoesdiasvieira@arm.com>
|
||||
|
||||
* g++.target/arm/mve.exp: New.
|
||||
* gcc.target/arm/mve/intrinsics/vcmpneq_n_f16: Fix testism.
|
||||
* gcc.target/arm/mve/intrinsics/vcmpneq_n_f32: Likewise.
|
||||
|
||||
2020-04-07 Andre Vieira <andre.simoesdiasvieira@arm.com>
|
||||
|
||||
* gcc.target/arm/mve/intrinsics/vuninitializedq_float.c: Fix testism.
|
||||
|
|
49
gcc/testsuite/g++.target/arm/mve.exp
Normal file
49
gcc/testsuite/g++.target/arm/mve.exp
Normal file
|
@ -0,0 +1,49 @@
|
|||
# Copyright (C) 2019-2020 Free Software Foundation, Inc.
|
||||
|
||||
# This program 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 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program 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
|
||||
|
||||
# If a testcase doesn't have special options, use these.
|
||||
global DEFAULT_CXXFLAGS
|
||||
if ![info exists DEFAULT_CXXFLAGS] then {
|
||||
set DEFAULT_CXXFLAGS " -pedantic-errors"
|
||||
}
|
||||
|
||||
# This variable should only apply to tests called in this exp file.
|
||||
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"
|
||||
|
||||
set dg-do-what-default "assemble"
|
||||
|
||||
# Initialize `dg'.
|
||||
dg-init
|
||||
|
||||
# Main loop.
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/../../gcc.target/arm/mve/intrinsics/*.\[cCS\]]] \
|
||||
"" $DEFAULT_CXXFLAGS
|
||||
|
||||
# All done.
|
||||
set dg_runtest_extra_prunes ""
|
||||
dg-finish
|
|
@ -15,7 +15,7 @@ foo (float16x8_t a, float16_t b)
|
|||
mve_pred16_t
|
||||
foo1 (float16x8_t a, float16_t b)
|
||||
{
|
||||
return vcmpgeq_n (a, b);
|
||||
return vcmpgeq (a, b);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler "vcmp.f16" } } */
|
||||
|
|
|
@ -15,7 +15,7 @@ foo (float32x4_t a, float32_t b)
|
|||
mve_pred16_t
|
||||
foo1 (float32x4_t a, float32_t b)
|
||||
{
|
||||
return vcmpgeq_n (a, b);
|
||||
return vcmpgeq (a, b);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler "vcmp.f32" } } */
|
||||
|
|
Loading…
Add table
Reference in a new issue