Mercurial > hg > truffle
comparison src/cpu/x86/vm/sharedRuntime_x86_64.cpp @ 8337:37977d1dcedc
Transmit deoptimization reason in thread local.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 18 Mar 2013 00:20:07 +0100 |
parents | b8f261ba79c6 |
children | 25691fcb505a |
comparison
equal
deleted
inserted
replaced
8336:38be33a1c28d | 8337:37977d1dcedc |
---|---|
3406 | 3406 |
3407 #ifdef GRAAL | 3407 #ifdef GRAAL |
3408 __ jmp(cont); | 3408 __ jmp(cont); |
3409 | 3409 |
3410 int implicit_exception_uncommon_trap_offset = __ pc() - start; | 3410 int implicit_exception_uncommon_trap_offset = __ pc() - start; |
3411 // pc where the exception happened is in ScratchA | |
3411 __ pushptr(Address(r15_thread, in_bytes(JavaThread::ScratchA_offset()))); | 3412 __ pushptr(Address(r15_thread, in_bytes(JavaThread::ScratchA_offset()))); |
3412 __ movptr(rscratch1, Address(r15_thread, in_bytes(JavaThread::ScratchB_offset()))); | |
3413 | 3413 |
3414 int uncommon_trap_offset = __ pc() - start; | 3414 int uncommon_trap_offset = __ pc() - start; |
3415 | 3415 |
3416 // Save everything in sight. | 3416 // Save everything in sight. |
3417 RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words); | 3417 RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words); |
3418 // fetch_unroll_info needs to call last_java_frame() | 3418 // fetch_unroll_info needs to call last_java_frame() |
3419 __ set_last_Java_frame(noreg, noreg, NULL); | 3419 __ set_last_Java_frame(noreg, noreg, NULL); |
3420 | 3420 |
3421 assert(r10 == rscratch1, "scratch register should be r10"); | 3421 __ movl(c_rarg1, Address(r15_thread, in_bytes(ThreadShadow::pending_deoptimization_offset()))); |
3422 __ movl(c_rarg1, Address(rsp, RegisterSaver::r10_offset_in_bytes())); | 3422 __ movl(Address(r15_thread, in_bytes(ThreadShadow::pending_deoptimization_offset())), 0); |
3423 | 3423 |
3424 __ movl(r14, (int32_t)Deoptimization::Unpack_reexecute); | 3424 __ movl(r14, (int32_t)Deoptimization::Unpack_reexecute); |
3425 __ mov(c_rarg0, r15_thread); | 3425 __ mov(c_rarg0, r15_thread); |
3426 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap))); | 3426 __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap))); |
3427 oop_maps->add_gc_map( __ pc()-start, map->deep_copy()); | 3427 oop_maps->add_gc_map( __ pc()-start, map->deep_copy()); |