hotspot/src/cpu/sparc/vm/macroAssembler_sparc.cpp
changeset 35470 75c679ad0747
parent 35214 d86005e0b4c2
child 35495 e27da438fa13
equal deleted inserted replaced
35469:17ea1b453dd5 35470:75c679ad0747
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2016, 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.
  3398   srl_ptr(t1, LogHeapWordSize, t1);
  3398   srl_ptr(t1, LogHeapWordSize, t1);
  3399 
  3399 
  3400   // Retain tlab and allocate object in shared space if
  3400   // Retain tlab and allocate object in shared space if
  3401   // the amount free in the tlab is too large to discard.
  3401   // the amount free in the tlab is too large to discard.
  3402   cmp(t1, t2);
  3402   cmp(t1, t2);
       
  3403 
  3403   brx(Assembler::lessEqual, false, Assembler::pt, discard_tlab);
  3404   brx(Assembler::lessEqual, false, Assembler::pt, discard_tlab);
  3404 
       
  3405   // increment waste limit to prevent getting stuck on this slow path
  3405   // increment waste limit to prevent getting stuck on this slow path
  3406   delayed()->add(t2, ThreadLocalAllocBuffer::refill_waste_limit_increment(), t2);
  3406   if (Assembler::is_simm13(ThreadLocalAllocBuffer::refill_waste_limit_increment())) {
       
  3407     delayed()->add(t2, ThreadLocalAllocBuffer::refill_waste_limit_increment(), t2);
       
  3408   } else {
       
  3409     delayed()->nop();
       
  3410     // set64 does not use the temp register if the given constant is 32 bit. So
       
  3411     // we can just use any register; using G0 results in ignoring of the upper 32 bit
       
  3412     // of that value.
       
  3413     set64(ThreadLocalAllocBuffer::refill_waste_limit_increment(), t3, G0);
       
  3414     add(t2, t3, t2);
       
  3415   }
       
  3416 
  3407   st_ptr(t2, G2_thread, in_bytes(JavaThread::tlab_refill_waste_limit_offset()));
  3417   st_ptr(t2, G2_thread, in_bytes(JavaThread::tlab_refill_waste_limit_offset()));
  3408   if (TLABStats) {
  3418   if (TLABStats) {
  3409     // increment number of slow_allocations
  3419     // increment number of slow_allocations
  3410     ld(G2_thread, in_bytes(JavaThread::tlab_slow_allocations_offset()), t2);
  3420     ld(G2_thread, in_bytes(JavaThread::tlab_slow_allocations_offset()), t2);
  3411     add(t2, 1, t2);
  3421     add(t2, 1, t2);