Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / localhost / RunningOnSparc
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta name="generator" content="AsciiDoc 8.6.9">
6 <title>RunningOnSparc</title>
7 <link rel="stylesheet" href="./asciidoc.css" type="text/css">
8 <link rel="stylesheet" href="./pygments.css" type="text/css">
9
10
11 <script type="text/javascript" src="./asciidoc.js"></script>
12 <script type="text/javascript">
13 /*<![CDATA[*/
14 asciidoc.install();
15 /*]]>*/
16 </script>
17 <link rel="stylesheet" href="./mlton.css" type="text/css">
18 </head>
19 <body class="article">
20 <div id="banner">
21 <div id="banner-home">
22 <a href="./Home">MLton 20180207</a>
23 </div>
24 </div>
25 <div id="header">
26 <h1>RunningOnSparc</h1>
27 </div>
28 <div id="content">
29 <div id="preamble">
30 <div class="sectionbody">
31 <div class="paragraph"><p>MLton runs fine on the Sparc architecture.</p></div>
32 </div>
33 </div>
34 <div class="sect1">
35 <h2 id="_notes">Notes</h2>
36 <div class="sectionbody">
37 <div class="ulist"><ul>
38 <li>
39 <p>
40 When compiling for Sparc, MLton targets the 32-bit Sparc
41 architecture (i.e., Sparc V8).
42 </p>
43 </li>
44 <li>
45 <p>
46 When compiling for Sparc, MLton doesn&#8217;t support native code
47 generation (<span class="monospaced">-codegen native</span>). Hence, performance is not as good as
48 it might be and compile times are longer. Also, the quality of code
49 generated by <span class="monospaced">gcc</span> is important. By default, MLton calls <span class="monospaced">gcc -O1</span>.
50 You can change this by calling MLton with <span class="monospaced">-cc-opt -O2</span>. We have seen
51 this speed up some programs by as much as 30%, especially those
52 involving floating point; however, it can also more than double
53 compile times.
54 </p>
55 </li>
56 <li>
57 <p>
58 When compiling for Sparc, MLton uses <span class="monospaced">-align 8</span> by default. While
59 this speeds up reals, it also may increase object sizes. If your
60 program does not make significant use of reals, you might see a
61 speedup with <span class="monospaced">-align 4</span>.
62 </p>
63 </li>
64 </ul></div>
65 </div>
66 </div>
67 <div class="sect1">
68 <h2 id="_known_issues">Known issues</h2>
69 <div class="sectionbody">
70 <div class="ulist"><ul>
71 <li>
72 <p>
73 Bootstrapping on the <a href="RunningOnSparc">Sparc architecture</a> is so slow
74 as to be impractical (many hours on a 500MHz UltraSparc). For this
75 reason, we strongly recommend building with a
76 <a href="CrossCompiling">cross compiler</a>.
77 </p>
78 </li>
79 </ul></div>
80 </div>
81 </div>
82 <div class="sect1">
83 <h2 id="_also_see">Also see</h2>
84 <div class="sectionbody">
85 <div class="ulist"><ul>
86 <li>
87 <p>
88 <a href="RunningOnSolaris">RunningOnSolaris</a>
89 </p>
90 </li>
91 </ul></div>
92 </div>
93 </div>
94 </div>
95 <div id="footnotes"><hr></div>
96 <div id="footer">
97 <div id="footer-text">
98 </div>
99 <div id="footer-badges">
100 </div>
101 </div>
102 </body>
103 </html>