comparison src/cpu/x86/vm/stubGenerator_x86_64.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 2649e5276dd7
children 0fbdb4381b99 c517646eef23
comparison
equal deleted inserted replaced
511:dabd8d202164 512:db4caa99ef11
470 __ mov(rbx, rax); 470 __ mov(rbx, rax);
471 471
472 // setup rax & rdx, remove return address & clear pending exception 472 // setup rax & rdx, remove return address & clear pending exception
473 __ pop(rdx); 473 __ pop(rdx);
474 __ movptr(rax, Address(r15_thread, Thread::pending_exception_offset())); 474 __ movptr(rax, Address(r15_thread, Thread::pending_exception_offset()));
475 __ movptr(Address(r15_thread, Thread::pending_exception_offset()), (int)NULL_WORD); 475 __ movptr(Address(r15_thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD);
476 476
477 #ifdef ASSERT 477 #ifdef ASSERT
478 // make sure exception is set 478 // make sure exception is set
479 { 479 {
480 Label L; 480 Label L;
952 // make sure object is 'reasonable' 952 // make sure object is 'reasonable'
953 __ testptr(rax, rax); 953 __ testptr(rax, rax);
954 __ jcc(Assembler::zero, exit); // if obj is NULL it is OK 954 __ jcc(Assembler::zero, exit); // if obj is NULL it is OK
955 // Check if the oop is in the right area of memory 955 // Check if the oop is in the right area of memory
956 __ movptr(c_rarg2, rax); 956 __ movptr(c_rarg2, rax);
957 __ movptr(c_rarg3, (int64_t) Universe::verify_oop_mask()); 957 __ movptr(c_rarg3, (intptr_t) Universe::verify_oop_mask());
958 __ andptr(c_rarg2, c_rarg3); 958 __ andptr(c_rarg2, c_rarg3);
959 __ movptr(c_rarg3, (int64_t) Universe::verify_oop_bits()); 959 __ movptr(c_rarg3, (intptr_t) Universe::verify_oop_bits());
960 __ cmpptr(c_rarg2, c_rarg3); 960 __ cmpptr(c_rarg2, c_rarg3);
961 __ jcc(Assembler::notZero, error); 961 __ jcc(Assembler::notZero, error);
962 962
963 // set r12 to heapbase for load_klass() 963 // set r12 to heapbase for load_klass()
964 __ reinit_heapbase(); 964 __ reinit_heapbase();
967 __ load_klass(rax, rax); // get klass 967 __ load_klass(rax, rax); // get klass
968 __ testptr(rax, rax); 968 __ testptr(rax, rax);
969 __ jcc(Assembler::zero, error); // if klass is NULL it is broken 969 __ jcc(Assembler::zero, error); // if klass is NULL it is broken
970 // Check if the klass is in the right area of memory 970 // Check if the klass is in the right area of memory
971 __ mov(c_rarg2, rax); 971 __ mov(c_rarg2, rax);
972 __ movptr(c_rarg3, (int64_t) Universe::verify_klass_mask()); 972 __ movptr(c_rarg3, (intptr_t) Universe::verify_klass_mask());
973 __ andptr(c_rarg2, c_rarg3); 973 __ andptr(c_rarg2, c_rarg3);
974 __ movptr(c_rarg3, (int64_t) Universe::verify_klass_bits()); 974 __ movptr(c_rarg3, (intptr_t) Universe::verify_klass_bits());
975 __ cmpptr(c_rarg2, c_rarg3); 975 __ cmpptr(c_rarg2, c_rarg3);
976 __ jcc(Assembler::notZero, error); 976 __ jcc(Assembler::notZero, error);
977 977
978 // make sure klass' klass is 'reasonable' 978 // make sure klass' klass is 'reasonable'
979 __ load_klass(rax, rax); 979 __ load_klass(rax, rax);
980 __ testptr(rax, rax); 980 __ testptr(rax, rax);
981 __ jcc(Assembler::zero, error); // if klass' klass is NULL it is broken 981 __ jcc(Assembler::zero, error); // if klass' klass is NULL it is broken
982 // Check if the klass' klass is in the right area of memory 982 // Check if the klass' klass is in the right area of memory
983 __ movptr(c_rarg3, (int64_t) Universe::verify_klass_mask()); 983 __ movptr(c_rarg3, (intptr_t) Universe::verify_klass_mask());
984 __ andptr(rax, c_rarg3); 984 __ andptr(rax, c_rarg3);
985 __ movptr(c_rarg3, (int64_t) Universe::verify_klass_bits()); 985 __ movptr(c_rarg3, (intptr_t) Universe::verify_klass_bits());
986 __ cmpptr(rax, c_rarg3); 986 __ cmpptr(rax, c_rarg3);
987 __ jcc(Assembler::notZero, error); 987 __ jcc(Assembler::notZero, error);
988 988
989 // return if everything seems ok 989 // return if everything seems ok
990 __ bind(exit); 990 __ bind(exit);