src/cpu/mips/vm/macroAssembler_mips.cpp

changeset 8865
ffcdff41a92f
parent 8862
fd13a567f179
child 8867
34020d024017
equal deleted inserted replaced
8864:e4aeef458496 8865:ffcdff41a92f
816 } 816 }
817 817
818 jr(T9); 818 jr(T9);
819 nop(); 819 nop();
820 } 820 }
821 void MacroAssembler::mov_metadata(Address dst, Metadata* obj) {
822 int oop_index;
823 if (obj) {
824 oop_index = oop_recorder()->find_index(obj);
825 } else {
826 oop_index = oop_recorder()->allocate_metadata_index(obj);
827 }
828 relocate(metadata_Relocation::spec(oop_index));
829 patchable_set48(AT, (long)obj);
830 sd(AT, dst);
831 }
832
833 void MacroAssembler::mov_metadata(Register dst, Metadata* obj) {
834 int oop_index;
835 if (obj) {
836 oop_index = oop_recorder()->find_index(obj);
837 } else {
838 oop_index = oop_recorder()->allocate_metadata_index(obj);
839 }
840 relocate(metadata_Relocation::spec(oop_index));
841 patchable_set48(dst, (long)obj);
842 }
821 843
822 void MacroAssembler::call(address entry) { 844 void MacroAssembler::call(address entry) {
823 // c/c++ code assume T9 is entry point, so we just always move entry to t9 845 // c/c++ code assume T9 is entry point, so we just always move entry to t9
824 // maybe there is some more graceful method to handle this. FIXME 846 // maybe there is some more graceful method to handle this. FIXME
825 // For more info, see class NativeCall. 847 // For more info, see class NativeCall.
868 RelocationHolder rh = virtual_call_Relocation::spec(pc()); 890 RelocationHolder rh = virtual_call_Relocation::spec(pc());
869 patchable_set48(IC_Klass, (long)Universe::non_oop_word()); 891 patchable_set48(IC_Klass, (long)Universe::non_oop_word());
870 assert(entry != NULL, "call most probably wrong"); 892 assert(entry != NULL, "call most probably wrong");
871 InstructionMark im(this); 893 InstructionMark im(this);
872 relocate(rh); 894 relocate(rh);
873 patchable_call(entry); 895 patchable_call(entry);
874 } 896 }
875 897
876 void MacroAssembler::c2bool(Register r) { 898 void MacroAssembler::c2bool(Register r) {
877 Label L; 899 Label L;
878 Assembler::beq(r, R0, L); 900 Assembler::beq(r, R0, L);
1236 1258
1237 // do the call 1259 // do the call
1238 move(A0, java_thread); 1260 move(A0, java_thread);
1239 call(entry_point, relocInfo::runtime_call_type); 1261 call(entry_point, relocInfo::runtime_call_type);
1240 delayed()->nop(); 1262 delayed()->nop();
1241 //MacroAssembler::call_VM_leaf_base(entry_point, number_of_arguments);
1242 1263
1243 // restore the thread (cannot use the pushed argument since arguments 1264 // restore the thread (cannot use the pushed argument since arguments
1244 // may be overwritten by C code generated by an optimizing compiler); 1265 // may be overwritten by C code generated by an optimizing compiler);
1245 // however can use the register value directly if it is callee saved. 1266 // however can use the register value directly if it is callee saved.
1246 #ifndef OPT_THREAD 1267 #ifndef OPT_THREAD

mercurial