Mercurial > hg > graal-jvmci-8
diff src/share/vm/code/nmethod.hpp @ 16657:ab59ee6c581b
[SPARC] Fix deoptimization fixup of return pc when called via the deoptimization entry
author | Stefan Anzinger <stefan.anzinger@gmail.com> |
---|---|
date | Wed, 30 Jul 2014 08:40:08 -0700 |
parents | 4ca6dc0799b6 |
children | 52b4284cb496 |
line wrap: on
line diff
--- a/src/share/vm/code/nmethod.hpp Wed Jul 30 08:37:10 2014 -0700 +++ b/src/share/vm/code/nmethod.hpp Wed Jul 30 08:40:08 2014 -0700 @@ -643,7 +643,21 @@ // (thomaswue) When using graal, the address might be off by 5 (because this is the size of the call instruction. // (thomaswue) TODO: Replace this by a more general mechanism. - bool is_deopt_entry (address pc) { return pc == deopt_handler_begin() GRAAL_ONLY( || pc == deopt_handler_begin() + 5); } + // (sanzinger) SPARC has another offset, looked for some variable existing in HotSpot which describes this offset, but i have not + // found anything. + bool is_deopt_entry (address pc) { + return pc == deopt_handler_begin() +#ifdef GRAAL + || pc == deopt_handler_begin() + +#ifdef TARGET_ARCH_sparc + 8 +#endif // sparc +#ifdef TARGET_ARCH_x86 + 5 +#endif // x86 +#endif // GRAAL + ; + } bool is_deopt_mh_entry(address pc) { return pc == deopt_mh_handler_begin(); } // Accessor/mutator for the original pc of a frame before a frame was deopted. address get_original_pc(const frame* fr) { return *orig_pc_addr(fr); }