comparison src/cpu/sparc/vm/templateTable_sparc.cpp @ 1913:3b2dea75431e

6984311: JSR 292 needs optional bootstrap method parameters Summary: Allow CONSTANT_InvokeDynamic nodes to have any number of extra operands. Reviewed-by: twisti
author jrose
date Sat, 30 Oct 2010 13:08:23 -0700
parents d55217dc206f
children f95d63e2154a
comparison
equal deleted inserted replaced
1912:8213b0f5c92d 1913:3b2dea75431e
339 Register Rscratch = G4_scratch; 339 Register Rscratch = G4_scratch;
340 340
341 resolve_cache_and_index(f1_oop, Otos_i, Rcache, Rscratch, wide ? sizeof(u2) : sizeof(u1)); 341 resolve_cache_and_index(f1_oop, Otos_i, Rcache, Rscratch, wide ? sizeof(u2) : sizeof(u1));
342 342
343 __ verify_oop(Otos_i); 343 __ verify_oop(Otos_i);
344
345 Label L_done;
346 const Register Rcon_klass = G3_scratch; // same as Rcache
347 const Register Rarray_klass = G4_scratch; // same as Rscratch
348 __ load_klass(Otos_i, Rcon_klass);
349 AddressLiteral array_klass_addr((address)Universe::systemObjArrayKlassObj_addr());
350 __ load_contents(array_klass_addr, Rarray_klass);
351 __ cmp(Rarray_klass, Rcon_klass);
352 __ brx(Assembler::notEqual, false, Assembler::pt, L_done);
353 __ delayed()->nop();
354 __ ld(Address(Otos_i, arrayOopDesc::length_offset_in_bytes()), Rcon_klass);
355 __ tst(Rcon_klass);
356 __ brx(Assembler::zero, true, Assembler::pt, L_done);
357 __ delayed()->clr(Otos_i); // executed only if branch is taken
358
359 // Load the exception from the system-array which wraps it:
360 __ load_heap_oop(Otos_i, arrayOopDesc::base_offset_in_bytes(T_OBJECT), Otos_i);
361 __ throw_if_not_x(Assembler::never, Interpreter::throw_exception_entry(), G3_scratch);
362
363 __ bind(L_done);
344 } 364 }
345 365
346 void TemplateTable::ldc2_w() { 366 void TemplateTable::ldc2_w() {
347 transition(vtos, vtos); 367 transition(vtos, vtos);
348 Label retry, resolved, Long, exit; 368 Label retry, resolved, Long, exit;