Mercurial > hg > graal-jvmci-8
comparison src/cpu/x86/vm/templateInterpreter_x86_64.cpp @ 3451:38fa55e5e792
7055355: JSR 292: crash while throwing WrongMethodTypeException
Reviewed-by: jrose, twisti, bdelsart
author | never |
---|---|
date | Thu, 16 Jun 2011 13:46:55 -0700 |
parents | 3d2ab563047a |
children | b20d64f83668 |
comparison
equal
deleted
inserted
replaced
3450:3275a6560cf7 | 3451:38fa55e5e792 |
---|---|
115 __ call_VM(noreg, | 115 __ call_VM(noreg, |
116 CAST_FROM_FN_PTR(address, | 116 CAST_FROM_FN_PTR(address, |
117 InterpreterRuntime:: | 117 InterpreterRuntime:: |
118 throw_ClassCastException), | 118 throw_ClassCastException), |
119 c_rarg1); | 119 c_rarg1); |
120 return entry; | |
121 } | |
122 | |
123 // Arguments are: required type at TOS+8, failing object (or NULL) at TOS+4. | |
124 address TemplateInterpreterGenerator::generate_WrongMethodType_handler() { | |
125 address entry = __ pc(); | |
126 | |
127 __ pop(c_rarg2); // failing object is at TOS | |
128 __ pop(c_rarg1); // required type is at TOS+8 | |
129 | |
130 __ verify_oop(c_rarg1); | |
131 __ verify_oop(c_rarg2); | |
132 | |
133 // Various method handle types use interpreter registers as temps. | |
134 __ restore_bcp(); | |
135 __ restore_locals(); | |
136 | |
137 // Expression stack must be empty before entering the VM for an exception. | |
138 __ empty_expression_stack(); | |
139 | |
140 __ call_VM(noreg, | |
141 CAST_FROM_FN_PTR(address, | |
142 InterpreterRuntime::throw_WrongMethodTypeException), | |
143 // pass required type, failing object (or NULL) | |
144 c_rarg1, c_rarg2); | |
145 return entry; | 120 return entry; |
146 } | 121 } |
147 | 122 |
148 address TemplateInterpreterGenerator::generate_exception_handler_common( | 123 address TemplateInterpreterGenerator::generate_exception_handler_common( |
149 const char* name, const char* message, bool pass_oop) { | 124 const char* name, const char* message, bool pass_oop) { |