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

src/cpu/x86/vm/c1_CodeStubs_x86.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  *


 391 void ImplicitNullCheckStub::emit_code(LIR_Assembler* ce) {
 392   ce->compilation()->implicit_exception_table()->append(_offset, __ offset());
 393   __ bind(_entry);
 394   __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::throw_null_pointer_exception_id)));
 395   ce->add_call_info_here(_info);
 396   debug_only(__ should_not_reach_here());
 397 }
 398 
 399 
 400 void SimpleExceptionStub::emit_code(LIR_Assembler* ce) {
 401   assert(__ rsp_offset() == 0, "frame size should be fixed");
 402 
 403   __ bind(_entry);
 404   // pass the object on stack because all registers must be preserved
 405   if (_obj->is_cpu_register()) {
 406     ce->store_parameter(_obj->as_register(), 0);
 407   }
 408   __ call(RuntimeAddress(Runtime1::entry_for(_stub)));
 409   ce->add_call_info_here(_info);
 410   debug_only(__ should_not_reach_here());
 411 }
 412 
 413 
 414 ArrayStoreExceptionStub::ArrayStoreExceptionStub(CodeEmitInfo* info):
 415   _info(info) {
 416 }
 417 
 418 
 419 void ArrayStoreExceptionStub::emit_code(LIR_Assembler* ce) {
 420   assert(__ rsp_offset() == 0, "frame size should be fixed");
 421   __ bind(_entry);
 422   __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::throw_array_store_exception_id)));
 423   ce->add_call_info_here(_info);
 424   debug_only(__ should_not_reach_here());
 425 }
 426 
 427 
 428 void ArrayCopyStub::emit_code(LIR_Assembler* ce) {
 429   //---------------slow case: call to native-----------------
 430   __ bind(_entry);
 431   // Figure out where the args should go
 432   // This should really convert the IntrinsicID to the methodOop and signature
 433   // but I don't know how to do that.
 434   //
 435   VMRegPair args[5];
 436   BasicType signature[5] = { T_OBJECT, T_INT, T_OBJECT, T_INT, T_INT};
 437   SharedRuntime::java_calling_convention(signature, args, 5, true);
 438 
 439   // push parameters
 440   // (src, src_pos, dest, destPos, length)
 441   Register r[5];
 442   r[0] = src()->as_register();
 443   r[1] = src_pos()->as_register();
 444   r[2] = dst()->as_register();


   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  *


 391 void ImplicitNullCheckStub::emit_code(LIR_Assembler* ce) {
 392   ce->compilation()->implicit_exception_table()->append(_offset, __ offset());
 393   __ bind(_entry);
 394   __ call(RuntimeAddress(Runtime1::entry_for(Runtime1::throw_null_pointer_exception_id)));
 395   ce->add_call_info_here(_info);
 396   debug_only(__ should_not_reach_here());
 397 }
 398 
 399 
 400 void SimpleExceptionStub::emit_code(LIR_Assembler* ce) {
 401   assert(__ rsp_offset() == 0, "frame size should be fixed");
 402 
 403   __ bind(_entry);
 404   // pass the object on stack because all registers must be preserved
 405   if (_obj->is_cpu_register()) {
 406     ce->store_parameter(_obj->as_register(), 0);
 407   }
 408   __ call(RuntimeAddress(Runtime1::entry_for(_stub)));
 409   ce->add_call_info_here(_info);
 410   debug_only(__ should_not_reach_here());














 411 }
 412 
 413 
 414 void ArrayCopyStub::emit_code(LIR_Assembler* ce) {
 415   //---------------slow case: call to native-----------------
 416   __ bind(_entry);
 417   // Figure out where the args should go
 418   // This should really convert the IntrinsicID to the methodOop and signature
 419   // but I don't know how to do that.
 420   //
 421   VMRegPair args[5];
 422   BasicType signature[5] = { T_OBJECT, T_INT, T_OBJECT, T_INT, T_INT};
 423   SharedRuntime::java_calling_convention(signature, args, 5, true);
 424 
 425   // push parameters
 426   // (src, src_pos, dest, destPos, length)
 427   Register r[5];
 428   r[0] = src()->as_register();
 429   r[1] = src_pos()->as_register();
 430   r[2] = dst()->as_register();


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