< prev index next >

src/hotspot/cpu/sparc/c1_LIRGenerator_sparc.cpp

Print this page




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




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







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


< prev index next >