Uninformed: Informative Information for the Uninformed

Vol 1» 2005.May


PowerPC processors have thirty-two 32-bit general-purpose registers (r0-r31)3.1, thirty-two 64-bit floating-point registers (f0-f31), a link register (lr), a count register (ctr), and a handful of other registers for tracking things like branch conditions, integer overflows, and various machine state flags. Some PowerPC processors also contain a vector-processing unit (AltiVec, etc), which can add another thirty-two 128-bit registers to the set.

On the Darwin/Mac OS X platform, r0 is used to store the system call number, r1 is used as a stack pointer, and r3 to r7 are used to pass arguments to a system call. General-purpose registers between r3 and r12 are considered volatile and should be preserved before the execution of any system call or library function.

;; Demonstrate execution of the reboot system call
	li r0, 55 ; #define SYS_reboot 55