src/cpu/ppc/vm/assembler_ppc.inline.hpp
Print this page
@@ -53,30 +53,34 @@
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) {
+// 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");
(void)emit_addr();
(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); }
inline bool Assembler::is_illtrap(int x) { return x == 0; }