提交 f32f3ea2 编写于 作者: M mdoerr

8236179: C1 register allocation error with T_ADDRESS

Reviewed-by: rkennke, vlivanov, roland, mdoerr
Contributed-by: NAditya Mandaleeka <adityam@microsoft.com>
上级 cfb48804
...@@ -55,6 +55,8 @@ LIR_Opr FrameMap::map_to_opr(BasicType type, VMRegPair* reg, bool outgoing) { ...@@ -55,6 +55,8 @@ LIR_Opr FrameMap::map_to_opr(BasicType type, VMRegPair* reg, bool outgoing) {
opr = as_oop_opr(reg); opr = as_oop_opr(reg);
} else if (type == T_METADATA) { } else if (type == T_METADATA) {
opr = as_metadata_opr(reg); opr = as_metadata_opr(reg);
} else if (type == T_ADDRESS) {
opr = as_address_opr(reg);
} else { } else {
opr = as_opr(reg); opr = as_opr(reg);
} }
......
...@@ -54,6 +54,8 @@ LIR_Opr FrameMap::map_to_opr(BasicType type, VMRegPair* reg, bool) { ...@@ -54,6 +54,8 @@ LIR_Opr FrameMap::map_to_opr(BasicType type, VMRegPair* reg, bool) {
opr = as_oop_opr(reg); opr = as_oop_opr(reg);
} else if (type == T_METADATA) { } else if (type == T_METADATA) {
opr = as_metadata_opr(reg); opr = as_metadata_opr(reg);
} else if (type == T_ADDRESS) {
opr = as_address_opr(reg);
} else { } else {
opr = as_opr(reg); opr = as_opr(reg);
} }
......
...@@ -964,7 +964,7 @@ void LIR_Assembler::reg2stack(LIR_Opr src, LIR_Opr dest, BasicType type, bool po ...@@ -964,7 +964,7 @@ void LIR_Assembler::reg2stack(LIR_Opr src, LIR_Opr dest, BasicType type, bool po
if (type == T_OBJECT || type == T_ARRAY) { if (type == T_OBJECT || type == T_ARRAY) {
__ verify_oop(src->as_register()); __ verify_oop(src->as_register());
__ movptr (dst, src->as_register()); __ movptr (dst, src->as_register());
} else if (type == T_METADATA) { } else if (type == T_METADATA || type == T_ADDRESS) {
__ movptr (dst, src->as_register()); __ movptr (dst, src->as_register());
} else { } else {
__ movl (dst, src->as_register()); __ movl (dst, src->as_register());
...@@ -1145,7 +1145,7 @@ void LIR_Assembler::stack2reg(LIR_Opr src, LIR_Opr dest, BasicType type) { ...@@ -1145,7 +1145,7 @@ void LIR_Assembler::stack2reg(LIR_Opr src, LIR_Opr dest, BasicType type) {
if (type == T_ARRAY || type == T_OBJECT) { if (type == T_ARRAY || type == T_OBJECT) {
__ movptr(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix())); __ movptr(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()));
__ verify_oop(dest->as_register()); __ verify_oop(dest->as_register());
} else if (type == T_METADATA) { } else if (type == T_METADATA || type == T_ADDRESS) {
__ movptr(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix())); __ movptr(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()));
} else { } else {
__ movl(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix())); __ movl(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()));
......
...@@ -198,6 +198,10 @@ class FrameMap : public CompilationResourceObj { ...@@ -198,6 +198,10 @@ class FrameMap : public CompilationResourceObj {
return LIR_OprFact::single_cpu_metadata(cpu_reg2rnr(r)); return LIR_OprFact::single_cpu_metadata(cpu_reg2rnr(r));
} }
static LIR_Opr as_address_opr(Register r) {
return LIR_OprFact::single_cpu_address(cpu_reg2rnr(r));
}
FrameMap(ciMethod* method, int monitors, int reserved_argument_area_size); FrameMap(ciMethod* method, int monitors, int reserved_argument_area_size);
bool finalize_frame(int nof_slots); bool finalize_frame(int nof_slots);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册