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">
11 <script type="text/javascript" src="./asciidoc.js"></script>
12 <script type="text/javascript">
17 <link rel="stylesheet" href="./mlton.css" type="text/css">
19 <body class="article">
21 <div id="banner-home">
22 <a href="./Home">MLton 20180207</a>
26 <h1>RunningOnSparc</h1>
30 <div class="sectionbody">
31 <div class="paragraph"><p>MLton runs fine on the Sparc architecture.</p></div>
35 <h2 id="_notes">Notes</h2>
36 <div class="sectionbody">
37 <div class="ulist"><ul>
40 When compiling for Sparc, MLton targets the 32-bit Sparc
41 architecture (i.e., Sparc V8).
46 When compiling for Sparc, MLton doesn’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
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>.
68 <h2 id="_known_issues">Known issues</h2>
69 <div class="sectionbody">
70 <div class="ulist"><ul>
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>.
83 <h2 id="_also_see">Also see</h2>
84 <div class="sectionbody">
85 <div class="ulist"><ul>
88 <a href="RunningOnSolaris">RunningOnSolaris</a>
95 <div id="footnotes"><hr></div>
97 <div id="footer-text">
99 <div id="footer-badges">