diff options
Diffstat (limited to 'libraries/LuaJIT-1.1.7/jitdoc/dynasm_features.html')
-rw-r--r-- | libraries/LuaJIT-1.1.7/jitdoc/dynasm_features.html | 139 |
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">»</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 code.</li> | ||
66 | <li>The primary knowledge about instruction names, operand modes, | ||
67 | registers, opcodes and how to encode them is <em>only</em> | ||
68 | needed in the pre-processor.</li> | ||
69 | <li>The generated C code is extremely small and fast.</li> | ||
70 | <li>A tiny embeddable C library helps with the process of dynamically | ||
71 | assembling, relocating and linking machine code.</li> | ||
72 | <li>There are no outside dependencies on other tools (such as | ||
73 | stand-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 | ||
77 | CPU-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. | ||
80 | It 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 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 | ||
89 | you come to expect from a standard assembler.</li> | ||
90 | <li>Access to C variables and CPP defines in assembler statements.</li> | ||
91 | <li>Access to C structures and unions via type mapping.</li> | ||
92 | <li>Convenient shortcuts for accessing C 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 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> | ||
106 | Currently only a subset of x86 (i386+) instructions is supported. | ||
107 | Unsupported instructions are either not usable in user-mode or | ||
108 | are slow on modern CPUs (i.e. not suited for a code generator). | ||
109 | SSE, SSE2, SSE3 and SSSE3 are fully supported. MMX is not supported. | ||
110 | </p> | ||
111 | <p> | ||
112 | The whole toolchain has been designed to support multiple CPU | ||
113 | architectures. As LuaJIT gets support for more architectures, | ||
114 | DynASM will be extended with new CPU-specific modules. | ||
115 | </p> | ||
116 | <p> | ||
117 | The assembler itself will be extended with more features on an | ||
118 | as-needed basis. E.g. I'm thinking about vararg macros. | ||
119 | </p> | ||
120 | <p> | ||
121 | Note that runtime conditionals are not really needed, since you can | ||
122 | just use plain C code for that (and LuaJIT does this <em>a lot</em>). | ||
123 | It's not going to be more (time-) efficient if conditionals are done | ||
124 | by the embedded C 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"> | ||
132 | Copyright © 2005-2011 Mike Pall | ||
133 | <span class="noprint"> | ||
134 | · | ||
135 | <a href="contact.html">Contact</a> | ||
136 | </span> | ||
137 | </div> | ||
138 | </body> | ||
139 | </html> | ||