SDKZSPF LSI, SDKZSPF Datasheet - Page 64

no-image

SDKZSPF

Manufacturer Part Number
SDKZSPF
Description
Manufacturer
LSI
Datasheet

Specifications of SDKZSPF

Lead Free Status / Rohs Status
Supplier Unconfirmed
3.2.4 Conventions Used for Passing Parameters
3-10
sdcc/zdxcc’s conventions for passing parameters are described below.
zdcc’s conventions for passing parameters are described below.
Parameters are examined from first to last (left to right).
C Cross Compiler
Copyright © 1999-2003 by LSI Logic Corporation. All rights reserved.
The first three (16-bit) word parameters (scalar type) are passed in
registers r4–r6.
All other parameters are passed on the stack.
A 16-bit value is returned in r4; a 32-bit value is returned in r5r4.
A structure is returned using a hidden pointer, which is passed by
the caller in r4.
A structure is passed using two arguments. The first argument is a
pointer to the structure, and the second argument is the structure to
be passed. The pointer to the structure is a 16-bit value and can be
passed in a register if it is one of the first three word-sized
arguments. The second argument, the structure, is passed on the
stack. For structures with a size of one or two words, the pointer
argument is eliminated.
A pointer value is passed in the first unused register in the following
list: a0, a1, a6, r5r4, r7r6, r3r2.
A 32-bit non-pointer value is passed in the first unused register in the
following list: r5r4, r7r6, r3r2, a0, a1, a6.
A 16-bit value is passed in the first unused register in the following
list: r4, r5, r6, r7, r2, r3.
All other non-structure parameters are passed on the stack.
Structures larger than 32-bits are passed on the stack. All other
structures are passed in the same manner as a non-pointer
argument of the same size.
A pointer value is returned in a0. A non-pointer 32-bit value is
returned in r5r4. A 16-bit value is returned in r4.
A structure is returned using a hidden pointer, which is passed by
the caller in a0.