[clang] [llvm] [AArch64] Add __hvc, __svc and _InterlockedCompareExchangePointer_nf MS intrinsics (PR #202582)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 7 12:52:44 PDT 2026
================
@@ -5263,6 +5263,18 @@ Value *CodeGenFunction::EmitAArch64BuiltinExpr(unsigned BuiltinID,
return ConstantInt::get(Builder.getInt32Ty(), 0);
}
+ if (BuiltinID == AArch64::BI__hvc) {
+ Function *F = CGM.getIntrinsic(Intrinsic::aarch64_hvc);
+ Builder.CreateCall(F, {EmitScalarExpr(E->getArg(0))});
----------------
efriedma-quic wrote:
If it's easier, maybe consider making clang generate inline asm. I don't really want to think about the mechanics of an intrinsic with a variable number of arguments, and the optimizer can't do anything interesting with the intrinsic anyway.
https://github.com/llvm/llvm-project/pull/202582
More information about the cfe-commits
mailing list