laag-nasm 2.13.03.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (455) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +57 -0
  3. data/LICENSE.txt +29 -0
  4. data/README.org +34 -0
  5. data/ext/laag/nasm/extconf.rb +16 -0
  6. data/laag-nasm.gemspec +20 -0
  7. data/lib/laag/nasm.rb +29 -0
  8. data/patches/Makefile.in.patch +13 -0
  9. data/vendor/repo.or.cz/nasm/.gitignore +102 -0
  10. data/vendor/repo.or.cz/nasm/AUTHORS +137 -0
  11. data/vendor/repo.or.cz/nasm/CHANGES +2 -0
  12. data/vendor/repo.or.cz/nasm/ChangeLog +2905 -0
  13. data/vendor/repo.or.cz/nasm/INSTALL +102 -0
  14. data/vendor/repo.or.cz/nasm/LICENSE +29 -0
  15. data/vendor/repo.or.cz/nasm/Makefile.in +855 -0
  16. data/vendor/repo.or.cz/nasm/Mkfiles/README +46 -0
  17. data/vendor/repo.or.cz/nasm/Mkfiles/msvc.mak +732 -0
  18. data/vendor/repo.or.cz/nasm/Mkfiles/openwcom.mak +706 -0
  19. data/vendor/repo.or.cz/nasm/README +23 -0
  20. data/vendor/repo.or.cz/nasm/SubmittingPatches +116 -0
  21. data/vendor/repo.or.cz/nasm/TODO +376 -0
  22. data/vendor/repo.or.cz/nasm/aclocal.m4 +139 -0
  23. data/vendor/repo.or.cz/nasm/asm/assemble.c +2957 -0
  24. data/vendor/repo.or.cz/nasm/asm/assemble.h +54 -0
  25. data/vendor/repo.or.cz/nasm/asm/directiv.c +566 -0
  26. data/vendor/repo.or.cz/nasm/asm/directiv.dat +92 -0
  27. data/vendor/repo.or.cz/nasm/asm/error.c +202 -0
  28. data/vendor/repo.or.cz/nasm/asm/eval.c +1014 -0
  29. data/vendor/repo.or.cz/nasm/asm/eval.h +49 -0
  30. data/vendor/repo.or.cz/nasm/asm/exprdump.c +79 -0
  31. data/vendor/repo.or.cz/nasm/asm/exprlib.c +200 -0
  32. data/vendor/repo.or.cz/nasm/asm/float.c +952 -0
  33. data/vendor/repo.or.cz/nasm/asm/float.h +54 -0
  34. data/vendor/repo.or.cz/nasm/asm/labels.c +540 -0
  35. data/vendor/repo.or.cz/nasm/asm/listing.c +346 -0
  36. data/vendor/repo.or.cz/nasm/asm/listing.h +113 -0
  37. data/vendor/repo.or.cz/nasm/asm/nasm.c +1855 -0
  38. data/vendor/repo.or.cz/nasm/asm/parser.c +1167 -0
  39. data/vendor/repo.or.cz/nasm/asm/parser.h +45 -0
  40. data/vendor/repo.or.cz/nasm/asm/phash.pl +109 -0
  41. data/vendor/repo.or.cz/nasm/asm/pptok.dat +96 -0
  42. data/vendor/repo.or.cz/nasm/asm/pptok.pl +271 -0
  43. data/vendor/repo.or.cz/nasm/asm/pragma.c +218 -0
  44. data/vendor/repo.or.cz/nasm/asm/preproc-nop.c +188 -0
  45. data/vendor/repo.or.cz/nasm/asm/preproc.c +5459 -0
  46. data/vendor/repo.or.cz/nasm/asm/preproc.h +55 -0
  47. data/vendor/repo.or.cz/nasm/asm/quote.c +479 -0
  48. data/vendor/repo.or.cz/nasm/asm/quote.h +44 -0
  49. data/vendor/repo.or.cz/nasm/asm/rdstrnum.c +68 -0
  50. data/vendor/repo.or.cz/nasm/asm/segalloc.c +51 -0
  51. data/vendor/repo.or.cz/nasm/asm/stdscan.c +345 -0
  52. data/vendor/repo.or.cz/nasm/asm/stdscan.h +49 -0
  53. data/vendor/repo.or.cz/nasm/asm/strfunc.c +359 -0
  54. data/vendor/repo.or.cz/nasm/asm/tokens.dat +135 -0
  55. data/vendor/repo.or.cz/nasm/asm/tokhash.pl +284 -0
  56. data/vendor/repo.or.cz/nasm/autogen.sh +9 -0
  57. data/vendor/repo.or.cz/nasm/common/common.c +122 -0
  58. data/vendor/repo.or.cz/nasm/config/msvc.h +192 -0
  59. data/vendor/repo.or.cz/nasm/config/unknown.h +51 -0
  60. data/vendor/repo.or.cz/nasm/config/watcom.h +74 -0
  61. data/vendor/repo.or.cz/nasm/configure.ac +253 -0
  62. data/vendor/repo.or.cz/nasm/contrib/MSVC6.txt +25 -0
  63. data/vendor/repo.or.cz/nasm/contrib/VSrules/nasm.README +16 -0
  64. data/vendor/repo.or.cz/nasm/contrib/VSrules/nasm.rules +79 -0
  65. data/vendor/repo.or.cz/nasm/disasm/disasm.c +1735 -0
  66. data/vendor/repo.or.cz/nasm/disasm/disasm.h +49 -0
  67. data/vendor/repo.or.cz/nasm/disasm/ndisasm.c +397 -0
  68. data/vendor/repo.or.cz/nasm/disasm/sync.c +132 -0
  69. data/vendor/repo.or.cz/nasm/disasm/sync.h +45 -0
  70. data/vendor/repo.or.cz/nasm/doc/Makefile.in +86 -0
  71. data/vendor/repo.or.cz/nasm/doc/README +20 -0
  72. data/vendor/repo.or.cz/nasm/doc/afmmetrics.ph +102 -0
  73. data/vendor/repo.or.cz/nasm/doc/changes.src +2588 -0
  74. data/vendor/repo.or.cz/nasm/doc/findfont.ph +180 -0
  75. data/vendor/repo.or.cz/nasm/doc/genps.pl +1294 -0
  76. data/vendor/repo.or.cz/nasm/doc/inslist.pl +108 -0
  77. data/vendor/repo.or.cz/nasm/doc/internal.doc +290 -0
  78. data/vendor/repo.or.cz/nasm/doc/local.css +1 -0
  79. data/vendor/repo.or.cz/nasm/doc/nasmdoc.css +150 -0
  80. data/vendor/repo.or.cz/nasm/doc/nasmdoc.src +8309 -0
  81. data/vendor/repo.or.cz/nasm/doc/nasmlogo.eps +212 -0
  82. data/vendor/repo.or.cz/nasm/doc/nasmlogw.png +0 -0
  83. data/vendor/repo.or.cz/nasm/doc/psfonts.ph +53 -0
  84. data/vendor/repo.or.cz/nasm/doc/pspdf.pl +98 -0
  85. data/vendor/repo.or.cz/nasm/doc/pswidth.ph +25 -0
  86. data/vendor/repo.or.cz/nasm/doc/rdsrc.pl +1111 -0
  87. data/vendor/repo.or.cz/nasm/doc/ttfmetrics.ph +63 -0
  88. data/vendor/repo.or.cz/nasm/headers/c +33 -0
  89. data/vendor/repo.or.cz/nasm/headers/doc +33 -0
  90. data/vendor/repo.or.cz/nasm/headers/mac +33 -0
  91. data/vendor/repo.or.cz/nasm/headers/perl +33 -0
  92. data/vendor/repo.or.cz/nasm/include/compiler.h +277 -0
  93. data/vendor/repo.or.cz/nasm/include/disp8.h +45 -0
  94. data/vendor/repo.or.cz/nasm/include/error.h +135 -0
  95. data/vendor/repo.or.cz/nasm/include/hashtbl.h +85 -0
  96. data/vendor/repo.or.cz/nasm/include/iflag.h +173 -0
  97. data/vendor/repo.or.cz/nasm/include/insns.h +76 -0
  98. data/vendor/repo.or.cz/nasm/include/labels.h +60 -0
  99. data/vendor/repo.or.cz/nasm/include/md5.h +21 -0
  100. data/vendor/repo.or.cz/nasm/include/nasm.h +1246 -0
  101. data/vendor/repo.or.cz/nasm/include/nasmint.h +219 -0
  102. data/vendor/repo.or.cz/nasm/include/nasmlib.h +524 -0
  103. data/vendor/repo.or.cz/nasm/include/opflags.h +271 -0
  104. data/vendor/repo.or.cz/nasm/include/perfhash.h +52 -0
  105. data/vendor/repo.or.cz/nasm/include/raa.h +46 -0
  106. data/vendor/repo.or.cz/nasm/include/rbtree.h +51 -0
  107. data/vendor/repo.or.cz/nasm/include/rdoff.h +169 -0
  108. data/vendor/repo.or.cz/nasm/include/saa.h +94 -0
  109. data/vendor/repo.or.cz/nasm/include/strlist.h +55 -0
  110. data/vendor/repo.or.cz/nasm/include/tables.h +70 -0
  111. data/vendor/repo.or.cz/nasm/include/ver.h +47 -0
  112. data/vendor/repo.or.cz/nasm/install-sh +250 -0
  113. data/vendor/repo.or.cz/nasm/macros/altreg.mac +107 -0
  114. data/vendor/repo.or.cz/nasm/macros/fp.mac +54 -0
  115. data/vendor/repo.or.cz/nasm/macros/ifunc.mac +48 -0
  116. data/vendor/repo.or.cz/nasm/macros/macros.pl +294 -0
  117. data/vendor/repo.or.cz/nasm/macros/smartalign.mac +189 -0
  118. data/vendor/repo.or.cz/nasm/macros/standard.mac +226 -0
  119. data/vendor/repo.or.cz/nasm/misc/Doxyfile +752 -0
  120. data/vendor/repo.or.cz/nasm/misc/Nindent +18 -0
  121. data/vendor/repo.or.cz/nasm/misc/README +2 -0
  122. data/vendor/repo.or.cz/nasm/misc/c16.mac +82 -0
  123. data/vendor/repo.or.cz/nasm/misc/c32.mac +52 -0
  124. data/vendor/repo.or.cz/nasm/misc/crcgen.c +44 -0
  125. data/vendor/repo.or.cz/nasm/misc/exebin.mac +57 -0
  126. data/vendor/repo.or.cz/nasm/misc/exebin2.mac +114 -0
  127. data/vendor/repo.or.cz/nasm/misc/fmtinsns.pl +40 -0
  128. data/vendor/repo.or.cz/nasm/misc/genfma.pl +63 -0
  129. data/vendor/repo.or.cz/nasm/misc/hints.txt +26 -0
  130. data/vendor/repo.or.cz/nasm/misc/magic +6 -0
  131. data/vendor/repo.or.cz/nasm/misc/myC32.mac +121 -0
  132. data/vendor/repo.or.cz/nasm/misc/nasm.sl +320 -0
  133. data/vendor/repo.or.cz/nasm/misc/nasmstab +296 -0
  134. data/vendor/repo.or.cz/nasm/misc/omfdump.c +517 -0
  135. data/vendor/repo.or.cz/nasm/misc/pmw.bat +9 -0
  136. data/vendor/repo.or.cz/nasm/misc/proc32.ash +441 -0
  137. data/vendor/repo.or.cz/nasm/misc/scitech.mac +1223 -0
  138. data/vendor/repo.or.cz/nasm/misc/xcrcgen.c +80 -0
  139. data/vendor/repo.or.cz/nasm/nasm.spec.in +83 -0
  140. data/vendor/repo.or.cz/nasm/nasm.spec.sed +3 -0
  141. data/vendor/repo.or.cz/nasm/nasm.txt +306 -0
  142. data/vendor/repo.or.cz/nasm/nasmlib/badenum.c +43 -0
  143. data/vendor/repo.or.cz/nasm/nasmlib/bsi.c +77 -0
  144. data/vendor/repo.or.cz/nasm/nasmlib/crc64.c +189 -0
  145. data/vendor/repo.or.cz/nasm/nasmlib/file.c +259 -0
  146. data/vendor/repo.or.cz/nasm/nasmlib/file.h +128 -0
  147. data/vendor/repo.or.cz/nasm/nasmlib/filename.c +69 -0
  148. data/vendor/repo.or.cz/nasm/nasmlib/hashtbl.c +232 -0
  149. data/vendor/repo.or.cz/nasm/nasmlib/ilog2.c +168 -0
  150. data/vendor/repo.or.cz/nasm/nasmlib/malloc.c +108 -0
  151. data/vendor/repo.or.cz/nasm/nasmlib/md5c.c +247 -0
  152. data/vendor/repo.or.cz/nasm/nasmlib/mmap.c +139 -0
  153. data/vendor/repo.or.cz/nasm/nasmlib/path.c +186 -0
  154. data/vendor/repo.or.cz/nasm/nasmlib/perfhash.c +55 -0
  155. data/vendor/repo.or.cz/nasm/nasmlib/perfhash.pl +362 -0
  156. data/vendor/repo.or.cz/nasm/nasmlib/raa.c +173 -0
  157. data/vendor/repo.or.cz/nasm/nasmlib/rbtree.c +119 -0
  158. data/vendor/repo.or.cz/nasm/nasmlib/readnum.c +172 -0
  159. data/vendor/repo.or.cz/nasm/nasmlib/realpath.c +135 -0
  160. data/vendor/repo.or.cz/nasm/nasmlib/saa.c +431 -0
  161. data/vendor/repo.or.cz/nasm/nasmlib/srcfile.c +128 -0
  162. data/vendor/repo.or.cz/nasm/nasmlib/string.c +242 -0
  163. data/vendor/repo.or.cz/nasm/nasmlib/strlist.c +100 -0
  164. data/vendor/repo.or.cz/nasm/nasmlib/ver.c +51 -0
  165. data/vendor/repo.or.cz/nasm/nasmlib/zerobuf.c +42 -0
  166. data/vendor/repo.or.cz/nasm/ndisasm.txt +94 -0
  167. data/vendor/repo.or.cz/nasm/nsis/NASMMultiUser.nsh +478 -0
  168. data/vendor/repo.or.cz/nasm/nsis/getpearch.pl +76 -0
  169. data/vendor/repo.or.cz/nasm/nsis/nasm-un.ico +0 -0
  170. data/vendor/repo.or.cz/nasm/nsis/nasm.ico +0 -0
  171. data/vendor/repo.or.cz/nasm/nsis/nasm.nsi +241 -0
  172. data/vendor/repo.or.cz/nasm/output/codeview.c +814 -0
  173. data/vendor/repo.or.cz/nasm/output/dwarf.h +566 -0
  174. data/vendor/repo.or.cz/nasm/output/elf.h +537 -0
  175. data/vendor/repo.or.cz/nasm/output/legacy.c +112 -0
  176. data/vendor/repo.or.cz/nasm/output/nulldbg.c +93 -0
  177. data/vendor/repo.or.cz/nasm/output/nullout.c +51 -0
  178. data/vendor/repo.or.cz/nasm/output/outaout.c +954 -0
  179. data/vendor/repo.or.cz/nasm/output/outaout.mac +37 -0
  180. data/vendor/repo.or.cz/nasm/output/outas86.c +650 -0
  181. data/vendor/repo.or.cz/nasm/output/outas86.mac +37 -0
  182. data/vendor/repo.or.cz/nasm/output/outbin.c +1713 -0
  183. data/vendor/repo.or.cz/nasm/output/outbin.mac +40 -0
  184. data/vendor/repo.or.cz/nasm/output/outcoff.c +1242 -0
  185. data/vendor/repo.or.cz/nasm/output/outcoff.mac +43 -0
  186. data/vendor/repo.or.cz/nasm/output/outdbg.c +425 -0
  187. data/vendor/repo.or.cz/nasm/output/outelf.c +3370 -0
  188. data/vendor/repo.or.cz/nasm/output/outelf.h +156 -0
  189. data/vendor/repo.or.cz/nasm/output/outelf.mac +41 -0
  190. data/vendor/repo.or.cz/nasm/output/outform.c +120 -0
  191. data/vendor/repo.or.cz/nasm/output/outform.h +379 -0
  192. data/vendor/repo.or.cz/nasm/output/outieee.c +1528 -0
  193. data/vendor/repo.or.cz/nasm/output/outlib.c +58 -0
  194. data/vendor/repo.or.cz/nasm/output/outlib.h +63 -0
  195. data/vendor/repo.or.cz/nasm/output/outmacho.c +2387 -0
  196. data/vendor/repo.or.cz/nasm/output/outmacho.mac +49 -0
  197. data/vendor/repo.or.cz/nasm/output/outobj.c +2725 -0
  198. data/vendor/repo.or.cz/nasm/output/outobj.mac +49 -0
  199. data/vendor/repo.or.cz/nasm/output/outrdf.mac +40 -0
  200. data/vendor/repo.or.cz/nasm/output/outrdf2.c +791 -0
  201. data/vendor/repo.or.cz/nasm/output/outrdf2.mac +43 -0
  202. data/vendor/repo.or.cz/nasm/output/pecoff.h +532 -0
  203. data/vendor/repo.or.cz/nasm/output/stabs.h +144 -0
  204. data/vendor/repo.or.cz/nasm/perllib/crc64.ph +158 -0
  205. data/vendor/repo.or.cz/nasm/perllib/gensv.pl +34 -0
  206. data/vendor/repo.or.cz/nasm/perllib/phash.ph +200 -0
  207. data/vendor/repo.or.cz/nasm/perllib/random_sv_vectors.ph +67 -0
  208. data/vendor/repo.or.cz/nasm/rdoff/README +185 -0
  209. data/vendor/repo.or.cz/nasm/rdoff/collectn.c +44 -0
  210. data/vendor/repo.or.cz/nasm/rdoff/collectn.h +22 -0
  211. data/vendor/repo.or.cz/nasm/rdoff/doc/Makefile +37 -0
  212. data/vendor/repo.or.cz/nasm/rdoff/doc/rdoff.texi +137 -0
  213. data/vendor/repo.or.cz/nasm/rdoff/doc/v1-v2.txt +62 -0
  214. data/vendor/repo.or.cz/nasm/rdoff/hash.c +122 -0
  215. data/vendor/repo.or.cz/nasm/rdoff/hash.h +17 -0
  216. data/vendor/repo.or.cz/nasm/rdoff/ldrdf.1 +41 -0
  217. data/vendor/repo.or.cz/nasm/rdoff/ldrdf.c +1395 -0
  218. data/vendor/repo.or.cz/nasm/rdoff/ldsegs.h +59 -0
  219. data/vendor/repo.or.cz/nasm/rdoff/rdf2bin.1 +65 -0
  220. data/vendor/repo.or.cz/nasm/rdoff/rdf2bin.c +431 -0
  221. data/vendor/repo.or.cz/nasm/rdoff/rdf2com.1 +1 -0
  222. data/vendor/repo.or.cz/nasm/rdoff/rdf2ihx.1 +1 -0
  223. data/vendor/repo.or.cz/nasm/rdoff/rdf2ith.1 +1 -0
  224. data/vendor/repo.or.cz/nasm/rdoff/rdf2srec.1 +1 -0
  225. data/vendor/repo.or.cz/nasm/rdoff/rdfdump.1 +24 -0
  226. data/vendor/repo.or.cz/nasm/rdoff/rdfdump.c +347 -0
  227. data/vendor/repo.or.cz/nasm/rdoff/rdflib.1 +39 -0
  228. data/vendor/repo.or.cz/nasm/rdoff/rdflib.c +434 -0
  229. data/vendor/repo.or.cz/nasm/rdoff/rdfload.c +213 -0
  230. data/vendor/repo.or.cz/nasm/rdoff/rdfload.h +29 -0
  231. data/vendor/repo.or.cz/nasm/rdoff/rdfutils.h +165 -0
  232. data/vendor/repo.or.cz/nasm/rdoff/rdlar.c +492 -0
  233. data/vendor/repo.or.cz/nasm/rdoff/rdlar.h +34 -0
  234. data/vendor/repo.or.cz/nasm/rdoff/rdlib.c +290 -0
  235. data/vendor/repo.or.cz/nasm/rdoff/rdlib.h +62 -0
  236. data/vendor/repo.or.cz/nasm/rdoff/rdoff.c +621 -0
  237. data/vendor/repo.or.cz/nasm/rdoff/rdx.1 +21 -0
  238. data/vendor/repo.or.cz/nasm/rdoff/rdx.c +90 -0
  239. data/vendor/repo.or.cz/nasm/rdoff/segtab.c +172 -0
  240. data/vendor/repo.or.cz/nasm/rdoff/segtab.h +45 -0
  241. data/vendor/repo.or.cz/nasm/rdoff/symtab.c +159 -0
  242. data/vendor/repo.or.cz/nasm/rdoff/symtab.h +55 -0
  243. data/vendor/repo.or.cz/nasm/rdoff/test/Makefile +10 -0
  244. data/vendor/repo.or.cz/nasm/rdoff/test/makelib.sh +14 -0
  245. data/vendor/repo.or.cz/nasm/rdoff/test/rdfseg.asm +20 -0
  246. data/vendor/repo.or.cz/nasm/rdoff/test/rdfseg2.asm +12 -0
  247. data/vendor/repo.or.cz/nasm/rdoff/test/rdftest1.asm +54 -0
  248. data/vendor/repo.or.cz/nasm/rdoff/test/rdftest2.asm +33 -0
  249. data/vendor/repo.or.cz/nasm/rdoff/test/rdtlib.asm +48 -0
  250. data/vendor/repo.or.cz/nasm/rdoff/test/rdtmain.asm +47 -0
  251. data/vendor/repo.or.cz/nasm/rdoff/test/testlib.asm +18 -0
  252. data/vendor/repo.or.cz/nasm/stdlib/snprintf.c +29 -0
  253. data/vendor/repo.or.cz/nasm/stdlib/strlcpy.c +51 -0
  254. data/vendor/repo.or.cz/nasm/stdlib/strnlen.c +46 -0
  255. data/vendor/repo.or.cz/nasm/stdlib/vsnprintf.c +51 -0
  256. data/vendor/repo.or.cz/nasm/test/Makefile +106 -0
  257. data/vendor/repo.or.cz/nasm/test/_file_.asm +5 -0
  258. data/vendor/repo.or.cz/nasm/test/_version.asm +2 -0
  259. data/vendor/repo.or.cz/nasm/test/a32offs.asm +9 -0
  260. data/vendor/repo.or.cz/nasm/test/absolute.asm +40 -0
  261. data/vendor/repo.or.cz/nasm/test/addr64x.asm +18 -0
  262. data/vendor/repo.or.cz/nasm/test/align13.asm +19 -0
  263. data/vendor/repo.or.cz/nasm/test/align13s.asm +20 -0
  264. data/vendor/repo.or.cz/nasm/test/alonesym-obj.asm +166 -0
  265. data/vendor/repo.or.cz/nasm/test/andbyte.asm +15 -0
  266. data/vendor/repo.or.cz/nasm/test/aoutso.asm +99 -0
  267. data/vendor/repo.or.cz/nasm/test/aouttest.asm +86 -0
  268. data/vendor/repo.or.cz/nasm/test/aouttest.c +36 -0
  269. data/vendor/repo.or.cz/nasm/test/avx.asm +46 -0
  270. data/vendor/repo.or.cz/nasm/test/avx005.asm +529 -0
  271. data/vendor/repo.or.cz/nasm/test/avx2.asm +1608 -0
  272. data/vendor/repo.or.cz/nasm/test/avx512cd.asm +106 -0
  273. data/vendor/repo.or.cz/nasm/test/avx512er.asm +144 -0
  274. data/vendor/repo.or.cz/nasm/test/avx512f.asm +7000 -0
  275. data/vendor/repo.or.cz/nasm/test/avx512pf.asm +88 -0
  276. data/vendor/repo.or.cz/nasm/test/bcd.asm +23 -0
  277. data/vendor/repo.or.cz/nasm/test/binexe.asm +35 -0
  278. data/vendor/repo.or.cz/nasm/test/bintest.asm +59 -0
  279. data/vendor/repo.or.cz/nasm/test/bisect.sh +22 -0
  280. data/vendor/repo.or.cz/nasm/test/br1879590.asm +25 -0
  281. data/vendor/repo.or.cz/nasm/test/br2003451.asm +17 -0
  282. data/vendor/repo.or.cz/nasm/test/br2030823.asm +7 -0
  283. data/vendor/repo.or.cz/nasm/test/br2148476.asm +221 -0
  284. data/vendor/repo.or.cz/nasm/test/br2222615.asm +19 -0
  285. data/vendor/repo.or.cz/nasm/test/br2496848.asm +42 -0
  286. data/vendor/repo.or.cz/nasm/test/br3005117.asm +26 -0
  287. data/vendor/repo.or.cz/nasm/test/br3026808.asm +20 -0
  288. data/vendor/repo.or.cz/nasm/test/br3028880.asm +8 -0
  289. data/vendor/repo.or.cz/nasm/test/br3041451.asm +59 -0
  290. data/vendor/repo.or.cz/nasm/test/br3058845.asm +14 -0
  291. data/vendor/repo.or.cz/nasm/test/br3066383.asm +70 -0
  292. data/vendor/repo.or.cz/nasm/test/br3074517.asm +12 -0
  293. data/vendor/repo.or.cz/nasm/test/br3092924.asm +25 -0
  294. data/vendor/repo.or.cz/nasm/test/br3104312.asm +11 -0
  295. data/vendor/repo.or.cz/nasm/test/br3109604.asm +9 -0
  296. data/vendor/repo.or.cz/nasm/test/br3174983.asm +9 -0
  297. data/vendor/repo.or.cz/nasm/test/br3187743.asm +7 -0
  298. data/vendor/repo.or.cz/nasm/test/br3189064.asm +7 -0
  299. data/vendor/repo.or.cz/nasm/test/br3200749.asm +9 -0
  300. data/vendor/repo.or.cz/nasm/test/br3385573.asm +11 -0
  301. data/vendor/repo.or.cz/nasm/test/br3392252.asm +43 -0
  302. data/vendor/repo.or.cz/nasm/test/br3392259.asm +8 -0
  303. data/vendor/repo.or.cz/nasm/test/br3392363.asm +4 -0
  304. data/vendor/repo.or.cz/nasm/test/br3392392.asm +16 -0
  305. data/vendor/repo.or.cz/nasm/test/br3392396.asm +5 -0
  306. data/vendor/repo.or.cz/nasm/test/br3392411.asm +22 -0
  307. data/vendor/repo.or.cz/nasm/test/br3392418.asm +3 -0
  308. data/vendor/repo.or.cz/nasm/test/br3392439.asm +25 -0
  309. data/vendor/repo.or.cz/nasm/test/br3392442.asm +6 -0
  310. data/vendor/repo.or.cz/nasm/test/br560575.asm +17 -0
  311. data/vendor/repo.or.cz/nasm/test/br560873.asm +27 -0
  312. data/vendor/repo.or.cz/nasm/test/br890790.asm +7 -0
  313. data/vendor/repo.or.cz/nasm/test/br890790_i.asm +1 -0
  314. data/vendor/repo.or.cz/nasm/test/br978756.asm +7 -0
  315. data/vendor/repo.or.cz/nasm/test/changed.asm +383 -0
  316. data/vendor/repo.or.cz/nasm/test/cofftest.asm +85 -0
  317. data/vendor/repo.or.cz/nasm/test/cofftest.c +35 -0
  318. data/vendor/repo.or.cz/nasm/test/crc32.asm +37 -0
  319. data/vendor/repo.or.cz/nasm/test/cv8struc.asm +14 -0
  320. data/vendor/repo.or.cz/nasm/test/dtbcd.asm +72 -0
  321. data/vendor/repo.or.cz/nasm/test/elf64so.asm +118 -0
  322. data/vendor/repo.or.cz/nasm/test/elfso.asm +100 -0
  323. data/vendor/repo.or.cz/nasm/test/elftest.asm +87 -0
  324. data/vendor/repo.or.cz/nasm/test/elftest.c +38 -0
  325. data/vendor/repo.or.cz/nasm/test/elftest64.c +43 -0
  326. data/vendor/repo.or.cz/nasm/test/elif.asm +39 -0
  327. data/vendor/repo.or.cz/nasm/test/expimp.asm +90 -0
  328. data/vendor/repo.or.cz/nasm/test/far64.asm +10 -0
  329. data/vendor/repo.or.cz/nasm/test/float.asm +186 -0
  330. data/vendor/repo.or.cz/nasm/test/float8.asm +135 -0
  331. data/vendor/repo.or.cz/nasm/test/floatb.asm +35 -0
  332. data/vendor/repo.or.cz/nasm/test/floatexp.asm +382 -0
  333. data/vendor/repo.or.cz/nasm/test/floatize.asm +19 -0
  334. data/vendor/repo.or.cz/nasm/test/floattest.asm +28 -0
  335. data/vendor/repo.or.cz/nasm/test/floatx.asm +525 -0
  336. data/vendor/repo.or.cz/nasm/test/fpu.asm +127 -0
  337. data/vendor/repo.or.cz/nasm/test/fwdopt.asm +133 -0
  338. data/vendor/repo.or.cz/nasm/test/fwdoptpp.asm +150 -0
  339. data/vendor/repo.or.cz/nasm/test/gas2nasm.py +104 -0
  340. data/vendor/repo.or.cz/nasm/test/gather.asm +11 -0
  341. data/vendor/repo.or.cz/nasm/test/gotoff64.asm +25 -0
  342. data/vendor/repo.or.cz/nasm/test/hexfp.asm +25 -0
  343. data/vendor/repo.or.cz/nasm/test/hle.asm +19 -0
  344. data/vendor/repo.or.cz/nasm/test/ifelse.asm +46 -0
  345. data/vendor/repo.or.cz/nasm/test/ifenv.asm +31 -0
  346. data/vendor/repo.or.cz/nasm/test/ifmacro.asm +413 -0
  347. data/vendor/repo.or.cz/nasm/test/iftoken.asm +317 -0
  348. data/vendor/repo.or.cz/nasm/test/iftoken.pl +32 -0
  349. data/vendor/repo.or.cz/nasm/test/ilog2.asm +271 -0
  350. data/vendor/repo.or.cz/nasm/test/imacro.asm +8 -0
  351. data/vendor/repo.or.cz/nasm/test/imm.asm +23 -0
  352. data/vendor/repo.or.cz/nasm/test/imm64.asm +61 -0
  353. data/vendor/repo.or.cz/nasm/test/immwarn.asm +91 -0
  354. data/vendor/repo.or.cz/nasm/test/imul.asm +117 -0
  355. data/vendor/repo.or.cz/nasm/test/inc1.asm +6 -0
  356. data/vendor/repo.or.cz/nasm/test/inc2.asm +8 -0
  357. data/vendor/repo.or.cz/nasm/test/incbin.asm +7 -0
  358. data/vendor/repo.or.cz/nasm/test/incbin.data +2 -0
  359. data/vendor/repo.or.cz/nasm/test/inctest.asm +15 -0
  360. data/vendor/repo.or.cz/nasm/test/insnlbl.asm +12 -0
  361. data/vendor/repo.or.cz/nasm/test/invlpga.asm +11 -0
  362. data/vendor/repo.or.cz/nasm/test/jmp64.asm +19 -0
  363. data/vendor/repo.or.cz/nasm/test/lar_lsl.asm +124 -0
  364. data/vendor/repo.or.cz/nasm/test/larlsl.asm +23 -0
  365. data/vendor/repo.or.cz/nasm/test/lnxhello.asm +54 -0
  366. data/vendor/repo.or.cz/nasm/test/local.asm +19 -0
  367. data/vendor/repo.or.cz/nasm/test/loopoffs.asm +12 -0
  368. data/vendor/repo.or.cz/nasm/test/lwp.asm +213 -0
  369. data/vendor/repo.or.cz/nasm/test/macro-defaults.asm +64 -0
  370. data/vendor/repo.or.cz/nasm/test/macroerr.asm +12 -0
  371. data/vendor/repo.or.cz/nasm/test/macroerr.inc +3 -0
  372. data/vendor/repo.or.cz/nasm/test/mmxsize.asm +38 -0
  373. data/vendor/repo.or.cz/nasm/test/movd.asm +12 -0
  374. data/vendor/repo.or.cz/nasm/test/movd64.asm +15 -0
  375. data/vendor/repo.or.cz/nasm/test/movimm.asm +28 -0
  376. data/vendor/repo.or.cz/nasm/test/movnti.asm +10 -0
  377. data/vendor/repo.or.cz/nasm/test/mpx-64.asm +120 -0
  378. data/vendor/repo.or.cz/nasm/test/mpx.asm +89 -0
  379. data/vendor/repo.or.cz/nasm/test/multisection.asm +96 -0
  380. data/vendor/repo.or.cz/nasm/test/nasmformat.asm +17 -0
  381. data/vendor/repo.or.cz/nasm/test/new +9 -0
  382. data/vendor/repo.or.cz/nasm/test/newrdwr.asm +24 -0
  383. data/vendor/repo.or.cz/nasm/test/nop.asm +17 -0
  384. data/vendor/repo.or.cz/nasm/test/nullfile.asm +4 -0
  385. data/vendor/repo.or.cz/nasm/test/objexe.asm +30 -0
  386. data/vendor/repo.or.cz/nasm/test/objlink.c +33 -0
  387. data/vendor/repo.or.cz/nasm/test/objtest.asm +85 -0
  388. data/vendor/repo.or.cz/nasm/test/optimization.asm +104 -0
  389. data/vendor/repo.or.cz/nasm/test/org.asm +18 -0
  390. data/vendor/repo.or.cz/nasm/test/paste.asm +12 -0
  391. data/vendor/repo.or.cz/nasm/test/pcrel.asm +52 -0
  392. data/vendor/repo.or.cz/nasm/test/perf/label.pl +18 -0
  393. data/vendor/repo.or.cz/nasm/test/perf/macro.pl +18 -0
  394. data/vendor/repo.or.cz/nasm/test/perf/token.pl +23 -0
  395. data/vendor/repo.or.cz/nasm/test/performtest.pl +192 -0
  396. data/vendor/repo.or.cz/nasm/test/pextrw.asm +3 -0
  397. data/vendor/repo.or.cz/nasm/test/pinsr16.asm +53 -0
  398. data/vendor/repo.or.cz/nasm/test/pinsr32.asm +53 -0
  399. data/vendor/repo.or.cz/nasm/test/pinsr64.asm +68 -0
  400. data/vendor/repo.or.cz/nasm/test/popcnt.asm +32 -0
  401. data/vendor/repo.or.cz/nasm/test/ppindirect.asm +42 -0
  402. data/vendor/repo.or.cz/nasm/test/pragma.asm +12 -0
  403. data/vendor/repo.or.cz/nasm/test/prefix66.asm +28 -0
  404. data/vendor/repo.or.cz/nasm/test/ptr.asm +4 -0
  405. data/vendor/repo.or.cz/nasm/test/pushseg.asm +17 -0
  406. data/vendor/repo.or.cz/nasm/test/r13.asm +15 -0
  407. data/vendor/repo.or.cz/nasm/test/radix.asm +54 -0
  408. data/vendor/repo.or.cz/nasm/test/rdpid.asm +21 -0
  409. data/vendor/repo.or.cz/nasm/test/reldef.asm +57 -0
  410. data/vendor/repo.or.cz/nasm/test/relocs.asm +20 -0
  411. data/vendor/repo.or.cz/nasm/test/riprel.asm +5357 -0
  412. data/vendor/repo.or.cz/nasm/test/riprel.pl +29 -0
  413. data/vendor/repo.or.cz/nasm/test/riprel2.asm +11 -0
  414. data/vendor/repo.or.cz/nasm/test/sha-64.asm +30 -0
  415. data/vendor/repo.or.cz/nasm/test/sha.asm +31 -0
  416. data/vendor/repo.or.cz/nasm/test/smartalign16.asm +36 -0
  417. data/vendor/repo.or.cz/nasm/test/smartalign32.asm +36 -0
  418. data/vendor/repo.or.cz/nasm/test/smartalign64.asm +36 -0
  419. data/vendor/repo.or.cz/nasm/test/splitea.asm +11 -0
  420. data/vendor/repo.or.cz/nasm/test/sreg.asm +65 -0
  421. data/vendor/repo.or.cz/nasm/test/strlen.asm +5 -0
  422. data/vendor/repo.or.cz/nasm/test/struc.asm +33 -0
  423. data/vendor/repo.or.cz/nasm/test/test67.asm +38 -0
  424. data/vendor/repo.or.cz/nasm/test/testdos.asm +13 -0
  425. data/vendor/repo.or.cz/nasm/test/testnos3.asm +973 -0
  426. data/vendor/repo.or.cz/nasm/test/time.asm +11 -0
  427. data/vendor/repo.or.cz/nasm/test/times.asm +21 -0
  428. data/vendor/repo.or.cz/nasm/test/timesneg.asm +3 -0
  429. data/vendor/repo.or.cz/nasm/test/tmap.nas +1447 -0
  430. data/vendor/repo.or.cz/nasm/test/uscore.asm +15 -0
  431. data/vendor/repo.or.cz/nasm/test/utf.asm +82 -0
  432. data/vendor/repo.or.cz/nasm/test/vaesenc.asm +22 -0
  433. data/vendor/repo.or.cz/nasm/test/vex.asm +9 -0
  434. data/vendor/repo.or.cz/nasm/test/vgather.asm +76 -0
  435. data/vendor/repo.or.cz/nasm/test/vmread.asm +26 -0
  436. data/vendor/repo.or.cz/nasm/test/weirdpaste.asm +29 -0
  437. data/vendor/repo.or.cz/nasm/test/xchg.asm +96 -0
  438. data/vendor/repo.or.cz/nasm/test/xcrypt.asm +24 -0
  439. data/vendor/repo.or.cz/nasm/test/xmm0.asm +12 -0
  440. data/vendor/repo.or.cz/nasm/test/zerobyte.asm +22 -0
  441. data/vendor/repo.or.cz/nasm/tools/cleanfile +176 -0
  442. data/vendor/repo.or.cz/nasm/tools/cleanpatch +258 -0
  443. data/vendor/repo.or.cz/nasm/tools/mkdep.pl +261 -0
  444. data/vendor/repo.or.cz/nasm/tools/release +105 -0
  445. data/vendor/repo.or.cz/nasm/tools/syncfiles.pl +137 -0
  446. data/vendor/repo.or.cz/nasm/tools/tag-release +58 -0
  447. data/vendor/repo.or.cz/nasm/version +1 -0
  448. data/vendor/repo.or.cz/nasm/version.pl +189 -0
  449. data/vendor/repo.or.cz/nasm/x86/disp8.c +131 -0
  450. data/vendor/repo.or.cz/nasm/x86/insns-iflags.ph +280 -0
  451. data/vendor/repo.or.cz/nasm/x86/insns.dat +5371 -0
  452. data/vendor/repo.or.cz/nasm/x86/insns.pl +1043 -0
  453. data/vendor/repo.or.cz/nasm/x86/regs.dat +138 -0
  454. data/vendor/repo.or.cz/nasm/x86/regs.pl +204 -0
  455. metadata +520 -0
@@ -0,0 +1,108 @@
1
+ #!/usr/bin/perl
2
+ ## --------------------------------------------------------------------------
3
+ ##
4
+ ## Copyright 1996-2017 The NASM Authors - All Rights Reserved
5
+ ## See the file AUTHORS included with the NASM distribution for
6
+ ## the specific copyright holders.
7
+ ##
8
+ ## Redistribution and use in source and binary forms, with or without
9
+ ## modification, are permitted provided that the following
10
+ ## conditions are met:
11
+ ##
12
+ ## * Redistributions of source code must retain the above copyright
13
+ ## notice, this list of conditions and the following disclaimer.
14
+ ## * Redistributions in binary form must reproduce the above
15
+ ## copyright notice, this list of conditions and the following
16
+ ## disclaimer in the documentation and/or other materials provided
17
+ ## with the distribution.
18
+ ##
19
+ ## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
20
+ ## CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
21
+ ## INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22
+ ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ ## DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24
+ ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
+ ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26
+ ## NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27
+ ## LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28
+ ## HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29
+ ## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
30
+ ## OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
31
+ ## EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
+ ##
33
+ ## --------------------------------------------------------------------------
34
+
35
+ #
36
+ # inslist.pl produce inslist.src
37
+ #
38
+
39
+ print STDERR "Reading insns.dat...\n";
40
+
41
+ @args = ();
42
+ undef $output;
43
+ foreach $arg ( @ARGV ) {
44
+ if ( $arg =~ /^\-/ ) {
45
+ if ( $arg =~ /^\-([adins])$/ ) {
46
+ $output = $1;
47
+ } else {
48
+ die "$0: Unknown option: ${arg}\n";
49
+ }
50
+ } else {
51
+ push (@args, $arg);
52
+ }
53
+ }
54
+
55
+ $fname = "../insns.dat" unless $fname = $args[0];
56
+ open (F, '<', $fname) || die "unable to open $fname";
57
+ print STDERR "Writing inslist.src...\n";
58
+ open S, '>', 'inslist.src';
59
+ $line = 0;
60
+ $insns = 0;
61
+ while (<F>) {
62
+ $line++;
63
+ next if (/^\s*$/); # blank lines
64
+ if ( /^\s*;/ ) # comments
65
+ {
66
+ if ( /^\s*;\#\s*(.+)/ ) # section subheader
67
+ {
68
+ print S "\n\\S{} $1\n\n";
69
+ }
70
+ next;
71
+ }
72
+ chomp;
73
+ unless (/^\s*(\S+)\s+(\S+)\s+(\S+|\[.*\])\s+(\S+)\s*$/) {
74
+ warn "line $line does not contain four fields\n";
75
+ next;
76
+ }
77
+ my @entry = ($1, $2, $3, $4);
78
+
79
+ $entry[1] =~ s/ignore//;
80
+ $entry[1] =~ s/void//;
81
+
82
+ my @flags = split(/,/, $entry[3]);
83
+ my @nflags;
84
+ undef $isavx512;
85
+ undef @avx512fl;
86
+ for my $fl (@flags) {
87
+ next if ($fl =~ /^(ignore|SB|SM|SM2|SQ|AR2|FUTURE)$/);
88
+
89
+ if ($fl =~ /^AVX512(.*)$/) {
90
+ $isavx512 = 1;
91
+ push(@avx512fl, $1) unless ($1 eq '');
92
+ } else {
93
+ push(@nflags,$fl);
94
+ }
95
+ }
96
+
97
+ if ($isavx512) {
98
+ unshift(@nflags, "AVX512".join('/', @avx512fl));
99
+ }
100
+
101
+ printf S "\\c %-16s %-24s %s\n",$entry[0],$entry[1], join(',', @nflags);
102
+ $insns++;
103
+ }
104
+ print S "\n";
105
+ close S;
106
+ close F;
107
+ printf STDERR "Done: %d instructions\n", $insns;
108
+
@@ -0,0 +1,290 @@
1
+ Internals of the Netwide Assembler
2
+ ==================================
3
+
4
+ The Netwide Assembler is intended to be a modular, re-usable x86
5
+ assembler, which can be embedded in other programs, for example as
6
+ the back end to a compiler.
7
+
8
+ The assembler is composed of modules. The interfaces between them
9
+ look like:
10
+
11
+ +--- preproc.c ----+
12
+ | |
13
+ +---- parser.c ----+
14
+ | | |
15
+ | float.c |
16
+ | |
17
+ +--- assemble.c ---+
18
+ | | |
19
+ nasm.c ---+ insnsa.c +--- nasmlib.c
20
+ | |
21
+ +--- listing.c ----+
22
+ | |
23
+ +---- labels.c ----+
24
+ | |
25
+ +--- outform.c ----+
26
+ | |
27
+ +----- *out.c -----+
28
+
29
+ In other words, each of `preproc.c', `parser.c', `assemble.c',
30
+ `labels.c', `listing.c', `outform.c' and each of the output format
31
+ modules `*out.c' are independent modules, which do not directly
32
+ inter-communicate except through the main program.
33
+
34
+ The Netwide *Disassembler* is not intended to be particularly
35
+ portable or reusable or anything, however. So I won't bother
36
+ documenting it here. :-)
37
+
38
+ nasmlib.c
39
+ ---------
40
+
41
+ This is a library module; it contains simple library routines which
42
+ may be referenced by all other modules. Among these are a set of
43
+ wrappers around the standard `malloc' routines, which will report a
44
+ fatal error if they run out of memory, rather than returning NULL.
45
+
46
+ preproc.c
47
+ ---------
48
+
49
+ This contains a macro preprocessor, which takes a file name as input
50
+ and returns a sequence of preprocessed source lines. The only symbol
51
+ exported from the module is `nasmpp', which is a data structure of
52
+ type `Preproc', declared in nasm.h. This structure contains pointers
53
+ to all the functions designed to be callable from outside the
54
+ module.
55
+
56
+ parser.c
57
+ --------
58
+
59
+ This contains a source-line parser. It parses `canonical' assembly
60
+ source lines, containing some combination of the `label', `opcode',
61
+ `operand' and `comment' fields: it does not process directives or
62
+ macros. It exports two functions: `parse_line' and `cleanup_insn'.
63
+
64
+ `parse_line' is the main parser function: you pass it a source line
65
+ in ASCII text form, and it returns you an `insn' structure
66
+ containing all the details of the instruction on that line. The
67
+ parameters it requires are:
68
+
69
+ - The location (segment, offset) where the instruction on this line
70
+ will eventually be placed. This is necessary in order to evaluate
71
+ expressions containing the Here token, `$'.
72
+
73
+ - A function which can be called to retrieve the value of any
74
+ symbols the source line references.
75
+
76
+ - Which pass the assembler is on: an undefined symbol only causes an
77
+ error condition on pass two.
78
+
79
+ - The source line to be parsed.
80
+
81
+ - A structure to fill with the results of the parse.
82
+
83
+ - A function which can be called to report errors.
84
+
85
+ Some instructions (DB, DW, DD for example) can require an arbitrary
86
+ amount of storage, and so some of the members of the resulting
87
+ `insn' structure will be dynamically allocated. The other function
88
+ exported by `parser.c' is `cleanup_insn', which can be called to
89
+ deallocate any dynamic storage associated with the results of a
90
+ parse.
91
+
92
+ names.c
93
+ -------
94
+
95
+ This doesn't count as a module - it defines a few arrays which are
96
+ shared between NASM and NDISASM, so it's a separate file which is
97
+ #included by both parser.c and disasm.c.
98
+
99
+ float.c
100
+ -------
101
+
102
+ This is essentially a library module: it exports one function,
103
+ `float_const', which converts an ASCII representation of a
104
+ floating-point number into an x86-compatible binary representation,
105
+ without using any built-in floating-point arithmetic (so it will run
106
+ on any platform, portably). It calls nothing, and is called only by
107
+ `parser.c'. Note that the function `float_const' must be passed an
108
+ error reporting routine.
109
+
110
+ assemble.c
111
+ ----------
112
+
113
+ This module contains the code generator: it translates `insn'
114
+ structures as returned from the parser module into actual generated
115
+ code which can be placed in an output file. It exports two
116
+ functions, `assemble' and `insn_size'.
117
+
118
+ `insn_size' is designed to be called on pass one of assembly: it
119
+ takes an `insn' structure as input, and returns the amount of space
120
+ that would be taken up if the instruction described in the structure
121
+ were to be converted to real machine code. `insn_size' also requires
122
+ to be told the location (as a segment/offset pair) where the
123
+ instruction would be assembled, the mode of assembly (16/32 bit
124
+ default), and a function it can call to report errors.
125
+
126
+ `assemble' is designed to be called on pass two: it takes all the
127
+ parameters that `insn_size' does, but has an extra parameter which
128
+ is an output driver. `assemble' actually converts the input
129
+ instruction into machine code, and outputs the machine code by means
130
+ of calling the `output' function of the driver.
131
+
132
+ insnsa.c
133
+ --------
134
+
135
+ This is another library module: it exports one very big array of
136
+ instruction translations. It is generated automatically from the
137
+ insns.dat file by the insns.pl script.
138
+
139
+ labels.c
140
+ --------
141
+
142
+ This module contains a label manager. It exports six functions:
143
+
144
+ `init_labels' should be called before any other function in the
145
+ module. `cleanup_labels' may be called after all other use of the
146
+ module has finished, to deallocate storage.
147
+
148
+ `define_label' is called to define new labels: you pass it the name
149
+ of the label to be defined, and the (segment,offset) pair giving the
150
+ value of the label. It is also passed an error-reporting function,
151
+ and an output driver structure (so that it can call the output
152
+ driver's label-definition function). `define_label' mentally
153
+ prepends the name of the most recently defined non-local label to
154
+ any label beginning with a period.
155
+
156
+ `define_label_stub' is designed to be called in pass two, once all
157
+ the labels have already been defined: it does nothing except to
158
+ update the "most-recently-defined-non-local-label" status, so that
159
+ references to local labels in pass two will work correctly.
160
+
161
+ `declare_as_global' is used to declare that a label should be
162
+ global. It must be called _before_ the label in question is defined.
163
+
164
+ Finally, `lookup_label' attempts to translate a label name into a
165
+ (segment,offset) pair. It returns non-zero on success.
166
+
167
+ The label manager module is (theoretically :) restartable: after
168
+ calling `cleanup_labels', you can call `init_labels' again, and
169
+ start a new assembly with a new set of symbols.
170
+
171
+ listing.c
172
+ ---------
173
+
174
+ This file contains the listing file generator. The interface to the
175
+ module is through the one symbol it exports, `nasmlist', which is a
176
+ structure containing six function pointers. The calling semantics of
177
+ these functions isn't terribly well thought out, as yet, but it
178
+ works (just about) so it's going to get left alone for now...
179
+
180
+ outform.c
181
+ ---------
182
+
183
+ This small module contains a set of routines to manage a list of
184
+ output formats, and select one given a keyword. It contains three
185
+ small routines: `ofmt_register' which registers an output driver as
186
+ part of the managed list, `ofmt_list' which lists the available
187
+ drivers on stdout, and `ofmt_find' which tries to find the driver
188
+ corresponding to a given name.
189
+
190
+ The output modules
191
+ ------------------
192
+
193
+ Each of the output modules, `outbin.o', `outelf.o' and so on,
194
+ exports only one symbol, which is an output driver data structure
195
+ containing pointers to all the functions needed to produce output
196
+ files of the appropriate type.
197
+
198
+ The exception to this is `outcoff.o', which exports _two_ output
199
+ driver structures, since COFF and Win32 object file formats are very
200
+ similar and most of the code is shared between them.
201
+
202
+ nasm.c
203
+ ------
204
+
205
+ This is the main program: it calls all the functions in the above
206
+ modules, and puts them together to form a working assembler. We
207
+ hope. :-)
208
+
209
+ Segment Mechanism
210
+ -----------------
211
+
212
+ In NASM, the term `segment' is used to separate the different
213
+ sections/segments/groups of which an object file is composed.
214
+ Essentially, every address NASM is capable of understanding is
215
+ expressed as an offset from the beginning of some segment.
216
+
217
+ The defining property of a segment is that if two symbols are
218
+ declared in the same segment, then the distance between them is
219
+ fixed at assembly time. Hence every externally-declared variable
220
+ must be declared in its own segment, since none of the locations of
221
+ these are known, and so no distances may be computed at assembly
222
+ time.
223
+
224
+ The special segment value NO_SEG (-1) is used to denote an absolute
225
+ value, e.g. a constant whose value does not depend on relocation,
226
+ such as the _size_ of a data object.
227
+
228
+ Apart from NO_SEG, segment indices all have their least significant
229
+ bit clear, if they refer to actual in-memory segments. For each
230
+ segment of this type, there is an auxiliary segment value, defined
231
+ to be the same number but with the LSB set, which denotes the
232
+ segment-base value of that segment, for object formats which support
233
+ it (Microsoft .OBJ, for example).
234
+
235
+ Hence, if `textsym' is declared in a code segment with index 2, then
236
+ referencing `SEG textsym' would return zero offset from
237
+ segment-index 3. Or, in object formats which don't understand such
238
+ references, it would return an error instead.
239
+
240
+ The next twist is SEG_ABS. Some symbols may be declared with a
241
+ segment value of SEG_ABS plus a 16-bit constant: this indicates that
242
+ they are far-absolute symbols, such as the BIOS keyboard buffer
243
+ under MS-DOS, which always resides at 0040h:001Eh. Far-absolutes are
244
+ handled with care in the parser, since they are supposed to evaluate
245
+ simply to their offset part within expressions, but applying SEG to
246
+ one should yield its segment part. A far-absolute should never find
247
+ its way _out_ of the parser, unless it is enclosed in a WRT clause,
248
+ in which case Microsoft 16-bit object formats will want to know
249
+ about it.
250
+
251
+ Porting Issues
252
+ --------------
253
+
254
+ We have tried to write NASM in portable ANSI C: we do not assume
255
+ little-endianness or any hardware characteristics (in order that
256
+ NASM should work as a cross-assembler for x86 platforms, even when
257
+ run on other, stranger machines).
258
+
259
+ Assumptions we _have_ made are:
260
+
261
+ - We assume that `short' is at least 16 bits, and `long' at least
262
+ 32. This really _shouldn't_ be a problem, since Kernighan and
263
+ Ritchie tell us we are entitled to do so.
264
+
265
+ - We rely on having more than 6 characters of significance on
266
+ externally linked symbols in the NASM sources. This may get fixed
267
+ at some point. We haven't yet come across a linker brain-dead
268
+ enough to get it wrong anyway.
269
+
270
+ - We assume that `fopen' using the mode "wb" can be used to write
271
+ binary data files. This may be wrong on systems like VMS, with a
272
+ strange file system. Though why you'd want to run NASM on VMS is
273
+ beyond me anyway.
274
+
275
+ That's it. Subject to those caveats, NASM should be completely
276
+ portable. If not, we _really_ want to know about it.
277
+
278
+ Porting Non-Issues
279
+ ------------------
280
+
281
+ The following is _not_ a portability problem, although it looks like
282
+ one.
283
+
284
+ - When compiling with some versions of DJGPP, you may get errors
285
+ such as `warning: ANSI C forbids braced-groups within
286
+ expressions'. This isn't NASM's fault - the problem seems to be
287
+ that DJGPP's definitions of the <ctype.h> macros include a
288
+ GNU-specific C extension. So when compiling using -ansi and
289
+ -pedantic, DJGPP complains about its own header files. It isn't a
290
+ problem anyway, since it still generates correct code.
@@ -0,0 +1 @@
1
+ /* Add site-local nasmdoc style configuration to this file */
@@ -0,0 +1,150 @@
1
+ body {
2
+ font-family: "source sans pro", "clear sans", "liberation sans",
3
+ "arial", "sans-serif";
4
+ background: white;
5
+ }
6
+ div.title {
7
+ text-align: center;
8
+ font-weight: bold;
9
+ margin: 0.67em 0;
10
+ }
11
+ h1 {
12
+ font-size: 2em;
13
+ margin: 0;
14
+ }
15
+ span.subtitle {
16
+ font-size: 1.25em;
17
+ font-style: italic;
18
+ }
19
+ code, pre {
20
+ font-family: "source code pro", "liberation mono", "monospace";
21
+ }
22
+ pre, blockquote {
23
+ margin-left: 4em;
24
+ margin-right: 4em;
25
+ }
26
+ code {
27
+ display: inline;
28
+ white-space: nowrap;
29
+ }
30
+ a {
31
+ text-decoration: none;
32
+ }
33
+ div.toc {
34
+ padding-left: 0;
35
+ font-size: 195%;
36
+ }
37
+ div.toc li {
38
+ list-style-type: none;
39
+ padding-left: 0;
40
+ }
41
+ div.toc ol {
42
+ padding-left: 2em;
43
+ font-size: 80%;
44
+ }
45
+ li.toc1 {
46
+ padding-top: 0.7em;
47
+ }
48
+ li.toc2 {
49
+ padding-top: 0.3em;
50
+ }
51
+ ul.index {
52
+ list-style-type: none;
53
+ }
54
+ @media not screen {
55
+ ul.navbar {
56
+ display: none;
57
+ }
58
+ }
59
+ @media print {
60
+ a {
61
+ color: inherit;
62
+ }
63
+ }
64
+ @media only screen {
65
+ div.contents {
66
+ -webkit-column-gap: 4em;
67
+ -webkit-column-rule: 1px dotted black;
68
+ -moz-column-gap: 4em;
69
+ -moz-column-rule: 1px dotted black;
70
+ column-gap: 4em;
71
+ column-rule: 1px dotted black;
72
+ }
73
+ }
74
+ @media only screen and (min-width: 90em) {
75
+ /* For a very wide screen, go to a columnar layout */
76
+ div.contents {
77
+ -webkit-column-count: 2;
78
+ -moz-column-count: 2;
79
+ column-count: 2;
80
+ }
81
+ }
82
+ @media only screen and (min-width: 135em) {
83
+ div.contents {
84
+ -webkit-column-count: 3;
85
+ -moz-column-count: 3;
86
+ column-count: 3;
87
+ }
88
+ }
89
+ @media screen {
90
+ /* Setting an explicit margin to keep the navbar from moving */
91
+ body {
92
+ padding: 0;
93
+ margin: 8px;
94
+ }
95
+
96
+ /* Link styles */
97
+ a:link {
98
+ color: #33c;
99
+ }
100
+ a:visited {
101
+ color: #338;
102
+ }
103
+ a:hover {
104
+ background: #ccc;
105
+ }
106
+ a:active {
107
+ color: #f33;
108
+ background: #ccc;
109
+ }
110
+
111
+ /* Trick to avoid the navbar hiding the the target of an # link */
112
+ :target {
113
+ margin-top: -10vh;
114
+ padding-top: 10vh;
115
+ background: #ffa; /* Highlight the jump target */
116
+ background-clip: content-box;
117
+ }
118
+
119
+ ul.navbar {
120
+ display: block;
121
+ position: sticky;
122
+ top: 8px;
123
+ width: 100%;
124
+ margin: 0;
125
+ padding: 0;
126
+ overflow: hidden;
127
+ white-space: nowrap;
128
+ list-style-type: none;
129
+ background: #336 url("nasmlogw.png") no-repeat right center;
130
+ background-size: contain;
131
+ }
132
+
133
+ ul.navbar li {
134
+ float: left;
135
+ }
136
+ ul.navbar li.last {
137
+ border-right: none;
138
+ }
139
+ ul.navbar a {
140
+ border-right: 1px solid #bbb;
141
+ display: block;
142
+ color: white;
143
+ text-align: center;
144
+ padding: 1em 1.5em;
145
+ text-decoration: none;
146
+ }
147
+ ul.navbar a:hover {
148
+ background-color: #448;
149
+ }
150
+ }