comparison src/cpu/sparc/vm/sharedRuntime_sparc.cpp @ 14030:f6c04e69cf75

SharedRuntime: add gen_i2c_adapter, implement it with pre-existing methods in each architecture.
author Gilles Duboscq <duboscq@ssw.jku.at>
date Thu, 27 Feb 2014 16:05:29 +0100
parents 096c224171c4
children d8041d695d19
comparison
equal deleted inserted replaced
14029:57d600d3b504 14030:f6c04e69cf75
1004 __ st_ptr(G5_method, callee_target_addr); 1004 __ st_ptr(G5_method, callee_target_addr);
1005 __ jmpl(G3, 0, G0); 1005 __ jmpl(G3, 0, G0);
1006 __ delayed()->nop(); 1006 __ delayed()->nop();
1007 } 1007 }
1008 1008
1009 void SharedRuntime::gen_i2c_adapter(MacroAssembler *masm,
1010 int total_args_passed,
1011 int comp_args_on_stack,
1012 const BasicType *sig_bt,
1013 const VMRegPair *regs) {
1014 AdapterGenerator agen(masm);
1015 agen.gen_i2c_adapter(total_args_passed, comp_args_on_stack, sig_bt, regs);
1016 }
1017
1009 // --------------------------------------------------------------- 1018 // ---------------------------------------------------------------
1010 AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm, 1019 AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm,
1011 int total_args_passed, 1020 int total_args_passed,
1012 // VMReg max_arg, 1021 // VMReg max_arg,
1013 int comp_args_on_stack, // VMRegStackSlots 1022 int comp_args_on_stack, // VMRegStackSlots
1014 const BasicType *sig_bt, 1023 const BasicType *sig_bt,
1015 const VMRegPair *regs, 1024 const VMRegPair *regs,
1016 AdapterFingerPrint* fingerprint) { 1025 AdapterFingerPrint* fingerprint) {
1017 address i2c_entry = __ pc(); 1026 address i2c_entry = __ pc();
1018 1027
1019 AdapterGenerator agen(masm); 1028 gen_i2c_adapter(masm, total_args_passed, comp_args_on_stack, sig_bt, regs);
1020
1021 agen.gen_i2c_adapter(total_args_passed, comp_args_on_stack, sig_bt, regs);
1022 1029
1023 1030
1024 // ------------------------------------------------------------------------- 1031 // -------------------------------------------------------------------------
1025 // Generate a C2I adapter. On entry we know G5 holds the Method*. The 1032 // Generate a C2I adapter. On entry we know G5 holds the Method*. The
1026 // args start out packed in the compiled layout. They need to be unpacked 1033 // args start out packed in the compiled layout. They need to be unpacked
1061 __ delayed()->nop(); 1068 __ delayed()->nop();
1062 1069
1063 } 1070 }
1064 1071
1065 address c2i_entry = __ pc(); 1072 address c2i_entry = __ pc();
1066 1073 AdapterGenerator agen(masm);
1067 agen.gen_c2i_adapter(total_args_passed, comp_args_on_stack, sig_bt, regs, L_skip_fixup); 1074 agen.gen_c2i_adapter(total_args_passed, comp_args_on_stack, sig_bt, regs, L_skip_fixup);
1068 1075
1069 __ flush(); 1076 __ flush();
1070 return AdapterHandlerLibrary::new_entry(fingerprint, i2c_entry, c2i_entry, c2i_unverified_entry); 1077 return AdapterHandlerLibrary::new_entry(fingerprint, i2c_entry, c2i_entry, c2i_unverified_entry);
1071 1078