comparison src/cpu/x86/vm/sharedRuntime_x86_32.cpp @ 512:db4caa99ef11

6787106: Hotspot 32 bit build fails on platforms having different definitions for intptr_t & int32_t Summary: Avoid casting between int32_t and intptr_t specifically for MasmAssembler::movptr in 32 bit platforms. Reviewed-by: jrose, kvn
author xlu
date Wed, 24 Dec 2008 13:06:09 -0800
parents dc7f315e41f7
children c9004fe53695
comparison
equal deleted inserted replaced
511:dabd8d202164 512:db4caa99ef11
1791 } 1791 }
1792 1792
1793 // reset handle block 1793 // reset handle block
1794 __ movptr(rcx, Address(thread, JavaThread::active_handles_offset())); 1794 __ movptr(rcx, Address(thread, JavaThread::active_handles_offset()));
1795 1795
1796 __ movptr(Address(rcx, JNIHandleBlock::top_offset_in_bytes()), (int32_t)NULL_WORD); 1796 __ movptr(Address(rcx, JNIHandleBlock::top_offset_in_bytes()), NULL_WORD);
1797 1797
1798 // Any exception pending? 1798 // Any exception pending?
1799 __ cmpptr(Address(thread, in_bytes(Thread::pending_exception_offset())), (int32_t)NULL_WORD); 1799 __ cmpptr(Address(thread, in_bytes(Thread::pending_exception_offset())), (int32_t)NULL_WORD);
1800 __ jcc(Assembler::notEqual, exception_pending); 1800 __ jcc(Assembler::notEqual, exception_pending);
1801 1801
1863 save_native_result(masm, ret_type, stack_slots); 1863 save_native_result(masm, ret_type, stack_slots);
1864 } 1864 }
1865 // Save pending exception around call to VM (which contains an EXCEPTION_MARK) 1865 // Save pending exception around call to VM (which contains an EXCEPTION_MARK)
1866 1866
1867 __ pushptr(Address(thread, in_bytes(Thread::pending_exception_offset()))); 1867 __ pushptr(Address(thread, in_bytes(Thread::pending_exception_offset())));
1868 __ movptr(Address(thread, in_bytes(Thread::pending_exception_offset())), (int32_t)NULL_WORD); 1868 __ movptr(Address(thread, in_bytes(Thread::pending_exception_offset())), NULL_WORD);
1869 1869
1870 1870
1871 // should be a peal 1871 // should be a peal
1872 // +wordSize because of the push above 1872 // +wordSize because of the push above
1873 __ lea(rax, Address(rbp, lock_slot_rbp_offset)); 1873 __ lea(rax, Address(rbp, lock_slot_rbp_offset));
2429 // load throwing pc from JavaThread and patch it as the return address 2429 // load throwing pc from JavaThread and patch it as the return address
2430 // of the current frame. Then clear the field in JavaThread 2430 // of the current frame. Then clear the field in JavaThread
2431 __ get_thread(rdi); 2431 __ get_thread(rdi);
2432 __ movptr(rdx, Address(rdi, JavaThread::exception_pc_offset())); 2432 __ movptr(rdx, Address(rdi, JavaThread::exception_pc_offset()));
2433 __ movptr(Address(rbp, wordSize), rdx); 2433 __ movptr(Address(rbp, wordSize), rdx);
2434 __ movptr(Address(rdi, JavaThread::exception_pc_offset()), (int32_t)NULL_WORD); 2434 __ movptr(Address(rdi, JavaThread::exception_pc_offset()), NULL_WORD);
2435 2435
2436 #ifdef ASSERT 2436 #ifdef ASSERT
2437 // verify that there is really an exception oop in JavaThread 2437 // verify that there is really an exception oop in JavaThread
2438 __ movptr(rax, Address(rdi, JavaThread::exception_oop_offset())); 2438 __ movptr(rax, Address(rdi, JavaThread::exception_oop_offset()));
2439 __ verify_oop(rax); 2439 __ verify_oop(rax);
2487 Label noException; 2487 Label noException;
2488 __ cmpl(rax, Deoptimization::Unpack_exception); // Was exception pending? 2488 __ cmpl(rax, Deoptimization::Unpack_exception); // Was exception pending?
2489 __ jcc(Assembler::notEqual, noException); 2489 __ jcc(Assembler::notEqual, noException);
2490 __ movptr(rax, Address(rcx, JavaThread::exception_oop_offset())); 2490 __ movptr(rax, Address(rcx, JavaThread::exception_oop_offset()));
2491 __ movptr(rdx, Address(rcx, JavaThread::exception_pc_offset())); 2491 __ movptr(rdx, Address(rcx, JavaThread::exception_pc_offset()));
2492 __ movptr(Address(rcx, JavaThread::exception_oop_offset()), (int32_t)NULL_WORD); 2492 __ movptr(Address(rcx, JavaThread::exception_oop_offset()), NULL_WORD);
2493 __ movptr(Address(rcx, JavaThread::exception_pc_offset()), (int32_t)NULL_WORD); 2493 __ movptr(Address(rcx, JavaThread::exception_pc_offset()), NULL_WORD);
2494 2494
2495 __ verify_oop(rax); 2495 __ verify_oop(rax);
2496 2496
2497 // Overwrite the result registers with the exception results. 2497 // Overwrite the result registers with the exception results.
2498 __ movptr(Address(rsp, RegisterSaver::raxOffset()*wordSize), rax); 2498 __ movptr(Address(rsp, RegisterSaver::raxOffset()*wordSize), rax);
2580 __ movptr(Address(rbp, 2580 __ movptr(Address(rbp,
2581 -(sizeof(BytecodeInterpreter)) + in_bytes(byte_offset_of(BytecodeInterpreter, _sender_sp))), 2581 -(sizeof(BytecodeInterpreter)) + in_bytes(byte_offset_of(BytecodeInterpreter, _sender_sp))),
2582 rbx); // Make it walkable 2582 rbx); // Make it walkable
2583 #else /* CC_INTERP */ 2583 #else /* CC_INTERP */
2584 // This value is corrected by layout_activation_impl 2584 // This value is corrected by layout_activation_impl
2585 __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD ); 2585 __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), NULL_WORD);
2586 __ movptr(Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize), rbx); // Make it walkable 2586 __ movptr(Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize), rbx); // Make it walkable
2587 #endif /* CC_INTERP */ 2587 #endif /* CC_INTERP */
2588 __ movptr(sp_temp, rsp); // pass to next frame 2588 __ movptr(sp_temp, rsp); // pass to next frame
2589 __ addptr(rsi, wordSize); // Bump array pointer (sizes) 2589 __ addptr(rsi, wordSize); // Bump array pointer (sizes)
2590 __ addptr(rcx, wordSize); // Bump array pointer (pcs) 2590 __ addptr(rcx, wordSize); // Bump array pointer (pcs)
2800 __ movptr(Address(rbp, 2800 __ movptr(Address(rbp,
2801 -(sizeof(BytecodeInterpreter)) + in_bytes(byte_offset_of(BytecodeInterpreter, _sender_sp))), 2801 -(sizeof(BytecodeInterpreter)) + in_bytes(byte_offset_of(BytecodeInterpreter, _sender_sp))),
2802 rbx); // Make it walkable 2802 rbx); // Make it walkable
2803 #else /* CC_INTERP */ 2803 #else /* CC_INTERP */
2804 // This value is corrected by layout_activation_impl 2804 // This value is corrected by layout_activation_impl
2805 __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD ); 2805 __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), NULL_WORD );
2806 __ movptr(Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize), rbx); // Make it walkable 2806 __ movptr(Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize), rbx); // Make it walkable
2807 #endif /* CC_INTERP */ 2807 #endif /* CC_INTERP */
2808 __ movptr(sp_temp, rsp); // pass to next frame 2808 __ movptr(sp_temp, rsp); // pass to next frame
2809 __ addptr(rsi, wordSize); // Bump array pointer (sizes) 2809 __ addptr(rsi, wordSize); // Bump array pointer (sizes)
2810 __ addptr(rcx, wordSize); // Bump array pointer (pcs) 2810 __ addptr(rcx, wordSize); // Bump array pointer (pcs)
3018 RegisterSaver::restore_live_registers(masm); 3018 RegisterSaver::restore_live_registers(masm);
3019 3019
3020 // exception pending => remove activation and forward to exception handler 3020 // exception pending => remove activation and forward to exception handler
3021 3021
3022 __ get_thread(thread); 3022 __ get_thread(thread);
3023 __ movptr(Address(thread, JavaThread::vm_result_offset()), (int32_t)NULL_WORD); 3023 __ movptr(Address(thread, JavaThread::vm_result_offset()), NULL_WORD);
3024 __ movptr(rax, Address(thread, Thread::pending_exception_offset())); 3024 __ movptr(rax, Address(thread, Thread::pending_exception_offset()));
3025 __ jump(RuntimeAddress(StubRoutines::forward_exception_entry())); 3025 __ jump(RuntimeAddress(StubRoutines::forward_exception_entry()));
3026 3026
3027 // ------------- 3027 // -------------
3028 // make sure all code is generated 3028 // make sure all code is generated