3277 } |
3277 } |
3278 } |
3278 } |
3279 |
3279 |
3280 void LIRGenerator::increment_backedge_counter_conditionally(LIR_Condition cond, LIR_Opr left, LIR_Opr right, CodeEmitInfo* info, int left_bci, int right_bci, int bci) { |
3280 void LIRGenerator::increment_backedge_counter_conditionally(LIR_Condition cond, LIR_Opr left, LIR_Opr right, CodeEmitInfo* info, int left_bci, int right_bci, int bci) { |
3281 if (compilation()->count_backedges()) { |
3281 if (compilation()->count_backedges()) { |
|
3282 #if defined(X86) && !defined(_LP64) |
|
3283 // BEWARE! On 32-bit x86 cmp clobbers its left argument so we need a temp copy. |
|
3284 LIR_Opr left_copy = new_register(left->type()); |
|
3285 __ move(left, left_copy); |
|
3286 __ cmp(cond, left_copy, right); |
|
3287 #else |
3282 __ cmp(cond, left, right); |
3288 __ cmp(cond, left, right); |
|
3289 #endif |
3283 LIR_Opr step = new_register(T_INT); |
3290 LIR_Opr step = new_register(T_INT); |
3284 LIR_Opr plus_one = LIR_OprFact::intConst(InvocationCounter::count_increment); |
3291 LIR_Opr plus_one = LIR_OprFact::intConst(InvocationCounter::count_increment); |
3285 LIR_Opr zero = LIR_OprFact::intConst(0); |
3292 LIR_Opr zero = LIR_OprFact::intConst(0); |
3286 __ cmove(cond, |
3293 __ cmove(cond, |
3287 (left_bci < bci) ? plus_one : zero, |
3294 (left_bci < bci) ? plus_one : zero, |