< prev index next >

src/hotspot/cpu/x86/x86_64.ad

Print this page

        

@@ -1,7 +1,7 @@
 //
-// Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+// Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 //
 // This code is free software; you can redistribute it and/or modify it
 // under the terms of the GNU General Public License version 2 only, as
 // published by the Free Software Foundation.

@@ -2339,13 +2339,11 @@
     emit_d32(cbuf, 0x00);
   %}
 
   enc_class lock_prefix()
   %{
-    if (os::is_MP()) {
       emit_opcode(cbuf, 0xF0); // lock
-    }
   %}
 
   enc_class REX_mem(memory mem)
   %{
     if ($mem$$base >= 8) {

@@ -6508,15 +6506,11 @@
   effect(KILL cr);
   ins_cost(400);
 
   format %{
     $$template
-    if (os::is_MP()) {
       $$emit$$"lock addl [rsp + #0], 0\t! membar_volatile"
-    } else {
-      $$emit$$"MEMBAR-volatile ! (empty encoding)"
-    }
   %}
   ins_encode %{
     __ membar(Assembler::StoreLoad);
   %}
   ins_pipe(pipe_slow);

@@ -7708,22 +7702,22 @@
   predicate(n->as_LoadStore()->result_not_used());
   match(Set dummy (GetAndAddB mem add));
   effect(KILL cr);
   format %{ "ADDB  [$mem],$add" %}
   ins_encode %{
-    if (os::is_MP()) { __ lock(); }
+    __ lock();
     __ addb($mem$$Address, $add$$constant);
   %}
   ins_pipe( pipe_cmpxchg );
 %}
 
 instruct xaddB( memory mem, rRegI newval, rFlagsReg cr) %{
   match(Set newval (GetAndAddB mem newval));
   effect(KILL cr);
   format %{ "XADDB  [$mem],$newval" %}
   ins_encode %{
-    if (os::is_MP()) { __ lock(); }
+    __ lock();
     __ xaddb($mem$$Address, $newval$$Register);
   %}
   ins_pipe( pipe_cmpxchg );
 %}
 

@@ -7731,22 +7725,22 @@
   predicate(n->as_LoadStore()->result_not_used());
   match(Set dummy (GetAndAddS mem add));
   effect(KILL cr);
   format %{ "ADDW  [$mem],$add" %}
   ins_encode %{
-    if (os::is_MP()) { __ lock(); }
+    __ lock();
     __ addw($mem$$Address, $add$$constant);
   %}
   ins_pipe( pipe_cmpxchg );
 %}
 
 instruct xaddS( memory mem, rRegI newval, rFlagsReg cr) %{
   match(Set newval (GetAndAddS mem newval));
   effect(KILL cr);
   format %{ "XADDW  [$mem],$newval" %}
   ins_encode %{
-    if (os::is_MP()) { __ lock(); }
+    __ lock();
     __ xaddw($mem$$Address, $newval$$Register);
   %}
   ins_pipe( pipe_cmpxchg );
 %}
 

@@ -7754,22 +7748,22 @@
   predicate(n->as_LoadStore()->result_not_used());
   match(Set dummy (GetAndAddI mem add));
   effect(KILL cr);
   format %{ "ADDL  [$mem],$add" %}
   ins_encode %{
-    if (os::is_MP()) { __ lock(); }
+    __ lock();
     __ addl($mem$$Address, $add$$constant);
   %}
   ins_pipe( pipe_cmpxchg );
 %}
 
 instruct xaddI( memory mem, rRegI newval, rFlagsReg cr) %{
   match(Set newval (GetAndAddI mem newval));
   effect(KILL cr);
   format %{ "XADDL  [$mem],$newval" %}
   ins_encode %{
-    if (os::is_MP()) { __ lock(); }
+    __ lock();
     __ xaddl($mem$$Address, $newval$$Register);
   %}
   ins_pipe( pipe_cmpxchg );
 %}
 

@@ -7777,22 +7771,22 @@
   predicate(n->as_LoadStore()->result_not_used());
   match(Set dummy (GetAndAddL mem add));
   effect(KILL cr);
   format %{ "ADDQ  [$mem],$add" %}
   ins_encode %{
-    if (os::is_MP()) { __ lock(); }
+    __ lock();
     __ addq($mem$$Address, $add$$constant);
   %}
   ins_pipe( pipe_cmpxchg );
 %}
 
 instruct xaddL( memory mem, rRegL newval, rFlagsReg cr) %{
   match(Set newval (GetAndAddL mem newval));
   effect(KILL cr);
   format %{ "XADDQ  [$mem],$newval" %}
   ins_encode %{
-    if (os::is_MP()) { __ lock(); }
+    __ lock();
     __ xaddq($mem$$Address, $newval$$Register);
   %}
   ins_pipe( pipe_cmpxchg );
 %}
 
< prev index next >