Lines Matching defs:__
39 #define __ _masm->
61 __ g1_write_barrier_pre(base, index, offset,
69 __ mov(val, new_val);
74 __ store_heap_oop(val, base, offset);
76 __ store_heap_oop(val, base, index);
83 __ add(base, offset, base);
85 __ add(base, index, base);
88 __ g1_write_barrier_post(base, new_val, tmp);
98 __ store_heap_oop(val, base, offset);
100 __ store_heap_oop(val, base, index);
106 __ add(base, offset, base);
108 __ add(base, index, base);
111 __ card_write_barrier_post(base, val, tmp);
183 __ get_cache_and_index_and_bytecode_at_bcp(bc_reg, temp_reg, temp_reg, byte_no, 1);
184 __ set(bc, bc_reg);
185 __ cmp_and_br_short(temp_reg, 0, Assembler::equal, Assembler::pn, L_patch_done); // don't patch
191 __ set(bc, bc_reg);
197 __ ldub(at_bcp(0), temp_reg);
198 __ cmp_and_br_short(temp_reg, Bytecodes::_breakpoint, Assembler::notEqual, Assembler::pt, L_fast_patch);
200 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::set_original_bytecode_at), Lmethod, Lbcp, bc_reg);
201 __ ba_short(L_patch_done);
202 __ bind(L_fast_patch);
208 __ ldub(at_bcp(0), temp_reg);
209 __ cmp(temp_reg, orig_bytecode);
210 __ br(Assembler::equal, false, Assembler::pt, L_okay);
211 __ delayed()->cmp(temp_reg, bc_reg);
212 __ br(Assembler::equal, false, Assembler::pt, L_okay);
213 __ delayed()->nop();
214 __ stop("patching the wrong bytecode");
215 __ bind(L_okay);
219 __ stb(bc_reg, at_bcp(0));
220 __ bind(L_patch_done);
233 __ stop("shouldnotreachhere bytecode");
238 __ clr(Otos_i);
244 __ set(value, Otos_i);
252 __ set(value, Otos_l);
254 __ set(value, Otos_l2);
255 __ clr( Otos_l1);
271 __ sethi(a, G3_scratch);
272 __ ldf(FloatRegisterImpl::S, G3_scratch, a.low10(), Ftos_f);
286 __ sethi(a, G3_scratch);
287 __ ldf(FloatRegisterImpl::D, G3_scratch, a.low10(), Ftos_d);
295 __ ldsb( at_bcp(1), Otos_i );
300 __ get_2_byte_integer_at_bcp(1, G3_scratch, Otos_i, InterpreterMacroAssembler::Signed);
308 __ get_2_byte_integer_at_bcp(1, G3_scratch, O1, InterpreterMacroAssembler::Unsigned);
310 __ ldub(Lbcp, 1, O1);
312 __ get_cpool_and_tags(O0, O2);
318 __ add(O2, tags_offset, O2);
319 __ ldub(O2, O1, O2);
321 __ cmp_and_brx_short(O2, JVM_CONSTANT_UnresolvedString, Assembler::equal, Assembler::pt, call_ldc);
324 __ cmp_and_brx_short(O2, JVM_CONSTANT_UnresolvedClass, Assembler::equal, Assembler::pt, call_ldc);
327 __ cmp_and_brx_short(O2, JVM_CONSTANT_UnresolvedClassInError, Assembler::equal, Assembler::pn, call_ldc);
329 __ cmp(O2, JVM_CONSTANT_Class); // need to call vm to get java mirror of the class
330 __ brx(Assembler::notEqual, true, Assembler::pt, notClass);
331 __ delayed()->add(O0, base_offset, O0);
333 __ bind(call_ldc);
334 __ set(wide, O1);
336 __ push(atos);
337 __ ba_short(exit);
339 __ bind(notClass);
340 // __ add(O0, base_offset, O0);
341 __ sll(O1, LogBytesPerWord, O1);
342 __ cmp(O2, JVM_CONSTANT_Integer);
343 __ brx(Assembler::notEqual, true, Assembler::pt, notInt);
344 __ delayed()->cmp(O2, JVM_CONSTANT_String);
345 __ ld(O0, O1, Otos_i);
346 __ push(itos);
347 __ ba_short(exit);
349 __ bind(notInt);
350 // __ cmp(O2, JVM_CONSTANT_String);
351 __ brx(Assembler::equal, true, Assembler::pt, isString);
352 __ delayed()->cmp(O2, JVM_CONSTANT_Object);
353 __ brx(Assembler::notEqual, true, Assembler::pt, notString);
354 __ delayed()->ldf(FloatRegisterImpl::S, O0, O1, Ftos_f);
355 __ bind(isString);
356 __ ld_ptr(O0, O1, Otos_i);
357 __ verify_oop(Otos_i);
358 __ push(atos);
359 __ ba_short(exit);
361 __ bind(notString);
362 // __ ldf(FloatRegisterImpl::S, O0, O1, Ftos_f);
363 __ push(ftos);
365 __ bind(exit);
378 __ call_VM(noreg, CAST_FROM_FN_PTR(address,
381 __ should_not_reach_here();
390 __ verify_oop(Otos_i);
395 __ load_klass(Otos_i, Rcon_klass);
397 __ load_contents(array_klass_addr, Rarray_klass);
398 __ cmp_and_brx_short(Rarray_klass, Rcon_klass, Assembler::notEqual, Assembler::pt, L_done);
399 __ ld(Address(Otos_i, arrayOopDesc::length_offset_in_bytes()), Rcon_klass);
400 __ tst(Rcon_klass);
401 __ brx(Assembler::zero, true, Assembler::pt, L_done);
402 __ delayed()->clr(Otos_i); // executed only if branch is taken
405 __ load_heap_oop(Otos_i, arrayOopDesc::base_offset_in_bytes(T_OBJECT), Otos_i);
406 __ throw_if_not_x(Assembler::never, Interpreter::throw_exception_entry(), G3_scratch);
408 __ bind(L_done);
415 __ bind(retry);
416 __ get_2_byte_integer_at_bcp(1, G3_scratch, O1, InterpreterMacroAssembler::Unsigned);
417 __ get_cpool_and_tags(O0, O2);
422 __ add(O2, tags_offset, O2);
423 __ ldub(O2, O1, O2);
425 __ sll(O1, LogBytesPerWord, O1);
426 __ add(O0, O1, G3_scratch);
428 __ cmp_and_brx_short(O2, JVM_CONSTANT_Double, Assembler::notEqual, Assembler::pt, Long);
434 __ ldf(FloatRegisterImpl::D, G3_scratch, base_offset, Ftos_d);
437 __ ldf(FloatRegisterImpl::S, G3_scratch, base_offset, f);
438 __ ldf(FloatRegisterImpl::S, G3_scratch, base_offset + sizeof(jdouble)/2,
441 __ push(dtos);
442 __ ba_short(exit);
444 __ bind(Long);
446 __ ldx(G3_scratch, base_offset, Otos_l);
448 __ ld(G3_scratch, base_offset, Otos_l);
449 __ ld(G3_scratch, base_offset + sizeof(jlong)/2, Otos_l->successor());
451 __ push(ltos);
453 __ bind(exit);
458 __ ldub( at_bcp(offset), reg );
464 __ get_2_byte_integer_at_bcp(2, G4_scratch, reg, InterpreterMacroAssembler::Unsigned);
475 __ ldub(at_bcp(Bytecodes::length_for(Bytecodes::_iload)), G3_scratch);
481 __ cmp_and_br_short(G3_scratch, (int)Bytecodes::_iload, Assembler::equal, Assembler::pn, done);
483 __ cmp(G3_scratch, (int)Bytecodes::_fast_iload);
484 __ br(Assembler::equal, false, Assembler::pn, rewrite);
485 __ delayed()->set(Bytecodes::_fast_iload2, G4_scratch);
487 __ cmp(G3_scratch, (int)Bytecodes::_caload);
488 __ br(Assembler::equal, false, Assembler::pn, rewrite);
489 __ delayed()->set(Bytecodes::_fast_icaload, G4_scratch);
491 __ set(Bytecodes::_fast_iload, G4_scratch); // don't check again
494 __ bind(rewrite);
496 __ bind(done);
501 __ access_local_int( G3_scratch, Otos_i );
507 __ access_local_int( G3_scratch, Otos_i );
508 __ push_i();
510 __ access_local_int( G3_scratch, Otos_i );
516 __ access_local_int( G3_scratch, Otos_i );
522 __ access_local_long( G3_scratch, Otos_l );
529 __ access_local_float( G3_scratch, Ftos_f );
536 __ access_local_double( G3_scratch, Ftos_d );
543 __ access_local_ptr( G3_scratch, Otos_i);
550 __ access_local_int( G3_scratch, Otos_i );
557 __ access_local_long( G3_scratch, Otos_l );
564 __ access_local_float( G3_scratch, Ftos_f );
571 __ access_local_double( G3_scratch, Ftos_d );
578 __ access_local_ptr( G3_scratch, Otos_i );
579 __ verify_oop(Otos_i);
587 __ index_check(O2, Otos_i, LogBytesPerInt, G3_scratch, O3);
588 __ ld(O3, arrayOopDesc::base_offset_in_bytes(T_INT), Otos_i);
596 __ index_check(O2, Otos_i, LogBytesPerLong, G3_scratch, O3);
597 __ ld_long(O3, arrayOopDesc::base_offset_in_bytes(T_LONG), Otos_l);
605 __ index_check(O2, Otos_i, LogBytesPerInt, G3_scratch, O3);
606 __ ldf(FloatRegisterImpl::S, O3, arrayOopDesc::base_offset_in_bytes(T_FLOAT), Ftos_f);
614 __ index_check(O2, Otos_i, LogBytesPerLong, G3_scratch, O3);
615 __ ldf(FloatRegisterImpl::D, O3, arrayOopDesc::base_offset_in_bytes(T_DOUBLE), Ftos_d);
623 __ index_check(O2, Otos_i, UseCompressedOops ? 2 : LogBytesPerWord, G3_scratch, O3);
624 __ load_heap_oop(O3, arrayOopDesc::base_offset_in_bytes(T_OBJECT), Otos_i);
625 __ verify_oop(Otos_i);
633 __ index_check(O2, Otos_i, 0, G3_scratch, O3);
634 __ ldsb(O3, arrayOopDesc::base_offset_in_bytes(T_BYTE), Otos_i);
642 __ index_check(O2, Otos_i, LogBytesPerShort, G3_scratch, O3);
643 __ lduh(O3, arrayOopDesc::base_offset_in_bytes(T_CHAR), Otos_i);
651 __ access_local_int( G3_scratch, Otos_i );
652 __ index_check(O2, Otos_i, LogBytesPerShort, G3_scratch, O3);
653 __ lduh(O3, arrayOopDesc::base_offset_in_bytes(T_CHAR), Otos_i);
661 __ index_check(O2, Otos_i, LogBytesPerShort, G3_scratch, O3);
662 __ ldsh(O3, arrayOopDesc::base_offset_in_bytes(T_SHORT), Otos_i);
668 __ ld( Llocals, Interpreter::local_offset_in_bytes(n), Otos_i );
675 __ load_unaligned_long(Llocals, Interpreter::local_offset_in_bytes(n+1), Otos_l);
682 __ ldf( FloatRegisterImpl::S, Llocals, Interpreter::local_offset_in_bytes(n), Ftos_f );
689 __ load_unaligned_double(Llocals, Interpreter::local_offset_in_bytes(n+1), dst);
695 __ ld_ptr( Llocals, Interpreter::local_offset_in_bytes(n), Otos_i );
717 __ ldub(at_bcp(Bytecodes::length_for(Bytecodes::_aload_0)), G3_scratch);
723 __ cmp_and_br_short(G3_scratch, (int)Bytecodes::_getfield, Assembler::equal, Assembler::pn, done);
727 __ cmp(G3_scratch, (int)Bytecodes::_fast_igetfield);
728 __ br(Assembler::equal, false, Assembler::pn, rewrite);
729 __ delayed()->set(Bytecodes::_fast_iaccess_0, G4_scratch);
733 __ cmp(G3_scratch, (int)Bytecodes::_fast_agetfield);
734 __ br(Assembler::equal, false, Assembler::pn, rewrite);
735 __ delayed()->set(Bytecodes::_fast_aaccess_0, G4_scratch);
739 __ cmp(G3_scratch, (int)Bytecodes::_fast_fgetfield);
740 __ br(Assembler::equal, false, Assembler::pn, rewrite);
741 __ delayed()->set(Bytecodes::_fast_faccess_0, G4_scratch);
745 __ set(Bytecodes::_fast_aload_0, G4_scratch);
749 __ bind(rewrite);
751 __ bind(done);
761 __ store_local_int( G3_scratch, Otos_i );
768 __ store_local_long( G3_scratch, Otos_l );
775 __ store_local_float( G3_scratch, Ftos_f );
782 __ store_local_double( G3_scratch, Ftos_d );
788 __ load_ptr(0, Otos_i);
789 __ inc(Lesp, Interpreter::stackElementSize);
790 __ verify_oop_or_return_address(Otos_i, G3_scratch);
792 __ store_local_ptr(G3_scratch, Otos_i);
798 __ pop_i();
800 __ store_local_int( G3_scratch, Otos_i );
806 __ pop_l();
808 __ store_local_long( G3_scratch, Otos_l );
814 __ pop_f();
816 __ store_local_float( G3_scratch, Ftos_f );
822 __ pop_d();
824 __ store_local_double( G3_scratch, Ftos_d );
830 __ load_ptr(0, Otos_i);
831 __ inc(Lesp, Interpreter::stackElementSize);
832 __ verify_oop_or_return_address(Otos_i, G3_scratch);
834 __ store_local_ptr(G3_scratch, Otos_i);
840 __ pop_i(O2); // index
843 __ index_check(O3, O2, LogBytesPerInt, G3_scratch, O2);
844 __ st(Otos_i, O2, arrayOopDesc::base_offset_in_bytes(T_INT));
850 __ pop_i(O2); // index
853 __ index_check(O3, O2, LogBytesPerLong, G3_scratch, O2);
854 __ st_long(Otos_l, O2, arrayOopDesc::base_offset_in_bytes(T_LONG));
860 __ pop_i(O2); // index
863 __ index_check(O3, O2, LogBytesPerInt, G3_scratch, O2);
864 __ stf(FloatRegisterImpl::S, Ftos_f, O2, arrayOopDesc::base_offset_in_bytes(T_FLOAT));
870 __ pop_i(O2); // index
873 __ index_check(O3, O2, LogBytesPerLong, G3_scratch, O2);
874 __ stf(FloatRegisterImpl::D, Ftos_d, O2, arrayOopDesc::base_offset_in_bytes(T_DOUBLE));
881 __ ld_ptr(Lesp, Interpreter::expr_offset_in_bytes(0), Otos_i);
882 __ ld(Lesp, Interpreter::expr_offset_in_bytes(1), O2); // get index
883 __ ld_ptr(Lesp, Interpreter::expr_offset_in_bytes(2), O3); // get array
887 __ verify_oop(Otos_i);
888 __ index_check_without_pop(O3, O2, UseCompressedOops ? 2 : LogBytesPerWord, G3_scratch, O1);
891 __ br_null_short( Otos_i, Assembler::pn, is_null );
893 __ load_klass(O3, O4); // get array klass
894 __ load_klass(Otos_i, O5); // get value klass
898 __ ld_ptr(O4, in_bytes(objArrayKlass::element_klass_offset()), O4);
913 __ gen_subtype_check( O5, O4, G3_scratch, G4_scratch, G1_scratch, store_ok );
916 __ throw_if_not_x( Assembler::never, Interpreter::_throw_ArrayStoreException_entry, G3_scratch );
919 __ bind(store_ok);
922 __ ba(done);
923 __ delayed()->inc(Lesp, 3* Interpreter::stackElementSize); // adj sp (pops array, index and value)
925 __ bind(is_null);
928 __ profile_null_seen(G3_scratch);
929 __ inc(Lesp, 3* Interpreter::stackElementSize); // adj sp (pops array, index and value)
930 __ bind(done);
936 __ pop_i(O2); // index
939 __ index_check(O3, O2, 0, G3_scratch, O2);
940 __ stb(Otos_i, O2, arrayOopDesc::base_offset_in_bytes(T_BYTE));
946 __ pop_i(O2); // index
949 __ index_check(O3, O2, LogBytesPerShort, G3_scratch, O2);
950 __ sth(Otos_i, O2, arrayOopDesc::base_offset_in_bytes(T_CHAR));
962 __ st(Otos_i, Llocals, Interpreter::local_offset_in_bytes(n));
969 __ store_unaligned_long(Otos_l, Llocals, Interpreter::local_offset_in_bytes(n+1));
977 __ stf(FloatRegisterImpl::S, Ftos_f, Llocals, Interpreter::local_offset_in_bytes(n));
984 __ store_unaligned_double(src, Llocals, Interpreter::local_offset_in_bytes(n+1));
990 __ load_ptr(0, Otos_i);
991 __ inc(Lesp, Interpreter::stackElementSize);
992 __ verify_oop_or_return_address(Otos_i, G3_scratch);
993 __ store_local_ptr(n, Otos_i);
999 __ inc(Lesp, Interpreter::stackElementSize);
1005 __ inc(Lesp, 2 * Interpreter::stackElementSize);
1013 __ load_ptr(0, Otos_i);
1014 __ push_ptr(Otos_i);
1022 __ load_ptr( 1, G3_scratch); // get a
1023 __ load_ptr( 0, Otos_l1); // get b
1024 __ store_ptr(1, Otos_l1); // put b
1025 __ store_ptr(0, G3_scratch); // put a - like swap
1026 __ push_ptr(Otos_l1); // push b
1035 __ load_ptr( 0, G3_scratch); // get c
1036 __ push_ptr(G3_scratch); // push c with tag
1039 __ load_ptr( 3, Otos_l1); // get a
1040 __ store_ptr(3, G3_scratch); // put c at 3
1042 __ load_ptr( 2, G3_scratch); // get b
1043 __ store_ptr(2, Otos_l1); // put a at 2
1045 __ store_ptr(1, G3_scratch); // put b at 1
1052 __ load_ptr(1, G3_scratch); // get a
1053 __ load_ptr(0, Otos_l1); // get b
1054 __ push_ptr(G3_scratch); // push a
1055 __ push_ptr(Otos_l1); // push b
1063 __ load_ptr( 1, Lscratch); // get b
1064 __ load_ptr( 2, Otos_l1); // get a
1065 __ store_ptr(2, Lscratch); // put b at a
1067 __ load_ptr( 0, G3_scratch); // get c
1068 __ store_ptr(1, G3_scratch); // put c at b
1070 __ store_ptr(0, Otos_l1); // put a at c
1072 __ push_ptr(Lscratch); // push b
1073 __ push_ptr(G3_scratch); // push c
1083 __ load_ptr( 1, Lscratch); // get c
1084 __ load_ptr( 3, Otos_l1); // get a
1085 __ store_ptr(3, Lscratch); // put c at 3
1086 __ store_ptr(1, Otos_l1); // put a at 1
1088 __ load_ptr( 2, G3_scratch); // get b
1089 __ load_ptr( 0, Otos_l1); // get d
1090 __ store_ptr(0, G3_scratch); // put b at 0
1091 __ store_ptr(2, Otos_l1); // put d at 2
1093 __ push_ptr(Lscratch); // push c
1094 __ push_ptr(Otos_l1); // push d
1102 __ load_ptr( 1, G3_scratch); // get a
1103 __ load_ptr( 0, Otos_l1); // get b
1104 __ store_ptr(0, G3_scratch); // put b
1105 __ store_ptr(1, Otos_l1); // put a
1112 __ pop_i(O1);
1114 case add: __ add(O1, Otos_i, Otos_i); break;
1115 case sub: __ sub(O1, Otos_i, Otos_i); break;
1117 case mul: __ smul(O1, Otos_i, Otos_i); break;
1118 case _and: __ and3(O1, Otos_i, Otos_i); break;
1119 case _or: __ or3(O1, Otos_i, Otos_i); break;
1120 case _xor: __ xor3(O1, Otos_i, Otos_i); break;
1121 case shl: __ sll(O1, Otos_i, Otos_i); break;
1122 case shr: __ sra(O1, Otos_i, Otos_i); break;
1123 case ushr: __ srl(O1, Otos_i, Otos_i); break;
1131 __ pop_l(O2);
1134 case add: __ add(O2, Otos_l, Otos_l); break;
1135 case sub: __ sub(O2, Otos_l, Otos_l); break;
1136 case _and: __ and3(O2, Otos_l, Otos_l); break;
1137 case _or: __ or3(O2, Otos_l, Otos_l); break;
1138 case _xor: __ xor3(O2, Otos_l, Otos_l); break;
1140 case add: __ addcc(O3, Otos_l2, Otos_l2); __ addc(O2, Otos_l1, Otos_l1); break;
1141 case sub: __ subcc(O3, Otos_l2, Otos_l2); __ subc(O2, Otos_l1, Otos_l1); break;
1142 case _and: __ and3(O3, Otos_l2, Otos_l2); __ and3(O2, Otos_l1, Otos_l1); break;
1143 case _or: __ or3(O3, Otos_l2, Otos_l2); __ or3(O2, Otos_l1, Otos_l1); break;
1144 case _xor: __ xor3(O3, Otos_l2, Otos_l2); __ xor3(O2, Otos_l1, Otos_l1); break;
1156 __ pop_i(O1); // get 1st op
1159 __ wry(G0);
1160 __ mov(~0, G3_scratch);
1162 __ tst(O1);
1164 __ br(Assembler::negative, true, Assembler::pn, neg);
1165 __ delayed()->wry(G3_scratch);
1166 __ bind(neg);
1169 __ tst(Otos_i);
1170 __ throw_if_not_icc( Assembler::notZero, Interpreter::_throw_ArithmeticException_entry, G3_scratch );
1174 __ cmp(Otos_i, -1);
1175 __ br(Assembler::notEqual, false, Assembler::pt, regular);
1179 __ delayed()->nop();
1180 __ set(min_int, G4_scratch);
1182 __ delayed()->set(min_int, G4_scratch);
1185 __ cmp(O1, G4_scratch);
1186 __ br(Assembler::equal, true, Assembler::pt, done);
1187 __ delayed()->mov(O1, Otos_i); // (mov only executed if branch taken)
1189 __ bind(regular);
1190 __ sdiv(O1, Otos_i, Otos_i); // note: irem uses O1 after this instruction!
1191 __ bind(done);
1197 __ mov(Otos_i, O2); // save divisor
1199 __ smul(Otos_i, O2, Otos_i);
1200 __ sub(O1, Otos_i, Otos_i);
1206 __ pop_l(O2);
1208 __ mulx(Otos_l, O2, Otos_l);
1210 __ call_VM_leaf(Lscratch, CAST_FROM_FN_PTR(address, SharedRuntime::lmul));
1220 __ pop_l(O2);
1222 __ tst(Otos_l);
1223 __ throw_if_not_xcc( Assembler::notZero, Interpreter::_throw_ArithmeticException_entry, G3_scratch);
1224 __ sdivx(O2, Otos_l, Otos_l);
1226 __ orcc(Otos_l1, Otos_l2, G0);
1227 __ throw_if_not_icc( Assembler::notZero, Interpreter::_throw_ArithmeticException_entry, G3_scratch);
1228 __ call_VM_leaf(Lscratch, CAST_FROM_FN_PTR(address, SharedRuntime::ldiv));
1237 __ pop_l(O2);
1239 __ tst(Otos_l);
1240 __ throw_if_not_xcc( Assembler::notZero, Interpreter::_throw_ArithmeticException_entry, G3_scratch);
1241 __ sdivx(O2, Otos_l, Otos_l2);
1242 __ mulx (Otos_l2, Otos_l, Otos_l2);
1243 __ sub (O2, Otos_l2, Otos_l);
1245 __ orcc(Otos_l1, Otos_l2, G0);
1246 __ throw_if_not_icc(Assembler::notZero, Interpreter::_throw_ArithmeticException_entry, G3_scratch);
1247 __ call_VM_leaf(Lscratch, CAST_FROM_FN_PTR(address, SharedRuntime::lrem));
1255 __ pop_l(O2); // shift value in O2, O3
1257 __ sllx(O2, Otos_i, Otos_l);
1259 __ lshl(O2, O3, Otos_i, Otos_l1, Otos_l2, O4);
1267 __ pop_l(O2); // shift value in O2, O3
1269 __ srax(O2, Otos_i, Otos_l);
1271 __ lshr(O2, O3, Otos_i, Otos_l1, Otos_l2, O4);
1280 __ pop_l(O2); // shift value in O2, O3
1282 __ srlx(O2, Otos_i, Otos_l);
1284 __ lushr(O2, O3, Otos_i, Otos_l1, Otos_l2, O4);
1292 case add: __ pop_f(F4); __ fadd(FloatRegisterImpl::S, F4, Ftos_f, Ftos_f); break;
1293 case sub: __ pop_f(F4); __ fsub(FloatRegisterImpl::S, F4, Ftos_f, Ftos_f); break;
1294 case mul: __ pop_f(F4); __ fmul(FloatRegisterImpl::S, F4, Ftos_f, Ftos_f); break;
1295 case div: __ pop_f(F4); __ fdiv(FloatRegisterImpl::S, F4, Ftos_f, Ftos_f); break;
1300 __ pop_f(F1);
1301 __ fmov(FloatRegisterImpl::S, Ftos_f, F3);
1303 __ pop_i(O0);
1304 __ stf(FloatRegisterImpl::S, Ftos_f, __ d_tmp);
1305 __ ld( __ d_tmp, O1 );
1307 __ call_VM_leaf(Lscratch, CAST_FROM_FN_PTR(address, SharedRuntime::frem));
1319 case add: __ pop_d(F4); __ fadd(FloatRegisterImpl::D, F4, Ftos_d, Ftos_d); break;
1320 case sub: __ pop_d(F4); __ fsub(FloatRegisterImpl::D, F4, Ftos_d, Ftos_d); break;
1321 case mul: __ pop_d(F4); __ fmul(FloatRegisterImpl::D, F4, Ftos_d, Ftos_d); break;
1322 case div: __ pop_d(F4); __ fdiv(FloatRegisterImpl::D, F4, Ftos_d, Ftos_d); break;
1326 __ fmov(FloatRegisterImpl::D, Ftos_f, F2 );
1327 __ pop_d( F0 );
1330 __ stf(FloatRegisterImpl::D, Ftos_f, __ d_tmp);
1331 __ ldd( __ d_tmp, O2 );
1332 __ pop_d(Ftos_f);
1333 __ stf(FloatRegisterImpl::D, Ftos_f, __ d_tmp);
1334 __ ldd( __ d_tmp, O0 );
1336 __ call_VM_leaf(Lscratch, CAST_FROM_FN_PTR(address, SharedRuntime::drem));
1347 __ neg(Otos_i);
1354 __ sub(G0, Otos_l, Otos_l);
1356 __ lneg(Otos_l1, Otos_l2);
1363 __ fneg(FloatRegisterImpl::S, Ftos_f);
1370 __ fneg(FloatRegisterImpl::D, Ftos_f);
1377 __ ldsb(Lbcp, 2, O2); // load constant
1378 __ access_local_int(G3_scratch, Otos_i);
1379 __ add(Otos_i, O2, Otos_i);
1380 __ st(Otos_i, G3_scratch, 0); // access_local_int puts E.A. in G3_scratch
1387 __ get_2_byte_integer_at_bcp( 4, O2, O3, InterpreterMacroAssembler::Signed);
1388 __ access_local_int(G3_scratch, Otos_i);
1389 __ add(Otos_i, O3, Otos_i);
1390 __ st(Otos_i, G3_scratch, 0); // access_local_int puts E.A. in G3_scratch
1445 __ sra ( Otos_i, 0, Otos_l );
1447 __ addcc(Otos_i, 0, Otos_l2);
1448 __ br(Assembler::greaterEqual, true, Assembler::pt, done);
1449 __ delayed()->clr(Otos_l1);
1450 __ set(~0, Otos_l1);
1455 __ st(Otos_i, __ d_tmp );
1456 __ ldf(FloatRegisterImpl::S, __ d_tmp, F0);
1457 __ fitof(FloatRegisterImpl::S, F0, Ftos_f);
1461 __ st(Otos_i, __ d_tmp);
1462 __ ldf(FloatRegisterImpl::S, __ d_tmp, F0);
1463 __ fitof(FloatRegisterImpl::D, F0, Ftos_f);
1467 __ sll(Otos_i, 24, Otos_i);
1468 __ sra(Otos_i, 24, Otos_i);
1472 __ sll(Otos_i, 16, Otos_i);
1473 __ srl(Otos_i, 16, Otos_i);
1477 __ sll(Otos_i, 16, Otos_i);
1478 __ sra(Otos_i, 16, Otos_i);
1483 __ mov(Otos_l2, Otos_i);
1486 __ sra(Otos_l, 0, Otos_i);
1492 __ st_long(Otos_l, __ d_tmp);
1493 __ ldf(FloatRegisterImpl::D, __ d_tmp, Ftos_d);
1497 __ fxtof(FloatRegisterImpl::S, Ftos_d, Ftos_f);
1499 __ fxtof(FloatRegisterImpl::D, Ftos_d, Ftos_d);
1502 __ call_VM_leaf(
1514 __ fcmp(FloatRegisterImpl::S, Assembler::fcc0, Ftos_f, Ftos_f);
1518 __ nop();
1520 __ fb(Assembler::f_unordered, true, Assembler::pn, isNaN);
1521 __ delayed()->clr(Otos_i); // NaN
1522 __ ftoi(FloatRegisterImpl::S, Ftos_f, F30);
1523 __ stf(FloatRegisterImpl::S, F30, __ d_tmp);
1524 __ ld(__ d_tmp, Otos_i);
1525 __ bind(isNaN);
1531 __ push_f();
1533 __ pop_f(F1);
1535 __ pop_i(O0);
1537 __ call_VM_leaf(Lscratch, CAST_FROM_FN_PTR(address, SharedRuntime::f2l));
1541 __ ftof( FloatRegisterImpl::S, FloatRegisterImpl::D, Ftos_f, Ftos_f);
1547 __ push_d();
1550 __ pop_d( Ftos_d );
1552 __ pop_i( O0 );
1553 __ pop_i( O1 );
1555 __ call_VM_leaf(Lscratch,
1563 __ ftof( FloatRegisterImpl::D, FloatRegisterImpl::S, Ftos_d, Ftos_f);
1567 __ push_d();
1568 __ pop_i(O0);
1569 __ pop_i(O1);
1570 __ call_VM_leaf(Lscratch, CAST_FROM_FN_PTR(address, SharedRuntime::d2f));
1576 __ bind(done);
1584 __ pop_l(O1); // pop off value 1, value 2 is in O0
1585 __ lcmp( O1, Otos_l, Otos_i );
1587 __ pop_l(O2); // cmp O2,3 to O0,1
1588 __ lcmp( O2, O3, Otos_l1, Otos_l2, Otos_i );
1595 if (is_float) __ pop_f(F2);
1596 else __ pop_d(F2);
1600 __ float_cmp( is_float, unordered_result, F2, F0, Otos_i );
1605 __ verify_oop(Lmethod);
1606 __ verify_thread();
1609 __ profile_taken_branch(G3_scratch, O2_bumped_count);
1613 if (is_wide) __ get_4_byte_integer_at_bcp( 1, G4_scratch, O1_disp, InterpreterMacroAssembler::set_CC);
1614 else __ get_2_byte_integer_at_bcp( 1, G4_scratch, O1_disp, InterpreterMacroAssembler::Signed, InterpreterMacroAssembler::set_CC);
1621 __ ld_ptr(Lmethod, methodOopDesc::const_offset(), G3_scratch);
1622 __ sub(Lbcp, G3_scratch, G3_scratch);
1623 __ sub(G3_scratch, in_bytes(constMethodOopDesc::codes_offset()) - (is_wide ? 5 : 3), Otos_i);
1626 __ add(Lbcp, O1_disp, Lbcp);
1628 __ push_ptr(Otos_i);
1630 __ dispatch_next(vtos);
1638 __ mov( Lbcp, O0_cur_bcp );
1645 __ br( Assembler::positive, false, Assembler::pn, Lforward );
1647 __ delayed()->add( O1_disp, Lbcp, Lbcp ); // add to bc addr
1655 __ ld_ptr(Lmethod, methodOopDesc::method_data_offset(), G4_scratch);
1656 __ br_null_short(G4_scratch, Assembler::pn, Lno_mdo);
1661 __ increment_mask_and_jump(mdo_backedge_counter, increment, mask, G3_scratch, Lscratch,
1663 __ ba_short(Loverflow);
1667 __ bind(Lno_mdo);
1670 __ increment_mask_and_jump(backedge_counter, increment, mask, G3_scratch, Lscratch,
1672 __ bind(Loverflow);
1675 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::frequency_counter_overflow), O0_cur_bcp);
1679 __ br_null_short(O0, Assembler::pn, Lforward);
1682 __ ld(O0, nmethod::entry_bci_offset(), O2);
1683 __ cmp_and_br_short(O2, InvalidOSREntryBci, Assembler::equal, Assembler::pn, Lforward);
1687 __ mov(G2_thread, L7);
1689 __ mov(O0, L6);
1690 __ set_last_Java_frame(SP, noreg);
1691 __ call_VM_leaf(noreg, CAST_FROM_FN_PTR(address, SharedRuntime::OSR_migration_begin), L7);
1692 __ reset_last_Java_frame();
1693 __ mov(L7, G2_thread);
1696 __ mov(L6, I1);
1699 __ mov(O0, I0);
1702 __ restore(I5_savedSP, 0, SP);
1705 __ ld_ptr(O1, nmethod::osr_entry_point_offset(), O2);
1706 __ jmp(O2, G0);
1707 __ delayed()->nop();
1712 __ increment_backedge_counter(G4_invoke_ctr, G1_scratch);
1714 __ test_invocation_counter_for_mdp(G4_invoke_ctr, G3_scratch, Lforward);
1716 __ test_backedge_count_for_osr(O2_bumped_count, O0_cur_bcp, G3_scratch);
1720 __ test_backedge_count_for_osr(G4_invoke_ctr, O0_cur_bcp, G3_scratch);
1725 __ bind(Lforward);
1728 __ add( O1_disp, Lbcp, Lbcp );// add to bc addr
1733 __ dispatch_next(vtos);
1744 __ cmp( Otos_i, 0);
1745 __ if_cmp(ccNot(cc), false);
1751 __ pop_i(O1);
1752 __ cmp(O1, Otos_i);
1753 __ if_cmp(ccNot(cc), false);
1759 __ tst(Otos_i);
1760 __ if_cmp(ccNot(cc), true);
1766 __ pop_ptr(O1);
1767 __ verify_oop(O1);
1768 __ verify_oop(Otos_i);
1769 __ cmp(O1, Otos_i);
1770 __ if_cmp(ccNot(cc), true);
1778 __ access_local_returnAddress(G3_scratch, Otos_i);
1789 __ set (65536, G3_scratch) ;
1790 __ cmp (Otos_i, G3_scratch) ;
1791 __ bp( Assembler::lessEqualUnsigned, false, Assembler::xcc, Assembler::pn, zzz);
1792 __ delayed()->nop();
1793 __ stop("BCI is in the wrong register half?");
1794 __ bind (zzz) ;
1799 __ profile_ret(vtos, Otos_i, G4_scratch);
1801 __ ld_ptr(Lmethod, methodOopDesc::const_offset(), G3_scratch);
1802 __ add(G3_scratch, Otos_i, G3_scratch);
1803 __ add(G3_scratch, in_bytes(constMethodOopDesc::codes_offset()), Lbcp);
1804 __ dispatch_next(vtos);
1811 __ access_local_returnAddress(G3_scratch, Otos_i);
1814 __ profile_ret(vtos, Otos_i, G4_scratch);
1816 __ ld_ptr(Lmethod, methodOopDesc::const_offset(), G3_scratch);
1817 __ add(G3_scratch, Otos_i, G3_scratch);
1818 __ add(G3_scratch, in_bytes(constMethodOopDesc::codes_offset()), Lbcp);
1819 __ dispatch_next(vtos);
1828 __ add(Lbcp, BytesPerInt, O1);
1829 __ and3(O1, -BytesPerInt, O1);
1831 __ ld(O1, 1 * BytesPerInt, O2); // Low Byte
1832 __ ld(O1, 2 * BytesPerInt, O3); // High Byte
1835 __ sra ( Otos_i, 0, Otos_i );
1839 __ cmp( Otos_i, O2);
1840 __ br( Assembler::less, false, Assembler::pn, default_case);
1841 __ delayed()->cmp( Otos_i, O3 );
1842 __ br( Assembler::greater, false, Assembler::pn, default_case);
1844 __ delayed()->sub(Otos_i, O2, O2);
1845 __ profile_switch_case(O2, O3, G3_scratch, G4_scratch);
1846 __ sll(O2, LogBytesPerInt, O2);
1847 __ add(O2, 3 * BytesPerInt, O2);
1848 __ ba(continue_execution);
1849 __ delayed()->ld(O1, O2, O2);
1851 __ bind(default_case);
1852 __ profile_switch_default(O3);
1853 __ ld(O1, 0, O2); // get default offset
1855 __ bind(continue_execution);
1856 __ add(Lbcp, O2, Lbcp);
1857 __ dispatch_next(vtos);
1863 __ stop("lookupswitch bytecode should have been rewritten");
1870 __ add(Lbcp, BytesPerInt, O1);
1871 __ and3(O1, -BytesPerInt, O1);
1873 __ ld(O1, BytesPerInt, O2);
1874 __ sll(O2, LogBytesPerInt + 1, O2); // in word-pairs
1875 __ add(O1, 2 * BytesPerInt, O3); // set first pair addr
1876 __ ba(loop_entry);
1877 __ delayed()->add(O3, O2, O2); // counter now points past last pair
1880 __ bind(loop);
1881 __ cmp(O4, Otos_i);
1882 __ br(Assembler::equal, true, Assembler::pn, found);
1883 __ delayed()->ld(O3, BytesPerInt, O4); // offset -> O4
1884 __ inc(O3, 2 * BytesPerInt);
1886 __ bind(loop_entry);
1887 __ cmp(O2, O3);
1888 __ brx(Assembler::greaterUnsigned, true, Assembler::pt, loop);
1889 __ delayed()->ld(O3, 0, O4);
1892 __ ld(O1, 0, O4); // get default offset
1894 __ profile_switch_default(O3);
1895 __ ba_short(continue_execution);
1899 __ bind(found);
1901 __ sub(O3, O1, O3);
1902 __ sub(O3, 2*BytesPerInt, O3);
1903 __ srl(O3, LogBytesPerInt + 1, O3); // in word-pairs
1904 __ profile_switch_case(O3, O1, O2, G3_scratch);
1906 __ bind(continue_execution);
1908 __ add(Lbcp, O4, Lbcp);
1909 __ dispatch_next(vtos);
1954 __ add(Lbcp, 3 * BytesPerInt, Rarray);
1955 __ and3(Rarray, -BytesPerInt, Rarray);
1957 __ clr( Ri );
1961 __ ba(entry);
1962 __ delayed()->ld( Rarray, -BytesPerInt, Rj);
1967 __ bind( loop );
1969 __ sra( Rh, 1, Rh );
1975 __ sll( Rh, log_entry_size, Rscratch );
1976 __ ld( Rarray, Rscratch, Rscratch );
1978 __ cmp( Rkey, Rscratch );
1980 __ movcc( Assembler::less, false, Assembler::icc, Rh, Rj ); // j = h if (key < array[h].fast_match())
1981 __ movcc( Assembler::greaterEqual, false, Assembler::icc, Rh, Ri ); // i = h if (key >= array[h].fast_match())
1985 __ br( Assembler::less, true, Assembler::pt, end_of_if );
1986 __ delayed()->mov( Rh, Rj ); // if (<) Rj = Rh
1987 __ mov( Rh, Ri ); // else i = h
1988 __ bind(end_of_if); // }
1992 __ bind( entry );
1993 __ add( Ri, 1, Rscratch );
1994 __ cmp(Rscratch, Rj);
1995 __ br( Assembler::less, true, Assembler::pt, loop );
1996 __ delayed()->add( Ri, Rj, Rh ); // start h = i + j >> 1;
2003 __ mov( Ri, Rh ); // Save index in i for profiling
2005 __ sll( Ri, log_entry_size, Ri );
2006 __ ld( Rarray, Ri, Rscratch );
2008 __ cmp( Rkey, Rscratch );
2009 __ br( Assembler::notEqual, true, Assembler::pn, default_case );
2010 __ delayed()->ld( Rarray, -2 * BytesPerInt, Rj ); // load default offset -> j
2013 __ inc( Ri, BytesPerInt );
2014 __ profile_switch_case(Rh, Rj, Rscratch, Rkey);
2015 __ ld( Rarray, Ri, Rj );
2019 __ ba_short(continue_execution);
2022 __ bind(default_case); // fall through (if not profiling)
2023 __ profile_switch_default(Ri);
2025 __ bind(continue_execution);
2026 __ add( Lbcp, Rj, Lbcp );
2027 __ dispatch_next( vtos );
2037 __ mov(G0, G3_scratch);
2038 __ access_local_ptr(G3_scratch, Otos_i);
2039 __ load_klass(Otos_i, O2);
2040 __ set(JVM_ACC_HAS_FINALIZER, G3);
2041 __ ld(O2, in_bytes(Klass::access_flags_offset()), O2);
2042 __ andcc(G3, O2, G0);
2044 __ br(Assembler::zero, false, Assembler::pn, skip_register_finalizer);
2045 __ delayed()->nop();
2048 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::register_finalizer), Otos_i);
2050 __ bind(skip_register_finalizer);
2053 __ remove_activation(state, /* throw_monitor_exception */ true);
2057 __ ret(); // return to caller
2058 __ delayed()->restore(I5_savedSP, G0, SP);
2091 __ membar( order_constraint );
2110 __ get_cache_and_index_at_bcp(Rcache, index, 1, index_size);
2111 __ ld_ptr(Rcache, constantPoolCacheOopDesc::base_offset() +
2113 __ tst(result);
2114 __ br(Assembler::notEqual, false, Assembler::pt, resolved);
2115 __ delayed()->set((int)bytecode(), O1);
2119 __ get_cache_and_index_and_bytecode_at_bcp(Rcache, index, Lbyte_code, byte_no, 1, index_size);
2120 __ cmp(Lbyte_code, (int) bytecode()); // have we resolved this bytecode?
2121 __ br(Assembler::equal, false, Assembler::pt, resolved);
2122 __ delayed()->set((int)bytecode(), O1);
2144 __ call_VM(noreg, entry, O1);
2146 __ get_cache_and_index_at_bcp(Rcache, index, 1, index_size);
2148 __ ld_ptr(Rcache, constantPoolCacheOopDesc::base_offset() +
2150 __ bind(resolved);
2181 __ get_cache_and_index_at_bcp(cache, index, 1);
2182 __ ld_ptr(Address(cache, method_offset), method);
2189 __ ld_ptr(Address(cache, index_offset), method);
2193 __ ld_ptr(Address(cache, method_offset), method);
2199 __ ld_ptr(Address(cache, index_offset), itable_index);
2201 __ ld_ptr(Address(cache, flags_offset), flags);
2215 __ ld_ptr(Rcache, cp_base_offset + ConstantPoolCacheEntry::flags_offset(), Rflags);
2216 __ ld_ptr(Rcache, cp_base_offset + ConstantPoolCacheEntry::f2_offset(), Roffset);
2218 __ ld_ptr(Rcache, cp_base_offset + ConstantPoolCacheEntry::f1_offset(), Robj);
2236 __ load_contents(get_field_access_count_addr, G1_scratch);
2237 __ cmp_and_br_short(G1_scratch, 0, Assembler::equal, Assembler::pt, Label1);
2239 __ add(Rcache, in_bytes(cp_base_offset), Rcache);
2242 __ clr(Otos_i);
2246 __ push_ptr(Otos_i); // put object on tos where GC wants it.
2249 __ ld_ptr(Lesp, Interpreter::expr_offset_in_bytes(0), Otos_i);
2251 __ verify_oop(Otos_i);
2255 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::post_field_access),
2258 __ pop_ptr(Otos_i); // restore object pointer
2259 __ verify_oop(Otos_i);
2261 __ get_cache_and_index_at_bcp(Rcache, index, 1);
2262 __ bind(Label1);
2283 __ verify_oop(Rclass);
2291 if (__ membar_has_effect(membar_bits)) {
2293 __ set((1 << ConstantPoolCacheEntry::is_volatile_shift), Lscratch);
2294 __ and3(Rflags, Lscratch, Lscratch);
2301 __ srl(Rflags, ConstantPoolCacheEntry::tos_state_shift, Rflags);
2306 __ cmp(Rflags, atos);
2307 __ br(Assembler::notEqual, false, Assembler::pt, notObj);
2308 __ delayed() ->cmp(Rflags, itos);
2311 __ load_heap_oop(Rclass, Roffset, Otos_i);
2312 __ verify_oop(Otos_i);
2313 __ push(atos);
2317 __ ba(checkVolatile);
2318 __ delayed()->tst(Lscratch);
2320 __ bind(notObj);
2323 __ br(Assembler::notEqual, false, Assembler::pt, notInt);
2324 __ delayed() ->cmp(Rflags, ltos);
2327 __ ld(Rclass, Roffset, Otos_i);
2328 __ push(itos);
2332 __ ba(checkVolatile);
2333 __ delayed()->tst(Lscratch);
2335 __ bind(notInt);
2338 __ br(Assembler::notEqual, false, Assembler::pt, notLong);
2339 __ delayed() ->cmp(Rflags, btos);
2343 __ ld_long(Rclass, Roffset, Otos_l);
2344 __ push(ltos);
2348 __ ba(checkVolatile);
2349 __ delayed()->tst(Lscratch);
2351 __ bind(notLong);
2354 __ br(Assembler::notEqual, false, Assembler::pt, notByte);
2355 __ delayed() ->cmp(Rflags, ctos);
2358 __ ldsb(Rclass, Roffset, Otos_i);
2359 __ push(itos);
2363 __ ba(checkVolatile);
2364 __ delayed()->tst(Lscratch);
2366 __ bind(notByte);
2369 __ br(Assembler::notEqual, false, Assembler::pt, notChar);
2370 __ delayed() ->cmp(Rflags, stos);
2373 __ lduh(Rclass, Roffset, Otos_i);
2374 __ push(itos);
2378 __ ba(checkVolatile);
2379 __ delayed()->tst(Lscratch);
2381 __ bind(notChar);
2384 __ br(Assembler::notEqual, false, Assembler::pt, notShort);
2385 __ delayed() ->cmp(Rflags, ftos);
2388 __ ldsh(Rclass, Roffset, Otos_i);
2389 __ push(itos);
2393 __ ba(checkVolatile);
2394 __ delayed()->tst(Lscratch);
2396 __ bind(notShort);
2400 __ br(Assembler::notEqual, false, Assembler::pt, notFloat);
2401 __ delayed() ->tst(Lscratch);
2404 __ ldf(FloatRegisterImpl::S, Rclass, Roffset, Ftos_f);
2405 __ push(ftos);
2409 __ ba(checkVolatile);
2410 __ delayed()->tst(Lscratch);
2412 __ bind(notFloat);
2416 __ ldf(FloatRegisterImpl::D, Rclass, Roffset, Ftos_d);
2417 __ push(dtos);
2422 __ bind(checkVolatile);
2423 if (__ membar_has_effect(membar_bits)) {
2424 // __ tst(Lscratch); executed in delay slot
2425 __ br(Assembler::zero, false, Assembler::pt, exit);
2426 __ delayed()->nop();
2430 __ bind(exit);
2451 __ get_cache_and_index_at_bcp(Rcache, index, 1);
2454 __ ld_ptr(Rcache, cp_base_offset + ConstantPoolCacheEntry::f2_offset(), Roffset);
2456 __ null_check(Otos_i);
2457 __ verify_oop(Otos_i);
2463 if (__ membar_has_effect(membar_bits)) {
2465 __ ld_ptr(Rcache, cp_base_offset + ConstantPoolCacheEntry::f2_offset(), Rflags);
2466 __ set((1 << ConstantPoolCacheEntry::is_volatile_shift), Lscratch);
2471 __ ldsb(Otos_i, Roffset, Otos_i);
2474 __ lduh(Otos_i, Roffset, Otos_i);
2477 __ ldsh(Otos_i, Roffset, Otos_i);
2480 __ ld(Otos_i, Roffset, Otos_i);
2483 __ ld_long(Otos_i, Roffset, Otos_l);
2486 __ ldf(FloatRegisterImpl::S, Otos_i, Roffset, Ftos_f);
2489 __ ldf(FloatRegisterImpl::D, Otos_i, Roffset, Ftos_d);
2492 __ load_heap_oop(Otos_i, Roffset, Otos_i);
2498 if (__ membar_has_effect(membar_bits)) {
2499 __ btst(Lscratch, Rflags);
2500 __ br(Assembler::zero, false, Assembler::pt, exit);
2501 __ delayed()->nop();
2503 __ bind(exit);
2507 __ verify_oop(Otos_i); // does not blow flags!
2517 __ load_contents(get_field_modification_count_addr, G4_scratch);
2518 __ cmp_and_br_short(G4_scratch, 0, Assembler::equal, Assembler::pt, done);
2519 __ pop_ptr(G4_scratch); // copy the object pointer from tos
2520 __ verify_oop(G4_scratch);
2521 __ push_ptr(G4_scratch); // put the object pointer back on tos
2522 __ get_cache_entry_pointer_at_bcp(G1_scratch, G3_scratch, 1);
2527 case Bytecodes::_fast_aputfield: __ push_ptr(Otos_i); break;
2531 case Bytecodes::_fast_iputfield: __ push_i(Otos_i); break;
2532 case Bytecodes::_fast_dputfield: __ push_d(Ftos_d); break;
2533 case Bytecodes::_fast_fputfield: __ push_f(Ftos_f); break;
2535 case Bytecodes::_fast_lputfield: __ push_l(Otos_l); break;
2538 __ mov(Lesp, G3_scratch); __ inc(G3_scratch, wordSize);
2542 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::post_field_modification), G4_scratch, G1_scratch, G3_scratch);
2544 case Bytecodes::_fast_aputfield: __ pop_ptr(Otos_i); break;
2548 case Bytecodes::_fast_iputfield: __ pop_i(Otos_i); break;
2549 case Bytecodes::_fast_dputfield: __ pop_d(Ftos_d); break;
2550 case Bytecodes::_fast_fputfield: __ pop_f(Ftos_f); break;
2551 case Bytecodes::_fast_lputfield: __ pop_l(Otos_l); break;
2553 __ bind(done);
2568 __ load_contents(get_field_modification_count_addr, G1_scratch);
2569 __ cmp_and_br_short(G1_scratch, 0, Assembler::zero, Assembler::pt, Label1);
2574 __ get_cache_and_index_at_bcp(G1_scratch, G4_scratch, 1);
2576 __ add(G1_scratch, in_bytes(cp_base_offset), G3_scratch);
2579 __ clr(G4_scratch);
2588 __ ld_ptr(G1_scratch, cp_base_offset + ConstantPoolCacheEntry::flags_offset(), Rflags);
2589 __ mov(Lesp, G4_scratch);
2590 __ srl(Rflags, ConstantPoolCacheEntry::tos_state_shift, Rflags);
2593 __ cmp(Rflags, ltos);
2594 __ br(Assembler::equal, false, Assembler::pt, two_word);
2595 __ delayed()->cmp(Rflags, dtos);
2596 __ br(Assembler::equal, false, Assembler::pt, two_word);
2597 __ delayed()->nop();
2598 __ inc(G4_scratch, Interpreter::expr_offset_in_bytes(1));
2599 __ ba_short(valsizeknown);
2600 __ bind(two_word);
2602 __ inc(G4_scratch, Interpreter::expr_offset_in_bytes(2));
2604 __ bind(valsizeknown);
2606 __ ld_ptr(G4_scratch, 0, G4_scratch);
2607 __ verify_oop(G4_scratch);
2610 __ mov(Lesp, G1_scratch); __ inc(G1_scratch, wordSize);
2614 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::post_field_modification),
2616 __ get_cache_and_index_at_bcp(Rcache, index, 1);
2617 __ bind(Label1);
2622 __ pop_ptr(r);
2623 __ null_check(r); // for field access must check obj.
2624 __ verify_oop(r);
2645 if (__ membar_has_effect(read_bits) || __ membar_has_effect(write_bits)) {
2646 __ set((1 << ConstantPoolCacheEntry::is_volatile_shift), Lscratch);
2647 __ and3(Rflags, Lscratch, Lscratch);
2649 if (__ membar_has_effect(read_bits)) {
2650 __ cmp_and_br_short(Lscratch, 0, Assembler::equal, Assembler::pt, notVolatile);
2652 __ bind(notVolatile);
2656 __ srl(Rflags, ConstantPoolCacheEntry::tos_state_shift, Rflags);
2665 __ cmp(Rflags, atos);
2666 __ br(Assembler::notEqual, false, Assembler::pt, notObj);
2667 __ delayed()->cmp(Rflags, itos);
2671 __ pop_ptr();
2672 __ verify_oop(Otos_i);
2674 __ ba(checkVolatile);
2675 __ delayed()->tst(Lscratch);
2678 __ bind(notObj);
2680 __ br(Assembler::notEqual, false, Assembler::pt, notInt);
2681 __ delayed()->cmp(Rflags, btos);
2685 __ pop_i();
2686 __ st(Otos_i, Rclass, Roffset);
2687 __ ba(checkVolatile);
2688 __ delayed()->tst(Lscratch);
2691 __ bind(notInt);
2694 __ cmp(Rflags, itos);
2695 __ br(Assembler::notEqual, false, Assembler::pt, notInt);
2696 __ delayed()->cmp(Rflags, atos);
2700 __ pop_i();
2702 __ st(Otos_i, Rclass, Roffset);
2704 __ ba(checkVolatile);
2705 __ delayed()->tst(Lscratch);
2708 __ bind(notInt);
2710 __ br(Assembler::notEqual, false, Assembler::pt, notObj);
2711 __ delayed()->cmp(Rflags, btos);
2715 __ pop_ptr();
2717 __ verify_oop(Otos_i);
2720 __ ba(checkVolatile);
2721 __ delayed()->tst(Lscratch);
2724 __ bind(notObj);
2728 __ br(Assembler::notEqual, false, Assembler::pt, notByte);
2729 __ delayed()->cmp(Rflags, ltos);
2733 __ pop_i();
2735 __ stb(Otos_i, Rclass, Roffset);
2739 __ ba(checkVolatile);
2740 __ delayed()->tst(Lscratch);
2743 __ bind(notByte);
2745 __ br(Assembler::notEqual, false, Assembler::pt, notLong);
2746 __ delayed()->cmp(Rflags, ctos);
2750 __ pop_l();
2752 __ st_long(Otos_l, Rclass, Roffset);
2756 __ ba(checkVolatile);
2757 __ delayed()->tst(Lscratch);
2760 __ bind(notLong);
2762 __ br(Assembler::notEqual, false, Assembler::pt, notChar);
2763 __ delayed()->cmp(Rflags, stos);
2767 __ pop_i();
2769 __ sth(Otos_i, Rclass, Roffset);
2773 __ ba(checkVolatile);
2774 __ delayed()->tst(Lscratch);
2777 __ bind(notChar);
2779 __ br(Assembler::notEqual, false, Assembler::pt, notShort);
2780 __ delayed()->cmp(Rflags, ftos);
2784 __ pop_i();
2786 __ sth(Otos_i, Rclass, Roffset);
2790 __ ba(checkVolatile);
2791 __ delayed()->tst(Lscratch);
2794 __ bind(notShort);
2796 __ br(Assembler::notZero, false, Assembler::pt, notFloat);
2797 __ delayed()->nop();
2801 __ pop_f();
2803 __ stf(FloatRegisterImpl::S, Ftos_f, Rclass, Roffset);
2807 __ ba(checkVolatile);
2808 __ delayed()->tst(Lscratch);
2811 __ bind(notFloat);
2815 __ pop_d();
2817 __ stf(FloatRegisterImpl::D, Ftos_d, Rclass, Roffset);
2823 __ bind(checkVolatile);
2824 __ tst(Lscratch);
2826 if (__ membar_has_effect(write_bits)) {
2827 // __ tst(Lscratch); in delay slot
2828 __ br(Assembler::zero, false, Assembler::pt, exit);
2829 __ delayed()->nop();
2831 __ bind(exit);
2845 __ get_cache_and_index_at_bcp(Rcache, G4_scratch, 1);
2852 if (__ membar_has_effect(read_bits) || __ membar_has_effect(write_bits)) {
2853 __ ld_ptr(Rcache, cp_base_offset + ConstantPoolCacheEntry::flags_offset(), Rflags);
2854 __ set((1 << ConstantPoolCacheEntry::is_volatile_shift), Lscratch);
2855 __ and3(Rflags, Lscratch, Lscratch);
2856 if (__ membar_has_effect(read_bits)) {
2857 __ cmp_and_br_short(Lscratch, 0, Assembler::equal, Assembler::pt, notVolatile);
2859 __ bind(notVolatile);
2863 __ ld_ptr(Rcache, cp_base_offset + ConstantPoolCacheEntry::f2_offset(), Roffset);
2867 case Bytecodes::_fast_bputfield: __ stb(Otos_i, Rclass, Roffset); break;
2869 case Bytecodes::_fast_sputfield: __ sth(Otos_i, Rclass, Roffset); break;
2870 case Bytecodes::_fast_iputfield: __ st(Otos_i, Rclass, Roffset); break;
2871 case Bytecodes::_fast_lputfield: __ st_long(Otos_l, Rclass, Roffset); break;
2873 __ stf(FloatRegisterImpl::S, Ftos_f, Rclass, Roffset);
2876 __ stf(FloatRegisterImpl::D, Ftos_d, Rclass, Roffset);
2885 if (__ membar_has_effect(write_bits)) {
2886 __ cmp_and_br_short(Lscratch, 0, Assembler::equal, Assembler::pt, exit);
2888 __ bind(exit);
2909 __ ld_ptr(Llocals, 0, Rreceiver);
2912 __ get_cache_and_index_at_bcp(Rcache, G4_scratch, 2);
2913 __ ld_ptr(Rcache, constantPoolCacheOopDesc::base_offset() + ConstantPoolCacheEntry::f2_offset(), Roffset);
2914 __ add(Lbcp, 1, Lbcp); // needed to report exception at the correct bcp
2916 __ verify_oop(Rreceiver);
2917 __ null_check(Rreceiver);
2919 __ load_heap_oop(Rreceiver, Roffset, Otos_i);
2921 __ ld (Rreceiver, Roffset, Otos_i) ;
2923 __ ldf(FloatRegisterImpl::S, Rreceiver, Roffset, Ftos_f);
2930 if (__ membar_has_effect(membar_bits)) {
2933 __ ld_ptr(Rcache, constantPoolCacheOopDesc::base_offset() + ConstantPoolCacheEntry::flags_offset(), Rflags);
2937 __ set((1 << ConstantPoolCacheEntry::is_volatile_shift), Lscratch);
2938 __ btst(Rflags, Lscratch);
2939 __ br(Assembler::zero, false, Assembler::pt, notVolatile);
2940 __ delayed()->nop();
2942 __ bind(notVolatile);
2945 __ interp_verify_oop(Otos_i, state, __FILE__, __LINE__);
2946 __ sub(Lbcp, 1, Lbcp);
2985 __ mov(SP, O5_savedSP); // record SP that we wanted the callee to restore
2990 __ verify_oop(index);
2991 __ set((1 << ConstantPoolCacheEntry::has_appendix_shift), temp);
2992 __ btst(flags, temp);
2993 __ br(Assembler::zero, false, Assembler::pt, L_no_push);
2994 __ delayed()->nop();
2998 __ push_ptr(index); // push appendix (MethodType, CallSite, etc.)
2999 __ bind(L_no_push);
3004 __ and3(flags, ConstantPoolCacheEntry::parameter_size_mask, temp); // get parameter size
3005 __ load_receiver(temp, recv); // __ argument_address uses Gargs but we need Lesp
3006 __ verify_oop(recv);
3010 __ srl(flags, ConstantPoolCacheEntry::tos_state_shift, ra);
3019 __ set(table, temp);
3020 __ sll(ra, LogBytesPerWord, ra);
3021 __ ld_ptr(Address(temp, ra), ra);
3032 __ lookup_virtual_method(Rrecv, Rindex, G5_method);
3033 __ call_from_interpreter(Rcall, Gargs, Rret);
3047 __ mov(SP, O5_savedSP); // record SP that we wanted the callee to restore
3050 __ set((1 << ConstantPoolCacheEntry::is_vfinal_shift), G4_scratch);
3051 __ btst(Rret, G4_scratch);
3052 __ br(Assembler::zero, false, Assembler::pt, notFinal);
3053 __ delayed()->and3(Rret, 0xFF, G4_scratch); // gets number of parameters
3059 __ bind(notFinal);
3061 __ mov(G5_method, Rscratch); // better scratch register
3062 __ load_receiver(G4_scratch, O0_recv); // gets receiverOop
3064 __ verify_oop(O0_recv);
3068 __ set(table, Rtemp);
3069 __ srl(Rret, ConstantPoolCacheEntry::tos_state_shift, Rret); // get return type
3072 __ sll(Rret, LogBytesPerWord, Rret);
3073 __ ld_ptr(Rtemp, Rret, Rret); // get return address
3076 __ null_check(O0_recv, oopDesc::klass_offset_in_bytes());
3077 __ load_klass(O0_recv, O0_recv);
3078 __ verify_oop(O0_recv);
3080 __ profile_virtual_call(O0_recv, O4);
3091 __ mov(SP, O5_savedSP); // record SP that we wanted the callee to restore
3098 __ verify_oop(G5_method);
3101 __ lduh(G5_method, in_bytes(methodOopDesc::size_of_parameters_offset()), G4_scratch);
3102 __ load_receiver(G4_scratch, O0);
3105 __ null_check(O0);
3107 __ profile_final_call(O4);
3111 __ set(table, Rtemp);
3112 __ srl(Rret, ConstantPoolCacheEntry::tos_state_shift, Rret); // get return type
3115 __ sll(Rret, LogBytesPerWord, Rret);
3116 __ ld_ptr(Rtemp, Rret, Rret); // get return address
3120 __ call_from_interpreter(Rscratch, Gargs, Rret);
3133 __ null_check(O0_recv);
3136 __ verify_oop(G5_method);
3137 __ profile_call(O4);
3138 __ call_from_interpreter(Rscratch, Gargs, Rret);
3152 __ verify_oop(G5_method);
3153 __ profile_call(O4);
3154 __ call_from_interpreter(Rscratch, Gargs, Rret);
3170 __ set((1 << ConstantPoolCacheEntry::is_vfinal_shift), Rscratch);
3171 __ btst(Rflags, Rscratch);
3172 __ br(Assembler::zero, false, Assembler::pt, notFinal);
3173 __ delayed()->nop();
3175 __ profile_final_call(O4);
3179 __ mov(Rindex, G5_method);
3180 __ call_from_interpreter(Rcall, Gargs, Rret);
3181 __ bind(notFinal);
3183 __ profile_virtual_call(RklassOop, O4);
3204 __ null_check(O0_recv, oopDesc::klass_offset_in_bytes());
3205 __ load_klass(O0_recv, O2_klassOop);
3206 __ verify_oop(O2_klassOop);
3213 __ set((1 << ConstantPoolCacheEntry::is_forced_virtual_shift), Rscratch);
3214 __ btst(O1_flags, Rscratch);
3215 __ br(Assembler::zero, false, Assembler::pt, notMethod);
3216 __ delayed()->nop();
3220 __ bind(notMethod);
3222 __ profile_virtual_call(O2_klassOop, O4);
3233 __ ld(O2_klassOop, instanceKlass::vtable_length_offset() * wordSize, Rtemp);
3235 __ round_to(Rtemp, align_object_offset(1));
3237 __ sll(Rtemp, LogBytesPerWord, Rtemp); // Rscratch *= 4;
3239 __ add(Rtemp, base, Rtemp);
3241 __ set(base, Rscratch);
3242 __ add(Rscratch, Rtemp, Rtemp);
3244 __ add(O2_klassOop, Rtemp, Rscratch);
3246 __ bind(search);
3248 __ ld_ptr(Rscratch, itableOffsetEntry::interface_offset_in_bytes(), Rtemp);
3257 __ br_notnull_short( Rtemp, Assembler::pt, ok);
3259 __ should_not_reach_here();
3260 __ bind(ok);
3261 __ verify_oop(Rtemp);
3264 __ verify_oop(Rinterface);
3266 __ cmp(Rinterface, Rtemp);
3267 __ brx(Assembler::notEqual, true, Assembler::pn, search);
3268 __ delayed()->add(Rscratch, itableOffsetEntry::size() * wordSize, Rscratch);
3271 __ ld(Rscratch, itableOffsetEntry::offset_offset_in_bytes(), Rscratch);
3274 __ sll(Rindex, exact_log2(itableMethodEntry::size() * wordSize), Rindex); // Rindex *= 8;
3275 __ add(Rscratch, Rindex, Rscratch);
3276 __ ld_ptr(O2_klassOop, Rscratch, G5_method);
3281 __ br_notnull_short(G5_method, Assembler::pt, ok);
3283 __ should_not_reach_here();
3284 __ bind(ok);
3290 __ verify_oop(G5_method);
3291 __ call_from_interpreter(Rcall, Gargs, Rret);
3301 __ should_not_reach_here();
3311 __ null_check(O0_recv);
3319 __ verify_oop(G5_method);
3320 __ profile_final_call(O4); // FIXME: profile the LambdaForm also
3321 __ call_from_interpreter(Rscratch, Gargs, Rret);
3333 __ call_VM(noreg, CAST_FROM_FN_PTR(address,
3336 __ should_not_reach_here();
3353 __ profile_call(O4);
3356 __ verify_oop(G5_method);
3357 __ call_from_interpreter(Rscratch, Gargs, Rret);
3377 __ get_2_byte_integer_at_bcp(1, Rscratch, Roffset, InterpreterMacroAssembler::Unsigned);
3378 __ get_cpool_and_tags(Rscratch, G3_scratch);
3382 __ add(G3_scratch, typeArrayOopDesc::header_size(T_BYTE) * wordSize, G3_scratch);
3383 __ ldub(G3_scratch, Roffset, G3_scratch);
3384 __ cmp(G3_scratch, JVM_CONSTANT_Class);
3385 __ br(Assembler::notEqual, false, Assembler::pn, slow_case);
3386 __ delayed()->sll(Roffset, LogBytesPerWord, Roffset);
3388 //__ sll(Roffset, LogBytesPerWord, Roffset); // executed in delay slot
3389 __ add(Roffset, sizeof(constantPoolOopDesc), Roffset);
3390 __ ld_ptr(Rscratch, Roffset, RinstanceKlass);
3393 __ ldub(RinstanceKlass, in_bytes(instanceKlass::init_state_offset()), G3_scratch);
3394 __ cmp(G3_scratch, instanceKlass::fully_initialized);
3395 __ br(Assembler::notEqual, false, Assembler::pn, slow_case);
3396 __ delayed()->ld(RinstanceKlass, in_bytes(Klass::layout_helper_offset()), Roffset);
3399 //__ ld(RinstanceKlass, in_bytes(Klass::layout_helper_offset()), Roffset);
3402 __ btst(Klass::_lh_instance_slow_path_bit, Roffset);
3403 __ br(Assembler::notZero, false, Assembler::pn, slow_case);
3404 __ delayed()->nop();
3423 __ ld_ptr(G2_thread, in_bytes(JavaThread::tlab_top_offset()), RoldTopValue); // sets up RalocatedObject
3424 __ ld_ptr(G2_thread, in_bytes(JavaThread::tlab_end_offset()), RendValue);
3425 __ add(RoldTopValue, Roffset, RnewTopValue);
3428 __ cmp(RnewTopValue, RendValue);
3431 __ brx(Assembler::lessEqualUnsigned, true, Assembler::pt, initialize_header);
3434 __ brx(Assembler::lessEqualUnsigned, true, Assembler::pt, initialize_object);
3436 __ delayed()->st_ptr(RnewTopValue, G2_thread, in_bytes(JavaThread::tlab_top_offset()));
3440 __ ld_ptr(G2_thread, in_bytes(JavaThread::tlab_refill_waste_limit_offset()), RtlabWasteLimitValue);
3441 __ sub(RendValue, RoldTopValue, RfreeValue);
3443 __ srlx(RfreeValue, LogHeapWordSize, RfreeValue);
3445 __ srl(RfreeValue, LogHeapWordSize, RfreeValue);
3447 __ cmp_and_brx_short(RtlabWasteLimitValue, RfreeValue, Assembler::greaterEqualUnsigned, Assembler::pt, slow_case); // tlab waste is small
3450 __ add(RtlabWasteLimitValue, ThreadLocalAllocBuffer::refill_waste_limit_increment(), RtlabWasteLimitValue);
3451 __ st_ptr(RtlabWasteLimitValue, G2_thread, in_bytes(JavaThread::tlab_refill_waste_limit_offset()));
3454 __ ba_short(slow_case);
3465 __ set((intptr_t)Universe::heap()->top_addr(), RtopAddr);
3468 __ bind(retry);
3469 __ set((intptr_t)Universe::heap()->end_addr(), RendValue);
3470 __ ld_ptr(RendValue, 0, RendValue);
3471 __ ld_ptr(RtopAddr, 0, RoldTopValue);
3472 __ add(RoldTopValue, Roffset, RnewTopValue);
3476 __ cmp_and_brx_short(RnewTopValue, RendValue, Assembler::greaterUnsigned, Assembler::pn, slow_case);
3478 __ casx_under_lock(RtopAddr, RoldTopValue, RnewTopValue,
3483 __ cmp_and_brx_short(RoldTopValue, RnewTopValue, Assembler::notEqual, Assembler::pn, retry);
3487 __ incr_allocated_bytes(Roffset, G1_scratch, G3_scratch);
3492 __ bind(initialize_object);
3493 __ deccc(Roffset, sizeof(oopDesc));
3494 __ br(Assembler::zero, false, Assembler::pt, initialize_header);
3495 __ delayed()->add(RallocatedObject, sizeof(oopDesc), G3_scratch);
3500 __ bis_zeroing(G3_scratch, Roffset, G1_scratch, initialize_header);
3503 __ subcc(Roffset, wordSize, Roffset);
3504 __ bind(loop);
3505 //__ subcc(Roffset, wordSize, Roffset); // executed above loop or in delay slot
3506 __ st_ptr(G0, G3_scratch, Roffset);
3507 __ br(Assembler::notEqual, false, Assembler::pt, loop);
3508 __ delayed()->subcc(Roffset, wordSize, Roffset);
3510 __ ba_short(initialize_header);
3514 __ bind(slow_case);
3515 __ get_2_byte_integer_at_bcp(1, G3_scratch, O2, InterpreterMacroAssembler::Unsigned);
3516 __ get_constant_pool(O1);
3520 __ ba_short(done);
3523 __ bind(initialize_header);
3526 __ ld_ptr(RinstanceKlass, in_bytes(Klass::prototype_header_offset()), G4_scratch);
3528 __ set((intptr_t)markOopDesc::prototype(), G4_scratch);
3530 __ st_ptr(G4_scratch, RallocatedObject, oopDesc::mark_offset_in_bytes()); // mark
3531 __ store_klass_gap(G0, RallocatedObject); // klass gap if compressed
3532 __ store_klass(RinstanceKlass, RallocatedObject); // klass (last for cms)
3538 __ push(atos);
3539 __ call_VM_leaf(noreg,
3541 __ pop(atos);
3545 __ bind(done);
3552 __ ldub(Lbcp, 1, O1);
3559 __ get_constant_pool(O1);
3560 __ get_2_byte_integer_at_bcp(1, G4_scratch, O2, InterpreterMacroAssembler::Unsigned);
3568 __ verify_oop(Otos_i);
3569 __ tst(Otos_i);
3570 __ throw_if_not_1_x( Assembler::notZero, ok );
3571 __ delayed()->ld(Otos_i, arrayOopDesc::length_offset_in_bytes(), Otos_i);
3572 __ throw_if_not_2( Interpreter::_throw_NullPointerException_entry, G3_scratch, ok);
3584 __ br_null_short(Otos_i, Assembler::pn, is_null);
3587 __ load_klass(Otos_i, RobjKlass); // get value klass
3590 __ get_2_byte_integer_at_bcp(1, Lscratch, Roffset, InterpreterMacroAssembler::Unsigned);
3593 __ get_cpool_and_tags(Lscratch, G3_scratch);
3594 __ add(G3_scratch, typeArrayOopDesc::header_size(T_BYTE) * wordSize, G3_scratch);
3595 __ ldub(G3_scratch, Roffset, G3_scratch);
3596 __ cmp(G3_scratch, JVM_CONSTANT_Class);
3597 __ br(Assembler::equal, true, Assembler::pt, quicked);
3598 __ delayed()->sll(Roffset, LogBytesPerWord, Roffset);
3600 __ push_ptr(); // save receiver for result, and for GC
3602 __ pop_ptr(Otos_i, G3_scratch); // restore receiver
3604 __ ba_short(resolved);
3607 __ bind(quicked);
3608 __ add(Roffset, sizeof(constantPoolOopDesc), Roffset);
3609 __ ld_ptr(Lscratch, Roffset, RspecifiedKlass);
3610 __ bind(resolved);
3611 __ load_klass(Otos_i, RobjKlass); // get value klass
3615 __ gen_subtype_check( RobjKlass, RspecifiedKlass, G3_scratch, G4_scratch, G1_scratch, cast_ok );
3618 __ throw_if_not_x( Assembler::never, Interpreter::_throw_ClassCastException_entry, G3_scratch );
3620 __ bind(cast_ok);
3623 __ ba_short(done);
3625 __ bind(is_null);
3626 __ profile_null_seen(G3_scratch);
3627 __ bind(done);
3639 __ br_null_short(Otos_i, Assembler::pt, is_null);
3642 __ load_klass(Otos_i, RobjKlass); // get value klass
3645 __ get_2_byte_integer_at_bcp(1, Lscratch, Roffset, InterpreterMacroAssembler::Unsigned);
3648 __ get_cpool_and_tags(Lscratch, G3_scratch);
3649 __ add(G3_scratch, typeArrayOopDesc::header_size(T_BYTE) * wordSize, G3_scratch);
3650 __ ldub(G3_scratch, Roffset, G3_scratch);
3651 __ cmp(G3_scratch, JVM_CONSTANT_Class);
3652 __ br(Assembler::equal, true, Assembler::pt, quicked);
3653 __ delayed()->sll(Roffset, LogBytesPerWord, Roffset);
3655 __ push_ptr(); // save receiver for result, and for GC
3657 __ pop_ptr(Otos_i, G3_scratch); // restore receiver
3659 __ ba_short(resolved);
3662 __ bind(quicked);
3663 __ add(Roffset, sizeof(constantPoolOopDesc), Roffset);
3664 __ get_constant_pool(Lscratch);
3665 __ ld_ptr(Lscratch, Roffset, RspecifiedKlass);
3666 __ bind(resolved);
3667 __ load_klass(Otos_i, RobjKlass); // get value klass
3671 __ or3(G0, 1, Otos_i); // set result assuming quick tests succeed
3672 __ gen_subtype_check( RobjKlass, RspecifiedKlass, G3_scratch, G4_scratch, G1_scratch, done );
3674 __ clr( Otos_i );
3677 __ ba_short(done);
3679 __ bind(is_null);
3680 __ profile_null_seen(G3_scratch);
3681 __ bind(done);
3692 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::get_original_bytecode_at), Lmethod, Lbcp);
3693 __ mov(O0, Lbyte_code);
3696 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::_breakpoint), Lmethod, Lbcp);
3699 __ dispatch_normal(vtos);
3713 __ verify_oop(Otos_i);
3714 __ null_check(Otos_i);
3715 __ throw_if_not_x(Assembler::never, Interpreter::throw_exception_entry(), G3_scratch);
3728 __ verify_oop(Otos_i);
3734 __ tst(Otos_i);
3735 __ throw_if_not_1_x( Assembler::notZero, ok);
3736 __ delayed()->mov(Otos_i, Lscratch); // save obj
3737 __ throw_if_not_2( Interpreter::_throw_NullPointerException_entry, G3_scratch, ok);
3746 __ clr(O1); // points to free slot or NULL
3750 __ add( __ top_most_monitor(), O2 ); // last one to check
3751 __ ba( entry );
3752 __ delayed()->mov( Lmonitors, O3 ); // first one to check
3755 __ bind( loop );
3757 __ verify_oop(O4); // verify each monitor's oop
3758 __ tst(O4); // is this entry unused?
3760 __ movcc( Assembler::zero, false, Assembler::ptr_cc, O3, O1);
3763 __ br( Assembler::zero, true, Assembler::pn, L );
3764 __ delayed()->mov(O3, O1); // rememeber this one if match
3765 __ bind(L);
3768 __ cmp(O4, O0); // check if current entry is for same object
3769 __ brx( Assembler::equal, false, Assembler::pn, exit );
3770 __ delayed()->inc( O3, frame::interpreter_frame_monitor_size() * wordSize ); // check next one
3772 __ bind( entry );
3774 __ cmp( O3, O2 );
3775 __ brx( Assembler::lessEqualUnsigned, true, Assembler::pt, loop );
3776 __ delayed()->ld_ptr(O3, BasicObjectLock::obj_offset_in_bytes(), O4);
3778 __ bind( exit );
3784 __ br_notnull_short(O1, Assembler::pn, allocated);
3786 __ add_monitor_to_stack( false, O2, O3 );
3787 __ mov(Lmonitors, O1);
3789 __ bind(allocated);
3794 __ inc(Lbcp);
3796 __ st_ptr(O0, O1, BasicObjectLock::obj_offset_in_bytes()); // store object
3797 __ lock_object(O1, O0);
3800 __ generate_stack_overflow_check(0);
3803 __ dispatch_next(vtos);
3809 __ verify_oop(Otos_i);
3810 __ tst(Otos_i);
3811 __ throw_if_not_x( Assembler::notZero, Interpreter::_throw_NullPointerException_entry, G3_scratch );
3816 __ add( __ top_most_monitor(), O2 ); // last one to check
3817 __ ba(entry);
3820 __ delayed()->mov( Lmonitors, Lscratch );
3822 __ bind( loop );
3824 __ verify_oop(O4); // verify each monitor's oop
3825 __ cmp(O4, O0); // check if current entry is for desired object
3826 __ brx( Assembler::equal, true, Assembler::pt, found );
3827 __ delayed()->mov(Lscratch, O1); // pass found entry as argument to monitorexit
3829 __ inc( Lscratch, frame::interpreter_frame_monitor_size() * wordSize ); // advance to next
3831 __ bind( entry );
3833 __ cmp( Lscratch, O2 );
3834 __ brx( Assembler::lessEqualUnsigned, true, Assembler::pt, loop );
3835 __ delayed()->ld_ptr(Lscratch, BasicObjectLock::obj_offset_in_bytes(), O4);
3838 __ should_not_reach_here();
3840 __ bind(found);
3842 __ unlock_object(O1);
3851 __ ldub(Lbcp, 1, G3_scratch);// get next bc
3852 __ sll(G3_scratch, LogBytesPerWord, G3_scratch);
3854 __ set(ep, G4_scratch);
3855 __ ld_ptr(G4_scratch, G3_scratch, G3_scratch);
3856 __ jmp(G3_scratch, G0);
3857 __ delayed()->nop();
3868 __ ldub( Lbcp, 3, Lscratch);
3869 __ sll( Lscratch, Interpreter::logStackElementSize, Lscratch);
3871 __ add( Lesp, Lscratch, O1);
3873 __ add( Lesp, Lscratch, Lesp); // pop all dimensions off the stack