comparison src/share/vm/c1/c1_LIR.hpp @ 1297:c466efa608d5

6932496: c1: deoptimization of jsr subroutine fails on sparcv9 Summary: store jsr ret bci as intptr constant in c1 debug info Reviewed-by: never
author roland
date Fri, 05 Mar 2010 13:58:34 +0100
parents 3cf667df43ef
children 9f5b60a14736
comparison
equal deleted inserted replaced
1296:d8e270c4f609 1297:c466efa608d5
83 private: 83 private:
84 JavaValue _value; 84 JavaValue _value;
85 85
86 void type_check(BasicType t) const { assert(type() == t, "type check"); } 86 void type_check(BasicType t) const { assert(type() == t, "type check"); }
87 void type_check(BasicType t1, BasicType t2) const { assert(type() == t1 || type() == t2, "type check"); } 87 void type_check(BasicType t1, BasicType t2) const { assert(type() == t1 || type() == t2, "type check"); }
88 88 void type_check(BasicType t1, BasicType t2, BasicType t3) const { assert(type() == t1 || type() == t2 || type() == t3, "type check"); }
89 public: 89
90 LIR_Const(jint i) { _value.set_type(T_INT); _value.set_jint(i); } 90 public:
91 LIR_Const(jint i, bool is_address=false) { _value.set_type(is_address?T_ADDRESS:T_INT); _value.set_jint(i); }
91 LIR_Const(jlong l) { _value.set_type(T_LONG); _value.set_jlong(l); } 92 LIR_Const(jlong l) { _value.set_type(T_LONG); _value.set_jlong(l); }
92 LIR_Const(jfloat f) { _value.set_type(T_FLOAT); _value.set_jfloat(f); } 93 LIR_Const(jfloat f) { _value.set_type(T_FLOAT); _value.set_jfloat(f); }
93 LIR_Const(jdouble d) { _value.set_type(T_DOUBLE); _value.set_jdouble(d); } 94 LIR_Const(jdouble d) { _value.set_type(T_DOUBLE); _value.set_jdouble(d); }
94 LIR_Const(jobject o) { _value.set_type(T_OBJECT); _value.set_jobject(o); } 95 LIR_Const(jobject o) { _value.set_type(T_OBJECT); _value.set_jobject(o); }
95 LIR_Const(void* p) { 96 LIR_Const(void* p) {
103 } 104 }
104 105
105 virtual BasicType type() const { return _value.get_type(); } 106 virtual BasicType type() const { return _value.get_type(); }
106 virtual LIR_Const* as_constant() { return this; } 107 virtual LIR_Const* as_constant() { return this; }
107 108
108 jint as_jint() const { type_check(T_INT ); return _value.get_jint(); } 109 jint as_jint() const { type_check(T_INT, T_ADDRESS); return _value.get_jint(); }
109 jlong as_jlong() const { type_check(T_LONG ); return _value.get_jlong(); } 110 jlong as_jlong() const { type_check(T_LONG ); return _value.get_jlong(); }
110 jfloat as_jfloat() const { type_check(T_FLOAT ); return _value.get_jfloat(); } 111 jfloat as_jfloat() const { type_check(T_FLOAT ); return _value.get_jfloat(); }
111 jdouble as_jdouble() const { type_check(T_DOUBLE); return _value.get_jdouble(); } 112 jdouble as_jdouble() const { type_check(T_DOUBLE); return _value.get_jdouble(); }
112 jobject as_jobject() const { type_check(T_OBJECT); return _value.get_jobject(); } 113 jobject as_jobject() const { type_check(T_OBJECT); return _value.get_jobject(); }
113 jint as_jint_lo() const { type_check(T_LONG ); return low(_value.get_jlong()); } 114 jint as_jint_lo() const { type_check(T_LONG ); return low(_value.get_jlong()); }
118 #else 119 #else
119 address as_pointer() const { type_check(T_INT ); return (address)_value.get_jint(); } 120 address as_pointer() const { type_check(T_INT ); return (address)_value.get_jint(); }
120 #endif 121 #endif
121 122
122 123
123 jint as_jint_bits() const { type_check(T_FLOAT, T_INT); return _value.get_jint(); } 124 jint as_jint_bits() const { type_check(T_FLOAT, T_INT, T_ADDRESS); return _value.get_jint(); }
124 jint as_jint_lo_bits() const { 125 jint as_jint_lo_bits() const {
125 if (type() == T_DOUBLE) { 126 if (type() == T_DOUBLE) {
126 return low(jlong_cast(_value.get_jdouble())); 127 return low(jlong_cast(_value.get_jdouble()));
127 } else { 128 } else {
128 return as_jint_lo(); 129 return as_jint_lo();
716 static LIR_Opr oopConst(jobject o) { return (LIR_Opr)(new LIR_Const(o)); } 717 static LIR_Opr oopConst(jobject o) { return (LIR_Opr)(new LIR_Const(o)); }
717 static LIR_Opr address(LIR_Address* a) { return (LIR_Opr)a; } 718 static LIR_Opr address(LIR_Address* a) { return (LIR_Opr)a; }
718 static LIR_Opr intptrConst(void* p) { return (LIR_Opr)(new LIR_Const(p)); } 719 static LIR_Opr intptrConst(void* p) { return (LIR_Opr)(new LIR_Const(p)); }
719 static LIR_Opr intptrConst(intptr_t v) { return (LIR_Opr)(new LIR_Const((void*)v)); } 720 static LIR_Opr intptrConst(intptr_t v) { return (LIR_Opr)(new LIR_Const((void*)v)); }
720 static LIR_Opr illegal() { return (LIR_Opr)-1; } 721 static LIR_Opr illegal() { return (LIR_Opr)-1; }
722 static LIR_Opr addressConst(jint i) { return (LIR_Opr)(new LIR_Const(i, true)); }
721 723
722 static LIR_Opr value_type(ValueType* type); 724 static LIR_Opr value_type(ValueType* type);
723 static LIR_Opr dummy_value_type(ValueType* type); 725 static LIR_Opr dummy_value_type(ValueType* type);
724 }; 726 };
725 727