1896 enc_class Java_Static_Call (method meth) %{ // JAVA STATIC CALL |
1896 enc_class Java_Static_Call (method meth) %{ // JAVA STATIC CALL |
1897 // CALL to fixup routine. Fixup routine uses ScopeDesc info to determine |
1897 // CALL to fixup routine. Fixup routine uses ScopeDesc info to determine |
1898 // who we intended to call. |
1898 // who we intended to call. |
1899 cbuf.set_insts_mark(); |
1899 cbuf.set_insts_mark(); |
1900 $$$emit8$primary; |
1900 $$$emit8$primary; |
|
1901 |
1901 if (!_method) { |
1902 if (!_method) { |
1902 emit_d32_reloc(cbuf, ($meth$$method - (int)(cbuf.insts_end()) - 4), |
1903 emit_d32_reloc(cbuf, ($meth$$method - (int)(cbuf.insts_end()) - 4), |
1903 runtime_call_Relocation::spec(), RELOC_IMM32 ); |
1904 runtime_call_Relocation::spec(), |
1904 } else if (_optimized_virtual) { |
1905 RELOC_IMM32); |
|
1906 } else { |
|
1907 int method_index = resolved_method_index(cbuf); |
|
1908 RelocationHolder rspec = _optimized_virtual ? opt_virtual_call_Relocation::spec(method_index) |
|
1909 : static_call_Relocation::spec(method_index); |
1905 emit_d32_reloc(cbuf, ($meth$$method - (int)(cbuf.insts_end()) - 4), |
1910 emit_d32_reloc(cbuf, ($meth$$method - (int)(cbuf.insts_end()) - 4), |
1906 opt_virtual_call_Relocation::spec(), RELOC_IMM32 ); |
1911 rspec, RELOC_DISP32); |
1907 } else { |
1912 // Emit stubs for static call. |
1908 emit_d32_reloc(cbuf, ($meth$$method - (int)(cbuf.insts_end()) - 4), |
|
1909 static_call_Relocation::spec(), RELOC_IMM32 ); |
|
1910 } |
|
1911 if (_method) { // Emit stub for static call. |
|
1912 address stub = CompiledStaticCall::emit_to_interp_stub(cbuf); |
1913 address stub = CompiledStaticCall::emit_to_interp_stub(cbuf); |
1913 if (stub == NULL) { |
1914 if (stub == NULL) { |
1914 ciEnv::current()->record_failure("CodeCache is full"); |
1915 ciEnv::current()->record_failure("CodeCache is full"); |
1915 return; |
1916 return; |
1916 } |
1917 } |
1917 } |
1918 } |
1918 %} |
1919 %} |
1919 |
1920 |
1920 enc_class Java_Dynamic_Call (method meth) %{ // JAVA DYNAMIC CALL |
1921 enc_class Java_Dynamic_Call (method meth) %{ // JAVA DYNAMIC CALL |
1921 MacroAssembler _masm(&cbuf); |
1922 MacroAssembler _masm(&cbuf); |
1922 __ ic_call((address)$meth$$method); |
1923 __ ic_call((address)$meth$$method, resolved_method_index(cbuf)); |
1923 %} |
1924 %} |
1924 |
1925 |
1925 enc_class Java_Compiled_Call (method meth) %{ // JAVA COMPILED CALL |
1926 enc_class Java_Compiled_Call (method meth) %{ // JAVA COMPILED CALL |
1926 int disp = in_bytes(Method::from_compiled_offset()); |
1927 int disp = in_bytes(Method::from_compiled_offset()); |
1927 assert( -128 <= disp && disp <= 127, "compiled_code_offset isn't small"); |
1928 assert( -128 <= disp && disp <= 127, "compiled_code_offset isn't small"); |
11502 format %{ "String Equals $str1,$str2,$cnt -> $result // KILL $tmp1, $tmp2, $tmp3" %} |
11503 format %{ "String Equals $str1,$str2,$cnt -> $result // KILL $tmp1, $tmp2, $tmp3" %} |
11503 ins_encode %{ |
11504 ins_encode %{ |
11504 __ arrays_equals(false, $str1$$Register, $str2$$Register, |
11505 __ arrays_equals(false, $str1$$Register, $str2$$Register, |
11505 $cnt$$Register, $result$$Register, $tmp3$$Register, |
11506 $cnt$$Register, $result$$Register, $tmp3$$Register, |
11506 $tmp1$$XMMRegister, $tmp2$$XMMRegister, false /* char */); |
11507 $tmp1$$XMMRegister, $tmp2$$XMMRegister, false /* char */); |
11507 %} |
11508 %} |
11508 |
11509 |
11509 ins_pipe( pipe_slow ); |
11510 ins_pipe( pipe_slow ); |
11510 %} |
11511 %} |
11511 |
11512 |
11512 // fast search of substring with known size. |
11513 // fast search of substring with known size. |