< prev index next >
src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp
Print this page
@@ -198,11 +198,11 @@
__ push_reg(opr->as_register_lo());
} else if (opr->is_stack()) {
__ push_addr(frame_map()->address_for_slot(opr->single_stack_ix()));
} else if (opr->is_constant()) {
LIR_Const* const_opr = opr->as_constant_ptr();
- if (const_opr->type() == T_OBJECT) {
+ if (const_opr->type() == T_OBJECT || const_opr->type() == T_VALUETYPE) {
__ push_oop(const_opr->as_jobject());
} else if (const_opr->type() == T_INT) {
__ push_jint(const_opr->as_jint());
} else {
ShouldNotReachHere();
@@ -628,10 +628,11 @@
__ movptr(dest->as_register_hi(), c->as_jint_hi());
#endif // _LP64
break;
}
+ case T_VALUETYPE: // Fall through
case T_OBJECT: {
if (patch_code != lir_patch_none) {
jobject2reg_with_patching(dest->as_register(), info);
} else {
__ movoop(dest->as_register(), c->as_jobject());
@@ -710,10 +711,11 @@
case T_ADDRESS:
__ movptr(frame_map()->address_for_slot(dest->single_stack_ix()), c->as_jint_bits());
break;
+ case T_VALUETYPE: // Fall through
case T_OBJECT:
__ movoop(frame_map()->address_for_slot(dest->single_stack_ix()), c->as_jobject());
break;
case T_LONG: // fall through
@@ -749,10 +751,11 @@
case T_ADDRESS:
__ movptr(as_Address(addr), c->as_jint_bits());
break;
+ case T_VALUETYPE: // fall through
case T_OBJECT: // fall through
case T_ARRAY:
if (c->as_jobject() == NULL) {
if (UseCompressedOops && !wide) {
__ movl(as_Address(addr), (int32_t)NULL_WORD);
@@ -837,18 +840,18 @@
move_regs(src->as_register_lo(), dest->as_register());
return;
}
#endif
assert(src->is_single_cpu(), "must match");
- if (src->type() == T_OBJECT) {
+ if (src->type() == T_OBJECT || src->type() == T_VALUETYPE) {
__ verify_oop(src->as_register());
}
move_regs(src->as_register(), dest->as_register());
} else if (dest->is_double_cpu()) {
#ifdef _LP64
- if (src->type() == T_OBJECT || src->type() == T_ARRAY) {
+ if (src->type() == T_OBJECT || src->type() == T_ARRAY || src->type() == T_VALUETYPE) {
// Surprising to me but we can see move of a long to t_object
__ verify_oop(src->as_register());
move_regs(src->as_register(), dest->as_register_lo());
return;
}
@@ -915,11 +918,11 @@
assert(src->is_register(), "should not call otherwise");
assert(dest->is_stack(), "should not call otherwise");
if (src->is_single_cpu()) {
Address dst = frame_map()->address_for_slot(dest->single_stack_ix());
- if (type == T_OBJECT || type == T_ARRAY) {
+ if (type == T_OBJECT || type == T_ARRAY || type == T_VALUETYPE) {
__ verify_oop(src->as_register());
__ movptr (dst, src->as_register());
} else if (type == T_METADATA) {
__ movptr (dst, src->as_register());
} else {
@@ -961,11 +964,11 @@
void LIR_Assembler::reg2mem(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_PatchCode patch_code, CodeEmitInfo* info, bool pop_fpu_stack, bool wide, bool /* unaligned */) {
LIR_Address* to_addr = dest->as_address_ptr();
PatchingStub* patch = NULL;
Register compressed_src = rscratch1;
- if (type == T_ARRAY || type == T_OBJECT) {
+ if (type == T_ARRAY || type == T_OBJECT || type == T_VALUETYPE) {
__ verify_oop(src->as_register());
#ifdef _LP64
if (UseCompressedOops && !wide) {
__ movptr(compressed_src, src->as_register());
__ encode_heap_oop(compressed_src);
@@ -1006,10 +1009,11 @@
else __ fst_d (as_Address(to_addr));
}
break;
}
+ case T_VALUETYPE: // fall through
case T_ARRAY: // fall through
case T_OBJECT: // fall through
if (UseCompressedOops && !wide) {
__ movl(as_Address(to_addr), compressed_src);
} else {
@@ -1096,11 +1100,11 @@
void LIR_Assembler::stack2reg(LIR_Opr src, LIR_Opr dest, BasicType type) {
assert(src->is_stack(), "should not call otherwise");
assert(dest->is_register(), "should not call otherwise");
if (dest->is_single_cpu()) {
- if (type == T_ARRAY || type == T_OBJECT) {
+ if (type == T_ARRAY || type == T_OBJECT || type == T_VALUETYPE) {
__ movptr(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()));
__ verify_oop(dest->as_register());
} else if (type == T_METADATA) {
__ movptr(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()));
} else {
@@ -1137,11 +1141,11 @@
}
void LIR_Assembler::stack2stack(LIR_Opr src, LIR_Opr dest, BasicType type) {
if (src->is_single_stack()) {
- if (type == T_OBJECT || type == T_ARRAY) {
+ if (type == T_OBJECT || type == T_ARRAY || type == T_VALUETYPE) {
__ pushptr(frame_map()->address_for_slot(src ->single_stack_ix()));
__ popptr (frame_map()->address_for_slot(dest->single_stack_ix()));
} else {
#ifndef _LP64
__ pushl(frame_map()->address_for_slot(src ->single_stack_ix()));
@@ -1176,11 +1180,11 @@
assert(dest->is_register(), "should not call otherwise");
LIR_Address* addr = src->as_address_ptr();
Address from_addr = as_Address(addr);
- if (addr->base()->type() == T_OBJECT) {
+ if (addr->base()->type() == T_OBJECT || addr->base()->type() == T_VALUETYPE) {
__ verify_oop(addr->base()->as_pointer_register());
}
switch (type) {
case T_BOOLEAN: // fall through
@@ -1229,10 +1233,11 @@
__ fld_d(from_addr);
}
break;
}
+ case T_VALUETYPE: // fall through
case T_OBJECT: // fall through
case T_ARRAY: // fall through
if (UseCompressedOops && !wide) {
__ movl(dest->as_register(), from_addr);
} else {
@@ -1338,11 +1343,11 @@
if (patch != NULL) {
patching_epilog(patch, patch_code, addr->base()->as_register(), info);
}
- if (type == T_ARRAY || type == T_OBJECT) {
+ if (type == T_ARRAY || type == T_OBJECT || type == T_VALUETYPE) {
#ifdef _LP64
if (UseCompressedOops && !wide) {
__ decode_heap_oop(dest->as_register());
}
#endif
@@ -1575,11 +1580,11 @@
void LIR_Assembler::emit_alloc_array(LIR_OpAllocArray* op) {
Register len = op->len()->as_register();
LP64_ONLY( __ movslq(len, len); )
- if (UseSlowPath ||
+ if (UseSlowPath || op->type() == T_VALUETYPE ||
(!UseFastNewObjectArray && (op->type() == T_OBJECT || op->type() == T_ARRAY)) ||
(!UseFastNewTypeArray && (op->type() != T_OBJECT && op->type() != T_ARRAY))) {
__ jmp(*op->stub()->entry());
} else {
Register tmp1 = op->tmp1()->as_register();
@@ -2496,11 +2501,11 @@
}
#endif // _LP64
} else {
#ifdef _LP64
Register r_lo;
- if (right->type() == T_OBJECT || right->type() == T_ARRAY) {
+ if (right->type() == T_OBJECT || right->type() == T_ARRAY || right->type() == T_VALUETYPE) {
r_lo = right->as_register();
} else {
r_lo = right->as_register_lo();
}
#else
@@ -2609,29 +2614,29 @@
void LIR_Assembler::comp_op(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2, LIR_Op2* op) {
if (opr1->is_single_cpu()) {
Register reg1 = opr1->as_register();
if (opr2->is_single_cpu()) {
// cpu register - cpu register
- if (opr1->type() == T_OBJECT || opr1->type() == T_ARRAY) {
+ if (opr1->type() == T_OBJECT || opr1->type() == T_ARRAY || opr1->type() == T_VALUETYPE) {
__ cmpoop(reg1, opr2->as_register());
} else {
- assert(opr2->type() != T_OBJECT && opr2->type() != T_ARRAY, "cmp int, oop?");
+ assert(opr2->type() != T_OBJECT && opr2->type() != T_ARRAY && opr2->type() != T_VALUETYPE, "cmp int, oop?");
__ cmpl(reg1, opr2->as_register());
}
} else if (opr2->is_stack()) {
// cpu register - stack
- if (opr1->type() == T_OBJECT || opr1->type() == T_ARRAY) {
+ if (opr1->type() == T_OBJECT || opr1->type() == T_ARRAY || opr1->type() == T_VALUETYPE) {
__ cmpoop(reg1, frame_map()->address_for_slot(opr2->single_stack_ix()));
} else {
__ cmpl(reg1, frame_map()->address_for_slot(opr2->single_stack_ix()));
}
} else if (opr2->is_constant()) {
// cpu register - constant
LIR_Const* c = opr2->as_constant_ptr();
if (c->type() == T_INT) {
__ cmpl(reg1, c->as_jint());
- } else if (c->type() == T_OBJECT || c->type() == T_ARRAY) {
+ } else if (c->type() == T_OBJECT || c->type() == T_ARRAY || c->type() == T_VALUETYPE) {
// In 64bit oops are single register
jobject o = c->as_jobject();
if (o == NULL) {
__ cmpptr(reg1, (int32_t)NULL_WORD);
} else {
@@ -2727,11 +2732,11 @@
__ fcmp(noreg, opr2->fpu(), op->fpu_pop_count() > 0, op->fpu_pop_count() > 1);
} else if (opr1->is_address() && opr2->is_constant()) {
LIR_Const* c = opr2->as_constant_ptr();
#ifdef _LP64
- if (c->type() == T_OBJECT || c->type() == T_ARRAY) {
+ if (c->type() == T_OBJECT || c->type() == T_ARRAY || c->type() == T_VALUETYPE) {
assert(condition == lir_cond_equal || condition == lir_cond_notEqual, "need to reverse");
__ movoop(rscratch1, c->as_jobject());
}
#endif // LP64
if (op->info() != NULL) {
@@ -2739,11 +2744,11 @@
}
// special case: address - constant
LIR_Address* addr = opr1->as_address_ptr();
if (c->type() == T_INT) {
__ cmpl(as_Address(addr), c->as_jint());
- } else if (c->type() == T_OBJECT || c->type() == T_ARRAY) {
+ } else if (c->type() == T_OBJECT || c->type() == T_ARRAY || c->type() == T_VALUETYPE) {
#ifdef _LP64
// %%% Make this explode if addr isn't reachable until we figure out a
// better strategy by giving noreg as the temp for as_Address
__ cmpoop(rscratch1, as_Address(addr, noreg));
#else
< prev index next >