equal
deleted
inserted
replaced
1 // |
1 // |
2 // Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. |
2 // Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. |
3 // Copyright (c) 2014, Red Hat Inc. All rights reserved. |
3 // Copyright (c) 2014, Red Hat Inc. All rights reserved. |
4 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 // |
5 // |
6 // This code is free software; you can redistribute it and/or modify it |
6 // This code is free software; you can redistribute it and/or modify it |
7 // under the terms of the GNU General Public License version 2 only, as |
7 // under the terms of the GNU General Public License version 2 only, as |
993 // This is a block of C++ code which provides values, functions, and |
993 // This is a block of C++ code which provides values, functions, and |
994 // definitions necessary in the rest of the architecture description |
994 // definitions necessary in the rest of the architecture description |
995 |
995 |
996 source_hpp %{ |
996 source_hpp %{ |
997 |
997 |
|
998 #include "gc/shared/cardTable.hpp" |
998 #include "gc/shared/cardTableModRefBS.hpp" |
999 #include "gc/shared/cardTableModRefBS.hpp" |
999 #include "opto/addnode.hpp" |
1000 #include "opto/addnode.hpp" |
1000 |
1001 |
1001 class CallStubImpl { |
1002 class CallStubImpl { |
1002 |
1003 |
4436 MacroAssembler _masm(&cbuf); |
4437 MacroAssembler _masm(&cbuf); |
4437 guarantee($mem$$index == -1 && $mem$$disp == 0, "impossible encoding"); |
4438 guarantee($mem$$index == -1 && $mem$$disp == 0, "impossible encoding"); |
4438 __ cmpxchg($mem$$base$$Register, $oldval$$Register, $newval$$Register, |
4439 __ cmpxchg($mem$$base$$Register, $oldval$$Register, $newval$$Register, |
4439 Assembler::byte, /*acquire*/ false, /*release*/ true, |
4440 Assembler::byte, /*acquire*/ false, /*release*/ true, |
4440 /*weak*/ false, noreg); |
4441 /*weak*/ false, noreg); |
4441 %} |
4442 %} |
4442 |
4443 |
4443 |
4444 |
4444 // The only difference between aarch64_enc_cmpxchg and |
4445 // The only difference between aarch64_enc_cmpxchg and |
4445 // aarch64_enc_cmpxchg_acq is that we use load-acquire in the |
4446 // aarch64_enc_cmpxchg_acq is that we use load-acquire in the |
4446 // CompareAndSwap sequence to serve as a barrier on acquiring a |
4447 // CompareAndSwap sequence to serve as a barrier on acquiring a |
4447 // lock. |
4448 // lock. |
5843 // Card Table Byte Map Base |
5844 // Card Table Byte Map Base |
5844 operand immByteMapBase() |
5845 operand immByteMapBase() |
5845 %{ |
5846 %{ |
5846 // Get base of card map |
5847 // Get base of card map |
5847 predicate(Universe::heap()->barrier_set()->is_a(BarrierSet::CardTableModRef) && |
5848 predicate(Universe::heap()->barrier_set()->is_a(BarrierSet::CardTableModRef) && |
5848 (jbyte*)n->get_ptr() == ((CardTableModRefBS*)(Universe::heap()->barrier_set()))->byte_map_base); |
5849 (jbyte*)n->get_ptr() == ((CardTableModRefBS*)(Universe::heap()->barrier_set()))->card_table()->byte_map_base()); |
5849 match(ConP); |
5850 match(ConP); |
5850 |
5851 |
5851 op_cost(0); |
5852 op_cost(0); |
5852 format %{ %} |
5853 format %{ %} |
5853 interface(CONST_INTER); |
5854 interface(CONST_INTER); |