comparison src/cpu/x86/vm/sharedRuntime_x86_64.cpp @ 4984:5c41e7002923

Added missing #ifdef GRAAL
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Mon, 27 Feb 2012 23:05:48 +0100
parents 18a5539bf19b
children 0d2a2797a61f
comparison
equal deleted inserted replaced
4983:b9d5570f2362 4984:5c41e7002923
3000 __ jcc(Assembler::zero, no_pending_exception); 3000 __ jcc(Assembler::zero, no_pending_exception);
3001 __ stop("must not have pending exception here"); 3001 __ stop("must not have pending exception here");
3002 __ bind(no_pending_exception); 3002 __ bind(no_pending_exception);
3003 #endif 3003 #endif
3004 3004
3005 // (tw) Start of graal uncommon trap code. 3005 #ifdef GRAAL
3006 __ jmp(cont); 3006 __ jmp(cont);
3007 3007
3008 int jmp_uncommon_trap_offset = __ pc() - start; 3008 int jmp_uncommon_trap_offset = __ pc() - start;
3009 __ pushptr(Address(r15_thread, in_bytes(JavaThread::ScratchA_offset()))); 3009 __ pushptr(Address(r15_thread, in_bytes(JavaThread::ScratchA_offset())));
3010 __ movptr(rscratch1, 2); // InvalidateRecompile 3010 __ movptr(rscratch1, 2); // InvalidateRecompile
3011 3011
3012 int uncommon_trap_offset = __ pc() - start; 3012 int uncommon_trap_offset = __ pc() - start;
3013 3013
3014 // Warning: Duplicate code
3015
3016 // Save everything in sight. 3014 // Save everything in sight.
3017 RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words); 3015 RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words);
3018
3019 // Normal deoptimization
3020
3021
3022 // fetch_unroll_info needs to call last_java_frame() 3016 // fetch_unroll_info needs to call last_java_frame()
3023 __ set_last_Java_frame(noreg, noreg, NULL); 3017 __ set_last_Java_frame(noreg, noreg, NULL);
3024
3025
3026 // __ movl(c_rarg1, (int32_t)Deoptimization::Unpack_reexecute);
3027 // __ movl(r14, c_rarg1); // save into r14 for later call to unpack_frames
3028 3018
3029 assert(r10 == rscratch1, "scratch register should be r10"); 3019 assert(r10 == rscratch1, "scratch register should be r10");
3030 __ movl(c_rarg1, Address(rsp, RegisterSaver::r10_offset_in_bytes())); 3020 __ movl(c_rarg1, Address(rsp, RegisterSaver::r10_offset_in_bytes()));
3031 __ orq(c_rarg1, ~(int32_t)Deoptimization::make_trap_request(Deoptimization::Reason_unreached, Deoptimization::Action_none)); 3021 __ orq(c_rarg1, ~(int32_t)Deoptimization::make_trap_request(Deoptimization::Reason_unreached, Deoptimization::Action_none));
3032 __ notq(c_rarg1); 3022 __ notq(c_rarg1);
3033 __ movl(r14, (int32_t)Deoptimization::Unpack_reexecute); 3023 __ movl(r14, (int32_t)Deoptimization::Unpack_reexecute);
3034 __ mov(c_rarg0, r15_thread); 3024 __ mov(c_rarg0, r15_thread);
3035 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap))); 3025 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap)));
3036
3037 // Need to have an oopmap that tells fetch_unroll_info where to
3038 // find any register it might need.
3039
3040 oop_maps->add_gc_map( __ pc()-start, map->deep_copy()); 3026 oop_maps->add_gc_map( __ pc()-start, map->deep_copy());
3041 3027
3042 __ reset_last_Java_frame(false, false); 3028 __ reset_last_Java_frame(false, false);
3043 3029
3044 Label after_fetch_unroll_info_call; 3030 Label after_fetch_unroll_info_call;
3045 __ jmp(after_fetch_unroll_info_call); 3031 __ jmp(after_fetch_unroll_info_call);
3046 3032 #endif
3047
3048 // (tw) End of graal uncommon trap code.
3049 3033
3050 __ bind(cont); 3034 __ bind(cont);
3051 3035
3052 // Call C code. Need thread and this frame, but NOT official VM entry 3036 // Call C code. Need thread and this frame, but NOT official VM entry
3053 // crud. We cannot block on this call, no GC can happen. 3037 // crud. We cannot block on this call, no GC can happen.