< prev index next >

src/hotspot/cpu/x86/x86_32.ad

Print this page

        

@@ -2085,11 +2085,10 @@
     emit_rm(cbuf, 0x00, $t1$$reg, 0x05 );
     emit_d32(cbuf, 0x00);
   %}
 
   enc_class lock_prefix( ) %{
-    if( os::is_MP() )
       emit_opcode(cbuf,0xF0);         // [Lock]
   %}
 
   // Cmp-xchg long value.
   // Note: we need to swap rbx, and rcx before and after the

@@ -2100,11 +2099,10 @@
 
     // XCHG  rbx,ecx
     emit_opcode(cbuf,0x87);
     emit_opcode(cbuf,0xD9);
     // [Lock]
-    if( os::is_MP() )
       emit_opcode(cbuf,0xF0);
     // CMPXCHG8 [Eptr]
     emit_opcode(cbuf,0x0F);
     emit_opcode(cbuf,0xC7);
     emit_rm( cbuf, 0x0, 1, $mem_ptr$$reg );

@@ -2113,33 +2111,30 @@
     emit_opcode(cbuf,0xD9);
   %}
 
   enc_class enc_cmpxchg(eSIRegP mem_ptr) %{
     // [Lock]
-    if( os::is_MP() )
       emit_opcode(cbuf,0xF0);
 
     // CMPXCHG [Eptr]
     emit_opcode(cbuf,0x0F);
     emit_opcode(cbuf,0xB1);
     emit_rm( cbuf, 0x0, 1, $mem_ptr$$reg );
   %}
 
   enc_class enc_cmpxchgb(eSIRegP mem_ptr) %{
     // [Lock]
-    if( os::is_MP() )
       emit_opcode(cbuf,0xF0);
 
     // CMPXCHGB [Eptr]
     emit_opcode(cbuf,0x0F);
     emit_opcode(cbuf,0xB0);
     emit_rm( cbuf, 0x0, 1, $mem_ptr$$reg );
   %}
 
   enc_class enc_cmpxchgw(eSIRegP mem_ptr) %{
     // [Lock]
-    if( os::is_MP() )
       emit_opcode(cbuf,0xF0);
 
     // 16-bit mode
     emit_opcode(cbuf, 0x66);
 

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

@@ -7281,11 +7272,10 @@
     // Note: we need to swap rbx, and rcx before and after the
     //       cmpxchg8 instruction because the instruction uses
     //       rcx as the high order word of the new value to store but
     //       our register encoding uses rbx.
     __ xchgl(as_Register(EBX_enc), as_Register(ECX_enc));
-    if( os::is_MP() )
       __ lock();
     __ cmpxchg8($mem$$Address);
     __ xchgl(as_Register(EBX_enc), as_Register(ECX_enc));
   %}
   ins_pipe( pipe_cmpxchg );

@@ -7407,11 +7397,11 @@
   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 );
 %}
 

@@ -7419,11 +7409,11 @@
 instruct xaddB( memory mem, xRegI newval, eFlagsReg 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 );
 %}
 

@@ -7431,22 +7421,22 @@
   predicate(n->as_LoadStore()->result_not_used());
   match(Set dummy (GetAndAddS mem add));
   effect(KILL cr);
   format %{ "ADDS  [$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, eFlagsReg cr) %{
   match(Set newval (GetAndAddS mem newval));
   effect(KILL cr);
   format %{ "XADDS  [$mem],$newval" %}
   ins_encode %{
-    if (os::is_MP()) { __ lock(); }
+    __ lock();
     __ xaddw($mem$$Address, $newval$$Register);
   %}
   ins_pipe( pipe_cmpxchg );
 %}
 

@@ -7454,22 +7444,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, eFlagsReg 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 );
 %}
 
< prev index next >