Go to the first, previous, next, last section, table of contents.

Predefined Types

The global symbol table (see section The Global Symbol Table) is initialized with some predefined types. The SUIF library also defines a number of variables containing pointers to these predefined types, so that you don't need to search the symbol tables for most commonly-used types. The first set of predefined types are fixed-size scalar types:

type_v0
This is a void type with size zero.
type_s8
type_s16
type_s32
type_s64
These are signed integer types of 8, 16, 32, and 64 bits.
type_u8
type_u16
type_u32
type_u64
These are unsigned integer types of 8, 16, 32, and 64 bits.
type_f32
type_f64
type_f128
These are floating-point types of 32, 64, and 128 bits.
type_error
This variable is just set to NULL. It may be used to represent various error conditions.

Because the fixed-size types do not necessarily match the target machine parameters (see section Target Machine Parameters), they should rarely be used. Instead the SUIF library also predefines pointers to types that correspond to the most common C types. These "portable" types are automatically initialized using the target machine parameters.

type_void
Since void types always have a size of zero, this type is equivalent to type_v0, but it is included for completeness.
type_ptr
This type is a pointer to type_void. Like all other pointer types, it automatically has the size of pointers on the target machine.
type_char
This is an integer type with the size specified for C_char types in the target machine parameters. The char_is_signed machine parameter determines whether it is signed or unsigned.
type_signed_char
type_unsigned_char
These are signed and unsigned integer types with the size specified for C_char types in the target machine parameters.
type_signed_short
type_unsigned_short
These are signed and unsigned integer types with the size specified for C_short types in the target machine parameters.
type_signed
type_unsigned
These are signed and unsigned integer types with the size specified for C_int types in the target machine parameters.
type_signed_long
type_unsigned_long
These are signed and unsigned integer types with the size specified for C_long types in the target machine parameters.
type_signed_longlong
type_unsigned_longlong
These are signed and unsigned integer types with the size specified for C_longlong types in the target machine parameters.
type_float
type_double
type_longdouble
These are floating-point types with the sizes specified for C_float, C_double, and C_longdouble types in the target machine parameters.

Go to the first, previous, next, last section, table of contents.