                Optimizer v0.0.9f
                =================

What is Optimizer:
==================
Optimizer optimizes GCC/G++ assembler code to run
with Pentium or Pentium Pro instructions with or
without MMX instructions. The result is that the
program runs faster.

This is done by translating the GCC/G++
assembler file which is in GAS format to either a
new GAS file or a NASM file. 

That is because GAS/NASM can handle Pentium, Pentium Pro
and MMX instructions. GAS can also handle these 
instructions, but GCC/G++ doesn't use them yet when
the output file is generated.

Version 2.8.x of GCC/G++ will take a use of these
instructions and therefore will this program be 
obsolete when this version is released. However
the program can still be used as a translater to 
NASM code, which should make it more easy to port
programs in assembler-form.

How to compile:
===============
Compile optimizer and cvtmake with:

  make all
  make install

The binaries will be placed in /usr/local/bin
The man-pages will be placed in /usr/local/man/man1
You'll need: g++, bison and flex to compile these programs.

Change the DESTDIR variable in the main Makefile, if you want
to place files somewhere else.

Requirements:
=============

Optimizer is front-end to "as" in binutils-2.8.x or NASM-0.96. 
Always use the latetest version of these program -> fewer bugs and 
more features.

Commandline options for Optimizer:
==================================
Usage: optimizer [-g|-n] [-I486|-P5|-P5MMX|-P6|-PII] <inputfile>
       -g     : GAS format output (Default)
       -n     : NASM format output

       -I486  : No optimization
       -P5    : Optimize to Pentium (Default)
       -P5MMX : Optimize to Pentium (Default)
       -P6    : Optimize to Pentium Pro
       -PII   : Optimize to Pentium II

       where <inputfile> is : 'filename' or 'filename.s'

This release of optimizer is a pre-0.1 release ! 
If I don't find any bugs and there is no bug-reports, this
sourcecode is copied to version 0.1

WARNING: The NASM part of this program isn't fully debugged yet !
         (In other words: Not all programs may work, but report
          any bugs you may find; see bugs section)

Commandline options for cvtmake:
================================
Usage: cvtmake [-g|-n] [-I486|-P5|-P5MMX|-P6|-PII] <inputfile>
       -g      : Use GNU as (Default)
       -n      : Use NASM

       -I486   : No optimization in Makefile
       -P5     : Convert Makefile to use Pentium
       -P5MMX  : Convert Makefile to use Pentium MMX
       -P6     : Convert Makefile to use Pentium Pro
       -PII    : Convert Makefile to use Pentium II

       where <inputfile> is: 'Makefile'

WARNING:
cvtmake is only a beta version, so it can do anything
yet. Please waite for a future release. Just do a manual
change of the Makefile's for now.

Example on use of Optimizer:
============================
When Optimizer isn't used: 
   gcc -m486 -O2 -c file.c -o file.o // 486 optimized .o file

When Optimizer is used (f.ex.):
   gcc -m486 -O2 -S -c file.c        // 486 optimized .s file
   optimizer -n -P6 file.s           // Pentium Pro optimized .asm file
   nasm -f elf file.asm              // Pentium Pro optimized .o file

Note: 	In this current version of optimizer there is no optimizations yet.
	The optimizations will apear from version 0.19 of optimizer and up.

Optimizer's author: 
===================
  Jesper Pedersen
  jews@imada.ou.dk
  http://www.imada.ou.dk/~jews/

"finger" for more information or check website.

Primary site for Optimizer:
===========================
  http://www.imada.ou.dk/~jews/optimizer/

Secondary site for Optimizer:
=============================
  ftp://sunsite.unc.edu/pub/Linux/devel/lang/assemblers/

and sunsite mirrors.

Related projects:
=================
  o Pentium/Pentium Pro GCC     http://www.goof.com/pcg/
  o GCC/G++ version 2.8.x       

Disclaimer:
===========
This program is based heavily on NASM and AS.

Bugs:
=====
  These programs isn't finished (I hope that it will be sometime),
  so it may contains bugs. 

  Please report any bugs if you find any to the author or send
  a patch file. Any help will be great. Please send the file which
  optimizer can't handle.

  If you have any comments/ideas feel free to mail me.

Concluding remarks:
===================
  Hope that you find these programs useful !
  Jesper Pedersen, 09 Feb. 1997

  These programs are released under the GNU Public License (GPL).

  Please contact me, if you use these programs to compile a commercial program.
