Mercurial > hg > truffle
comparison src/cpu/x86/vm/assembler_x86.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 | a1980da045cc |
children | 52a431267315 |
comparison
equal
deleted
inserted
replaced
511:dabd8d202164 | 512:db4caa99ef11 |
---|---|
5210 } | 5210 } |
5211 | 5211 |
5212 void MacroAssembler::reset_last_Java_frame(bool clear_fp, | 5212 void MacroAssembler::reset_last_Java_frame(bool clear_fp, |
5213 bool clear_pc) { | 5213 bool clear_pc) { |
5214 // we must set sp to zero to clear frame | 5214 // we must set sp to zero to clear frame |
5215 movptr(Address(r15_thread, JavaThread::last_Java_sp_offset()), (int32_t)NULL_WORD); | 5215 movptr(Address(r15_thread, JavaThread::last_Java_sp_offset()), NULL_WORD); |
5216 // must clear fp, so that compiled frames are not confused; it is | 5216 // must clear fp, so that compiled frames are not confused; it is |
5217 // possible that we need it only for debugging | 5217 // possible that we need it only for debugging |
5218 if (clear_fp) { | 5218 if (clear_fp) { |
5219 movptr(Address(r15_thread, JavaThread::last_Java_fp_offset()), (int32_t)NULL_WORD); | 5219 movptr(Address(r15_thread, JavaThread::last_Java_fp_offset()), NULL_WORD); |
5220 } | 5220 } |
5221 | 5221 |
5222 if (clear_pc) { | 5222 if (clear_pc) { |
5223 movptr(Address(r15_thread, JavaThread::last_Java_pc_offset()), (int32_t)NULL_WORD); | 5223 movptr(Address(r15_thread, JavaThread::last_Java_pc_offset()), NULL_WORD); |
5224 } | 5224 } |
5225 } | 5225 } |
5226 | 5226 |
5227 void MacroAssembler::set_last_Java_frame(Register last_java_sp, | 5227 void MacroAssembler::set_last_Java_frame(Register last_java_sp, |
5228 Register last_java_fp, | 5228 Register last_java_fp, |
5668 } | 5668 } |
5669 | 5669 |
5670 // get oop result if there is one and reset the value in the thread | 5670 // get oop result if there is one and reset the value in the thread |
5671 if (oop_result->is_valid()) { | 5671 if (oop_result->is_valid()) { |
5672 movptr(oop_result, Address(java_thread, JavaThread::vm_result_offset())); | 5672 movptr(oop_result, Address(java_thread, JavaThread::vm_result_offset())); |
5673 movptr(Address(java_thread, JavaThread::vm_result_offset()), (int32_t)NULL_WORD); | 5673 movptr(Address(java_thread, JavaThread::vm_result_offset()), NULL_WORD); |
5674 verify_oop(oop_result, "broken oop in call_VM_base"); | 5674 verify_oop(oop_result, "broken oop in call_VM_base"); |
5675 } | 5675 } |
5676 } | 5676 } |
5677 | 5677 |
5678 void MacroAssembler::call_VM_helper(Register oop_result, address entry_point, int number_of_arguments, bool check_exceptions) { | 5678 void MacroAssembler::call_VM_helper(Register oop_result, address entry_point, int number_of_arguments, bool check_exceptions) { |
6424 if (!java_thread->is_valid()) { | 6424 if (!java_thread->is_valid()) { |
6425 java_thread = rdi; | 6425 java_thread = rdi; |
6426 get_thread(java_thread); | 6426 get_thread(java_thread); |
6427 } | 6427 } |
6428 // we must set sp to zero to clear frame | 6428 // we must set sp to zero to clear frame |
6429 movptr(Address(java_thread, JavaThread::last_Java_sp_offset()), (int32_t)NULL_WORD); | 6429 movptr(Address(java_thread, JavaThread::last_Java_sp_offset()), NULL_WORD); |
6430 if (clear_fp) { | 6430 if (clear_fp) { |
6431 movptr(Address(java_thread, JavaThread::last_Java_fp_offset()), (int32_t)NULL_WORD); | 6431 movptr(Address(java_thread, JavaThread::last_Java_fp_offset()), NULL_WORD); |
6432 } | 6432 } |
6433 | 6433 |
6434 if (clear_pc) | 6434 if (clear_pc) |
6435 movptr(Address(java_thread, JavaThread::last_Java_pc_offset()), (int32_t)NULL_WORD); | 6435 movptr(Address(java_thread, JavaThread::last_Java_pc_offset()), NULL_WORD); |
6436 | 6436 |
6437 } | 6437 } |
6438 | 6438 |
6439 void MacroAssembler::restore_rax(Register tmp) { | 6439 void MacroAssembler::restore_rax(Register tmp) { |
6440 if (tmp == noreg) pop(rax); | 6440 if (tmp == noreg) pop(rax); |