< prev index next >

src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp

Print this page
rev 7659 : [mq]: remove
   1 /*
   2  * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 464   assert(pre_val()->is_register(), "Precondition.");
 465   Register pre_val_reg = pre_val()->as_register();
 466 
 467   if (do_load()) {
 468     ce->mem2reg(addr(), pre_val(), T_OBJECT, patch_code(), info(), false /*wide*/, false /*unaligned*/);
 469   }
 470 
 471   if (__ is_in_wdisp16_range(_continuation)) {
 472     __ br_null(pre_val_reg, /*annul*/false, Assembler::pt, _continuation);
 473   } else {
 474     __ cmp(pre_val_reg, G0);
 475     __ brx(Assembler::equal, false, Assembler::pn, _continuation);
 476   }
 477   __ delayed()->nop();
 478 
 479   __ call(Runtime1::entry_for(Runtime1::Runtime1::g1_pre_barrier_slow_id));
 480   __ delayed()->mov(pre_val_reg, G4);
 481   __ br(Assembler::always, false, Assembler::pt, _continuation);
 482   __ delayed()->nop();
 483 
 484 }
 485 
 486 jbyte* G1PostBarrierStub::_byte_map_base = NULL;
 487 
 488 jbyte* G1PostBarrierStub::byte_map_base_slow() {
 489   BarrierSet* bs = Universe::heap()->barrier_set();
 490   assert(bs->is_a(BarrierSet::G1SATBCTLogging),
 491          "Must be if we're using this.");
 492   return ((G1SATBCardTableModRefBS*)bs)->byte_map_base;
 493 }
 494 
 495 void G1PostBarrierStub::emit_code(LIR_Assembler* ce) {
 496   __ bind(_entry);
 497 
 498   assert(addr()->is_register(), "Precondition.");
 499   assert(new_val()->is_register(), "Precondition.");
 500   Register addr_reg = addr()->as_pointer_register();
 501   Register new_val_reg = new_val()->as_register();
 502 
 503   if (__ is_in_wdisp16_range(_continuation)) {
 504     __ br_null(new_val_reg, /*annul*/false, Assembler::pt, _continuation);
 505   } else {
 506     __ cmp(new_val_reg, G0);
 507     __ brx(Assembler::equal, false, Assembler::pn, _continuation);
 508   }
 509   __ delayed()->nop();
 510 
 511   __ call(Runtime1::entry_for(Runtime1::Runtime1::g1_post_barrier_slow_id));
 512   __ delayed()->mov(addr_reg, G4);
   1 /*
   2  * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 464   assert(pre_val()->is_register(), "Precondition.");
 465   Register pre_val_reg = pre_val()->as_register();
 466 
 467   if (do_load()) {
 468     ce->mem2reg(addr(), pre_val(), T_OBJECT, patch_code(), info(), false /*wide*/, false /*unaligned*/);
 469   }
 470 
 471   if (__ is_in_wdisp16_range(_continuation)) {
 472     __ br_null(pre_val_reg, /*annul*/false, Assembler::pt, _continuation);
 473   } else {
 474     __ cmp(pre_val_reg, G0);
 475     __ brx(Assembler::equal, false, Assembler::pn, _continuation);
 476   }
 477   __ delayed()->nop();
 478 
 479   __ call(Runtime1::entry_for(Runtime1::Runtime1::g1_pre_barrier_slow_id));
 480   __ delayed()->mov(pre_val_reg, G4);
 481   __ br(Assembler::always, false, Assembler::pt, _continuation);
 482   __ delayed()->nop();
 483 









 484 }
 485 
 486 void G1PostBarrierStub::emit_code(LIR_Assembler* ce) {
 487   __ bind(_entry);
 488 
 489   assert(addr()->is_register(), "Precondition.");
 490   assert(new_val()->is_register(), "Precondition.");
 491   Register addr_reg = addr()->as_pointer_register();
 492   Register new_val_reg = new_val()->as_register();
 493 
 494   if (__ is_in_wdisp16_range(_continuation)) {
 495     __ br_null(new_val_reg, /*annul*/false, Assembler::pt, _continuation);
 496   } else {
 497     __ cmp(new_val_reg, G0);
 498     __ brx(Assembler::equal, false, Assembler::pn, _continuation);
 499   }
 500   __ delayed()->nop();
 501 
 502   __ call(Runtime1::entry_for(Runtime1::Runtime1::g1_post_barrier_slow_id));
 503   __ delayed()->mov(addr_reg, G4);
< prev index next >