comparison src/cpu/x86/vm/stubGenerator_x86_32.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
1372 // one less register, because needed values are on the argument stack. 1372 // one less register, because needed values are on the argument stack.
1373 // __ check_klass_subtype_fast_path(sub_klass, *super_klass*, temp, 1373 // __ check_klass_subtype_fast_path(sub_klass, *super_klass*, temp,
1374 // L_success, L_failure, NULL); 1374 // L_success, L_failure, NULL);
1375 assert_different_registers(sub_klass, temp); 1375 assert_different_registers(sub_klass, temp);
1376 1376
1377 int sc_offset = (klassOopDesc::header_size() * HeapWordSize + 1377 int sc_offset = in_bytes(Klass::secondary_super_cache_offset());
1378 Klass::secondary_super_cache_offset_in_bytes());
1379 1378
1380 // if the pointers are equal, we are done (e.g., String[] elements) 1379 // if the pointers are equal, we are done (e.g., String[] elements)
1381 __ cmpptr(sub_klass, super_klass_addr); 1380 __ cmpptr(sub_klass, super_klass_addr);
1382 LOCAL_JCC(Assembler::equal, L_success); 1381 LOCAL_JCC(Assembler::equal, L_success);
1383 1382
1785 // 32 30 24 16 8 2 0 1784 // 32 30 24 16 8 2 0
1786 // 1785 //
1787 // array_tag: typeArray = 0x3, objArray = 0x2, non-array = 0x0 1786 // array_tag: typeArray = 0x3, objArray = 0x2, non-array = 0x0
1788 // 1787 //
1789 1788
1790 int lh_offset = klassOopDesc::header_size() * HeapWordSize + 1789 int lh_offset = in_bytes(Klass::layout_helper_offset());
1791 Klass::layout_helper_offset_in_bytes();
1792 Address src_klass_lh_addr(rcx_src_klass, lh_offset); 1790 Address src_klass_lh_addr(rcx_src_klass, lh_offset);
1793 1791
1794 // Handle objArrays completely differently... 1792 // Handle objArrays completely differently...
1795 jint objArray_lh = Klass::array_layout_helper(T_OBJECT); 1793 jint objArray_lh = Klass::array_layout_helper(T_OBJECT);
1796 __ cmpl(src_klass_lh_addr, objArray_lh); 1794 __ cmpl(src_klass_lh_addr, objArray_lh);
1912 1910
1913 __ BIND(L_checkcast_copy); 1911 __ BIND(L_checkcast_copy);
1914 // live at this point: rcx_src_klass, dst[_pos], src[_pos] 1912 // live at this point: rcx_src_klass, dst[_pos], src[_pos]
1915 { 1913 {
1916 // Handy offsets: 1914 // Handy offsets:
1917 int ek_offset = (klassOopDesc::header_size() * HeapWordSize + 1915 int ek_offset = in_bytes(objArrayKlass::element_klass_offset());
1918 objArrayKlass::element_klass_offset_in_bytes()); 1916 int sco_offset = in_bytes(Klass::super_check_offset_offset());
1919 int sco_offset = (klassOopDesc::header_size() * HeapWordSize +
1920 Klass::super_check_offset_offset_in_bytes());
1921 1917
1922 Register rsi_dst_klass = rsi; 1918 Register rsi_dst_klass = rsi;
1923 Register rdi_temp = rdi; 1919 Register rdi_temp = rdi;
1924 assert(rsi_dst_klass == src_pos, "expected alias w/ src_pos"); 1920 assert(rsi_dst_klass == src_pos, "expected alias w/ src_pos");
1925 assert(rdi_temp == dst_pos, "expected alias w/ dst_pos"); 1921 assert(rdi_temp == dst_pos, "expected alias w/ dst_pos");
2320 2316
2321 // Build this early so it's available for the interpreter 2317 // Build this early so it's available for the interpreter
2322 StubRoutines::_throw_WrongMethodTypeException_entry = 2318 StubRoutines::_throw_WrongMethodTypeException_entry =
2323 generate_throw_exception("WrongMethodTypeException throw_exception", 2319 generate_throw_exception("WrongMethodTypeException throw_exception",
2324 CAST_FROM_FN_PTR(address, SharedRuntime::throw_WrongMethodTypeException), 2320 CAST_FROM_FN_PTR(address, SharedRuntime::throw_WrongMethodTypeException),
2325 false, rax, rcx); 2321 rax, rcx);
2322
2323 // Build this early so it's available for the interpreter
2324 StubRoutines::_throw_StackOverflowError_entry = generate_throw_exception("StackOverflowError throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_StackOverflowError));
2326 } 2325 }
2327 2326
2328 2327
2329 void generate_all() { 2328 void generate_all() {
2330 // Generates all stubs and initializes the entry points 2329 // Generates all stubs and initializes the entry points
2332 // These entry points require SharedInfo::stack0 to be set up in non-core builds 2331 // These entry points require SharedInfo::stack0 to be set up in non-core builds
2333 // and need to be relocatable, so they each fabricate a RuntimeStub internally. 2332 // and need to be relocatable, so they each fabricate a RuntimeStub internally.
2334 StubRoutines::_throw_AbstractMethodError_entry = generate_throw_exception("AbstractMethodError throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_AbstractMethodError)); 2333 StubRoutines::_throw_AbstractMethodError_entry = generate_throw_exception("AbstractMethodError throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_AbstractMethodError));
2335 StubRoutines::_throw_IncompatibleClassChangeError_entry= generate_throw_exception("IncompatibleClassChangeError throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_IncompatibleClassChangeError)); 2334 StubRoutines::_throw_IncompatibleClassChangeError_entry= generate_throw_exception("IncompatibleClassChangeError throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_IncompatibleClassChangeError));
2336 StubRoutines::_throw_NullPointerException_at_call_entry= generate_throw_exception("NullPointerException at call throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_NullPointerException_at_call)); 2335 StubRoutines::_throw_NullPointerException_at_call_entry= generate_throw_exception("NullPointerException at call throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_NullPointerException_at_call));
2337 StubRoutines::_throw_StackOverflowError_entry = generate_throw_exception("StackOverflowError throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_StackOverflowError));
2338 2336
2339 //------------------------------------------------------------------------------------------------------------------------ 2337 //------------------------------------------------------------------------------------------------------------------------
2340 // entry points that are platform specific 2338 // entry points that are platform specific
2341 2339
2342 // support for verify_oop (must happen after universe_init) 2340 // support for verify_oop (must happen after universe_init)