PowerPC Programming

From Applepedia

(Redirected from PowerPC)
Jump to: navigation, search

This page is intended as a repository of useful links relating to the use of PowerPC processors as found in G4 and G5 Macs. Altivec specific information is on another page.

Contents

What is the PowerPC?

PowerPC is a RISC microprocessor architecture created by the 1991 Apple-IBM-Motorola alliance, known as AIM. Originally intended for workstations, PowerPC CPUs have since become popular embedded and high-performance processors as well. PowerPC was the cornerstone of AIM's PReP and Common Hardware Reference Platform initiatives in the 1990s, but the architecture found the most success in the personal computer market in Apple's Power Macintosh line from 1997 - 2005. PowerPC is largely based on IBM's earlier (but retroactively named) POWER architecture, and retains a high level of compatibility with it; the architectures have remained close enough that the same programs and operating systems will run on both if some care is taken in preparation.[1]

Recently, PowerPC has frequently been called a Poor Person's Computer due to its stigma as being outdated as of the Intel switch.

Which PowerPC processor does my Mac use?

If you've bought a Mac in the last nine months, you're stuck with an Intel processor.

If you have a G4 desktop or laptop, your processor is of the Freescale MPC7XXX series. This will help you find relevant documentation on Freescale's website. It's only needed for the more specific details of your processor.

If you have a G5 desktop, your processor is of the IBM PowerPC 970 series. You can find documentation at IBM's website.

Tips & Tricks

  • gcc -S butan.c will translate a C program to assembly. Try the -O3 flag to get more optimized code, if the code doesn't do what you expect it to do try -O0 to turn off optimizations.
  • otool -tdv executable.o will disassemble an executable.
  • /Developer/Tools/PPCExplain addi will explain an instruction.

Links

Introductory

Quick Reference

Reference

Altivec

News & Community

Personal tools