src/cpu/x86/vm/x86_64.ad
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/cpu/x86/vm

src/cpu/x86/vm/x86_64.ad

Print this page




2107     // CALL Java_To_Interpreter
2108     // This is the instruction starting address for relocation info.
2109     cbuf.set_insts_mark();
2110     $$$emit8$primary;
2111     // CALL directly to the runtime
2112     emit_d32_reloc(cbuf,
2113                    (int) ($meth$$method - ((intptr_t) cbuf.insts_end()) - 4),
2114                    runtime_call_Relocation::spec(),
2115                    RELOC_DISP32);
2116   %}
2117 
2118   enc_class Java_Static_Call(method meth)
2119   %{
2120     // JAVA STATIC CALL
2121     // CALL to fixup routine.  Fixup routine uses ScopeDesc info to
2122     // determine who we intended to call.
2123     cbuf.set_insts_mark();
2124     $$$emit8$primary;
2125 
2126     if (!_method) {
2127       emit_d32_reloc(cbuf,
2128                      (int) ($meth$$method - ((intptr_t) cbuf.insts_end()) - 4),
2129                      runtime_call_Relocation::spec(),
2130                      RELOC_DISP32);
2131     } else if (_optimized_virtual) {
2132       emit_d32_reloc(cbuf,
2133                      (int) ($meth$$method - ((intptr_t) cbuf.insts_end()) - 4),
2134                      opt_virtual_call_Relocation::spec(),
2135                      RELOC_DISP32);
2136     } else {
2137       emit_d32_reloc(cbuf,
2138                      (int) ($meth$$method - ((intptr_t) cbuf.insts_end()) - 4),
2139                      static_call_Relocation::spec(),
2140                      RELOC_DISP32);
2141     }
2142     if (_method) {
2143       // Emit stubs for static call.
2144       address mark = cbuf.insts_mark();
2145       address stub = CompiledStaticCall::emit_to_interp_stub(cbuf, mark);
2146       if (stub == NULL) {
2147         ciEnv::current()->record_failure("CodeCache is full");
2148         return;
2149       }
2150     }
2151   %}
2152 
2153   enc_class Java_Dynamic_Call(method meth) %{
2154     MacroAssembler _masm(&cbuf);
2155     __ ic_call((address)$meth$$method);
2156   %}
2157 
2158   enc_class Java_Compiled_Call(method meth)
2159   %{
2160     // JAVA COMPILED CALL
2161     int disp = in_bytes(Method:: from_compiled_offset());
2162 
2163     // XXX XXX offset is 128 is 1.5 NON-PRODUCT !!!
2164     // assert(-0x80 <= disp && disp < 0x80, "compiled_code_offset isn't small");
2165 
2166     // callq *disp(%rax)
2167     cbuf.set_insts_mark();
2168     $$$emit8$primary;
2169     if (disp < 0x80) {
2170       emit_rm(cbuf, 0x01, $secondary, RAX_enc); // R/M byte
2171       emit_d8(cbuf, disp); // Displacement
2172     } else {
2173       emit_rm(cbuf, 0x02, $secondary, RAX_enc); // R/M byte
2174       emit_d32(cbuf, disp); // Displacement
2175     }




2107     // CALL Java_To_Interpreter
2108     // This is the instruction starting address for relocation info.
2109     cbuf.set_insts_mark();
2110     $$$emit8$primary;
2111     // CALL directly to the runtime
2112     emit_d32_reloc(cbuf,
2113                    (int) ($meth$$method - ((intptr_t) cbuf.insts_end()) - 4),
2114                    runtime_call_Relocation::spec(),
2115                    RELOC_DISP32);
2116   %}
2117 
2118   enc_class Java_Static_Call(method meth)
2119   %{
2120     // JAVA STATIC CALL
2121     // CALL to fixup routine.  Fixup routine uses ScopeDesc info to
2122     // determine who we intended to call.
2123     cbuf.set_insts_mark();
2124     $$$emit8$primary;
2125 
2126     if (!_method) {
2127       emit_d32_reloc(cbuf, (int) ($meth$$method - ((intptr_t) cbuf.insts_end()) - 4),

2128                      runtime_call_Relocation::spec(),
2129                      RELOC_DISP32);





2130     } else {
2131       int method_index = resolved_method_index(cbuf);
2132       RelocationHolder rspec = _optimized_virtual ? opt_virtual_call_Relocation::spec(method_index)
2133                                                   : static_call_Relocation::spec(method_index);
2134       emit_d32_reloc(cbuf, (int) ($meth$$method - ((intptr_t) cbuf.insts_end()) - 4),
2135                      rspec, RELOC_DISP32);

2136       // Emit stubs for static call.
2137       address mark = cbuf.insts_mark();
2138       address stub = CompiledStaticCall::emit_to_interp_stub(cbuf, mark);
2139       if (stub == NULL) {
2140         ciEnv::current()->record_failure("CodeCache is full");
2141         return;
2142       }
2143     }
2144   %}
2145 
2146   enc_class Java_Dynamic_Call(method meth) %{
2147     MacroAssembler _masm(&cbuf);
2148     __ ic_call((address)$meth$$method, resolved_method_index(cbuf));
2149   %}
2150 
2151   enc_class Java_Compiled_Call(method meth)
2152   %{
2153     // JAVA COMPILED CALL
2154     int disp = in_bytes(Method:: from_compiled_offset());
2155 
2156     // XXX XXX offset is 128 is 1.5 NON-PRODUCT !!!
2157     // assert(-0x80 <= disp && disp < 0x80, "compiled_code_offset isn't small");
2158 
2159     // callq *disp(%rax)
2160     cbuf.set_insts_mark();
2161     $$$emit8$primary;
2162     if (disp < 0x80) {
2163       emit_rm(cbuf, 0x01, $secondary, RAX_enc); // R/M byte
2164       emit_d8(cbuf, disp); // Displacement
2165     } else {
2166       emit_rm(cbuf, 0x02, $secondary, RAX_enc); // R/M byte
2167       emit_d32(cbuf, disp); // Displacement
2168     }


src/cpu/x86/vm/x86_64.ad
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File