CERN, European Organization for Nuclear Research
1211 Geneva 23
Switzerland

J.D. Blake
blake@cernvax.cern.ch
1991/2/25


                Modification history of GCC for OS-9/68000
                ------------------------------------------


Based on gcc  1.37.1,  which  may  be  obtained  from  prep.ai.mit.edu  by
anonymous FTP; look in the directory pub/gnu.

90/05/27
Atsushi Seyama's port of gcc to OS-9/68000 is posted in comp.sources.misc,
with archive name gcc-os9_68k.

90/06/12
Martin Husemann posts patches in comp.os.os9.  Some patches are  to  avoid
bugs  in  Microware's  cc.  Others  (by Kei Thomsen) correct errors in the
code generated for a 68020 with 68881 floating point coprocessor.

90/07/10
Unpack source code of gcc  1.37.1.  Change  "-"  in  file  names  to  "_".
Modify  Seyama's diff file to distinguish between host-dependent (OSK) and
target-dependent (OSK_TARGET) features of OS-9/68000.  Apply the  modified
diff file to the gcc source code, using patch.

90/07/17
Create   Makefile-osk-cross   and   Makefile-osk-native   from   Makefile.
Makefile-osk-cross builds the cross compiler gccos9; it expects file names
with "-".  Makefile-osk-native uses gccos9 to build the  first  OS-9/68000
native gcc; it expects file names with "_".

90/10/26
Apply Kei Thomsen's corrections to m68osk.md  and  tm-osk.md.  Edit  movhi
instruction  definition  in m68osk.md to eliminate missing else after test
for clr.w case.  Change LIB_SPEC in  tm-osk.h  to  select  correct  system
libraries  for  68000  (default), for 68020 (-m68020 or -mc68020), and for
68881 (-m68881).  Add CPP_SPEC to define __HAVE_68881__ for -m68881.  Move
definitions of HAVE_SEPARATE_DATA_AREA and OSK_TARGET to tm-osk.h.

90/11/01
Modify treatment of floating point constants, to that they  are  converted
from   host   to  target  format  when  cross  compiling.   The  functions
conv_ieee32()    and    conv_ieee64()    do     the     conversion;     if
HOST_IEEE_FLOATING_POINT   is   defined  (as  it  is  in  xm-osk.h),  each
conversion is trivial.  In the non-trivial case, it is assumed  that  host
double  precision floating point accuracy is sufficient to evaluate target
floating point constants, and to  perform  constant  folding.  Correct  an
error  in  FUNCTION_PROLOGUE  (bad  test  of  16-bit  frame size).  Change
CONST_COSTS  to  consider  integers  in  [-128..127]  as   cheap.   Define
TARGET_VERSION as " (OS-9/68000)".

90/11/06
Provide standard header files  math.h  and  math881.h,  to  allow  gcc  to
generate  in-line  68881  code for mathematical functions other than pow()
and atan2().  The files are based on Matthew Self's work;  see  commentary
in the two files.

90/11/16
Make all relevant features of the OS-9/68000  native  GNU  C  preprocessor
cccp  available  to  users  of  the  cross C preprocessor gccos9-cpp.  The
following modifications were made to cccp.c:
- Adjust default include directories to match reality.
- Allow CDEF, GCCDEF and GPPDEF environment variables to specify  multiple
  directories  separated by colons.  CDEF is for Microware's cc, GCCDEF is
  for gcc, GPPDEF is for g++.
- Make available "-\?", "-K" and related options when cross compiling.
- Disable OSK-specific code for Kanji characters and  for  skipping  white
  space encountered inside a character string. (Precautionary measures:  I
  have found no need for this code and it lies in the heart of cccp.)
- Disable Microware-like (-K) output when dependency output (-M or -MM) is
  selected.
Known weakness: "gccos9-cpp -K  -g"  generates  a  dummy  date  and  time,
instead  of  the  date  and  time  appropriate  to  the  source file being
processed; see getdate() at the end of cccp.c.

90/11/26
Make all relevant features of the OS-9/68000 native  gcc  compiler  driver
available  to  users  of  the gccos9 cross compiler, by merging gcc.c with
gccosk.c to produce a new gccosk.c which can be used as a normal gcc, as a
cross  compiler  for  OS-9/68000, and as a native compiler for OS-9/68000.
This version of gccosk.c:
- distinguishes between host-dependent and  target-dependent  features  of
  OS-9/68000;
- uses lists of prefixes when searching for executable  programs  and  for
  library files;
- allows multiple directories (separated by colons) to be specified in the
  GCC_EXEC_PREFIX and GCCLIB environment variables;
- and contains an untested rule for building C++ programs for OS-9/68000.
The default exec file and library file  prefixes  have  been  adjusted  to
match reality.  Explicit declarations have been added to reduce the number
of warnings when gccosk.c is compiled by "gcc -Wall".

90/11/27
First announcement of gcc (cross and native) to CERN users of OS-9/68000.

[ 90/12/05                                                               ]
[ Attempt to disallow addresses of  the  form  "symbol+offset(A6)"  when ]
[ offset  is  negative.   This  modification  (to  osk_data_addr_p()  in ]
[ out-osk.c) does not work, as  it  upsets  the  working  of  the  movsi ]
[ instruction definition in m68osk.md, causing an absolute address to be ]
[ generated where we used to get "lea symbol+offset(a6),a0".             ]

90/12/07
Generate code suitable for large programs when compiling for a 68020:  use
bsr.l  to call a function; put data in remote vsect; use "(nn,pc)" instead
of "nn(pc)" for PC-relative addresses.

90/12/14
Allow short 68020 programs to use short addressing  for  data;  use  movem
instruction  to  move a double precision argument or result between memory
and a register pair.  Large 68020 programs should now be compiled with the
-mremote option.

91/02/13
Modify Makefile.osk, Makefile881.osk and Makefile-os9-native  so  gnulib.l
is rebuilt at every stage, and so that the version of gnulib.l prepared by
cross compilation matches that prepared on an OS-9/68000  system.  Prepare
source and executable code for export by FTP:
- Add documentation files, to help the installer of gcc.
- Create Postscript versions of gcc and cpp manuals.
- Test by rebuilding everything, under VAX Ultrix and under OS-9/68000.

91/02/20
Correct error in extendsfdf2  instruction  definition  for  68881  target.
Symptom: "fmove.s offset,fp1" instead of "fmove.s offset(a6),fp1".

91/02/25
Link gcc, cccp and cc1 with cio.l from C version 3.1, so that they may run
under OS-9/68000 version 2.3 or 2.4.  Symptom: "cio trap handler mismatch"
when running under version 2.3.  Change Makefile881.osk so  that  gcc  for
68020 with 68881 does not use CIO traps.
