This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch ARM] Add cpu_defines.h for ARM
- From: Richard Earnshaw <Richard dot Earnshaw at foss dot arm dot com>
- To: Ramana Radhakrishnan <ramana dot radhakrishnan at foss dot arm dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Date: Mon, 01 Jun 2015 15:37:14 +0100
- Subject: Re: [Patch ARM] Add cpu_defines.h for ARM
- Authentication-results: sourceware.org; auth=none
- References: <555B3103 dot 9040603 at foss dot arm dot com>
On 19/05/15 13:48, Ramana Radhakrishnan wrote:
> Hardware Integer divide instructions do not trap. Define this to be so
> for the ARM port.
>
> Applied to trunk after a build and test across architecture ranges and a
> bootstrap and regression run on a Cortex-A15 - a v7ve core that has
> hardware divide instructions.
>
> A patch for AArch64 follows.
>
> regards
> Ramana
>
> 2015-05-17 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
>
> * configure.host: Define cpu_defines_dir for ARM.
> * config/cpu/arm/cpu_defines.h: New file.
>
+#ifdef __ARM_ARCH_EXT_IDIV__
+#define __glibcxx_integral_traps false
+#else
+#define __glibcxx_integral_traps true
+#endif
Hmm, I wonder if we should always define this to false. If we're
building on an architecture that doesn't have division, we'll call a
library function; but if that is picked at link time, and the link time
options suggest that hw division is available, we could end up with a
library function that doesn't trap.
R.