Display ARM and Intel Build Commands

This might be a dumb question, but is there a webpage / document / book that gives you a mapping of assembly instructions for intel x86 and ARM?

I know this is not a 1-to-1 mapping, but I would suggest that many instructions are pretty easy to map (MOV, as an example).

+4
source share
2 answers

Why? Are you trying to transfer code from one to another? Do you know someone and want to “trick a sheet” to find out another? The best I can come up with is an ARM / Thumb Quick Reference Card (maybe there are many for x86.)

It seems that I can not find it, and perhaps the main reason that the display is far from "seamless". ARM instructions are usually 3-op ( abc dst,src1,src2 ), and, even worse, src2 can have shifts / rotations applied to it. X86 instructions are usually 2-op, except that you have oddities like lea , which is commonly used as a 3-op addition.

The closest thing I can think of is a combined ARM / x86 cheat sheet with general instructions divided into categories (arithmetic operations, bit operations, control flow, floating point, memory access).

And there Thumb ...

+1
source
Instruction set architectures

have and use similar sound and operating instructions, such as add, xor, load, store and move.

The mapping you are looking for is found in the same place no matter what the two sets of instructions are. Get documents for one set of commands, get documents for another, and just find instructions. x86 loves to overload the mov instruction for downloads and storages, and also move and register it immediately to register movements, for the hand you use to load and store to load and store and move it for register registration and immediate registration.

intel is cisc, arm risc, so there will not be one card. very few commands will be displayed without visible finds, add rd = rd + rn and another register to register alu functions (for full-size registers, not fractional x86 registers).

As a result of not seeming, but not one to one, there are many real solutions for moving from one to another, so finding a single card does not make sense.

What you are looking for is either a static binary translation or a dynamic binary translation, static translation is easier if you have never done it. And do not translate from one machine code to another assembly or machine code. Translate from machine code to C, and then let the compiler compile it to the target during optimization, and also give you the choice to use different purposes. Another alternative is the instruction set simulator.

If you just want to rewrite the code manually, use two sources of guidance and targets. even if there was a card, you would still need to know two sets of instructions well to use this card.

+1
source

All Articles