Permalink
Browse files

Provide (undocumented for now) __pause() call to emit PAUSE inst.

  • Loading branch information...
Matt Pharr
Matt Pharr committed Jun 28, 2012
1 parent f38770b commit d34a87404d4b7f94848b6efaf9add9b32af642c3
Showing with 6 additions and 0 deletions.
  1. +1 −0 builtins.cpp
  2. +5 −0 builtins/util.m4
View
@@ -467,6 +467,7 @@ lSetInternalFunctions(llvm::Module *module) {
"__num_cores",
"__packed_load_active",
"__packed_store_active",
+ "__pause",
"__popcnt_int32",
"__popcnt_int64",
"__prefetch_read_uniform_1",
View
@@ -1603,6 +1603,11 @@ declare void @ISPCInstrument(i8*, i8*, i32, i64) nounwind
declare i1 @__is_compile_time_constant_mask(<WIDTH x MASK> %mask)
declare i1 @__is_compile_time_constant_varying_int32(<WIDTH x i32>)
+define void @__pause() nounwind readnone {
+ call void asm sideeffect "pause", "~{dirflag},~{fpsr},~{flags}"() nounwind
+ ret void
+}
+
; This function declares placeholder masked store functions for the
; front-end to use.
;

0 comments on commit d34a874

Please sign in to comment.