744 jlong c = offset.result()->as_jlong();
745 if ((jlong)((jint)c) == c) {
746 a = new LIR_Address(obj.result(),
747 (jint)c,
748 as_BasicType(type));
749 } else {
750 LIR_Opr tmp = new_register(T_LONG);
751 __ move(offset.result(), tmp);
752 a = new LIR_Address(obj.result(),
753 tmp,
754 as_BasicType(type));
755 }
756 #else
757 a = new LIR_Address(obj.result(),
758 offset.result()->as_jint(),
759 as_BasicType(type));
760 #endif
761 } else {
762 a = new LIR_Address(obj.result(),
763 offset.result(),
764 LIR_Address::times_1,
765 0,
766 as_BasicType(type));
767 }
768 __ leal(LIR_OprFact::address(a), addr);
769
770 if (type == objectType) { // Write-barrier needed for Object fields.
771 // Do the pre-write barrier, if any.
772 pre_barrier(addr, LIR_OprFact::illegalOpr /* pre_val */,
773 true /* do_load */, false /* patch */, NULL);
774 }
775
776 if (type == objectType) {
777 cmp.load_item_force(FrameMap::rax_oop_opr);
778 val.load_item();
779 } else if (type == intType) {
780 cmp.load_item_force(FrameMap::rax_opr);
781 val.load_item();
782 } else if (type == longType) {
783 cmp.load_item_force(FrameMap::long0_opr);
784 val.load_item_force(FrameMap::long1_opr);
1064 index = LIR_OprFact::illegalOpr;
1065 offset += off.result()->as_jint();
1066 }
1067 LIR_Opr base_op = buf.result();
1068
1069 #ifndef _LP64
1070 if (!is_updateBytes) { // long b raw address
1071 base_op = new_register(T_INT);
1072 __ convert(Bytecodes::_l2i, buf.result(), base_op);
1073 }
1074 #else
1075 if (index->is_valid()) {
1076 LIR_Opr tmp = new_register(T_LONG);
1077 __ convert(Bytecodes::_i2l, index, tmp);
1078 index = tmp;
1079 }
1080 #endif
1081
1082 LIR_Address* a = new LIR_Address(base_op,
1083 index,
1084 LIR_Address::times_1,
1085 offset,
1086 T_BYTE);
1087 BasicTypeList signature(3);
1088 signature.append(T_INT);
1089 signature.append(T_ADDRESS);
1090 signature.append(T_INT);
1091 CallingConvention* cc = frame_map()->c_calling_convention(&signature);
1092 const LIR_Opr result_reg = result_register_for(x->type());
1093
1094 LIR_Opr addr = new_pointer_register();
1095 __ leal(LIR_OprFact::address(a), addr);
1096
1097 crc.load_item_force(cc->at(0));
1098 __ move(addr, cc->at(1));
1099 len.load_item_force(cc->at(2));
1100
1101 __ call_runtime_leaf(StubRoutines::updateBytesCRC32(), getThreadTemp(), result_reg, cc->args());
1102 __ move(result_reg, result);
1103
1104 break;
1140 LIR_Opr result_a = a.result();
1141
1142 long constant_bOffset = 0;
1143 LIR_Opr result_bOffset = bOffset.result();
1144 if (result_bOffset->is_constant()) {
1145 constant_bOffset = result_bOffset->as_jlong();
1146 result_bOffset = LIR_OprFact::illegalOpr;
1147 }
1148 LIR_Opr result_b = b.result();
1149
1150 #ifndef _LP64
1151 result_a = new_register(T_INT);
1152 __ convert(Bytecodes::_l2i, a.result(), result_a);
1153 result_b = new_register(T_INT);
1154 __ convert(Bytecodes::_l2i, b.result(), result_b);
1155 #endif
1156
1157
1158 LIR_Address* addr_a = new LIR_Address(result_a,
1159 result_aOffset,
1160 LIR_Address::times_1,
1161 constant_aOffset,
1162 T_BYTE);
1163
1164 LIR_Address* addr_b = new LIR_Address(result_b,
1165 result_bOffset,
1166 LIR_Address::times_1,
1167 constant_bOffset,
1168 T_BYTE);
1169
1170 BasicTypeList signature(4);
1171 signature.append(T_ADDRESS);
1172 signature.append(T_ADDRESS);
1173 signature.append(T_INT);
1174 signature.append(T_INT);
1175 CallingConvention* cc = frame_map()->c_calling_convention(&signature);
1176 const LIR_Opr result_reg = result_register_for(x->type());
1177
1178 LIR_Opr ptr_addr_a = new_pointer_register();
1179 __ leal(LIR_OprFact::address(addr_a), ptr_addr_a);
1180
1181 LIR_Opr ptr_addr_b = new_pointer_register();
1182 __ leal(LIR_OprFact::address(addr_b), ptr_addr_b);
1183
1184 __ move(ptr_addr_a, cc->at(0));
1185 __ move(ptr_addr_b, cc->at(1));
1186 length.load_item_force(cc->at(2));
|
744 jlong c = offset.result()->as_jlong();
745 if ((jlong)((jint)c) == c) {
746 a = new LIR_Address(obj.result(),
747 (jint)c,
748 as_BasicType(type));
749 } else {
750 LIR_Opr tmp = new_register(T_LONG);
751 __ move(offset.result(), tmp);
752 a = new LIR_Address(obj.result(),
753 tmp,
754 as_BasicType(type));
755 }
756 #else
757 a = new LIR_Address(obj.result(),
758 offset.result()->as_jint(),
759 as_BasicType(type));
760 #endif
761 } else {
762 a = new LIR_Address(obj.result(),
763 offset.result(),
764 0,
765 as_BasicType(type));
766 }
767 __ leal(LIR_OprFact::address(a), addr);
768
769 if (type == objectType) { // Write-barrier needed for Object fields.
770 // Do the pre-write barrier, if any.
771 pre_barrier(addr, LIR_OprFact::illegalOpr /* pre_val */,
772 true /* do_load */, false /* patch */, NULL);
773 }
774
775 if (type == objectType) {
776 cmp.load_item_force(FrameMap::rax_oop_opr);
777 val.load_item();
778 } else if (type == intType) {
779 cmp.load_item_force(FrameMap::rax_opr);
780 val.load_item();
781 } else if (type == longType) {
782 cmp.load_item_force(FrameMap::long0_opr);
783 val.load_item_force(FrameMap::long1_opr);
1063 index = LIR_OprFact::illegalOpr;
1064 offset += off.result()->as_jint();
1065 }
1066 LIR_Opr base_op = buf.result();
1067
1068 #ifndef _LP64
1069 if (!is_updateBytes) { // long b raw address
1070 base_op = new_register(T_INT);
1071 __ convert(Bytecodes::_l2i, buf.result(), base_op);
1072 }
1073 #else
1074 if (index->is_valid()) {
1075 LIR_Opr tmp = new_register(T_LONG);
1076 __ convert(Bytecodes::_i2l, index, tmp);
1077 index = tmp;
1078 }
1079 #endif
1080
1081 LIR_Address* a = new LIR_Address(base_op,
1082 index,
1083 offset,
1084 T_BYTE);
1085 BasicTypeList signature(3);
1086 signature.append(T_INT);
1087 signature.append(T_ADDRESS);
1088 signature.append(T_INT);
1089 CallingConvention* cc = frame_map()->c_calling_convention(&signature);
1090 const LIR_Opr result_reg = result_register_for(x->type());
1091
1092 LIR_Opr addr = new_pointer_register();
1093 __ leal(LIR_OprFact::address(a), addr);
1094
1095 crc.load_item_force(cc->at(0));
1096 __ move(addr, cc->at(1));
1097 len.load_item_force(cc->at(2));
1098
1099 __ call_runtime_leaf(StubRoutines::updateBytesCRC32(), getThreadTemp(), result_reg, cc->args());
1100 __ move(result_reg, result);
1101
1102 break;
1138 LIR_Opr result_a = a.result();
1139
1140 long constant_bOffset = 0;
1141 LIR_Opr result_bOffset = bOffset.result();
1142 if (result_bOffset->is_constant()) {
1143 constant_bOffset = result_bOffset->as_jlong();
1144 result_bOffset = LIR_OprFact::illegalOpr;
1145 }
1146 LIR_Opr result_b = b.result();
1147
1148 #ifndef _LP64
1149 result_a = new_register(T_INT);
1150 __ convert(Bytecodes::_l2i, a.result(), result_a);
1151 result_b = new_register(T_INT);
1152 __ convert(Bytecodes::_l2i, b.result(), result_b);
1153 #endif
1154
1155
1156 LIR_Address* addr_a = new LIR_Address(result_a,
1157 result_aOffset,
1158 constant_aOffset,
1159 T_BYTE);
1160
1161 LIR_Address* addr_b = new LIR_Address(result_b,
1162 result_bOffset,
1163 constant_bOffset,
1164 T_BYTE);
1165
1166 BasicTypeList signature(4);
1167 signature.append(T_ADDRESS);
1168 signature.append(T_ADDRESS);
1169 signature.append(T_INT);
1170 signature.append(T_INT);
1171 CallingConvention* cc = frame_map()->c_calling_convention(&signature);
1172 const LIR_Opr result_reg = result_register_for(x->type());
1173
1174 LIR_Opr ptr_addr_a = new_pointer_register();
1175 __ leal(LIR_OprFact::address(addr_a), ptr_addr_a);
1176
1177 LIR_Opr ptr_addr_b = new_pointer_register();
1178 __ leal(LIR_OprFact::address(addr_b), ptr_addr_b);
1179
1180 __ move(ptr_addr_a, cc->at(0));
1181 __ move(ptr_addr_b, cc->at(1));
1182 length.load_item_force(cc->at(2));
|