Changeset 44acc72


Ignore:
Timestamp:
Jan 12, 2025, 8:46:48 PM (8 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
b0708ea
Parents:
cdd287b9
Message:

update conversion graph to correct and complete all relationships among basic types in gcc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/BasicTypes-gen.cpp

    rcdd287b9 r44acc72  
    4545        Float64xComplex,
    4646        Float80,
     47        LongDouble,
     48        LongDoubleComplex,
     49        uuFloat128,
    4750        Float128,
    4851        Float128Complex,
    49         uuFloat128,
    50         LongDouble,
    51         LongDoubleComplex,
    5252        Float128x,
    5353        Float128xComplex,
     
    113113        { DoubleComplex, "DoubleComplex", "DC", "double _Complex", "Cd", Floating, Float64xComplex, -1, -1, 12 },
    114114        { Float64x, "Float64x", "_FDX", "_Float64x", "DF64x_", Floating, Float80, Float64xComplex, -1, 13 },
    115         { Float64xComplex, "Float64xComplex", "_FDXC", "_Float64x _Complex", "CDF64x_", Floating, Float128Complex, -1, -1, 13 },
    116 
    117         { Float80, "Float80", "_F80", "__float80", "Dq", Floating, Float128, Float64xComplex, -1, 14 },
     115        { Float64xComplex, "Float64xComplex", "_FDXC", "_Float64x _Complex", "CDF64x_", Floating, LongDoubleComplex, -1, -1, 13 },
     116
     117        { Float80, "Float80", "_F80", "__float80", "Dq", Floating, LongDouble, LongDoubleComplex, -1, 14 },
    118118        // __float80 _Complex, no complex counterpart
    119 
    120         { Float128, "Float128", "_FLD", "_Float128", "DF128_", Floating, uuFloat128, Float128Complex, -1, 15 },
    121         { Float128Complex, "Float128Complex", "_FLDC", "_Float128 _Complex", "CDF128_", Floating, LongDoubleComplex, -1, -1, 15 },
    122         { uuFloat128, "uuFloat128", "__FLD", "__float128", "g", Floating, LongDouble, Float128Complex, -1, 16 },
     119        // gcc implements long double as float80 (12 bytes)
     120        { LongDouble, "LongDouble", "LD", "long double", "e", Floating, uuFloat128, LongDoubleComplex, -1, 15 },
     121        { LongDoubleComplex, "LongDoubleComplex", "LDC", "long double _Complex", "Ce", Floating, Float128Complex, -1, -1, 15 },
     122
     123        { uuFloat128, "uuFloat128", "__FLD", "__float128", "g", Floating, Float128, Float128Complex, -1, 16 },
    123124        // __float128 _Complex, no complex counterpart
    124         { LongDouble, "LongDouble", "LD", "long double", "e", Floating, Float128x, LongDoubleComplex, -1, 17 },
    125         { LongDoubleComplex, "LongDoubleComplex", "LDC", "long double _Complex", "Ce", Floating, Float128xComplex, -1, -1, 17 },
     125        { Float128, "Float128", "_FLD", "_Float128", "DF128_", Floating, Float128x, Float128Complex, -1, 17 },
     126        { Float128Complex, "Float128Complex", "_FLDC", "_Float128 _Complex", "CDF128_", Floating, Float128xComplex, -1, -1, 17 },
    126127
    127128        // may not be supported
     
    134135static Kind commonTypeMatrix[NUMBER_OF_BASIC_TYPES][NUMBER_OF_BASIC_TYPES];
    135136
     137// Fangren explain shortest cost algorithm.
    136138void generateCosts( int row ) {
    137139        bool seen[NUMBER_OF_BASIC_TYPES] = { false /*, ... */ };
     
    174176
    175177                // traverse children
     178                // Fangren explain "max"
    176179                int i = graph[col].left;
    177180                if ( i == -1 ) continue;                                                // leaf
     
    188191} // generateCosts
    189192
     193// Fangren explain this routine if you can.
    190194void generateCommonType( int row, int col ) {                   // row <= col
    191195        if ( costMatrix[row][col] >= 0 ) {
Note: See TracChangeset for help on using the changeset viewer.