laag-nasm 2.13.03.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +57 -0
- data/LICENSE.txt +29 -0
- data/README.org +34 -0
- data/ext/laag/nasm/extconf.rb +16 -0
- data/laag-nasm.gemspec +20 -0
- data/lib/laag/nasm.rb +29 -0
- data/patches/Makefile.in.patch +13 -0
- data/vendor/repo.or.cz/nasm/.gitignore +102 -0
- data/vendor/repo.or.cz/nasm/AUTHORS +137 -0
- data/vendor/repo.or.cz/nasm/CHANGES +2 -0
- data/vendor/repo.or.cz/nasm/ChangeLog +2905 -0
- data/vendor/repo.or.cz/nasm/INSTALL +102 -0
- data/vendor/repo.or.cz/nasm/LICENSE +29 -0
- data/vendor/repo.or.cz/nasm/Makefile.in +855 -0
- data/vendor/repo.or.cz/nasm/Mkfiles/README +46 -0
- data/vendor/repo.or.cz/nasm/Mkfiles/msvc.mak +732 -0
- data/vendor/repo.or.cz/nasm/Mkfiles/openwcom.mak +706 -0
- data/vendor/repo.or.cz/nasm/README +23 -0
- data/vendor/repo.or.cz/nasm/SubmittingPatches +116 -0
- data/vendor/repo.or.cz/nasm/TODO +376 -0
- data/vendor/repo.or.cz/nasm/aclocal.m4 +139 -0
- data/vendor/repo.or.cz/nasm/asm/assemble.c +2957 -0
- data/vendor/repo.or.cz/nasm/asm/assemble.h +54 -0
- data/vendor/repo.or.cz/nasm/asm/directiv.c +566 -0
- data/vendor/repo.or.cz/nasm/asm/directiv.dat +92 -0
- data/vendor/repo.or.cz/nasm/asm/error.c +202 -0
- data/vendor/repo.or.cz/nasm/asm/eval.c +1014 -0
- data/vendor/repo.or.cz/nasm/asm/eval.h +49 -0
- data/vendor/repo.or.cz/nasm/asm/exprdump.c +79 -0
- data/vendor/repo.or.cz/nasm/asm/exprlib.c +200 -0
- data/vendor/repo.or.cz/nasm/asm/float.c +952 -0
- data/vendor/repo.or.cz/nasm/asm/float.h +54 -0
- data/vendor/repo.or.cz/nasm/asm/labels.c +540 -0
- data/vendor/repo.or.cz/nasm/asm/listing.c +346 -0
- data/vendor/repo.or.cz/nasm/asm/listing.h +113 -0
- data/vendor/repo.or.cz/nasm/asm/nasm.c +1855 -0
- data/vendor/repo.or.cz/nasm/asm/parser.c +1167 -0
- data/vendor/repo.or.cz/nasm/asm/parser.h +45 -0
- data/vendor/repo.or.cz/nasm/asm/phash.pl +109 -0
- data/vendor/repo.or.cz/nasm/asm/pptok.dat +96 -0
- data/vendor/repo.or.cz/nasm/asm/pptok.pl +271 -0
- data/vendor/repo.or.cz/nasm/asm/pragma.c +218 -0
- data/vendor/repo.or.cz/nasm/asm/preproc-nop.c +188 -0
- data/vendor/repo.or.cz/nasm/asm/preproc.c +5459 -0
- data/vendor/repo.or.cz/nasm/asm/preproc.h +55 -0
- data/vendor/repo.or.cz/nasm/asm/quote.c +479 -0
- data/vendor/repo.or.cz/nasm/asm/quote.h +44 -0
- data/vendor/repo.or.cz/nasm/asm/rdstrnum.c +68 -0
- data/vendor/repo.or.cz/nasm/asm/segalloc.c +51 -0
- data/vendor/repo.or.cz/nasm/asm/stdscan.c +345 -0
- data/vendor/repo.or.cz/nasm/asm/stdscan.h +49 -0
- data/vendor/repo.or.cz/nasm/asm/strfunc.c +359 -0
- data/vendor/repo.or.cz/nasm/asm/tokens.dat +135 -0
- data/vendor/repo.or.cz/nasm/asm/tokhash.pl +284 -0
- data/vendor/repo.or.cz/nasm/autogen.sh +9 -0
- data/vendor/repo.or.cz/nasm/common/common.c +122 -0
- data/vendor/repo.or.cz/nasm/config/msvc.h +192 -0
- data/vendor/repo.or.cz/nasm/config/unknown.h +51 -0
- data/vendor/repo.or.cz/nasm/config/watcom.h +74 -0
- data/vendor/repo.or.cz/nasm/configure.ac +253 -0
- data/vendor/repo.or.cz/nasm/contrib/MSVC6.txt +25 -0
- data/vendor/repo.or.cz/nasm/contrib/VSrules/nasm.README +16 -0
- data/vendor/repo.or.cz/nasm/contrib/VSrules/nasm.rules +79 -0
- data/vendor/repo.or.cz/nasm/disasm/disasm.c +1735 -0
- data/vendor/repo.or.cz/nasm/disasm/disasm.h +49 -0
- data/vendor/repo.or.cz/nasm/disasm/ndisasm.c +397 -0
- data/vendor/repo.or.cz/nasm/disasm/sync.c +132 -0
- data/vendor/repo.or.cz/nasm/disasm/sync.h +45 -0
- data/vendor/repo.or.cz/nasm/doc/Makefile.in +86 -0
- data/vendor/repo.or.cz/nasm/doc/README +20 -0
- data/vendor/repo.or.cz/nasm/doc/afmmetrics.ph +102 -0
- data/vendor/repo.or.cz/nasm/doc/changes.src +2588 -0
- data/vendor/repo.or.cz/nasm/doc/findfont.ph +180 -0
- data/vendor/repo.or.cz/nasm/doc/genps.pl +1294 -0
- data/vendor/repo.or.cz/nasm/doc/inslist.pl +108 -0
- data/vendor/repo.or.cz/nasm/doc/internal.doc +290 -0
- data/vendor/repo.or.cz/nasm/doc/local.css +1 -0
- data/vendor/repo.or.cz/nasm/doc/nasmdoc.css +150 -0
- data/vendor/repo.or.cz/nasm/doc/nasmdoc.src +8309 -0
- data/vendor/repo.or.cz/nasm/doc/nasmlogo.eps +212 -0
- data/vendor/repo.or.cz/nasm/doc/nasmlogw.png +0 -0
- data/vendor/repo.or.cz/nasm/doc/psfonts.ph +53 -0
- data/vendor/repo.or.cz/nasm/doc/pspdf.pl +98 -0
- data/vendor/repo.or.cz/nasm/doc/pswidth.ph +25 -0
- data/vendor/repo.or.cz/nasm/doc/rdsrc.pl +1111 -0
- data/vendor/repo.or.cz/nasm/doc/ttfmetrics.ph +63 -0
- data/vendor/repo.or.cz/nasm/headers/c +33 -0
- data/vendor/repo.or.cz/nasm/headers/doc +33 -0
- data/vendor/repo.or.cz/nasm/headers/mac +33 -0
- data/vendor/repo.or.cz/nasm/headers/perl +33 -0
- data/vendor/repo.or.cz/nasm/include/compiler.h +277 -0
- data/vendor/repo.or.cz/nasm/include/disp8.h +45 -0
- data/vendor/repo.or.cz/nasm/include/error.h +135 -0
- data/vendor/repo.or.cz/nasm/include/hashtbl.h +85 -0
- data/vendor/repo.or.cz/nasm/include/iflag.h +173 -0
- data/vendor/repo.or.cz/nasm/include/insns.h +76 -0
- data/vendor/repo.or.cz/nasm/include/labels.h +60 -0
- data/vendor/repo.or.cz/nasm/include/md5.h +21 -0
- data/vendor/repo.or.cz/nasm/include/nasm.h +1246 -0
- data/vendor/repo.or.cz/nasm/include/nasmint.h +219 -0
- data/vendor/repo.or.cz/nasm/include/nasmlib.h +524 -0
- data/vendor/repo.or.cz/nasm/include/opflags.h +271 -0
- data/vendor/repo.or.cz/nasm/include/perfhash.h +52 -0
- data/vendor/repo.or.cz/nasm/include/raa.h +46 -0
- data/vendor/repo.or.cz/nasm/include/rbtree.h +51 -0
- data/vendor/repo.or.cz/nasm/include/rdoff.h +169 -0
- data/vendor/repo.or.cz/nasm/include/saa.h +94 -0
- data/vendor/repo.or.cz/nasm/include/strlist.h +55 -0
- data/vendor/repo.or.cz/nasm/include/tables.h +70 -0
- data/vendor/repo.or.cz/nasm/include/ver.h +47 -0
- data/vendor/repo.or.cz/nasm/install-sh +250 -0
- data/vendor/repo.or.cz/nasm/macros/altreg.mac +107 -0
- data/vendor/repo.or.cz/nasm/macros/fp.mac +54 -0
- data/vendor/repo.or.cz/nasm/macros/ifunc.mac +48 -0
- data/vendor/repo.or.cz/nasm/macros/macros.pl +294 -0
- data/vendor/repo.or.cz/nasm/macros/smartalign.mac +189 -0
- data/vendor/repo.or.cz/nasm/macros/standard.mac +226 -0
- data/vendor/repo.or.cz/nasm/misc/Doxyfile +752 -0
- data/vendor/repo.or.cz/nasm/misc/Nindent +18 -0
- data/vendor/repo.or.cz/nasm/misc/README +2 -0
- data/vendor/repo.or.cz/nasm/misc/c16.mac +82 -0
- data/vendor/repo.or.cz/nasm/misc/c32.mac +52 -0
- data/vendor/repo.or.cz/nasm/misc/crcgen.c +44 -0
- data/vendor/repo.or.cz/nasm/misc/exebin.mac +57 -0
- data/vendor/repo.or.cz/nasm/misc/exebin2.mac +114 -0
- data/vendor/repo.or.cz/nasm/misc/fmtinsns.pl +40 -0
- data/vendor/repo.or.cz/nasm/misc/genfma.pl +63 -0
- data/vendor/repo.or.cz/nasm/misc/hints.txt +26 -0
- data/vendor/repo.or.cz/nasm/misc/magic +6 -0
- data/vendor/repo.or.cz/nasm/misc/myC32.mac +121 -0
- data/vendor/repo.or.cz/nasm/misc/nasm.sl +320 -0
- data/vendor/repo.or.cz/nasm/misc/nasmstab +296 -0
- data/vendor/repo.or.cz/nasm/misc/omfdump.c +517 -0
- data/vendor/repo.or.cz/nasm/misc/pmw.bat +9 -0
- data/vendor/repo.or.cz/nasm/misc/proc32.ash +441 -0
- data/vendor/repo.or.cz/nasm/misc/scitech.mac +1223 -0
- data/vendor/repo.or.cz/nasm/misc/xcrcgen.c +80 -0
- data/vendor/repo.or.cz/nasm/nasm.spec.in +83 -0
- data/vendor/repo.or.cz/nasm/nasm.spec.sed +3 -0
- data/vendor/repo.or.cz/nasm/nasm.txt +306 -0
- data/vendor/repo.or.cz/nasm/nasmlib/badenum.c +43 -0
- data/vendor/repo.or.cz/nasm/nasmlib/bsi.c +77 -0
- data/vendor/repo.or.cz/nasm/nasmlib/crc64.c +189 -0
- data/vendor/repo.or.cz/nasm/nasmlib/file.c +259 -0
- data/vendor/repo.or.cz/nasm/nasmlib/file.h +128 -0
- data/vendor/repo.or.cz/nasm/nasmlib/filename.c +69 -0
- data/vendor/repo.or.cz/nasm/nasmlib/hashtbl.c +232 -0
- data/vendor/repo.or.cz/nasm/nasmlib/ilog2.c +168 -0
- data/vendor/repo.or.cz/nasm/nasmlib/malloc.c +108 -0
- data/vendor/repo.or.cz/nasm/nasmlib/md5c.c +247 -0
- data/vendor/repo.or.cz/nasm/nasmlib/mmap.c +139 -0
- data/vendor/repo.or.cz/nasm/nasmlib/path.c +186 -0
- data/vendor/repo.or.cz/nasm/nasmlib/perfhash.c +55 -0
- data/vendor/repo.or.cz/nasm/nasmlib/perfhash.pl +362 -0
- data/vendor/repo.or.cz/nasm/nasmlib/raa.c +173 -0
- data/vendor/repo.or.cz/nasm/nasmlib/rbtree.c +119 -0
- data/vendor/repo.or.cz/nasm/nasmlib/readnum.c +172 -0
- data/vendor/repo.or.cz/nasm/nasmlib/realpath.c +135 -0
- data/vendor/repo.or.cz/nasm/nasmlib/saa.c +431 -0
- data/vendor/repo.or.cz/nasm/nasmlib/srcfile.c +128 -0
- data/vendor/repo.or.cz/nasm/nasmlib/string.c +242 -0
- data/vendor/repo.or.cz/nasm/nasmlib/strlist.c +100 -0
- data/vendor/repo.or.cz/nasm/nasmlib/ver.c +51 -0
- data/vendor/repo.or.cz/nasm/nasmlib/zerobuf.c +42 -0
- data/vendor/repo.or.cz/nasm/ndisasm.txt +94 -0
- data/vendor/repo.or.cz/nasm/nsis/NASMMultiUser.nsh +478 -0
- data/vendor/repo.or.cz/nasm/nsis/getpearch.pl +76 -0
- data/vendor/repo.or.cz/nasm/nsis/nasm-un.ico +0 -0
- data/vendor/repo.or.cz/nasm/nsis/nasm.ico +0 -0
- data/vendor/repo.or.cz/nasm/nsis/nasm.nsi +241 -0
- data/vendor/repo.or.cz/nasm/output/codeview.c +814 -0
- data/vendor/repo.or.cz/nasm/output/dwarf.h +566 -0
- data/vendor/repo.or.cz/nasm/output/elf.h +537 -0
- data/vendor/repo.or.cz/nasm/output/legacy.c +112 -0
- data/vendor/repo.or.cz/nasm/output/nulldbg.c +93 -0
- data/vendor/repo.or.cz/nasm/output/nullout.c +51 -0
- data/vendor/repo.or.cz/nasm/output/outaout.c +954 -0
- data/vendor/repo.or.cz/nasm/output/outaout.mac +37 -0
- data/vendor/repo.or.cz/nasm/output/outas86.c +650 -0
- data/vendor/repo.or.cz/nasm/output/outas86.mac +37 -0
- data/vendor/repo.or.cz/nasm/output/outbin.c +1713 -0
- data/vendor/repo.or.cz/nasm/output/outbin.mac +40 -0
- data/vendor/repo.or.cz/nasm/output/outcoff.c +1242 -0
- data/vendor/repo.or.cz/nasm/output/outcoff.mac +43 -0
- data/vendor/repo.or.cz/nasm/output/outdbg.c +425 -0
- data/vendor/repo.or.cz/nasm/output/outelf.c +3370 -0
- data/vendor/repo.or.cz/nasm/output/outelf.h +156 -0
- data/vendor/repo.or.cz/nasm/output/outelf.mac +41 -0
- data/vendor/repo.or.cz/nasm/output/outform.c +120 -0
- data/vendor/repo.or.cz/nasm/output/outform.h +379 -0
- data/vendor/repo.or.cz/nasm/output/outieee.c +1528 -0
- data/vendor/repo.or.cz/nasm/output/outlib.c +58 -0
- data/vendor/repo.or.cz/nasm/output/outlib.h +63 -0
- data/vendor/repo.or.cz/nasm/output/outmacho.c +2387 -0
- data/vendor/repo.or.cz/nasm/output/outmacho.mac +49 -0
- data/vendor/repo.or.cz/nasm/output/outobj.c +2725 -0
- data/vendor/repo.or.cz/nasm/output/outobj.mac +49 -0
- data/vendor/repo.or.cz/nasm/output/outrdf.mac +40 -0
- data/vendor/repo.or.cz/nasm/output/outrdf2.c +791 -0
- data/vendor/repo.or.cz/nasm/output/outrdf2.mac +43 -0
- data/vendor/repo.or.cz/nasm/output/pecoff.h +532 -0
- data/vendor/repo.or.cz/nasm/output/stabs.h +144 -0
- data/vendor/repo.or.cz/nasm/perllib/crc64.ph +158 -0
- data/vendor/repo.or.cz/nasm/perllib/gensv.pl +34 -0
- data/vendor/repo.or.cz/nasm/perllib/phash.ph +200 -0
- data/vendor/repo.or.cz/nasm/perllib/random_sv_vectors.ph +67 -0
- data/vendor/repo.or.cz/nasm/rdoff/README +185 -0
- data/vendor/repo.or.cz/nasm/rdoff/collectn.c +44 -0
- data/vendor/repo.or.cz/nasm/rdoff/collectn.h +22 -0
- data/vendor/repo.or.cz/nasm/rdoff/doc/Makefile +37 -0
- data/vendor/repo.or.cz/nasm/rdoff/doc/rdoff.texi +137 -0
- data/vendor/repo.or.cz/nasm/rdoff/doc/v1-v2.txt +62 -0
- data/vendor/repo.or.cz/nasm/rdoff/hash.c +122 -0
- data/vendor/repo.or.cz/nasm/rdoff/hash.h +17 -0
- data/vendor/repo.or.cz/nasm/rdoff/ldrdf.1 +41 -0
- data/vendor/repo.or.cz/nasm/rdoff/ldrdf.c +1395 -0
- data/vendor/repo.or.cz/nasm/rdoff/ldsegs.h +59 -0
- data/vendor/repo.or.cz/nasm/rdoff/rdf2bin.1 +65 -0
- data/vendor/repo.or.cz/nasm/rdoff/rdf2bin.c +431 -0
- data/vendor/repo.or.cz/nasm/rdoff/rdf2com.1 +1 -0
- data/vendor/repo.or.cz/nasm/rdoff/rdf2ihx.1 +1 -0
- data/vendor/repo.or.cz/nasm/rdoff/rdf2ith.1 +1 -0
- data/vendor/repo.or.cz/nasm/rdoff/rdf2srec.1 +1 -0
- data/vendor/repo.or.cz/nasm/rdoff/rdfdump.1 +24 -0
- data/vendor/repo.or.cz/nasm/rdoff/rdfdump.c +347 -0
- data/vendor/repo.or.cz/nasm/rdoff/rdflib.1 +39 -0
- data/vendor/repo.or.cz/nasm/rdoff/rdflib.c +434 -0
- data/vendor/repo.or.cz/nasm/rdoff/rdfload.c +213 -0
- data/vendor/repo.or.cz/nasm/rdoff/rdfload.h +29 -0
- data/vendor/repo.or.cz/nasm/rdoff/rdfutils.h +165 -0
- data/vendor/repo.or.cz/nasm/rdoff/rdlar.c +492 -0
- data/vendor/repo.or.cz/nasm/rdoff/rdlar.h +34 -0
- data/vendor/repo.or.cz/nasm/rdoff/rdlib.c +290 -0
- data/vendor/repo.or.cz/nasm/rdoff/rdlib.h +62 -0
- data/vendor/repo.or.cz/nasm/rdoff/rdoff.c +621 -0
- data/vendor/repo.or.cz/nasm/rdoff/rdx.1 +21 -0
- data/vendor/repo.or.cz/nasm/rdoff/rdx.c +90 -0
- data/vendor/repo.or.cz/nasm/rdoff/segtab.c +172 -0
- data/vendor/repo.or.cz/nasm/rdoff/segtab.h +45 -0
- data/vendor/repo.or.cz/nasm/rdoff/symtab.c +159 -0
- data/vendor/repo.or.cz/nasm/rdoff/symtab.h +55 -0
- data/vendor/repo.or.cz/nasm/rdoff/test/Makefile +10 -0
- data/vendor/repo.or.cz/nasm/rdoff/test/makelib.sh +14 -0
- data/vendor/repo.or.cz/nasm/rdoff/test/rdfseg.asm +20 -0
- data/vendor/repo.or.cz/nasm/rdoff/test/rdfseg2.asm +12 -0
- data/vendor/repo.or.cz/nasm/rdoff/test/rdftest1.asm +54 -0
- data/vendor/repo.or.cz/nasm/rdoff/test/rdftest2.asm +33 -0
- data/vendor/repo.or.cz/nasm/rdoff/test/rdtlib.asm +48 -0
- data/vendor/repo.or.cz/nasm/rdoff/test/rdtmain.asm +47 -0
- data/vendor/repo.or.cz/nasm/rdoff/test/testlib.asm +18 -0
- data/vendor/repo.or.cz/nasm/stdlib/snprintf.c +29 -0
- data/vendor/repo.or.cz/nasm/stdlib/strlcpy.c +51 -0
- data/vendor/repo.or.cz/nasm/stdlib/strnlen.c +46 -0
- data/vendor/repo.or.cz/nasm/stdlib/vsnprintf.c +51 -0
- data/vendor/repo.or.cz/nasm/test/Makefile +106 -0
- data/vendor/repo.or.cz/nasm/test/_file_.asm +5 -0
- data/vendor/repo.or.cz/nasm/test/_version.asm +2 -0
- data/vendor/repo.or.cz/nasm/test/a32offs.asm +9 -0
- data/vendor/repo.or.cz/nasm/test/absolute.asm +40 -0
- data/vendor/repo.or.cz/nasm/test/addr64x.asm +18 -0
- data/vendor/repo.or.cz/nasm/test/align13.asm +19 -0
- data/vendor/repo.or.cz/nasm/test/align13s.asm +20 -0
- data/vendor/repo.or.cz/nasm/test/alonesym-obj.asm +166 -0
- data/vendor/repo.or.cz/nasm/test/andbyte.asm +15 -0
- data/vendor/repo.or.cz/nasm/test/aoutso.asm +99 -0
- data/vendor/repo.or.cz/nasm/test/aouttest.asm +86 -0
- data/vendor/repo.or.cz/nasm/test/aouttest.c +36 -0
- data/vendor/repo.or.cz/nasm/test/avx.asm +46 -0
- data/vendor/repo.or.cz/nasm/test/avx005.asm +529 -0
- data/vendor/repo.or.cz/nasm/test/avx2.asm +1608 -0
- data/vendor/repo.or.cz/nasm/test/avx512cd.asm +106 -0
- data/vendor/repo.or.cz/nasm/test/avx512er.asm +144 -0
- data/vendor/repo.or.cz/nasm/test/avx512f.asm +7000 -0
- data/vendor/repo.or.cz/nasm/test/avx512pf.asm +88 -0
- data/vendor/repo.or.cz/nasm/test/bcd.asm +23 -0
- data/vendor/repo.or.cz/nasm/test/binexe.asm +35 -0
- data/vendor/repo.or.cz/nasm/test/bintest.asm +59 -0
- data/vendor/repo.or.cz/nasm/test/bisect.sh +22 -0
- data/vendor/repo.or.cz/nasm/test/br1879590.asm +25 -0
- data/vendor/repo.or.cz/nasm/test/br2003451.asm +17 -0
- data/vendor/repo.or.cz/nasm/test/br2030823.asm +7 -0
- data/vendor/repo.or.cz/nasm/test/br2148476.asm +221 -0
- data/vendor/repo.or.cz/nasm/test/br2222615.asm +19 -0
- data/vendor/repo.or.cz/nasm/test/br2496848.asm +42 -0
- data/vendor/repo.or.cz/nasm/test/br3005117.asm +26 -0
- data/vendor/repo.or.cz/nasm/test/br3026808.asm +20 -0
- data/vendor/repo.or.cz/nasm/test/br3028880.asm +8 -0
- data/vendor/repo.or.cz/nasm/test/br3041451.asm +59 -0
- data/vendor/repo.or.cz/nasm/test/br3058845.asm +14 -0
- data/vendor/repo.or.cz/nasm/test/br3066383.asm +70 -0
- data/vendor/repo.or.cz/nasm/test/br3074517.asm +12 -0
- data/vendor/repo.or.cz/nasm/test/br3092924.asm +25 -0
- data/vendor/repo.or.cz/nasm/test/br3104312.asm +11 -0
- data/vendor/repo.or.cz/nasm/test/br3109604.asm +9 -0
- data/vendor/repo.or.cz/nasm/test/br3174983.asm +9 -0
- data/vendor/repo.or.cz/nasm/test/br3187743.asm +7 -0
- data/vendor/repo.or.cz/nasm/test/br3189064.asm +7 -0
- data/vendor/repo.or.cz/nasm/test/br3200749.asm +9 -0
- data/vendor/repo.or.cz/nasm/test/br3385573.asm +11 -0
- data/vendor/repo.or.cz/nasm/test/br3392252.asm +43 -0
- data/vendor/repo.or.cz/nasm/test/br3392259.asm +8 -0
- data/vendor/repo.or.cz/nasm/test/br3392363.asm +4 -0
- data/vendor/repo.or.cz/nasm/test/br3392392.asm +16 -0
- data/vendor/repo.or.cz/nasm/test/br3392396.asm +5 -0
- data/vendor/repo.or.cz/nasm/test/br3392411.asm +22 -0
- data/vendor/repo.or.cz/nasm/test/br3392418.asm +3 -0
- data/vendor/repo.or.cz/nasm/test/br3392439.asm +25 -0
- data/vendor/repo.or.cz/nasm/test/br3392442.asm +6 -0
- data/vendor/repo.or.cz/nasm/test/br560575.asm +17 -0
- data/vendor/repo.or.cz/nasm/test/br560873.asm +27 -0
- data/vendor/repo.or.cz/nasm/test/br890790.asm +7 -0
- data/vendor/repo.or.cz/nasm/test/br890790_i.asm +1 -0
- data/vendor/repo.or.cz/nasm/test/br978756.asm +7 -0
- data/vendor/repo.or.cz/nasm/test/changed.asm +383 -0
- data/vendor/repo.or.cz/nasm/test/cofftest.asm +85 -0
- data/vendor/repo.or.cz/nasm/test/cofftest.c +35 -0
- data/vendor/repo.or.cz/nasm/test/crc32.asm +37 -0
- data/vendor/repo.or.cz/nasm/test/cv8struc.asm +14 -0
- data/vendor/repo.or.cz/nasm/test/dtbcd.asm +72 -0
- data/vendor/repo.or.cz/nasm/test/elf64so.asm +118 -0
- data/vendor/repo.or.cz/nasm/test/elfso.asm +100 -0
- data/vendor/repo.or.cz/nasm/test/elftest.asm +87 -0
- data/vendor/repo.or.cz/nasm/test/elftest.c +38 -0
- data/vendor/repo.or.cz/nasm/test/elftest64.c +43 -0
- data/vendor/repo.or.cz/nasm/test/elif.asm +39 -0
- data/vendor/repo.or.cz/nasm/test/expimp.asm +90 -0
- data/vendor/repo.or.cz/nasm/test/far64.asm +10 -0
- data/vendor/repo.or.cz/nasm/test/float.asm +186 -0
- data/vendor/repo.or.cz/nasm/test/float8.asm +135 -0
- data/vendor/repo.or.cz/nasm/test/floatb.asm +35 -0
- data/vendor/repo.or.cz/nasm/test/floatexp.asm +382 -0
- data/vendor/repo.or.cz/nasm/test/floatize.asm +19 -0
- data/vendor/repo.or.cz/nasm/test/floattest.asm +28 -0
- data/vendor/repo.or.cz/nasm/test/floatx.asm +525 -0
- data/vendor/repo.or.cz/nasm/test/fpu.asm +127 -0
- data/vendor/repo.or.cz/nasm/test/fwdopt.asm +133 -0
- data/vendor/repo.or.cz/nasm/test/fwdoptpp.asm +150 -0
- data/vendor/repo.or.cz/nasm/test/gas2nasm.py +104 -0
- data/vendor/repo.or.cz/nasm/test/gather.asm +11 -0
- data/vendor/repo.or.cz/nasm/test/gotoff64.asm +25 -0
- data/vendor/repo.or.cz/nasm/test/hexfp.asm +25 -0
- data/vendor/repo.or.cz/nasm/test/hle.asm +19 -0
- data/vendor/repo.or.cz/nasm/test/ifelse.asm +46 -0
- data/vendor/repo.or.cz/nasm/test/ifenv.asm +31 -0
- data/vendor/repo.or.cz/nasm/test/ifmacro.asm +413 -0
- data/vendor/repo.or.cz/nasm/test/iftoken.asm +317 -0
- data/vendor/repo.or.cz/nasm/test/iftoken.pl +32 -0
- data/vendor/repo.or.cz/nasm/test/ilog2.asm +271 -0
- data/vendor/repo.or.cz/nasm/test/imacro.asm +8 -0
- data/vendor/repo.or.cz/nasm/test/imm.asm +23 -0
- data/vendor/repo.or.cz/nasm/test/imm64.asm +61 -0
- data/vendor/repo.or.cz/nasm/test/immwarn.asm +91 -0
- data/vendor/repo.or.cz/nasm/test/imul.asm +117 -0
- data/vendor/repo.or.cz/nasm/test/inc1.asm +6 -0
- data/vendor/repo.or.cz/nasm/test/inc2.asm +8 -0
- data/vendor/repo.or.cz/nasm/test/incbin.asm +7 -0
- data/vendor/repo.or.cz/nasm/test/incbin.data +2 -0
- data/vendor/repo.or.cz/nasm/test/inctest.asm +15 -0
- data/vendor/repo.or.cz/nasm/test/insnlbl.asm +12 -0
- data/vendor/repo.or.cz/nasm/test/invlpga.asm +11 -0
- data/vendor/repo.or.cz/nasm/test/jmp64.asm +19 -0
- data/vendor/repo.or.cz/nasm/test/lar_lsl.asm +124 -0
- data/vendor/repo.or.cz/nasm/test/larlsl.asm +23 -0
- data/vendor/repo.or.cz/nasm/test/lnxhello.asm +54 -0
- data/vendor/repo.or.cz/nasm/test/local.asm +19 -0
- data/vendor/repo.or.cz/nasm/test/loopoffs.asm +12 -0
- data/vendor/repo.or.cz/nasm/test/lwp.asm +213 -0
- data/vendor/repo.or.cz/nasm/test/macro-defaults.asm +64 -0
- data/vendor/repo.or.cz/nasm/test/macroerr.asm +12 -0
- data/vendor/repo.or.cz/nasm/test/macroerr.inc +3 -0
- data/vendor/repo.or.cz/nasm/test/mmxsize.asm +38 -0
- data/vendor/repo.or.cz/nasm/test/movd.asm +12 -0
- data/vendor/repo.or.cz/nasm/test/movd64.asm +15 -0
- data/vendor/repo.or.cz/nasm/test/movimm.asm +28 -0
- data/vendor/repo.or.cz/nasm/test/movnti.asm +10 -0
- data/vendor/repo.or.cz/nasm/test/mpx-64.asm +120 -0
- data/vendor/repo.or.cz/nasm/test/mpx.asm +89 -0
- data/vendor/repo.or.cz/nasm/test/multisection.asm +96 -0
- data/vendor/repo.or.cz/nasm/test/nasmformat.asm +17 -0
- data/vendor/repo.or.cz/nasm/test/new +9 -0
- data/vendor/repo.or.cz/nasm/test/newrdwr.asm +24 -0
- data/vendor/repo.or.cz/nasm/test/nop.asm +17 -0
- data/vendor/repo.or.cz/nasm/test/nullfile.asm +4 -0
- data/vendor/repo.or.cz/nasm/test/objexe.asm +30 -0
- data/vendor/repo.or.cz/nasm/test/objlink.c +33 -0
- data/vendor/repo.or.cz/nasm/test/objtest.asm +85 -0
- data/vendor/repo.or.cz/nasm/test/optimization.asm +104 -0
- data/vendor/repo.or.cz/nasm/test/org.asm +18 -0
- data/vendor/repo.or.cz/nasm/test/paste.asm +12 -0
- data/vendor/repo.or.cz/nasm/test/pcrel.asm +52 -0
- data/vendor/repo.or.cz/nasm/test/perf/label.pl +18 -0
- data/vendor/repo.or.cz/nasm/test/perf/macro.pl +18 -0
- data/vendor/repo.or.cz/nasm/test/perf/token.pl +23 -0
- data/vendor/repo.or.cz/nasm/test/performtest.pl +192 -0
- data/vendor/repo.or.cz/nasm/test/pextrw.asm +3 -0
- data/vendor/repo.or.cz/nasm/test/pinsr16.asm +53 -0
- data/vendor/repo.or.cz/nasm/test/pinsr32.asm +53 -0
- data/vendor/repo.or.cz/nasm/test/pinsr64.asm +68 -0
- data/vendor/repo.or.cz/nasm/test/popcnt.asm +32 -0
- data/vendor/repo.or.cz/nasm/test/ppindirect.asm +42 -0
- data/vendor/repo.or.cz/nasm/test/pragma.asm +12 -0
- data/vendor/repo.or.cz/nasm/test/prefix66.asm +28 -0
- data/vendor/repo.or.cz/nasm/test/ptr.asm +4 -0
- data/vendor/repo.or.cz/nasm/test/pushseg.asm +17 -0
- data/vendor/repo.or.cz/nasm/test/r13.asm +15 -0
- data/vendor/repo.or.cz/nasm/test/radix.asm +54 -0
- data/vendor/repo.or.cz/nasm/test/rdpid.asm +21 -0
- data/vendor/repo.or.cz/nasm/test/reldef.asm +57 -0
- data/vendor/repo.or.cz/nasm/test/relocs.asm +20 -0
- data/vendor/repo.or.cz/nasm/test/riprel.asm +5357 -0
- data/vendor/repo.or.cz/nasm/test/riprel.pl +29 -0
- data/vendor/repo.or.cz/nasm/test/riprel2.asm +11 -0
- data/vendor/repo.or.cz/nasm/test/sha-64.asm +30 -0
- data/vendor/repo.or.cz/nasm/test/sha.asm +31 -0
- data/vendor/repo.or.cz/nasm/test/smartalign16.asm +36 -0
- data/vendor/repo.or.cz/nasm/test/smartalign32.asm +36 -0
- data/vendor/repo.or.cz/nasm/test/smartalign64.asm +36 -0
- data/vendor/repo.or.cz/nasm/test/splitea.asm +11 -0
- data/vendor/repo.or.cz/nasm/test/sreg.asm +65 -0
- data/vendor/repo.or.cz/nasm/test/strlen.asm +5 -0
- data/vendor/repo.or.cz/nasm/test/struc.asm +33 -0
- data/vendor/repo.or.cz/nasm/test/test67.asm +38 -0
- data/vendor/repo.or.cz/nasm/test/testdos.asm +13 -0
- data/vendor/repo.or.cz/nasm/test/testnos3.asm +973 -0
- data/vendor/repo.or.cz/nasm/test/time.asm +11 -0
- data/vendor/repo.or.cz/nasm/test/times.asm +21 -0
- data/vendor/repo.or.cz/nasm/test/timesneg.asm +3 -0
- data/vendor/repo.or.cz/nasm/test/tmap.nas +1447 -0
- data/vendor/repo.or.cz/nasm/test/uscore.asm +15 -0
- data/vendor/repo.or.cz/nasm/test/utf.asm +82 -0
- data/vendor/repo.or.cz/nasm/test/vaesenc.asm +22 -0
- data/vendor/repo.or.cz/nasm/test/vex.asm +9 -0
- data/vendor/repo.or.cz/nasm/test/vgather.asm +76 -0
- data/vendor/repo.or.cz/nasm/test/vmread.asm +26 -0
- data/vendor/repo.or.cz/nasm/test/weirdpaste.asm +29 -0
- data/vendor/repo.or.cz/nasm/test/xchg.asm +96 -0
- data/vendor/repo.or.cz/nasm/test/xcrypt.asm +24 -0
- data/vendor/repo.or.cz/nasm/test/xmm0.asm +12 -0
- data/vendor/repo.or.cz/nasm/test/zerobyte.asm +22 -0
- data/vendor/repo.or.cz/nasm/tools/cleanfile +176 -0
- data/vendor/repo.or.cz/nasm/tools/cleanpatch +258 -0
- data/vendor/repo.or.cz/nasm/tools/mkdep.pl +261 -0
- data/vendor/repo.or.cz/nasm/tools/release +105 -0
- data/vendor/repo.or.cz/nasm/tools/syncfiles.pl +137 -0
- data/vendor/repo.or.cz/nasm/tools/tag-release +58 -0
- data/vendor/repo.or.cz/nasm/version +1 -0
- data/vendor/repo.or.cz/nasm/version.pl +189 -0
- data/vendor/repo.or.cz/nasm/x86/disp8.c +131 -0
- data/vendor/repo.or.cz/nasm/x86/insns-iflags.ph +280 -0
- data/vendor/repo.or.cz/nasm/x86/insns.dat +5371 -0
- data/vendor/repo.or.cz/nasm/x86/insns.pl +1043 -0
- data/vendor/repo.or.cz/nasm/x86/regs.dat +138 -0
- data/vendor/repo.or.cz/nasm/x86/regs.pl +204 -0
- metadata +520 -0
@@ -0,0 +1,271 @@
|
|
1
|
+
/* ----------------------------------------------------------------------- *
|
2
|
+
*
|
3
|
+
* Copyright 1996-2013 The NASM Authors - All Rights Reserved
|
4
|
+
* See the file AUTHORS included with the NASM distribution for
|
5
|
+
* the specific copyright holders.
|
6
|
+
*
|
7
|
+
* Redistribution and use in source and binary forms, with or without
|
8
|
+
* modification, are permitted provided that the following
|
9
|
+
* conditions are met:
|
10
|
+
*
|
11
|
+
* * Redistributions of source code must retain the above copyright
|
12
|
+
* notice, this list of conditions and the following disclaimer.
|
13
|
+
* * Redistributions in binary form must reproduce the above
|
14
|
+
* copyright notice, this list of conditions and the following
|
15
|
+
* disclaimer in the documentation and/or other materials provided
|
16
|
+
* with the distribution.
|
17
|
+
*
|
18
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
19
|
+
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
20
|
+
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
21
|
+
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
22
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
23
|
+
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
24
|
+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
25
|
+
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
26
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
27
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
28
|
+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
29
|
+
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
30
|
+
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
31
|
+
*
|
32
|
+
* ----------------------------------------------------------------------- */
|
33
|
+
|
34
|
+
/*
|
35
|
+
* opflags.h - operand flags
|
36
|
+
*/
|
37
|
+
|
38
|
+
#ifndef NASM_OPFLAGS_H
|
39
|
+
#define NASM_OPFLAGS_H
|
40
|
+
|
41
|
+
#include "compiler.h"
|
42
|
+
#include "tables.h" /* for opflags_t and nasm_reg_flags[] */
|
43
|
+
|
44
|
+
/*
|
45
|
+
* Here we define the operand types. These are implemented as bit
|
46
|
+
* masks, since some are subsets of others; e.g. AX in a MOV
|
47
|
+
* instruction is a special operand type, whereas AX in other
|
48
|
+
* contexts is just another 16-bit register. (Also, consider CL in
|
49
|
+
* shift instructions, DX in OUT, etc.)
|
50
|
+
*
|
51
|
+
* The basic concept here is that
|
52
|
+
* (class & ~operand) == 0
|
53
|
+
*
|
54
|
+
* if and only if "operand" belongs to class type "class".
|
55
|
+
*/
|
56
|
+
|
57
|
+
#define OP_GENMASK(bits, shift) (((UINT64_C(1) << (bits)) - 1) << (shift))
|
58
|
+
#define OP_GENBIT(bit, shift) (UINT64_C(1) << ((shift) + (bit)))
|
59
|
+
|
60
|
+
/*
|
61
|
+
* Type of operand: memory reference, register, etc.
|
62
|
+
*
|
63
|
+
* Bits: 0 - 3
|
64
|
+
*/
|
65
|
+
#define OPTYPE_SHIFT (0)
|
66
|
+
#define OPTYPE_BITS (4)
|
67
|
+
#define OPTYPE_MASK OP_GENMASK(OPTYPE_BITS, OPTYPE_SHIFT)
|
68
|
+
#define GEN_OPTYPE(bit) OP_GENBIT(bit, OPTYPE_SHIFT)
|
69
|
+
|
70
|
+
/*
|
71
|
+
* Modifiers.
|
72
|
+
*
|
73
|
+
* Bits: 4 - 6
|
74
|
+
*/
|
75
|
+
#define MODIFIER_SHIFT (4)
|
76
|
+
#define MODIFIER_BITS (3)
|
77
|
+
#define MODIFIER_MASK OP_GENMASK(MODIFIER_BITS, MODIFIER_SHIFT)
|
78
|
+
#define GEN_MODIFIER(bit) OP_GENBIT(bit, MODIFIER_SHIFT)
|
79
|
+
|
80
|
+
/*
|
81
|
+
* Register classes.
|
82
|
+
*
|
83
|
+
* Bits: 7 - 16
|
84
|
+
*/
|
85
|
+
#define REG_CLASS_SHIFT (7)
|
86
|
+
#define REG_CLASS_BITS (10)
|
87
|
+
#define REG_CLASS_MASK OP_GENMASK(REG_CLASS_BITS, REG_CLASS_SHIFT)
|
88
|
+
#define GEN_REG_CLASS(bit) OP_GENBIT(bit, REG_CLASS_SHIFT)
|
89
|
+
|
90
|
+
/*
|
91
|
+
* Subclasses. Depends on type of operand.
|
92
|
+
*
|
93
|
+
* Bits: 17 - 24
|
94
|
+
*/
|
95
|
+
#define SUBCLASS_SHIFT (17)
|
96
|
+
#define SUBCLASS_BITS (8)
|
97
|
+
#define SUBCLASS_MASK OP_GENMASK(SUBCLASS_BITS, SUBCLASS_SHIFT)
|
98
|
+
#define GEN_SUBCLASS(bit) OP_GENBIT(bit, SUBCLASS_SHIFT)
|
99
|
+
|
100
|
+
/*
|
101
|
+
* Special flags. Context dependant.
|
102
|
+
*
|
103
|
+
* Bits: 25 - 31
|
104
|
+
*/
|
105
|
+
#define SPECIAL_SHIFT (25)
|
106
|
+
#define SPECIAL_BITS (7)
|
107
|
+
#define SPECIAL_MASK OP_GENMASK(SPECIAL_BITS, SPECIAL_SHIFT)
|
108
|
+
#define GEN_SPECIAL(bit) OP_GENBIT(bit, SPECIAL_SHIFT)
|
109
|
+
|
110
|
+
/*
|
111
|
+
* Sizes of the operands and attributes.
|
112
|
+
*
|
113
|
+
* Bits: 32 - 42
|
114
|
+
*/
|
115
|
+
#define SIZE_SHIFT (32)
|
116
|
+
#define SIZE_BITS (11)
|
117
|
+
#define SIZE_MASK OP_GENMASK(SIZE_BITS, SIZE_SHIFT)
|
118
|
+
#define GEN_SIZE(bit) OP_GENBIT(bit, SIZE_SHIFT)
|
119
|
+
|
120
|
+
/*
|
121
|
+
* Bits distribution (counted from 0)
|
122
|
+
*
|
123
|
+
* 6 5 4 3 2 1
|
124
|
+
* 3210987654321098765432109876543210987654321098765432109876543210
|
125
|
+
* |
|
126
|
+
* | dword bound
|
127
|
+
*
|
128
|
+
* ............................................................1111 optypes
|
129
|
+
* .........................................................111.... modifiers
|
130
|
+
* ...............................................1111111111....... register classes
|
131
|
+
* .......................................11111111................. subclasses
|
132
|
+
* ................................1111111......................... specials
|
133
|
+
* .....................11111111111................................ sizes
|
134
|
+
*/
|
135
|
+
|
136
|
+
#define REGISTER GEN_OPTYPE(0) /* register number in 'basereg' */
|
137
|
+
#define IMMEDIATE GEN_OPTYPE(1)
|
138
|
+
#define REGMEM GEN_OPTYPE(2) /* for r/m, ie EA, operands */
|
139
|
+
#define MEMORY (GEN_OPTYPE(3) | REGMEM)
|
140
|
+
|
141
|
+
#define BITS8 GEN_SIZE(0) /* 8 bits (BYTE) */
|
142
|
+
#define BITS16 GEN_SIZE(1) /* 16 bits (WORD) */
|
143
|
+
#define BITS32 GEN_SIZE(2) /* 32 bits (DWORD) */
|
144
|
+
#define BITS64 GEN_SIZE(3) /* 64 bits (QWORD), x64 and FPU only */
|
145
|
+
#define BITS80 GEN_SIZE(4) /* 80 bits (TWORD), FPU only */
|
146
|
+
#define BITS128 GEN_SIZE(5) /* 128 bits (OWORD) */
|
147
|
+
#define BITS256 GEN_SIZE(6) /* 256 bits (YWORD) */
|
148
|
+
#define BITS512 GEN_SIZE(7) /* 512 bits (ZWORD) */
|
149
|
+
#define FAR GEN_SIZE(8) /* grotty: this means 16:16 or 16:32, like in CALL/JMP */
|
150
|
+
#define NEAR GEN_SIZE(9)
|
151
|
+
#define SHORT GEN_SIZE(10) /* and this means what it says :) */
|
152
|
+
|
153
|
+
#define TO GEN_MODIFIER(0) /* reverse effect in FADD, FSUB &c */
|
154
|
+
#define COLON GEN_MODIFIER(1) /* operand is followed by a colon */
|
155
|
+
#define STRICT GEN_MODIFIER(2) /* do not optimize this operand */
|
156
|
+
|
157
|
+
#define REG_CLASS_CDT GEN_REG_CLASS(0)
|
158
|
+
#define REG_CLASS_GPR GEN_REG_CLASS(1)
|
159
|
+
#define REG_CLASS_SREG GEN_REG_CLASS(2)
|
160
|
+
#define REG_CLASS_FPUREG GEN_REG_CLASS(3)
|
161
|
+
#define REG_CLASS_RM_MMX GEN_REG_CLASS(4)
|
162
|
+
#define REG_CLASS_RM_XMM GEN_REG_CLASS(5)
|
163
|
+
#define REG_CLASS_RM_YMM GEN_REG_CLASS(6)
|
164
|
+
#define REG_CLASS_RM_ZMM GEN_REG_CLASS(7)
|
165
|
+
#define REG_CLASS_OPMASK GEN_REG_CLASS(8)
|
166
|
+
#define REG_CLASS_BND GEN_REG_CLASS(9)
|
167
|
+
|
168
|
+
#define is_class(class, op) (!((opflags_t)(class) & ~(opflags_t)(op)))
|
169
|
+
#define is_reg_class(class, reg) is_class((class), nasm_reg_flags[(reg)])
|
170
|
+
|
171
|
+
#define IS_SREG(reg) is_reg_class(REG_SREG, (reg))
|
172
|
+
#define IS_FSGS(reg) is_reg_class(REG_FSGS, (reg))
|
173
|
+
|
174
|
+
/* Register classes */
|
175
|
+
#define REG_EA ( REGMEM | REGISTER) /* 'normal' reg, qualifies as EA */
|
176
|
+
#define RM_GPR ( REG_CLASS_GPR | REGMEM) /* integer operand */
|
177
|
+
#define REG_GPR ( REG_CLASS_GPR | REGMEM | REGISTER) /* integer register */
|
178
|
+
#define REG8 ( REG_CLASS_GPR | BITS8 | REGMEM | REGISTER) /* 8-bit GPR */
|
179
|
+
#define REG16 ( REG_CLASS_GPR | BITS16 | REGMEM | REGISTER) /* 16-bit GPR */
|
180
|
+
#define REG32 ( REG_CLASS_GPR | BITS32 | REGMEM | REGISTER) /* 32-bit GPR */
|
181
|
+
#define REG64 ( REG_CLASS_GPR | BITS64 | REGMEM | REGISTER) /* 64-bit GPR */
|
182
|
+
#define FPUREG ( REG_CLASS_FPUREG | REGISTER) /* floating point stack registers */
|
183
|
+
#define FPU0 (GEN_SUBCLASS(1) | REG_CLASS_FPUREG | REGISTER) /* FPU stack register zero */
|
184
|
+
#define RM_MMX ( REG_CLASS_RM_MMX | REGMEM) /* MMX operand */
|
185
|
+
#define MMXREG ( REG_CLASS_RM_MMX | REGMEM | REGISTER) /* MMX register */
|
186
|
+
#define RM_XMM ( REG_CLASS_RM_XMM | REGMEM) /* XMM (SSE) operand */
|
187
|
+
#define XMMREG ( REG_CLASS_RM_XMM | REGMEM | REGISTER) /* XMM (SSE) register */
|
188
|
+
#define RM_YMM ( REG_CLASS_RM_YMM | REGMEM) /* YMM (AVX) operand */
|
189
|
+
#define YMMREG ( REG_CLASS_RM_YMM | REGMEM | REGISTER) /* YMM (AVX) register */
|
190
|
+
#define RM_ZMM ( REG_CLASS_RM_ZMM | REGMEM) /* ZMM (AVX512) operand */
|
191
|
+
#define ZMMREG ( REG_CLASS_RM_ZMM | REGMEM | REGISTER) /* ZMM (AVX512) register */
|
192
|
+
#define RM_OPMASK ( REG_CLASS_OPMASK | REGMEM) /* Opmask operand */
|
193
|
+
#define OPMASKREG ( REG_CLASS_OPMASK | REGMEM | REGISTER) /* Opmask register */
|
194
|
+
#define OPMASK0 (GEN_SUBCLASS(1) | REG_CLASS_OPMASK | REGMEM | REGISTER) /* Opmask register zero (k0) */
|
195
|
+
#define RM_K RM_OPMASK
|
196
|
+
#define KREG OPMASKREG
|
197
|
+
#define RM_BND ( REG_CLASS_BND | REGMEM) /* Bounds operand */
|
198
|
+
#define BNDREG ( REG_CLASS_BND | REGMEM | REGISTER) /* Bounds register */
|
199
|
+
#define REG_CDT ( REG_CLASS_CDT | BITS32 | REGISTER) /* CRn, DRn and TRn */
|
200
|
+
#define REG_CREG (GEN_SUBCLASS(1) | REG_CLASS_CDT | BITS32 | REGISTER) /* CRn */
|
201
|
+
#define REG_DREG (GEN_SUBCLASS(2) | REG_CLASS_CDT | BITS32 | REGISTER) /* DRn */
|
202
|
+
#define REG_TREG (GEN_SUBCLASS(3) | REG_CLASS_CDT | BITS32 | REGISTER) /* TRn */
|
203
|
+
#define REG_SREG ( REG_CLASS_SREG | BITS16 | REGISTER) /* any segment register */
|
204
|
+
|
205
|
+
/* Segment registers */
|
206
|
+
#define REG_ES (GEN_SUBCLASS(0) | GEN_SUBCLASS(2) | REG_CLASS_SREG | BITS16 | REGISTER) /* ES */
|
207
|
+
#define REG_CS (GEN_SUBCLASS(1) | GEN_SUBCLASS(2) | REG_CLASS_SREG | BITS16 | REGISTER) /* CS */
|
208
|
+
#define REG_SS (GEN_SUBCLASS(0) | GEN_SUBCLASS(3) | REG_CLASS_SREG | BITS16 | REGISTER) /* SS */
|
209
|
+
#define REG_DS (GEN_SUBCLASS(1) | GEN_SUBCLASS(3) | REG_CLASS_SREG | BITS16 | REGISTER) /* DS */
|
210
|
+
#define REG_FS (GEN_SUBCLASS(0) | GEN_SUBCLASS(4) | REG_CLASS_SREG | BITS16 | REGISTER) /* FS */
|
211
|
+
#define REG_GS (GEN_SUBCLASS(1) | GEN_SUBCLASS(4) | REG_CLASS_SREG | BITS16 | REGISTER) /* GS */
|
212
|
+
#define REG_FSGS ( GEN_SUBCLASS(4) | REG_CLASS_SREG | BITS16 | REGISTER) /* FS or GS */
|
213
|
+
#define REG_SEG67 ( GEN_SUBCLASS(5) | REG_CLASS_SREG | BITS16 | REGISTER) /* Unimplemented segment registers */
|
214
|
+
|
215
|
+
/* Special GPRs */
|
216
|
+
#define REG_SMASK SUBCLASS_MASK /* a mask for the following */
|
217
|
+
#define REG_ACCUM (GEN_SUBCLASS(1) | REG_CLASS_GPR | REGMEM | REGISTER) /* accumulator: AL, AX, EAX, RAX */
|
218
|
+
#define REG_AL (GEN_SUBCLASS(1) | REG_CLASS_GPR | BITS8 | REGMEM | REGISTER)
|
219
|
+
#define REG_AX (GEN_SUBCLASS(1) | REG_CLASS_GPR | BITS16 | REGMEM | REGISTER)
|
220
|
+
#define REG_EAX (GEN_SUBCLASS(1) | REG_CLASS_GPR | BITS32 | REGMEM | REGISTER)
|
221
|
+
#define REG_RAX (GEN_SUBCLASS(1) | REG_CLASS_GPR | BITS64 | REGMEM | REGISTER)
|
222
|
+
#define REG_COUNT (GEN_SUBCLASS(5) | GEN_SUBCLASS(2) | REG_CLASS_GPR | REGMEM | REGISTER) /* counter: CL, CX, ECX, RCX */
|
223
|
+
#define REG_CL (GEN_SUBCLASS(5) | GEN_SUBCLASS(2) | REG_CLASS_GPR | BITS8 | REGMEM | REGISTER)
|
224
|
+
#define REG_CX (GEN_SUBCLASS(5) | GEN_SUBCLASS(2) | REG_CLASS_GPR | BITS16 | REGMEM | REGISTER)
|
225
|
+
#define REG_ECX (GEN_SUBCLASS(5) | GEN_SUBCLASS(2) | REG_CLASS_GPR | BITS32 | REGMEM | REGISTER)
|
226
|
+
#define REG_RCX (GEN_SUBCLASS(5) | GEN_SUBCLASS(2) | REG_CLASS_GPR | BITS64 | REGMEM | REGISTER)
|
227
|
+
#define REG_DL (GEN_SUBCLASS(5) | GEN_SUBCLASS(3) | REG_CLASS_GPR | BITS8 | REGMEM | REGISTER) /* data: DL, DX, EDX, RDX */
|
228
|
+
#define REG_DX (GEN_SUBCLASS(5) | GEN_SUBCLASS(3) | REG_CLASS_GPR | BITS16 | REGMEM | REGISTER)
|
229
|
+
#define REG_EDX (GEN_SUBCLASS(5) | GEN_SUBCLASS(3) | REG_CLASS_GPR | BITS32 | REGMEM | REGISTER)
|
230
|
+
#define REG_RDX (GEN_SUBCLASS(5) | GEN_SUBCLASS(3) | REG_CLASS_GPR | BITS64 | REGMEM | REGISTER)
|
231
|
+
#define REG_HIGH (GEN_SUBCLASS(5) | GEN_SUBCLASS(4) | REG_CLASS_GPR | BITS8 | REGMEM | REGISTER) /* high regs: AH, CH, DH, BH */
|
232
|
+
#define REG_NOTACC GEN_SUBCLASS(5) /* non-accumulator register */
|
233
|
+
#define REG8NA (GEN_SUBCLASS(5) | REG_CLASS_GPR | BITS8 | REGMEM | REGISTER) /* 8-bit non-acc GPR */
|
234
|
+
#define REG16NA (GEN_SUBCLASS(5) | REG_CLASS_GPR | BITS16 | REGMEM | REGISTER) /* 16-bit non-acc GPR */
|
235
|
+
#define REG32NA (GEN_SUBCLASS(5) | REG_CLASS_GPR | BITS32 | REGMEM | REGISTER) /* 32-bit non-acc GPR */
|
236
|
+
#define REG64NA (GEN_SUBCLASS(5) | REG_CLASS_GPR | BITS64 | REGMEM | REGISTER) /* 64-bit non-acc GPR */
|
237
|
+
|
238
|
+
/* special types of EAs */
|
239
|
+
#define MEM_OFFS (GEN_SUBCLASS(1) | MEMORY) /* simple [address] offset - absolute! */
|
240
|
+
#define IP_REL (GEN_SUBCLASS(2) | MEMORY) /* IP-relative offset */
|
241
|
+
#define XMEM (GEN_SUBCLASS(3) | MEMORY) /* 128-bit vector SIB */
|
242
|
+
#define YMEM (GEN_SUBCLASS(4) | MEMORY) /* 256-bit vector SIB */
|
243
|
+
#define ZMEM (GEN_SUBCLASS(5) | MEMORY) /* 512-bit vector SIB */
|
244
|
+
|
245
|
+
/* memory which matches any type of r/m operand */
|
246
|
+
#define MEMORY_ANY (MEMORY | RM_GPR | RM_MMX | RM_XMM_L16 | RM_YMM_L16 | RM_ZMM_L16 | RM_OPMASK | RM_BND)
|
247
|
+
|
248
|
+
/* special immediate values */
|
249
|
+
#define UNITY (GEN_SUBCLASS(0) | IMMEDIATE) /* operand equals 1 */
|
250
|
+
#define SBYTEWORD (GEN_SUBCLASS(1) | IMMEDIATE) /* operand is in the range -128..127 mod 2^16 */
|
251
|
+
#define SBYTEDWORD (GEN_SUBCLASS(2) | IMMEDIATE) /* operand is in the range -128..127 mod 2^32 */
|
252
|
+
#define SDWORD (GEN_SUBCLASS(3) | IMMEDIATE) /* operand is in the range -0x80000000..0x7FFFFFFF */
|
253
|
+
#define UDWORD (GEN_SUBCLASS(4) | IMMEDIATE) /* operand is in the range 0..0xFFFFFFFF */
|
254
|
+
|
255
|
+
/*
|
256
|
+
* Subset of vector registers: register 0 only and registers 0-15.
|
257
|
+
* Avoid conflicts in subclass bitfield with any of special EA types!
|
258
|
+
*/
|
259
|
+
#define RM_XMM_L16 (GEN_SUBCLASS(6) | RM_XMM) /* XMM r/m operand 0 ~ 15 */
|
260
|
+
#define XMM0 (GEN_SUBCLASS(1) | GEN_SUBCLASS(6) | XMMREG) /* XMM register zero */
|
261
|
+
#define XMM_L16 ( GEN_SUBCLASS(6) | XMMREG) /* XMM register 0 ~ 15 */
|
262
|
+
|
263
|
+
#define RM_YMM_L16 (GEN_SUBCLASS(6) | RM_YMM) /* YMM r/m operand 0 ~ 15 */
|
264
|
+
#define YMM0 (GEN_SUBCLASS(1) | GEN_SUBCLASS(6) | YMMREG) /* YMM register zero */
|
265
|
+
#define YMM_L16 ( GEN_SUBCLASS(6) | YMMREG) /* YMM register 0 ~ 15 */
|
266
|
+
|
267
|
+
#define RM_ZMM_L16 (GEN_SUBCLASS(6) | RM_ZMM) /* ZMM r/m operand 0 ~ 15 */
|
268
|
+
#define ZMM0 (GEN_SUBCLASS(1) | GEN_SUBCLASS(6) | ZMMREG) /* ZMM register zero */
|
269
|
+
#define ZMM_L16 ( GEN_SUBCLASS(6) | ZMMREG) /* ZMM register 0 ~ 15 */
|
270
|
+
|
271
|
+
#endif /* NASM_OPFLAGS_H */
|
@@ -0,0 +1,52 @@
|
|
1
|
+
/* ----------------------------------------------------------------------- *
|
2
|
+
*
|
3
|
+
* Copyright 2017 The NASM Authors - All Rights Reserved
|
4
|
+
* See the file AUTHORS included with the NASM distribution for
|
5
|
+
* the specific copyright holders.
|
6
|
+
*
|
7
|
+
* Redistribution and use in source and binary forms, with or without
|
8
|
+
* modification, are permitted provided that the following
|
9
|
+
* conditions are met:
|
10
|
+
*
|
11
|
+
* * Redistributions of source code must retain the above copyright
|
12
|
+
* notice, this list of conditions and the following disclaimer.
|
13
|
+
* * Redistributions in binary form must reproduce the above
|
14
|
+
* copyright notice, this list of conditions and the following
|
15
|
+
* disclaimer in the documentation and/or other materials provided
|
16
|
+
* with the distribution.
|
17
|
+
*
|
18
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
19
|
+
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
20
|
+
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
21
|
+
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
22
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
23
|
+
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
24
|
+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
25
|
+
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
26
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
27
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
28
|
+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
29
|
+
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
30
|
+
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
31
|
+
*
|
32
|
+
* ----------------------------------------------------------------------- */
|
33
|
+
|
34
|
+
#ifndef PERFHASH_H
|
35
|
+
#define PERFHASH_H 1
|
36
|
+
|
37
|
+
#include "compiler.h"
|
38
|
+
#include "nasmlib.h" /* For invalid_enum_str() */
|
39
|
+
|
40
|
+
struct perfect_hash {
|
41
|
+
uint64_t crcinit;
|
42
|
+
uint32_t hashmask;
|
43
|
+
uint32_t tbllen;
|
44
|
+
int tbloffs;
|
45
|
+
int errval;
|
46
|
+
const int16_t *hashvals;
|
47
|
+
const char * const *strings;
|
48
|
+
};
|
49
|
+
|
50
|
+
int perfhash_find(const struct perfect_hash *, const char *);
|
51
|
+
|
52
|
+
#endif /* PERFHASH_H */
|
@@ -0,0 +1,46 @@
|
|
1
|
+
/* ----------------------------------------------------------------------- *
|
2
|
+
*
|
3
|
+
* Copyright 1996-2009 The NASM Authors - All Rights Reserved
|
4
|
+
* See the file AUTHORS included with the NASM distribution for
|
5
|
+
* the specific copyright holders.
|
6
|
+
*
|
7
|
+
* Redistribution and use in source and binary forms, with or without
|
8
|
+
* modification, are permitted provided that the following
|
9
|
+
* conditions are met:
|
10
|
+
*
|
11
|
+
* * Redistributions of source code must retain the above copyright
|
12
|
+
* notice, this list of conditions and the following disclaimer.
|
13
|
+
* * Redistributions in binary form must reproduce the above
|
14
|
+
* copyright notice, this list of conditions and the following
|
15
|
+
* disclaimer in the documentation and/or other materials provided
|
16
|
+
* with the distribution.
|
17
|
+
*
|
18
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
19
|
+
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
20
|
+
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
21
|
+
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
22
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
23
|
+
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
24
|
+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
25
|
+
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
26
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
27
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
28
|
+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
29
|
+
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
30
|
+
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
31
|
+
*
|
32
|
+
* ----------------------------------------------------------------------- */
|
33
|
+
|
34
|
+
#ifndef NASM_RAA_H
|
35
|
+
#define NASM_RAA_H 1
|
36
|
+
|
37
|
+
#include "compiler.h"
|
38
|
+
|
39
|
+
struct RAA;
|
40
|
+
|
41
|
+
struct RAA * never_null raa_init(void);
|
42
|
+
void raa_free(struct RAA *);
|
43
|
+
int64_t raa_read(struct RAA *, int32_t);
|
44
|
+
struct RAA *raa_write(struct RAA *r, int32_t posn, int64_t value);
|
45
|
+
|
46
|
+
#endif /* NASM_RAA_H */
|
@@ -0,0 +1,51 @@
|
|
1
|
+
/* ----------------------------------------------------------------------- *
|
2
|
+
*
|
3
|
+
* Copyright 1996-2009 The NASM Authors - All Rights Reserved
|
4
|
+
* See the file AUTHORS included with the NASM distribution for
|
5
|
+
* the specific copyright holders.
|
6
|
+
*
|
7
|
+
* Redistribution and use in source and binary forms, with or without
|
8
|
+
* modification, are permitted provided that the following
|
9
|
+
* conditions are met:
|
10
|
+
*
|
11
|
+
* * Redistributions of source code must retain the above copyright
|
12
|
+
* notice, this list of conditions and the following disclaimer.
|
13
|
+
* * Redistributions in binary form must reproduce the above
|
14
|
+
* copyright notice, this list of conditions and the following
|
15
|
+
* disclaimer in the documentation and/or other materials provided
|
16
|
+
* with the distribution.
|
17
|
+
*
|
18
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
19
|
+
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
20
|
+
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
21
|
+
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
22
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
23
|
+
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
24
|
+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
25
|
+
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
26
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
27
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
28
|
+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
29
|
+
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
30
|
+
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
31
|
+
*
|
32
|
+
* ----------------------------------------------------------------------- */
|
33
|
+
|
34
|
+
#ifndef NASM_RBTREE_H
|
35
|
+
#define NASM_RBTREE_H
|
36
|
+
|
37
|
+
#include "compiler.h"
|
38
|
+
|
39
|
+
/* This structure should be embedded in a larger data structure;
|
40
|
+
the final output from rb_search() can then be converted back
|
41
|
+
to the larger data structure via container_of(). */
|
42
|
+
struct rbtree {
|
43
|
+
uint64_t key;
|
44
|
+
struct rbtree *left, *right;
|
45
|
+
bool red;
|
46
|
+
};
|
47
|
+
|
48
|
+
struct rbtree *rb_insert(struct rbtree *, struct rbtree *);
|
49
|
+
struct rbtree *rb_search(struct rbtree *, uint64_t);
|
50
|
+
|
51
|
+
#endif /* NASM_RBTREE_H */
|
@@ -0,0 +1,169 @@
|
|
1
|
+
/* ----------------------------------------------------------------------- *
|
2
|
+
*
|
3
|
+
* Copyright 1996-2017 The NASM Authors - All Rights Reserved
|
4
|
+
* See the file AUTHORS included with the NASM distribution for
|
5
|
+
* the specific copyright holders.
|
6
|
+
*
|
7
|
+
* Redistribution and use in source and binary forms, with or without
|
8
|
+
* modification, are permitted provided that the following
|
9
|
+
* conditions are met:
|
10
|
+
*
|
11
|
+
* * Redistributions of source code must retain the above copyright
|
12
|
+
* notice, this list of conditions and the following disclaimer.
|
13
|
+
* * Redistributions in binary form must reproduce the above
|
14
|
+
* copyright notice, this list of conditions and the following
|
15
|
+
* disclaimer in the documentation and/or other materials provided
|
16
|
+
* with the distribution.
|
17
|
+
*
|
18
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
19
|
+
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
20
|
+
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
21
|
+
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
22
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
23
|
+
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
24
|
+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
25
|
+
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
26
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
27
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
28
|
+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
29
|
+
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
30
|
+
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
31
|
+
*
|
32
|
+
* ----------------------------------------------------------------------- */
|
33
|
+
|
34
|
+
/*
|
35
|
+
* rdoff.h RDOFF Object File manipulation routines header file
|
36
|
+
*/
|
37
|
+
|
38
|
+
#ifndef RDOFF_H
|
39
|
+
#define RDOFF_H 1
|
40
|
+
|
41
|
+
/*
|
42
|
+
* RDOFF definitions. They are used by RDOFF utilities and by NASM's
|
43
|
+
* 'outrdf2.c' output module.
|
44
|
+
*/
|
45
|
+
|
46
|
+
/* RDOFF format revision (currently used only when printing the version) */
|
47
|
+
#define RDOFF2_REVISION "0.6.1"
|
48
|
+
|
49
|
+
/* RDOFF2 file signature */
|
50
|
+
#define RDOFF2_SIGNATURE "RDOFF2"
|
51
|
+
|
52
|
+
/* Maximum size of an import/export label (including trailing zero) */
|
53
|
+
#define EXIM_LABEL_MAX 256
|
54
|
+
|
55
|
+
/* Maximum size of library or module name (including trailing zero) */
|
56
|
+
#define MODLIB_NAME_MAX 128
|
57
|
+
|
58
|
+
/* Maximum number of segments that we can handle in one file */
|
59
|
+
#define RDF_MAXSEGS 64
|
60
|
+
|
61
|
+
/* Record types that may present the RDOFF header */
|
62
|
+
#define RDFREC_GENERIC 0
|
63
|
+
#define RDFREC_RELOC 1
|
64
|
+
#define RDFREC_IMPORT 2
|
65
|
+
#define RDFREC_GLOBAL 3
|
66
|
+
#define RDFREC_DLL 4
|
67
|
+
#define RDFREC_BSS 5
|
68
|
+
#define RDFREC_SEGRELOC 6
|
69
|
+
#define RDFREC_FARIMPORT 7
|
70
|
+
#define RDFREC_MODNAME 8
|
71
|
+
#define RDFREC_COMMON 10
|
72
|
+
|
73
|
+
/*
|
74
|
+
* Generic record - contains the type and length field, plus a 128 byte
|
75
|
+
* array 'data'
|
76
|
+
*/
|
77
|
+
struct GenericRec {
|
78
|
+
uint8_t type;
|
79
|
+
uint8_t reclen;
|
80
|
+
char data[128];
|
81
|
+
};
|
82
|
+
|
83
|
+
/*
|
84
|
+
* Relocation record
|
85
|
+
*/
|
86
|
+
struct RelocRec {
|
87
|
+
uint8_t type; /* must be 1 */
|
88
|
+
uint8_t reclen; /* content length */
|
89
|
+
uint8_t segment; /* only 0 for code, or 1 for data supported,
|
90
|
+
but add 64 for relative refs (ie do not require
|
91
|
+
reloc @ loadtime, only linkage) */
|
92
|
+
int32_t offset; /* from start of segment in which reference is loc'd */
|
93
|
+
uint8_t length; /* 1 2 or 4 bytes */
|
94
|
+
uint16_t refseg; /* segment to which reference refers to */
|
95
|
+
};
|
96
|
+
|
97
|
+
/*
|
98
|
+
* Extern/import record
|
99
|
+
*/
|
100
|
+
struct ImportRec {
|
101
|
+
uint8_t type; /* must be 2 */
|
102
|
+
uint8_t reclen; /* content length */
|
103
|
+
uint8_t flags; /* SYM_* flags (see below) */
|
104
|
+
uint16_t segment; /* segment number allocated to the label for reloc
|
105
|
+
records - label is assumed to be at offset zero
|
106
|
+
in this segment, so linker must fix up with offset
|
107
|
+
of segment and of offset within segment */
|
108
|
+
char label[EXIM_LABEL_MAX]; /* zero terminated, should be written to file
|
109
|
+
until the zero, but not after it */
|
110
|
+
};
|
111
|
+
|
112
|
+
/*
|
113
|
+
* Public/export record
|
114
|
+
*/
|
115
|
+
struct ExportRec {
|
116
|
+
uint8_t type; /* must be 3 */
|
117
|
+
uint8_t reclen; /* content length */
|
118
|
+
uint8_t flags; /* SYM_* flags (see below) */
|
119
|
+
uint8_t segment; /* segment referred to (0/1/2) */
|
120
|
+
int32_t offset; /* offset within segment */
|
121
|
+
char label[EXIM_LABEL_MAX]; /* zero terminated as in import */
|
122
|
+
};
|
123
|
+
|
124
|
+
/*
|
125
|
+
* DLL record
|
126
|
+
*/
|
127
|
+
struct DLLRec {
|
128
|
+
uint8_t type; /* must be 4 */
|
129
|
+
uint8_t reclen; /* content length */
|
130
|
+
char libname[MODLIB_NAME_MAX]; /* name of library to link with at load time */
|
131
|
+
};
|
132
|
+
|
133
|
+
/*
|
134
|
+
* BSS record
|
135
|
+
*/
|
136
|
+
struct BSSRec {
|
137
|
+
uint8_t type; /* must be 5 */
|
138
|
+
uint8_t reclen; /* content length */
|
139
|
+
int32_t amount; /* number of bytes BSS to reserve */
|
140
|
+
};
|
141
|
+
|
142
|
+
/*
|
143
|
+
* Module name record
|
144
|
+
*/
|
145
|
+
struct ModRec {
|
146
|
+
uint8_t type; /* must be 8 */
|
147
|
+
uint8_t reclen; /* content length */
|
148
|
+
char modname[MODLIB_NAME_MAX]; /* module name */
|
149
|
+
};
|
150
|
+
|
151
|
+
/*
|
152
|
+
* Common variable record
|
153
|
+
*/
|
154
|
+
struct CommonRec {
|
155
|
+
uint8_t type; /* must be 10 */
|
156
|
+
uint8_t reclen; /* equals 7+label length */
|
157
|
+
uint16_t segment; /* segment number */
|
158
|
+
int32_t size; /* size of common variable */
|
159
|
+
uint16_t align; /* alignment (power of two) */
|
160
|
+
char label[EXIM_LABEL_MAX]; /* zero terminated as in import */
|
161
|
+
};
|
162
|
+
|
163
|
+
/* Flags for ExportRec */
|
164
|
+
#define SYM_DATA 1
|
165
|
+
#define SYM_FUNCTION 2
|
166
|
+
#define SYM_GLOBAL 4
|
167
|
+
#define SYM_IMPORT 8
|
168
|
+
|
169
|
+
#endif /* RDOFF_H */
|