Program Structure
Registers and Register Mnemonics
Some additional predefined register mnemonics are provided in “Register Procedure Calling Conventions” on page 28 to match the standard
Table | Register Procedure Calling Conventions | |||
|
|
|
|
|
|
| Register | Synonyms | Description |
|
|
|
|
|
|
| %fr4 | %farg0 %fret | Floating argument, return value |
|
| %fr5 | %farg1 | Second floating argument |
|
| %fr6 | %farg2 | Third floating argument |
|
| %fr7 | %farg3 | Fourth floating argument |
|
| %r2 | %rp | Return link |
|
| %r19 | %t4 | Fourth temporary register |
|
| %r20 | %t3 | Third temporary register |
|
| %r21 | %t2 | Second temporary register |
|
| %r22 | %t1 | First temporary register |
|
| %r23 | %arg3 | Argument word 3 |
|
| %r24 | %arg2 | Argument word 2 |
|
| %r25 | %arg1 | Argument word 1 |
|
| %r26 | %arg0 | Argument word 0 |
|
| %r27 | %dp | Data pointer |
|
| %r28 | %ret0 | Return value |
|
| %r29 | %ret1 %sl | Return value, static link |
|
| %r30 | %sp | Stack pointer |
|
| %r31 | %mrp | Millicode return link |
|
| %sr1 | %sret %sarg | Return value, argument |
|
|
|
|
|
In addition, there is a special register mnemonic defined as %previous_sp, that allows access to the previous value of the stack pointer.
%previous_sp must be used in the position of a base register; it can be used only between .ENTER and .LEAVE
28 | Chapter 2 |