scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

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