comparison src/cpu/sparc/vm/stubGenerator_sparc.cpp @ 4970:33df1aeaebbf

Merge with http://hg.openjdk.java.net/hsx/hsx24/hotspot/
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Mon, 27 Feb 2012 13:10:13 +0100
parents 04b9a2566eec 22cee0ee8927
children 1c7c5be93e84
comparison
equal deleted inserted replaced
4703:2cfb7fb2dce7 4970:33df1aeaebbf
3044 // 32 30 24 16 8 2 0 3044 // 32 30 24 16 8 2 0
3045 // 3045 //
3046 // array_tag: typeArray = 0x3, objArray = 0x2, non-array = 0x0 3046 // array_tag: typeArray = 0x3, objArray = 0x2, non-array = 0x0
3047 // 3047 //
3048 3048
3049 int lh_offset = klassOopDesc::header_size() * HeapWordSize + 3049 int lh_offset = in_bytes(Klass::layout_helper_offset());
3050 Klass::layout_helper_offset_in_bytes();
3051 3050
3052 // Load 32-bits signed value. Use br() instruction with it to check icc. 3051 // Load 32-bits signed value. Use br() instruction with it to check icc.
3053 __ lduw(G3_src_klass, lh_offset, G5_lh); 3052 __ lduw(G3_src_klass, lh_offset, G5_lh);
3054 3053
3055 if (UseCompressedOops) { 3054 if (UseCompressedOops) {
3192 Register sco_temp = O3; // this register is free now 3191 Register sco_temp = O3; // this register is free now
3193 assert_different_registers(from, to, count, sco_temp, 3192 assert_different_registers(from, to, count, sco_temp,
3194 G4_dst_klass, G3_src_klass); 3193 G4_dst_klass, G3_src_klass);
3195 3194
3196 // Generate the type check. 3195 // Generate the type check.
3197 int sco_offset = (klassOopDesc::header_size() * HeapWordSize + 3196 int sco_offset = in_bytes(Klass::super_check_offset_offset());
3198 Klass::super_check_offset_offset_in_bytes());
3199 __ lduw(G4_dst_klass, sco_offset, sco_temp); 3197 __ lduw(G4_dst_klass, sco_offset, sco_temp);
3200 generate_type_check(G3_src_klass, sco_temp, G4_dst_klass, 3198 generate_type_check(G3_src_klass, sco_temp, G4_dst_klass,
3201 O5_temp, L_plain_copy); 3199 O5_temp, L_plain_copy);
3202 3200
3203 // Fetch destination element klass from the objArrayKlass header. 3201 // Fetch destination element klass from the objArrayKlass header.
3204 int ek_offset = (klassOopDesc::header_size() * HeapWordSize + 3202 int ek_offset = in_bytes(objArrayKlass::element_klass_offset());
3205 objArrayKlass::element_klass_offset_in_bytes());
3206 3203
3207 // the checkcast_copy loop needs two extra arguments: 3204 // the checkcast_copy loop needs two extra arguments:
3208 __ ld_ptr(G4_dst_klass, ek_offset, O4); // dest elem klass 3205 __ ld_ptr(G4_dst_klass, ek_offset, O4); // dest elem klass
3209 // lduw(O4, sco_offset, O3); // sco of elem klass 3206 // lduw(O4, sco_offset, O3); // sco of elem klass
3210 3207
3411 // stub expects the required and actual type to already be in O1 3408 // stub expects the required and actual type to already be in O1
3412 // and O2 respectively. 3409 // and O2 respectively.
3413 StubRoutines::_throw_WrongMethodTypeException_entry = 3410 StubRoutines::_throw_WrongMethodTypeException_entry =
3414 generate_throw_exception("WrongMethodTypeException throw_exception", 3411 generate_throw_exception("WrongMethodTypeException throw_exception",
3415 CAST_FROM_FN_PTR(address, SharedRuntime::throw_WrongMethodTypeException), 3412 CAST_FROM_FN_PTR(address, SharedRuntime::throw_WrongMethodTypeException),
3416 false, G5_method_type, G3_method_handle); 3413 G5_method_type, G3_method_handle);
3414
3415 // Build this early so it's available for the interpreter.
3416 StubRoutines::_throw_StackOverflowError_entry = generate_throw_exception("StackOverflowError throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_StackOverflowError));
3417 } 3417 }
3418 3418
3419 3419
3420 void generate_all() { 3420 void generate_all() {
3421 // Generates all stubs and initializes the entry points 3421 // Generates all stubs and initializes the entry points
3425 StubRoutines::Sparc::_partial_subtype_check = generate_partial_subtype_check(); 3425 StubRoutines::Sparc::_partial_subtype_check = generate_partial_subtype_check();
3426 // These entry points require SharedInfo::stack0 to be set up in non-core builds 3426 // These entry points require SharedInfo::stack0 to be set up in non-core builds
3427 StubRoutines::_throw_AbstractMethodError_entry = generate_throw_exception("AbstractMethodError throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_AbstractMethodError)); 3427 StubRoutines::_throw_AbstractMethodError_entry = generate_throw_exception("AbstractMethodError throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_AbstractMethodError));
3428 StubRoutines::_throw_IncompatibleClassChangeError_entry= generate_throw_exception("IncompatibleClassChangeError throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_IncompatibleClassChangeError)); 3428 StubRoutines::_throw_IncompatibleClassChangeError_entry= generate_throw_exception("IncompatibleClassChangeError throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_IncompatibleClassChangeError));
3429 StubRoutines::_throw_NullPointerException_at_call_entry= generate_throw_exception("NullPointerException at call throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_NullPointerException_at_call)); 3429 StubRoutines::_throw_NullPointerException_at_call_entry= generate_throw_exception("NullPointerException at call throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_NullPointerException_at_call));
3430 StubRoutines::_throw_StackOverflowError_entry = generate_throw_exception("StackOverflowError throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_StackOverflowError));
3431 3430
3432 StubRoutines::_handler_for_unsafe_access_entry = 3431 StubRoutines::_handler_for_unsafe_access_entry =
3433 generate_handler_for_unsafe_access(); 3432 generate_handler_for_unsafe_access();
3434 3433
3435 // support for verify_oop (must happen after universe_init) 3434 // support for verify_oop (must happen after universe_init)