--- old/src/cpu/ppc/vm/macroAssembler_ppc.cpp 2017-05-19 12:38:14.072129000 +0200 +++ new/src/cpu/ppc/vm/macroAssembler_ppc.cpp 2017-05-19 12:38:13.919098000 +0200 @@ -2521,7 +2521,13 @@ load_const_optimized(rtm_counters_Reg, (address)rtm_counters, R0); // reload bind(L_check_always_rtm2); ld(tmpReg, RTMLockingCounters::total_count_offset(), rtm_counters_Reg); - cmpdi(CCR0, tmpReg, RTMLockingThreshold / RTMTotalCountIncrRate); + int64_t thresholdValue = RTMLockingThreshold / RTMTotalCountIncrRate; + if (is_simm(thresholdValue, 16)) { // cmpdi can handle 16bit immediate only. + cmpdi(CCR0, tmpReg, thresholdValue); + } else { + load_const_optimized(R0, thresholdValue); + cmpd(CCR0, tmpReg, R0); + } blt(CCR0, L_done); if (method_data != NULL) { // Set rtm_state to "always rtm" in MDO.