PowerPC opcode table?

10,861

Solution 1

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.

Solution 2

Here's one: http://pds.twi.tudelft.nl/vakken/in101/labcourse/instruction-set/

EDIT: This one's better: The Programming Environments for 32-Bit Microprocessors

Solution 3

The latest spec is the Power ISA book, available here. It has plenty of tables in the appendices.

PPC opcode table

Note that the ISA fluctuated a bit over time, so it might be best to find the doc for the specific core you're going to emulate.

Solution 4

RCPU RISC Central Processing Unit Reference Manual

Solution 5

Many of the other resources being long-since lost, here's an answer that is valid as of 2020 and has the best chance of remaining so in perpetuity.

Find a copy of PowerPC Microprocessor Family: The Programmer’s Reference Guide; Archive.org hosts this one from 1995 and that same document is also available elsewhere — search for the text MPRPPCPRG-01 to locate other copies.

In that document, skip to either:

  • Page 44 for the start of section '4.2 PowerPC Instruction Set Listings', which begins with 'Table 33. Complete Instruction List Sorted by Mnemonic'; or
  • Page 51 for 'Table 34. Complete Instruction List Sorted by Opcode'.

As per the date of the document, that's the 1995-vintage version of PowerPC, i.e. that which was in the first few generations of PowerMac, the various licensed Mac clones, the IBM ThinkPad 850, etc.

The tables are compact and provide only the encoding information (following the IBM convention that bit 0 is most significant):

Beginning of Table 33 Beginning of Table 34

Share:
10,861
Delan Azabani
Author by

Delan Azabani

I’m a computer programmer based in Perth, Australia. My passions include all kinds of systems programming from Rust to x86 assembly and beyond, internationalisation and Unicode, digital preservation and archaeology, typography, cryptography, and above all, teaching. I’m also a trans woman (she/her pronouns)!

Updated on June 04, 2022

Comments

  • Delan Azabani
    Delan Azabani almost 2 years

    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?

  • Delan Azabani
    Delan Azabani almost 13 years
    Unfortunately I'm not on a Mac. Though I do have one, oddly, I couldn't find it on there. Do I need to have Xcode installed or something?
  • Ken
    Ken almost 13 years
    I would guess that you probably need the developer tools installed, since it's in a folder called "Shark", but I'm not certain.
  • George Hilliard
    George Hilliard almost 9 years
    Your second link is behind a login.
  • Lennon McLean
    Lennon McLean about 3 years
    both links are dead, 404