Mercurial > hg > graal-jvmci-8
comparison src/cpu/sparc/vm/interp_masm_sparc.cpp @ 1579:e9ff18c4ace7
Merge
author | jrose |
---|---|
date | Wed, 02 Jun 2010 22:45:42 -0700 |
parents | c18cbe5936b8 ab102d5d923e |
children | d5d065957597 |
comparison
equal
deleted
inserted
replaced
1562:dfe27f03244a | 1579:e9ff18c4ace7 |
---|---|
718 if (should_set_CC == set_CC) tst(Rdst); | 718 if (should_set_CC == set_CC) tst(Rdst); |
719 } | 719 } |
720 | 720 |
721 | 721 |
722 void InterpreterMacroAssembler::get_cache_index_at_bcp(Register cache, Register tmp, | 722 void InterpreterMacroAssembler::get_cache_index_at_bcp(Register cache, Register tmp, |
723 int bcp_offset, bool giant_index) { | 723 int bcp_offset, size_t index_size) { |
724 assert(bcp_offset > 0, "bcp is still pointing to start of bytecode"); | 724 assert(bcp_offset > 0, "bcp is still pointing to start of bytecode"); |
725 if (!giant_index) { | 725 if (index_size == sizeof(u2)) { |
726 get_2_byte_integer_at_bcp(bcp_offset, cache, tmp, Unsigned); | 726 get_2_byte_integer_at_bcp(bcp_offset, cache, tmp, Unsigned); |
727 } else { | 727 } else if (index_size == sizeof(u4)) { |
728 assert(EnableInvokeDynamic, "giant index used only for EnableInvokeDynamic"); | 728 assert(EnableInvokeDynamic, "giant index used only for EnableInvokeDynamic"); |
729 get_4_byte_integer_at_bcp(bcp_offset, cache, tmp); | 729 get_4_byte_integer_at_bcp(bcp_offset, cache, tmp); |
730 assert(constantPoolCacheOopDesc::decode_secondary_index(~123) == 123, "else change next line"); | 730 assert(constantPoolCacheOopDesc::decode_secondary_index(~123) == 123, "else change next line"); |
731 xor3(tmp, -1, tmp); // convert to plain index | 731 xor3(tmp, -1, tmp); // convert to plain index |
732 } else if (index_size == sizeof(u1)) { | |
733 assert(EnableMethodHandles, "tiny index used only for EnableMethodHandles"); | |
734 ldub(Lbcp, bcp_offset, tmp); | |
735 } else { | |
736 ShouldNotReachHere(); | |
732 } | 737 } |
733 } | 738 } |
734 | 739 |
735 | 740 |
736 void InterpreterMacroAssembler::get_cache_and_index_at_bcp(Register cache, Register tmp, | 741 void InterpreterMacroAssembler::get_cache_and_index_at_bcp(Register cache, Register tmp, |
737 int bcp_offset, bool giant_index) { | 742 int bcp_offset, size_t index_size) { |
738 assert(bcp_offset > 0, "bcp is still pointing to start of bytecode"); | 743 assert(bcp_offset > 0, "bcp is still pointing to start of bytecode"); |
739 assert_different_registers(cache, tmp); | 744 assert_different_registers(cache, tmp); |
740 assert_not_delayed(); | 745 assert_not_delayed(); |
741 get_cache_index_at_bcp(cache, tmp, bcp_offset, giant_index); | 746 get_cache_index_at_bcp(cache, tmp, bcp_offset, index_size); |
742 // convert from field index to ConstantPoolCacheEntry index and from | 747 // convert from field index to ConstantPoolCacheEntry index and from |
743 // word index to byte offset | 748 // word index to byte offset |
744 sll(tmp, exact_log2(in_words(ConstantPoolCacheEntry::size()) * BytesPerWord), tmp); | 749 sll(tmp, exact_log2(in_words(ConstantPoolCacheEntry::size()) * BytesPerWord), tmp); |
745 add(LcpoolCache, tmp, cache); | 750 add(LcpoolCache, tmp, cache); |
746 } | 751 } |
747 | 752 |
748 | 753 |
749 void InterpreterMacroAssembler::get_cache_entry_pointer_at_bcp(Register cache, Register tmp, | 754 void InterpreterMacroAssembler::get_cache_entry_pointer_at_bcp(Register cache, Register tmp, |
750 int bcp_offset, bool giant_index) { | 755 int bcp_offset, size_t index_size) { |
751 assert(bcp_offset > 0, "bcp is still pointing to start of bytecode"); | 756 assert(bcp_offset > 0, "bcp is still pointing to start of bytecode"); |
752 assert_different_registers(cache, tmp); | 757 assert_different_registers(cache, tmp); |
753 assert_not_delayed(); | 758 assert_not_delayed(); |
754 assert(!giant_index,"NYI"); | 759 if (index_size == sizeof(u2)) { |
755 get_2_byte_integer_at_bcp(bcp_offset, cache, tmp, Unsigned); | 760 get_2_byte_integer_at_bcp(bcp_offset, cache, tmp, Unsigned); |
761 } else { | |
762 ShouldNotReachHere(); // other sizes not supported here | |
763 } | |
756 // convert from field index to ConstantPoolCacheEntry index | 764 // convert from field index to ConstantPoolCacheEntry index |
757 // and from word index to byte offset | 765 // and from word index to byte offset |
758 sll(tmp, exact_log2(in_words(ConstantPoolCacheEntry::size()) * BytesPerWord), tmp); | 766 sll(tmp, exact_log2(in_words(ConstantPoolCacheEntry::size()) * BytesPerWord), tmp); |
759 // skip past the header | 767 // skip past the header |
760 add(tmp, in_bytes(constantPoolCacheOopDesc::base_offset()), tmp); | 768 add(tmp, in_bytes(constantPoolCacheOopDesc::base_offset()), tmp); |