Editing Synergistic Processing Unit (SPU)
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 8: | Line 8: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| Register || Status || Usage | |||
|- | |- | ||
| R0 (LR) || Dedicated || Return Address / Link Register. This register contains the address to which a called function normally returns. It is volatile across function calls and must be saved by a non-leaf function. | | R0 (LR) || Dedicated || Return Address / Link Register. This register contains the address to which a called function normally returns. It is volatile across function calls and must be saved by a non-leaf function. | ||
Line 21: | Line 21: | ||
|- | |- | ||
| R80-R127 || Non-volatile || Local variable registers. These must be preserved across function calls. | | R80-R127 || Non-volatile || Local variable registers. These must be preserved across function calls. | ||
|} | |} | ||
Line 68: | Line 67: | ||
== SPU Assembly Language Specification == | == SPU Assembly Language Specification == | ||
All the informations are taken from [https://www-01.ibm.com/chips/techlib/techlib.nsf/techdocs/EFA2B196893B550787257060006FC9FB/$file/SPU_Assembly_Language_Specification_1.7.pdf | All the informations are taken from this [https://www-01.ibm.com/chips/techlib/techlib.nsf/techdocs/EFA2B196893B550787257060006FC9FB/$file/SPU_Assembly_Language_Specification_1.7.pdf PDF]. | ||
=== Notation and Conventions === | === Notation and Conventions === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| Notation/Convention || Meaning | |||
|- | |- | ||
| ch || Channel number. Channels are specified as either $ch followed by a channel number (for example, $ch3) or a specific channel mnemonic. | | ch || Channel number. Channels are specified as either $ch followed by a channel number (for example, $ch3) or a specific channel mnemonic. | ||
Line 108: | Line 107: | ||
|- | |- | ||
| u18 || Unsigned 18-bit value. | | u18 || Unsigned 18-bit value. | ||
|} | |} | ||
=== Instruction Set === | === Instruction Set === | ||
{| class="wikitable" | {| class="wikitable" | ||
| Instruction/Usage || Description | |||
|- | |- | ||
| a rt, ra, rb || Add word. Each word element of register ra is added to the corresponding word element of register rb, and the results are placed in the corresponding word elements of register rt. | |||
| a | |||
|- | |- | ||
| absdb rt, ra, rb || Absolute difference of bytes. Each byte element of register ra is subtracted from the corresponding byte element of register rb. The absolute values of the results are placed in the corresponding elements of register rt. | | absdb rt, ra, rb || Absolute difference of bytes. Each byte element of register ra is subtracted from the corresponding byte element of register rb. The absolute values of the results are placed in the corresponding elements of register rt. | ||
|- | |- | ||
| addx rt, ra, rb || Add word extended. Each word element of register ra, the corresponding word element of register rb, and the least significant bit of the corresponding word element of register rt are added, and the results are placed in the corresponding word elements of register rt. | | addx rt, ra, rb || Add word extended. Each word element of register ra, the corresponding word element of register rb, and the least significant bit of the corresponding word element of register rt are added, and the results are placed in the corresponding word elements of register rt. | ||
|- | |- | ||
| ah rt, ra, rb || Add halfword. Each halfword element of register ra is added to the corresponding halfword element of register rb, and the results are placed in the corresponding halfword elements of register rt. | | ah rt, ra, rb || Add halfword. Each halfword element of register ra is added to the corresponding halfword element of register rb, and the results are placed in the corresponding halfword elements of register rt. | ||
Line 143: | Line 139: | ||
| bg rt, ra, rb || Borrow generate word. Each unsigned word element of register ra is compared to the corresponding unsigned word element of rb. If the value of ra is greater than that of rb, a 0 is placed in the corresponding element of rt; otherwise, a 1 is placed there. | | bg rt, ra, rb || Borrow generate word. Each unsigned word element of register ra is compared to the corresponding unsigned word element of rb. If the value of ra is greater than that of rb, a 0 is placed in the corresponding element of rt; otherwise, a 1 is placed there. | ||
|- | |- | ||
| | | Please help to fill out! || Please help to fill out! | ||
|} | |} | ||