home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / program / compiler / sozobon / scdoc20 / rel12.doc < prev    next >
Text File  |  1991-03-03  |  9KB  |  265 lines

  1.  
  2.  
  3.  
  4.       Sozobon C Compiler                                     Release 1.2
  5.  
  6.  
  7.  
  8.  
  9.                             The Sozobon C Compiler
  10.  
  11.                                  Release 1.2
  12.  
  13.                                      from
  14.  
  15.                                Sozobon, Limited
  16.  
  17.  
  18.                                  Tony Andrews
  19.                                  Johann Ruegg
  20.                                   Joe Treat
  21.  
  22.                                    8/28/89
  23.  
  24.       1. Introduction
  25.  
  26.       This document describes release 1.2 of the Sozobon C compiler.
  27.       This is a (relatively) minor update to the first release of the
  28.       compiler made in October, 1988.  Version 1.2 contains new versions
  29.       of the compiler and optimizer only. This is basically a preview of
  30.       the improved compiler features and code generation that will be
  31.       coming in the next major release. By releasing these pieces early
  32.       we can get your bug reports and incorporate fixes before making a
  33.       major release. The rest of this document will briefly describe the
  34.       changes that have been made.
  35.  
  36.       2. Compiler Changes
  37.  
  38.       2.1 Preprocessor Changes
  39.  
  40.       Many of the compiler changes involve enhancements to the
  41.       preprocessor. The builtin macros "__FILE__" and "__LINE__" are now
  42.       supported and are replaced by the current source file name and
  43.       line number respectively.
  44.  
  45.       The "defined" directive is now supported in "#if" statements, as
  46.       in:
  47.  
  48.              #if defined(VAX) || defined(SOZOBON)
  49.                 stuff
  50.              #endif
  51.  
  52.       Note that the parentheses above are required.
  53.  
  54.       Another change is that in an "#if" statement, undefined macros
  55.       expand to zero. This makes it possible to write code like:
  56.  
  57.              #if VAX || SOZOBON
  58.                 stuff
  59.              #endif
  60.  
  61.  
  62.  
  63.                                     - 1 -
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.       Sozobon C Compiler                                     Release 1.2
  71.  
  72.  
  73.       2.2 Code Generation
  74.  
  75.       Several bugs have been fixed in this area and other general
  76.       improvements have been made. The compiler also now places comments
  77.       in the generated code describing the size and location of function
  78.       parameters and local variables. These comments may be useful to
  79.       assembly hackers, but are provided primarily to enable the
  80.       optimizer to do some new things (described later). The comments
  81.       have one of the following two forms:
  82.  
  83.              ;var  size  offset    name
  84.              ;reg  size  register  name
  85.  
  86.       The first form describes a local or parameter on the stack. The
  87.       second form describes a register variable.
  88.  
  89.       2.3 Command Line
  90.  
  91.       The command line options are essentially the same, which permits
  92.       the use of the current 'cc' command. The only change is that when
  93.       running 'hcc' directly, multiple source file names may be given on
  94.       the command line.
  95.  
  96.  
  97.       3. Optimizer Changes
  98.  
  99.       Many new peephole optimizations have been added, but the biggest
  100.       change to the optimizer is the addition of a feature that I call
  101.       "registerizing". The basic idea is to identify highly referenced
  102.       parameters and local variables and automatically turn them into
  103.       register variables. This is fairly tricky, and doing it safely
  104.       requires some help from the compiler. This is the reason for the
  105.       "hints" described above. The optimizer looks at these hints and
  106.       uses them to help decide which variables can and should be placed
  107.       in registers.
  108.  
  109.       If you make careful use of register declarations in your source
  110.       code, you may not notice this feature much. It helps most with
  111.       code that doesn't make good use of register variables. Partly due
  112.       to limitations of the current implementation, you can generally do
  113.       better if you place the register declarations in your code
  114.       yourself. The reasons for this are:
  115.  
  116.         1. The optimizer only uses D registers for the register which
  117.         isn't as good for pointer variables (although it works just
  118.         fine).
  119.  
  120.         2. The optimizer decides what to registerize based on the number
  121.         of references it finds to a variable. This optimizes primarily
  122.         for space, although time is improved as well, of course. To
  123.         optimize for time, the optimizer would need to detect loops in
  124.         the assembly code and weight references within loops by some
  125.         reasonable amount. This hasn't been done yet.
  126.  
  127.  
  128.  
  129.                                     - 2 -
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.       Sozobon C Compiler                                     Release 1.2
  137.  
  138.  
  139.       In spite of these comments, the optimizer does pretty well, and
  140.       registerizing improves most code quite a bit. In fact, for the
  141.       dhrystone benchmark, the Sozobon compiler performs better with no
  142.       register declarations in the source than with the register
  143.       declarations enabled.
  144.  
  145.       Registerizing can be disabled on the optimizer command line with
  146.       the "-r" option. Otherwise, the optimizer is compatible with the
  147.       old version and can be used with the current 'cc' command.
  148.  
  149.  
  150.       4. Distribution
  151.  
  152.       The Sozobon C compiler is distributed in both binary and source
  153.       code form. The standard distribution contains both. The programs
  154.       and code are copyrighted, but may be freely distributed, subject
  155.       to the following restrictions:
  156.  
  157.              1. No charge may be made other than reasonable charges for
  158.                 reproduction.
  159.  
  160.              2. Modified versions must be clearly marked as such.
  161.  
  162.              3. The authors are not responsible for any harmful
  163.                 consequences of using this software, even if they result
  164.                 from defects in it.
  165.  
  166.       This software is neither shareware nor public domain. While we
  167.       don't ask for contributions, we also want to insure that our work
  168.       continues to be freely available to everyone. By not putting our
  169.       work in the public domain, we can prevent others from taking our
  170.       software and charging you for it. The term "freeware" best
  171.       describes our approach to distribution.
  172.  
  173.       4.2 Getting an Official Release
  174.  
  175.       If you are unable to locate a complete copy of the compiler, a
  176.       full release of the compiler can be ordered directly from Sozobon,
  177.       Limited by sending $10 US ($12 from overseas) to:
  178.  
  179.              Tony Andrews
  180.              4704 Berkshire Court
  181.              Boulder, CO 80301
  182.              USA
  183.  
  184.       The release currently includes all programs and sources needed.
  185.       The exact contents continue to be upgraded continually.
  186.       Be sure to include your return address, and specify single or
  187.       double sided disks. Checks should be payable to "Tony Andrews". If
  188.       you can find a copy of the compiler through other means, there is
  189.       absolutely no need to send us any money. The compiler is free. In
  190.       fact, we strongly encourage anyone who receives a copy of the
  191.       compiler to pass it along to others via bulletin boards, online
  192.       services, and user groups.
  193.  
  194.  
  195.                                     - 3 -
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.       Sozobon C Compiler                                     Release 1.2
  203.  
  204.  
  205.  
  206.  
  207.       5. Coming Attractions
  208.  
  209.       A new major release of the compiler is in the works and should go
  210.       into beta testing sometime in the fall. Some of the features that
  211.       will be coming are:
  212.  
  213.         * Support for Minix as well as TOS
  214.  
  215.         * Long external names (the current limit is 7)
  216.  
  217.         * Less memory consumption, in general, by the compiler passes
  218.  
  219.         * Runtime profiling and report generation (call counts only)
  220.  
  221.         * Better placement of temporary files
  222.  
  223.         * Support for either 16 or 32 bit int's
  224.  
  225.         * Improved floating point support (c/o David Brooks)
  226.  
  227.         * GEM bindings (c/o Ian Lepore)
  228.  
  229.  
  230.       6. Support
  231.  
  232.       In this release, we're especially interested in receiving bug
  233.       reports. There are many changes to the compiler and optimizer, so
  234.       we'd like to use this release to shake out any bugs before we put
  235.       out our major release later in the year.
  236.  
  237.       To help us get more accurate bug reports we've included a
  238.       reporting form within this release. To send us a bug, simply edit
  239.       a copy of the bug report form and send it to us by email or by
  240.       regular means. We're reachable electronically at:
  241.  
  242.           UUCP: onecom!raid5!tony
  243.           Citadel: tony@FWBBS
  244.  
  245.       Send regular mail to:
  246.  
  247.           Tony Andrews
  248.           4704 Berkshire Court
  249.           Boulder, CO 80301
  250.           USA
  251.  
  252.       While we can't guarantee a personal response to each bug, we DO
  253.       appreciate your reports.  If you do want a written response, you
  254.       are more likely to get it if you include a stamped self-addressed
  255.       envelope; remember that you are getting the compiler for free!
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                     - 4 -
  262.  
  263.  
  264.  
  265.