зеркало из https://github.com/mono/mail-archives.git
148 строки
5.5 KiB
HTML
148 строки
5.5 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Mono-bugs] [Bug 487846] PPC code gen is inefficient in several areas
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%20487846%5D%20PPC%20code%20gen%20is%20inefficient%20in%20several%0A%09areas&In-Reply-To=bug-487846-28286%40https.bugzilla.novell.com/">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="087285.html">
|
|
<LINK REL="Next" HREF="087283.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Mono-bugs] [Bug 487846] PPC code gen is inefficient in several areas</H1>
|
|
<B>bugzilla_noreply at novell.com</B>
|
|
<A HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%20487846%5D%20PPC%20code%20gen%20is%20inefficient%20in%20several%0A%09areas&In-Reply-To=bug-487846-28286%40https.bugzilla.novell.com/"
|
|
TITLE="[Mono-bugs] [Bug 487846] PPC code gen is inefficient in several areas">bugzilla_noreply at novell.com
|
|
</A><BR>
|
|
<I>Mon Mar 23 15:36:12 EDT 2009</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="087285.html">[Mono-bugs] [Bug 487846] PPC code gen is inefficient in several areas
|
|
</A></li>
|
|
<LI>Next message: <A HREF="087283.html">[Mono-bugs] [Bug 439465] MDB crashes on Dns.GetHostByName
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#87288">[ date ]</a>
|
|
<a href="thread.html#87288">[ thread ]</a>
|
|
<a href="subject.html#87288">[ subject ]</a>
|
|
<a href="author.html#87288">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE><A HREF="https://bugzilla.novell.com/show_bug.cgi?id=487846">https://bugzilla.novell.com/show_bug.cgi?id=487846</A>
|
|
|
|
User <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">munroesj at us.ibm.com</A> added comment
|
|
<A HREF="https://bugzilla.novell.com/show_bug.cgi?id=487846#c1">https://bugzilla.novell.com/show_bug.cgi?id=487846#c1</A>
|
|
|
|
|
|
|
|
|
|
|
|
--- Comment #1 from Steven Munroe <<A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">munroesj at us.ibm.com</A>> 2009-03-23 13:36:09 MST ---
|
|
In the normal PPC compiler and linker, the compiler always generates a single
|
|
branch and link (bl) for calls. Later the linker will either resolve the bl
|
|
directly or generate a call stub and resolve the bl to the call stub.
|
|
|
|
Also the compiler never uses the 5 instruction (addis, ori, sldi, oris, ori)
|
|
sequence to generate a 64-bit pointer or constant. Instead it allocates the
|
|
slots in the GOT/TOC for the data/pointer and generates a single load
|
|
instruction.
|
|
|
|
These techniques seem to be problematic to generate in the mono JIT. The JIT
|
|
does not have relocation infrastructure and the ability to defer relocations
|
|
until the final locations for all functions/data are know. In mono methods are
|
|
generated incrementally and some sequences might need to resolved multiple
|
|
times (to trampolines and then to final code).
|
|
|
|
The current design is also not thread safe as it requires patching multiple
|
|
instruction sequences. If the target is in reach (within +/- 32MB) it should be
|
|
possible to patch the final blrl into a simple bl instruction. Then as a second
|
|
step we can patch the addis, ori, mflr sequence to nop's. This would be thread
|
|
safe but is still slower then it needs to be (1 to 3 cycle bubble to execute
|
|
the nop's).
|
|
|
|
There is a first stage of fix up that seems to occur after
|
|
mono_arch_emit_epilog() where the *code buffer is moved to its final location.
|
|
This seems to be based on call-backs to mono_arch_patch_code() setup by
|
|
mono_add_patch_info().
|
|
|
|
I think a better strategy is to generate simple bl instructions into the body.
|
|
These still require fixup they have to be recorded via mono_add_patch_info().
|
|
Then during mono_arch_emit_epilog(), generate the call stubs following the
|
|
final return sequence. The bl's in the body can be fixed up to transfer to
|
|
the matching call stub at this time but still need to marked with
|
|
mono_add_patch_info() so it can retargeted into a direct call if possible
|
|
(within +/- 32M). But we still need to mark the call stubs with
|
|
mono_add_patch_info() so we can fix up the ppc_load_sequence for when the
|
|
target is out of reach.
|
|
|
|
There may be some extra space (1 additional word per static call) and some of
|
|
the call stubs will be generated and not used. But there may be some
|
|
opportunity to common-up call stubs and save space that way. This sequence can
|
|
be made thread safe by changing the single bl instruction.
|
|
|
|
--
|
|
Configure bugmail: <A HREF="https://bugzilla.novell.com/userprefs.cgi?tab=email">https://bugzilla.novell.com/userprefs.cgi?tab=email</A>
|
|
------- You are receiving this mail because: -------
|
|
You are the QA contact for the bug.
|
|
</PRE>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="087285.html">[Mono-bugs] [Bug 487846] PPC code gen is inefficient in several areas
|
|
</A></li>
|
|
<LI>Next message: <A HREF="087283.html">[Mono-bugs] [Bug 439465] MDB crashes on Dns.GetHostByName
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#87288">[ date ]</a>
|
|
<a href="thread.html#87288">[ thread ]</a>
|
|
<a href="subject.html#87288">[ subject ]</a>
|
|
<a href="author.html#87288">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
|
|
<hr>
|
|
<a href="http://lists.ximian.com/mailman/listinfo/mono-bugs">More information about the mono-bugs
|
|
mailing list</a><br>
|
|
</body></html>
|