Mercurial > hg > graal-compiler
comparison src/cpu/sparc/vm/methodHandles_sparc.cpp @ 2258:28bf941f445e
7018378: JSR 292: _bound_int_mh produces wrong result on 64-bit SPARC
Reviewed-by: kvn
author | twisti |
---|---|
date | Mon, 14 Feb 2011 03:21:18 -0800 |
parents | d810e9a3fc33 |
children | 1b4e6a5d98e0 |
comparison
equal
deleted
inserted
replaced
2257:34457f6ac818 | 2258:28bf941f445e |
---|---|
594 __ load_heap_oop(G3_bmh_argument, O1_scratch); | 594 __ load_heap_oop(G3_bmh_argument, O1_scratch); |
595 if (arg_type == T_OBJECT) { | 595 if (arg_type == T_OBJECT) { |
596 __ st_ptr(O1_scratch, Address(O0_argslot, 0)); | 596 __ st_ptr(O1_scratch, Address(O0_argslot, 0)); |
597 } else { | 597 } else { |
598 Address prim_value_addr(O1_scratch, java_lang_boxing_object::value_offset_in_bytes(arg_type)); | 598 Address prim_value_addr(O1_scratch, java_lang_boxing_object::value_offset_in_bytes(arg_type)); |
599 __ load_sized_value(prim_value_addr, O2_scratch, type2aelembytes(arg_type), is_signed_subword_type(arg_type)); | 599 const int arg_size = type2aelembytes(arg_type); |
600 if (arg_slots == 2) { | 600 __ load_sized_value(prim_value_addr, O2_scratch, arg_size, is_signed_subword_type(arg_type)); |
601 __ unimplemented("not yet tested"); | 601 __ store_sized_value(O2_scratch, Address(O0_argslot, 0), arg_size); // long store uses O2/O3 on !_LP64 |
602 #ifndef _LP64 | |
603 __ signx(O2_scratch, O3_scratch); // Sign extend | |
604 #endif | |
605 __ st_long(O2_scratch, Address(O0_argslot, 0)); // Uses O2/O3 on !_LP64 | |
606 } else { | |
607 __ st_ptr( O2_scratch, Address(O0_argslot, 0)); | |
608 } | |
609 } | 602 } |
610 | 603 |
611 if (direct_to_method) { | 604 if (direct_to_method) { |
612 __ load_heap_oop(G3_mh_vmtarget, G5_method); // target is a methodOop | 605 __ load_heap_oop(G3_mh_vmtarget, G5_method); // target is a methodOop |
613 __ verify_oop(G5_method); | 606 __ verify_oop(G5_method); |
782 Address arg_msw(O0_argslot, -Interpreter::stackElementSize); | 775 Address arg_msw(O0_argslot, -Interpreter::stackElementSize); |
783 | 776 |
784 switch (ek) { | 777 switch (ek) { |
785 case _adapter_opt_i2l: | 778 case _adapter_opt_i2l: |
786 { | 779 { |
787 __ ldsw(arg_lsw, O2_scratch); // Load LSW | 780 __ ldsw(arg_lsw, O2_scratch); // Load LSW |
788 #ifndef _LP64 | 781 NOT_LP64(__ srlx(O2_scratch, BitsPerInt, O3_scratch)); // Move high bits to lower bits for std |
789 __ signx(O2_scratch, O3_scratch); // Sign extend | 782 __ st_long(O2_scratch, arg_msw); // Uses O2/O3 on !_LP64 |
790 #endif | |
791 __ st_long(O2_scratch, arg_msw); // Uses O2/O3 on !_LP64 | |
792 } | 783 } |
793 break; | 784 break; |
794 case _adapter_opt_unboxl: | 785 case _adapter_opt_unboxl: |
795 { | 786 { |
796 // Load the value up from the heap. | 787 // Load the value up from the heap. |