ARM Technical Support Knowledge Articles

STACK REQUIREMENTS OF RUN-TIME LIBRARY FUNCTIONS

Applies to: C51 C Compiler

Answer


Information in this article applies to:


QUESTION

Is there any information about the stack requirements of the Keil C51 run-time library available? I need figures for the floating point arithmetic functions.

ANSWER

Most of the C51 run-time library functions are pretty small and do not require (except for the CALL itself) additional stack space.

No additional stack is required by the following run-time library functions:

One additional CALL level (2 or 3 stack bytes) is required by the following run-time library functions:

Two additional CALL levels (4 or 6 stack bytes) are required by the following run-time library functions:

Three additional CALL levels (6 or 9 stack bytes) are required by the following run-time library functions:

More complex functions may have even higher stack requirements, however none of the library functions require more than 22 bytes (35 for 3-byte CALL/RET frame size).

SEE ALSO

Article last edited on: 2005-01-17 09:43:52

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential