提交 50ebd6d5 编写于 作者: K kvn

Merge

...@@ -15,5 +15,6 @@ fix_lines() { ...@@ -15,5 +15,6 @@ fix_lines() {
' F2=$2 ' F2=$2
mv $1+ $1 mv $1+ $1
} }
[ -f $3/$1 ] && (fix_lines $2/$1 $3/$1; cmp -s $2/$1 $3/$1) || \ fix_lines $2/$1 $3/$1
[ -f $3/$1 ] && cmp -s $2/$1 $3/$1 || \
( [ -f $3/$1 ] && echo Updating $3/$1 ; touch $2/made-change ; mv $2/$1 $3/$1 ) ( [ -f $3/$1 ] && echo Updating $3/$1 ; touch $2/made-change ; mv $2/$1 $3/$1 )
...@@ -15,5 +15,6 @@ fix_lines() { ...@@ -15,5 +15,6 @@ fix_lines() {
' F2=$2 ' F2=$2
mv $1+ $1 mv $1+ $1
} }
[ -f $3/$1 ] && (fix_lines $2/$1 $3/$1; cmp -s $2/$1 $3/$1) || \ fix_lines $2/$1 $3/$1
[ -f $3/$1 ] && cmp -s $2/$1 $3/$1 || \
( [ -f $3/$1 ] && echo Updating $3/$1 ; touch $2/made-change ; mv $2/$1 $3/$1 ) ( [ -f $3/$1 ] && echo Updating $3/$1 ; touch $2/made-change ; mv $2/$1 $3/$1 )
...@@ -35,7 +35,8 @@ ifeq ("${Platform_compiler}", "sparcWorks") ...@@ -35,7 +35,8 @@ ifeq ("${Platform_compiler}", "sparcWorks")
# Temporary until SS10 C++ compiler is fixed # Temporary until SS10 C++ compiler is fixed
OPT_CFLAGS/generateOptoStub.o = -xO2 OPT_CFLAGS/generateOptoStub.o = -xO2
# Temporary util SS12u1 C++ compiler is fixed
OPT_CFLAGS/c1_LinearScan.o = -xO2
else else
ifeq ("${Platform_compiler}", "gcc") ifeq ("${Platform_compiler}", "gcc")
......
...@@ -32,6 +32,7 @@ RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index, ...@@ -32,6 +32,7 @@ RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index,
: _throw_index_out_of_bounds_exception(throw_index_out_of_bounds_exception) : _throw_index_out_of_bounds_exception(throw_index_out_of_bounds_exception)
, _index(index) , _index(index)
{ {
assert(info != NULL, "must have info");
_info = new CodeEmitInfo(info); _info = new CodeEmitInfo(info);
} }
......
...@@ -420,7 +420,8 @@ int LIR_Assembler::emit_unwind_handler() { ...@@ -420,7 +420,8 @@ int LIR_Assembler::emit_unwind_handler() {
} }
if (compilation()->env()->dtrace_method_probes()) { if (compilation()->env()->dtrace_method_probes()) {
jobject2reg(method()->constant_encoding(), O0); __ mov(G2_thread, O0);
jobject2reg(method()->constant_encoding(), O1);
__ call(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), relocInfo::runtime_call_type); __ call(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), relocInfo::runtime_call_type);
__ delayed()->nop(); __ delayed()->nop();
} }
......
...@@ -311,7 +311,7 @@ void LIRGenerator::store_stack_parameter (LIR_Opr item, ByteSize offset_from_sp) ...@@ -311,7 +311,7 @@ void LIRGenerator::store_stack_parameter (LIR_Opr item, ByteSize offset_from_sp)
void LIRGenerator::do_StoreIndexed(StoreIndexed* x) { void LIRGenerator::do_StoreIndexed(StoreIndexed* x) {
assert(x->is_root(),""); assert(x->is_pinned(),"");
bool needs_range_check = true; bool needs_range_check = true;
bool use_length = x->length() != NULL; bool use_length = x->length() != NULL;
bool obj_store = x->elt_type() == T_ARRAY || x->elt_type() == T_OBJECT; bool obj_store = x->elt_type() == T_ARRAY || x->elt_type() == T_OBJECT;
...@@ -386,7 +386,7 @@ void LIRGenerator::do_StoreIndexed(StoreIndexed* x) { ...@@ -386,7 +386,7 @@ void LIRGenerator::do_StoreIndexed(StoreIndexed* x) {
void LIRGenerator::do_MonitorEnter(MonitorEnter* x) { void LIRGenerator::do_MonitorEnter(MonitorEnter* x) {
assert(x->is_root(),""); assert(x->is_pinned(),"");
LIRItem obj(x->obj(), this); LIRItem obj(x->obj(), this);
obj.load_item(); obj.load_item();
...@@ -398,7 +398,7 @@ void LIRGenerator::do_MonitorEnter(MonitorEnter* x) { ...@@ -398,7 +398,7 @@ void LIRGenerator::do_MonitorEnter(MonitorEnter* x) {
CodeEmitInfo* info_for_exception = NULL; CodeEmitInfo* info_for_exception = NULL;
if (x->needs_null_check()) { if (x->needs_null_check()) {
info_for_exception = state_for(x, x->lock_stack_before()); info_for_exception = state_for(x);
} }
// this CodeEmitInfo must not have the xhandlers because here the // this CodeEmitInfo must not have the xhandlers because here the
...@@ -409,7 +409,7 @@ void LIRGenerator::do_MonitorEnter(MonitorEnter* x) { ...@@ -409,7 +409,7 @@ void LIRGenerator::do_MonitorEnter(MonitorEnter* x) {
void LIRGenerator::do_MonitorExit(MonitorExit* x) { void LIRGenerator::do_MonitorExit(MonitorExit* x) {
assert(x->is_root(),""); assert(x->is_pinned(),"");
LIRItem obj(x->obj(), this); LIRItem obj(x->obj(), this);
obj.dont_load_item(); obj.dont_load_item();
...@@ -871,10 +871,11 @@ void LIRGenerator::do_NewInstance(NewInstance* x) { ...@@ -871,10 +871,11 @@ void LIRGenerator::do_NewInstance(NewInstance* x) {
// This instruction can be deoptimized in the slow path : use // This instruction can be deoptimized in the slow path : use
// O0 as result register. // O0 as result register.
const LIR_Opr reg = result_register_for(x->type()); const LIR_Opr reg = result_register_for(x->type());
#ifndef PRODUCT
if (PrintNotLoaded && !x->klass()->is_loaded()) { if (PrintNotLoaded && !x->klass()->is_loaded()) {
tty->print_cr(" ###class not loaded at new bci %d", x->bci()); tty->print_cr(" ###class not loaded at new bci %d", x->printable_bci());
} }
#endif
CodeEmitInfo* info = state_for(x, x->state()); CodeEmitInfo* info = state_for(x, x->state());
LIR_Opr tmp1 = FrameMap::G1_oop_opr; LIR_Opr tmp1 = FrameMap::G1_oop_opr;
LIR_Opr tmp2 = FrameMap::G3_oop_opr; LIR_Opr tmp2 = FrameMap::G3_oop_opr;
...@@ -1018,7 +1019,7 @@ void LIRGenerator::do_CheckCast(CheckCast* x) { ...@@ -1018,7 +1019,7 @@ void LIRGenerator::do_CheckCast(CheckCast* x) {
obj.load_item(); obj.load_item();
LIR_Opr out_reg = rlock_result(x); LIR_Opr out_reg = rlock_result(x);
CodeStub* stub; CodeStub* stub;
CodeEmitInfo* info_for_exception = state_for(x, x->state()->copy_locks()); CodeEmitInfo* info_for_exception = state_for(x);
if (x->is_incompatible_class_change_check()) { if (x->is_incompatible_class_change_check()) {
assert(patching_info == NULL, "can't patch this"); assert(patching_info == NULL, "can't patch this");
......
...@@ -83,7 +83,8 @@ RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index, ...@@ -83,7 +83,8 @@ RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index,
: _throw_index_out_of_bounds_exception(throw_index_out_of_bounds_exception) : _throw_index_out_of_bounds_exception(throw_index_out_of_bounds_exception)
, _index(index) , _index(index)
{ {
_info = info == NULL ? NULL : new CodeEmitInfo(info); assert(info != NULL, "must have info");
_info = new CodeEmitInfo(info);
} }
......
...@@ -488,7 +488,9 @@ int LIR_Assembler::emit_unwind_handler() { ...@@ -488,7 +488,9 @@ int LIR_Assembler::emit_unwind_handler() {
} }
if (compilation()->env()->dtrace_method_probes()) { if (compilation()->env()->dtrace_method_probes()) {
__ movoop(Address(rsp, 0), method()->constant_encoding()); __ get_thread(rax);
__ movptr(Address(rsp, 0), rax);
__ movoop(Address(rsp, sizeof(void*)), method()->constant_encoding());
__ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit))); __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit)));
} }
......
...@@ -107,7 +107,7 @@ bool LIRGenerator::can_store_as_constant(Value v, BasicType type) const { ...@@ -107,7 +107,7 @@ bool LIRGenerator::can_store_as_constant(Value v, BasicType type) const {
return false; return false;
} }
Constant* c = v->as_Constant(); Constant* c = v->as_Constant();
if (c && c->state() == NULL) { if (c && c->state_before() == NULL) {
// constants of any type can be stored directly, except for // constants of any type can be stored directly, except for
// unloaded object constants. // unloaded object constants.
return true; return true;
...@@ -250,7 +250,7 @@ void LIRGenerator::store_stack_parameter (LIR_Opr item, ByteSize offset_from_sp) ...@@ -250,7 +250,7 @@ void LIRGenerator::store_stack_parameter (LIR_Opr item, ByteSize offset_from_sp)
void LIRGenerator::do_StoreIndexed(StoreIndexed* x) { void LIRGenerator::do_StoreIndexed(StoreIndexed* x) {
assert(x->is_root(),""); assert(x->is_pinned(),"");
bool needs_range_check = true; bool needs_range_check = true;
bool use_length = x->length() != NULL; bool use_length = x->length() != NULL;
bool obj_store = x->elt_type() == T_ARRAY || x->elt_type() == T_OBJECT; bool obj_store = x->elt_type() == T_ARRAY || x->elt_type() == T_OBJECT;
...@@ -325,7 +325,7 @@ void LIRGenerator::do_StoreIndexed(StoreIndexed* x) { ...@@ -325,7 +325,7 @@ void LIRGenerator::do_StoreIndexed(StoreIndexed* x) {
void LIRGenerator::do_MonitorEnter(MonitorEnter* x) { void LIRGenerator::do_MonitorEnter(MonitorEnter* x) {
assert(x->is_root(),""); assert(x->is_pinned(),"");
LIRItem obj(x->obj(), this); LIRItem obj(x->obj(), this);
obj.load_item(); obj.load_item();
...@@ -341,7 +341,7 @@ void LIRGenerator::do_MonitorEnter(MonitorEnter* x) { ...@@ -341,7 +341,7 @@ void LIRGenerator::do_MonitorEnter(MonitorEnter* x) {
CodeEmitInfo* info_for_exception = NULL; CodeEmitInfo* info_for_exception = NULL;
if (x->needs_null_check()) { if (x->needs_null_check()) {
info_for_exception = state_for(x, x->lock_stack_before()); info_for_exception = state_for(x);
} }
// this CodeEmitInfo must not have the xhandlers because here the // this CodeEmitInfo must not have the xhandlers because here the
// object is already locked (xhandlers expect object to be unlocked) // object is already locked (xhandlers expect object to be unlocked)
...@@ -352,7 +352,7 @@ void LIRGenerator::do_MonitorEnter(MonitorEnter* x) { ...@@ -352,7 +352,7 @@ void LIRGenerator::do_MonitorEnter(MonitorEnter* x) {
void LIRGenerator::do_MonitorExit(MonitorExit* x) { void LIRGenerator::do_MonitorExit(MonitorExit* x) {
assert(x->is_root(),""); assert(x->is_pinned(),"");
LIRItem obj(x->obj(), this); LIRItem obj(x->obj(), this);
obj.dont_load_item(); obj.dont_load_item();
...@@ -984,9 +984,11 @@ void LIRGenerator::do_Convert(Convert* x) { ...@@ -984,9 +984,11 @@ void LIRGenerator::do_Convert(Convert* x) {
void LIRGenerator::do_NewInstance(NewInstance* x) { void LIRGenerator::do_NewInstance(NewInstance* x) {
#ifndef PRODUCT
if (PrintNotLoaded && !x->klass()->is_loaded()) { if (PrintNotLoaded && !x->klass()->is_loaded()) {
tty->print_cr(" ###class not loaded at new bci %d", x->bci()); tty->print_cr(" ###class not loaded at new bci %d", x->printable_bci());
} }
#endif
CodeEmitInfo* info = state_for(x, x->state()); CodeEmitInfo* info = state_for(x, x->state());
LIR_Opr reg = result_register_for(x->type()); LIR_Opr reg = result_register_for(x->type());
LIR_Opr klass_reg = new_register(objectType); LIR_Opr klass_reg = new_register(objectType);
...@@ -1127,7 +1129,7 @@ void LIRGenerator::do_CheckCast(CheckCast* x) { ...@@ -1127,7 +1129,7 @@ void LIRGenerator::do_CheckCast(CheckCast* x) {
obj.load_item(); obj.load_item();
// info for exceptions // info for exceptions
CodeEmitInfo* info_for_exception = state_for(x, x->state()->copy_locks()); CodeEmitInfo* info_for_exception = state_for(x);
CodeStub* stub; CodeStub* stub;
if (x->is_incompatible_class_change_check()) { if (x->is_incompatible_class_change_check()) {
......
...@@ -346,7 +346,7 @@ void trace_method_handle_stub(const char* adaptername, ...@@ -346,7 +346,7 @@ void trace_method_handle_stub(const char* adaptername,
if (stack_dump_count > 64) stack_dump_count = 48; if (stack_dump_count > 64) stack_dump_count = 48;
for (i = 0; i < stack_dump_count; i += 4) { for (i = 0; i < stack_dump_count; i += 4) {
printf(" dump at SP[%d] "INTPTR_FORMAT": "INTPTR_FORMAT" "INTPTR_FORMAT" "INTPTR_FORMAT" "INTPTR_FORMAT"\n", printf(" dump at SP[%d] "INTPTR_FORMAT": "INTPTR_FORMAT" "INTPTR_FORMAT" "INTPTR_FORMAT" "INTPTR_FORMAT"\n",
i, &entry_sp[i+0], entry_sp[i+0], entry_sp[i+1], entry_sp[i+2], entry_sp[i+3]); i, (intptr_t) &entry_sp[i+0], entry_sp[i+0], entry_sp[i+1], entry_sp[i+2], entry_sp[i+3]);
} }
print_method_handle(mh); print_method_handle(mh);
} }
......
...@@ -7349,43 +7349,6 @@ instruct bytes_reverse_short(rRegI dst) %{ ...@@ -7349,43 +7349,6 @@ instruct bytes_reverse_short(rRegI dst) %{
ins_pipe( ialu_reg ); ins_pipe( ialu_reg );
%} %}
instruct loadI_reversed(rRegI dst, memory src) %{
match(Set dst (ReverseBytesI (LoadI src)));
format %{ "bswap_movl $dst, $src" %}
opcode(0x8B, 0x0F, 0xC8); /* Opcode 8B 0F C8 */
ins_encode(REX_reg_mem(dst, src), OpcP, reg_mem(dst, src), REX_reg(dst), OpcS, opc3_reg(dst));
ins_pipe( ialu_reg_mem );
%}
instruct loadL_reversed(rRegL dst, memory src) %{
match(Set dst (ReverseBytesL (LoadL src)));
format %{ "bswap_movq $dst, $src" %}
opcode(0x8B, 0x0F, 0xC8); /* Opcode 8B 0F C8 */
ins_encode(REX_reg_mem_wide(dst, src), OpcP, reg_mem(dst, src), REX_reg_wide(dst), OpcS, opc3_reg(dst));
ins_pipe( ialu_reg_mem );
%}
instruct storeI_reversed(memory dst, rRegI src) %{
match(Set dst (StoreI dst (ReverseBytesI src)));
format %{ "movl_bswap $dst, $src" %}
opcode(0x0F, 0xC8, 0x89); /* Opcode 0F C8 89 */
ins_encode( REX_reg(src), OpcP, opc2_reg(src), REX_reg_mem(src, dst), OpcT, reg_mem(src, dst) );
ins_pipe( ialu_mem_reg );
%}
instruct storeL_reversed(memory dst, rRegL src) %{
match(Set dst (StoreL dst (ReverseBytesL src)));
format %{ "movq_bswap $dst, $src" %}
opcode(0x0F, 0xC8, 0x89); /* Opcode 0F C8 89 */
ins_encode( REX_reg_wide(src), OpcP, opc2_reg(src), REX_reg_mem_wide(src, dst), OpcT, reg_mem(src, dst) );
ins_pipe( ialu_mem_reg );
%}
//---------- Zeros Count Instructions ------------------------------------------ //---------- Zeros Count Instructions ------------------------------------------
instruct countLeadingZerosI(rRegI dst, rRegI src, rFlagsReg cr) %{ instruct countLeadingZerosI(rRegI dst, rRegI src, rFlagsReg cr) %{
......
此差异已折叠。
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
* *
*/ */
class BlockBegin;
class CompilationResourceObj; class CompilationResourceObj;
class XHandlers; class XHandlers;
class ExceptionInfo; class ExceptionInfo;
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -346,7 +346,7 @@ class LinearScan : public CompilationResourceObj { ...@@ -346,7 +346,7 @@ class LinearScan : public CompilationResourceObj {
int append_scope_value_for_operand(LIR_Opr opr, GrowableArray<ScopeValue*>* scope_values); int append_scope_value_for_operand(LIR_Opr opr, GrowableArray<ScopeValue*>* scope_values);
int append_scope_value(int op_id, Value value, GrowableArray<ScopeValue*>* scope_values); int append_scope_value(int op_id, Value value, GrowableArray<ScopeValue*>* scope_values);
IRScopeDebugInfo* compute_debug_info_for_scope(int op_id, IRScope* cur_scope, ValueStack* cur_state, ValueStack* innermost_state, int cur_bci, int stack_end, int locks_end); IRScopeDebugInfo* compute_debug_info_for_scope(int op_id, IRScope* cur_scope, ValueStack* cur_state, ValueStack* innermost_state);
void compute_debug_info(CodeEmitInfo* info, int op_id); void compute_debug_info(CodeEmitInfo* info, int op_id);
void assign_reg_num(LIR_OpList* instructions, IntervalWalker* iw); void assign_reg_num(LIR_OpList* instructions, IntervalWalker* iw);
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -448,3 +448,7 @@ thread.cpp c1_Compiler.hpp ...@@ -448,3 +448,7 @@ thread.cpp c1_Compiler.hpp
top.hpp c1_globals.hpp top.hpp c1_globals.hpp
vmStructs.hpp c1_Runtime1.hpp vmStructs.hpp c1_Runtime1.hpp
c1_Canonicalizer.cpp c1_ValueStack.hpp
c1_LIR.cpp c1_ValueStack.hpp
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册