Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PowerPC opcode table?

I am interested in developing a PowerPC emulator for my own learning purposes. I've found a fair amount of resources about programming in PowerPC assembly, but after quite some time looking, I haven't been able to find an instruction/opcode mapping table anywhere yet. Of course, I need the opcodes to be able to write an emulator. Where can I find one?

like image 780
Delan Azabani Avatar asked Dec 10 '22 08:12

Delan Azabani


1 Answers

I did some more hunting and found documentation on IBM's website. This page links to three books of documentation, of which the first one contains all relevant information about PowerPC instructions.

I was initially confused by seeing that many instructions all had the same OPCODE field value, and thought, "How will we distinguish the instructions then?". However, in section 1.7, "Instruction formats", many of the instruction forms that are used throughout the architecture actually have a two-part opcode; the first part being the six-bit OPCODE field at the high end of the instruction, and the second part being a field called XO, which contains extra identification for the opcode. Its size and location varies depending on the instruction format.

like image 72
Delan Azabani Avatar answered Jan 22 '23 20:01

Delan Azabani