15. SPU Assembly Language
This topic is not for the faint of heart. Thus far, the book has explained Cell programming in terms of C functions with friendly names like spu_add and mfc_get. The applications operate on variables with straightforward datatypes such as vector signed short, and if you don’t know the result of an operation, you can find out by calling printf.
None of these luxuries are available when you code with assembly. The code in a *.s file consists of instructions like ai, il, hbrz, and stqx. They don’t operate on typed variables, but instead manipulate bits, bytes, halfwords, words, doublewords, and quadwords in the SPU’s general-purpose registers. This means printf won’t suffice; if you want to see what an instruction accomplished, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access