< prev index next >
src/share/vm/c1/c1_LinearScan.cpp
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -1102,10 +1102,12 @@
if (op2->in_opr1() != op2->in_opr2() && op2->in_opr2() == opr) {
assert((op2->result_opr()->is_register() || op->code() == lir_cmp) && op2->in_opr1()->is_register(), "cannot mark second operand as stack if others are not in register");
return shouldHaveRegister;
}
}
+ default:
+ break;
}
} else {
// FPU stack float instruction
switch (op->code()) {
case lir_add:
@@ -1118,10 +1120,12 @@
if (op2->in_opr1() != op2->in_opr2() && op2->in_opr2() == opr) {
assert((op2->result_opr()->is_register() || op->code() == lir_cmp) && op2->in_opr1()->is_register(), "cannot mark second operand as stack if others are not in register");
return shouldHaveRegister;
}
}
+ default:
+ break;
}
}
// We want to sometimes use logical operations on pointers, in particular in GC barriers.
// Since 64bit logical operations do not current support operands on stack, we have to make sure
// T_OBJECT doesn't get spilled along with T_LONG.
@@ -1140,10 +1144,12 @@
if (op2->in_opr1() != op2->in_opr2() && op2->in_opr2() == opr) {
assert((op2->result_opr()->is_register() || op->code() == lir_cmp) && op2->in_opr1()->is_register(), "cannot mark second operand as stack if others are not in register");
return shouldHaveRegister;
}
}
+ default:
+ break;
}
}
#endif // X86 S390
// all other operands require a register
@@ -1245,10 +1251,12 @@
TRACE_LINEAR_SCAN(4, tty->print_cr("operation at op_id %d: added hint from interval %d to %d", cmove->id(), from->reg_num(), to->reg_num()));
}
}
break;
}
+ default:
+ break;
}
}
void LinearScan::build_intervals() {
@@ -3025,12 +3033,12 @@
assert(op->as_Op1() != NULL, "move must be LIR_Op1");
LIR_Op1* move = (LIR_Op1*)op;
LIR_Opr src = move->in_opr();
LIR_Opr dst = move->result_opr();
if (dst == src ||
- !dst->is_pointer() && !src->is_pointer() &&
- src->is_same_register(dst)) {
+ (!dst->is_pointer() && !src->is_pointer() &&
+ src->is_same_register(dst))) {
instructions->at_put(j, NULL);
has_dead = true;
}
}
}
< prev index next >