brintos

brintos / llvm-project-archived public Read only

0
0
Text · 900 B · ba92ca4 Raw
26 lines · c
1// RUN: %clang_cc1 %s -ffreestanding -triple x86_64-unknown-unknown -emit-llvm -target-feature +waitpkg -Wall -pedantic -o - | FileCheck %s2// RUN: %clang_cc1 %s -ffreestanding -triple i386-unknown-unknown -emit-llvm -target-feature +waitpkg -Wall -pedantic -o - | FileCheck %s3 4#include <immintrin.h>5 6#include <stddef.h>7#include <stdint.h>8 9void test_umonitor(void *address) {10  //CHECK-LABEL: @test_umonitor11  //CHECK: call void @llvm.x86.umonitor(ptr %{{.*}})12  return _umonitor(address);13}14 15uint8_t test_umwait(uint32_t control, uint64_t counter) {16  //CHECK-LABEL: @test_umwait17  //CHECK: call i8 @llvm.x86.umwait(i32 %{{.*}}, i32 %{{.*}}, i32 %{{.*}})18  return _umwait(control, counter);19}20 21uint8_t test_tpause(uint32_t control, uint64_t counter) {22  //CHECK-LABEL: @test_tpause23  //CHECK: call i8 @llvm.x86.tpause(i32 %{{.*}}, i32 %{{.*}}, i32 %{{.*}})24  return _tpause(control, counter);25}26