%This is the header file for the release documentation for gardens point modula
%               version of July 1990 (kjg)
%		gpm-pc version Jun 1991
%		linux  version Feb 1994
% 		updated Nov 1994
% 		updated Apr 1995  (jl)

\documentstyle[11pt]{report}
\pagestyle{headings}
\textwidth=15.5cm
\textheight=22.5cm
\oddsidemargin=0cm
\topmargin=-0.2cm
%
% ==========================================================================
% =========================  VERBATIM CODE MACROS  =========================
% ==========================================================================
\newcommand{\opencodebox}[1]{\
\begin{figure}[ht]
\begin{center}
\begin{tabular}{| p{#1} |}
\hline}
% ==========================================================================
\newcommand{\closecodebox}[2]{\
\\
\hline
\end{tabular}
\end{center}
\caption{#1 \label{#2}}
\end{figure}
}
% ==========================================================================
\newcommand{\closebox}{\
\\
\hline
\end{tabular}
\end{center}
\end{figure}
}
% ==========================================================================

\title{GARDENS POINT MODULA\\
RELEASE NOTES}
\author{Native Code Linux Version\thanks{
Copyright \copyright 1994,1995 QUT Office of Commercial Services}}
\date{April 1995}
%
%
% the following macros produce ordinary and
% accept states for use in state diagrams
%

\newcommand{\gpm}{{\bf gpm}}
\newcommand{\unix}{{\em UNIX\/}}
\newcommand{\gpml}{{\bf gpm-linux}}
\newcommand{\gpms}{{\bf gpm-solaris}}
\newcommand{\gpmdj}{{\bf gpm-djgpp}}
\newcommand{\gpmemx}{{\bf gpm-emx}}
\newcommand{\emx}{{\bf emx}}
\newcommand{\goXX}{{\tt GO32}}
\newcommand{\djgpp}{{\tt DJGPP}}
\newcommand{\dcode}{{\em DCode\/}}

\newcommand{\mtwo}{\mbox{Modula-2}}
\newcommand{\otwo}{\mbox{Oberon-2}}
\newcommand{\intel}{{\em Intel-i386\/}}
\newcommand{\linux}{{\em Linux\/}}
\newcommand{\sparc}{{\em sparc\/}}
\newcommand{\solaris}{{\em Solaris\/}}
\newcommand{\axp}{{\em alpha\/}}
\newcommand{\stab}{{\tt stabs}}
\newcommand{\dbx}{{\tt dbx}}
\newcommand{\gdb}{{\tt gdb}}

\newcommand{\continue}{\hspace*{\fill} \mbox{\em ... Continued}}


\begin{document}

    \maketitle

    \tableofcontents

%
% CHAPTER
%
\chapter{Overview}
These notes contain information in three main areas\footnote{ These
notes are copyright \copyright 1990, 1991, 1992, 1994, 1995
Office of Commercial Services,
Queensland University of Technology. Permission is given for users to
copy portions of this manual for the convenience of users of the 
{\bf gardens point modula} compiler system, as described in the
license agreement. All other reproduction of
the material in these notes requires the written permission of the 
copyright holder}
\begin{itemize}
\item details specific to this release
\item general information on native code versions of \gpm
\item new and significantly changed library modules
\item files and organization of the release
\end{itemize}
These topics are dealt with in turn.

Modula has undergone a small but significant evolution 
since its inception. Some of these changes are in the process of 
standardization, as a result of the efforts of ISO working group
SC22/WG-13.

The \gpm\ design team are fully committed to implement the features of 
the proposed ISO draft standard. When that process is complete, the
{\em User Guide and Reference Manual} will include a brief but complete guide 
to the standardized language and its libraries. 
In the meantime, the current release of
\gpm\ already includes many of the stable features of the draft proposal. 

Since textbooks and reference manuals inevitably 
lag some years behind the evolution of such standards, these release 
notes contain a brief summary of the ways in which the language 
implemented by \gpm\ extends or differs from the various editions of 
Wirth's authoritative {\em Programming in Modula-2} (Springer-Verlag).
This work is by now almost universally known as `{\em PIM\/}' or as 
`{\em PIM2 edition i\/}' where $i$ is in [1 .. 4].

\section{About \gpm\ for Linux}
\gpml\ is a variant of the native code versions of \gpm.
It is made available in a form and under conditions which are in keeping 
with the non-commercial nature of most Linux installations.  However, it
is not freeware.  

The software is a licensed product and is copyright \copyright-1994
Office of Commercial Services, Queensland University of Technology.
It shares some technology with the commercial versions of \gpm\ which
are available as fully supported products.

\section{Implementation technology}
The compiler has a front-end which is based on the creation of an abstract
syntax tree representation of the current compilation unit, and all imported
objects. This technology is fast but rather memory hungry. You may expect
compilation speeds of about 36000 lines per minute on a slow 486 machine.

The compiler back-end, the code generator, is based on the intermediate
representation used for all the native-code backends for \gpm.
This representation is called \dcode, and is similar in general
form to the {\bf U-Code} representation. U-Code and \dcode\footnote{The
name \dcode\ is an abreviation for {\em Digraph-Code}, and is actually
a historical accident. The original design for the native code versions of
\gpm\ generated code by traversing a directed graph. Current versions
have moved common subexpression elimination to the compiler back-end,
and produce code by traversing a tree. There are no plans to rename
the intermediate form {\em T-Code}.} are instruction
sets for {\em abstract stack machines}, and are implemented by
a {\bf shadow stack automaton} within the compiler backend,
which transforms the codes into the native instructions of the 
target machine.

The \dcode\ format is language independent, and is parameterized for 
various target architectures.  The same file format is used for 
{\bf gardens point} compilers for other languages, including {\em Oberon-2}, 
and perhaps {\em Sather} later in '94--95.

\section{Installation must include {\tt gas} and {\tt gcc}}
\gpml\ produces {\em GNU}-format assembly language as its output. Some of the
libraries which are implemented in language $C$ expect to have the standard
{\tt libC} archives available.
\gpml\ thus requires the host system to have a linux version of {\tt gcc}
fully installed on it.  All code compiled by \gpml\ uses the same calling
conventions as {\tt gcc} for easy interfacing to foreign language modules.

\section{Installation requires a coprocessor or FP-emulator}
Some releases of linux do not include a floating point emulator, and
\gpml\ does not include a floating point emulator either.
If you do not have either a coprocessor or an emulator, \gpml\ will crash
when the runtime startup module \verb+gp_rts+ attempts to initialize the
coprocessor.  It is possible to configure \gpml\ so that it will work without 
any floating point support, but this option is not supported at this time.

\section{Level of code optimization}
\gpml\ is supplied with a code generator which produces very good quality
code without the use of global optimization techniques.  The code-generator 
has been tuned for optimal results on the 486 chip. 
The quality of the code exceeds that of comparable (that is, non-global 
optimizing) compilers for language $C$.  

Since the November 1994 release, \gpml\ incorporates a global optimizer and
graph-coloring register allocator. 
It takes longer to compile, but produces superior code.  The new release also 
does not use a stack frame pointer, unless there are open arrays in the 
procedure, or the {\bf --g} (debugging) command line flag has been invoked.  
This leads to faster code, but means that core dumps have much less detail.

\section{Level of support for \gdb}
This release has full support for the symbolic debugger \gdb.  This is the
standard source level debugger used with {\tt gcc}, and is commonly available
on linux hosts.  The details of using \gpm\ with \gdb\ are described in the
debugging appendix of the User Guide.

\section{How to get a copy of \gpml}
You may obtain the software by copying a distribution disk from another 
licensed user, or by anonymous ftp from \verb+ftp.fit.qut.edu.au:/pub/gpm_modula2+. 

We hope that you will find \gpm\ and Modula-2 useful. 
If you wish to use \gpml\ or any other version of \gpm\ for commercial
purposes, or you wish to have a supported version of the product,
you must purchase the software from a licenced reseller or from 
the Office of Commercial Services of QUT, at the address given below.  

Documentation is available by ftp, in Postscript and \TeX\/ from the
primary and mirror \gpm\ sites.  Complete documentation sets are also available 
in printed form from the Office of Commercial Services.

\subsubsection*{The amount}
The cost of a \gpml\ documentation set is~---
\par\indent US\$ 60 --- anywhere in the world
\par UK\pounds 40 --- anywhere in the world
\par DM 70 --- anywhere in the world
\par A\$ 60 --- in Australia and New Zealand only\\
Please make all cheques and money orders out to {\bf QUT Office of 
Commercial Services} and don't forget to mention that it is for 
{\bf gardens point modula for linux}.

\subsubsection*{Where to send it}
\begin{verbatim}
     Office of Commercial Services
     Queensland University of Technology
     BOX 2434, Brisbane Q4001
     AUSTRALIA
\end{verbatim}

\input{intouch}

\section{Who did what}
John Gough and John Hynd wrote the classic \gpm\ front-end. John Gough wrote
the native code front-end.  The i486 code generator is mostly the work of 
Jeff Ledermann. 

%
%
% CHAPTER
%
\include{genrel}
%
% CHAPTER
%
\include{native}
%
% CHAPTER
%
\include{dnative}
%
% CHAPTER
%
\include{genspec}
%
%
\include{versions}
%
%
\appendix
\include{gpm-djgpp}
\include{gpm-emx}

\end{document}
