Restrictions; Function Calling Conventions - Texas Instruments TI-89 Software Manual

Sierra c assembler
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

Section 2: Compiler
Note: These binary conversion rules do not apply to the shift operators (>> and <<), since the
Note: Operands of type integer are not always converted as stated above. Sometimes, smaller
2.10.6.

Restrictions

Type conversions can be performed on any of the scalar types — i.e., integer
types, floating-point types, enumeration types, and pointers. There are, however,
certain restrictions imposed upon both explicit and implicit conversions.
The only explicit conversions that are not permitted are those between
floating-point types and pointers; any other conversions involving scalar types
are allowed.
Additional restrictions apply to implicit conversions that are made across
assignments and through function returns. Any statement requiring either an
implicit conversion between two enumeration types or an implicit conversion
involving a pointer (excluding null pointers and void pointers) is illegal. In both of
these cases, however, the conversion will be performed and a warning issued.
All conversions between float and double are ignored since they are both 10
byte objects, however, no warning or error is issued.
2.11.

Function Calling Conventions

When a function is called with arguments, the value of each specified argument
is pushed onto the stack. (Hereafter, the value of an argument will be referred to
simply as the argument.) The arguments are pushed onto the stack in reverse
order — i.e., beginning with the rightmost argument. After a function call, the
stack pointer is incremented, if necessary, to restore its value to that prior to the
stacking of the arguments.
Note: When the -O, -Oz, or -Oc1 command line flag is specified, the stack pointer will not
Note: If the top of the stack is free, the rightmost argument is sometimes moved directly into
TI-89 / TI-92 Plus Sierra C Assembler Reference Manual
operands are not combined directly. Instead, each operand is treated as if it were an
operand of a unary operator.
integer types are used if doing so results in improved run-time performance without loss
of precision.
necessarily be incremented after every function call that has arguments pushed onto the
stack. In the presence of any of these flags, attempts are made to coalesce more than
one stack cleanup into a single stack adjustment.
the top stack position (i.e., the stack pointer is not decremented); otherwise, it is pushed
onto the stack. Additional arguments are always pushed onto the stack.
Not for Distribution
73
Beta Version February 2, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-89 plusTi-92 plus

Table of Contents