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 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
1199 BarrierSet* bs = Universe::heap()->barrier_set(); |
1199 BarrierSet* bs = Universe::heap()->barrier_set(); |
1200 switch (bs->kind()) { |
1200 switch (bs->kind()) { |
1201 case BarrierSet::G1SATBCTLogging: |
1201 case BarrierSet::G1SATBCTLogging: |
1202 // With G1, don't generate the call if we statically know that the target in uninitialized |
1202 // With G1, don't generate the call if we statically know that the target in uninitialized |
1203 if (!dest_uninitialized) { |
1203 if (!dest_uninitialized) { |
|
1204 Label filtered; |
|
1205 Address in_progress(r15_thread, in_bytes(JavaThread::satb_mark_queue_offset() + |
|
1206 SATBMarkQueue::byte_offset_of_active())); |
|
1207 // Is marking active? |
|
1208 if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) { |
|
1209 __ cmpl(in_progress, 0); |
|
1210 } else { |
|
1211 assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "Assumption"); |
|
1212 __ cmpb(in_progress, 0); |
|
1213 } |
|
1214 __ jcc(Assembler::equal, filtered); |
|
1215 |
1204 __ pusha(); // push registers |
1216 __ pusha(); // push registers |
1205 if (count == c_rarg0) { |
1217 if (count == c_rarg0) { |
1206 if (addr == c_rarg1) { |
1218 if (addr == c_rarg1) { |
1207 // exactly backwards!! |
1219 // exactly backwards!! |
1208 __ xchgptr(c_rarg1, c_rarg0); |
1220 __ xchgptr(c_rarg1, c_rarg0); |
1214 __ movptr(c_rarg0, addr); |
1226 __ movptr(c_rarg0, addr); |
1215 __ movptr(c_rarg1, count); |
1227 __ movptr(c_rarg1, count); |
1216 } |
1228 } |
1217 __ call_VM_leaf(CAST_FROM_FN_PTR(address, BarrierSet::static_write_ref_array_pre), 2); |
1229 __ call_VM_leaf(CAST_FROM_FN_PTR(address, BarrierSet::static_write_ref_array_pre), 2); |
1218 __ popa(); |
1230 __ popa(); |
|
1231 |
|
1232 __ bind(filtered); |
1219 } |
1233 } |
1220 break; |
1234 break; |
1221 case BarrierSet::CardTableForRS: |
1235 case BarrierSet::CardTableForRS: |
1222 case BarrierSet::CardTableExtension: |
1236 case BarrierSet::CardTableExtension: |
1223 case BarrierSet::ModRef: |
1237 case BarrierSet::ModRef: |