================
@@ -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:

I spent a bit of time investigating the semantics...

I don't think you can ignore the arguments after the first.  And I don't think 
you can ignore the return value.  Consider the following example:

```
#include <intrin.h>
int g();
int f() { int a = __svc(1, g(), g()); g(); return a; }
```

https://github.com/llvm/llvm-project/pull/202582
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to