aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/LuaJIT-1.1.7/jitdoc/dynasm_features.html
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/LuaJIT-1.1.7/jitdoc/dynasm_features.html')
-rw-r--r--libraries/LuaJIT-1.1.7/jitdoc/dynasm_features.html139
1 files changed, 139 insertions, 0 deletions
diff --git a/libraries/LuaJIT-1.1.7/jitdoc/dynasm_features.html b/libraries/LuaJIT-1.1.7/jitdoc/dynasm_features.html
new file mode 100644
index 0000000..1b8ce69
--- /dev/null
+++ b/libraries/LuaJIT-1.1.7/jitdoc/dynasm_features.html
@@ -0,0 +1,139 @@
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2<html>
3<head>
4<title>DynASM Features</title>
5<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6<meta name="Author" content="Mike Pall">
7<meta name="Copyright" content="Copyright (C) 2005-2011, Mike Pall">
8<meta name="Language" content="en">
9<link rel="stylesheet" type="text/css" href="bluequad.css" media="screen">
10<link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print">
11</head>
12<body>
13<div id="site">
14<a href="http://luajit.org/"><span>Lua<span id="logo">JIT</span></span></a>
15</div>
16<div id="head">
17<h1>DynASM Features</h1>
18</div>
19<div id="nav">
20<ul><li>
21<a href="index.html">Index</a>
22</li><li>
23<a href="luajit.html">LuaJIT</a>
24<ul><li>
25<a href="luajit_features.html">Features</a>
26</li><li>
27<a href="luajit_install.html">Installation</a>
28</li><li>
29<a href="luajit_run.html">Running</a>
30</li><li>
31<a href="luajit_api.html">API Extensions</a>
32</li><li>
33<a href="luajit_intro.html">Introduction</a>
34</li><li>
35<a href="luajit_performance.html">Performance</a>
36</li><li>
37<a href="luajit_debug.html">Debugging</a>
38</li><li>
39<a href="luajit_changes.html">Changes</a>
40</li></ul>
41</li><li>
42<a href="coco.html">Coco</a>
43<ul><li>
44<a href="coco_portability.html">Portability</a>
45</li><li>
46<a href="coco_api.html">API Extensions</a>
47</li><li>
48<a href="coco_changes.html">Changes</a>
49</li></ul>
50</li><li>
51<a href="dynasm.html">DynASM</a>
52<ul><li>
53<a class="current" href="dynasm_features.html">Features</a>
54</li><li>
55<a href="dynasm_examples.html">Examples</a>
56</li></ul>
57</li><li>
58<a href="http://luajit.org/download.html">Download <span class="ext">&raquo;</span></a>
59</li></ul>
60</div>
61<div id="main">
62<h2>DynASM Toolchain Features</h2>
63<ul>
64<li>DynASM is a pre-processing assembler.</li>
65<li>DynASM converts mixed C/Assembler source to plain C&nbsp;code.</li>
66<li>The primary knowledge about instruction names, operand modes,
67registers, opcodes and how to encode them is <em>only</em>
68needed in the pre-processor.</li>
69<li>The generated C&nbsp;code is extremely small and fast.</li>
70<li>A tiny embeddable C&nbsp;library helps with the process of dynamically
71assembling, relocating and linking machine code.</li>
72<li>There are no outside dependencies on other tools (such as
73stand-alone assemblers or linkers).</li>
74<li>Internal consistency checks catch runtime errors
75(e.g. undefined labels).</li>
76<li>The toolchain is split into a portable subset and
77CPU-specific modules.</li>
78<li>DynASM itself (the pre-processor) is written in Lua.</li>
79<li>There is no machine-dependency for the pre-processor itself.
80It should work everywhere you can get Lua 5.1 up and running
81(i.e. Linux, *BSD, Solaris, Windows, ... you name it).</li>
82</ul>
83
84<h2>DynASM Assembler Features</h2>
85<ul>
86<li>C&nbsp;code and assembler code can be freely mixed.
87<em>Readable</em>, too.</li>
88<li>All the usual syntax for instructions and operand modes
89you come to expect from a standard assembler.</li>
90<li>Access to C&nbsp;variables and CPP defines in assembler statements.</li>
91<li>Access to C&nbsp;structures and unions via type mapping.</li>
92<li>Convenient shortcuts for accessing C&nbsp;structures.</li>
93<li>Local and global labels.</li>
94<li>Numbered labels (e.g. for mapping bytecode instruction numbers).</li>
95<li>Multiple code sections (e.g. for tailcode).</li>
96<li>Defines/substitutions (inline and from command line).</li>
97<li>Conditionals (translation time) with proper nesting.</li>
98<li>Macros with parameters.</li>
99<li>Macros can mix assembler statements and C&nbsp;code.</li>
100<li>Captures (output diversion for code reordering).</li>
101<li>Simple and extensible template system for instruction definitions.</li>
102</ul>
103
104<h2>Restrictions</h2>
105<p>
106Currently only a subset of x86 (i386+) instructions is supported.
107Unsupported instructions are either not usable in user-mode or
108are slow on modern CPUs (i.e. not suited for a code generator).
109SSE, SSE2, SSE3 and SSSE3 are fully supported. MMX is not supported.
110</p>
111<p>
112The whole toolchain has been designed to support multiple CPU
113architectures. As LuaJIT gets support for more architectures,
114DynASM will be extended with new CPU-specific modules.
115</p>
116<p>
117The assembler itself will be extended with more features on an
118as-needed basis. E.g. I'm thinking about vararg macros.
119</p>
120<p>
121Note that runtime conditionals are not really needed, since you can
122just use plain C&nbsp;code for that (and LuaJIT does this <em>a lot</em>).
123It's not going to be more (time-) efficient if conditionals are done
124by the embedded C&nbsp;library (maybe a bit more space-efficient).
125</p>
126
127
128<br class="flush">
129</div>
130<div id="foot">
131<hr class="hide">
132Copyright &copy; 2005-2011 Mike Pall
133<span class="noprint">
134&middot;
135<a href="contact.html">Contact</a>
136</span>
137</div>
138</body>
139</html>