Compiler
Operation
-
Code
Generator
Description
3.3
Code
Generator
(gspcg)
Description
The third step in compiling a
TMS34010
C program
is
invoking the C code
generator. As Figure
3-4
shows, the code generator converts the intermediate
file produced
by
the parser into
an
assembly language source file. You can
modify
this
output
file
or
use it
as
input
for the
TMS34010
assembler. The
code generator produces reentrant relocatable code
which,
after assembling
and linking, can be stored in
ROM.
intermediate
file
(.if)
'"'1""
til""
,.,"""
............... ,
....
,.,
.....................
"~"
........ , ............. .
t
•••••••••••••••••••••••
............... ....... .
I
••••••••
,
••••••••
,
••••
Figure
3-4.
Input
and
Output
Files
for
the
C
Code
Generator
3.3.1
Invoking
the
Code
Generator
3-8
To invoke the code generator, enter:
gspcg
[input
file
[output
file
[temp
file}}}
[options}
gspcg
is
the command that invokes the code generator.
input
file names the intermediate file that the code generator uses
as
input.
If
you
don't
supply
an
extension, the code generator assumes
that the extension
is
.
if.
If
you
don't
specify an
input
file, the
code generator
will
prompt
you
for
one.
output
file names the assembly language source file that the code generator
creates.
If
you
don't
supply a filename
for
the
output
file, the
code generator uses the
input
filename
with
an
extension
of
.ssm.
tempfile names a temporary file that the code generator creates and uses.
The default filename for the temporary
file
is
the
input
filename
appended
with
an
extension
of
.
tmp.
The code generator de-
letes this file after using it.