Mercurial > hg > truffle
comparison src/cpu/x86/vm/x86_64.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 | 2d127394260e |
comparison
equal
deleted
inserted
replaced
1566:9f669cf29cb0 | 1567:110501f54a99 |
---|---|
2633 enc_class preserve_SP %{ | 2633 enc_class preserve_SP %{ |
2634 debug_only(int off0 = cbuf.code_size()); | 2634 debug_only(int off0 = cbuf.code_size()); |
2635 MacroAssembler _masm(&cbuf); | 2635 MacroAssembler _masm(&cbuf); |
2636 // RBP is preserved across all calls, even compiled calls. | 2636 // RBP is preserved across all calls, even compiled calls. |
2637 // Use it to preserve RSP in places where the callee might change the SP. | 2637 // Use it to preserve RSP in places where the callee might change the SP. |
2638 __ movptr(rbp, rsp); | 2638 __ movptr(rbp_mh_SP_save, rsp); |
2639 debug_only(int off1 = cbuf.code_size()); | 2639 debug_only(int off1 = cbuf.code_size()); |
2640 assert(off1 - off0 == preserve_SP_size(), "correct size prediction"); | 2640 assert(off1 - off0 == preserve_SP_size(), "correct size prediction"); |
2641 %} | 2641 %} |
2642 | 2642 |
2643 enc_class restore_SP %{ | 2643 enc_class restore_SP %{ |
2644 MacroAssembler _masm(&cbuf); | 2644 MacroAssembler _masm(&cbuf); |
2645 __ movptr(rsp, rbp); | 2645 __ movptr(rsp, rbp_mh_SP_save); |
2646 %} | 2646 %} |
2647 | 2647 |
2648 enc_class Java_Static_Call(method meth) | 2648 enc_class Java_Static_Call(method meth) |
2649 %{ | 2649 %{ |
2650 // JAVA STATIC CALL | 2650 // JAVA STATIC CALL |
12602 %} | 12602 %} |
12603 | 12603 |
12604 // Call Java Static Instruction (method handle version) | 12604 // Call Java Static Instruction (method handle version) |
12605 // Note: If this code changes, the corresponding ret_addr_offset() and | 12605 // Note: If this code changes, the corresponding ret_addr_offset() and |
12606 // compute_padding() functions will have to be adjusted. | 12606 // compute_padding() functions will have to be adjusted. |
12607 instruct CallStaticJavaHandle(method meth, rbp_RegP rbp) %{ | 12607 instruct CallStaticJavaHandle(method meth, rbp_RegP rbp_mh_SP_save) %{ |
12608 match(CallStaticJava); | 12608 match(CallStaticJava); |
12609 predicate(((CallStaticJavaNode*) n)->is_method_handle_invoke()); | 12609 predicate(((CallStaticJavaNode*) n)->is_method_handle_invoke()); |
12610 effect(USE meth); | 12610 effect(USE meth); |
12611 // RBP is saved by all callees (for interpreter stack correction). | 12611 // RBP is saved by all callees (for interpreter stack correction). |
12612 // We use it here for a similar purpose, in {preserve,restore}_SP. | 12612 // We use it here for a similar purpose, in {preserve,restore}_SP. |