Architecture-PowerPC

De UnixWiki
Aller à : navigation, rechercher

PowerPC (Pipeline Orientation With Enhanced RISC)

Architecture RISC (Reduced Instruction Set)

32 registres entier 32bits (GPR, General Purpose register) noté de R0 à R31.
32 registres flottants accessible en temps que 32 ou 64bit (float double IEEE) (FPR) noté de F0 à F31.

PC : Compteur de programme ; Adresse la prochaine instruction à exécuter
LR : Link Register ; Permet de sauvegarder le PC
R0 : Registre général ; Usage particulier tel que le transfert de LR
R1 : Stack pointer
R31 : Sauvegarde de stack pointer
R3,R4,... : Registres généraux ; Usage courant (arithmétique, manipulation de la mémoire, etc.)

iar : The instruction address register.Contains the location of the faulting instruction (for the faulting MST). It is the current instruction that has been executed during the time of crash.

lr : Value of the link register. Contains the return address of the function.

(MSR) The Machine State Register. Each CPU has its own MSR, which indicates the status of the processor.

 dr msr /* dr cmd is used to dump the contents of any register */

dsirr : (Data Storage Interrupt reason Register) indicates the type of page fault that has occurred. Decoding the dsirr is done by converting the hexadecimal value to decimal. Values between 1 to 127 are error numbers (shown in /usr/include/sys/errno.h), whereas between 128 to 512 are exceptions (shown in /usr/include/sys/m_except.h).

Lien intéressant

Liste des instructions assembleur

pds.twi.tudelft.nl

Les syscalls

Pour utiliser un appel système sous AIX, il faut spécifier le numéro du syscall, ses arguments et déclencher la trappe. Plus précisément, on doit avoir un schéma de ce type :
r2 <-- numéro de syscall
r3,r4,r5,etc. <-- arguments 1,2,3,etc.
svca <-- instruction pour invoquer l'appel système

Le gros problème des appels système sous AIX est qu'ils sont extrêmement dépendants de la version d'AIX.