------------------------------------------------
-- Title   : The 'instrmix' MachSUIF pass     --
-- Author  : Nikolaos Kavvadias               --
-- Contact : nkavv@skiathos.physics.auth.gr   --
-- Date    : 18 July 2004                     --
-- Version : 1.0 (initial release)            --
------------------------------------------------


INTRODUCTION

'instrmix' is an analysis pass that generates the SUIFvm (SUIF virtual machine)
instruction mix for a given input source file. A textual report is written to
file "instr_mix_report.rpt".

Instructions are categorized as follows:

arithmetic : ADD, SUB, NEG, ABS, MIN, MAX, MOV, LDC, LDA;
logical    : NOT, AND, IOR, XOR;
comparison : SEQ, SNE, SL, SLE; (set instructions)
shift      : ASR, LSL, LSR, ROT;
division   : DIV, REM, MOD;
multiply   : MUL;
load       : LOD;
store      : STR;
ubr        : JMP, JMPI; (unconditional branch/jump)
cbr        : BFALSE, BTRUE, BEQ, BNE, BGE, BGT, BLE, BLT; (cond. branch/jump)
call       : CAL;
return     : RET;
other      : any instruction not fitting into the previous categories

This pass works for the SUIF virtual machine instruction set (SUIFvm).
Also, the 'instrmix' pass has been tested with MachSUIF 2.02.07.15.


INSTALLATION

Unpack the instrmix archive wherever you like, e.g. in $MACHSUIFHOME/instrmix.
You don't need to modify anything in the Makefile, if you have a working
MachSUIF 2 installation.

The program binary (do_instrmix) will be installed at $NCIHOME/bin and the
shared library (libinstrmix.so) at $NCIHOME/solib, where NCIHOME is the SUIF 2
top-level directory.


USAGE DETAILS

The pass accepts an input file in CFG form to operate. You don't have to define
any output files since their naming convention has been hardwired.

Usage synopsys:
%do_instrmix test.cfg


NOTES

Feel free to contact me at <nkavv@skiathos.physics.auth.gr> for any discussion
on the 'instrmix' pass or the usage of MachSUIF in general.

