Mercurial > hg > truffle
comparison src/share/vm/c1/c1_LinearScan.cpp @ 17945:15766b73dc1d
8031475: Missing oopmap in patching stubs
Summary: Add patch test for lir_checkcast in compute_oop_map
Reviewed-by: roland, twisti
author | neliasso |
---|---|
date | Wed, 21 May 2014 11:25:25 +0200 |
parents | 55fb97c4c58d |
children | 0bf37f737702 |
comparison
equal
deleted
inserted
replaced
17944:abb06af6059b | 17945:15766b73dc1d |
---|---|
2380 | 2380 |
2381 int frame_size = frame_map()->framesize(); | 2381 int frame_size = frame_map()->framesize(); |
2382 int arg_count = frame_map()->oop_map_arg_count(); | 2382 int arg_count = frame_map()->oop_map_arg_count(); |
2383 OopMap* map = new OopMap(frame_size, arg_count); | 2383 OopMap* map = new OopMap(frame_size, arg_count); |
2384 | 2384 |
2385 // Check if this is a patch site. | |
2386 bool is_patch_info = false; | |
2387 if (op->code() == lir_move) { | |
2388 assert(!is_call_site, "move must not be a call site"); | |
2389 assert(op->as_Op1() != NULL, "move must be LIR_Op1"); | |
2390 LIR_Op1* move = (LIR_Op1*)op; | |
2391 | |
2392 is_patch_info = move->patch_code() != lir_patch_none; | |
2393 } | |
2394 | |
2395 // Iterate through active intervals | 2385 // Iterate through active intervals |
2396 for (Interval* interval = iw->active_first(fixedKind); interval != Interval::end(); interval = interval->next()) { | 2386 for (Interval* interval = iw->active_first(fixedKind); interval != Interval::end(); interval = interval->next()) { |
2397 int assigned_reg = interval->assigned_reg(); | 2387 int assigned_reg = interval->assigned_reg(); |
2398 | 2388 |
2399 assert(interval->current_from() <= op->id() && op->id() <= interval->current_to(), "interval should not be active otherwise"); | 2389 assert(interval->current_from() <= op->id() && op->id() <= interval->current_to(), "interval should not be active otherwise"); |
2404 // start or end at the current operation are not included in the | 2394 // start or end at the current operation are not included in the |
2405 // oop map, except in the case of patching moves. For patching | 2395 // oop map, except in the case of patching moves. For patching |
2406 // moves, any intervals which end at this instruction are included | 2396 // moves, any intervals which end at this instruction are included |
2407 // in the oop map since we may safepoint while doing the patch | 2397 // in the oop map since we may safepoint while doing the patch |
2408 // before we've consumed the inputs. | 2398 // before we've consumed the inputs. |
2409 if (is_patch_info || op->id() < interval->current_to()) { | 2399 if (op->is_patching() || op->id() < interval->current_to()) { |
2410 | 2400 |
2411 // caller-save registers must not be included into oop-maps at calls | 2401 // caller-save registers must not be included into oop-maps at calls |
2412 assert(!is_call_site || assigned_reg >= nof_regs || !is_caller_save(assigned_reg), "interval is in a caller-save register at a call -> register will be overwritten"); | 2402 assert(!is_call_site || assigned_reg >= nof_regs || !is_caller_save(assigned_reg), "interval is in a caller-save register at a call -> register will be overwritten"); |
2413 | 2403 |
2414 VMReg name = vm_reg_for_interval(interval); | 2404 VMReg name = vm_reg_for_interval(interval); |