< prev index next >

src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp

Print this page




 272   __ add(temp, load_immediate(step, addr->type()), temp);
 273   __ move(temp, addr);
 274 }
 275 
 276 
 277 void LIRGenerator::cmp_mem_int(LIR_Condition condition, LIR_Opr base, int disp, int c, CodeEmitInfo* info) {
 278   LIR_Opr tmp = FrameMap::R0_opr;
 279   __ load(new LIR_Address(base, disp, T_INT), tmp, info);
 280   __ cmp(condition, tmp, c);
 281 }
 282 
 283 
 284 void LIRGenerator::cmp_reg_mem(LIR_Condition condition, LIR_Opr reg, LIR_Opr base,
 285                                int disp, BasicType type, CodeEmitInfo* info) {
 286   LIR_Opr tmp = FrameMap::R0_opr;
 287   __ load(new LIR_Address(base, disp, type), tmp, info);
 288   __ cmp(condition, reg, tmp);
 289 }
 290 
 291 
 292 void LIRGenerator::cmp_reg_mem(LIR_Condition condition, LIR_Opr reg, LIR_Opr base,
 293                                LIR_Opr disp, BasicType type, CodeEmitInfo* info) {
 294   LIR_Opr tmp = FrameMap::R0_opr;
 295   __ load(new LIR_Address(base, disp, type), tmp, info);
 296   __ cmp(condition, reg, tmp);
 297 }
 298 
 299 
 300 bool LIRGenerator::strength_reduce_multiply(LIR_Opr left, int c, LIR_Opr result, LIR_Opr tmp) {
 301   assert(left != result, "should be different registers");
 302   if (is_power_of_2(c + 1)) {
 303     __ shift_left(left, log2_intptr(c + 1), result);
 304     __ sub(result, left, result);
 305     return true;
 306   } else if (is_power_of_2(c - 1)) {
 307     __ shift_left(left, log2_intptr(c - 1), result);
 308     __ add(result, left, result);
 309     return true;
 310   }
 311   return false;
 312 }
 313 
 314 
 315 void LIRGenerator::store_stack_parameter(LIR_Opr item, ByteSize offset_from_sp) {
 316   BasicType t = item->type();
 317   LIR_Opr sp_opr = FrameMap::SP_opr;
 318   if ((t == T_LONG || t == T_DOUBLE) &&
 319       ((in_bytes(offset_from_sp) - STACK_BIAS) % 8 != 0)) {




 272   __ add(temp, load_immediate(step, addr->type()), temp);
 273   __ move(temp, addr);
 274 }
 275 
 276 
 277 void LIRGenerator::cmp_mem_int(LIR_Condition condition, LIR_Opr base, int disp, int c, CodeEmitInfo* info) {
 278   LIR_Opr tmp = FrameMap::R0_opr;
 279   __ load(new LIR_Address(base, disp, T_INT), tmp, info);
 280   __ cmp(condition, tmp, c);
 281 }
 282 
 283 
 284 void LIRGenerator::cmp_reg_mem(LIR_Condition condition, LIR_Opr reg, LIR_Opr base,
 285                                int disp, BasicType type, CodeEmitInfo* info) {
 286   LIR_Opr tmp = FrameMap::R0_opr;
 287   __ load(new LIR_Address(base, disp, type), tmp, info);
 288   __ cmp(condition, reg, tmp);
 289 }
 290 
 291 








 292 bool LIRGenerator::strength_reduce_multiply(LIR_Opr left, int c, LIR_Opr result, LIR_Opr tmp) {
 293   assert(left != result, "should be different registers");
 294   if (is_power_of_2(c + 1)) {
 295     __ shift_left(left, log2_intptr(c + 1), result);
 296     __ sub(result, left, result);
 297     return true;
 298   } else if (is_power_of_2(c - 1)) {
 299     __ shift_left(left, log2_intptr(c - 1), result);
 300     __ add(result, left, result);
 301     return true;
 302   }
 303   return false;
 304 }
 305 
 306 
 307 void LIRGenerator::store_stack_parameter(LIR_Opr item, ByteSize offset_from_sp) {
 308   BasicType t = item->type();
 309   LIR_Opr sp_opr = FrameMap::SP_opr;
 310   if ((t == T_LONG || t == T_DOUBLE) &&
 311       ((in_bytes(offset_from_sp) - STACK_BIAS) % 8 != 0)) {


< prev index next >