MSC100ABIRM Motorola / Freescale Semiconductor, MSC100ABIRM Datasheet - Page 23

no-image

MSC100ABIRM

Manufacturer Part Number
MSC100ABIRM
Description
SC100 Application Binary Interface Reference Manual
Manufacturer
Motorola / Freescale Semiconductor
Datasheet
The following registers will be saved by the callee, if actually used: d6-d7,r6-r7.
The compiler should assume that the current settings of the following operating control bits are correct:
Setting these mode bits is under the application responsibility. For example, for the function call:
foo(int a1, struct fourbytes a2, struct eightbytes a3, int *a4)
parameters will be allocated as follows:
a1 - in register d0.
a2 - in register d1.
a3 - on the stack.
a4 - on the stack.
For the call
bar(long *b1, int b2, int b3[])
parameters will be allocated as follows:
b1 - in r0
b2 - in d1
b3 - in stack.
The stack-based calling convention must be used when calling functions that are required to maintain a
calling stack.
The compiler is free to use optimized calling sequences for functions that are not exposed to external calls.
Locals and formals will be allocated on the stack and in registers.
Table 2-3 summarizes register usage in the stack-based calling convention.
SC100 Application Binary Interface
Saturation mode
Round mode
Scale bits
d0
d1
d2–d5
d6–d7
d8–d15
r0
r1
r2
r3–r5
r6
Table 2-3. Register Usage in the Stack-Based Calling Convention
Register
First numeric parameter
Return numeric value
Second numeric parameter
First address parameter
Return address value
Second address parameter
Big return object address
Optional argument pointer
Used As
Preliminary (April 2000)
Caller Saved
+
+
+
+
+
+
+
Callee Saved
Function Calling Conventions
+
+
2-5

Related parts for MSC100ABIRM