339 const int tags_offset = Array<u1>::base_offset_in_bytes();
340
341 // get type
342 __ add(r3, r1, tags_offset);
343 __ lea(r3, Address(r0, r3));
344 __ ldarb(r3, r3);
345
346 // unresolved class - get the resolved class
347 __ cmp(r3, (u1)JVM_CONSTANT_UnresolvedClass);
348 __ br(Assembler::EQ, call_ldc);
349
350 // unresolved class in error state - call into runtime to throw the error
351 // from the first resolution attempt
352 __ cmp(r3, (u1)JVM_CONSTANT_UnresolvedClassInError);
353 __ br(Assembler::EQ, call_ldc);
354
355 // resolved class - need to call vm to get java mirror of the class
356 __ cmp(r3, (u1)JVM_CONSTANT_Class);
357 __ br(Assembler::NE, notClass);
358
359 __ bind(call_ldc);
360 __ mov(c_rarg1, is_ldc_wide(type) ? 1 : 0);
361 call_VM(r0, CAST_FROM_FN_PTR(address, InterpreterRuntime::ldc), c_rarg1);
362 __ push_ptr(r0);
363 __ verify_oop(r0);
364 __ b(Done);
365
366 __ bind(notClass);
367 __ cmp(r3, (u1)JVM_CONSTANT_Float);
368 __ br(Assembler::NE, notFloat);
369 // ftos
370 __ adds(r1, r2, r1, Assembler::LSL, 3);
371 __ ldrs(v0, Address(r1, base_offset));
372 __ push_f();
373 __ b(Done);
374
375 __ bind(notFloat);
376
377 __ cmp(r3, (u1)JVM_CONSTANT_Integer);
378 __ br(Assembler::NE, notInt);
|
339 const int tags_offset = Array<u1>::base_offset_in_bytes();
340
341 // get type
342 __ add(r3, r1, tags_offset);
343 __ lea(r3, Address(r0, r3));
344 __ ldarb(r3, r3);
345
346 // unresolved class - get the resolved class
347 __ cmp(r3, (u1)JVM_CONSTANT_UnresolvedClass);
348 __ br(Assembler::EQ, call_ldc);
349
350 // unresolved class in error state - call into runtime to throw the error
351 // from the first resolution attempt
352 __ cmp(r3, (u1)JVM_CONSTANT_UnresolvedClassInError);
353 __ br(Assembler::EQ, call_ldc);
354
355 // resolved class - need to call vm to get java mirror of the class
356 __ cmp(r3, (u1)JVM_CONSTANT_Class);
357 __ br(Assembler::NE, notClass);
358
359 __ load_resolved_klass_at_offset(r2, r1, r3, rscratch1); // kills r3=tag
360
361 __ cmp(r3, zr); // resolved_klass ?= null
362 __ br(Assembler::EQ, call_ldc);
363
364 const int mirror_offset = in_bytes(Klass::java_mirror_offset());
365 __ ldr(r3, Address(r3, mirror_offset));
366 __ resolve_oop_handle(r3, rscratch1, rscratch2);
367 __ push_ptr(r3);
368
369 __ b(Done);
370
371 __ bind(call_ldc);
372 __ mov(c_rarg1, is_ldc_wide(type) ? 1 : 0);
373 call_VM(r0, CAST_FROM_FN_PTR(address, InterpreterRuntime::ldc), c_rarg1);
374 __ push_ptr(r0);
375 __ verify_oop(r0);
376 __ b(Done);
377
378 __ bind(notClass);
379 __ cmp(r3, (u1)JVM_CONSTANT_Float);
380 __ br(Assembler::NE, notFloat);
381 // ftos
382 __ adds(r1, r2, r1, Assembler::LSL, 3);
383 __ ldrs(v0, Address(r1, base_offset));
384 __ push_f();
385 __ b(Done);
386
387 __ bind(notFloat);
388
389 __ cmp(r3, (u1)JVM_CONSTANT_Integer);
390 __ br(Assembler::NE, notInt);
|