< prev index next >
src/hotspot/cpu/x86/x86_64.ad
Print this page
*** 1,7 ****
//
! // Copyright (c) 2003, 2017, 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.
--- 1,7 ----
//
! // 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,2351 ****
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) {
--- 2339,2349 ----
*** 6508,6522 ****
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);
--- 6506,6516 ----
*** 7708,7729 ****
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 );
%}
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(); }
__ xaddb($mem$$Address, $newval$$Register);
%}
ins_pipe( pipe_cmpxchg );
%}
--- 7702,7723 ----
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 );
%}
instruct xaddB( memory mem, rRegI newval, rFlagsReg 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 );
%}
*** 7731,7752 ****
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(); }
__ 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(); }
__ xaddw($mem$$Address, $newval$$Register);
%}
ins_pipe( pipe_cmpxchg );
%}
--- 7725,7746 ----
predicate(n->as_LoadStore()->result_not_used());
match(Set dummy (GetAndAddS mem add));
effect(KILL cr);
format %{ "ADDW [$mem],$add" %}
ins_encode %{
! __ 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 %{
! __ lock();
__ xaddw($mem$$Address, $newval$$Register);
%}
ins_pipe( pipe_cmpxchg );
%}
*** 7754,7775 ****
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, rFlagsReg 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 );
%}
--- 7748,7769 ----
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, rFlagsReg 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 );
%}
*** 7777,7798 ****
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(); }
__ 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(); }
__ xaddq($mem$$Address, $newval$$Register);
%}
ins_pipe( pipe_cmpxchg );
%}
--- 7771,7792 ----
predicate(n->as_LoadStore()->result_not_used());
match(Set dummy (GetAndAddL mem add));
effect(KILL cr);
format %{ "ADDQ [$mem],$add" %}
ins_encode %{
! __ 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 %{
! __ lock();
__ xaddq($mem$$Address, $newval$$Register);
%}
ins_pipe( pipe_cmpxchg );
%}
< prev index next >