[PATCH 1/2][GCC][AArch64] Implement hint intrinsics for AArch64
Srinath Parvathaneni
Srinath.Parvathaneni@arm.com
Thu Jan 10 19:20:00 GMT 2019
Hi All,
This patch implements the ACLE hint intrinsics (nop, yield, wfe, wfi,
sev and sevl), for AArch64.
The instructions are documented in the ArmARM[1] and the intrinsics
specification will be
published on the Arm website [2].
[1]
https://developer.arm.com/docs/ddi0487/latest/arm-architecture-reference-manual-armv8-for-armv8-a-architecture-profile
[2]
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0053c/IHI0053C_acle_2_0.pdf
Bootstrapped on aarch64-none-linux-gnu and regression tested on
aarch64-none-elf with no regressions.
Ok for trunk? If ok, could someone commit the patch on my behalf, I
don't have commit rights.
Thanks,
Srinath
gcc/ChangeLog:
2019-01-10 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
* config/aarch64/aarch64.md (yield): New pattern name.
(wfe): Likewise.
(wfi): Likewise.
(sev): Likewise.
(sevl): Likewise.
(UNSPECV_YIELD): New volatile unspec.
(UNSPECV_WFE): Likewise.
(UNSPECV_WFI): Likewise.
(UNSPECV_SEV): Likewise.
(UNSPECV_SEVL): Likewise.
* config/aarch64/aarch64-builtins.c (aarch64_builtins):
AARCH64_SYSHINTOP_BUILTIN_NOP: New builtin.
AARCH64_SYSHINTOP_BUILTIN_YIELD: Likewise.
AARCH64_SYSHINTOP_BUILTIN_WFE: Likewise.
AARCH64_SYSHINTOP_BUILTIN_WFI: Likewise.
AARCH64_SYSHINTOP_BUILTIN_SEV: Likewise.
AARCH64_SYSHINTOP_BUILTIN_SEVL: Likewise.
(aarch64_init_syshintop_builtins): New function.
(aarch64_init_builtins): New call statement.
(aarch64_expand_builtin): New case.
* config/aarch64/arm_acle.h (__nop ): New inline function.
(__yield): Likewise.
(__sev): Likewise.
(__sevl): Likewise.
(__wfi): Likewise.
(__wfe): Likewise.
gcc/testsuite/ChangeLog:
2019-01-10 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
* gcc.target/aarch64/acle/hint-1.c: New test.
* gcc.target/aarch64/acle/hint-2.c: Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rb10372.patch
Type: text/x-patch
Size: 8270 bytes
Desc: rb10372.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190110/69f432c8/attachment.bin>
More information about the Gcc-patches
mailing list