< prev index next >

src/hotspot/cpu/x86/x86_32.ad

Print this page

        

*** 2085,2095 **** 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 --- 2085,2094 ----
*** 2100,2110 **** // 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 ); --- 2099,2108 ----
*** 2113,2145 **** 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); --- 2111,2140 ----
*** 6672,6686 **** 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); --- 6667,6677 ----
*** 7281,7291 **** // 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 ); --- 7272,7281 ----
*** 7407,7417 **** 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(); } __ addb($mem$$Address, $add$$constant); %} ins_pipe( pipe_cmpxchg ); %} --- 7397,7407 ---- predicate(n->as_LoadStore()->result_not_used()); match(Set dummy (GetAndAddB mem add)); effect(KILL cr); format %{ "ADDB [$mem],$add" %} ins_encode %{ ! __ lock(); __ addb($mem$$Address, $add$$constant); %} ins_pipe( pipe_cmpxchg ); %}
*** 7419,7429 **** 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(); } __ xaddb($mem$$Address, $newval$$Register); %} ins_pipe( pipe_cmpxchg ); %} --- 7409,7419 ---- instruct xaddB( memory mem, xRegI newval, eFlagsReg cr) %{ match(Set newval (GetAndAddB mem newval)); effect(KILL cr); format %{ "XADDB [$mem],$newval" %} ins_encode %{ ! __ lock(); __ xaddb($mem$$Address, $newval$$Register); %} ins_pipe( pipe_cmpxchg ); %}
*** 7431,7452 **** 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(); } __ 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(); } __ xaddw($mem$$Address, $newval$$Register); %} ins_pipe( pipe_cmpxchg ); %} --- 7421,7442 ---- predicate(n->as_LoadStore()->result_not_used()); match(Set dummy (GetAndAddS mem add)); effect(KILL cr); format %{ "ADDS [$mem],$add" %} ins_encode %{ ! __ 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 %{ ! __ lock(); __ xaddw($mem$$Address, $newval$$Register); %} ins_pipe( pipe_cmpxchg ); %}
*** 7454,7475 **** 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(); } __ 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(); } __ xaddl($mem$$Address, $newval$$Register); %} ins_pipe( pipe_cmpxchg ); %} --- 7444,7465 ---- predicate(n->as_LoadStore()->result_not_used()); match(Set dummy (GetAndAddI mem add)); effect(KILL cr); format %{ "ADDL [$mem],$add" %} ins_encode %{ ! __ 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 %{ ! __ lock(); __ xaddl($mem$$Address, $newval$$Register); %} ins_pipe( pipe_cmpxchg ); %}
< prev index next >