diff src/cpu/sparc/vm/templateTable_sparc.cpp @ 3785:ddd894528dbc

7056328: JSR 292 invocation sometimes fails in adapters for types not on boot class path Reviewed-by: never
author jrose
date Thu, 23 Jun 2011 17:14:06 -0700
parents 286c498ae0d4
children 3d42f82cd811
line wrap: on
line diff
--- a/src/cpu/sparc/vm/templateTable_sparc.cpp	Wed Jun 22 14:45:37 2011 -0700
+++ b/src/cpu/sparc/vm/templateTable_sparc.cpp	Thu Jun 23 17:14:06 2011 -0700
@@ -266,7 +266,7 @@
 
 void TemplateTable::ldc(bool wide) {
   transition(vtos, vtos);
-  Label call_ldc, notInt, notString, notClass, exit;
+  Label call_ldc, notInt, isString, notString, notClass, exit;
 
   if (wide) {
     __ get_2_byte_integer_at_bcp(1, G3_scratch, O1, InterpreterMacroAssembler::Unsigned);
@@ -317,8 +317,11 @@
 
   __ bind(notInt);
  // __ cmp(O2, JVM_CONSTANT_String);
+  __ brx(Assembler::equal, true, Assembler::pt, isString);
+  __ delayed()->cmp(O2, JVM_CONSTANT_Object);
   __ brx(Assembler::notEqual, true, Assembler::pt, notString);
   __ delayed()->ldf(FloatRegisterImpl::S, O0, O1, Ftos_f);
+  __ bind(isString);
   __ ld_ptr(O0, O1, Otos_i);
   __ verify_oop(Otos_i);
   __ push(atos);