re PR target/82641 (Unable to enable crc32 for a certain function with target attribute on ARM (aarch32))
2018-02-09 Tamar Christina <tamar.christina@arm.com> PR target/82641 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX, __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP. gcc/testsuite 2018-02-09 Tamar Christina <tamar.christina@arm.com> PR target/82641 * gcc.target/arm/pragma_arch_switch_2.c: Use armv6 and armv5t. From-SVN: r257524
This commit is contained in:
parent
c704706201
commit
0079ae8877
@ -1,3 +1,9 @@
|
||||
2018-02-09 Tamar Christina <tamar.christina@arm.com>
|
||||
|
||||
PR target/82641
|
||||
* config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
|
||||
__ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
|
||||
|
||||
2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
|
||||
|
||||
PR target/PR84295
|
||||
|
@ -87,11 +87,10 @@ arm_cpu_builtins (struct cpp_reader* pfile)
|
||||
builtin_define ("__ARM_FEATURE_CMSE");
|
||||
}
|
||||
|
||||
cpp_undef (pfile, "__ARM_FEATURE_LDREX");
|
||||
if (TARGET_ARM_FEATURE_LDREX)
|
||||
builtin_define_with_int_value ("__ARM_FEATURE_LDREX",
|
||||
TARGET_ARM_FEATURE_LDREX);
|
||||
else
|
||||
cpp_undef (pfile, "__ARM_FEATURE_LDREX");
|
||||
|
||||
def_or_undef_macro (pfile, "__ARM_FEATURE_CLZ",
|
||||
((TARGET_ARM_ARCH >= 5 && !TARGET_THUMB)
|
||||
@ -105,6 +104,8 @@ arm_cpu_builtins (struct cpp_reader* pfile)
|
||||
builtin_define_with_int_value ("__ARM_SIZEOF_MINIMAL_ENUM",
|
||||
flag_short_enums ? 1 : 4);
|
||||
builtin_define_type_sizeof ("__ARM_SIZEOF_WCHAR_T", wchar_type_node);
|
||||
|
||||
cpp_undef (pfile, "__ARM_ARCH_PROFILE");
|
||||
if (TARGET_ARM_ARCH_PROFILE)
|
||||
builtin_define_with_int_value ("__ARM_ARCH_PROFILE",
|
||||
TARGET_ARM_ARCH_PROFILE);
|
||||
@ -128,6 +129,7 @@ arm_cpu_builtins (struct cpp_reader* pfile)
|
||||
else
|
||||
def_or_undef_macro (pfile, "__THUMBEL__", TARGET_THUMB);
|
||||
|
||||
cpp_undef (pfile, "__ARM_ARCH_ISA_THUMB");
|
||||
if (TARGET_ARM_ARCH_ISA_THUMB)
|
||||
builtin_define_with_int_value ("__ARM_ARCH_ISA_THUMB",
|
||||
TARGET_ARM_ARCH_ISA_THUMB);
|
||||
@ -147,10 +149,9 @@ arm_cpu_builtins (struct cpp_reader* pfile)
|
||||
|
||||
builtin_define ("__VFP_FP__");
|
||||
|
||||
cpp_undef (pfile, "__ARM_FP");
|
||||
if (TARGET_ARM_FP)
|
||||
builtin_define_with_int_value ("__ARM_FP", TARGET_ARM_FP);
|
||||
else
|
||||
cpp_undef (pfile, "__ARM_FP");
|
||||
|
||||
def_or_undef_macro (pfile, "__ARM_FP16_FORMAT_IEEE",
|
||||
arm_fp16_format == ARM_FP16_FORMAT_IEEE);
|
||||
@ -169,10 +170,9 @@ arm_cpu_builtins (struct cpp_reader* pfile)
|
||||
def_or_undef_macro (pfile, "__ARM_NEON__", TARGET_NEON);
|
||||
def_or_undef_macro (pfile, "__ARM_NEON", TARGET_NEON);
|
||||
|
||||
cpp_undef (pfile, "__ARM_NEON_FP");
|
||||
if (TARGET_NEON_FP)
|
||||
builtin_define_with_int_value ("__ARM_NEON_FP", TARGET_NEON_FP);
|
||||
else
|
||||
cpp_undef (pfile, "__ARM_NEON_FP");
|
||||
|
||||
/* Add a define for interworking. Needed when building libgcc.a. */
|
||||
if (arm_cpp_interwork)
|
||||
|
@ -1,3 +1,8 @@
|
||||
2018-02-09 Tamar Christina <tamar.christina@arm.com>
|
||||
|
||||
PR target/82641
|
||||
* gcc.target/arm/pragma_arch_switch_2.c: Use armv6 and armv5t.
|
||||
|
||||
2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
|
||||
|
||||
PR target/PR84295
|
||||
|
@ -2,16 +2,16 @@
|
||||
/* { dg-skip-if "instruction not valid on thumb" { *-*-* } { "-mthumb" } { "" } } */
|
||||
/* { dg-do assemble } */
|
||||
/* { dg-require-effective-target arm_arm_ok } */
|
||||
/* { dg-additional-options "-Wall -O2 -march=armv4t -std=gnu99 -marm" } */
|
||||
/* { dg-additional-options "-Wall -O2 -march=armv5t -std=gnu99 -marm" } */
|
||||
|
||||
#pragma GCC target ("arch=armv5te")
|
||||
void cpu_has_iwmmxt (void)
|
||||
#pragma GCC target ("arch=armv6")
|
||||
int test_assembly (int hi, int lo)
|
||||
{
|
||||
int lo;
|
||||
int hi;
|
||||
int res;
|
||||
__asm__ __volatile__ (
|
||||
"mcrr p0, 0, %2, %3, c0\n"
|
||||
: "=r" (lo), "=r" (hi)
|
||||
: "r" (0), "r" (0x100));
|
||||
"uxtah %0, %1, %2\n"
|
||||
: "=r" (res)
|
||||
: "r" (hi), "r" (lo));
|
||||
return res;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user