scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

scc-cc2.man (2238B)


      1 .TH SCC-CC2 1 scc\-VERSION
      2 .SH NAME
      3 scc-cc2 \- C compiler backend
      4 .SH SYNOPSIS
      5 .B cc2
      6 .RB [ \-d ]
      7 .RI [ irfile ]
      8 .SH DESCRIPTION
      9 .B cc2
     10 is the C compiler backend of the scc toolchain.
     11 It reads the scc intermediate representation (IR) from standard input
     12 (or from
     13 .I irfile
     14 if given), and emits assembly code to standard output.
     15 .PP
     16 .B cc2
     17 is not normally invoked directly.
     18 It is called by the compiler driver
     19 .BR scc\-cc (1),
     20 which pipes the IR produced by
     21 .B cc1
     22 into
     23 .BR cc2 .
     24 .B cc2
     25 is installed as
     26 .IR $prefix /libexec/scc/cc2-*.
     27 .SH OPTIONS
     28 .TP
     29 .B \-d
     30 Enable internal debug output.
     31 When set, debugging information about the IR tree and the control flow
     32 graph is printed to standard error during compilation.
     33 .SH INPUT
     34 .B cc2
     35 reads the scc IR produced by
     36 .BR cc1 .
     37 The IR is a line-oriented, tab-separated text format.
     38 If
     39 .I irfile
     40 is specified, standard input is replaced by that file.
     41 Otherwise the IR is read from standard input, which is the normal mode
     42 when
     43 .B cc2
     44 is used inside the pipeline constructed by
     45 .BR scc\-cc (1).
     46 .PP
     47 For a full description of the IR format see
     48 .BR scc\-ir (7).
     49 .SH OUTPUT
     50 .B cc2
     51 writes to standard output.
     52 Depending on the variant of
     53 .B cc2
     54 that is invoked, the output is either:
     55 .TP
     56 .B Native assembly
     57 The target architecture assembly language, ready to be assembled by the
     58 system assembler.
     59 This is the output of the
     60 .BI cc2\- arch \- abi
     61 variants.
     62 .TP
     63 .B QBE IR
     64 The intermediate language accepted by the QBE compiler backend.
     65 This is the output of the
     66 .BI cc2\-qbe_ arch \- abi
     67 variants.
     68 QBE subsequently compiles this IR to native assembly.
     69 .SH BACKENDS
     70 .B cc2
     71 is a family of architecture-specific binaries.
     72 Each binary is compiled for a specific target and installed as a separate
     73 executable under
     74 .IR $SCCPREFIX/libexec/scc/ .
     75 The following target backends are available:
     76 .TP
     77 .B cc2\-z80\-scc
     78 Native code generator for the Zilog Z80 with the scc ABI.
     79 .TP
     80 .B cc2\-qbe_amd64\-sysv
     81 QBE IR emitter for 64-bit x86 with the System V ABI.
     82 .TP
     83 .B cc2\-qbe_arm64\-sysv
     84 QBE IR emitter for 64-bit ARM with the System V ABI.
     85 .TP
     86 .B cc2\-qbe_riscv64\-sysv
     87 QBE IR emitter for 64-bit RISC-V with the System V ABI.
     88 .SH SEE ALSO
     89 .BR scc\-cc (1),
     90 .BR scc\-cc1 (1),
     91 .BR scc\-cpp (1),
     92 .BR scc (1),
     93 .BR scc\-ir (7)