This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, ARM] Tweak gcc.c-torture/execute/20101011-1.c to test division-by-zero trapping on ARM
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Julian Brown <julian at codesourcery dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "ramana dot radhakrishnan at linaro dot org" <ramana dot radhakrishnan at linaro dot org>
- Date: Fri, 20 Jul 2012 17:56:18 +0100
- Subject: Re: [PATCH, ARM] Tweak gcc.c-torture/execute/20101011-1.c to test division-by-zero trapping on ARM
- References: <20120720113552.5b452950@octopus> <email@example.com> <20120720175204.6b9c0b42@octopus>
On 20/07/12 17:52, Julian Brown wrote:
> On Fri, 20 Jul 2012 17:24:36 +0100
> Richard Earnshaw <firstname.lastname@example.org> wrote:
>> On 20/07/12 11:35, Julian Brown wrote:
>>> On several architectures, the test
>>> gcc.c-torture/execute/20101011-1.c tests the raising of a signal
>>> when a division by zero occurs, but at present the test is simply
>>> skipped on ARM. We can make the test slightly more useful by using
>>> the EABI-provided ability to define a division-by-zero handling
>>> function which raises SIGFPE -- thus mimicking the behaviour of
>>> other targets, and allowing us to run the test as intended.
>>> If the target has hardware integer division instructions, the test
>>> is still skipped.
>>> The new test passes for a bare-metal config. OK to apply?
>> Which permutations (CPU, ARM, Thumb) did you test?
> On mainline, merely the defaults for an arm-none-eabi toolchain, i.e.
> armv4t, -marm and -mthumb. On our internal branches (where a version
> of the patch has been present for some time), a much wider set of CPUs,
> including Cortex-M's and so forth with hardware multiplication
> (The list is approximately: ARMv4 ARM & Thumb, ARMv5te ARM mode with &
> without VFP, various ARMv7-A configs including ARM & Thumb-2 mode,
> Cortex-M3 & VFP-enabled Cortex-M4.)
OK, I'm happy with that.