summaryrefslogtreecommitdiff
path: root/doc/6m.1
blob: 7ef544c94aa34008116ae0f21eae62be81c8bf47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
.TH MC 1
.SH NAME
6m
.SH SYNOPSIS
.B 6m
.I -[hioS]
.I [file...]
.br
.SH DESCRIPTION
.PP
The ?m family of compilers compile Myrddin source into object files
for the corresponding architecture. There is one compiler for each
architecture supported, with a unique name. By default, if the input
file is named
.I filename.myr
then the the object file that is generated will be named
.I filename.o.
.PP
Any text between the first '+' in the file name and the suffix are
stripped. This functionality is used to specify system tags for
tools like 'mbld'.
.PP
If the filename does not end with the suffix
.I .myr
then the suffix
.I .o
will simply be appended to it.

.PP
The following architectures are currently supported:
.TP
6m
x86-64

.PP
The compiler options are:

.TP
.B -d [flTri]
Print debugging dumps. Additional options may be given to give more
debugging information for specific intermediate states of the compilation.

.TP
.B -h
Print a summary of the available options.

.TP
.B -I path
Add 'path' to the search path for unquoted use statments. This option
does not affect the search path for local usefiles, which are always
searched relative to the compiler's current working directory. Without
any options, the search path defaults to /usr/include/myr.

.TP
.B -o output-file
Specify that the generated code should be placed in

.TP
.B -S
Generate assembly code along with the object file.

.SH EXAMPLE
.EX
    6m foo.myr
    6m bar.myr
    ld -o foobar foo.o bar.o
.EE

.SH FILES
The source code for this compiler is available from
.B git://git.eigenstate.org/git/ori/mc.git

.SH SEE ALSO
.IR muse(1)
.IR ld(1)
.IR as(1)

.SH BUGS
.PP
The language is not yet complete, and the compilers often omit useful
constructs in spite of their desirability.
.PP
There are virtually no optimizations done, and the generated source is
often very poorly performing.
.PP
The current calling convention is stack-based and not register-based, even
on architectures where it should be register-based.
.PP
The calling convention is not compatible with C.