src/hotspot/cpu/sparc/stubGenerator_sparc.cpp
changeset 48807 fd8ccb37fce9
parent 48304 600997105565
child 49164 7e958a8ebcd3
equal deleted inserted replaced
48806:51fc22e5fb00 48807:fd8ccb37fce9
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 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.
   835     BarrierSet* bs = Universe::heap()->barrier_set();
   835     BarrierSet* bs = Universe::heap()->barrier_set();
   836     switch (bs->kind()) {
   836     switch (bs->kind()) {
   837       case BarrierSet::G1SATBCTLogging:
   837       case BarrierSet::G1SATBCTLogging:
   838         // With G1, don't generate the call if we statically know that the target in uninitialized
   838         // With G1, don't generate the call if we statically know that the target in uninitialized
   839         if (!dest_uninitialized) {
   839         if (!dest_uninitialized) {
       
   840           Register tmp = O5;
       
   841           assert_different_registers(addr, count, tmp);
       
   842           Label filtered;
       
   843           // Is marking active?
       
   844           if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) {
       
   845             __ ld(G2, in_bytes(JavaThread::satb_mark_queue_offset() + SATBMarkQueue::byte_offset_of_active()), tmp);
       
   846           } else {
       
   847             guarantee(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1,
       
   848                       "Assumption");
       
   849             __ ldsb(G2, in_bytes(JavaThread::satb_mark_queue_offset() + SATBMarkQueue::byte_offset_of_active()), tmp);
       
   850           }
       
   851           // Is marking active?
       
   852           __ cmp_and_br_short(tmp, G0, Assembler::equal, Assembler::pt, filtered);
       
   853 
   840           __ save_frame(0);
   854           __ save_frame(0);
   841           // Save the necessary global regs... will be used after.
   855           // Save the necessary global regs... will be used after.
   842           if (addr->is_global()) {
   856           if (addr->is_global()) {
   843             __ mov(addr, L0);
   857             __ mov(addr, L0);
   844           }
   858           }
   854           }
   868           }
   855           if (count->is_global()) {
   869           if (count->is_global()) {
   856             __ mov(L1, count);
   870             __ mov(L1, count);
   857           }
   871           }
   858           __ restore();
   872           __ restore();
       
   873 
       
   874           __ bind(filtered);
       
   875           DEBUG_ONLY(__ set(0xDEADC0DE, tmp);) // we have killed tmp
   859         }
   876         }
   860         break;
   877         break;
   861       case BarrierSet::CardTableForRS:
   878       case BarrierSet::CardTableForRS:
   862       case BarrierSet::CardTableExtension:
   879       case BarrierSet::CardTableExtension:
   863       case BarrierSet::ModRef:
   880       case BarrierSet::ModRef: