[all-commits] [llvm/llvm-project] ed27f1: __sys builtin support for AArch64 (#146456)
Adam Glass via All-commits
all-commits at lists.llvm.org
Wed Jul 2 10:17:22 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ed27f18e324de1441bb062c6b2ffd2be5875a952
https://github.com/llvm/llvm-project/commit/ed27f18e324de1441bb062c6b2ffd2be5875a952
Author: Adam Glass <adamglass at microsoft.com>
Date: 2025-07-02 (Wed, 02 Jul 2025)
Changed paths:
M clang/include/clang/Basic/BuiltinsAArch64.def
M clang/lib/CodeGen/TargetBuiltins/ARM.cpp
M clang/lib/Headers/intrin.h
M clang/lib/Sema/SemaARM.cpp
A clang/test/CodeGen/arm64-microsoft-sys.c
M clang/test/Sema/builtins-microsoft-arm64.c
Log Message:
-----------
__sys builtin support for AArch64 (#146456)
Adds support for __sys Clang builtin for AArch64
__sys is a long existing MSVC intrinsic used to manage caches, tlbs, etc
by writing to system registers:
* It takes a macro-generated constant and uses it to form the AArch64 SYS instruction which is MSR with op0=1. The macro drops op0 and expects the implementation to hardcode it to 1 in the encoding.
* Volume use is in systems code (kernels, hypervisors, boot environments, firmware)
* Has an unused return value due to MSVC cut/paste error
Implementation:
* Clang builtin, sharing code with Read/WriteStatusReg
* Hardcodes the op0=1
* Explicitly returns 0
* Code-format change from clang-format
* Unittests included
* Not limited to MSVC-environment as its generally useful and neutral
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list