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, GCC/ARM, Stage 1] Rename FPSCR builtins to correct names


Hi Christophe,

On 23/06/17 20:10, Christophe Lyon wrote:
Hi Thomas,

On 23 June 2017 at 17:48, Thomas Preudhomme
<thomas.preudhomme@foss.arm.com> wrote:
Hi Kyrill,


On 10/04/17 15:01, Kyrill Tkachov wrote:

Hi Prakhar,
Sorry for the delay,

On 22/03/17 10:46, Prakhar Bahuguna wrote:

The GCC documentation in section 6.60.8 ARM Floating Point Status and
Control
Intrinsics states that the FPSCR register can be read and written to
using the
intrinsics __builtin_arm_get_fpscr and __builtin_arm_set_fpscr. However,
these
are misnamed within GCC itself and these intrinsic names are not
recognised.
This patch corrects the intrinsic names to match the documentation, and
adds
tests to verify these intrinsics generate the correct instructions.

Testing done: Ran regression tests on arm-none-eabi for Cortex-M4.

2017-03-09  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>

gcc/ChangeLog:

     * gcc/config/arm/arm-builtins.c (arm_init_builtins): Rename
       __builtin_arm_ldfscr to __builtin_arm_get_fpscr, and rename
       __builtin_arm_stfscr to __builtin_arm_set_fpscr.
     * gcc/testsuite/gcc.target/arm/fpscr.c: New file.

Okay for stage 1?


I see that the mistake was in not addressing one of the review comments
in:
https://gcc.gnu.org/ml/gcc-patches/2014-04/msg01832.html
properly in the patch that added these functions :(

This is ok for stage 1 if a bootstrap and test on arm-none-linux-gnueabihf
works
fine
I don't think we want to maintain the __builtin_arm_[ld,st]fscr names for
backwards compatibility
as they were not documented and are __builtin_arm* functions that we don't
guarantee to maintain.


How about a backport to GCC 5, 6 & 7? The patch applied cleanly on each of
these versions and the testsuite didn't show any regression for any of the
backport when run for Cortex-M7.


Three's a problem with GCC-5:
     gcc.target/arm/fpscr.c: unknown effective target keyword
`arm_fp_ok' for " dg-require-effective-target 4 arm_fp_ok "

Indeed arm_fp_ok effective-target does not exist in the gcc-5 branch.

Oh no. I remember not seeing anything but I can indeed see this with compare_tests from the sum file I save after each testing. Alright, what is done is done, working on a patch now.

Best regards,

Thomas


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