Ignore:
Timestamp:
Feb 11, 2019, 9:37:43 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
3e7c323
Parents:
ba01b14
Message:

add signedness to cost model and _FloatNN

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/ManglerCommon.cc

    rba01b14 rcdcddfe1  
    1010// Created On       : Sun May 17 21:44:03 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jul 22 09:45:30 2017
    13 // Update Count     : 15
     12// Last Modified On : Fri Feb  8 09:02:18 2019
     13// Update Count     : 22
    1414//
    1515
     
    2222                namespace Encoding {
    2323                        const std::string manglePrefix = "_X";
    24 
     24#if 0
    2525                        const std::string basicTypes[] = {
    2626                                "b",  // Bool
     
    4343                                "Ce", // LongDoubleComplex
    4444                                // Note: imaginary is not an overloadable type in C++
    45                                 "If", // FloatImaginary
    46                                 "Id", // DoubleImaginary
    47                                 "Ie", // LongDoubleImaginary
     45                                // "If", // FloatImaginary
     46                                // "Id", // DoubleImaginary
     47                                // "Ie", // LongDoubleImaginary
    4848                                "n",  // SignedInt128
    4949                                "o",  // UnsignedInt128
     
    6363                                "Each basic type kind should have a corresponding mangler letter"
    6464                        );
     65#endif
     66                        // ****************************************************************************
     67                        // NOTES ON MANGLING:
     68                        // * Itanium spec says that Float80 encodes to "e" (like LongDouble), but the distinct lengths cause resolution problems.
     69                        // * Float128 is supposed to encode to "g", but I wanted it to mangle equal to LongDouble.
     70                        // * Mangling for non-standard complex types is by best guess
     71                        // * _FloatN is supposed to encode as "DF"N"_"; modified for same reason as above.
     72                        // * unused mangling identifiers:
     73                        //   - "z" ellipsis
     74                        //   - "Dd" IEEE 754r 64-bit decimal floating point (borrowed for _Float32x)
     75                        //   - "De" IEEE 754r 128-bit decimal floating point
     76                        //   - "Df" IEEE 754r 32-bit decimal floating point
     77                        //   - "Dh" IEEE 754r 16-bit decimal floating point (borrowed for _Float16)
     78                        //   - "DF"N"_" ISO/IEC TS 18661 N-bit binary floating point (_FloatN)
     79                        //   - "Di" char32_t
     80                        //   - "Ds" char16_t
     81                        // ****************************************************************************
     82                        const std::string basicTypes[BasicType::NUMBER_OF_BASIC_TYPES] = {
     83                                "b",        // _Bool
     84                                "c",        // Char
     85                                "a",        // SignedChar
     86                                "h",        // UnsignedChar
     87                                "s",        // ShortSignedInt
     88                                "t",        // ShortUnsignedInt
     89                                "i",        // SignedInt
     90                                "j",        // UnsignedInt
     91                                "l",        // LongSignedInt
     92                                "m",        // LongUnsignedInt
     93                                "x",        // LongLongSignedInt
     94                                "y",        // LongLongUnsignedInt
     95                                "n",        // SignedInt128
     96                                "o",        // UnsignedInt128
     97                                "DF16_",    // _Float16
     98                                "CDF16_",   // _Float16Complex
     99                                "DF32_",    // _Float32
     100                                "CDF32_",   // _Float32Complex
     101                                "f",        // Float
     102                                "Cf",       // FloatComplex
     103                                "DF32x_",   // _Float32x
     104                                "CDF32x_",  // _Float32xComplex
     105                                "DF64_",    // _Float64
     106                                "CDF64_",   // _Float64Complex
     107                                "d",        // Double
     108                                "Cd",       // DoubleComplex
     109                                "DF64x_",   // _Float64x
     110                                "CDF64x_",  // _Float64xComplex
     111                                "Dq",       // __float80
     112                                "DF128_",   // _Float128
     113                                "CDF128_",  // _Float128Complex
     114                                "g",        // __float128
     115                                "e",        // LongDouble
     116                                "Ce",       // LongDoubleComplex
     117                                "DF128x_",  // _Float128x
     118                                "CDF128x_", // _Float128xComplex
     119                        };
    65120
    66121                        const std::map<int, std::string> qualifiers = {
Note: See TracChangeset for help on using the changeset viewer.