Mercurial > hg > truffle
comparison src/cpu/ppc/vm/templateInterpreter_ppc.cpp @ 20418:b384ba33c9a0
8050942: PPC64: implement template interpreter for ppc64le
Reviewed-by: kvn, goetz
Contributed-by: asmundak@google.com
author | kvn |
---|---|
date | Thu, 17 Jul 2014 15:40:04 -0700 |
parents | 0bf37f737702 |
children | c5e86c5cd22e |
comparison
equal
deleted
inserted
replaced
20416:99f0593d8c9f | 20418:b384ba33c9a0 |
---|---|
173 | 173 |
174 const Register cache = R11_scratch1; | 174 const Register cache = R11_scratch1; |
175 const Register size = R12_scratch2; | 175 const Register size = R12_scratch2; |
176 __ get_cache_and_index_at_bcp(cache, 1, index_size); | 176 __ get_cache_and_index_at_bcp(cache, 1, index_size); |
177 | 177 |
178 // Big Endian (get least significant byte of 64 bit value): | 178 // Get least significant byte of 64 bit value: |
179 #if defined(VM_LITTLE_ENDIAN) | |
180 __ lbz(size, in_bytes(ConstantPoolCache::base_offset() + ConstantPoolCacheEntry::flags_offset()), cache); | |
181 #else | |
179 __ lbz(size, in_bytes(ConstantPoolCache::base_offset() + ConstantPoolCacheEntry::flags_offset()) + 7, cache); | 182 __ lbz(size, in_bytes(ConstantPoolCache::base_offset() + ConstantPoolCacheEntry::flags_offset()) + 7, cache); |
183 #endif | |
180 __ sldi(size, size, Interpreter::logStackElementSize); | 184 __ sldi(size, size, Interpreter::logStackElementSize); |
181 __ add(R15_esp, R15_esp, size); | 185 __ add(R15_esp, R15_esp, size); |
182 __ dispatch_next(state, step); | 186 __ dispatch_next(state, step); |
183 return entry; | 187 return entry; |
184 } | 188 } |
855 // Call signature handler and pass locals address. | 859 // Call signature handler and pass locals address. |
856 // | 860 // |
857 // Our signature handlers copy required arguments to the C stack | 861 // Our signature handlers copy required arguments to the C stack |
858 // (outgoing C args), R3_ARG1 to R10_ARG8, and FARG1 to FARG13. | 862 // (outgoing C args), R3_ARG1 to R10_ARG8, and FARG1 to FARG13. |
859 __ mr(R3_ARG1, R18_locals); | 863 __ mr(R3_ARG1, R18_locals); |
864 #if !defined(ABI_ELFv2) | |
860 __ ld(signature_handler_fd, 0, signature_handler_fd); | 865 __ ld(signature_handler_fd, 0, signature_handler_fd); |
866 #endif | |
861 | 867 |
862 __ call_stub(signature_handler_fd); | 868 __ call_stub(signature_handler_fd); |
863 | 869 |
864 // Remove the register parameter varargs slots we allocated in | 870 // Remove the register parameter varargs slots we allocated in |
865 // compute_interpreter_state. SP+16 ends up pointing to the ABI | 871 // compute_interpreter_state. SP+16 ends up pointing to the ABI |
1017 // Block. We do the call directly and leave the current | 1023 // Block. We do the call directly and leave the current |
1018 // last_Java_frame setup undisturbed. We must save any possible | 1024 // last_Java_frame setup undisturbed. We must save any possible |
1019 // native result across the call. No oop is present. | 1025 // native result across the call. No oop is present. |
1020 | 1026 |
1021 __ mr(R3_ARG1, R16_thread); | 1027 __ mr(R3_ARG1, R16_thread); |
1028 #if defined(ABI_ELFv2) | |
1029 __ call_c(CAST_FROM_FN_PTR(address, JavaThread::check_special_condition_for_native_trans), | |
1030 relocInfo::none); | |
1031 #else | |
1022 __ call_c(CAST_FROM_FN_PTR(FunctionDescriptor*, JavaThread::check_special_condition_for_native_trans), | 1032 __ call_c(CAST_FROM_FN_PTR(FunctionDescriptor*, JavaThread::check_special_condition_for_native_trans), |
1023 relocInfo::none); | 1033 relocInfo::none); |
1034 #endif | |
1024 | 1035 |
1025 __ bind(sync_check_done); | 1036 __ bind(sync_check_done); |
1026 | 1037 |
1027 //============================================================================= | 1038 //============================================================================= |
1028 // <<<<<< Back in Interpreter Frame >>>>> | 1039 // <<<<<< Back in Interpreter Frame >>>>> |