50 case T_BYTE: name = "jni_fast_GetByteField"; break;
51 case T_CHAR: name = "jni_fast_GetCharField"; break;
52 case T_SHORT: name = "jni_fast_GetShortField"; break;
53 case T_INT: name = "jni_fast_GetIntField"; break;
54 default: ShouldNotReachHere();
55 }
56 ResourceMark rm;
57 BufferBlob* blob = BufferBlob::create(name, BUFFER_SIZE*wordSize);
58 CodeBuffer cbuf(blob);
59 MacroAssembler* masm = new MacroAssembler(&cbuf);
60 address fast_entry = __ pc();
61
62 Label label1, label2;
63
64 AddressLiteral cnt_addrlit(SafepointSynchronize::safepoint_counter_addr());
65 __ sethi (cnt_addrlit, O3);
66 Address cnt_addr(O3, cnt_addrlit.low10());
67 __ ld (cnt_addr, G4);
68 __ andcc (G4, 1, G0);
69 __ br (Assembler::notZero, false, Assembler::pn, label1);
70 __ delayed()->srl (O2, 2, O4);
71 __ andn (O1, JNIHandles::weak_tag_mask, O1);
72 __ ld_ptr (O1, 0, O5);
73
74 assert(count < LIST_CAPACITY, "LIST_CAPACITY too small");
75 speculative_load_pclist[count] = __ pc();
76 switch (type) {
77 case T_BOOLEAN: __ ldub (O5, O4, G3); break;
78 case T_BYTE: __ ldsb (O5, O4, G3); break;
79 case T_CHAR: __ lduh (O5, O4, G3); break;
80 case T_SHORT: __ ldsh (O5, O4, G3); break;
81 case T_INT: __ ld (O5, O4, G3); break;
82 default: ShouldNotReachHere();
83 }
84
85 __ ld (cnt_addr, O5);
86 __ cmp (O5, G4);
87 __ br (Assembler::notEqual, false, Assembler::pn, label2);
88 __ delayed()->mov (O7, G1);
89 __ retl ();
90 __ delayed()->mov (G3, O0);
91
92 slowcase_entry_pclist[count++] = __ pc();
|
50 case T_BYTE: name = "jni_fast_GetByteField"; break;
51 case T_CHAR: name = "jni_fast_GetCharField"; break;
52 case T_SHORT: name = "jni_fast_GetShortField"; break;
53 case T_INT: name = "jni_fast_GetIntField"; break;
54 default: ShouldNotReachHere();
55 }
56 ResourceMark rm;
57 BufferBlob* blob = BufferBlob::create(name, BUFFER_SIZE*wordSize);
58 CodeBuffer cbuf(blob);
59 MacroAssembler* masm = new MacroAssembler(&cbuf);
60 address fast_entry = __ pc();
61
62 Label label1, label2;
63
64 AddressLiteral cnt_addrlit(SafepointSynchronize::safepoint_counter_addr());
65 __ sethi (cnt_addrlit, O3);
66 Address cnt_addr(O3, cnt_addrlit.low10());
67 __ ld (cnt_addr, G4);
68 __ andcc (G4, 1, G0);
69 __ br (Assembler::notZero, false, Assembler::pn, label1);
70 __ delayed()->andcc(O1, JNIHandles::weak_tag_mask, G0); // Test for jweak
71
72 // Annul the resolving load if it is a jweak
73 __ br(Assembler::notZero, true, Assembler::pt, label1);
74 __ delayed()->ld_ptr (O1, 0, O5);
75
76 __ srl(O2, 2, O4);
77
78 assert(count < LIST_CAPACITY, "LIST_CAPACITY too small");
79 speculative_load_pclist[count] = __ pc();
80 switch (type) {
81 case T_BOOLEAN: __ ldub (O5, O4, G3); break;
82 case T_BYTE: __ ldsb (O5, O4, G3); break;
83 case T_CHAR: __ lduh (O5, O4, G3); break;
84 case T_SHORT: __ ldsh (O5, O4, G3); break;
85 case T_INT: __ ld (O5, O4, G3); break;
86 default: ShouldNotReachHere();
87 }
88
89 __ ld (cnt_addr, O5);
90 __ cmp (O5, G4);
91 __ br (Assembler::notEqual, false, Assembler::pn, label2);
92 __ delayed()->mov (O7, G1);
93 __ retl ();
94 __ delayed()->mov (G3, O0);
95
96 slowcase_entry_pclist[count++] = __ pc();
|