hll_cv_types.txt

来自「开放源码的编译器open watcom 1.6.0版的源代码」· 文本 代码 · 共 918 行 · 第 1/3 页

TXT
918
字号
        |        |    |qual|set |    |<-
        |        |0x5C|    |    |    |
         -------- ---- ---- ---- ----


 Note:

  1. In Microsoft format, a base type of 0x7C can be either 16 bits or
     32 bits depending on whether the subsection is Microsoft 16 bit or
     32 bit.

1------------------------------------------------------------------------------

 TypeDefs/UserDefs
 -----------------

  Microsoft 16/32 bit.
  -------------------

      T          I         S
     ---------- --------- ----------
    | Trec     | type    | typedef  |
    | 0x5D     | index   | name     |
     ---------- --------- ----------


    1     2        1    1    2        1     1     *
    ---- -------- ---- ---- -------- ----- ----- ---------//---
   |rec |rec len |type|FID |type    |FID  |name |typedef       |
   |id  |        |    |indx|index   |strng|len  |name          |
   |0x01|        |0x5D|0x83|        |0x82 |     |              |
    ---- -------- ---- ---- -------- ---------------------//---


  IBM HL01,HL02.
  -------------
    1     2        1   1     1    2        1     1     *
    ---- -------- ---- ---- ---- -------- ----- ----- ---------//---
   |rec |rec len |type|type|FID |type    |FID  |name |typedef       |
   |id  |        |    |qual|indx|index   |strng|len  |name          |
   |0x01|        |0x5D|    |0x83|        |0x82 |     |              |
    ---- -------- ---  ---- ---- -------- ----- ---------------//---


  IBM HL03.
  --------
          2        1   1     1    2        1     1    *
         -------- ---- ---- ---- -------- ----- ---- ---------//---
        |rec len |type|type|FID |type    |FID  |name|typedef       |
        |        |    |qual|indx|index   |strng|len |name          |
        |        |0x5D|    |0x83|        |0x82 |    |              |
         -------- ---  ---- ---- -------- ----- --------------//---


   Notes:

    1. Microsoft compilers do not emit typedef records; however, IBM uses
       the typedef record to support the PL/X based variables.

    2. All type index fields for IBM or Microsoft may be primitive
       or complex numbers.


1------------------------------------------------------------------------------

 Pointers.
 --------

  Microsoft 16/32 bit.
  -------------------
      T          N         I          I
     ---------- --------- ---------- ----------
    | Trec     | Model   | type     | ptr      |
    | 0x7A     |         | index    | name     |
     ---------- --------- ---------- ----------

                            -------------------------------------------------  NEAR 0x74
    1     2        1    1  |       2        1     1     *                      FAR  0x73
    ---- -------- ---- ----- ---- -------- ----- ----- ---------//---          HUGE 0x5E
   |rec |rec len |type|Model|FID |type    |FID  |name |pointer       |
   |id  |        |    |     |indx|index   |strng|len  |name          |
   |0x01|        |0x7A|     |0x83|        |0x82 |     |              |
    ---- -------- ---- ---------- -------- ----- ---------------//---

  IBM HL01,HL02.
  -------------
    1     2        1    1    1     2        1     1     *
    ---- -------- ---- ----- ---- -------- ----- ----- ---------//---
   |rec |rec len |type|type |FID |type    |FID  |name |pointer       |
   |id  |        |    |qual |indx|index   |strng|len  |name          |
   |0x01|        |0x7A|     |0x83|        |0x82 |     |              |
    ---- -------- ---- ---------- -------- ----- ---------------//---
                       |                  |                          |
                       |                  |<----optional------------>|
                       |
                        ------------------------------------------------------------
                                                                                    |
                                                                                    |
  IBM HL03.                                                                         |
  --------                                                                          |
          2        1    1    1     2        1     1     *                           |
         -------- ---- ----- ---- -------- ----- ----- ---------//---               |
        |rec len |type|type |FID |type    |FID  |name |pointer       |              |
        |        |    |qual |indx|index   |strng|len  |name          |              |
        |        |0x7A|     |0x83|        |0x82 |     |              |              |
         -------- ---- ---------- -------- ----- ---------------//---               |
                       |                                                            |    Pointer Model
                       |                                                            |    ------------
                        ---------------------------------------------------------------> 2 1 0
                                                                                    |    x x 1 - 32 bit
                                                                                    |    x 0 x - near
                                                                                    |    x 1 x - far
1------------------------------------------------------------------------------

 Enums.
 -----

  Microsoft 16/32 bit.
  -------------------

      T          N         N         S         I         SN        SN
     ---------- --------- --------- --------- --------- --------- ---------
    | Trec     | Length  | base    | name    | name lst| lbnd    | ubnd    |
    |          | in bits | type    |         | index   |         |         |
     ---------- --------- --------- --------- --------- --------- ---------

    1     2        1    1    1    1     1    *             1     2        @    @
    ---- -------- ---- ---- ---- ----- ---- ---------//--- ---- -------- ---- ----
   |rec |rec len |type|len |base|FID  |name|enum tag name |FID |name lst|lbnd|ubnd|
   |id  |        |    |    |type|strng|len |              |indx|index   |    |    |
   |0x01|        |0x7B|    |    |0x82 |    |              |0x83|        |    |    |
    ---- -------- ---- ---- ---- ----- --------------//--- ---- -------- ---- ----
                         |    |                                            |    |
    numeric leaf of the -      ---- 0x7C - unsigned   numeric leaf of the -      - numeric leaf of the
    size of the scalar              0x7D - signed     minimum value that           maximum value that
    in bits. This will be:          0x6F - character  the scalar is
    0x08 -  8 bits
    0x10 - 16 bits
    0x20 - 32 bits                                                                 to take.



  IBM HL01,HL02. (The doc shows the name following the data type; however, the dumper shows it like this:)
  -------------
    1     2        1    1    1     2       1     2        @    @    1     1    *
    ---- -------- ---- ----- ---- -------- ---- -------- ---- ---- ----- ---- ---------//---
   |rec |rec len |type|type |FID |data    |FID |member  |lbnd|ubnd|FID  |name|enum tag name |
   |id  |        |    |qual |indx|type    |indx|list    |    |    |strng|len |              |
   |0x01|        |0x7B|     |0x83|        |0x83|index   |    |    |0x82 |    |              |
    ---- -------- ---- ---------- -------- ---- -------- ---- ---- ----- --------------//---
                                   |                       |    |
       One of the primitive -------   numeric leaf of the -      - numeric leaf of the -
       data types.                    minimum value that           maximum value that
                                      the scalar is allowed        the scalar is allowed
                                      to take.                     to take.

  IBM HL03.
  --------
          2        1    1    1     2       1     2        @    @    1     1    *
         -------- ---- ----- ---- -------- ---- -------- ---- ---- ----- ---- ---------//---
        |rec len |type|type |FID |data    |FID |member  |lbnd|ubnd|FID  |name|enum tag name |
        |        |    |qual |indx|type    |indx|list    |    |    |strng|len |              |
        |        |0x7B|     |0x83|        |0x83|index   |    |    |0x82 |    |              |
         -------- ---- ---------- -------- ---- -------- ---- ---- ----- --------------//---
                                   |                       |    |
       One of the primitive -------   numeric leaf of the -      - numeric leaf of the -
       data types.                    minimum value that           maximum value that
                                      the scalar is allowed        the scalar is allowed
                                      to take.                     to take.

  Notes:

   1. We will map the Microsoft "base type" field to "data type" by converting
      the Microsoft designators to primitive types.

   2. The IBM format supports a Scalar( 0x51 ) type in addition an enum type.
      The IBM enum type is the same as the Microsoft Scalar record.


1------------------------------------------------------------------------------

 Scalars ( simplified form of the enum record.)
 -------

  Microsoft 16/32 bit.
  -------------------

      T          N         N
     ---------- --------- ---------
    | Trec     | Length  | base    |
    |          | in bits | type    |
     ---------- --------- ---------

    1     2        1    1    1
    ---- -------- ---- ---- ----
   |rec |rec len |type|len |base|
   |id  |        |    |    |type|
   |0x01|        |0x7B|    |    |
    ---- -------- ---- ---- ----
                         |    |
    numeric leaf of the -      ---- 0x7C - unsigned
    size of the scalar              0x7D - signed
    in bits. This should            0x6F - character
    always be 0x10 for 16
    bit and 0x20 for 32 bit.


    IBM HL01,HL02.
    -------------                                                                                ---------
                            ----------------------------------------------------------------------3 2 1 0
                          |                                                                       --------
                          |                                                                       x x x 0 - unpacked
    1     2        1    1 |  1     2       1     1        1                                       x x x 1 - packed
    ---- -------- ---- ----- ---- -------- ---- -------- -----                                    x x 0 x - real
   |rec |rec len |type|type |FID |data    |FID |precis- |scale|                                   x x 1 x - complex
   |id  |        |    |qual |indx|type    |prec|ion     |factr|                                   x 0 x x - fixed
   |0x01|        |0x51|     |0x83|        |0x8C|        |     |                                   x 1 x x - float
    ---- -------- ---- ---------- -------- ---- -------- -----                                    0 x x x - binary
                                   |      |<----ignore these->|                                   1 x x x - decimal
       One of the primitive -------             fields. Do
       data types.                              not map.


  IBM HL03.
  --------
                            ----------------------------------------------------------------------3 2 1 0
                          |                                                                       --------
                          |                                                                       x x x 0 - unpacked
          2        1    1 |  1     2       1     1        1                                         x x x 1 - packed
         -------- ---- ----- ---- -------- ---- -------- -----                                      x x 0 x - real
        |rec len |type|type |FID |data    |FID |precis- |scale|                                     x x 1 x - complex
        |        |    |qual |indx|type    |prec|ion     |factr|                                     x 0 x x - fixed
        |        |0x51|     |0x83|        |0x8C|        |     |                                     x 1 x x - float
         -------- ---- ---------- -------- ---- -------- -----                                      0 x x x - binary
                                   |      |<----ignore these->|                                     1 x x x - decimal
       One of the primitive -------             fields. Do
       data types.                              not map.


1------------------------------------------------------------------------------

 Arrays.
 ------

  Microsoft 16/32 bit.
  -------------------
      T          UN        I         I         S
     ---------- --------- --------- --------- ---------
    | Trec     | Size in | Element | Indexing| Array   |<-- These last two fields are optional
    | 0x78     | bits    | Type    | Method  | Name    |    and probably won't be there.
     ---------- --------- --------- --------- ---------


    1     2        1    @   1     2       1     2       1     1     *
    ---- -------- ---- ---- ---- -------- ---- -------- ---- ----- ---------//---
   |rec |rec len |type|len |FID |element |FID |indexing|FID |name |name          |
   |id  |        |    |    |indx|type    |indx|method  |indx|len  |              |
   |0x01|        |0x78|    |0x83|        |0x83|        |0x82|     |              |
    ---- -------- ---- ---- ---- -------- ---- -------- ---- ----- ---------//---
                         |         |       optional.
                         |         |     |<------------------------------------->|
    numeric leaf of the -          |
    size of the array              |       We do not see these in a dump of
    in bits.                       |       the Microsoft format.
                                   |
                                     ---This is a primitive type or an index of a complex type.

  IBM HL01,HL02.
  -------------
    1     2        1    1    4                   1     2       1     2       1     1     *
    ---- -------- ---- ---- -------------------- ---- -------- ---- -------- ---- ----- ---------//---
   |rec |rec len |type|type|array size in bytes |FID |bounds  |FID |elem    |FID |name |array name    |
   |id  |        |    |qual|                    |indx|index   |indx|type    |indx|len  |              |
   |0x01|        |0x78|    |                    |0x83|        |0x83|        |0x82|     |              |
    ---- -------- ---- ---- -------------------- ---- -------- ---- -------- ---- ----- ---------//---
                        |    |                         |             |
                        |    |                         |              ---This is a primitive type or an index of a complex type.
                        |    |                         |
                        |    |                          --This is the type index for a record that
                        |    |                            contains the array bounds.
                        |    |
                        |      --- note that this number is not a numeric leaf
                        |          and it should be.
                        |
  -----                 |
  2 1 0 <-bit ----------
  -----
  x x 0 - row major
  x x 1 - column major
  x 0 x - unpacked
  x 1 x - packed
  0 x x - no descriptor required
  1 x x - descriptor provided


  IBM HL03.
  --------
          2        1    1    4                   1     2       1     2       1     1     *
         -------- ---- ---- -------------------- ---- -------- ---- -------- ---- ----- ---------//---
        |rec len |type|type|array size in bytes |FID |bounds  |FID |elem    |FID |name |array name    |
        |        |    |qual|                    |indx|index   |indx|type    |indx|len  |              |
        |        |0x78|    |                    |0x83|        |0x83|        |0x82|     |              |
         -------- ---- ---- -------------------- ---- -------- ---- -------- ---- ----- ---------//---
                        |    |                         |             |
                        |    |                         |              ---This is a primitive type or an index of a complex type.
                        |    |                         |

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?