Mercurial > hg > truffle
comparison src/cpu/x86/vm/x86_32.ad @ 1567:110501f54a99
6934104: JSR 292 needs to support SPARC C2
Summary: C2 for SPARC needs to support JSR 292.
Reviewed-by: kvn, never
author | twisti |
---|---|
date | Tue, 25 May 2010 02:38:48 -0700 |
parents | d7f654633cfe |
children | 3657cb01ffc5 |
comparison
equal
deleted
inserted
replaced
1566:9f669cf29cb0 | 1567:110501f54a99 |
---|---|
1839 enc_class preserve_SP %{ | 1839 enc_class preserve_SP %{ |
1840 debug_only(int off0 = cbuf.code_size()); | 1840 debug_only(int off0 = cbuf.code_size()); |
1841 MacroAssembler _masm(&cbuf); | 1841 MacroAssembler _masm(&cbuf); |
1842 // RBP is preserved across all calls, even compiled calls. | 1842 // RBP is preserved across all calls, even compiled calls. |
1843 // Use it to preserve RSP in places where the callee might change the SP. | 1843 // Use it to preserve RSP in places where the callee might change the SP. |
1844 __ movptr(rbp, rsp); | 1844 __ movptr(rbp_mh_SP_save, rsp); |
1845 debug_only(int off1 = cbuf.code_size()); | 1845 debug_only(int off1 = cbuf.code_size()); |
1846 assert(off1 - off0 == preserve_SP_size(), "correct size prediction"); | 1846 assert(off1 - off0 == preserve_SP_size(), "correct size prediction"); |
1847 %} | 1847 %} |
1848 | 1848 |
1849 enc_class restore_SP %{ | 1849 enc_class restore_SP %{ |
1850 MacroAssembler _masm(&cbuf); | 1850 MacroAssembler _masm(&cbuf); |
1851 __ movptr(rsp, rbp); | 1851 __ movptr(rsp, rbp_mh_SP_save); |
1852 %} | 1852 %} |
1853 | 1853 |
1854 enc_class Java_Static_Call (method meth) %{ // JAVA STATIC CALL | 1854 enc_class Java_Static_Call (method meth) %{ // JAVA STATIC CALL |
1855 // CALL to fixup routine. Fixup routine uses ScopeDesc info to determine | 1855 // CALL to fixup routine. Fixup routine uses ScopeDesc info to determine |
1856 // who we intended to call. | 1856 // who we intended to call. |
13568 %} | 13568 %} |
13569 | 13569 |
13570 // Call Java Static Instruction (method handle version) | 13570 // Call Java Static Instruction (method handle version) |
13571 // Note: If this code changes, the corresponding ret_addr_offset() and | 13571 // Note: If this code changes, the corresponding ret_addr_offset() and |
13572 // compute_padding() functions will have to be adjusted. | 13572 // compute_padding() functions will have to be adjusted. |
13573 instruct CallStaticJavaHandle(method meth, eBPRegP ebp) %{ | 13573 instruct CallStaticJavaHandle(method meth, eBPRegP ebp_mh_SP_save) %{ |
13574 match(CallStaticJava); | 13574 match(CallStaticJava); |
13575 predicate(((CallStaticJavaNode*)n)->is_method_handle_invoke()); | 13575 predicate(((CallStaticJavaNode*)n)->is_method_handle_invoke()); |
13576 effect(USE meth); | 13576 effect(USE meth); |
13577 // EBP is saved by all callees (for interpreter stack correction). | 13577 // EBP is saved by all callees (for interpreter stack correction). |
13578 // We use it here for a similar purpose, in {preserve,restore}_SP. | 13578 // We use it here for a similar purpose, in {preserve,restore}_SP. |