This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch ARM] Add cpu_defines.h for ARM


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]