Re: converting ppc assembly to intel assembly.
Re: converting ppc assembly to intel assembly.
- Subject: Re: converting ppc assembly to intel assembly.
- From: "Jordan Krushen" <email@hidden>
- Date: Sat, 10 Jun 2006 15:36:23 -0700
On 6/10/06, matt jaffa <email@hidden> wrote:
I have a project that uses ppc assembly language with stw, .... etc.
Is there some document that can map the ppc codes over to intel?
Assembly is generally used to exploit architecture-specific features
to optimize a chunk of code to be faster than the compiler would
normally generate on the platform. Translating directly from one ISA
to another would likely be counterproductive. What works for one chip
may not work well on another -- that's why we have different
architectures, after all. Doing something PowerPC-style probably
won't be the proper Intel thing to do, unless it's very simple -- in
which case the compiler will probably do fine on its own.
I'd suggest rewriting the block of assembly in C (or just grab the
original pre-assembly code -- you do have that, right?), compiling it
on Intel, determining if it's too slow, and then optimizing the
generated assembly further, if required (by someone who knows the x86
ISA well, of course).
It's all very case-specific, so you'd really have to determine why
that block of assembly code exists in the first place. It may not be
needed at all on another ISA.
Premature optimization.. well, you know the rest. Write portable
and/or correct code first, then optimize it only where needed.
HTH,
J.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden