1.1 --- a/src/share/vm/c1/c1_LIR.hpp Thu Sep 02 11:40:02 2010 -0700 1.2 +++ b/src/share/vm/c1/c1_LIR.hpp Fri Sep 03 17:51:07 2010 -0700 1.3 @@ -849,6 +849,8 @@ 1.4 , lir_monaddr 1.5 , lir_roundfp 1.6 , lir_safepoint 1.7 + , lir_pack64 1.8 + , lir_unpack64 1.9 , lir_unwind 1.10 , end_op1 1.11 , begin_op2 1.12 @@ -1464,18 +1466,16 @@ 1.13 CodeEmitInfo* _info_for_patch; 1.14 CodeEmitInfo* _info_for_exception; 1.15 CodeStub* _stub; 1.16 - // Helpers for Tier1UpdateMethodData 1.17 ciMethod* _profiled_method; 1.18 int _profiled_bci; 1.19 + bool _should_profile; 1.20 1.21 public: 1.22 LIR_OpTypeCheck(LIR_Code code, LIR_Opr result, LIR_Opr object, ciKlass* klass, 1.23 LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, bool fast_check, 1.24 - CodeEmitInfo* info_for_exception, CodeEmitInfo* info_for_patch, CodeStub* stub, 1.25 - ciMethod* profiled_method, int profiled_bci); 1.26 + CodeEmitInfo* info_for_exception, CodeEmitInfo* info_for_patch, CodeStub* stub); 1.27 LIR_OpTypeCheck(LIR_Code code, LIR_Opr object, LIR_Opr array, 1.28 - LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, CodeEmitInfo* info_for_exception, 1.29 - ciMethod* profiled_method, int profiled_bci); 1.30 + LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, CodeEmitInfo* info_for_exception); 1.31 1.32 LIR_Opr object() const { return _object; } 1.33 LIR_Opr array() const { assert(code() == lir_store_check, "not valid"); return _array; } 1.34 @@ -1489,8 +1489,12 @@ 1.35 CodeStub* stub() const { return _stub; } 1.36 1.37 // methodDataOop profiling 1.38 - ciMethod* profiled_method() { return _profiled_method; } 1.39 - int profiled_bci() { return _profiled_bci; } 1.40 + void set_profiled_method(ciMethod *method) { _profiled_method = method; } 1.41 + void set_profiled_bci(int bci) { _profiled_bci = bci; } 1.42 + void set_should_profile(bool b) { _should_profile = b; } 1.43 + ciMethod* profiled_method() const { return _profiled_method; } 1.44 + int profiled_bci() const { return _profiled_bci; } 1.45 + bool should_profile() const { return _should_profile; } 1.46 1.47 virtual void emit_code(LIR_Assembler* masm); 1.48 virtual LIR_OpTypeCheck* as_OpTypeCheck() { return this; } 1.49 @@ -1771,7 +1775,6 @@ 1.50 virtual void print_instr(outputStream* out) const PRODUCT_RETURN; 1.51 }; 1.52 1.53 - 1.54 class LIR_InsertionBuffer; 1.55 1.56 //--------------------------------LIR_List--------------------------------------------------- 1.57 @@ -1835,6 +1838,7 @@ 1.58 //---------- mutators --------------- 1.59 void insert_before(int i, LIR_List* op_list) { _operations.insert_before(i, op_list->instructions_list()); } 1.60 void insert_before(int i, LIR_Op* op) { _operations.insert_before(i, op); } 1.61 + void remove_at(int i) { _operations.remove_at(i); } 1.62 1.63 //---------- printing ------------- 1.64 void print_instructions() PRODUCT_RETURN; 1.65 @@ -1908,6 +1912,9 @@ 1.66 void logical_or (LIR_Opr left, LIR_Opr right, LIR_Opr dst) { append(new LIR_Op2(lir_logic_or, left, right, dst)); } 1.67 void logical_xor (LIR_Opr left, LIR_Opr right, LIR_Opr dst) { append(new LIR_Op2(lir_logic_xor, left, right, dst)); } 1.68 1.69 + void pack64(LIR_Opr src, LIR_Opr dst) { append(new LIR_Op1(lir_pack64, src, dst, T_LONG, lir_patch_none, NULL)); } 1.70 + void unpack64(LIR_Opr src, LIR_Opr dst) { append(new LIR_Op1(lir_unpack64, src, dst, T_LONG, lir_patch_none, NULL)); } 1.71 + 1.72 void null_check(LIR_Opr opr, CodeEmitInfo* info) { append(new LIR_Op1(lir_null_check, opr, info)); } 1.73 void throw_exception(LIR_Opr exceptionPC, LIR_Opr exceptionOop, CodeEmitInfo* info) { 1.74 append(new LIR_Op2(lir_throw, exceptionPC, exceptionOop, LIR_OprFact::illegalOpr, info)); 1.75 @@ -2034,15 +2041,17 @@ 1.76 1.77 void fpop_raw() { append(new LIR_Op0(lir_fpop_raw)); } 1.78 1.79 + void instanceof(LIR_Opr result, LIR_Opr object, ciKlass* klass, LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, bool fast_check, CodeEmitInfo* info_for_patch); 1.80 + void store_check(LIR_Opr object, LIR_Opr array, LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, CodeEmitInfo* info_for_exception); 1.81 + 1.82 void checkcast (LIR_Opr result, LIR_Opr object, ciKlass* klass, 1.83 LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, bool fast_check, 1.84 CodeEmitInfo* info_for_exception, CodeEmitInfo* info_for_patch, CodeStub* stub, 1.85 ciMethod* profiled_method, int profiled_bci); 1.86 - void instanceof(LIR_Opr result, LIR_Opr object, ciKlass* klass, LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, bool fast_check, CodeEmitInfo* info_for_patch); 1.87 - void store_check(LIR_Opr object, LIR_Opr array, LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, CodeEmitInfo* info_for_exception); 1.88 - 1.89 // methodDataOop profiling 1.90 - void profile_call(ciMethod* method, int bci, LIR_Opr mdo, LIR_Opr recv, LIR_Opr t1, ciKlass* cha_klass) { append(new LIR_OpProfileCall(lir_profile_call, method, bci, mdo, recv, t1, cha_klass)); } 1.91 + void profile_call(ciMethod* method, int bci, LIR_Opr mdo, LIR_Opr recv, LIR_Opr t1, ciKlass* cha_klass) { 1.92 + append(new LIR_OpProfileCall(lir_profile_call, method, bci, mdo, recv, t1, cha_klass)); 1.93 + } 1.94 }; 1.95 1.96 void print_LIR(BlockList* blocks);