Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

as(1)

btou(1)

uopt(1)

ugen(1)  —  Commands

Digital

NAME

ugen − Assembler code generator from U-code

SYNOPSIS

ugen ucode_file [ −l list_file −t sym_file −e err_file −temp temp_file −regncount" −fregncount" ] [ −dump −O0 −ufsa −ufsm −FP −L −nooffsetopt −notailopt −EL −EB −trapuv −excpt −align32 −w −w2 ]

DESCRIPTION

ugen, the assembly code generator, reads the input binary ucode file, optimized or un-optimized, performs some local optimizations and outputs the binary assembler file.  Optionally ugen generates an ASCII assembler file.  By convention, assembler files have the extension .G for binary assembler and .s for symbolic assembly language source programs, but ugen does not force this convention on the user.  ugen generates code in four passes: first, it builds a tree from ucode, then it translates it into a simpler tree, performs label optimizations and finaly, evaluates assembler code.  ugen accepts the several types of arguments:

Arguments whose names end with ‘.B’ are assumed to be unoptimized ucode files.  Arguments whose names end with ‘.O’ are assumed to be optimized ucode files. 

The following options are interpreted by ugen.  See cc(1) for compiler driver options. 

−dump Tells ugen to print dumps of the code generation tree in each phase : after build, after translate and after label optimization. Dumps are printed on a per-procedure basis. The optput file is stderr. 

−O0 Do not perform any optimizations. 

−ufsa Causes ugen to use not only unsaved registers but all fp saved registers that the optimizer did not use. Fp saved registers are used only if no more fp unsaved registers available. 

−ufsm Causes ugen to use not only unsaved registers but all fp saved registers that the optimizer did not use. Fp saved registers and fp unsaved registers are merged to one pool of available fp registers. 

−FP Causes ugen to use not only fp registers for fp operations. 

−L Do not remove loop header. 

−nooffsetopt
Do not perform offset optimization.

−notailopt
Do not perform tail optimization.

−EL Tells ugen that the target machine is little-endian. 

−EB Tells ugen that the target machine is big-endian. 

−trapuv
Initializes stack frame with a NaN.

−excpt Tells ugen that the compiled program can have an exception handler. Special directives are generated. 

−align32
Tells ugen that floating point doubles may be unaligned. 

−w Suppress all warning messages. 

−w2 Abort on warnings. Exit with nonzero status. 

−l list_file
Generates symbolic assembly language source file in the given file.

−t sym_file
Tells ugen the name of the symbol table file. 

−e err_file
Tells ugen the name of the output error file. 

−temp temp_file
Tells ugen to use the given file as temporary file. 

−regncount"
Tells ugen to change the number of integer registers used for different purposes, depending on the ’n’ given. The ’n’ can be one of : a, g, r, e. There is no blank between ’reg’ and the argument letter. For rega, count is number of integer parameter registers. For regg, count is the number of code generator integer temporaries. For regr, count is the number of integer unsaved registers. For rege, count is the number of integer saved registers. 

−fregncount"
Tells ugen to change the number of floating point registers used for different purposes, depending on the ’n’ given. The ’n’ can be one of : a, g, r, e. There is no blank between ’freg’ and the argument letter. For frega, count is number of floating point parameter registers. For fregg, count is the number of code generator floating point temporaries. For regr, count is the number of floating point unsaved registers. For rege, count is the number of floating point saved registers. 

RELATED INFORMATION

as(1), btou(1), uopt(1)

ERRORS

ugen assumes the input ucode file is error-free. However, it does output warning messages when it runs into special situations during optimization. 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026