< prev index next >

src/cpu/ppc/vm/assembler_ppc.inline.hpp

Print this page
rev 8389 : 8080684: PPC64: Fix little-endian build after "8077838: Recent developments for ppc"

*** 53,82 **** address start = pc(); emit_address(addr); 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) { FunctionDescriptor* fd = (FunctionDescriptor*)pc(); assert(sizeof(FunctionDescriptor) == 3*sizeof(address), "function descriptor size"); (void)emit_addr(); (void)emit_addr(); (void)emit_addr(); fd->set_entry(entry == NULL ? pc() : entry); fd->set_toc(toc); fd->set_env(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); } inline bool Assembler::is_illtrap(int x) { return x == 0; } --- 53,84 ---- address start = pc(); emit_address(addr); return start; } // 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. + // 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(address entry, address toc, address env) { FunctionDescriptor* fd = (FunctionDescriptor*)pc(); + #if !defined(ABI_ELFv2) assert(sizeof(FunctionDescriptor) == 3*sizeof(address), "function descriptor size"); (void)emit_addr(); (void)emit_addr(); (void)emit_addr(); fd->set_entry(entry == NULL ? pc() : entry); fd->set_toc(toc); fd->set_env(env); + #endif return (address)fd; } // Issue an illegal instruction. 0 is guaranteed to be an illegal instruction. inline void Assembler::illtrap() { Assembler::emit_int32(0); } inline bool Assembler::is_illtrap(int x) { return x == 0; }
< prev index next >