--- old/src/cpu/ppc/vm/assembler_ppc.hpp 2015-05-19 17:58:38.843131000 -0700 +++ new/src/cpu/ppc/vm/assembler_ppc.hpp 2015-05-19 17:58:38.753138000 -0700 @@ -1125,15 +1125,10 @@ // Emit an address. inline address emit_addr(const address addr = NULL); -#if !defined(ABI_ELFv2) - // Emit a function descriptor with the specified entry point, TOC, - // and ENV. If the entry point is NULL, the descriptor will point - // just past the descriptor. - // Use values from friend functions as defaults. - inline address emit_fd(address entry = NULL, - address toc = (address) FunctionDescriptor::friend_toc, - address env = (address) FunctionDescriptor::friend_env); -#endif + // Emit a function descriptor. + // If we are running in a little-endian environment (i.e. if ABI_ELFv2 is + // defined) this function will emit no code and simply return the current PC) + inline address emit_fd(); ///////////////////////////////////////////////////////////////////////////////////// // PPC instructions --- old/src/cpu/ppc/vm/assembler_ppc.inline.hpp 2015-05-19 17:58:39.332137000 -0700 +++ new/src/cpu/ppc/vm/assembler_ppc.inline.hpp 2015-05-19 17:58:39.250139000 -0700 @@ -55,11 +55,15 @@ return start; } -#if !defined(ABI_ELFv2) // Emit a function descriptor with the specified entry point, TOC, and // ENV. If the entry point is NULL, the descriptor will point just // past the descriptor. -inline address Assembler::emit_fd(address entry, address toc, address env) { +// If we are running in a little-endian environment (i.e. if ABI_ELFv2 is +// defined) this function will emit no code and simply return the current PC) +inline address Assembler::emit_fd() { +#if defined(ABI_ELFv2) + return pc(); +#else FunctionDescriptor* fd = (FunctionDescriptor*)pc(); assert(sizeof(FunctionDescriptor) == 3*sizeof(address), "function descriptor size"); @@ -68,13 +72,13 @@ (void)emit_addr(); (void)emit_addr(); - fd->set_entry(entry == NULL ? pc() : entry); - fd->set_toc(toc); - fd->set_env(env); + fd->set_entry(pc()); + fd->set_toc(FunctionDescriptor::friend_toc); + fd->set_env(FunctionDescriptor::friend_env); return (address)fd; -} #endif +} // Issue an illegal instruction. 0 is guaranteed to be an illegal instruction. inline void Assembler::illtrap() { Assembler::emit_int32(0); } --- old/src/cpu/ppc/vm/interpreterRT_ppc.cpp 2015-05-19 17:58:39.816135000 -0700 +++ new/src/cpu/ppc/vm/interpreterRT_ppc.cpp 2015-05-19 17:58:39.736135000 -0700 @@ -110,10 +110,8 @@ } void InterpreterRuntime::SignatureHandlerGenerator::generate(uint64_t fingerprint) { -#if !defined(ABI_ELFv2) // Emit fd for current codebuffer. Needs patching! __ emit_fd(); -#endif // Generate code to handle arguments. iterate(fingerprint); --- old/src/cpu/ppc/vm/macroAssembler_ppc.inline.hpp 2015-05-19 17:58:40.266141000 -0700 +++ new/src/cpu/ppc/vm/macroAssembler_ppc.inline.hpp 2015-05-19 17:58:40.174138000 -0700 @@ -398,10 +398,6 @@ twi(traptoEqual | traptoGreaterThanUnsigned, a/*reg a*/, si16); } -#if defined(ABI_ELFv2) -inline address MacroAssembler::function_entry() { return pc(); } -#else inline address MacroAssembler::function_entry() { return emit_fd(); } -#endif #endif // CPU_PPC_VM_MACROASSEMBLER_PPC_INLINE_HPP