[Patch ARM] Add cpu_defines.h for ARM
Richard Earnshaw
Richard.Earnshaw@foss.arm.com
Mon Jun 1 14:37:00 GMT 2015
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.
More information about the Libstdc++
mailing list