xref: /llvm-project/clang/test/CodeGen/X86/usermsr-builtins-error-32.c (revision 7c1d9b15eee3a34678addab2bab66f3020ac0753)
1 // RUN: %clang_cc1 %s -ffreestanding -triple=i386-unknown-unknown -target-feature +usermsr \
2 // RUN: -fsyntax-only -verify
3 
4 #include <x86gprintrin.h>
5 
test_urdmsr(unsigned long long __A)6 unsigned long long test_urdmsr(unsigned long long __A) {
7   return _urdmsr(__A); // expected-error {{call to undeclared function '_urdmsr'}}
8 }
9 
test_uwrmsr(unsigned long long __A,unsigned long long __B)10 void test_uwrmsr(unsigned long long __A, unsigned long long __B) {
11   // CHECK-LABEL: @test_uwrmsr(
12   // CHECK: call void @llvm.x86.uwrmsr(
13   _uwrmsr(__A, __B); // expected-error {{call to undeclared function '_uwrmsr'}}
14 }
15