src/cpu/x86/vm/x86_64.ad
Print this page
@@ -6334,10 +6334,29 @@
format %{ "MEMBAR-release (a FastUnlock follows so empty encoding)" %}
ins_encode();
ins_pipe(empty);
%}
+instruct onspinwait()
+%{
+ match(OnSpinWait);
+ ins_cost(200);
+
+ format %{
+ $$template
+ if (os::is_MP()) {
+ $$emit$$"pause\t! membar_onspinwait"
+ } else {
+ $$emit$$"MEMBAR-onspinwait ! (empty encoding)"
+ }
+ %}
+ ins_encode %{
+ __ pause();
+ %}
+ ins_pipe(pipe_slow);
+%}
+
instruct membar_volatile(rFlagsReg cr) %{
match(MemBarVolatile);
effect(KILL cr);
ins_cost(400);