Mercurial > hg > truffle
comparison src/share/vm/graal/graalCodeInstaller.cpp @ 10771:ec8ee1c2ad7a
Move non_oop_bits value up to Graal.
author | twisti |
---|---|
date | Fri, 12 Jul 2013 10:10:07 -0700 |
parents | 6ff467cdb105 |
children | 4e1db4c9d4c5 |
comparison
equal
deleted
inserted
replaced
10770:4e6d6122c558 | 10771:ec8ee1c2ad7a |
---|---|
786 | 786 |
787 if (id_obj != NULL) { | 787 if (id_obj != NULL) { |
788 assert(java_lang_boxing_object::is_instance(id_obj, T_INT), "Integer id expected"); | 788 assert(java_lang_boxing_object::is_instance(id_obj, T_INT), "Integer id expected"); |
789 jint id = id_obj->int_field(java_lang_boxing_object::value_offset_in_bytes(T_INT)); | 789 jint id = id_obj->int_field(java_lang_boxing_object::value_offset_in_bytes(T_INT)); |
790 | 790 |
791 address instruction = _instructions->start() + pc_offset; | 791 address pc = _instructions->start() + pc_offset; |
792 | 792 |
793 switch (id) { | 793 switch (id) { |
794 case MARK_UNVERIFIED_ENTRY: | 794 case MARK_UNVERIFIED_ENTRY: |
795 _offsets.set_value(CodeOffsets::Entry, pc_offset); | 795 _offsets.set_value(CodeOffsets::Entry, pc_offset); |
796 break; | 796 break; |
805 break; | 805 break; |
806 case MARK_DEOPT_HANDLER_ENTRY: | 806 case MARK_DEOPT_HANDLER_ENTRY: |
807 _offsets.set_value(CodeOffsets::Deopt, pc_offset); | 807 _offsets.set_value(CodeOffsets::Deopt, pc_offset); |
808 break; | 808 break; |
809 case MARK_INVOKEVIRTUAL: | 809 case MARK_INVOKEVIRTUAL: |
810 case MARK_INVOKEINTERFACE: { | 810 case MARK_INVOKEINTERFACE: |
811 // Convert the initial value of the Klass* slot in an inline cache | |
812 // from 0L to Universe::non_oop_word(). | |
813 NativeMovConstReg* n_copy = nativeMovConstReg_at(instruction); | |
814 assert(n_copy->data() == 0, "inline cache Klass* initial value should be 0L"); | |
815 n_copy->set_data((intptr_t)Universe::non_oop_word()); | |
816 } | |
817 case MARK_INLINE_INVOKE: | 811 case MARK_INLINE_INVOKE: |
818 case MARK_INVOKESTATIC: | 812 case MARK_INVOKESTATIC: |
819 case MARK_INVOKESPECIAL: | 813 case MARK_INVOKESPECIAL: |
820 _next_call_type = (MarkId) id; | 814 _next_call_type = (MarkId) id; |
821 _invoke_mark_pc = instruction; | 815 _invoke_mark_pc = pc; |
822 break; | 816 break; |
823 case MARK_POLL_NEAR: { | 817 case MARK_POLL_NEAR: { |
824 NativeInstruction* ni = nativeInstruction_at(instruction); | 818 NativeInstruction* ni = nativeInstruction_at(pc); |
825 int32_t* disp = (int32_t*) pd_locate_operand(instruction); | 819 int32_t* disp = (int32_t*) pd_locate_operand(pc); |
826 // int32_t* disp = (int32_t*) Assembler::locate_operand(instruction, Assembler::disp32_operand); | 820 // int32_t* disp = (int32_t*) Assembler::locate_operand(instruction, Assembler::disp32_operand); |
827 int32_t offset = *disp; // The Java code installed the polling page offset into the disp32 operand | 821 int32_t offset = *disp; // The Java code installed the polling page offset into the disp32 operand |
828 intptr_t new_disp = (intptr_t) (os::get_polling_page() + offset) - (intptr_t) ni; | 822 intptr_t new_disp = (intptr_t) (os::get_polling_page() + offset) - (intptr_t) ni; |
829 *disp = (int32_t)new_disp; | 823 *disp = (int32_t)new_disp; |
830 } | 824 } |
831 case MARK_POLL_FAR: | 825 case MARK_POLL_FAR: |
832 _instructions->relocate(instruction, relocInfo::poll_type); | 826 _instructions->relocate(pc, relocInfo::poll_type); |
833 break; | 827 break; |
834 case MARK_POLL_RETURN_NEAR: { | 828 case MARK_POLL_RETURN_NEAR: { |
835 NativeInstruction* ni = nativeInstruction_at(instruction); | 829 NativeInstruction* ni = nativeInstruction_at(pc); |
836 int32_t* disp = (int32_t*) pd_locate_operand(instruction); | 830 int32_t* disp = (int32_t*) pd_locate_operand(pc); |
837 // int32_t* disp = (int32_t*) Assembler::locate_operand(instruction, Assembler::disp32_operand); | 831 // int32_t* disp = (int32_t*) Assembler::locate_operand(instruction, Assembler::disp32_operand); |
838 int32_t offset = *disp; // The Java code installed the polling page offset into the disp32 operand | 832 int32_t offset = *disp; // The Java code installed the polling page offset into the disp32 operand |
839 intptr_t new_disp = (intptr_t) (os::get_polling_page() + offset) - (intptr_t) ni; | 833 intptr_t new_disp = (intptr_t) (os::get_polling_page() + offset) - (intptr_t) ni; |
840 *disp = (int32_t)new_disp; | 834 *disp = (int32_t)new_disp; |
841 } | 835 } |
842 case MARK_POLL_RETURN_FAR: | 836 case MARK_POLL_RETURN_FAR: |
843 _instructions->relocate(instruction, relocInfo::poll_return_type); | 837 _instructions->relocate(pc, relocInfo::poll_return_type); |
844 break; | 838 break; |
845 default: | 839 default: |
846 ShouldNotReachHere(); | 840 ShouldNotReachHere(); |
847 break; | 841 break; |
848 } | 842 } |