next up previous contents
Next: TargetInformationBlock Up: GlobalInformationBlock Previous: GlobalInformationBlock   Contents


CInformationBlock

The CInformationBlock provides certain information about the C interface (or at least a C interface) to the target machine. The kind of information it provides is the kind that is often useful within compiler passes. For example, if you have a pass that wants to generate a call to fprintf(), it will need to know what types to use for int and FILE * to get the typing right. This information also makes it possible to convert from Standard SUIF to C that can be compiled on any compiler for which the information in the CInformationBlock is correct.     concrete CInformationBlock : GlobalInformationBlock
      {
        LString  va_start_builtin default {LString("")};
        LString  va_start_old_builtin default {LString("")};
        LString  va_arg_builtin default {LString("")};
        LString  va_end_builtin default {LString("")};

These strings specify what names to use when generating C code for varargs statements and instructions in SUIF. If this information is not available the strings are empty.

        IntegerType * reference  signed_char_type optional;
        IntegerType * reference  unsigned_char_type optional;
        IntegerType * reference  char_type optional;
        IntegerType * reference  signed_short_type optional;
        IntegerType * reference  unsigned_short_type optional;
        IntegerType * reference  signed_int_type optional;
        IntegerType * reference  unsigned_int_type optional;
        IntegerType * reference  signed_long_type optional;
        IntegerType * reference  unsigned_long_type optional;
        IntegerType * reference  signed_long_long_type optional;
        IntegerType * reference  unsigned_long_long_type optional;
        FloatingPointType * reference  float_type optional;
        FloatingPointType * reference  double_type optional;
        FloatingPointType * reference  long_double_type optional;

The above are all SUIF type objects for all C integer and floating-point types. Note that ``signed long long'' and ``unsigned long long'' types are not part of ANSI C, but they are a commonly used extension. If those types are not available, the appropriate fields should be set to NULL.

        Type *  reference file_type optional;
        IntegerType * reference ptrdiff_t_type optional;
        IntegerType * reference size_t_type optional;
        Type *  reference va_list_type optional;
        bool  plain_bit_field_is_signed optional;

file_type Type corresponding to C's ``FILE'' type
ptrdiff_t_type Type corresponding to C's ``ptrdiff_t'' type
size_t_type Type corresponding to C's ``size_t'' type
va_list_type Type corresponding to C's ``va_list_type''
plain_bit_field_is_signed Determines whether or not a bit field with type int is considered signed or unsigned.


next up previous contents
Next: TargetInformationBlock Up: GlobalInformationBlock Previous: GlobalInformationBlock   Contents
SUIF Nightly Build
2000-08-14