Hi All,

This patch implements the __yield(), __wfe(), __wfi(), __sev() and 
__sevl() ACLE (hint) intrinsics for all ARM targets.

The intrinsics specification are published on the Arm website [1].

[1] 
https://developer.arm.com/docs/ihi0053/latest/arm-c-language-extensions-21-architecture-specification

Bootstrapped on arm-none-linux-gnueabihf, regression tested on 
arm-none-eabi and found no regressions.

Added tests are tested using RUNTESTFLAGS as below:
RUNTESTFLAGS="--target_board=arm-eabi-aem/-march=armv8-a acle.exp=hint-1.c"
RUNTESTFLAGS="--target_board=arm-eabi-aem/-march=armv4t acle.exp=hint-2.c"
RUNTESTFLAGS="--target_board=arm-eabi-aem/-march=armv6t2 acle.exp=hint-3.c"

Ok for trunk? If ok, could please someone commit the patch on my behalf, 
I don't have commit rights.

Thanks,
Srinath

gcc/ChangeLog:

2019-05-29  Srinath Parvathaneni  <srinath.parvathan...@arm.com>

        * config/arm/arm-builtins.c (NOP_QUALIFIERS): New qualifier.
        (arm_expand_builtin_args): New case.
        * config/arm/arm.md (yield): New pattern name.
        (wfe): Likewise.
        (wfi): Likewise.
        (sev): Likewise.
        (sevl): Likewise.
        * config/arm/arm_acle.h (__yield ): New inline function.
        (__sev): Likewise.
        (__sevl): Likewise.
        (__wfi): Likewise.
        (__wfe): Likewise.
        * config/arm/arm_acle_builtins.def (VAR1):
        (yield): New acle builtin.
        (sev): Likewise.
        (sevl): Likewise.
        (wfi): Likewise.
        (wfe): Likewise.
        * config/arm/unspecs.md (unspecv):
        (VUNSPEC_YIELD): New volatile unspec.
        (VUNSPEC_SEV): Likewise.
        (VUNSPEC_SEVL): Likewise.
        (VUNSPEC_WFI): Likewise.

gcc/testsuite/ChangeLog:

2019-05-29  Srinath Parvathaneni  <srinath.parvathan...@arm.com>

        * gcc.target/arm/acle/hint-1.c: New test.
        * gcc.target/arm/acle/hint-2.c: Likewise.
        * gcc.target/arm/acle/hint-3.c: Likewise.

Attachment: rb10373.patch
Description: rb10373.patch

Reply via email to