src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 7008809 Sdiff src/cpu/sparc/vm

src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp

Print this page


   1 /*
   2  * Copyright (c) 1999, 2010, 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  *


 112 
 113 
 114 // Implementation of SimpleExceptionStub
 115 // Note: %g1 and %g3 are already in use
 116 void SimpleExceptionStub::emit_code(LIR_Assembler* ce) {
 117   __ bind(_entry);
 118   __ call(Runtime1::entry_for(_stub), relocInfo::runtime_call_type);
 119 
 120   if (_obj->is_valid()) {
 121     __ delayed()->mov(_obj->as_register(), G4); // _obj contains the optional argument to the stub
 122   } else {
 123     __ delayed()->mov(G0, G4);
 124   }
 125   ce->add_call_info_here(_info);
 126 #ifdef ASSERT
 127   __ should_not_reach_here();
 128 #endif
 129 }
 130 
 131 
 132 // Implementation of ArrayStoreExceptionStub
 133 
 134 ArrayStoreExceptionStub::ArrayStoreExceptionStub(CodeEmitInfo* info):
 135   _info(info) {
 136 }
 137 
 138 
 139 void ArrayStoreExceptionStub::emit_code(LIR_Assembler* ce) {
 140   __ bind(_entry);
 141   __ call(Runtime1::entry_for(Runtime1::throw_array_store_exception_id), relocInfo::runtime_call_type);
 142   __ delayed()->nop();
 143   ce->add_call_info_here(_info);
 144   ce->verify_oop_map(_info);
 145 #ifdef ASSERT
 146   __ should_not_reach_here();
 147 #endif
 148 }
 149 
 150 
 151 
 152 
 153 // Implementation of NewInstanceStub
 154 
 155 NewInstanceStub::NewInstanceStub(LIR_Opr klass_reg, LIR_Opr result, ciInstanceKlass* klass, CodeEmitInfo* info, Runtime1::StubID stub_id) {
 156   _result = result;
 157   _klass = klass;
 158   _klass_reg = klass_reg;
 159   _info = new CodeEmitInfo(info);
 160   assert(stub_id == Runtime1::new_instance_id                 ||
 161          stub_id == Runtime1::fast_new_instance_id            ||
 162          stub_id == Runtime1::fast_new_instance_init_check_id,
 163          "need new_instance id");
 164   _stub_id   = stub_id;
 165 }
 166 
 167 
 168 void NewInstanceStub::emit_code(LIR_Assembler* ce) {
 169   __ bind(_entry);
 170   __ call(Runtime1::entry_for(_stub_id), relocInfo::runtime_call_type);
 171   __ delayed()->mov_or_nop(_klass_reg->as_register(), G5);
 172   ce->add_call_info_here(_info);


   1 /*
   2  * Copyright (c) 1999, 2011, 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  *


 112 
 113 
 114 // Implementation of SimpleExceptionStub
 115 // Note: %g1 and %g3 are already in use
 116 void SimpleExceptionStub::emit_code(LIR_Assembler* ce) {
 117   __ bind(_entry);
 118   __ call(Runtime1::entry_for(_stub), relocInfo::runtime_call_type);
 119 
 120   if (_obj->is_valid()) {
 121     __ delayed()->mov(_obj->as_register(), G4); // _obj contains the optional argument to the stub
 122   } else {
 123     __ delayed()->mov(G0, G4);
 124   }
 125   ce->add_call_info_here(_info);
 126 #ifdef ASSERT
 127   __ should_not_reach_here();
 128 #endif
 129 }
 130 
 131 





















 132 // Implementation of NewInstanceStub
 133 
 134 NewInstanceStub::NewInstanceStub(LIR_Opr klass_reg, LIR_Opr result, ciInstanceKlass* klass, CodeEmitInfo* info, Runtime1::StubID stub_id) {
 135   _result = result;
 136   _klass = klass;
 137   _klass_reg = klass_reg;
 138   _info = new CodeEmitInfo(info);
 139   assert(stub_id == Runtime1::new_instance_id                 ||
 140          stub_id == Runtime1::fast_new_instance_id            ||
 141          stub_id == Runtime1::fast_new_instance_init_check_id,
 142          "need new_instance id");
 143   _stub_id   = stub_id;
 144 }
 145 
 146 
 147 void NewInstanceStub::emit_code(LIR_Assembler* ce) {
 148   __ bind(_entry);
 149   __ call(Runtime1::entry_for(_stub_id), relocInfo::runtime_call_type);
 150   __ delayed()->mov_or_nop(_klass_reg->as_register(), G5);
 151   ce->add_call_info_here(_info);


src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File