views:

408

answers:

5

Is there any ARM instruction to i386 instruction Converter available?

A: 

i really doubt. there are too much differences to make it automated.

Andrey
They're a lot closer than, say, ANSI C and x86, yet there are lots of programs that automatically do that conversion.
Ken
Not at all. ANSI C is designed to compile to various assembler languages. Many high-level (relatively) concepts in C can be represented in numerous different ways in different assemblers. Between assemblers, however, is a different story.
DeadMG
+6  A: 

You can use QEMU to emulate ARM instructions on x86.

tgiphil
A: 

http://www.libcpu.org/

It's very much in beta, but the idea is to write llvm front-ends for binaries, so that the llvm back-end can then generate code for any supported platform. There is an ARMv6 front end under active development, and I'm sure they would like to have help with it. The goal is to support both emulation and static recompilation between any of the supported architectures.

Stephen Canon
+1  A: 

You could reverse-engineer the ARM code to C, and then simply compile the C code. This company actually produces pretty good code C code from assembler. (I've never used their product, but I am familiar with the research behind that company).

Ira Baxter
+1  A: 

Emulation or static binary translation are the paths I would take, each has its pros and cons.

You need to be more clear about what you are asking. The simple translation of one instruction set to another is one thing, the harder part of making the result useful is what you are addressing. Your ARM's memory and register space will not match the X86, so a straight instruction to instruction (emulated or sbt) will not be enough, you have to add code to replace many of the loads and stores with something that checks the address, determines what it was addressing, and emulate that peripheral (emulated or sbt).

dwelch