EasyManua.ls Logo

Intel i960 - C Data Types and Asm Classes

Intel i960
347 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
i960 Processor Compiler User's Guide
7-78
7
Declarations must be consistent between the asm function prototype and
the control line. If the
asm class of a parameter or return register does not
match the declared C parameter or return type, the compiler issues a
warning message. Table 7-5 lists the matching data types and classes.
Table 7-5 C Data Types and asm Classes
Class Designations Data Types
reglit, tmpreg, reglit(1),
tmpreg(1)
any integer type; any pointer type; float; struct, or
union types of 1 to 4 bytes
reglit(2), tmpreg(2) double; struct, or union types of 5 to 8 bytes
reglit(3), tmpreg(3) long double; struct, or union types of 7 to 12 bytes
reglit(4), tmpreg(4) struct or union types of 13 to 16 bytes
freglit, ftmpreg float, double, or long double
NOTE. Avoid writing a parameter declaration that can never match any
call context. Such a declaration creates a pocket of unreachable code.
For example, unreachable code results from declaring a parameter in an
asm function prototype as an integer C type and declaring the
corresponding parameter in the control line as
ftmpreg or freglit
class. The control line parameter declaration then matches only a
floating-point data type argument, but the parameter can accept only an
integer argument. Similarly, when specifying an integer return type in a
function prototype, any
return declaration specified in the control line
must also be integer. The compiler recognizes when the parameters in the
function prototype and the control line are mismatched and issues a
message.

Table of Contents

Related product manuals