src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6746320 Sdiff src/cpu/x86/vm

src/cpu/x86/vm/c1_LIRAssembler_x86.cpp

Print this page




1112 }
1113 
1114 
1115 void LIR_Assembler::stack2stack(LIR_Opr src, LIR_Opr dest, BasicType type) {
1116   if (src->is_single_stack()) {
1117     if (type == T_OBJECT || type == T_ARRAY) {
1118       __ pushptr(frame_map()->address_for_slot(src ->single_stack_ix()));
1119       __ popptr (frame_map()->address_for_slot(dest->single_stack_ix()));
1120     } else {
1121       __ pushl(frame_map()->address_for_slot(src ->single_stack_ix()));
1122       __ popl (frame_map()->address_for_slot(dest->single_stack_ix()));
1123     }
1124 
1125   } else if (src->is_double_stack()) {
1126 #ifdef _LP64
1127     __ pushptr(frame_map()->address_for_slot(src ->double_stack_ix()));
1128     __ popptr (frame_map()->address_for_slot(dest->double_stack_ix()));
1129 #else
1130     __ pushl(frame_map()->address_for_slot(src ->double_stack_ix(), 0));
1131     // push and pop the part at src + wordSize, adding wordSize for the previous push
1132     __ pushl(frame_map()->address_for_slot(src ->double_stack_ix(), wordSize));
1133     __ popl (frame_map()->address_for_slot(dest->double_stack_ix(), wordSize));
1134     __ popl (frame_map()->address_for_slot(dest->double_stack_ix(), 0));
1135 #endif // _LP64
1136 
1137   } else {
1138     ShouldNotReachHere();
1139   }
1140 }
1141 
1142 
1143 void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_PatchCode patch_code, CodeEmitInfo* info, bool /* unaligned */) {
1144   assert(src->is_address(), "should not call otherwise");
1145   assert(dest->is_register(), "should not call otherwise");
1146 
1147   LIR_Address* addr = src->as_address_ptr();
1148   Address from_addr = as_Address(addr);
1149 
1150   switch (type) {
1151     case T_BOOLEAN: // fall through
1152     case T_BYTE:    // fall through
1153     case T_CHAR:    // fall through




1112 }
1113 
1114 
1115 void LIR_Assembler::stack2stack(LIR_Opr src, LIR_Opr dest, BasicType type) {
1116   if (src->is_single_stack()) {
1117     if (type == T_OBJECT || type == T_ARRAY) {
1118       __ pushptr(frame_map()->address_for_slot(src ->single_stack_ix()));
1119       __ popptr (frame_map()->address_for_slot(dest->single_stack_ix()));
1120     } else {
1121       __ pushl(frame_map()->address_for_slot(src ->single_stack_ix()));
1122       __ popl (frame_map()->address_for_slot(dest->single_stack_ix()));
1123     }
1124 
1125   } else if (src->is_double_stack()) {
1126 #ifdef _LP64
1127     __ pushptr(frame_map()->address_for_slot(src ->double_stack_ix()));
1128     __ popptr (frame_map()->address_for_slot(dest->double_stack_ix()));
1129 #else
1130     __ pushl(frame_map()->address_for_slot(src ->double_stack_ix(), 0));
1131     // push and pop the part at src + wordSize, adding wordSize for the previous push
1132     __ pushl(frame_map()->address_for_slot(src ->double_stack_ix(), 2 * wordSize));
1133     __ popl (frame_map()->address_for_slot(dest->double_stack_ix(), 2 * wordSize));
1134     __ popl (frame_map()->address_for_slot(dest->double_stack_ix(), 0));
1135 #endif // _LP64
1136 
1137   } else {
1138     ShouldNotReachHere();
1139   }
1140 }
1141 
1142 
1143 void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_PatchCode patch_code, CodeEmitInfo* info, bool /* unaligned */) {
1144   assert(src->is_address(), "should not call otherwise");
1145   assert(dest->is_register(), "should not call otherwise");
1146 
1147   LIR_Address* addr = src->as_address_ptr();
1148   Address from_addr = as_Address(addr);
1149 
1150   switch (type) {
1151     case T_BOOLEAN: // fall through
1152     case T_BYTE:    // fall through
1153     case T_CHAR:    // fall through


src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File