summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Johnson <peter@tortall.net>2006-05-31 06:13:01 +0000
committerPeter Johnson <peter@tortall.net>2006-05-31 06:13:01 +0000
commiteca4d7c5c26a4308754fe88f8dfce3521e3a1525 (patch)
tree05c7deaecb648c3017e8596c6256dd7727b71caa
parent26e2ac882f43b0965918a22b6f147f6e95d33f3e (diff)
parent3d9deea532e8b6e3aee321eb554055178427fd36 (diff)
downloadyasm-eca4d7c5c26a4308754fe88f8dfce3521e3a1525.tar.gz
Merge [1333]-[1543] (inclusive) into new-optimizer branch. This results in
a temporary regression of functionality but will yield some benefits later on (chief among them is easier eventual merging back to the mainline!). svn path=/branches/new-optimizer/; revision=1545
-rw-r--r--COPYING41
-rw-r--r--GNU_GPL-2.06
-rw-r--r--GNU_LGPL-2.06
-rw-r--r--Makefile.am35
-rw-r--r--Mkfiles/Makefile.dj64
-rw-r--r--Mkfiles/Makefile.flat68
-rw-r--r--Mkfiles/dj/config.h230
-rw-r--r--Mkfiles/vc/config.h237
-rw-r--r--Mkfiles/vc/gap/gap.vcproj158
-rw-r--r--Mkfiles/vc/gap/run.bat2
-rw-r--r--Mkfiles/vc/genmacro/run.bat2
-rw-r--r--Mkfiles/vc/genstring/genstring.vcproj128
-rw-r--r--Mkfiles/vc/genstring/run.bat2
-rw-r--r--Mkfiles/vc/genversion/genversion.vcproj137
-rw-r--r--Mkfiles/vc/genversion/run.bat2
-rw-r--r--Mkfiles/vc/libyasm/libyasm.vcproj341
-rw-r--r--Mkfiles/vc/modules/modules.vcproj408
-rw-r--r--Mkfiles/vc/re2c/run.bat7
-rw-r--r--Mkfiles/vc/yasm.sln27
-rw-r--r--Mkfiles/vc/yasm.vcproj34
-rw-r--r--Mkfiles/vc8/config.h231
-rw-r--r--Mkfiles/vc8/gap/gap.vcproj231
-rw-r--r--Mkfiles/vc8/gap/run.bat2
-rw-r--r--Mkfiles/vc8/genmacro/genmacro.vcproj175
-rw-r--r--Mkfiles/vc8/genmacro/run.bat2
-rw-r--r--Mkfiles/vc8/genmodule/genmodule.vcproj179
-rw-r--r--Mkfiles/vc8/genstring/genstring.vcproj199
-rw-r--r--Mkfiles/vc8/genstring/run.bat2
-rw-r--r--Mkfiles/vc8/genversion/genversion.vcproj210
-rw-r--r--Mkfiles/vc8/genversion/run.bat2
-rw-r--r--Mkfiles/vc8/libyasm/libyasm.vcproj854
-rw-r--r--Mkfiles/vc8/modules/modules.vcproj873
-rw-r--r--Mkfiles/vc8/re2c/re2c.vcproj175
-rw-r--r--Mkfiles/vc8/re2c/run.bat7
-rw-r--r--Mkfiles/vc8/readme.vc8.txt134
-rw-r--r--Mkfiles/vc8/yasm.rules114
-rw-r--r--Mkfiles/vc8/yasm.sln35
-rw-r--r--Mkfiles/vc8/yasm.vcproj138
-rw-r--r--Mkfiles/vc8/yasm32.rules58
-rw-r--r--Mkfiles/vc8/yasm64.rules58
-rw-r--r--configure.ac52
-rw-r--r--frontends/yasm/Makefile.inc8
-rw-r--r--frontends/yasm/yasm.c227
-rw-r--r--genstring.c103
-rw-r--r--libyasm.h2
-rw-r--r--libyasm/Makefile.inc65
-rw-r--r--libyasm/arch.h291
-rw-r--r--libyasm/bc-align.c239
-rw-r--r--libyasm/bc-data.c456
-rw-r--r--libyasm/bc-incbin.c260
-rw-r--r--libyasm/bc-insn.c348
-rw-r--r--libyasm/bc-int.h31
-rw-r--r--libyasm/bc-org.c147
-rw-r--r--libyasm/bc-reserve.c158
-rw-r--r--libyasm/bitvect.c2
-rw-r--r--libyasm/bytecode.c1331
-rw-r--r--libyasm/bytecode.h116
-rw-r--r--libyasm/coretype.h90
-rw-r--r--libyasm/dbgfmt.h37
-rw-r--r--libyasm/errwarn.c322
-rw-r--r--libyasm/errwarn.h231
-rw-r--r--libyasm/expr-int.h3
-rw-r--r--libyasm/expr.c381
-rw-r--r--libyasm/expr.h57
-rw-r--r--libyasm/file.c330
-rw-r--r--libyasm/file.h133
-rw-r--r--libyasm/floatnum.c30
-rw-r--r--libyasm/floatnum.h9
-rw-r--r--libyasm/hamt.c41
-rw-r--r--libyasm/hamt.h24
-rw-r--r--libyasm/intnum.c378
-rw-r--r--libyasm/intnum.h87
-rw-r--r--libyasm/linemgr.c7
-rw-r--r--libyasm/linemgr.h15
-rw-r--r--libyasm/md5.c310
-rw-r--r--libyasm/md5.h28
-rw-r--r--libyasm/objfmt.h51
-rw-r--r--libyasm/parser.h11
-rw-r--r--libyasm/phash.c268
-rw-r--r--libyasm/phash.h15
-rw-r--r--libyasm/preproc.h17
-rw-r--r--libyasm/section.c120
-rw-r--r--libyasm/section.h60
-rw-r--r--libyasm/symrec.c82
-rw-r--r--libyasm/symrec.h59
-rw-r--r--libyasm/tests/Makefile.inc17
-rw-r--r--libyasm/tests/absloop-err.asm6
-rw-r--r--libyasm/tests/absloop-err.errwarn1
-rw-r--r--libyasm/tests/combpath_test.c146
-rw-r--r--libyasm/tests/expr-wide-ident.asm2
-rw-r--r--libyasm/tests/expr-wide-ident.errwarn0
-rw-r--r--libyasm/tests/expr-wide-ident.hex9
-rw-r--r--libyasm/tests/floatnum_test.c12
-rw-r--r--libyasm/tests/leb128_test.c57
-rw-r--r--libyasm/tests/splitpath_test.c161
-rw-r--r--libyasm/tests/value-err.asm9
-rw-r--r--libyasm/tests/value-err.errwarn3
-rw-r--r--libyasm/value.c541
-rw-r--r--libyasm/value.h164
-rw-r--r--libyasm/xstrdup.c10
-rw-r--r--m4/Makefile.inc2
-rw-r--r--m4/ax_create_stdint_h.m416
-rw-r--r--m4/pyrex.m417
-rw-r--r--m4/pythonhead.m424
-rw-r--r--modules/arch/lc3b/lc3barch.c39
-rw-r--r--modules/arch/lc3b/lc3barch.h36
-rw-r--r--modules/arch/lc3b/lc3bbc.c113
-rw-r--r--modules/arch/lc3b/lc3bid.re107
-rw-r--r--modules/arch/lc3b/tests/lc3b-basic.asm2
-rw-r--r--modules/arch/lc3b/tests/lc3b-basic.errwarn1
-rw-r--r--modules/arch/lc3b/tests/lc3b-basic.hex2
-rw-r--r--modules/arch/x86/Makefile.inc14
-rw-r--r--modules/arch/x86/tests/Makefile.inc14
-rw-r--r--modules/arch/x86/tests/addbyte.errwarn6
-rw-r--r--modules/arch/x86/tests/arithsmall.errwarn4
-rw-r--r--modules/arch/x86/tests/far64.asm7
-rw-r--r--modules/arch/x86/tests/far64.errwarn0
-rw-r--r--modules/arch/x86/tests/far64.hex44
-rw-r--r--modules/arch/x86/tests/fwdequ64.asm2
-rw-r--r--modules/arch/x86/tests/gas32/align32.hex138
-rw-r--r--modules/arch/x86/tests/gas64/Makefile.inc3
-rw-r--r--modules/arch/x86/tests/gas64/gas-fp.hex2
-rw-r--r--modules/arch/x86/tests/gas64/gas-movabs.asm4
-rw-r--r--modules/arch/x86/tests/gas64/gas-movabs.errwarn0
-rw-r--r--modules/arch/x86/tests/gas64/gas-movabs.hex672
-rw-r--r--modules/arch/x86/tests/gas64/gas-retenter.asm6
-rw-r--r--modules/arch/x86/tests/gas64/gas-retenter.hex26
-rw-r--r--modules/arch/x86/tests/genopcode.hex2
-rw-r--r--modules/arch/x86/tests/push64.errwarn2
-rw-r--r--modules/arch/x86/tests/pushf-err.asm29
-rw-r--r--modules/arch/x86/tests/pushf-err.errwarn10
-rw-r--r--modules/arch/x86/tests/pushf.asm29
-rw-r--r--modules/arch/x86/tests/pushf.errwarn0
-rw-r--r--modules/arch/x86/tests/pushf.hex24
-rw-r--r--modules/arch/x86/tests/pushnosize.asm29
-rw-r--r--modules/arch/x86/tests/pushnosize.errwarn3
-rw-r--r--modules/arch/x86/tests/pushnosize.hex85
-rw-r--r--modules/arch/x86/tests/ret.asm22
-rw-r--r--modules/arch/x86/tests/ret.hex44
-rw-r--r--modules/arch/x86/tests/str.asm4
-rw-r--r--modules/arch/x86/tests/str.errwarn0
-rw-r--r--modules/arch/x86/tests/str.hex8
-rw-r--r--modules/arch/x86/x86arch.c137
-rw-r--r--modules/arch/x86/x86arch.h127
-rw-r--r--modules/arch/x86/x86bc.c516
-rw-r--r--modules/arch/x86/x86expr.c412
-rw-r--r--modules/arch/x86/x86id.c (renamed from modules/arch/x86/x86id.re)2380
-rw-r--r--modules/arch/x86/x86parse.gap1144
-rw-r--r--modules/dbgfmts/Makefile.inc4
-rw-r--r--modules/dbgfmts/codeview/Makefile.inc13
-rw-r--r--modules/dbgfmts/codeview/cv-dbgfmt.c126
-rw-r--r--modules/dbgfmts/codeview/cv-dbgfmt.h (renamed from libyasm/objfmt.c)71
-rw-r--r--modules/dbgfmts/codeview/cv-symline.c1106
-rw-r--r--modules/dbgfmts/codeview/cv-type.c781
-rw-r--r--modules/dbgfmts/codeview/cv8.txt94
-rw-r--r--modules/dbgfmts/dwarf2/Makefile.inc12
-rw-r--r--modules/dbgfmts/dwarf2/dwarf2-aranges.c126
-rw-r--r--modules/dbgfmts/dwarf2/dwarf2-dbgfmt.c357
-rw-r--r--modules/dbgfmts/dwarf2/dwarf2-dbgfmt.h132
-rw-r--r--modules/dbgfmts/dwarf2/dwarf2-info.c441
-rw-r--r--modules/dbgfmts/dwarf2/dwarf2-line.c1000
-rw-r--r--modules/dbgfmts/dwarf2/tests/Makefile.inc9
-rw-r--r--modules/dbgfmts/dwarf2/tests/pass32/Makefile.inc9
-rwxr-xr-xmodules/dbgfmts/dwarf2/tests/pass32/dwarf2_pass32_test.sh4
-rw-r--r--modules/dbgfmts/dwarf2/tests/pass32/dwarf32_testhd.asm980
-rw-r--r--modules/dbgfmts/dwarf2/tests/pass32/dwarf32_testhd.errwarn0
-rw-r--r--modules/dbgfmts/dwarf2/tests/pass32/dwarf32_testhd.hex5936
-rw-r--r--modules/dbgfmts/dwarf2/tests/pass64/Makefile.inc12
-rwxr-xr-xmodules/dbgfmts/dwarf2/tests/pass64/dwarf2_pass64_test.sh4
-rw-r--r--modules/dbgfmts/dwarf2/tests/pass64/dwarf64_2loc.asm8
-rw-r--r--modules/dbgfmts/dwarf2/tests/pass64/dwarf64_2loc.errwarn0
-rw-r--r--modules/dbgfmts/dwarf2/tests/pass64/dwarf64_2loc.hex880
-rw-r--r--modules/dbgfmts/dwarf2/tests/pass64/dwarf64_leb128.asm9063
-rw-r--r--modules/dbgfmts/dwarf2/tests/pass64/dwarf64_leb128.errwarn0
-rw-r--r--modules/dbgfmts/dwarf2/tests/pass64/dwarf64_leb128.hex91312
-rw-r--r--modules/dbgfmts/dwarf2/tests/passwin64/Makefile.inc9
-rwxr-xr-xmodules/dbgfmts/dwarf2/tests/passwin64/dwarf2_passwin64_test.sh4
-rw-r--r--modules/dbgfmts/dwarf2/tests/passwin64/dwarfwin64_testhd.asm1132
-rw-r--r--modules/dbgfmts/dwarf2/tests/passwin64/dwarfwin64_testhd.errwarn15
-rw-r--r--modules/dbgfmts/dwarf2/tests/passwin64/dwarfwin64_testhd.hex7552
-rw-r--r--modules/dbgfmts/null/null-dbgfmt.c8
-rw-r--r--modules/dbgfmts/stabs/stabs-dbgfmt.c60
-rw-r--r--modules/dbgfmts/stabs/tests/stabs-elf.hex106
-rw-r--r--modules/listfmts/nasm/nasm-listfmt.c56
-rw-r--r--modules/objfmts/bin/bin-objfmt.c169
-rw-r--r--modules/objfmts/bin/tests/reserve-err.errwarn4
-rw-r--r--modules/objfmts/coff/coff-objfmt.c627
-rw-r--r--modules/objfmts/coff/tests/x86id.errwarn44
-rw-r--r--modules/objfmts/coff/tests/x86id.hex574
-rw-r--r--modules/objfmts/dbg/dbg-objfmt.c42
-rw-r--r--modules/objfmts/elf/elf-machine.h4
-rw-r--r--modules/objfmts/elf/elf-objfmt.c453
-rw-r--r--modules/objfmts/elf/elf-x86-amd64.c2
-rw-r--r--modules/objfmts/elf/elf.c61
-rw-r--r--modules/objfmts/elf/elf.h9
-rw-r--r--modules/objfmts/elf/tests/Makefile.inc8
-rw-r--r--modules/objfmts/elf/tests/curpos-err.asm27
-rw-r--r--modules/objfmts/elf/tests/curpos-err.errwarn2
-rw-r--r--modules/objfmts/elf/tests/curpos.asm27
-rw-r--r--modules/objfmts/elf/tests/curpos.errwarn0
-rw-r--r--modules/objfmts/elf/tests/curpos.hex832
-rw-r--r--modules/objfmts/elf/tests/elf-overdef.asm2
-rw-r--r--modules/objfmts/elf/tests/elf-overdef.errwarn0
-rw-r--r--modules/objfmts/elf/tests/elf-overdef.hex360
-rw-r--r--modules/objfmts/elf/tests/elf-x86id.hex588
-rw-r--r--modules/objfmts/elf/tests/gas64/Makefile.inc3
-rw-r--r--modules/objfmts/elf/tests/gas64/elf_gas64_curpos.asm27
-rw-r--r--modules/objfmts/elf/tests/gas64/elf_gas64_curpos.errwarn0
-rw-r--r--modules/objfmts/elf/tests/gas64/elf_gas64_curpos.hex1248
-rw-r--r--modules/objfmts/win32/tests/Makefile.inc9
-rw-r--r--modules/objfmts/win32/tests/win32-curpos.asm27
-rw-r--r--modules/objfmts/win32/tests/win32-curpos.errwarn0
-rw-r--r--modules/objfmts/win32/tests/win32-curpos.hex480
-rw-r--r--modules/objfmts/win32/tests/win32-overdef.asm2
-rw-r--r--modules/objfmts/win32/tests/win32-overdef.errwarn0
-rw-r--r--modules/objfmts/win32/tests/win32-overdef.hex136
-rw-r--r--modules/objfmts/win32/tests/win32-segof.asm10
-rw-r--r--modules/objfmts/win32/tests/win32-segof.errwarn0
-rw-r--r--modules/objfmts/win32/tests/win32-segof.hex262
-rw-r--r--modules/objfmts/win64/tests/Makefile.inc7
-rw-r--r--modules/objfmts/win64/tests/win64-curpos.asm27
-rw-r--r--modules/objfmts/win64/tests/win64-curpos.errwarn0
-rw-r--r--modules/objfmts/win64/tests/win64-curpos.hex499
-rw-r--r--modules/objfmts/win64/tests/win64-dataref.asm6
-rw-r--r--modules/objfmts/win64/tests/win64-dataref2.asm17
-rw-r--r--modules/objfmts/win64/tests/win64-dataref2.errwarn0
-rw-r--r--modules/objfmts/win64/tests/win64-dataref2.hex343
-rw-r--r--modules/objfmts/win64/tests/win64-dataref2.masm17
-rw-r--r--modules/objfmts/xdf/tests/Makefile.inc3
-rw-r--r--modules/objfmts/xdf/tests/xdf-overdef.asm2
-rw-r--r--modules/objfmts/xdf/tests/xdf-overdef.errwarn0
-rw-r--r--modules/objfmts/xdf/tests/xdf-overdef.hex78
-rw-r--r--modules/objfmts/xdf/xdf-objfmt.c312
-rw-r--r--modules/parsers/gas/gas-bison.y397
-rw-r--r--modules/parsers/gas/gas-parser.c14
-rw-r--r--modules/parsers/gas/gas-parser.h6
-rw-r--r--modules/parsers/gas/gas-token.re121
-rw-r--r--modules/parsers/gas/tests/Makefile.inc9
-rw-r--r--modules/parsers/gas/tests/gas-fill.asm6
-rw-r--r--modules/parsers/gas/tests/gas-fill.errwarn0
-rw-r--r--modules/parsers/gas/tests/gas-fill.hex424
-rw-r--r--modules/parsers/gas/tests/gas-push.asm3
-rw-r--r--modules/parsers/gas/tests/gas-push.errwarn0
-rw-r--r--modules/parsers/gas/tests/gas-push.hex360
-rw-r--r--modules/parsers/gas/tests/localcomm.asm18
-rw-r--r--modules/parsers/gas/tests/localcomm.errwarn0
-rw-r--r--modules/parsers/gas/tests/localcomm.hex544
-rw-r--r--modules/parsers/nasm/nasm-bison.y106
-rw-r--r--modules/parsers/nasm/nasm-parser.c7
-rw-r--r--modules/parsers/nasm/nasm-parser.h7
-rw-r--r--modules/parsers/nasm/nasm-token.re137
-rw-r--r--modules/parsers/nasm/tests/Makefile.inc6
-rw-r--r--modules/parsers/nasm/tests/alignnop16.asm4
-rw-r--r--modules/parsers/nasm/tests/alignnop16.errwarn0
-rw-r--r--modules/parsers/nasm/tests/alignnop16.hex17
-rw-r--r--modules/parsers/nasm/tests/alignnop32.asm4
-rw-r--r--modules/parsers/nasm/tests/alignnop32.errwarn0
-rw-r--r--modules/parsers/nasm/tests/alignnop32.hex17
-rw-r--r--modules/preprocs/nasm/Makefile.inc22
-rw-r--r--modules/preprocs/nasm/genversion.c79
-rw-r--r--modules/preprocs/nasm/nasm-eval.c674
-rw-r--r--modules/preprocs/nasm/nasm-eval.h14
-rw-r--r--modules/preprocs/nasm/nasm-pp.c217
-rw-r--r--modules/preprocs/nasm/nasm-preproc.c58
-rw-r--r--modules/preprocs/nasm/nasm.h575
-rw-r--r--modules/preprocs/nasm/nasmlib.c278
-rw-r--r--modules/preprocs/nasm/nasmlib.h36
-rw-r--r--modules/preprocs/nasm/standard.mac10
-rw-r--r--modules/preprocs/nasm/tests/Makefile.inc6
-rw-r--r--modules/preprocs/nasm/tests/ifcritical-err.errwarn1
-rw-r--r--modules/preprocs/nasm/tests/longline.asm2
-rw-r--r--modules/preprocs/nasm/tests/longline.errwarn0
-rw-r--r--modules/preprocs/nasm/tests/longline.hex64
-rw-r--r--modules/preprocs/nasm/tests/nasmpp-bigint.asm3
-rw-r--r--modules/preprocs/nasm/tests/nasmpp-bigint.errwarn0
-rw-r--r--modules/preprocs/nasm/tests/nasmpp-bigint.hex1
-rw-r--r--modules/preprocs/raw/raw-preproc.c21
-rw-r--r--po/POTFILES.in17
-rw-r--r--tests/win32-relocovfl.asm3
-rw-r--r--tools/Makefile.inc4
-rw-r--r--tools/gap/Makefile.inc34
-rw-r--r--tools/gap/gap.c854
-rw-r--r--tools/gap/perfect.c1189
-rw-r--r--tools/gap/perfect.h132
-rw-r--r--tools/gap/standard.h35
-rw-r--r--tools/python-yasm/Makefile.inc55
-rw-r--r--tools/python-yasm/bytecode.pxi191
-rw-r--r--tools/python-yasm/coretype.pxi124
-rw-r--r--tools/python-yasm/errwarn.pxi144
-rw-r--r--tools/python-yasm/expr.pxi205
-rw-r--r--tools/python-yasm/floatnum.pxi64
-rw-r--r--tools/python-yasm/intnum.pxi203
-rw-r--r--tools/python-yasm/setup.py89
-rw-r--r--tools/python-yasm/symrec.pxi324
-rw-r--r--tools/python-yasm/tests/Makefile.inc13
-rw-r--r--tools/python-yasm/tests/__init__.py70
-rwxr-xr-xtools/python-yasm/tests/python_test.sh20
-rw-r--r--tools/python-yasm/tests/test_bytecode.py11
-rw-r--r--tools/python-yasm/tests/test_expr.py19
-rw-r--r--tools/python-yasm/tests/test_intnum.py66
-rw-r--r--tools/python-yasm/tests/test_symrec.py81
-rw-r--r--tools/python-yasm/value.pxi65
-rw-r--r--tools/python-yasm/yasm.pyx131
-rw-r--r--tools/re2c/main.c1
304 files changed, 145201 insertions, 12075 deletions
diff --git a/COPYING b/COPYING
index 1947b344..be3cec08 100644
--- a/COPYING
+++ b/COPYING
@@ -1,27 +1,39 @@
+Yasm is Copyright (c) 2001-2006 Peter Johnson and other Yasm developers.
+
+Yasm developers and/or contributors include:
+ Peter Johnson
+ Michael Urman
+ Stanislav Karchebny
+ Brian Gladman
+
-----------------------------------
-YASM licensing overview and summary
+Yasm licensing overview and summary
-----------------------------------
-Note: This document does not provide legal advice nor is it the actual license
-of any part of YASM. See the individual licenses for complete details.
-Consult a laywer for legal advice.
+Note: This document does not provide legal advice nor is it the actual
+license of any part of Yasm. See the individual licenses for complete
+details. Consult a lawyer for legal advice.
-The primary license of YASM is the 2-clause BSD license. Please use this
+The primary license of Yasm is the 2-clause BSD license. Please use this
license if you plan on submitting code to the project.
+Yasm has absolutely no warranty; not even for merchantibility or fitness
+for a particular purpose.
+
-------
Libyasm
-------
-Libyasm is 2-clause or 3-clause BSD licensed, with the exception of bitvect,
-which is triple-licensed under the Artistic license, GPL, and LGPL. Libyasm
-is thus GPL and LGPL compatible. In addition, this also means that libyasm
-is free for binary-only distribution as long as the terms of the 3-clause BSD
-license and Artistic license (as it applies to bitvect) are fulfilled.
+Libyasm is 2-clause or 3-clause BSD licensed, with the exception of
+bitvect, which is triple-licensed under the Artistic license, GPL, and
+LGPL. Libyasm is thus GPL and LGPL compatible. In addition, this also
+means that libyasm is free for binary-only distribution as long as the
+terms of the 3-clause BSD license and Artistic license (as it applies to
+bitvect) are fulfilled.
-------
Modules
-------
-Most of the modules are 2-clause BSD licensed, with the exception of:
+The modules are 2-clause or 3-clause BSD licensed, with the exception of:
preprocs/nasm - LGPL licensed
---------
@@ -32,9 +44,10 @@ The frontends are 2-clause BSD licensed.
-------------
License Texts
-------------
-The full text of all licenses are provided in separate files in this
-distribution. Each file may include the entire license (in the case of the BSD
-and Artistic licenses), or may reference the GPL or LGPL license file.
+The full text of all licenses are provided in separate files in the source
+distribution. Each source file may include the entire license (in the case
+of the BSD and Artistic licenses), or may reference the GPL or LGPL license
+file.
BSD.txt - 2-clause and 3-clause BSD licenses
Artistic.txt - Artistic license
diff --git a/GNU_GPL-2.0 b/GNU_GPL-2.0
index d60c31a9..3912109b 100644
--- a/GNU_GPL-2.0
+++ b/GNU_GPL-2.0
@@ -2,7 +2,7 @@
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
@@ -313,7 +313,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
- Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
diff --git a/GNU_LGPL-2.0 b/GNU_LGPL-2.0
index f5030495..2e0c1602 100644
--- a/GNU_LGPL-2.0
+++ b/GNU_LGPL-2.0
@@ -2,7 +2,7 @@
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -450,7 +450,7 @@ convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
+ Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -464,7 +464,7 @@ convey the exclusion of warranty; and each file should have at least the
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
diff --git a/Makefile.am b/Makefile.am
index f3387975..a2d9322f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,7 +8,8 @@ AM_CFLAGS = @MORE_CFLAGS@
bin_PROGRAMS =
dist_man_MANS =
TESTS =
-noinst_PROGRAMS =
+TESTS_ENVIRONMENT =
+noinst_PROGRAMS = genstring
check_PROGRAMS = test_hd
@@ -19,6 +20,7 @@ include_HEADERS = libyasm.h
noinst_HEADERS = util.h
BUILT_SOURCES =
+
# configure.lineno doesn't clean up after itself?
CLEANFILES = configure.lineno
EXTRA_DIST = config/config.rpath
@@ -63,25 +65,36 @@ EXTRA_DIST += Mkfiles/vc/genmacro/genmacro.vcproj
EXTRA_DIST += Mkfiles/vc/genmacro/run.bat
EXTRA_DIST += Mkfiles/vc/genmodule/genmodule.vcproj
EXTRA_DIST += Mkfiles/vc/genmodule/run.bat
+EXTRA_DIST += Mkfiles/vc/genstring/genstring.vcproj
+EXTRA_DIST += Mkfiles/vc/genstring/run.bat
+EXTRA_DIST += Mkfiles/vc/genversion/genversion.vcproj
+EXTRA_DIST += Mkfiles/vc/genversion/run.bat
EXTRA_DIST += Mkfiles/vc/libyasm/libyasm.vcproj
EXTRA_DIST += Mkfiles/vc/modules/modules.vcproj
EXTRA_DIST += Mkfiles/vc/re2c/re2c.vcproj
EXTRA_DIST += Mkfiles/vc/re2c/run.bat
+EXTRA_DIST += Mkfiles/vc/gap/gap.vcproj
+EXTRA_DIST += Mkfiles/vc/gap/run.bat
EXTRA_DIST += Mkfiles/vc8/yasm.sln
EXTRA_DIST += Mkfiles/vc8/yasm.vcproj
EXTRA_DIST += Mkfiles/vc8/config.h
EXTRA_DIST += Mkfiles/vc8/_stdint.h
EXTRA_DIST += Mkfiles/vc8/readme.vc8.txt
-EXTRA_DIST += Mkfiles/vc8/yasm32.rules
-EXTRA_DIST += Mkfiles/vc8/yasm64.rules
+EXTRA_DIST += Mkfiles/vc8/yasm.rules
EXTRA_DIST += Mkfiles/vc8/genmacro/genmacro.vcproj
EXTRA_DIST += Mkfiles/vc8/genmacro/run.bat
EXTRA_DIST += Mkfiles/vc8/genmodule/genmodule.vcproj
EXTRA_DIST += Mkfiles/vc8/genmodule/run.bat
+EXTRA_DIST += Mkfiles/vc8/genstring/genstring.vcproj
+EXTRA_DIST += Mkfiles/vc8/genstring/run.bat
+EXTRA_DIST += Mkfiles/vc8/genversion/genversion.vcproj
+EXTRA_DIST += Mkfiles/vc8/genversion/run.bat
EXTRA_DIST += Mkfiles/vc8/libyasm/libyasm.vcproj
EXTRA_DIST += Mkfiles/vc8/modules/modules.vcproj
EXTRA_DIST += Mkfiles/vc8/re2c/re2c.vcproj
EXTRA_DIST += Mkfiles/vc8/re2c/run.bat
+EXTRA_DIST += Mkfiles/vc8/gap/gap.vcproj
+EXTRA_DIST += Mkfiles/vc8/gap/run.bat
# Until this gets fixed in automake
DISTCLEANFILES = libyasm/stamp-h libyasm/stamp-h[0-9]*
@@ -90,8 +103,24 @@ ACLOCAL_AMFLAGS = -I m4
distclean-local:
-rm -rf results
+if HAVE_PYTHON
+ -rm -rf build
+endif
+
+all-local: python-build
+install-hook: python-install
+uninstall-hook: python-uninstall
if BUILD_MAN
MAINTAINERCLEANFILES = $(dist_man_MANS)
endif
+# genstring build
+genstring_SOURCES =
+EXTRA_DIST += genstring.c
+genstring_LDADD = genstring.$(OBJEXT)
+genstring_LINK = $(CCLD_FOR_BUILD) -o $@
+
+genstring.$(OBJEXT): genstring.c
+ $(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f genstring.c || echo '$(srcdir)/'`genstring.c
+
diff --git a/Mkfiles/Makefile.dj b/Mkfiles/Makefile.dj
index 4aeec1f1..d022b56d 100644
--- a/Mkfiles/Makefile.dj
+++ b/Mkfiles/Makefile.dj
@@ -19,6 +19,12 @@ LIBYASM_OBJS= \
libyasm/arch.o \
libyasm/assocdat.o \
libyasm/bitvect.o \
+ libyasm/bc-align.o \
+ libyasm/bc-data.o \
+ libyasm/bc-incbin.o \
+ libyasm/bc-insn.o \
+ libyasm/bc-org.o \
+ libyasm/bc-reserve.o \
libyasm/bytecode.o \
libyasm/errwarn.o \
libyasm/expr.o \
@@ -27,13 +33,15 @@ LIBYASM_OBJS= \
libyasm/hamt.o \
libyasm/intnum.o \
libyasm/linemgr.o \
+ libyasm/md5.o \
libyasm/mergesort.o \
- libyasm/objfmt.o \
+ libyasm/phash.o \
libyasm/section.o \
libyasm/strcasecmp.o \
libyasm/strsep.o \
libyasm/symrec.o \
libyasm/valparam.o \
+ libyasm/value.o \
libyasm/xmalloc.o \
libyasm/xstrdup.o \
module.o
@@ -42,7 +50,7 @@ MODULES_ARCH_X86_OBJS= \
modules/arch/x86/x86arch.o \
modules/arch/x86/x86bc.o \
modules/arch/x86/x86expr.o \
- x86id.o
+ modules/arch/x86/x86id.o
YASM_MODULES=arch_x86
MODULES_ARCH_LC3B_OBJS= \
@@ -57,9 +65,17 @@ MODULES_ARCH_OBJS= \
MODULES_DBGFMTS_OBJS= \
modules/dbgfmts/null/null-dbgfmt.o \
- modules/dbgfmts/stabs/stabs-dbgfmt.o
+ modules/dbgfmts/stabs/stabs-dbgfmt.o \
+ modules/dbgfmts/codeview/cv-dbgfmt.o \
+ modules/dbgfmts/codeview/cv-symline.o \
+ modules/dbgfmts/codeview/cv-type.o \
+ modules/dbgfmts/dwarf2/dwarf2-dbgfmt.o \
+ modules/dbgfmts/dwarf2/dwarf2-line.o \
+ modules/dbgfmts/dwarf2/dwarf2-info.o \
+ modules/dbgfmts/dwarf2/dwarf2-aranges.o
YASM_MODULES+=dbgfmt_null
YASM_MODULES+=dbgfmt_stabs
+YASM_MODULES+=dbgfmt_dwarf2
MODULES_LISTFMTS_OBJS= \
modules/listfmts/nasm/nasm-listfmt.o
@@ -124,31 +140,47 @@ YASM_OBJS= \
$(LIBYASM_OBJS) \
$(MODULES_OBJS)
+genstring: genstring.c
+ $(BUILDCC) -o $@ $<
+
+license.c: COPYING genstring
+ ./genstring license_msg $@ COPYING
+
+frontends/yasm/yasm.c: license.c
+
genmacro: modules/preprocs/nasm/genmacro.c
$(BUILDCC) -o $@ $<
-nasm-macros.c: modules/preprocs/nasm/standard.mac genmacro
- ./genmacro $<
+nasm-macros.c: modules/preprocs/nasm/standard.mac version.mac genmacro
+ ./genmacro modules/preprocs/nasm/standard.mac version.mac
modules/preprocs/nasm/nasm-pp.c: nasm-macros.c
+genversion: modules/preprocs/nasm/genversion.c
+ $(BUILDCC) -IMkfiles/dj -o $@ $<
+
+version.mac: genversion
+ ./genversion $@
+
genmodule: libyasm/genmodule.c
$(BUILDCC) -o $@ $<
module.c: libyasm/module.in genmodule
- ./genmodule $< $(YASM_MODULES)
+ ./genmodule libyasm/module.in $(YASM_MODULES)
+
+x86parse.c: modules/arch/x86/x86parse.gap gap
+ ./gap modules/arch/x86/x86parse.gap $@
-x86id.c: modules/arch/x86/x86id.re re2c
- ./re2c -s -o $@ $<
+modules/arch/x86/x86id.c: x86parse.c
lc3bid.c: modules/arch/lc3b/lc3bid.re re2c
- ./re2c -s -o $@ $<
+ ./re2c -s -o $@ modules/arch/lc3b/lc3bid.re
gas-token.c: modules/parsers/gas/gas-token.re re2c
- ./re2c -b -o $@ $<
+ ./re2c -b -o $@ modules/parsers/gas/gas-token.re
nasm-token.c: modules/parsers/nasm/nasm-token.re re2c
- ./re2c -b -o $@ $<
+ ./re2c -b -o $@ modules/parsers/nasm/nasm-token.re
RE2C_SRCS= \
tools/re2c/main.c \
@@ -164,6 +196,16 @@ RE2C_SRCS= \
re2c: $(RE2C_SRCS)
$(BUILDCC) -I. -o re2c $(RE2C_SRCS)
+GAP_SRCS= \
+ tools/gap/gap.c \
+ tools/gap/perfect.c \
+ libyasm/phash.c \
+ libyasm/xmalloc.c \
+ libyasm/xstrdup.c
+
+gap: $(GAP_SRCS)
+ $(BUILDCC) -I. -o gap $(GAP_SRCS)
+
yasm: $(YASM_OBJS)
$(CC) -o yasm $(YASM_OBJS)
diff --git a/Mkfiles/Makefile.flat b/Mkfiles/Makefile.flat
index e02e403c..0724f3de 100644
--- a/Mkfiles/Makefile.flat
+++ b/Mkfiles/Makefile.flat
@@ -9,8 +9,8 @@
# NOTE: Needs a valid config.h for the platform being compiled on.
#
# This file should be customized to particular platforms by changing CC and
-# CFLAGS appropriately, along with writing a config.h for the platform and
-# placing it in a libyasm subdirectory.
+# CFLAGS appropriately, along with writing a config.h and _stdint.h for the
+# platform and placing them in a subdirectory of Mkfiles.
CFLAGS=-DHAVE_CONFIG_H -IMkfiles -I.
CC?=gcc
@@ -22,6 +22,12 @@ LIBYASM_OBJS= \
libyasm/arch.o \
libyasm/assocdat.o \
libyasm/bitvect.o \
+ libyasm/bc-align.o \
+ libyasm/bc-data.o \
+ libyasm/bc-incbin.o \
+ libyasm/bc-insn.o \
+ libyasm/bc-org.o \
+ libyasm/bc-reserve.o \
libyasm/bytecode.o \
libyasm/errwarn.o \
libyasm/expr.o \
@@ -30,13 +36,15 @@ LIBYASM_OBJS= \
libyasm/hamt.o \
libyasm/intnum.o \
libyasm/linemgr.o \
+ libyasm/md5.o \
libyasm/mergesort.o \
- libyasm/objfmt.o \
+ libyasm/phash.o \
libyasm/section.o \
libyasm/strcasecmp.o \
libyasm/strsep.o \
libyasm/symrec.o \
libyasm/valparam.o \
+ libyasm/value.o \
libyasm/xmalloc.o \
libyasm/xstrdup.o \
module.o
@@ -45,7 +53,7 @@ MODULES_ARCH_X86_OBJS= \
modules/arch/x86/x86arch.o \
modules/arch/x86/x86bc.o \
modules/arch/x86/x86expr.o \
- x86id.o
+ modules/arch/x86/x86id.o
YASM_MODULES=arch_x86
MODULES_ARCH_LC3B_OBJS= \
@@ -60,9 +68,17 @@ MODULES_ARCH_OBJS= \
MODULES_DBGFMTS_OBJS= \
modules/dbgfmts/null/null-dbgfmt.o \
- modules/dbgfmts/stabs/stabs-dbgfmt.o
+ modules/dbgfmts/stabs/stabs-dbgfmt.o \
+ modules/dbgfmts/codeview/cv-dbgfmt.o \
+ modules/dbgfmts/codeview/cv-symline.o \
+ modules/dbgfmts/codeview/cv-type.o \
+ modules/dbgfmts/dwarf2/dwarf2-dbgfmt.o \
+ modules/dbgfmts/dwarf2/dwarf2-line.o \
+ modules/dbgfmts/dwarf2/dwarf2-info.o \
+ modules/dbgfmts/dwarf2/dwarf2-aranges.o
YASM_MODULES+=dbgfmt_null
YASM_MODULES+=dbgfmt_stabs
+YASM_MODULES+=dbgfmt_dwarf2
MODULES_LISTFMTS_OBJS= \
modules/listfmts/nasm/nasm-listfmt.o
@@ -127,31 +143,47 @@ YASM_OBJS= \
$(LIBYASM_OBJS) \
$(MODULES_OBJS)
+genstring: genstring.c
+ $(BUILDCC) -o $@ $<
+
+license.c: COPYING genstring
+ ./genstring license_msg $@ COPYING
+
+frontends/yasm/yasm.c: license.c
+
genmacro: modules/preprocs/nasm/genmacro.c
$(BUILDCC) -o $@ $<
-nasm-macros.c: modules/preprocs/nasm/standard.mac genmacro
- ./genmacro $<
+nasm-macros.c: modules/preprocs/nasm/standard.mac version.mac genmacro
+ ./genmacro modules/preprocs/nasm/standard.mac version.mac
modules/preprocs/nasm/nasm-pp.c: nasm-macros.c
+genversion: modules/preprocs/nasm/genversion.c
+ $(BUILDCC) -IMkfiles -o $@ $<
+
+version.mac: genversion
+ ./genversion $@
+
genmodule: libyasm/genmodule.c
$(BUILDCC) -o $@ $<
module.c: libyasm/module.in genmodule
- ./genmodule $< $(YASM_MODULES)
+ ./genmodule libyasm/module.in $(YASM_MODULES)
+
+x86parse.c: modules/arch/x86/x86parse.gap gap
+ ./gap modules/arch/x86/x86parse.gap $@
-x86id.c: modules/arch/x86/x86id.re re2c
- ./re2c -s -o $@ $<
+modules/arch/x86/x86id.c: x86parse.c
lc3bid.c: modules/arch/lc3b/lc3bid.re re2c
- ./re2c -s -o $@ $<
+ ./re2c -s -o $@ modules/arch/lc3b/lc3bid.re
gas-token.c: modules/parsers/gas/gas-token.re re2c
- ./re2c -b -o $@ $<
+ ./re2c -b -o $@ modules/parsers/gas/gas-token.re
nasm-token.c: modules/parsers/nasm/nasm-token.re re2c
- ./re2c -b -o $@ $<
+ ./re2c -b -o $@ modules/parsers/nasm/nasm-token.re
RE2C_SRCS= \
tools/re2c/main.c \
@@ -167,6 +199,16 @@ RE2C_SRCS= \
re2c: $(RE2C_SRCS)
$(BUILDCC) -I. -o re2c $(RE2C_SRCS)
+GAP_SRCS= \
+ tools/gap/gap.c \
+ tools/gap/perfect.c \
+ libyasm/phash.c \
+ libyasm/xmalloc.c \
+ libyasm/xstrdup.c
+
+gap: $(GAP_SRCS)
+ $(BUILDCC) -I. -o gap $(GAP_SRCS)
+
yasm: $(YASM_OBJS)
$(CC) -o yasm $(YASM_OBJS)
diff --git a/Mkfiles/dj/config.h b/Mkfiles/dj/config.h
index 40f43008..e5e3f5db 100644
--- a/Mkfiles/dj/config.h
+++ b/Mkfiles/dj/config.h
@@ -1,84 +1,27 @@
/* $Id$ */
+#define yasm__splitpath(path, tail) yasm__splitpath_win(path, tail)
+#define yasm__abspath(path) yasm__abspath_win(path)
+#define yasm__combpath(from, to) yasm__combpath_win(from, to)
+
/* */
/* #undef ENABLE_NLS */
/* Define if you have the `abort' function. */
#define HAVE_ABORT 1
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-/* #undef HAVE_ALLOCA_H */
-
-/* Define to 1 if you have the `argz_append' function. */
-/* #undef HAVE_ARGZ_APPEND */
-
-/* Define to 1 if you have the `argz_create_sep' function. */
-/* #undef HAVE_ARGZ_CREATE_SEP */
-
-/* Define if you have the <argz.h> header file. */
-/* #undef HAVE_ARGZ_H */
-
-/* Define to 1 if you have the `argz_insert' function. */
-/* #undef HAVE_ARGZ_INSERT */
-
-/* Define to 1 if you have the `argz_next' function. */
-/* #undef HAVE_ARGZ_NEXT */
-
-/* Define to 1 if you have the `argz_stringify' function. */
-/* #undef HAVE_ARGZ_STRINGIFY */
-
-/* Define to 1 if you have the <assert.h> header file. */
-/* #undef HAVE_ASSERT_H */
-
-/* Define to 1 if you have the `basename' function. */
-#define HAVE_BASENAME 1
-
-/* Define to 1 if you have the `bcopy' function. */
-/* #undef HAVE_BCOPY */
-
/* */
/* #undef HAVE_CATGETS */
-/* Define to 1 if you have the `closedir' function. */
-/* #undef HAVE_CLOSEDIR */
-
-/* Define to 1 if you have the <ctype.h> header file. */
-#define HAVE_CTYPE_H 1
-
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
/* #undef HAVE_DCGETTEXT */
-/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_DIRENT_H */
-
-/* Define if you have the GNU dld library. */
-/* #undef HAVE_DLD */
-
-/* Define to 1 if you have the <dld.h> header file. */
-/* #undef HAVE_DLD_H */
-
-/* Define to 1 if you have the `dlerror' function. */
-/* #undef HAVE_DLERROR */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-/* #undef HAVE_DLFCN_H */
-
-/* Define to 1 if you have the <dl.h> header file. */
-/* #undef HAVE_DL_H */
-
/* Define if you don't have `vprintf' but do have `_doprnt'. */
/* #undef HAVE_DOPRNT */
-/* Define to 1 if you have the <errno.h> header file. */
-#define HAVE_ERRNO_H 1
-
-/* Define to 1 if the system has the type `error_t'. */
-/* #undef HAVE_ERROR_T */
-
-/* Define if you have the `fork' function. */
-/* #undef HAVE_FORK */
+/* Define to 1 if you have the `getcwd' function. */
+#define HAVE_GETCWD 1
/* */
/* #undef HAVE_GETTEXT */
@@ -89,28 +32,18 @@
/* Define if you have the iconv() function. */
/* #undef HAVE_ICONV */
-/* Define to 1 if you have the `index' function. */
-/* #undef HAVE_INDEX */
-
/* Define if you have the <inttypes.h> header file. */
/* #undef HAVE_INTTYPES_H */
/* */
/* #undef HAVE_LC_MESSAGES */
-/* Define if you have the libdl library or equivalent. */
-/* #undef HAVE_LIBDL */
+/* Define to 1 if you have the <libgen.h> header file. */
+/* #undef HAVE_LIBGEN_H */
/* Define if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
-/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
- to 0 otherwise. */
-#define HAVE_MALLOC 1
-
-/* Define if you have the <malloc.h> header file. */
-#define HAVE_MALLOC_H 1
-
/* Define if you have the `memcpy' function. */
#define HAVE_MEMCPY 1
@@ -123,45 +56,9 @@
/* Define if you have the `mergesort function. */
/* #undef HAVE_MERGESORT */
-/* Define if you have the `msgctl' function. */
-/* #undef HAVE_MSGCTL */
-
-/* Define if you have the `msgget' function. */
-/* #undef HAVE_MSGGET */
-
-/* Define if you have the `msgrcv' function. */
-/* #undef HAVE_MSGRCV */
-
-/* Define if you have the `msgsnd' function. */
-/* #undef HAVE_MSGSND */
-
-/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
-/* #undef HAVE_NDIR_H */
-
-/* Define to 1 if you have the `opendir' function. */
-/* #undef HAVE_OPENDIR */
-
-/* Define if libtool can extract symbol lists from object files. */
-/* #undef HAVE_PRELOADED_SYMBOLS */
-
-/* Define to 1 if you have the `readdir' function. */
-/* #undefine HAVE_READDIR */
-
-/* Define to 1 if you have the `rindex' function. */
-/* #undef HAVE_RINDEX */
-
-/* Define if you have the shl_load function. */
-/* #undef HAVE_SHL_LOAD */
-
-/* Define if you have the `snprintf' function. */
-/* #undef HAVE_SNPRINTF */
-
/* Define if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
-/* Define to 1 if you have the <stdio.h> header file. */
-#define HAVE_STDIO_H 1
-
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
@@ -171,18 +68,9 @@
/* Define if you have the `strcasecmp' function. */
#define HAVE_STRCASECMP 1
-/* Define if you have the `strchr' function. */
-#define HAVE_STRCHR 1
-
-/* Define to 1 if you have the `strcmp' function. */
-#define HAVE_STRCMP 1
-
/* Define if you have the `strcmpi' function. */
/* #undef HAVE_STRCMPI */
-/* Define if you have the `strerror' function. */
-#define HAVE_STRERROR 1
-
/* Define if you have the `stricmp' function. */
/* #undef HAVE_STRICMP */
@@ -201,32 +89,9 @@
/* Define if you have the `strsep' function. */
#define HAVE_STRSEP 1
-/* Define if you have the <sys/cdefs.h> header file. */
-#define HAVE_SYS_CDEFS_H 1
-
-/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_SYS_DIR_H */
-
-/* Define to 1 if you have the <sys/dl.h> header file. */
-/* #undef HAVE_SYS_DL_H */
-
-/* Define if you have the <sys/ipc.h> header file. */
-/* #undef HAVE_SYS_IPC_H */
-
-/* Define if you have the <sys/msg.h> header file. */
-/* #undef HAVE_SYS_MSG_H */
-
-/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_SYS_NDIR_H */
-
/* Define if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
-/* Define if you have the <sys/queue.h> header file. */
-/* #undef HAVE_SYS_QUEUE_H */
-
/* Define if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
@@ -242,53 +107,24 @@
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
-/* Define if you have the `vfork' function. */
-/* #undef HAVE_VFORK */
-
-/* Define if you have the <vfork.h> header file. */
-/* #undef HAVE_VFORK_H */
-
/* Define if you have the vprintf function. */
#define HAVE_VPRINTF 1
/* Define to 1 if you have the `vsnprintf' function. */
/* #undef HAVE_VSNPRINTF */
-/* Define if you have the `wait' function. */
-#define HAVE_WAIT 1
-
-/* Define if `fork' works. */
-/* #undef HAVE_WORKING_FORK */
-
-/* Define if `vfork' works. */
-/* #undef HAVE_WORKING_VFORK */
-
-/* Define if the OS needs help to load dependent libraries for dlopen(). */
-#define LTDL_DLOPEN_DEPLIBS 1
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#define LTDL_OBJDIR ".libs/"
-
-/* Define to the name of the environment variable that determines the dynamic
- library search path. */
-#define LTDL_SHLIBPATH_VAR "PATH"
-
-/* Define to the extension used for shared libraries, say, ".so". */
-#define LTDL_SHLIB_EXT ".dll"
-
-/* Define to the system default library search path. */
-#define LTDL_SYSSEARCHPATH "/lib:/usr/lib"
-
-/* Define if dlsym() requires a leading underscode in symbol names. */
-/* #undef NEED_USCORE */
-
/* Name of package */
#define PACKAGE "yasm"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "bug-yasm@tortall.net"
+/* Define to build version of this package. */
+#define PACKAGE_BUILD "HEAD"
+
+/* Define to internal version of this package. */
+#define PACKAGE_INTVER "0.5.99"
+
/* Define to the full name of this package. */
#define PACKAGE_NAME "yasm"
@@ -304,45 +140,41 @@
/* Define if the C compiler supports function prototypes. */
#define PROTOTYPES 1
+/* The size of a `char', as computed by sizeof. */
+/* #undef SIZEOF_CHAR */
+
+/* The size of a `int', as computed by sizeof. */
+/* #undef SIZEOF_INT */
+
+/* The size of a `long', as computed by sizeof. */
+/* #undef SIZEOF_LONG */
+
+/* The size of a `short', as computed by sizeof. */
+/* #undef SIZEOF_SHORT */
+
+/* The size of a `void*', as computed by sizeof. */
+/* #undef SIZEOF_VOIDP */
+
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
-/* Combined test for fork/wait/msg* */
-/* #undef USE_FORKWAITMSG */
-
/* Version number of package */
#define VERSION "HEAD"
/* Define if using the dmalloc debugging malloc package */
/* #undef WITH_DMALLOC */
-/* Make sure we see all GNU extensions. */
-/* #undef _GNU_SOURCE */
-
-/* Make sure we see all SVID extensions. */
-/* #undef _SVID_SOURCE */
-
/* Define like PROTOTYPES; this can be used by system headers. */
#define __PROTOTYPES 1
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
-/* Define to a type to use for `error_t' if it is not otherwise available. */
-#define error_t int
-
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
if it is not supported. */
+#ifndef __cplusplus
/* #undef inline */
-
-/* Define to rpl_malloc if the replacement function should be used. */
-/* #undef malloc */
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-/* #undef pid_t */
+#endif
/* Define to `unsigned' if <sys/types.h> doesn't define. */
/* #undef size_t */
-
-/* Define as `fork' if `vfork' does not work. */
-/* #undef vfork */
diff --git a/Mkfiles/vc/config.h b/Mkfiles/vc/config.h
index acd7be02..35e2a12d 100644
--- a/Mkfiles/vc/config.h
+++ b/Mkfiles/vc/config.h
@@ -1,84 +1,27 @@
/* $Id$ */
+#define yasm__splitpath(path, tail) yasm__splitpath_win(path, tail)
+#define yasm__abspath(path) yasm__abspath_win(path)
+#define yasm__combpath(from, to) yasm__combpath_win(from, to)
+
/* */
/* #undef ENABLE_NLS */
/* Define if you have the `abort' function. */
#define HAVE_ABORT 1
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-/* #undef HAVE_ALLOCA_H */
-
-/* Define to 1 if you have the `argz_append' function. */
-/* #undef HAVE_ARGZ_APPEND */
-
-/* Define to 1 if you have the `argz_create_sep' function. */
-/* #undef HAVE_ARGZ_CREATE_SEP */
-
-/* Define if you have the <argz.h> header file. */
-/* #undef HAVE_ARGZ_H */
-
-/* Define to 1 if you have the `argz_insert' function. */
-/* #undef HAVE_ARGZ_INSERT */
-
-/* Define to 1 if you have the `argz_next' function. */
-/* #undef HAVE_ARGZ_NEXT */
-
-/* Define to 1 if you have the `argz_stringify' function. */
-/* #undef HAVE_ARGZ_STRINGIFY */
-
-/* Define to 1 if you have the <assert.h> header file. */
-/* #undef HAVE_ASSERT_H */
-
-/* Define to 1 if you have the `basename' function. */
-#define HAVE_BASENAME 1
-
-/* Define to 1 if you have the `bcopy' function. */
-/* #undef HAVE_BCOPY */
-
/* */
/* #undef HAVE_CATGETS */
-/* Define to 1 if you have the `closedir' function. */
-/* #undef HAVE_CLOSEDIR */
-
-/* Define to 1 if you have the <ctype.h> header file. */
-#define HAVE_CTYPE_H 1
-
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
/* #undef HAVE_DCGETTEXT */
-/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_DIRENT_H */
-
-/* Define if you have the GNU dld library. */
-/* #undef HAVE_DLD */
-
-/* Define to 1 if you have the <dld.h> header file. */
-/* #undef HAVE_DLD_H */
-
-/* Define to 1 if you have the `dlerror' function. */
-/* #undef HAVE_DLERROR */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-/* #undef HAVE_DLFCN_H */
-
-/* Define to 1 if you have the <dl.h> header file. */
-/* #undef HAVE_DL_H */
-
/* Define if you don't have `vprintf' but do have `_doprnt'. */
/* #undef HAVE_DOPRNT */
-/* Define to 1 if you have the <errno.h> header file. */
-#define HAVE_ERRNO_H 1
-
-/* Define to 1 if the system has the type `error_t'. */
-/* #undef HAVE_ERROR_T */
-
-/* Define if you have the `fork' function. */
-/* #undef HAVE_FORK */
+/* Define to 1 if you have the `getcwd' function. */
+#define HAVE_GETCWD 1
/* */
/* #undef HAVE_GETTEXT */
@@ -89,28 +32,18 @@
/* Define if you have the iconv() function. */
/* #undef HAVE_ICONV */
-/* Define to 1 if you have the `index' function. */
-/* #undef HAVE_INDEX */
-
/* Define if you have the <inttypes.h> header file. */
/* #undef HAVE_INTTYPES_H */
/* */
/* #undef HAVE_LC_MESSAGES */
-/* Define if you have the libdl library or equivalent. */
-/* #undef HAVE_LIBDL */
+/* Define to 1 if you have the <libgen.h> header file. */
+/* #undef HAVE_LIBGEN_H */
/* Define if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
-/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
- to 0 otherwise. */
-#define HAVE_MALLOC 1
-
-/* Define if you have the <malloc.h> header file. */
-#define HAVE_MALLOC_H 1
-
/* Define if you have the `memcpy' function. */
#define HAVE_MEMCPY 1
@@ -123,46 +56,9 @@
/* Define if you have the `mergesort function. */
/* #undef HAVE_MERGESORT */
-/* Define if you have the `msgctl' function. */
-/* #undef HAVE_MSGCTL */
-
-/* Define if you have the `msgget' function. */
-/* #undef HAVE_MSGGET */
-
-/* Define if you have the `msgrcv' function. */
-/* #undef HAVE_MSGRCV */
-
-/* Define if you have the `msgsnd' function. */
-/* #undef HAVE_MSGSND */
-
-/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
-/* #undef HAVE_NDIR_H */
-
-/* Define to 1 if you have the `opendir' function. */
-/* #undef HAVE_OPENDIR */
-
-/* Define if libtool can extract symbol lists from object files. */
-/* #undef HAVE_PRELOADED_SYMBOLS */
-
-/* Define to 1 if you have the `readdir' function. */
-/* #undefine HAVE_READDIR */
-
-/* Define to 1 if you have the `rindex' function. */
-/* #undef HAVE_RINDEX */
-
-/* Define if you have the shl_load function. */
-/* #undef HAVE_SHL_LOAD */
-
-/* Define if you have the `snprintf' function. */
-#define HAVE_SNPRINTF 1
-#define snprintf _snprintf
-
/* Define if you have the <stdint.h> header file. */
/* #undef HAVE_STDINT_H */
-/* Define to 1 if you have the <stdio.h> header file. */
-#define HAVE_STDIO_H 1
-
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
@@ -172,22 +68,11 @@
/* Define if you have the `strcasecmp' function. */
/* #undef HAVE_STRCASECMP */
-/* Define if you have the `strchr' function. */
-#define HAVE_STRCHR 1
-
-/* Define to 1 if you have the `strcmp' function. */
-#define HAVE_STRCMP 1
-
/* Define if you have the `strcmpi' function. */
-#define HAVE_STRCMPI 1
-#define strcmpi _strcmpi
-
-/* Define if you have the `strerror' function. */
-#define HAVE_STRERROR 1
+/* #undefine HAVE_STRCMPI */
/* Define if you have the `stricmp' function. */
-#define HAVE_STRICMP 1
-#define stricmp _stricmp
+#define HAVE__STRICMP 1
/* Define if you have the <strings.h> header file. */
/* #undef HAVE_STRINGS_H */
@@ -204,32 +89,9 @@
/* Define if you have the `strsep' function. */
/* #undef HAVE_STRSEP */
-/* Define if you have the <sys/cdefs.h> header file. */
-/* #undef HAVE_SYS_CDEFS_H */
-
-/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_SYS_DIR_H */
-
-/* Define to 1 if you have the <sys/dl.h> header file. */
-/* #undef HAVE_SYS_DL_H */
-
-/* Define if you have the <sys/ipc.h> header file. */
-/* #undef HAVE_SYS_IPC_H */
-
-/* Define if you have the <sys/msg.h> header file. */
-/* #undef HAVE_SYS_MSG_H */
-
-/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_SYS_NDIR_H */
-
/* Define if you have the <sys/param.h> header file. */
/* #undef HAVE_SYS_PARAM_H */
-/* Define if you have the <sys/queue.h> header file. */
-/* #undef HAVE_SYS_QUEUE_H */
-
/* Define if you have the <sys/stat.h> header file. */
/* #undef HAVE_SYS_STAT_H */
@@ -246,53 +108,24 @@
/* Define if you have the <unistd.h> header file. */
/* #undef HAVE_UNISTD_H */
-/* Define if you have the `vfork' function. */
-/* #undef HAVE_VFORK */
-
-/* Define if you have the <vfork.h> header file. */
-/* #undef HAVE_VFORK_H */
-
/* Define if you have the vprintf function. */
#define HAVE_VPRINTF 1
/* Define to 1 if you have the `vsnprintf' function. */
/* #undef HAVE_VSNPRINTF */
-/* Define if you have the `wait' function. */
-/* #undef HAVE_WAIT */
-
-/* Define if `fork' works. */
-/* #undef HAVE_WORKING_FORK */
-
-/* Define if `vfork' works. */
-/* #undef HAVE_WORKING_VFORK */
-
-/* Define if the OS needs help to load dependent libraries for dlopen(). */
-#define LTDL_DLOPEN_DEPLIBS 1
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#define LTDL_OBJDIR ".libs/"
-
-/* Define to the name of the environment variable that determines the dynamic
- library search path. */
-#define LTDL_SHLIBPATH_VAR "PATH"
-
-/* Define to the extension used for shared libraries, say, ".so". */
-#define LTDL_SHLIB_EXT ".dll"
-
-/* Define to the system default library search path. */
-#define LTDL_SYSSEARCHPATH "/lib:/usr/lib"
-
-/* Define if dlsym() requires a leading underscode in symbol names. */
-/* #undef NEED_USCORE */
-
/* Name of package */
#define PACKAGE "yasm"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "bug-yasm@tortall.net"
+/* Define to build version of this package. */
+#define PACKAGE_BUILD "HEAD"
+
+/* Define to internal version of this package. */
+#define PACKAGE_INTVER "0.5.99"
+
/* Define to the full name of this package. */
#define PACKAGE_NAME "yasm"
@@ -308,45 +141,41 @@
/* Define if the C compiler supports function prototypes. */
#define PROTOTYPES 1
+/* The size of a `char', as computed by sizeof. */
+/* #undef SIZEOF_CHAR */
+
+/* The size of a `int', as computed by sizeof. */
+/* #undef SIZEOF_INT */
+
+/* The size of a `long', as computed by sizeof. */
+/* #undef SIZEOF_LONG */
+
+/* The size of a `short', as computed by sizeof. */
+/* #undef SIZEOF_SHORT */
+
+/* The size of a `void*', as computed by sizeof. */
+/* #undef SIZEOF_VOIDP */
+
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
-/* Combined test for fork/wait/msg* */
-/* #undef USE_FORKWAITMSG */
-
/* Version number of package */
#define VERSION "HEAD"
/* Define if using the dmalloc debugging malloc package */
/* #undef WITH_DMALLOC */
-/* Make sure we see all GNU extensions. */
-/* #undef _GNU_SOURCE */
-
-/* Make sure we see all SVID extensions. */
-/* #undef _SVID_SOURCE */
-
/* Define like PROTOTYPES; this can be used by system headers. */
#define __PROTOTYPES 1
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
-/* Define to a type to use for `error_t' if it is not otherwise available. */
-#define error_t int
-
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
if it is not supported. */
+#ifndef __cplusplus
/* #undef inline */
-
-/* Define to rpl_malloc if the replacement function should be used. */
-/* #undef malloc */
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-#define pid_t int
+#endif
/* Define to `unsigned' if <sys/types.h> doesn't define. */
/* #undef size_t */
-
-/* Define as `fork' if `vfork' does not work. */
-/* #undef vfork */
diff --git a/Mkfiles/vc/gap/gap.vcproj b/Mkfiles/vc/gap/gap.vcproj
new file mode 100644
index 00000000..ee7c8770
--- /dev/null
+++ b/Mkfiles/vc/gap/gap.vcproj
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="gap"
+ ProjectGUID="{5758BF4E-ABC4-11DA-B012-B622A1EF5492}"
+ RootNamespace="gap"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..,../../.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;STDC_HEADERS"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/gap.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/gap.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="run.bat &quot;$(TargetPath)&quot;"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..,../../.."
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;STDC_HEADERS"
+ RuntimeLibrary="4"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/gap.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="run.bat &quot;$(TargetPath)&quot;"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{7D996CB2-ABC4-11DA-B012-B622A1EF5492}">
+ <File
+ RelativePath="..\..\..\tools\gap\gap.c">
+ </File>
+ <File
+ RelativePath="..\..\..\tools\gap\perfect.c">
+ </File>
+ <File
+ RelativePath="..\..\..\libyasm\phash.c">
+ </File>
+ <File
+ RelativePath="..\..\..\libyasm\xmalloc.c">
+ </File>
+ <File
+ RelativePath="..\..\..\libyasm\xstrdup.c">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{85DD7A94-ABC4-11DA-B012-B622A1EF5492}">
+ <File
+ RelativePath="..\..\..\tools\gap\perfect.h">
+ </File>
+ <File
+ RelativePath="..\..\..\tools\gap\standard.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{8EB9B268-ABC4-11DA-B012-B622A1EF5492}">
+ </Filter>
+ <File
+ RelativePath=".\run.bat">
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Mkfiles/vc/gap/run.bat b/Mkfiles/vc/gap/run.bat
new file mode 100644
index 00000000..d5060801
--- /dev/null
+++ b/Mkfiles/vc/gap/run.bat
@@ -0,0 +1,2 @@
+cd ..\..\..\
+%1 modules\arch\x86\x86parse.gap x86parse.c
diff --git a/Mkfiles/vc/genmacro/run.bat b/Mkfiles/vc/genmacro/run.bat
index 83e80ab8..f3323e72 100644
--- a/Mkfiles/vc/genmacro/run.bat
+++ b/Mkfiles/vc/genmacro/run.bat
@@ -1,2 +1,2 @@
cd ..\..\..
-%1 modules\preprocs\nasm\standard.mac
+%1 modules\preprocs\nasm\standard.mac version.mac
diff --git a/Mkfiles/vc/genstring/genstring.vcproj b/Mkfiles/vc/genstring/genstring.vcproj
new file mode 100644
index 00000000..cc1ba413
--- /dev/null
+++ b/Mkfiles/vc/genstring/genstring.vcproj
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="genstring"
+ ProjectGUID="{021CEB0A-F721-4F59-B349-9CEEAF244459}"
+ RootNamespace="genstring"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/genstring.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/genstring.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="run.bat &quot;$(TargetPath)&quot;"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="4"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/genstring.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="run.bat &quot;$(TargetPath)&quot;"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{28EBE11C-5BE8-4935-9381-F57696749E0C}">
+ <File
+ RelativePath="..\..\..\genstring.c">
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\run.bat">
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Mkfiles/vc/genstring/run.bat b/Mkfiles/vc/genstring/run.bat
new file mode 100644
index 00000000..5864b1dc
--- /dev/null
+++ b/Mkfiles/vc/genstring/run.bat
@@ -0,0 +1,2 @@
+cd ..\..\..
+%1 license_msg license.c COPYING
diff --git a/Mkfiles/vc/genversion/genversion.vcproj b/Mkfiles/vc/genversion/genversion.vcproj
new file mode 100644
index 00000000..62e252d3
--- /dev/null
+++ b/Mkfiles/vc/genversion/genversion.vcproj
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="genversion"
+ ProjectGUID="{B545983B-8EE0-4A7B-A67A-E749EEAE62A2}"
+ RootNamespace="genversion"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\vc8"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/genversion.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/genversion.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="run.bat &quot;$(TargetPath)&quot;"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\vc8"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="4"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/genversion.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="run.bat &quot;$(TargetPath)&quot;"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{E67ED277-E4F2-4D79-8C9E-962BAC164F3F}">
+ <File
+ RelativePath="..\..\..\modules\preprocs\nasm\genversion.c">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl">
+ <File
+ RelativePath="..\config.h">
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\run.bat">
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Mkfiles/vc/genversion/run.bat b/Mkfiles/vc/genversion/run.bat
new file mode 100644
index 00000000..30edf8f1
--- /dev/null
+++ b/Mkfiles/vc/genversion/run.bat
@@ -0,0 +1,2 @@
+cd ..\..\..
+%1 version.mac
diff --git a/Mkfiles/vc/libyasm/libyasm.vcproj b/Mkfiles/vc/libyasm/libyasm.vcproj
index 1891b729..bf8aba8b 100644
--- a/Mkfiles/vc/libyasm/libyasm.vcproj
+++ b/Mkfiles/vc/libyasm/libyasm.vcproj
@@ -122,372 +122,90 @@
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath="..\..\..\libyasm\arch.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\assocdat.c">
</File>
<File
RelativePath="..\..\..\libyasm\bitvect.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\libyasm\bc-align.c">
+ </File>
+ <File
+ RelativePath="..\..\..\libyasm\bc-data.c">
+ </File>
+ <File
+ RelativePath="..\..\..\libyasm\bc-incbin.c">
+ </File>
+ <File
+ RelativePath="..\..\..\libyasm\bc-insn.c">
+ </File>
+ <File
+ RelativePath="..\..\..\libyasm\bc-org.c">
+ </File>
+ <File
+ RelativePath="..\..\..\libyasm\bc-reserve.c">
</File>
<File
RelativePath="..\..\..\libyasm\bytecode.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\errwarn.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\expr.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\file.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\floatnum.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\hamt.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\intnum.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\linemgr.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\libyasm\md5.c">
</File>
<File
RelativePath="..\..\..\libyasm\mergesort.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\module.c">
</File>
<File
- RelativePath="..\..\..\libyasm\objfmt.c">
+ RelativePath="..\..\..\libyasm\phash.c">
</File>
<File
RelativePath="..\..\..\libyasm\section.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\strcasecmp.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\strsep.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\symrec.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\valparam.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\libyasm\value.c">
</File>
<File
RelativePath="..\..\..\libyasm\xmalloc.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\xstrdup.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
</Filter>
<Filter
@@ -545,6 +263,9 @@
RelativePath="..\..\..\libyasm\linemgr.h">
</File>
<File
+ RelativePath="..\..\..\libyasm\md5.h">
+ </File>
+ <File
RelativePath="..\..\..\libyasm\objfmt.h">
</File>
<File
@@ -554,6 +275,9 @@
RelativePath="..\..\..\libyasm\parser.h">
</File>
<File
+ RelativePath="..\..\..\libyasm\phash.h">
+ </File>
+ <File
RelativePath="..\..\..\libyasm\preproc.h">
</File>
<File
@@ -568,6 +292,9 @@
<File
RelativePath="..\..\..\libyasm\valparam.h">
</File>
+ <File
+ RelativePath="..\..\..\libyasm\value.h">
+ </File>
</Filter>
</Files>
<Globals>
diff --git a/Mkfiles/vc/modules/modules.vcproj b/Mkfiles/vc/modules/modules.vcproj
index f407fd19..e88295be 100644
--- a/Mkfiles/vc/modules/modules.vcproj
+++ b/Mkfiles/vc/modules/modules.vcproj
@@ -48,7 +48,6 @@
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"
- CommandLine="cmd &lt;build.bat"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
@@ -127,149 +126,30 @@
Filter="">
<File
RelativePath="..\..\..\modules\arch\lc3b\lc3barch.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\arch\lc3b\lc3barch.h">
</File>
<File
RelativePath="..\..\..\modules\arch\lc3b\lc3bbc.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\lc3bid.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\arch\x86\x86arch.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\arch\x86\x86arch.h">
</File>
<File
RelativePath="..\..\..\modules\arch\x86\x86bc.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\arch\x86\x86expr.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\x86id.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\modules\arch\x86\x86id.c">
</File>
</Filter>
<Filter
@@ -277,113 +157,55 @@
Filter="">
<File
RelativePath="..\..\..\modules\dbgfmts\null\null-dbgfmt.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\dbgfmts\stabs\stabs-dbgfmt.c">
</File>
+ <File
+ RelativePath="..\..\..\modules\dbgfmts\codeview\cv-dbgfmt.h">
+ </File>
+ <File
+ RelativePath="..\..\..\modules\dbgfmts\codeview\cv-dbgfmt.c">
+ </File>
+ <File
+ RelativePath="..\..\..\modules\dbgfmts\codeview\cv-symline.c">
+ </File>
+ <File
+ RelativePath="..\..\..\modules\dbgfmts\codeview\cv-type.c">
+ </File>
+ <File
+ RelativePath="..\..\..\modules\dbgfmts\dwarf2\dwarf2-dbgfmt.h">
+ </File>
+ <File
+ RelativePath="..\..\..\modules\dbgfmts\dwarf2\dwarf2-dbgfmt.c">
+ </File>
+ <File
+ RelativePath="..\..\..\modules\dbgfmts\dwarf2\dwarf2-line.c">
+ </File>
+ <File
+ RelativePath="..\..\..\modules\dbgfmts\dwarf2\dwarf2-info.c">
+ </File>
+ <File
+ RelativePath="..\..\..\modules\dbgfmts\dwarf2\dwarf2-aranges.c">
+ </File>
</Filter>
<Filter
Name="objfmts"
Filter="">
<File
RelativePath="..\..\..\modules\objfmts\bin\bin-objfmt.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\objfmts\coff\coff-objfmt.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\objfmts\dbg\dbg-objfmt.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\objfmts\elf\elf-machine.h">
</File>
<File
RelativePath="..\..\..\modules\objfmts\elf\elf-objfmt.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\objfmts\elf\elf-x86-amd64.c">
@@ -393,23 +215,6 @@
</File>
<File
RelativePath="..\..\..\modules\objfmts\elf\elf.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\objfmts\elf\elf.h">
@@ -423,23 +228,6 @@
Filter="">
<File
RelativePath="..\..\..\modules\optimizers\basic\basic-optimizer.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
</Filter>
<Filter
@@ -465,23 +253,6 @@
</File>
<File
RelativePath="..\..\..\nasm-bison.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\nasm-bison.h">
@@ -491,46 +262,12 @@
</File>
<File
RelativePath="..\..\..\modules\parsers\nasm\nasm-parser.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\parsers\nasm\nasm-parser.h">
</File>
<File
RelativePath="..\..\..\nasm-token.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
</Filter>
<Filter
@@ -541,23 +278,6 @@
Filter="">
<File
RelativePath="..\..\..\modules\preprocs\nasm\nasm-eval.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\preprocs\nasm\nasm-eval.h">
@@ -567,69 +287,18 @@
</File>
<File
RelativePath="..\..\..\modules\preprocs\nasm\nasm-pp.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\preprocs\nasm\nasm-pp.h">
</File>
<File
RelativePath="..\..\..\modules\preprocs\nasm\nasm-preproc.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\preprocs\nasm\nasm.h">
</File>
<File
RelativePath="..\..\..\modules\preprocs\nasm\nasmlib.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\preprocs\nasm\nasmlib.h">
@@ -640,23 +309,6 @@
Filter="">
<File
RelativePath="..\..\..\modules\preprocs\raw\raw-preproc.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
</File>
</Filter>
</Filter>
diff --git a/Mkfiles/vc/re2c/run.bat b/Mkfiles/vc/re2c/run.bat
index e2b51377..cde2a7b6 100644
--- a/Mkfiles/vc/re2c/run.bat
+++ b/Mkfiles/vc/re2c/run.bat
@@ -1,5 +1,4 @@
cd ..\..\..\
-%1 -s modules\arch\lc3b\lc3bid.re > lc3bid.c
-%1 -s modules\arch\x86\x86id.re > x86id.c
-%1 -s modules\parsers\nasm\nasm-token.re > nasm-token.c
-%1 -s modules\parsers\gas\gas-token.re > gas-token.c
+%1 -s -o lc3bid.c modules\arch\lc3b\lc3bid.re
+%1 -b -o nasm-token.c modules\parsers\nasm\nasm-token.re
+%1 -b -o gas-token.c modules\parsers\gas\gas-token.re
diff --git a/Mkfiles/vc/yasm.sln b/Mkfiles/vc/yasm.sln
index 56bcfd3f..8921a59d 100644
--- a/Mkfiles/vc/yasm.sln
+++ b/Mkfiles/vc/yasm.sln
@@ -7,6 +7,7 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "modules", "modules\modules.vcproj", "{D715A3D4-EFAA-442E-AD8B-5B4FF64E1DD6}"
ProjectSection(ProjectDependencies) = postProject
{3C58BE13-50A3-4583-984D-D8902B3D7713} = {3C58BE13-50A3-4583-984D-D8902B3D7713}
+ {5758BF4E-ABC4-11DA-B012-B622A1EF5492} = {5758BF4E-ABC4-11DA-B012-B622A1EF5492}
{29FE7874-1256-4AD6-B889-68E399DC9608} = {29FE7874-1256-4AD6-B889-68E399DC9608}
{225700A5-07B8-434E-AD61-555278BF6733} = {225700A5-07B8-434E-AD61-555278BF6733}
EndProjectSection
@@ -15,20 +16,34 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "yasm", "yasm.vcproj", "{34E
ProjectSection(ProjectDependencies) = postProject
{29FE7874-1256-4AD6-B889-68E399DC9608} = {29FE7874-1256-4AD6-B889-68E399DC9608}
{D715A3D4-EFAA-442E-AD8B-5B4FF64E1DD6} = {D715A3D4-EFAA-442E-AD8B-5B4FF64E1DD6}
+ {021CEB0A-F721-4F59-B349-9CEEAF244459} = {021CEB0A-F721-4F59-B349-9CEEAF244459}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genmacro", "genmacro\genmacro.vcproj", "{225700A5-07B8-434E-AD61-555278BF6733}"
ProjectSection(ProjectDependencies) = postProject
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2} = {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genversion", "genversion\genversion.vcproj", "{B545983B-8EE0-4A7B-A67A-E749EEAE62A2}"
+ ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "re2c", "re2c\re2c.vcproj", "{3C58BE13-50A3-4583-984D-D8902B3D7713}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gap", "gap\gap.vcproj", "{5758BF4E-ABC4-11DA-B012-B622A1EF5492}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genmodule", "genmodule\genmodule.vcproj", "{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genstring", "genstring\genstring.vcproj", "{021CEB0A-F721-4F59-B349-9CEEAF244459}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
@@ -51,14 +66,26 @@ Global
{225700A5-07B8-434E-AD61-555278BF6733}.Debug.Build.0 = Debug|Win32
{225700A5-07B8-434E-AD61-555278BF6733}.Release.ActiveCfg = Release|Win32
{225700A5-07B8-434E-AD61-555278BF6733}.Release.Build.0 = Release|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Debug.ActiveCfg = Debug|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Debug.Build.0 = Debug|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Release.ActiveCfg = Release|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Release.Build.0 = Release|Win32
{3C58BE13-50A3-4583-984D-D8902B3D7713}.Debug.ActiveCfg = Debug|Win32
{3C58BE13-50A3-4583-984D-D8902B3D7713}.Debug.Build.0 = Debug|Win32
{3C58BE13-50A3-4583-984D-D8902B3D7713}.Release.ActiveCfg = Release|Win32
{3C58BE13-50A3-4583-984D-D8902B3D7713}.Release.Build.0 = Release|Win32
+ {5758BF4E-ABC4-11DA-B012-B622A1EF5492}.Debug.ActiveCfg = Debug|Win32
+ {5758BF4E-ABC4-11DA-B012-B622A1EF5492}.Debug.Build.0 = Debug|Win32
+ {5758BF4E-ABC4-11DA-B012-B622A1EF5492}.Release.ActiveCfg = Release|Win32
+ {5758BF4E-ABC4-11DA-B012-B622A1EF5492}.Release.Build.0 = Release|Win32
{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Debug.ActiveCfg = Debug|Win32
{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Debug.Build.0 = Debug|Win32
{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Release.ActiveCfg = Release|Win32
{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Release.Build.0 = Release|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Debug.ActiveCfg = Debug|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Debug.Build.0 = Debug|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Release.ActiveCfg = Release|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
diff --git a/Mkfiles/vc/yasm.vcproj b/Mkfiles/vc/yasm.vcproj
index dec2e413..70a25a9f 100644
--- a/Mkfiles/vc/yasm.vcproj
+++ b/Mkfiles/vc/yasm.vcproj
@@ -139,46 +139,12 @@
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath="..\..\frontends\yasm\yasm-options.c">
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
</File>
<File
RelativePath="..\..\frontends\yasm\yasm-options.h">
</File>
<File
RelativePath="..\..\frontends\yasm\yasm.c">
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"/>
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
</File>
</Filter>
<Filter
diff --git a/Mkfiles/vc8/config.h b/Mkfiles/vc8/config.h
index ed266c55..9beb4772 100644
--- a/Mkfiles/vc8/config.h
+++ b/Mkfiles/vc8/config.h
@@ -1,5 +1,9 @@
/* $Id: config.h 1137 2004-09-04 01:24:57Z peter $ */
+#define yasm__splitpath(path, tail) yasm__splitpath_win(path, tail)
+#define yasm__abspath(path) yasm__abspath_win(path)
+#define yasm__combpath(from, to) yasm__combpath_win(from, to)
+
#define _CRT_SECURE_NO_DEPRECATE 1
/* */
@@ -8,79 +12,18 @@
/* Define if you have the `abort' function. */
#define HAVE_ABORT 1
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-/* #undef HAVE_ALLOCA_H */
-
-/* Define to 1 if you have the `argz_append' function. */
-/* #undef HAVE_ARGZ_APPEND */
-
-/* Define to 1 if you have the `argz_create_sep' function. */
-/* #undef HAVE_ARGZ_CREATE_SEP */
-
-/* Define if you have the <argz.h> header file. */
-/* #undef HAVE_ARGZ_H */
-
-/* Define to 1 if you have the `argz_insert' function. */
-/* #undef HAVE_ARGZ_INSERT */
-
-/* Define to 1 if you have the `argz_next' function. */
-/* #undef HAVE_ARGZ_NEXT */
-
-/* Define to 1 if you have the `argz_stringify' function. */
-/* #undef HAVE_ARGZ_STRINGIFY */
-
-/* Define to 1 if you have the <assert.h> header file. */
-/* #undef HAVE_ASSERT_H */
-
-/* Define to 1 if you have the `basename' function. */
-#define HAVE_BASENAME 1
-
-/* Define to 1 if you have the `bcopy' function. */
-/* #undef HAVE_BCOPY */
-
/* */
/* #undef HAVE_CATGETS */
-/* Define to 1 if you have the `closedir' function. */
-/* #undef HAVE_CLOSEDIR */
-
-/* Define to 1 if you have the <ctype.h> header file. */
-#define HAVE_CTYPE_H 1
-
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
/* #undef HAVE_DCGETTEXT */
-/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_DIRENT_H */
-
-/* Define if you have the GNU dld library. */
-/* #undef HAVE_DLD */
-
-/* Define to 1 if you have the <dld.h> header file. */
-/* #undef HAVE_DLD_H */
-
-/* Define to 1 if you have the `dlerror' function. */
-/* #undef HAVE_DLERROR */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-/* #undef HAVE_DLFCN_H */
-
-/* Define to 1 if you have the <dl.h> header file. */
-/* #undef HAVE_DL_H */
-
/* Define if you don't have `vprintf' but do have `_doprnt'. */
/* #undef HAVE_DOPRNT */
-/* Define to 1 if you have the <errno.h> header file. */
-#define HAVE_ERRNO_H 1
-
-/* Define to 1 if the system has the type `error_t'. */
-/* #undef HAVE_ERROR_T */
-
-/* Define if you have the `fork' function. */
-/* #undef HAVE_FORK */
+/* Define to 1 if you have the `getcwd' function. */
+#define HAVE_GETCWD 1
/* */
/* #undef HAVE_GETTEXT */
@@ -91,28 +34,18 @@
/* Define if you have the iconv() function. */
/* #undef HAVE_ICONV */
-/* Define to 1 if you have the `index' function. */
-/* #undef HAVE_INDEX */
-
/* Define if you have the <inttypes.h> header file. */
/* #undef HAVE_INTTYPES_H */
/* */
/* #undef HAVE_LC_MESSAGES */
-/* Define if you have the libdl library or equivalent. */
-/* #undef HAVE_LIBDL */
+/* Define to 1 if you have the <libgen.h> header file. */
+/* #undef HAVE_LIBGEN_H */
/* Define if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
-/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
- to 0 otherwise. */
-#define HAVE_MALLOC 1
-
-/* Define if you have the <malloc.h> header file. */
-#define HAVE_MALLOC_H 1
-
/* Define if you have the `memcpy' function. */
#define HAVE_MEMCPY 1
@@ -125,46 +58,9 @@
/* Define if you have the `mergesort function. */
/* #undef HAVE_MERGESORT */
-/* Define if you have the `msgctl' function. */
-/* #undef HAVE_MSGCTL */
-
-/* Define if you have the `msgget' function. */
-/* #undef HAVE_MSGGET */
-
-/* Define if you have the `msgrcv' function. */
-/* #undef HAVE_MSGRCV */
-
-/* Define if you have the `msgsnd' function. */
-/* #undef HAVE_MSGSND */
-
-/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
-/* #undef HAVE_NDIR_H */
-
-/* Define to 1 if you have the `opendir' function. */
-/* #undef HAVE_OPENDIR */
-
-/* Define if libtool can extract symbol lists from object files. */
-/* #undef HAVE_PRELOADED_SYMBOLS */
-
-/* Define to 1 if you have the `readdir' function. */
-/* #undefine HAVE_READDIR */
-
-/* Define to 1 if you have the `rindex' function. */
-/* #undef HAVE_RINDEX */
-
-/* Define if you have the shl_load function. */
-/* #undef HAVE_SHL_LOAD */
-
-/* Define if you have the `snprintf' function. */
-#define HAVE_SNPRINTF 1
-#define snprintf _snprintf
-
/* Define if you have the <stdint.h> header file. */
/* #undef HAVE_STDINT_H */
-/* Define to 1 if you have the <stdio.h> header file. */
-#define HAVE_STDIO_H 1
-
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
@@ -174,18 +70,9 @@
/* Define if you have the `strcasecmp' function. */
/* #undef HAVE_STRCASECMP */
-/* Define if you have the `strchr' function. */
-#define HAVE_STRCHR 1
-
-/* Define to 1 if you have the `strcmp' function. */
-#define HAVE_STRCMP 1
-
/* Define if you have the `strcmpi' function. */
/* #undef HAVE_STRCMPI */
-/* Define if you have the `strerror' function. */
-#define HAVE_STRERROR 1
-
/* Define if you have the `stricmp' function. */
#define HAVE__STRICMP 1
@@ -204,32 +91,9 @@
/* Define if you have the `strsep' function. */
/* #undef HAVE_STRSEP */
-/* Define if you have the <sys/cdefs.h> header file. */
-/* #undef HAVE_SYS_CDEFS_H */
-
-/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_SYS_DIR_H */
-
-/* Define to 1 if you have the <sys/dl.h> header file. */
-/* #undef HAVE_SYS_DL_H */
-
-/* Define if you have the <sys/ipc.h> header file. */
-/* #undef HAVE_SYS_IPC_H */
-
-/* Define if you have the <sys/msg.h> header file. */
-/* #undef HAVE_SYS_MSG_H */
-
-/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_SYS_NDIR_H */
-
/* Define if you have the <sys/param.h> header file. */
/* #undef HAVE_SYS_PARAM_H */
-/* Define if you have the <sys/queue.h> header file. */
-/* #undef HAVE_SYS_QUEUE_H */
-
/* Define if you have the <sys/stat.h> header file. */
/* #undef HAVE_SYS_STAT_H */
@@ -246,53 +110,24 @@
/* Define if you have the <unistd.h> header file. */
/* #undef HAVE_UNISTD_H */
-/* Define if you have the `vfork' function. */
-/* #undef HAVE_VFORK */
-
-/* Define if you have the <vfork.h> header file. */
-/* #undef HAVE_VFORK_H */
-
/* Define if you have the vprintf function. */
#define HAVE_VPRINTF 1
/* Define to 1 if you have the `vsnprintf' function. */
/* #undef HAVE_VSNPRINTF */
-/* Define if you have the `wait' function. */
-/* #undef HAVE_WAIT */
-
-/* Define if `fork' works. */
-/* #undef HAVE_WORKING_FORK */
-
-/* Define if `vfork' works. */
-/* #undef HAVE_WORKING_VFORK */
-
-/* Define if the OS needs help to load dependent libraries for dlopen(). */
-#define LTDL_DLOPEN_DEPLIBS 1
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#define LTDL_OBJDIR ".libs/"
-
-/* Define to the name of the environment variable that determines the dynamic
- library search path. */
-#define LTDL_SHLIBPATH_VAR "PATH"
-
-/* Define to the extension used for shared libraries, say, ".so". */
-#define LTDL_SHLIB_EXT ".dll"
-
-/* Define to the system default library search path. */
-#define LTDL_SYSSEARCHPATH "/lib:/usr/lib"
-
-/* Define if dlsym() requires a leading underscode in symbol names. */
-/* #undef NEED_USCORE */
-
/* Name of package */
#define PACKAGE "yasm"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "bug-yasm@tortall.net"
+/* Define to build version of this package. */
+#define PACKAGE_BUILD "HEAD"
+
+/* Define to internal version of this package. */
+#define PACKAGE_INTVER "0.5.99"
+
/* Define to the full name of this package. */
#define PACKAGE_NAME "yasm"
@@ -308,45 +143,41 @@
/* Define if the C compiler supports function prototypes. */
#define PROTOTYPES 1
+/* The size of a `char', as computed by sizeof. */
+/* #undef SIZEOF_CHAR */
+
+/* The size of a `int', as computed by sizeof. */
+/* #undef SIZEOF_INT */
+
+/* The size of a `long', as computed by sizeof. */
+/* #undef SIZEOF_LONG */
+
+/* The size of a `short', as computed by sizeof. */
+/* #undef SIZEOF_SHORT */
+
+/* The size of a `void*', as computed by sizeof. */
+/* #undef SIZEOF_VOIDP */
+
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
-/* Combined test for fork/wait/msg* */
-/* #undef USE_FORKWAITMSG */
-
/* Version number of package */
#define VERSION "HEAD"
/* Define if using the dmalloc debugging malloc package */
/* #undef WITH_DMALLOC */
-/* Make sure we see all GNU extensions. */
-/* #undef _GNU_SOURCE */
-
-/* Make sure we see all SVID extensions. */
-/* #undef _SVID_SOURCE */
-
/* Define like PROTOTYPES; this can be used by system headers. */
#define __PROTOTYPES 1
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
-/* Define to a type to use for `error_t' if it is not otherwise available. */
-#define error_t int
-
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
if it is not supported. */
+#ifndef __cplusplus
/* #undef inline */
-
-/* Define to rpl_malloc if the replacement function should be used. */
-/* #undef malloc */
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-#define pid_t int
+#endif
/* Define to `unsigned' if <sys/types.h> doesn't define. */
/* #undef size_t */
-
-/* Define as `fork' if `vfork' does not work. */
-/* #undef vfork */
diff --git a/Mkfiles/vc8/gap/gap.vcproj b/Mkfiles/vc8/gap/gap.vcproj
new file mode 100644
index 00000000..19bb8719
--- /dev/null
+++ b/Mkfiles/vc8/gap/gap.vcproj
@@ -0,0 +1,231 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="gap"
+ ProjectGUID="{5758BF4E-ABC4-11DA-B012-B622A1EF5492}"
+ RootNamespace="gap"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..,../../.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;STDC_HEADERS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/gap.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="run.bat &quot;$(TargetPath)&quot;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ AdditionalIncludeDirectories="..,../../.."
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;STDC_HEADERS"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/gap.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="false"
+ ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="run.bat &quot;$(TargetPath)&quot;"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{7D996CB2-ABC4-11DA-B012-B622A1EF5492}"
+ >
+ <File
+ RelativePath="..\..\..\tools\gap\gap.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\tools\gap\perfect.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libyasm\phash.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libyasm\xmalloc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libyasm\xstrdup.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{85DD7A94-ABC4-11DA-B012-B622A1EF5492}"
+ >
+ <File
+ RelativePath="..\..\..\tools\gap\perfect.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\tools\gap\standard.h"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\run.bat"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Mkfiles/vc8/gap/run.bat b/Mkfiles/vc8/gap/run.bat
new file mode 100644
index 00000000..d5060801
--- /dev/null
+++ b/Mkfiles/vc8/gap/run.bat
@@ -0,0 +1,2 @@
+cd ..\..\..\
+%1 modules\arch\x86\x86parse.gap x86parse.c
diff --git a/Mkfiles/vc8/genmacro/genmacro.vcproj b/Mkfiles/vc8/genmacro/genmacro.vcproj
index 97ce5249..d7c8ba91 100644
--- a/Mkfiles/vc8/genmacro/genmacro.vcproj
+++ b/Mkfiles/vc8/genmacro/genmacro.vcproj
@@ -11,9 +11,6 @@
<Platform
Name="Win32"
/>
- <Platform
- Name="x64"
- />
</Platforms>
<ToolFiles>
</ToolFiles>
@@ -23,7 +20,6 @@
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
@@ -49,9 +45,11 @@
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
+ CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -64,10 +62,10 @@
/>
<Tool
Name="VCLinkerTool"
- OutputFile="$(OutDir)/genmacro.exe"
+ OutputFile="$(OutDir)\genmacro.exe"
LinkIncremental="2"
GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/genmacro.pdb"
+ ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
SubSystem="1"
TargetMachine="1"
/>
@@ -102,7 +100,6 @@
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
@@ -122,12 +119,15 @@
/>
<Tool
Name="VCCLCompilerTool"
+ Optimization="3"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
+ CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -142,7 +142,8 @@
Name="VCLinkerTool"
OutputFile="$(OutDir)/genmacro.exe"
LinkIncremental="1"
- GenerateDebugInformation="true"
+ GenerateDebugInformation="false"
+ ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
@@ -174,164 +175,6 @@
CommandLine="run.bat &quot;$(TargetPath)&quot;"
/>
</Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN64"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/genmacro.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/genmacro.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="run.bat &quot;$(TargetPath)&quot;"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN64"
- RuntimeLibrary="0"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/genmacro.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="run.bat &quot;$(TargetPath)&quot;"
- />
- </Configuration>
</Configurations>
<References>
</References>
diff --git a/Mkfiles/vc8/genmacro/run.bat b/Mkfiles/vc8/genmacro/run.bat
index 83e80ab8..f3323e72 100644
--- a/Mkfiles/vc8/genmacro/run.bat
+++ b/Mkfiles/vc8/genmacro/run.bat
@@ -1,2 +1,2 @@
cd ..\..\..
-%1 modules\preprocs\nasm\standard.mac
+%1 modules\preprocs\nasm\standard.mac version.mac
diff --git a/Mkfiles/vc8/genmodule/genmodule.vcproj b/Mkfiles/vc8/genmodule/genmodule.vcproj
index ee1dd65b..aa376e41 100644
--- a/Mkfiles/vc8/genmodule/genmodule.vcproj
+++ b/Mkfiles/vc8/genmodule/genmodule.vcproj
@@ -10,9 +10,6 @@
<Platform
Name="Win32"
/>
- <Platform
- Name="x64"
- />
</Platforms>
<ToolFiles>
</ToolFiles>
@@ -22,7 +19,6 @@
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
@@ -48,9 +44,12 @@
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
+ CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -63,10 +62,10 @@
/>
<Tool
Name="VCLinkerTool"
- OutputFile="$(OutDir)/genmodule.exe"
+ OutputFile="$(OutDir)\genmodule.exe"
LinkIncremental="2"
GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/genmodule.pdb"
+ ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
SubSystem="1"
TargetMachine="1"
/>
@@ -101,7 +100,6 @@
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
@@ -121,12 +119,16 @@
/>
<Tool
Name="VCCLCompilerTool"
+ Optimization="3"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;FILTERMODE"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
+ AssemblerListingLocation="$(IntDir)\"
+ ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
+ CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -139,9 +141,10 @@
/>
<Tool
Name="VCLinkerTool"
- OutputFile="$(OutDir)/genmodule.exe"
+ OutputFile="$(OutDir)\genmodule.exe"
LinkIncremental="1"
- GenerateDebugInformation="true"
+ GenerateDebugInformation="false"
+ ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
@@ -173,164 +176,6 @@
CommandLine="run.bat &quot;$(TargetPath)&quot;"
/>
</Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="_DEBUG;_CONSOLE;FILTERMODE;WIN64"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/genmodule.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/genmodule.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="run.bat &quot;$(TargetPath)&quot;"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="NDEBUG;_CONSOLE;FILTERMODE;WIN64"
- RuntimeLibrary="0"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/genmodule.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="run.bat &quot;$(TargetPath)&quot;"
- />
- </Configuration>
</Configurations>
<References>
</References>
diff --git a/Mkfiles/vc8/genstring/genstring.vcproj b/Mkfiles/vc8/genstring/genstring.vcproj
new file mode 100644
index 00000000..7722dfd2
--- /dev/null
+++ b/Mkfiles/vc8/genstring/genstring.vcproj
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="genstring"
+ ProjectGUID="{021CEB0A-F721-4F59-B349-9CEEAF244459}"
+ RootNamespace="genstring"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\genstring.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="run.bat &quot;$(TargetPath)&quot;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/genstring.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="false"
+ ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="run.bat &quot;$(TargetPath)&quot;"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{28EBE11C-5BE8-4935-9381-F57696749E0C}"
+ >
+ <File
+ RelativePath="..\..\..\genstring.c"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\run.bat"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Mkfiles/vc8/genstring/run.bat b/Mkfiles/vc8/genstring/run.bat
new file mode 100644
index 00000000..5864b1dc
--- /dev/null
+++ b/Mkfiles/vc8/genstring/run.bat
@@ -0,0 +1,2 @@
+cd ..\..\..
+%1 license_msg license.c COPYING
diff --git a/Mkfiles/vc8/genversion/genversion.vcproj b/Mkfiles/vc8/genversion/genversion.vcproj
new file mode 100644
index 00000000..5d73495b
--- /dev/null
+++ b/Mkfiles/vc8/genversion/genversion.vcproj
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="genversion"
+ ProjectGUID="{B545983B-8EE0-4A7B-A67A-E749EEAE62A2}"
+ RootNamespace="genversion"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\vc8"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\genversion.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="run.bat &quot;$(TargetPath)&quot;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ AdditionalIncludeDirectories="..\..\vc8"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)\"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/genversion.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="false"
+ ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="run.bat &quot;$(TargetPath)&quot;"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{E67ED277-E4F2-4D79-8C9E-962BAC164F3F}"
+ >
+ <File
+ RelativePath="..\..\..\modules\preprocs\nasm\genversion.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="..\config.h"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\run.bat"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Mkfiles/vc8/genversion/run.bat b/Mkfiles/vc8/genversion/run.bat
new file mode 100644
index 00000000..30edf8f1
--- /dev/null
+++ b/Mkfiles/vc8/genversion/run.bat
@@ -0,0 +1,2 @@
+cd ..\..\..
+%1 version.mac
diff --git a/Mkfiles/vc8/libyasm/libyasm.vcproj b/Mkfiles/vc8/libyasm/libyasm.vcproj
index 3b503d1c..adf19d04 100644
--- a/Mkfiles/vc8/libyasm/libyasm.vcproj
+++ b/Mkfiles/vc8/libyasm/libyasm.vcproj
@@ -4,7 +4,7 @@
Version="8.00"
Name="libyasm"
ProjectGUID="{29FE7874-1256-4AD6-B889-68E399DC9608}"
- SignManifests="true"
+ RootNamespace="libyasm"
>
<Platforms>
<Platform
@@ -22,7 +22,6 @@
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
@@ -44,18 +43,17 @@
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
+ Optimization="3"
+ InlineFunctionExpansion="0"
AdditionalIncludeDirectories="..,../../.."
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;HAVE_CONFIG_H"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
- PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/libyasm.pch"
- AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
- ObjectFile="$(PlatformName)\$(ConfigurationName)/"
- ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
SuppressStartupBanner="true"
CompileAs="0"
@@ -73,7 +71,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="$(PlatformName)\$(ConfigurationName)\libyasm.lib"
+ OutputFile="$(OutDir)\libyasm.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -120,18 +118,18 @@
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
+ Optimization="3"
+ InlineFunctionExpansion="0"
AdditionalIncludeDirectories="..,../../.."
PreprocessorDefinitions="NDEBUG;_LIB;HAVE_CONFIG_H;WIN64"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
- PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/libyasm.pch"
- AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
- ObjectFile="$(PlatformName)\$(ConfigurationName)/"
- ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
+ PrecompiledHeaderFile=""
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
SuppressStartupBanner="true"
CompileAs="0"
@@ -149,7 +147,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="$(PlatformName)\$(ConfigurationName)\libyasm.lib"
+ OutputFile="$(OutDir)\libyasm.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -173,7 +171,6 @@
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
@@ -201,10 +198,9 @@
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
- PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/libyasm.pch"
- AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
- ObjectFile="$(PlatformName)\$(ConfigurationName)/"
- ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
@@ -223,7 +219,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="$(PlatformName)\$(ConfigurationName)\libyasm.lib"
+ OutputFile="$(OutDir)\libyasm.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -245,7 +241,7 @@
<Configuration
Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="x64\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
@@ -276,10 +272,10 @@
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
- PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/libyasm.pch"
- AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
- ObjectFile="$(PlatformName)\$(ConfigurationName)/"
- ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
+ PrecompiledHeaderFile=""
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
@@ -298,7 +294,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="$(PlatformName)\$(ConfigurationName)\libyasm.lib"
+ OutputFile="$(OutDir)\libyasm.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -328,48 +324,6 @@
<File
RelativePath="..\..\..\libyasm\arch.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\assocdat.c"
@@ -378,232 +332,46 @@
<File
RelativePath="..\..\..\libyasm\bitvect.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\libyasm\bc-align.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libyasm\bc-data.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libyasm\bc-incbin.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libyasm\bc-insn.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libyasm\bc-org.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\libyasm\bc-reserve.c"
+ >
</File>
<File
RelativePath="..\..\..\libyasm\bytecode.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\errwarn.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\expr.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\file.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\file.h"
@@ -612,562 +380,66 @@
<File
RelativePath="..\..\..\libyasm\floatnum.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\hamt.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\intnum.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\linemgr.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\libyasm\md5.c"
+ >
</File>
<File
RelativePath="..\..\..\libyasm\mergesort.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\module.c"
>
</File>
<File
- RelativePath="..\..\..\libyasm\objfmt.c"
+ RelativePath="..\..\..\libyasm\phash.c"
>
</File>
<File
RelativePath="..\..\..\libyasm\section.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\strcasecmp.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\strsep.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\symrec.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\valparam.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\libyasm\value.c"
+ >
</File>
<File
RelativePath="..\..\..\libyasm\xmalloc.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\libyasm\xstrdup.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
</Filter>
<Filter
@@ -1239,6 +511,10 @@
>
</File>
<File
+ RelativePath="..\..\..\libyasm\md5.h"
+ >
+ </File>
+ <File
RelativePath="..\..\..\libyasm\objfmt.h"
>
</File>
@@ -1251,6 +527,10 @@
>
</File>
<File
+ RelativePath="..\..\..\libyasm\phash.h"
+ >
+ </File>
+ <File
RelativePath="..\..\..\libyasm\preproc.h"
>
</File>
@@ -1270,6 +550,10 @@
RelativePath="..\..\..\libyasm\valparam.h"
>
</File>
+ <File
+ RelativePath="..\..\..\libyasm\value.h"
+ >
+ </File>
</Filter>
</Files>
<Globals>
diff --git a/Mkfiles/vc8/modules/modules.vcproj b/Mkfiles/vc8/modules/modules.vcproj
index f11b7e0b..51ece135 100644
--- a/Mkfiles/vc8/modules/modules.vcproj
+++ b/Mkfiles/vc8/modules/modules.vcproj
@@ -22,14 +22,12 @@
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
- CommandLine="cmd &lt;build.bat"
/>
<Tool
Name="VCCustomBuildTool"
@@ -45,18 +43,18 @@
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
+ Optimization="3"
+ InlineFunctionExpansion="0"
AdditionalIncludeDirectories="..,../../.."
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;HAVE_CONFIG_H"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
- PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/modules.pch"
- AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
- ObjectFile="$(PlatformName)\$(ConfigurationName)/"
- ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
+ PrecompiledHeaderFile=""
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
SuppressStartupBanner="true"
CompileAs="0"
@@ -74,7 +72,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="$(PlatformName)\$(ConfigurationName)\modules.lib"
+ OutputFile="$(OutDir)\modules.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -122,18 +120,18 @@
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
+ Optimization="3"
+ InlineFunctionExpansion="0"
AdditionalIncludeDirectories="..,../../.."
PreprocessorDefinitions="NDEBUG;_LIB;HAVE_CONFIG_H;WIN64"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
- PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/modules.pch"
- AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
- ObjectFile="$(PlatformName)\$(ConfigurationName)/"
- ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
+ PrecompiledHeaderFile=""
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
SuppressStartupBanner="true"
CompileAs="0"
@@ -151,7 +149,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="$(PlatformName)\$(ConfigurationName)\modules.lib"
+ OutputFile="$(OutDir)\modules.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -175,7 +173,6 @@
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
@@ -203,10 +200,10 @@
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
- PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/modules.pch"
- AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
- ObjectFile="$(PlatformName)\$(ConfigurationName)/"
- ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
+ PrecompiledHeaderFile=""
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
@@ -225,7 +222,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="$(PlatformName)\$(ConfigurationName)\modules.lib"
+ OutputFile="$(OutDir)\modules.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -278,10 +275,10 @@
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
- PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/modules.pch"
- AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
- ObjectFile="$(PlatformName)\$(ConfigurationName)/"
- ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
+ PrecompiledHeaderFile=""
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
@@ -300,7 +297,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="$(PlatformName)\$(ConfigurationName)\modules.lib"
+ OutputFile="$(OutDir)\modules.lib"
SuppressStartupBanner="true"
/>
<Tool
@@ -333,48 +330,6 @@
<File
RelativePath="..\..\..\modules\arch\lc3b\lc3barch.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\arch\lc3b\lc3barch.h"
@@ -383,48 +338,6 @@
<File
RelativePath="..\..\..\modules\arch\lc3b\lc3bbc.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\lc3bid.c"
@@ -433,48 +346,6 @@
<File
RelativePath="..\..\..\modules\arch\x86\x86arch.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\arch\x86\x86arch.h"
@@ -483,97 +354,13 @@
<File
RelativePath="..\..\..\modules\arch\x86\x86bc.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\arch\x86\x86expr.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
- RelativePath="..\..\..\x86id.c"
+ RelativePath="..\..\..\modules\arch\x86\x86id.c"
>
</File>
</Filter>
@@ -583,53 +370,47 @@
<File
RelativePath="..\..\..\modules\dbgfmts\null\null-dbgfmt.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\dbgfmts\stabs\stabs-dbgfmt.c"
>
</File>
+ <File
+ RelativePath="..\..\..\modules\dbgfmts\codeview\cv-dbgfmt.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\modules\dbgfmts\codeview\cv-dbgfmt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\modules\dbgfmts\codeview\cv-symline.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\modules\dbgfmts\codeview\cv-type.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\modules\dbgfmts\dwarf2\dwarf2-dbgfmt.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\modules\dbgfmts\dwarf2\dwarf2-dbgfmt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\modules\dbgfmts\dwarf2\dwarf2-line.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\modules\dbgfmts\dwarf2\dwarf2-info.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\modules\dbgfmts\dwarf2\dwarf2-aranges.c"
+ >
+ </File>
</Filter>
<Filter
Name="objfmts"
@@ -637,140 +418,14 @@
<File
RelativePath="..\..\..\modules\objfmts\bin\bin-objfmt.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\objfmts\coff\coff-objfmt.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\objfmts\dbg\dbg-objfmt.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\objfmts\elf\elf-machine.h"
@@ -779,48 +434,6 @@
<File
RelativePath="..\..\..\modules\objfmts\elf\elf-objfmt.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\objfmts\elf\elf-x86-amd64.c"
@@ -833,48 +446,6 @@
<File
RelativePath="..\..\..\modules\objfmts\elf\elf.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\objfmts\elf\elf.h"
@@ -891,48 +462,6 @@
<File
RelativePath="..\..\..\modules\optimizers\basic\basic-optimizer.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
</Filter>
<Filter
@@ -949,20 +478,6 @@
<File
RelativePath="..\..\..\modules\parsers\gas\gas-defs.h"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\parsers\gas\gas-parser.c"
@@ -971,20 +486,6 @@
<File
RelativePath="..\..\..\modules\parsers\gas\gas-parser.h"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\gas-token.c"
@@ -1005,48 +506,6 @@
<File
RelativePath="..\..\..\modules\parsers\nasm\nasm-parser.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\parsers\nasm\nasm-parser.h"
@@ -1066,48 +525,6 @@
<File
RelativePath="..\..\..\modules\preprocs\nasm\nasm-eval.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\preprocs\nasm\nasm-eval.h"
@@ -1116,48 +533,6 @@
<File
RelativePath="..\..\..\modules\preprocs\nasm\nasm-pp.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\preprocs\nasm\nasm-pp.h"
@@ -1166,48 +541,6 @@
<File
RelativePath="..\..\..\modules\preprocs\nasm\nasm-preproc.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\preprocs\nasm\nasm.h"
@@ -1216,48 +549,6 @@
<File
RelativePath="..\..\..\modules\preprocs\nasm\nasmlib.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\..\modules\preprocs\nasm\nasmlib.h"
@@ -1270,48 +561,6 @@
<File
RelativePath="..\..\..\modules\preprocs\raw\raw-preproc.c"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
</File>
</Filter>
</Filter>
diff --git a/Mkfiles/vc8/re2c/re2c.vcproj b/Mkfiles/vc8/re2c/re2c.vcproj
index 0d4b3830..4e2e9f87 100644
--- a/Mkfiles/vc8/re2c/re2c.vcproj
+++ b/Mkfiles/vc8/re2c/re2c.vcproj
@@ -11,9 +11,6 @@
<Platform
Name="Win32"
/>
- <Platform
- Name="x64"
- />
</Platforms>
<ToolFiles>
</ToolFiles>
@@ -23,7 +20,6 @@
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
@@ -50,9 +46,11 @@
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
+ CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -68,7 +66,7 @@
OutputFile="$(OutDir)/re2c.exe"
LinkIncremental="2"
GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/re2c.pdb"
+ ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
SubSystem="1"
TargetMachine="1"
/>
@@ -99,92 +97,10 @@
/>
</Configuration>
<Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..,../../.."
- PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN64"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/re2c.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/re2c.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="run.bat &quot;$(TargetPath)&quot;"
- />
- </Configuration>
- <Configuration
Name="Release|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
@@ -204,13 +120,16 @@
/>
<Tool
Name="VCCLCompilerTool"
+ Optimization="3"
AdditionalIncludeDirectories="..,../../.."
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
+ ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
+ CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -225,7 +144,8 @@
Name="VCLinkerTool"
OutputFile="$(OutDir)/re2c.exe"
LinkIncremental="1"
- GenerateDebugInformation="true"
+ GenerateDebugInformation="false"
+ ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
@@ -257,85 +177,6 @@
CommandLine="run.bat &quot;$(TargetPath)&quot;"
/>
</Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..,../../.."
- PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN64"
- RuntimeLibrary="0"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/re2c.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="run.bat &quot;$(TargetPath)&quot;"
- />
- </Configuration>
</Configurations>
<References>
</References>
diff --git a/Mkfiles/vc8/re2c/run.bat b/Mkfiles/vc8/re2c/run.bat
index e2b51377..cde2a7b6 100644
--- a/Mkfiles/vc8/re2c/run.bat
+++ b/Mkfiles/vc8/re2c/run.bat
@@ -1,5 +1,4 @@
cd ..\..\..\
-%1 -s modules\arch\lc3b\lc3bid.re > lc3bid.c
-%1 -s modules\arch\x86\x86id.re > x86id.c
-%1 -s modules\parsers\nasm\nasm-token.re > nasm-token.c
-%1 -s modules\parsers\gas\gas-token.re > gas-token.c
+%1 -s -o lc3bid.c modules\arch\lc3b\lc3bid.re
+%1 -b -o nasm-token.c modules\parsers\nasm\nasm-token.re
+%1 -b -o gas-token.c modules\parsers\gas\gas-token.re
diff --git a/Mkfiles/vc8/readme.vc8.txt b/Mkfiles/vc8/readme.vc8.txt
index 15b9ce60..05c2a39e 100644
--- a/Mkfiles/vc8/readme.vc8.txt
+++ b/Mkfiles/vc8/readme.vc8.txt
@@ -2,23 +2,20 @@
Building YASM with Microsoft Visual Studio 2005
-----------------------------------------------
-This note describes how to build YASM for AMD64 and
-EM64T systems using Microsoft Visual Studio 2005.
+This note describes how to build YASM using Microsoft Visual Studio 2005.
1. The Compiler
---------------
-If you want to build the 64-bit version of YASM you
-will need to install the Visual Studio .NET 64-bit
-native or cross compiler tools (these tools are not
-installed by default).
+If you want to build the 64-bit version of YASM you will need to install
+the Visual Studio 2005 64-bit tools, which are not installed by default.
2. YASM Download
----------------
-The following files are not built on VC++ and are not
-contained in the YASM subversion repository (but they
-are included in the nightly YASM snapshots):
+The following files are not built on VC++ and are not contained in the
+YASM subversion repository (but they are included in the nightly YASM
+snapshots):
gas-bison.c
gas-bison.h
@@ -27,88 +24,95 @@ are included in the nightly YASM snapshots):
re2c-parser.c
re2c-parser.h
-If you wish to build from the latest files in the
-subversion repository, you will need to add these files
-from the latest snapshot to the repository files.
+If you wish to build from the latest files in the subversion repository,
+you will need to add these files from the latest snapshot to the repository
+files. They should be placed in the YASM root directory.
3. Building YASM with Microsoft VC8
-----------------------------------
-First YASM needs to be downloaded and the files placed
-within a suitable directory, which will be called <yasm>
-here but can be named and located as you wish. If the
-Visual Studio 2005 project files have been obtained
-seperately the subdirectory 'vc8' and its subdirectories
-and files need to be placed in the 'Mkfiles' subdirectory
-within the YASM root directory.
-
-If building from the subversion repository, obtain the
-additional files discussed above and place them in the
-YASM root directory.
-
-Now locate and double click on the yasm.sln solution file in
-the 'Mkfiles/vc8' subdirectory to open the build project in
-the Visual Studio 2005 IDE and then select:
+First YASM needs to be downloaded and the files placed within a suitable
+directory, which will be called <yasm> here but can be named and located
+as you wish. If the Visual Studio 2005 project files have been obtained
+seperately the subdirectory 'vc8' and its subdirectories and files need to
+be placed in the 'Mkfiles' subdirectory within the YASM root directory.
+
+If building from the subversion repository, obtain the additional files
+discussed above and place them in the YASM root directory.
+
+Now locate and double click on the yasm.sln solution file in the 'Mkfiles/vc8'
+subdirectory to open the build project in the Visual Studio 2005 IDE and then
+select:
win32 or x64 build
release or debug build
-
-as appropriate to build the YASM binaries that you need.
-4. Using YASM with Visual C++ version 8
----------------------------------------
+as appropriate to build the YASM binaries that you need.
+
+4. Using YASM with Visual Sudio 2005 and VC++ version 8
+-------------------------------------------------------
+
+1. Firstly you need to locate the directory (or directories) where the VC++
+compiler binaries are located and put copies of the appropriate yasm.exe
+binary in these directories.
-1. Firstly you need to locate the directory (or directories)
-where the VC++ compiler binaries are located and put copies of
-the yasm.exe binary in these directories.
+On a win32 system you will use the win32 version of YASM. On an x64 system
+you can use either the 32 or the 64 bit versions. The win32 YASM binary
+should be placed in the 32-bit VC++ binary directory, which is typically
+located at:
-On a win32 system you will use the win32 version of YASM. On
-an x64 system you will need to put the win32 YASM binary in the
-32-bit VC++ binary directory, which is typically located at:
+ Program Files (x86)\Microsoft Visual Studio 8\VC\bin
- Program Files (x86)\Microsoft Visual Studio 8\VC\bin
+If needed the 64-bit YASM binary should be places in the 64-bit tools
+binary directory, which is typically at:
-and the 64-bit YASM binary in in the 64-bit tools binary
-directory, which is typically:
+ Program Files\Microsoft Visual Studio 8\VC\bin
- Program Files\Microsoft Visual Studio 8\VC\bin
+2. To use the new custom tools facility in Visual Studio 2005, you need to
+place a copy of the yasm.rules file in the Visual Studio 2005 VC project
+defaults directory, which is typically located at:
-2. To use the new custom tools facility in VC++ .NET 2005 you need
-to place copies of the yasm32.rules and yasm32.rules files in the
-vc8 directory in the VC++ 'VCProjectDefaults' directory that is
-typically:
+ Program Files (x86)\Microsoft Visual Studio 8\VC\VCProjectDefaults
- Program Files (x86)\Microsoft Visual Studio 8\VC\VCProjectDefaults
+This allows you to configure YASM as an assembler within the VC++ IDE. To
+use YASM in a project, right click on the project in the Solution Explorer
+and select 'Custom Build Rules..'. This will give you a dialog box that
+allows you to select YASM as an assembler (note that your assembler files
+need to have the extension '.asm').
-This allows you to configure YASM as an assembler within the VC++
-IDE. To use YASM in a project, right click on the project in the
-Solution Explorer and select 'Custom Build Rules..'. This will give
-you a dialog box that allows you to select YASM as a 32 or 64 bit
-assembler (your assembler files need to have the extension '.asm').
+To assemble a file with YASM, select the Property Page for the file and the
+select 'Yasm Assembler' in the Tool dialog entry. Then click 'Apply' and an
+additional property page entry will appear and enable YASM settings to be
+established.
-To assemble a file with YASM, select the Property Page for the file
-and the select 'Yasm Assembler' in the Tool dialog entry and set the
-appropriate properties.
+As alternative to placing the yasm.rules files as described above is to set
+the rules file path in the Visual Studio 2005 settings dialogue.
+
+It is also important to note that the rules file passes the symbols 'Win32'
+or 'x64' to YASM by using the Visual Studio 2005 $(PlatformName) macro in
+order to obtain either a 32 or a 64 bit assembler mode. This is a recent
+enhancement to YASM so you will need to be sure that your YASM files are at
+revision r1331 or higher to use this facility.
5. A Linker Issue
-----------------
-There appears to be a linker bug in the VC++ v8 linker that prevents
-symbols with absolute addresses being linked in DLL builds. This
-means, for example, that LEA instructions of the general form:
+There appears to be a linker bug in the VC++ v8 linker that prevents symbols
+with absolute addresses being linked in DLL builds. This means, for example,
+that LEA instructions of the general form:
lea, rax,[rax+symbol]
-
-cannot be used for DLL builds. The following general form has to be
-used instead:
+
+cannot be used for DLL builds. The following general form has to be used
+instead:
lea rcx,[symbol wrt rip]
lea rax,[rax+rcx]
-
-This limitation may also cause problems with other instruction that
-use absolute addresses.
-I am most grateful for the fantastic support that Peter Johnson, YASM's
+This limitation may also cause problems with other instruction that use
+absolute addresses.
+
+I am most grateful for the fantastic support that Peter Johnson, YASM's
creator, has given me in tracking down this issue.
- Brian Gladman, 22nd December 2005
+ Brian Gladman, 16th January 2006
diff --git a/Mkfiles/vc8/yasm.rules b/Mkfiles/vc8/yasm.rules
new file mode 100644
index 00000000..3001425e
--- /dev/null
+++ b/Mkfiles/vc8/yasm.rules
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="utf-8"?>
+<VisualStudioToolFile
+ Name="Yasm"
+ Version="8.00"
+ >
+ <Rules>
+ <CustomBuildRule
+ Name="YASM"
+ DisplayName="Yasm Assembler"
+ CommandLine="yasm -Xvc -f $(PlatformName) [PreProc] [Parser] [Debug] [ListFileName] [Defines] [UnDefines] [IncludePaths] [ObjectFileName] [inputs]"
+ Outputs="[$ObjectFileName]"
+ FileExtensions="*.asm"
+ ExecutionDescription="Assembling $(InputFileName)"
+ ShowOnlyRuleProperties="false"
+ >
+ <Properties>
+ <StringProperty
+ Name="Defines"
+ DisplayName="Definitions"
+ Category="Pre-Defined Symbols"
+ Description="Specify pre-defined symbols (&apos;symbol&apos; or &apos;symbol = value&apos;) "
+ Switch="-D [value]"
+ Delimited="true"
+ Inheritable="true"
+ />
+ <StringProperty
+ Name="IncludePaths"
+ DisplayName="Include Paths"
+ Category="Configuration"
+ Description="Set the paths for any additional include files"
+ Switch="-i &quot;[value]&quot;"
+ Delimited="true"
+ Inheritable="true"
+ />
+ <StringProperty
+ Name="UnDefines"
+ DisplayName="Remove Definitions"
+ Category="Pre-Defined Symbols"
+ Description="Remove pre-defined symbols "
+ Switch="-u [value]"
+ Delimited="true"
+ Inheritable="true"
+ />
+ <StringProperty
+ Name="ObjectFileName"
+ DisplayName="Object File Name"
+ Category="Output"
+ Description="Select the output file name"
+ Switch="-o &quot;[value]&quot;"
+ DefaultValue="&quot;$(IntDir)\$(InputName).obj&quot;"
+ />
+ <StringProperty
+ Name="ListFileName"
+ DisplayName="List File Name"
+ Category="Output"
+ Description="Select an output listing by setting its file name"
+ Switch="-l &quot;[value]&quot;"
+ />
+ <StringProperty
+ Name="PreIncludeFile"
+ DisplayName="Pre Include File"
+ Category="Configuration"
+ Description="Select a pre-included file by setting its name"
+ Switch="-P &quot;[value]&quot;"
+ />
+ <BooleanProperty
+ Name="Debug"
+ DisplayName="Debug Information"
+ Category="Output"
+ Description="Generate debugging information"
+ Switch="-g cv8"
+ />
+ <EnumProperty
+ Name="PreProc"
+ DisplayName="Pre-Processor"
+ Category="Configuration"
+ Description="Select the pre-processor (&apos;nasm&apos; or &apos;raw&apos;)"
+ >
+ <Values>
+ <EnumValue
+ Value="0"
+ Switch="-rnasm"
+ DisplayName="Nasm "
+ />
+ <EnumValue
+ Value="1"
+ Switch="-rraw"
+ DisplayName="Raw"
+ />
+ </Values>
+ </EnumProperty>
+ <EnumProperty
+ Name="Parser"
+ DisplayName="Parser"
+ Category="Configuration"
+ Description="Select the parser for Intel (&apos;nasm&apos;) or AT&amp;T ( &apos;gas&apos;) syntax"
+ >
+ <Values>
+ <EnumValue
+ Value="0"
+ Switch="-pnasm"
+ DisplayName="Nasm"
+ />
+ <EnumValue
+ Value="1"
+ Switch="-pgas"
+ DisplayName="Gas"
+ />
+ </Values>
+ </EnumProperty>
+ </Properties>
+ </CustomBuildRule>
+ </Rules>
+</VisualStudioToolFile>
diff --git a/Mkfiles/vc8/yasm.sln b/Mkfiles/vc8/yasm.sln
index 6fb44f4d..3d14dcd4 100644
--- a/Mkfiles/vc8/yasm.sln
+++ b/Mkfiles/vc8/yasm.sln
@@ -8,6 +8,7 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "modules", "modules\modules.vcproj", "{D715A3D4-EFAA-442E-AD8B-5B4FF64E1DD6}"
ProjectSection(ProjectDependencies) = postProject
{3C58BE13-50A3-4583-984D-D8902B3D7713} = {3C58BE13-50A3-4583-984D-D8902B3D7713}
+ {5758BF4E-ABC4-11DA-B012-B622A1EF5492} = {5758BF4E-ABC4-11DA-B012-B622A1EF5492}
{29FE7874-1256-4AD6-B889-68E399DC9608} = {29FE7874-1256-4AD6-B889-68E399DC9608}
{225700A5-07B8-434E-AD61-555278BF6733} = {225700A5-07B8-434E-AD61-555278BF6733}
EndProjectSection
@@ -16,14 +17,24 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "yasm", "yasm.vcproj", "{34E
ProjectSection(ProjectDependencies) = postProject
{29FE7874-1256-4AD6-B889-68E399DC9608} = {29FE7874-1256-4AD6-B889-68E399DC9608}
{D715A3D4-EFAA-442E-AD8B-5B4FF64E1DD6} = {D715A3D4-EFAA-442E-AD8B-5B4FF64E1DD6}
+ {021CEB0A-F721-4F59-B349-9CEEAF244459} = {021CEB0A-F721-4F59-B349-9CEEAF244459}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genmacro", "genmacro\genmacro.vcproj", "{225700A5-07B8-434E-AD61-555278BF6733}"
+ ProjectSection(ProjectDependencies) = postProject
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2} = {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genversion", "genversion\genversion.vcproj", "{B545983B-8EE0-4A7B-A67A-E749EEAE62A2}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "re2c", "re2c\re2c.vcproj", "{3C58BE13-50A3-4583-984D-D8902B3D7713}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gap", "gap\gap.vcproj", "{5758BF4E-ABC4-11DA-B012-B622A1EF5492}"
+EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genmodule", "genmodule\genmodule.vcproj", "{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genstring", "genstring\genstring.vcproj", "{021CEB0A-F721-4F59-B349-9CEEAF244459}"
+EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{825AC694-358C-4D8D-92DE-33A2691978CE}"
ProjectSection(SolutionItems) = preProject
readme.vc8.txt = readme.vc8.txt
@@ -69,6 +80,14 @@ Global
{225700A5-07B8-434E-AD61-555278BF6733}.Release|Win32.Build.0 = Release|Win32
{225700A5-07B8-434E-AD61-555278BF6733}.Release|x64.ActiveCfg = Release|Win32
{225700A5-07B8-434E-AD61-555278BF6733}.Release|x64.Build.0 = Release|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Debug|Win32.Build.0 = Debug|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Debug|x64.ActiveCfg = Debug|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Debug|x64.Build.0 = Debug|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Release|Win32.ActiveCfg = Release|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Release|Win32.Build.0 = Release|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Release|x64.ActiveCfg = Release|Win32
+ {B545983B-8EE0-4A7B-A67A-E749EEAE62A2}.Release|x64.Build.0 = Release|Win32
{3C58BE13-50A3-4583-984D-D8902B3D7713}.Debug|Win32.ActiveCfg = Debug|Win32
{3C58BE13-50A3-4583-984D-D8902B3D7713}.Debug|Win32.Build.0 = Debug|Win32
{3C58BE13-50A3-4583-984D-D8902B3D7713}.Debug|x64.ActiveCfg = Debug|Win32
@@ -77,6 +96,14 @@ Global
{3C58BE13-50A3-4583-984D-D8902B3D7713}.Release|Win32.Build.0 = Release|Win32
{3C58BE13-50A3-4583-984D-D8902B3D7713}.Release|x64.ActiveCfg = Release|Win32
{3C58BE13-50A3-4583-984D-D8902B3D7713}.Release|x64.Build.0 = Release|Win32
+ {5758BF4E-ABC4-11DA-B012-B622A1EF5492}.Debug|Win32.ActiveCfg = Debug|Win32
+ {5758BF4E-ABC4-11DA-B012-B622A1EF5492}.Debug|Win32.Build.0 = Debug|Win32
+ {5758BF4E-ABC4-11DA-B012-B622A1EF5492}.Debug|x64.ActiveCfg = Debug|Win32
+ {5758BF4E-ABC4-11DA-B012-B622A1EF5492}.Debug|x64.Build.0 = Debug|Win32
+ {5758BF4E-ABC4-11DA-B012-B622A1EF5492}.Release|Win32.ActiveCfg = Release|Win32
+ {5758BF4E-ABC4-11DA-B012-B622A1EF5492}.Release|Win32.Build.0 = Release|Win32
+ {5758BF4E-ABC4-11DA-B012-B622A1EF5492}.Release|x64.ActiveCfg = Release|Win32
+ {5758BF4E-ABC4-11DA-B012-B622A1EF5492}.Release|x64.Build.0 = Release|Win32
{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Debug|Win32.ActiveCfg = Debug|Win32
{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Debug|Win32.Build.0 = Debug|Win32
{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Debug|x64.ActiveCfg = Debug|Win32
@@ -85,6 +112,14 @@ Global
{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Release|Win32.Build.0 = Release|Win32
{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Release|x64.ActiveCfg = Release|Win32
{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Release|x64.Build.0 = Release|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Debug|Win32.ActiveCfg = Debug|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Debug|Win32.Build.0 = Debug|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Debug|x64.ActiveCfg = Debug|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Debug|x64.Build.0 = Debug|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Release|Win32.ActiveCfg = Release|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Release|Win32.Build.0 = Release|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Release|x64.ActiveCfg = Release|Win32
+ {021CEB0A-F721-4F59-B349-9CEEAF244459}.Release|x64.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Mkfiles/vc8/yasm.vcproj b/Mkfiles/vc8/yasm.vcproj
index 3f32b314..be94afed 100644
--- a/Mkfiles/vc8/yasm.vcproj
+++ b/Mkfiles/vc8/yasm.vcproj
@@ -22,7 +22,6 @@
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
@@ -52,10 +51,10 @@
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
- PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/yasm.pch"
- AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
- ObjectFile="$(PlatformName)\$(ConfigurationName)/"
- ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
+ PrecompiledHeaderFile=""
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
@@ -74,11 +73,11 @@
/>
<Tool
Name="VCLinkerTool"
- OutputFile="$(PlatformName)\$(ConfigurationName)/yasm.exe"
+ OutputFile="$(OutDir)\yasm.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
- ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/yasm.pdb"
+ ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="1"
/>
@@ -143,10 +142,10 @@
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
- PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/yasm.pch"
- AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
- ObjectFile="$(PlatformName)\$(ConfigurationName)/"
- ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
+ PrecompiledHeaderFile=""
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
@@ -169,7 +168,7 @@
LinkIncremental="1"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
- ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/yasm.pdb"
+ ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
SubSystem="1"
TargetMachine="17"
/>
@@ -203,7 +202,6 @@
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
@@ -227,18 +225,19 @@
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
+ Optimization="3"
+ InlineFunctionExpansion="0"
+ EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories=".,../.."
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;HAVE_CONFIG_H;VC"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
- PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/yasm.pch"
- AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
- ObjectFile="$(PlatformName)\$(ConfigurationName)/"
- ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
+ PrecompiledHeaderFile=""
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
SuppressStartupBanner="true"
CompileAs="0"
@@ -256,10 +255,11 @@
/>
<Tool
Name="VCLinkerTool"
- OutputFile="$(PlatformName)\$(ConfigurationName)/yasm.exe"
+ OutputFile="$(OutDir)\yasm.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
- ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/yasm.pdb"
+ GenerateDebugInformation="false"
+ ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
SubSystem="1"
TargetMachine="1"
/>
@@ -318,7 +318,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="2"
+ Optimization="3"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories=".,../.."
PreprocessorDefinitions="NDEBUG;_LIB;HAVE_CONFIG_H;VC;WIN64"
@@ -326,10 +326,10 @@
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
- PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/yasm.pch"
- AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
- ObjectFile="$(PlatformName)\$(ConfigurationName)/"
- ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
+ PrecompiledHeaderFile=""
+ AssemblerListingLocation="$(IntDir)\"
+ ObjectFile="$(IntDir)\"
+ ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
SuppressStartupBanner="true"
CompileAs="0"
@@ -350,7 +350,7 @@
OutputFile="$(OutDir)\yasm.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
- ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/yasm.pdb"
+ ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
SubSystem="1"
TargetMachine="17"
/>
@@ -390,94 +390,10 @@
<File
RelativePath="..\..\frontends\yasm\yasm-options.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\..\frontends\yasm\yasm.c"
>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
</Filter>
<Filter
diff --git a/Mkfiles/vc8/yasm32.rules b/Mkfiles/vc8/yasm32.rules
deleted file mode 100644
index 32bb2677..00000000
--- a/Mkfiles/vc8/yasm32.rules
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<VisualStudioToolFile
- Name="Yasm (32-bit)"
- Version="8.00"
- >
- <Rules>
- <CustomBuildRule
- Name="YASM32"
- DisplayName="Yasm Assembler (32-bit mode)"
- CommandLine="yasm -Xvc -f win32 [ListFileName] [Defines] [UnDefines] [IncludePaths] [ObjectFileName] [inputs]"
- Outputs="[$ObjectFileName]"
- FileExtensions="*.asm"
- ExecutionDescription="Assembling ..."
- ShowOnlyRuleProperties="false"
- >
- <Properties>
- <StringProperty
- Name="Defines"
- DisplayName="Preprocessor Definitions"
- Description="Preprocessor Definitions"
- Switch="-D[value]"
- Delimited="true"
- Inheritable="true"
- />
- <StringProperty
- Name="IncludePaths"
- DisplayName="Include Paths"
- Switch="-i&quot;[value]\&quot;"
- Delimited="true"
- Inheritable="true"
- />
- <StringProperty
- Name="UnDefines"
- DisplayName="Remove Preprocessor Definitions"
- Description="Undefine"
- Switch="-u[value]"
- Delimited="true"
- Inheritable="true"
- />
- <StringProperty
- Name="ObjectFileName"
- DisplayName="Object File Name"
- Switch="-o&quot;[value]&quot;"
- />
- <StringProperty
- Name="ListFileName"
- DisplayName="List File Name"
- Switch="-l&quot;[value]&quot;"
- />
- <StringProperty
- Name="PreIncludeFile"
- DisplayName="Pre Include File"
- Switch="-p&quot;[value]&quot;"
- />
- </Properties>
- </CustomBuildRule>
- </Rules>
-</VisualStudioToolFile>
diff --git a/Mkfiles/vc8/yasm64.rules b/Mkfiles/vc8/yasm64.rules
deleted file mode 100644
index 394ecb81..00000000
--- a/Mkfiles/vc8/yasm64.rules
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<VisualStudioToolFile
- Name="Yasm (64-bit)"
- Version="8.00"
- >
- <Rules>
- <CustomBuildRule
- Name="YASM64"
- DisplayName="Yasm Assembler (64-bit mode)"
- CommandLine="yasm -Xvc -f win64 [ListFileName] [Defines] [UnDefines] [IncludePaths] [ObjectFileName] [inputs]"
- Outputs="[$ObjectFileName]"
- FileExtensions="*.asm"
- ExecutionDescription="Assembling ..."
- ShowOnlyRuleProperties="false"
- >
- <Properties>
- <StringProperty
- Name="Defines"
- DisplayName="Preprocessor Definitions"
- Description="Preprocessor Definitions"
- Switch="-D[value]"
- Delimited="true"
- Inheritable="true"
- />
- <StringProperty
- Name="IncludePaths"
- DisplayName="Include Paths"
- Switch="-i&quot;[value]\&quot;"
- Delimited="true"
- Inheritable="true"
- />
- <StringProperty
- Name="UnDefines"
- DisplayName="Remove Preprocessor Definitions"
- Description="Undefine"
- Switch="-u[value]"
- Delimited="true"
- Inheritable="true"
- />
- <StringProperty
- Name="ObjectFileName"
- DisplayName="Object File Name"
- Switch="-o&quot;[value]&quot;"
- />
- <StringProperty
- Name="ListFileName"
- DisplayName="List File Name"
- Switch="-l&quot;[value]&quot;"
- />
- <StringProperty
- Name="PreIncludeFile"
- DisplayName="Pre Include File"
- Switch="-p&quot;[value]&quot;"
- />
- </Properties>
- </CustomBuildRule>
- </Rules>
-</VisualStudioToolFile>
diff --git a/configure.ac b/configure.ac
index 6e9dafd9..1e1e0451 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,6 +13,10 @@ AM_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE(yasm, [HEAD])
AM_MAINTAINER_MODE
+AC_DEFINE(PACKAGE_INTVER, ["0.5.99"],
+ [Define to internal version of this package.])
+AC_DEFINE(PACKAGE_BUILD, ["HEAD"], [Define to build version of this package.])
+
#
# autoconf command-line options
#
@@ -49,6 +53,14 @@ AC_HELP_STRING([--enable-gcov],[Enable gcov code coverage (requires GCC)]),
*) AC_MSG_ERROR([bad value ${enableval} for --enable-gcov]) ;;
esac])
+AC_ARG_ENABLE(python,
+AC_HELP_STRING([--enable-python],[Build Python bindings]),
+[case "${enableval}" in
+ yes) enable_python="yes" ;;
+ no) enable_python="no" ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-python]) ;;
+esac], enable_python="auto")
+
#
# Checks for programs.
#
@@ -95,7 +107,7 @@ AM_WITH_DMALLOC
#
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([limits.h sys/param.h libgen.h])
+AC_CHECK_HEADERS([limits.h sys/param.h libgen.h unistd.h])
# REQUIRE standard C headers
if test "$ac_cv_header_stdc" != yes; then
@@ -116,7 +128,7 @@ AX_CREATE_STDINT_H
#
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([abort memcpy memmove strrchr toascii vsnprintf])
-AC_CHECK_FUNCS([strsep mergesort])
+AC_CHECK_FUNCS([strsep mergesort getcwd])
# Look for the case-insensitive comparison functions
AC_CHECK_FUNCS([strcasecmp strncasecmp stricmp strcmpi])
@@ -148,6 +160,7 @@ fi
# Force x86 architecture only for now.
ARCH=x86
AC_SUBST([ARCH])
+AC_SUBST([GCC])
# Require things for --enable-maintainer-mode option.
if test "$USE_MAINTAINER_MODE" = "yes"; then
@@ -244,6 +257,41 @@ AC_SUBST(CCLD_FOR_BUILD)
HOST_CC="$CC_FOR_BUILD"
AC_SUBST(HOST_CC)
+# Detect if we can build Python bindings
+# (needs Python, Python headers, and Pyrex)
+if test x$enable_python = xno; then
+ have_python=no
+else
+ AC_MSG_NOTICE([Checking to see if we can build Python bindings])
+ have_python=no
+ AM_PATH_PYTHON(2.4,[],[AC_MSG_WARN([Python not found])])
+
+ if test -z "$PYTHON" || test "$PYTHON" = : ; then
+ have_python=no
+ else
+ AC_MSG_CHECKING([for Pyrex >= 0.9.3])
+ PYREX_CHECK_VERSION(0.9.3, [AC_MSG_RESULT(yes)
+ have_pyrex=yes],
+ [AC_MSG_RESULT(no)
+ have_pyrex=no])
+
+ AM_CHECK_PYTHON_HEADERS(have_python_headers=yes,have_python_headers=no)
+
+ if test x$have_pyrex = xyes -a x$have_python_headers = xyes ; then
+ have_python=yes
+ fi
+ fi
+
+ if test x$have_python = xno ; then
+ if test x$enable_python = xyes ; then
+ AC_MSG_ERROR([Building Python explicitly requested, but can't build Python bindings because either Pyrex, Python headers or a suitable Python version was not found])
+ else
+ AC_MSG_WARN([Couldn't find either Pyrex, the Python headers or a suitable version of Python, not building Python bindings])
+ fi
+ fi
+fi
+
+AM_CONDITIONAL(HAVE_PYTHON, test x$have_python = xyes)
AC_CONFIG_FILES([Makefile
po/Makefile.in
diff --git a/frontends/yasm/Makefile.inc b/frontends/yasm/Makefile.inc
index 54311363..1e0a8362 100644
--- a/frontends/yasm/Makefile.inc
+++ b/frontends/yasm/Makefile.inc
@@ -12,6 +12,14 @@ yasm_SOURCES = frontends/yasm/yasm.c
yasm_SOURCES += frontends/yasm/yasm-options.c
yasm_SOURCES += frontends/yasm/yasm-options.h
+$(srcdir)/frontends/yasm/yasm.c: license.c
+
+license.c: $(srcdir)/COPYING genstring$(EXEEXT)
+ $(top_builddir)/genstring$(EXEEXT) license_msg $@ $(srcdir)/COPYING
+
+BUILT_SOURCES += license.c
+CLEANFILES += license.c
+
yasm_LDADD = libyasm.a $(INTLLIBS)
EXTRA_DIST += frontends/yasm/yasm.xml
diff --git a/frontends/yasm/yasm.c b/frontends/yasm/yasm.c
index b00b62a5..e32f136d 100644
--- a/frontends/yasm/yasm.c
+++ b/frontends/yasm/yasm.c
@@ -27,6 +27,7 @@
#include <util.h>
/*@unused@*/ RCSID("$Id$");
+#include <ctype.h>
#include <libyasm/compat-queue.h>
#include <libyasm/bitvect.h>
#include <libyasm.h>
@@ -37,6 +38,7 @@
#include "yasm-options.h"
+#include "license.c"
#define DEFAULT_OBJFMT_MODULE "bin"
@@ -75,7 +77,9 @@ static enum {
/*@null@*/ /*@dependent@*/ static FILE *open_file(const char *filename,
const char *mode);
-static void cleanup(/*@null@*/ yasm_object *object);
+static void check_errors(/*@only@*/ yasm_errwarns *errwarns,
+ /*@only@*/ yasm_object *object);
+static void cleanup(/*@null@*/ /*@only@*/ yasm_object *object);
/* Forward declarations: cmd line parser handlers */
static int opt_special_handler(char *cmd, /*@null@*/ char *param, int extra);
@@ -104,7 +108,8 @@ static /*@exits@*/ void handle_yasm_int_error(const char *file,
static /*@exits@*/ void handle_yasm_fatal(const char *message, va_list va);
static const char *handle_yasm_gettext(const char *msgid);
static void print_yasm_error(const char *filename, unsigned long line,
- const char *msg);
+ const char *msg, unsigned long xrefline,
+ /*@null@*/ const char *xrefmsg);
static void print_yasm_warning(const char *filename, unsigned long line,
const char *msg);
@@ -115,13 +120,16 @@ static void print_list_keyword_desc(const char *name, const char *keyword);
/* values for special_options */
#define SPECIAL_SHOW_HELP 0x01
#define SPECIAL_SHOW_VERSION 0x02
-#define SPECIAL_LISTED 0x04
+#define SPECIAL_SHOW_LICENSE 0x04
+#define SPECIAL_LISTED 0x08
/* command line options */
static opt_option options[] =
{
{ 0, "version", 0, opt_special_handler, SPECIAL_SHOW_VERSION,
N_("show version text"), NULL },
+ { 0, "license", 0, opt_special_handler, SPECIAL_SHOW_LICENSE,
+ N_("show license text"), NULL },
{ 'h', "help", 0, opt_special_handler, SPECIAL_SHOW_HELP,
N_("show help text"), NULL },
{ 'a', "arch", 1, opt_arch_handler, 0,
@@ -166,42 +174,17 @@ static opt_option options[] =
/* version message */
/*@observer@*/ static const char *version_msg[] = {
- PACKAGE " " VERSION "\n",
- N_("Copyright (c) 2001-2003 Peter Johnson and other"), " " PACKAGE " ",
- N_("developers.\n"),
- N_("**Licensing summary**\n"),
- N_("Note: This summary does not provide legal advice nor is it the\n"),
- N_(" actual license. See the individual licenses for complete\n"),
- N_(" details. Consult a laywer for legal advice.\n"),
- N_("The primary license is the 2-clause BSD license. Please use this\n"),
- N_(" license if you plan on submitting code to the project.\n"),
- N_("Libyasm:\n"),
- N_(" Libyasm is 2-clause or 3-clause BSD licensed, with the exception\n"),
- N_(" of bitvect, which is triple-licensed under the Artistic license,\n"),
- N_(" GPL, and LGPL. Libyasm is thus GPL and LGPL compatible. In\n"),
- N_(" addition, this also means that libyasm is free for binary-only\n"),
- N_(" distribution as long as the terms of the 3-clause BSD license and\n"),
- N_(" Artistic license (as it applies to bitvect) are fulfilled.\n"),
- N_("Modules:\n"),
- N_(" Most of the modules are 2-clause BSD licensed, except:\n"),
- N_(" preprocs/nasm - LGPL licensed\n"),
- N_("Frontends:\n"),
- N_(" The frontends are 2-clause BSD licensed.\n"),
- N_("License Texts:\n"),
- N_(" The full text of all licenses are provided in separate files in\n"),
- N_(" this program's source distribution. Each file may include the\n"),
- N_(" entire license (in the case of the BSD and Artistic licenses), or\n"),
- N_(" may reference the GPL or LGPL license file.\n"),
- N_("This program has absolutely no warranty; not even for\n"),
- N_("merchantibility or fitness for a particular purpose.\n"),
- N_("Compiled on"), " " __DATE__ ".\n",
+ PACKAGE_NAME " " PACKAGE_INTVER "." PACKAGE_BUILD,
+ "Compiled on " __DATE__ ".",
+ "Copyright (c) 2001-2006 Peter Johnson and other Yasm developers.",
+ "Run yasm --license for licensing overview and summary."
};
/* help messages */
-/*@observer@*/ static const char help_head[] = N_(
+/*@observer@*/ static const char *help_head = N_(
"usage: yasm [option]* file\n"
"Options:\n");
-/*@observer@*/ static const char help_tail[] = N_(
+/*@observer@*/ static const char *help_tail = N_(
"\n"
"Files are asm sources to be assembled.\n"
"\n"
@@ -231,6 +214,8 @@ main(int argc, char *argv[])
yasm_section *def_sect;
size_t i;
yasm_arch_create_error arch_error;
+ const char *base_filename;
+ yasm_errwarns *errwarns;
#if defined(HAVE_SETLOCALE) && defined(HAVE_LC_MESSAGES)
setlocale(LC_MESSAGES, "");
@@ -245,6 +230,7 @@ main(int argc, char *argv[])
yasm_fatal = handle_yasm_fatal;
yasm_gettext_hook = handle_yasm_gettext;
yasm_errwarn_initialize();
+ errwarns = yasm_errwarns_create();
/* Initialize parameter storage */
STAILQ_INIT(&preproc_options);
@@ -258,8 +244,12 @@ main(int argc, char *argv[])
help_msg(help_head, help_tail, options, NELEMS(options));
return EXIT_SUCCESS;
case SPECIAL_SHOW_VERSION:
- for (i=0; i<sizeof(version_msg)/sizeof(char *); i++)
- printf("%s", gettext(version_msg[i]));
+ for (i=0; i<NELEMS(version_msg); i++)
+ printf("%s\n", version_msg[i]);
+ return EXIT_SUCCESS;
+ case SPECIAL_SHOW_LICENSE:
+ for (i=0; i<NELEMS(license_msg); i++)
+ printf("%s\n", license_msg[i]);
return EXIT_SUCCESS;
case SPECIAL_LISTED:
/* Printed out earlier */
@@ -325,11 +315,15 @@ main(int argc, char *argv[])
if (in == stdin)
/* Default to yasm.out if no obj filename specified */
obj_filename = yasm__xstrdup("yasm.out");
- else
- /* replace (or add) extension */
- obj_filename = replace_extension(in_filename,
- cur_objfmt_module->extension,
- "yasm.out");
+ else {
+ /* replace (or add) extension to base filename */
+ yasm__splitpath(in_filename, &base_filename);
+ if (base_filename[0] == '\0')
+ obj_filename = yasm__xstrdup("yasm.out");
+ else
+ obj_filename = replace_extension(base_filename,
+ cur_objfmt_module->extension, "yasm.out");
+ }
}
} else {
/* Open output (object) file */
@@ -353,7 +347,7 @@ main(int argc, char *argv[])
/* Pre-process until done */
cur_preproc = yasm_preproc_create(cur_preproc_module, in, in_filename,
- linemap);
+ linemap, errwarns);
apply_preproc_builtins();
apply_preproc_saved_options();
@@ -387,24 +381,43 @@ main(int argc, char *argv[])
if (obj != stdout)
fclose(obj);
- if (yasm_get_num_errors(warning_error) > 0) {
- yasm_errwarn_output_all(linemap, warning_error, print_yasm_error,
- print_yasm_warning);
+ if (yasm_errwarns_num_errors(errwarns, warning_error) > 0) {
+ yasm_errwarns_output_all(errwarns, linemap, warning_error,
+ print_yasm_error, print_yasm_warning);
if (obj != stdout)
remove(obj_filename);
yasm_xfree(preproc_buf);
yasm_linemap_destroy(linemap);
+ yasm_errwarns_destroy(errwarns);
cleanup(NULL);
return EXIT_FAILURE;
}
yasm_xfree(preproc_buf);
yasm_linemap_destroy(linemap);
+ yasm_errwarns_destroy(errwarns);
cleanup(NULL);
return EXIT_SUCCESS;
}
+ /* determine the object filename if not specified */
+ if (!obj_filename) {
+ if (in == stdin)
+ /* Default to yasm.out if no obj filename specified */
+ obj_filename = yasm__xstrdup("yasm.out");
+ else {
+ /* replace (or add) extension to base filename */
+ yasm__splitpath(in_filename, &base_filename);
+ if (base_filename[0] == '\0')
+ obj_filename = yasm__xstrdup("yasm.out");
+ else
+ obj_filename = replace_extension(base_filename,
+ cur_objfmt_module->extension,
+ "yasm.out");
+ }
+ }
+
/* Create object */
- object = yasm_object_create();
+ object = yasm_object_create(in_filename, obj_filename);
yasm_linemap_set(yasm_object_get_linemap(object), in_filename, 1, 1);
/* Default to x86 as the architecture */
@@ -513,21 +526,8 @@ main(int argc, char *argv[])
return EXIT_FAILURE;
}
- /* determine the object filename if not specified */
- if (!obj_filename) {
- if (in == stdin)
- /* Default to yasm.out if no obj filename specified */
- obj_filename = yasm__xstrdup("yasm.out");
- else
- /* replace (or add) extension */
- obj_filename = replace_extension(in_filename,
- cur_objfmt_module->extension,
- "yasm.out");
- }
-
/* Initialize the object format */
- cur_objfmt = yasm_objfmt_create(cur_objfmt_module, in_filename, object,
- cur_arch);
+ cur_objfmt = yasm_objfmt_create(cur_objfmt_module, object, cur_arch);
if (!cur_objfmt) {
print_error(
_("%s: object format `%s' does not support architecture `%s' machine `%s'"),
@@ -542,11 +542,10 @@ main(int argc, char *argv[])
cur_objfmt_module = ((yasm_objfmt_base *)cur_objfmt)->module;
/* Add an initial "default" section to object */
- def_sect = yasm_objfmt_add_default_section(cur_objfmt, object);
+ def_sect = yasm_objfmt_add_default_section(cur_objfmt);
/* Initialize the debug format */
- cur_dbgfmt = yasm_dbgfmt_create(cur_dbgfmt_module, in_filename,
- obj_filename, object, cur_objfmt,
+ cur_dbgfmt = yasm_dbgfmt_create(cur_dbgfmt_module, object, cur_objfmt,
cur_arch);
if (!cur_dbgfmt) {
print_error(
@@ -591,7 +590,8 @@ main(int argc, char *argv[])
}
cur_preproc = cur_preproc_module->create(in, in_filename,
- yasm_object_get_linemap(object));
+ yasm_object_get_linemap(object),
+ errwarns);
apply_preproc_builtins();
apply_preproc_saved_options();
@@ -603,47 +603,33 @@ main(int argc, char *argv[])
}
/* Parse! */
- cur_parser_module->do_parse(object, cur_preproc, cur_arch, cur_objfmt, in,
- in_filename, list_filename != NULL, def_sect);
+ cur_parser_module->do_parse(object, cur_preproc, cur_arch, cur_objfmt,
+ cur_dbgfmt, in, in_filename,
+ list_filename != NULL, def_sect, errwarns);
/* Close input file */
if (in != stdin)
fclose(in);
+ check_errors(errwarns, object);
+
/* Check for undefined symbols */
yasm_symtab_parser_finalize(yasm_object_get_symtab(object),
strcmp(cur_parser_module->keyword, "gas")==0,
- cur_objfmt);
-
- if (yasm_get_num_errors(warning_error) > 0) {
- yasm_errwarn_output_all(yasm_object_get_linemap(object), warning_error,
- print_yasm_error, print_yasm_warning);
- cleanup(object);
- return EXIT_FAILURE;
- }
+ cur_objfmt, errwarns);
+ check_errors(errwarns, object);
/* Finalize parse */
- yasm_object_finalize(object);
-
- if (yasm_get_num_errors(warning_error) > 0) {
- yasm_errwarn_output_all(yasm_object_get_linemap(object), warning_error,
- print_yasm_error, print_yasm_warning);
- cleanup(object);
- return EXIT_FAILURE;
- }
+ yasm_object_finalize(object, errwarns);
+ check_errors(errwarns, object);
/* Optimize */
yasm_object_optimize(object, cur_arch);
-
- if (yasm_get_num_errors(warning_error) > 0) {
- yasm_errwarn_output_all(yasm_object_get_linemap(object), warning_error,
- print_yasm_error, print_yasm_warning);
- cleanup(object);
- return EXIT_FAILURE;
- }
+ check_errors(errwarns, object);
/* generate any debugging information */
- yasm_dbgfmt_generate(cur_dbgfmt);
+ yasm_dbgfmt_generate(cur_dbgfmt, errwarns);
+ check_errors(errwarns, object);
/* open the object file for output (if not already opened by dbg objfmt) */
if (!obj && strcmp(cur_objfmt_module->keyword, "dbg") != 0) {
@@ -655,8 +641,9 @@ main(int argc, char *argv[])
}
/* Write the object file */
- yasm_objfmt_output(cur_objfmt, obj?obj:stderr, obj_filename,
- strcmp(cur_dbgfmt_module->keyword, "null"), cur_dbgfmt);
+ yasm_objfmt_output(cur_objfmt, obj?obj:stderr,
+ strcmp(cur_dbgfmt_module->keyword, "null"), cur_dbgfmt,
+ errwarns);
/* Close object file */
if (obj)
@@ -665,13 +652,9 @@ main(int argc, char *argv[])
/* If we had an error at this point, we also need to delete the output
* object file (to make sure it's not left newer than the source).
*/
- if (yasm_get_num_errors(warning_error) > 0) {
- yasm_errwarn_output_all(yasm_object_get_linemap(object), warning_error,
- print_yasm_error, print_yasm_warning);
+ if (yasm_errwarns_num_errors(errwarns, warning_error) > 0)
remove(obj_filename);
- cleanup(object);
- return EXIT_FAILURE;
- }
+ check_errors(errwarns, object);
/* Open and write the list file */
if (list_filename) {
@@ -688,8 +671,9 @@ main(int argc, char *argv[])
fclose(list);
}
- yasm_errwarn_output_all(yasm_object_get_linemap(object), warning_error,
- print_yasm_error, print_yasm_warning);
+ yasm_errwarns_output_all(errwarns, yasm_object_get_linemap(object),
+ warning_error, print_yasm_error,
+ print_yasm_warning);
cleanup(object);
return EXIT_SUCCESS;
@@ -708,6 +692,19 @@ open_file(const char *filename, const char *mode)
return f;
}
+static void
+check_errors(yasm_errwarns *errwarns, yasm_object *object)
+{
+ if (yasm_errwarns_num_errors(errwarns, warning_error) > 0) {
+ yasm_errwarns_output_all(errwarns, yasm_object_get_linemap(object),
+ warning_error, print_yasm_error,
+ print_yasm_warning);
+ yasm_errwarns_destroy(errwarns);
+ cleanup(object);
+ exit(EXIT_FAILURE);
+ }
+}
+
/* Define DO_FREE to 1 to enable deallocation of all data structures.
* Useful for detecting memory leaks, but slows down execution unnecessarily
* (as the OS will free everything we miss here).
@@ -839,6 +836,7 @@ opt_preproc_handler(/*@unused@*/ char *cmd, char *param, /*@unused@*/ int extra)
static int
opt_objfmt_handler(/*@unused@*/ char *cmd, char *param, /*@unused@*/ int extra)
{
+ size_t i;
assert(param != NULL);
cur_objfmt_module = yasm_load_objfmt(param);
if (!cur_objfmt_module) {
@@ -855,6 +853,8 @@ opt_objfmt_handler(/*@unused@*/ char *cmd, char *param, /*@unused@*/ int extra)
if (objfmt_keyword)
yasm_xfree(objfmt_keyword);
objfmt_keyword = yasm__xstrdup(param);
+ for (i=0; i<strlen(objfmt_keyword); i++)
+ objfmt_keyword[i] = tolower(objfmt_keyword[i]);
return 0;
}
@@ -1165,19 +1165,38 @@ handle_yasm_gettext(const char *msgid)
return gettext(msgid);
}
-const char *fmt[2] = {
+static const char *fmt[2] = {
"%s:%lu: %s%s\n", /* GNU */
"%s(%lu) : %s%s\n" /* VC */
};
+static const char *fmt_noline[2] = {
+ "%s: %s%s\n", /* GNU */
+ "%s : %s%s\n" /* VC */
+};
+
static void
-print_yasm_error(const char *filename, unsigned long line, const char *msg)
+print_yasm_error(const char *filename, unsigned long line, const char *msg,
+ unsigned long xrefline, const char *xrefmsg)
{
- fprintf(stderr, fmt[ewmsg_style], filename, line, "", msg);
+ if (line)
+ fprintf(stderr, fmt[ewmsg_style], filename, line, "", msg);
+ else
+ fprintf(stderr, fmt_noline[ewmsg_style], filename, "", msg);
+
+ if (xrefmsg) {
+ if (xrefline)
+ fprintf(stderr, fmt[ewmsg_style], filename, xrefline, "", xrefmsg);
+ else
+ fprintf(stderr, fmt_noline[ewmsg_style], filename, "", xrefmsg);
+ }
}
static void
print_yasm_warning(const char *filename, unsigned long line, const char *msg)
{
- fprintf(stderr, fmt[ewmsg_style], filename, line, _("warning: "), msg);
+ if (line)
+ fprintf(stderr, fmt[ewmsg_style], filename, line, _("warning: "), msg);
+ else
+ fprintf(stderr, fmt_noline[ewmsg_style], filename, _("warning: "), msg);
}
diff --git a/genstring.c b/genstring.c
new file mode 100644
index 00000000..c00901ce
--- /dev/null
+++ b/genstring.c
@@ -0,0 +1,103 @@
+/* $Id$
+ *
+ * Generate array-of-const-string from text file.
+ *
+ * Copyright (C) 2006 Peter Johnson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define MAXLINE 1024
+
+int
+main(int argc, char *argv[])
+{
+ FILE *in, *out;
+ int i;
+ char *str;
+ char *strp;
+ char *charp;
+ size_t len;
+
+ if (argc < 4) {
+ fprintf(stderr, "Usage: %s <string> <outfile> <file> [<file> ...]\n",
+ argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ out = fopen(argv[2], "wt");
+
+ if (!out) {
+ fprintf(stderr, "Could not open `%s'.\n", argv[2]);
+ return EXIT_FAILURE;
+ }
+
+ str = malloc(MAXLINE);
+
+ fprintf(out, "/* This file auto-generated from %s by genstring.c"
+ " - don't edit it */\n\n"
+ "static const char *%s[] = {\n", argv[3], argv[1]);
+
+ for (i=3; i<argc; i++) {
+ in = fopen(argv[i], "rt");
+ if (!in) {
+ fprintf(stderr, "Could not open `%s'.\n", argv[i]);
+ fclose(out);
+ remove(argv[2]);
+ return EXIT_FAILURE;
+ }
+
+ while (fgets(str, MAXLINE, in)) {
+ strp = str;
+
+ /* strip off trailing whitespace */
+ len = strlen(strp);
+ while (len > 0 && (strp[len-1] == ' ' || strp[len-1] == '\t' ||
+ strp[len-1] == '\n')) {
+ strp[len-1] = '\0';
+ len--;
+ }
+
+ /* output as string to output file */
+ fprintf(out, " \"");
+ while (*strp != '\0') {
+ if (*strp == '\\' || *strp == '"')
+ fputc('\\', out);
+ fputc(*strp, out);
+ strp++;
+ }
+ fprintf(out, "\",\n");
+ }
+
+ fclose(in);
+ }
+
+ fprintf(out, "};\n");
+ fclose(out);
+
+ free(str);
+
+ return EXIT_SUCCESS;
+}
diff --git a/libyasm.h b/libyasm.h
index 99421459..5ab87265 100644
--- a/libyasm.h
+++ b/libyasm.h
@@ -60,6 +60,7 @@
#include <libyasm/intnum.h>
#include <libyasm/floatnum.h>
#include <libyasm/expr.h>
+#include <libyasm/value.h>
#include <libyasm/symrec.h>
#include <libyasm/bytecode.h>
@@ -84,6 +85,7 @@
#endif
#include <libyasm/hamt.h>
#include <libyasm/bitvect.h>
+#include <libyasm/md5.h>
#endif
#endif
diff --git a/libyasm/Makefile.inc b/libyasm/Makefile.inc
index 09391eb8..6582a57a 100644
--- a/libyasm/Makefile.inc
+++ b/libyasm/Makefile.inc
@@ -1,25 +1,33 @@
# $Id$
+libyasm_a_SOURCES += libyasm/arch.c
+libyasm_a_SOURCES += libyasm/assocdat.c
+libyasm_a_SOURCES += libyasm/bitvect.c
+libyasm_a_SOURCES += libyasm/bc-align.c
+libyasm_a_SOURCES += libyasm/bc-data.c
+libyasm_a_SOURCES += libyasm/bc-incbin.c
+libyasm_a_SOURCES += libyasm/bc-insn.c
+libyasm_a_SOURCES += libyasm/bc-org.c
+libyasm_a_SOURCES += libyasm/bc-reserve.c
libyasm_a_SOURCES += libyasm/bytecode.c
+libyasm_a_SOURCES += libyasm/errwarn.c
libyasm_a_SOURCES += libyasm/expr.c
-libyasm_a_SOURCES += libyasm/symrec.c
libyasm_a_SOURCES += libyasm/file.c
-libyasm_a_SOURCES += libyasm/section.c
-libyasm_a_SOURCES += libyasm/arch.c
-libyasm_a_SOURCES += libyasm/objfmt.c
-libyasm_a_SOURCES += libyasm/intnum.c
libyasm_a_SOURCES += libyasm/floatnum.c
libyasm_a_SOURCES += libyasm/hamt.c
-libyasm_a_SOURCES += libyasm/bitvect.c
-libyasm_a_SOURCES += libyasm/valparam.c
-libyasm_a_SOURCES += libyasm/errwarn.c
+libyasm_a_SOURCES += libyasm/intnum.c
libyasm_a_SOURCES += libyasm/linemgr.c
-libyasm_a_SOURCES += libyasm/assocdat.c
-libyasm_a_SOURCES += libyasm/xmalloc.c
-libyasm_a_SOURCES += libyasm/xstrdup.c
-libyasm_a_SOURCES += libyasm/strcasecmp.c
+libyasm_a_SOURCES += libyasm/md5.c
libyasm_a_SOURCES += libyasm/mergesort.c
+libyasm_a_SOURCES += libyasm/phash.c
+libyasm_a_SOURCES += libyasm/section.c
+libyasm_a_SOURCES += libyasm/strcasecmp.c
libyasm_a_SOURCES += libyasm/strsep.c
+libyasm_a_SOURCES += libyasm/symrec.c
+libyasm_a_SOURCES += libyasm/valparam.c
+libyasm_a_SOURCES += libyasm/value.c
+libyasm_a_SOURCES += libyasm/xmalloc.c
+libyasm_a_SOURCES += libyasm/xstrdup.c
libyasm_a_SOURCES += libyasm/qq.c
libyasm_a_SOURCES += libyasm/stack.c
libyasm_a_SOURCES += libyasm/interval_tree.c
@@ -45,30 +53,33 @@ EXTRA_DIST += libyasm/module.in
modincludedir = $(includedir)/libyasm
-modinclude_HEADERS = libyasm/bytecode.h
+modinclude_HEADERS = libyasm/arch.h
+modinclude_HEADERS += libyasm/assocdat.h
modinclude_HEADERS += libyasm/bc-int.h
+modinclude_HEADERS += libyasm/bitvect.h
+modinclude_HEADERS += libyasm/bytecode.h
+modinclude_HEADERS += libyasm/compat-queue.h
+modinclude_HEADERS += libyasm/coretype.h
+modinclude_HEADERS += libyasm/dbgfmt.h
modinclude_HEADERS += libyasm/errwarn.h
modinclude_HEADERS += libyasm/expr.h
modinclude_HEADERS += libyasm/expr-int.h
-modinclude_HEADERS += libyasm/symrec.h
-modinclude_HEADERS += libyasm/linemgr.h
-modinclude_HEADERS += libyasm/coretype.h
modinclude_HEADERS += libyasm/file.h
-modinclude_HEADERS += libyasm/section.h
-modinclude_HEADERS += libyasm/arch.h
-modinclude_HEADERS += libyasm/dbgfmt.h
-modinclude_HEADERS += libyasm/objfmt.h
+modinclude_HEADERS += libyasm/floatnum.h
+modinclude_HEADERS += libyasm/hamt.h
+modinclude_HEADERS += libyasm/intnum.h
+modinclude_HEADERS += libyasm/linemgr.h
modinclude_HEADERS += libyasm/listfmt.h
+modinclude_HEADERS += libyasm/md5.h
+modinclude_HEADERS += libyasm/module.h
+modinclude_HEADERS += libyasm/objfmt.h
modinclude_HEADERS += libyasm/parser.h
+modinclude_HEADERS += libyasm/phash.h
modinclude_HEADERS += libyasm/preproc.h
-modinclude_HEADERS += libyasm/intnum.h
-modinclude_HEADERS += libyasm/floatnum.h
-modinclude_HEADERS += libyasm/hamt.h
-modinclude_HEADERS += libyasm/bitvect.h
+modinclude_HEADERS += libyasm/section.h
+modinclude_HEADERS += libyasm/symrec.h
modinclude_HEADERS += libyasm/valparam.h
-modinclude_HEADERS += libyasm/compat-queue.h
-modinclude_HEADERS += libyasm/assocdat.h
-modinclude_HEADERS += libyasm/module.h
+modinclude_HEADERS += libyasm/value.h
modinclude_HEADERS += libyasm/qq.h
modinclude_HEADERS += libyasm/stack.h
modinclude_HEADERS += libyasm/interval_tree.h
diff --git a/libyasm/arch.h b/libyasm/arch.h
index 9e4efbb3..99cc93fc 100644
--- a/libyasm/arch.h
+++ b/libyasm/arch.h
@@ -41,6 +41,24 @@ typedef enum {
YASM_ARCH_CREATE_BAD_PARSER /**< Unrecognized parser name. */
} yasm_arch_create_error;
+/** Return values for yasm_arch_module::parse_check_insnprefix(). */
+typedef enum {
+ YASM_ARCH_NOTINSNPREFIX = 0, /**< Unrecognized */
+ YASM_ARCH_INSN, /**< An instruction */
+ YASM_ARCH_PREFIX /**< An instruction prefix */
+} yasm_arch_insnprefix;
+
+/** Types of registers / target modifiers that may be returned by
+ * yasm_arch_module::parse_check_regtmod().
+ */
+typedef enum {
+ YASM_ARCH_NOTREGTMOD = 0, /**< Unrecognized */
+ YASM_ARCH_REG, /**< A "normal" register */
+ YASM_ARCH_REGGROUP, /**< A group of indexable registers */
+ YASM_ARCH_SEGREG, /**< A segment register */
+ YASM_ARCH_TARGETMOD /**< A target modifier (for jumps) */
+} yasm_arch_regtmod;
+
/** An instruction operand (opaque type). */
typedef struct yasm_insn_operand yasm_insn_operand;
#ifdef YASM_LIB_INTERNAL
@@ -105,6 +123,11 @@ typedef struct yasm_arch_module {
*/
const char * (*get_machine) (const yasm_arch *arch);
+ /** Module-level implementation of yasm_arch_get_address_size().
+ * Call yasm_arch_get_address_size() instead of calling this function.
+ */
+ unsigned int (*get_address_size) (const yasm_arch *arch);
+
/** Module-level implementation of yasm_arch_set_var().
* Call yasm_arch_set_var() instead of calling this function.
*/
@@ -113,50 +136,21 @@ typedef struct yasm_arch_module {
/** Module-level implementation of yasm_arch_parse_cpu().
* Call yasm_arch_parse_cpu() instead of calling this function.
*/
- void (*parse_cpu) (yasm_arch *arch, const char *cpuid,
- unsigned long line);
-
- /** Module-level implementation of yasm_arch_parse_check_reg().
- * Call yasm_arch_parse_check_reg() instead of calling this function.
- */
- int (*parse_check_reg)
- (yasm_arch *arch, /*@out@*/ unsigned long data[1], const char *id,
- unsigned long line);
-
- /** Module-level implementation of yasm_arch_parse_check_reggroup().
- * Call yasm_arch_parse_check_reggroup() instead of calling this function.
- */
- int (*parse_check_reggroup)
- (yasm_arch *arch, /*@out@*/ unsigned long data[1], const char *id,
- unsigned long line);
-
- /** Module-level implementation of yasm_arch_parse_check_segreg().
- * Call yasm_arch_parse_check_segreg() instead of calling this function.
- */
- int (*parse_check_segreg)
- (yasm_arch *arch, /*@out@*/ unsigned long data[1], const char *id,
- unsigned long line);
-
- /** Module-level implementation of yasm_arch_parse_check_insn().
- * Call yasm_arch_parse_check_insn() instead of calling this function.
- */
- int (*parse_check_insn)
- (yasm_arch *arch, /*@out@*/ unsigned long data[4], const char *id,
- unsigned long line);
+ void (*parse_cpu) (yasm_arch *arch, const char *cpuid, size_t cpuid_len);
- /** Module-level implementation of yasm_arch_parse_check_prefix().
- * Call yasm_arch_parse_check_prefix() instead of calling this function.
+ /** Module-level implementation of yasm_arch_parse_check_insnprefix().
+ * Call yasm_arch_parse_check_insnprefix() instead of calling this function.
*/
- int (*parse_check_prefix)
+ yasm_arch_insnprefix (*parse_check_insnprefix)
(yasm_arch *arch, /*@out@*/ unsigned long data[4], const char *id,
- unsigned long line);
+ size_t id_len);
- /** Module-level implementation of yasm_arch_parse_check_targetmod().
- * Call yasm_arch_parse_check_targetmod() instead of calling this function.
+ /** Module-level implementation of yasm_arch_parse_check_regtmod().
+ * Call yasm_arch_parse_check_regtmod() instead of calling this function.
*/
- int (*parse_check_targetmod)
- (yasm_arch *arch, /*@out@*/ unsigned long data[1], const char *id,
- unsigned long line);
+ yasm_arch_regtmod (*parse_check_regtmod)
+ (yasm_arch *arch, /*@out@*/ unsigned long *data, const char *id,
+ size_t id_len);
/** Module-level implementation of yasm_arch_parse_directive().
* Call yasm_arch_parse_directive() instead of calling this function.
@@ -186,15 +180,7 @@ typedef struct yasm_arch_module {
*/
int (*floatnum_tobytes) (yasm_arch *arch, const yasm_floatnum *flt,
unsigned char *buf, size_t destsize,
- size_t valsize, size_t shift, int warn,
- unsigned long line);
-
- /** Module-level implementation of yasm_arch_intnum_fixup_rel().
- * Call yasm_arch_intnum_fixup_rel() instead of calling this function.
- */
- int (*intnum_fixup_rel) (yasm_arch *arch, yasm_intnum *intn,
- size_t valsize, const yasm_bytecode *bc,
- unsigned long line);
+ size_t valsize, size_t shift, int warn);
/** Module-level implementation of yasm_arch_intnum_tobytes().
* Call yasm_arch_intnum_tobytes() instead of calling this function.
@@ -202,7 +188,7 @@ typedef struct yasm_arch_module {
int (*intnum_tobytes) (yasm_arch *arch, const yasm_intnum *intn,
unsigned char *buf, size_t destsize, size_t valsize,
int shift, const yasm_bytecode *bc,
- int warn, unsigned long line);
+ int warn);
/** Module-level implementation of yasm_arch_get_reg_size().
* Call yasm_arch_get_reg_size() instead of calling this function.
@@ -242,7 +228,7 @@ typedef struct yasm_arch_module {
*/
const char *default_machine_keyword;
- /** Canonical "word" size in bytes.
+ /** Canonical "word" size in bits.
* Call yasm_arch_wordsize() to get the word size of a particular
* #yasm_arch.
*/
@@ -253,6 +239,12 @@ typedef struct yasm_arch_module {
* make this extremely large (e.g. >1000).
*/
const unsigned long jmpsize_threshold;
+
+ /** Worst case minimum instruction length in bytes.
+ * Call yasm_arch_min_insn_len() to get the minimum instruction length of
+ * a particular #yasm_arch.
+ */
+ unsigned int min_insn_len;
} yasm_arch_module;
#ifdef YASM_LIB_INTERNAL
@@ -312,10 +304,16 @@ const char *yasm_arch_keyword(const yasm_arch *arch);
*/
unsigned int yasm_arch_wordsize(const yasm_arch *arch);
+/** Get the minimum instruction length of an architecture.
+ * \param arch architecture
+ * \return Minimum instruction length (in bytes).
+ */
+unsigned int yasm_arch_min_insn_len(const yasm_arch *arch);
+
/** Create architecture.
* \param module architecture module
* \param machine keyword of machine in use (must be one listed in
- * #machines)
+ * #yasm_arch_module.machines)
* \param parser keyword of parser in use
* \param error error return value
* \return NULL on error (error returned in error parameter), otherwise new
@@ -336,6 +334,12 @@ void yasm_arch_destroy(/*@only@*/ yasm_arch *arch);
*/
const char *yasm_arch_get_machine(const yasm_arch *arch);
+/** Get architecture's active address size, in bits.
+ * \param arch architecture
+ * \return Active address size (in bits).
+ */
+unsigned int yasm_arch_get_address_size(const yasm_arch *arch);
+
/** Set any arch-specific variables. For example, "mode_bits" in x86.
* \param arch architecture
* \param var variable name
@@ -347,108 +351,43 @@ int yasm_arch_set_var(yasm_arch *arch, const char *var, unsigned long val);
/** Switch available instructions/registers/etc based on a user-specified
* CPU identifier. Should modify behavior ONLY of parse_* functions! The
* bytecode and output functions should be able to handle any CPU.
- * \param arch architecture
- * \param cpuid cpu identifier as in the input file
- * \param line virtual line (from yasm_linemap)
- */
-void yasm_arch_parse_cpu(yasm_arch *arch, const char *cpuid,
- unsigned long line);
-
-/** Check an generic identifier to see if it matches architecture specific
- * names for registers. Unrecognized identifiers should return 0
- * so they can be treated as normal symbols. Any additional data beyond
- * just the type (almost always necessary) should be returned into the
- * space provided by the data parameter.
- * \param arch architecture
- * \param data extra identification information (yasm_arch-specific)
- * [output]
- * \param id identifier as in the input file
- * \param line virtual line (from yasm_linemap)
- * \return 1 if id is a register, 0 if not.
- */
-int yasm_arch_parse_check_reg
- (yasm_arch *arch, /*@out@*/ unsigned long data[1], const char *id,
- unsigned long line);
-
-/** Check an generic identifier to see if it matches architecture specific
- * names for register groups. Unrecognized identifiers should return 0
- * so they can be treated as normal symbols. Any additional data beyond
- * just the type (almost always necessary) should be returned into the
- * space provided by the data parameter.
- * \param arch architecture
- * \param data extra identification information (yasm_arch-specific)
- * [output]
- * \param id identifier as in the input file
- * \param line virtual line (from yasm_linemap)
- * \return 1 if id is a register, 0 if not.
- */
-int yasm_arch_parse_check_reggroup
- (yasm_arch *arch, /*@out@*/ unsigned long data[1], const char *id,
- unsigned long line);
-
-/** Check an generic identifier to see if it matches architecture specific
- * names for segment registers. Unrecognized identifiers should return 0
- * so they can be treated as normal symbols. Any additional data beyond
- * just the type (almost always necessary) should be returned into the
- * space provided by the data parameter.
- * \param arch architecture
- * \param data extra identification information (yasm_arch-specific)
- * [output]
- * \param id identifier as in the input file
- * \param line virtual line (from yasm_linemap)
- * \return 1 if id is a register, 0 if not.
- */
-int yasm_arch_parse_check_segreg
- (yasm_arch *arch, /*@out@*/ unsigned long data[1], const char *id,
- unsigned long line);
-
-/** Check an generic identifier to see if it matches architecture specific
- * names for instructions. Unrecognized identifiers should return 0
- * so they can be treated as normal symbols. Any additional data beyond
- * just the type (almost always necessary) should be returned into the
- * space provided by the data parameter.
- * \param arch architecture
- * \param data extra identification information (yasm_arch-specific)
- * [output]
- * \param id identifier as in the input file
- * \param line virtual line (from yasm_linemap)
- * \return 1 if id is a register, 0 if not.
+ * \param arch architecture
+ * \param cpuid cpu identifier as in the input file
+ * \param cpuid_len length of cpu identifier string
*/
-int yasm_arch_parse_check_insn
- (yasm_arch *arch, /*@out@*/ unsigned long data[4], const char *id,
- unsigned long line);
+void yasm_arch_parse_cpu(yasm_arch *arch, const char *cpuid, size_t cpuid_len);
/** Check an generic identifier to see if it matches architecture specific
- * names for prefixes. Unrecognized identifiers should return 0
- * so they can be treated as normal symbols. Any additional data beyond
- * just the type (almost always necessary) should be returned into the
- * space provided by the data parameter.
- * \param arch architecture
- * \param data extra identification information (yasm_arch-specific)
- * [output]
- * \param id identifier as in the input file
- * \param line virtual line (from yasm_linemap)
- * \return 1 if id is a register, 0 if not.
+ * names for instructions or instruction prefixes. Unrecognized identifiers
+ * should return #YASM_ARCH_NOTINSNPREFIX so they can be treated as normal
+ * symbols. Any additional data beyond just the type (almost always necessary)
+ * should be returned into the space provided by the data parameter.
+ * \param arch architecture
+ * \param data extra identification information (yasm_arch-specific)
+ * [output]
+ * \param id identifier as in the input file
+ * \param id_len length of id string
+ * \return Identifier type (#YASM_ARCH_NOTINSNPREFIX if unrecognized)
*/
-int yasm_arch_parse_check_prefix
+yasm_arch_insnprefix yasm_arch_parse_check_insnprefix
(yasm_arch *arch, /*@out@*/ unsigned long data[4], const char *id,
- unsigned long line);
+ size_t id_len);
/** Check an generic identifier to see if it matches architecture specific
- * names for target modifiers. Unrecognized identifiers should return 0
- * so they can be treated as normal symbols. Any additional data beyond
- * just the type (almost always necessary) should be returned into the
- * space provided by the data parameter.
- * \param arch architecture
- * \param data extra identification information (yasm_arch-specific)
- * [output]
- * \param id identifier as in the input file
- * \param line virtual line (from yasm_linemap)
- * \return 1 if id is a register, 0 if not.
+ * names for registers or target modifiers. Unrecognized identifiers should
+ * return #YASM_ARCH_NOTREGTMOD. Any additional data beyond just the type
+ * (almost always necessary) should be returned into the space provided by the
+ * data parameter.
+ * \param arch architecture
+ * \param data extra identification information (yasm_arch-specific)
+ * [output]
+ * \param id identifier as in the input file
+ * \param id_len length of id string
+ * \return Identifier type (#YASM_ARCH_NOTREGTMOD if unrecognized)
*/
-int yasm_arch_parse_check_targetmod
- (yasm_arch *arch, /*@out@*/ unsigned long data[1], const char *id,
- unsigned long line);
+yasm_arch_regtmod yasm_arch_parse_check_regtmod
+ (yasm_arch *arch, /*@out@*/ unsigned long *data, const char *id,
+ size_t id_len);
/** Handle architecture-specific directives.
* Should modify behavior ONLY of parse functions, much like parse_cpu().
@@ -509,26 +448,11 @@ void yasm_arch_finalize_insn
* \param valsize size (in bits)
* \param shift left shift (in bits)
* \param warn enables standard overflow/underflow warnings
- * \param line virtual line; may be 0 if warn is 0.
* \return Nonzero on error.
*/
int yasm_arch_floatnum_tobytes(yasm_arch *arch, const yasm_floatnum *flt,
unsigned char *buf, size_t destsize,
- size_t valsize, size_t shift, int warn,
- unsigned long line);
-
-/** Adjust #yasm_intnum for relative displacement from bc. Displacement
- * is modified in-place.
- * \param arch architecture
- * \param intn integer value
- * \param valsize size (in bits)
- * \param bc bytecode being output ("parent" of value)
- * \param line virtual line; may be 0 if warn is 0
- * \return Nonzero on error.
- */
-int yasm_arch_intnum_fixup_rel(yasm_arch *arch, yasm_intnum *intn,
- size_t valsize, const yasm_bytecode *bc,
- unsigned long line);
+ size_t valsize, size_t shift, int warn);
/** Output #yasm_intnum to buffer. Puts the value into the least
* significant bits of the destination, or may be shifted into more
@@ -544,16 +468,14 @@ int yasm_arch_intnum_fixup_rel(yasm_arch *arch, yasm_intnum *intn,
* \param bc bytecode being output ("parent" of value)
* \param warn enables standard warnings (value doesn't fit into
* valsize bits)
- * \param line virtual line; may be 0 if warn is 0
* \return Nonzero on error.
*/
int yasm_arch_intnum_tobytes(yasm_arch *arch, const yasm_intnum *intn,
unsigned char *buf, size_t destsize,
size_t valsize, int shift,
- const yasm_bytecode *bc, int warn,
- unsigned long line);
+ const yasm_bytecode *bc, int warn);
-/** Get the equivalent byte size of a register.
+/** Get the equivalent size of a register in bits.
* \param arch architecture
* \param reg register
* \return 0 if there is no suitable equivalent size, otherwise the size.
@@ -606,6 +528,8 @@ yasm_effaddr *yasm_arch_ea_create(yasm_arch *arch, /*@keep@*/ yasm_expr *e);
(((yasm_arch_base *)arch)->module->wordsize)
#define yasm_arch_jmpsize_threshold(arch) \
(((yasm_arch_base *)arch)->module->jmpsize_threshold)
+#define yasm_arch_min_insn_len(arch) \
+ (((yasm_arch_base *)arch)->module->min_insn_len)
#define yasm_arch_create(module, machine, parser, error) \
module->create(machine, parser, error)
@@ -614,24 +538,18 @@ yasm_effaddr *yasm_arch_ea_create(yasm_arch *arch, /*@keep@*/ yasm_expr *e);
((yasm_arch_base *)arch)->module->destroy(arch)
#define yasm_arch_get_machine(arch) \
((yasm_arch_base *)arch)->module->get_machine(arch)
+#define yasm_arch_get_address_size(arch) \
+ ((yasm_arch_base *)arch)->module->get_address_size(arch)
#define yasm_arch_set_var(arch, var, val) \
((yasm_arch_base *)arch)->module->set_var(arch, var, val)
-#define yasm_arch_parse_cpu(arch, cpuid, line) \
- ((yasm_arch_base *)arch)->module->parse_cpu(arch, cpuid, line)
-#define yasm_arch_parse_check_reg(arch, data, id, line) \
- ((yasm_arch_base *)arch)->module->parse_check_reg(arch, data, id, line)
-#define yasm_arch_parse_check_reggroup(arch, data, id, line) \
- ((yasm_arch_base *)arch)->module->parse_check_reggroup(arch, data, id, \
- line)
-#define yasm_arch_parse_check_segreg(arch, data, id, line) \
- ((yasm_arch_base *)arch)->module->parse_check_segreg(arch, data, id, line)
-#define yasm_arch_parse_check_insn(arch, data, id, line) \
- ((yasm_arch_base *)arch)->module->parse_check_insn(arch, data, id, line)
-#define yasm_arch_parse_check_prefix(arch, data, id, line) \
- ((yasm_arch_base *)arch)->module->parse_check_prefix(arch, data, id, line)
-#define yasm_arch_parse_check_targetmod(arch, data, id, line) \
- ((yasm_arch_base *)arch)->module->parse_check_targetmod(arch, data, id, \
- line)
+#define yasm_arch_parse_cpu(arch, cpuid, cpuid_len) \
+ ((yasm_arch_base *)arch)->module->parse_cpu(arch, cpuid, cpuid_len)
+#define yasm_arch_parse_check_insnprefix(arch, data, id, id_len) \
+ ((yasm_arch_base *)arch)->module->parse_check_insnprefix(arch, data, id, \
+ id_len)
+#define yasm_arch_parse_check_regtmod(arch, data, id, id_len) \
+ ((yasm_arch_base *)arch)->module->parse_check_regtmod(arch, data, id, \
+ id_len)
#define yasm_arch_parse_directive(arch, name, valparams, objext_valparams, \
object, line) \
((yasm_arch_base *)arch)->module->parse_directive \
@@ -645,16 +563,13 @@ yasm_effaddr *yasm_arch_ea_create(yasm_arch *arch, /*@keep@*/ yasm_expr *e);
(arch, bc, prev_bc, data, num_operands, operands, num_prefixes, \
prefixes, num_segregs, segregs)
#define yasm_arch_floatnum_tobytes(arch, flt, buf, destsize, valsize, shift, \
- warn, line) \
+ warn) \
((yasm_arch_base *)arch)->module->floatnum_tobytes \
- (arch, flt, buf, destsize, valsize, shift, warn, line)
-#define yasm_arch_intnum_fixup_rel(arch, intn, valsize, bc, line) \
- ((yasm_arch_base *)arch)->module->intnum_fixup_rel \
- (arch, intn, valsize, bc, line)
+ (arch, flt, buf, destsize, valsize, shift, warn)
#define yasm_arch_intnum_tobytes(arch, intn, buf, destsize, valsize, shift, \
- bc, warn, line) \
+ bc, warn) \
((yasm_arch_base *)arch)->module->intnum_tobytes \
- (arch, intn, buf, destsize, valsize, shift, bc, warn, line)
+ (arch, intn, buf, destsize, valsize, shift, bc, warn)
#define yasm_arch_get_reg_size(arch, reg) \
((yasm_arch_base *)arch)->module->get_reg_size(arch, reg)
#define yasm_arch_reggroup_get_reg(arch, regg, regi) \
diff --git a/libyasm/bc-align.c b/libyasm/bc-align.c
new file mode 100644
index 00000000..0506a506
--- /dev/null
+++ b/libyasm/bc-align.c
@@ -0,0 +1,239 @@
+/*
+ * Align bytecode
+ *
+ * Copyright (C) 2005-2006 Peter Johnson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#define YASM_LIB_INTERNAL
+#include "util.h"
+/*@unused@*/ RCSID("$Id$");
+
+#include "coretype.h"
+
+#include "errwarn.h"
+#include "intnum.h"
+#include "expr.h"
+
+#include "bytecode.h"
+
+#include "bc-int.h"
+
+
+typedef struct bytecode_align {
+ /*@only@*/ yasm_expr *boundary; /* alignment boundary */
+
+ /* What to fill intervening locations with, NULL if using code_fill */
+ /*@only@*/ /*@null@*/ yasm_expr *fill;
+
+ /* Maximum number of bytes to skip, NULL if no maximum. */
+ /*@only@*/ /*@null@*/ yasm_expr *maxskip;
+
+ /* Code fill, NULL if using 0 fill */
+ /*@null@*/ const unsigned char **code_fill;
+} bytecode_align;
+
+static void bc_align_destroy(void *contents);
+static void bc_align_print(const void *contents, FILE *f, int indent_level);
+static void bc_align_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc);
+static int bc_align_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
+ void *add_span_data);
+static int bc_align_expand(yasm_bytecode *bc, int span, long old_val,
+ long new_val, /*@out@*/ long *neg_thres,
+ /*@out@*/ long *pos_thres);
+static int bc_align_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ /*@null@*/ yasm_output_reloc_func output_reloc);
+
+static const yasm_bytecode_callback bc_align_callback = {
+ bc_align_destroy,
+ bc_align_print,
+ bc_align_finalize,
+ bc_align_calc_len,
+ bc_align_expand,
+ bc_align_tobytes,
+ 0
+};
+
+
+static void
+bc_align_destroy(void *contents)
+{
+ bytecode_align *align = (bytecode_align *)contents;
+ if (align->boundary)
+ yasm_expr_destroy(align->boundary);
+ if (align->fill)
+ yasm_expr_destroy(align->fill);
+ if (align->maxskip)
+ yasm_expr_destroy(align->maxskip);
+ yasm_xfree(contents);
+}
+
+static void
+bc_align_print(const void *contents, FILE *f, int indent_level)
+{
+ const bytecode_align *align = (const bytecode_align *)contents;
+ fprintf(f, "%*s_Align_\n", indent_level, "");
+ fprintf(f, "%*sBoundary=", indent_level, "");
+ yasm_expr_print(align->boundary, f);
+ fprintf(f, "\n%*sFill=", indent_level, "");
+ yasm_expr_print(align->fill, f);
+ fprintf(f, "\n%*sMax Skip=", indent_level, "");
+ yasm_expr_print(align->maxskip, f);
+ fprintf(f, "\n");
+}
+
+static void
+bc_align_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc)
+{
+ bytecode_align *align = (bytecode_align *)bc->contents;
+ if (!yasm_expr_get_intnum(&align->boundary, NULL))
+ yasm_error_set(YASM_ERROR_NOT_CONSTANT,
+ N_("align boundary must be a constant"));
+ if (align->fill && !yasm_expr_get_intnum(&align->fill, NULL))
+ yasm_error_set(YASM_ERROR_NOT_CONSTANT,
+ N_("align fill must be a constant"));
+ if (align->maxskip && !yasm_expr_get_intnum(&align->maxskip, NULL))
+ yasm_error_set(YASM_ERROR_NOT_CONSTANT,
+ N_("align maximum skip must be a constant"));
+}
+
+static int
+bc_align_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
+ void *add_span_data)
+{
+ yasm_internal_error(N_("align not yet implemented"));
+#if 0
+ bytecode_align *align = (bytecode_align *)bc->contents;
+ unsigned long end;
+ unsigned long boundary =
+ yasm_intnum_get_uint(yasm_expr_get_intnum(&align->boundary, NULL));
+
+ if (boundary == 0) {
+ bc->len = 0;
+ return YASM_BC_RESOLVE_MIN_LEN;
+ }
+
+ end = bc->offset;
+ if (bc->offset & (boundary-1))
+ end = (bc->offset & ~(boundary-1)) + boundary;
+
+ bc->len = end - bc->offset;
+
+ if (align->maxskip) {
+ unsigned long maxskip =
+ yasm_intnum_get_uint(yasm_expr_get_intnum(&align->maxskip, NULL));
+ if ((end - bc->offset) > maxskip)
+ bc->len = 0;
+ }
+#endif
+ return 0;
+}
+
+static int
+bc_align_expand(yasm_bytecode *bc, int span, long old_val, long new_val,
+ /*@out@*/ long *neg_thres, /*@out@*/ long *pos_thres)
+{
+ yasm_internal_error(N_("align not yet implemented"));
+ return 0;
+}
+
+static int
+bc_align_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ /*@unused@*/ yasm_output_reloc_func output_reloc)
+{
+ bytecode_align *align = (bytecode_align *)bc->contents;
+ unsigned long len;
+ unsigned long boundary =
+ yasm_intnum_get_uint(yasm_expr_get_intnum(&align->boundary, NULL));
+
+ if (boundary == 0)
+ return 0;
+ else {
+ unsigned long end = bc->offset;
+ if (bc->offset & (boundary-1))
+ end = (bc->offset & ~(boundary-1)) + boundary;
+ len = end - bc->offset;
+ if (len == 0)
+ return 0;
+ if (align->maxskip) {
+ unsigned long maxskip =
+ yasm_intnum_get_uint(yasm_expr_get_intnum(&align->maxskip,
+ NULL));
+ if (len > maxskip)
+ return 0;
+ }
+ }
+
+ if (align->fill) {
+ unsigned long v;
+ v = yasm_intnum_get_uint(yasm_expr_get_intnum(&align->fill, NULL));
+ memset(*bufp, (int)v, len);
+ *bufp += len;
+ } else if (align->code_fill) {
+ unsigned long maxlen = 15;
+ while (!align->code_fill[maxlen] && maxlen>0)
+ maxlen--;
+ if (maxlen == 0) {
+ yasm_error_set(YASM_ERROR_GENERAL,
+ N_("could not find any code alignment size"));
+ return 1;
+ }
+
+ /* Fill with maximum code fill as much as possible */
+ while (len > maxlen) {
+ memcpy(*bufp, align->code_fill[maxlen], maxlen);
+ *bufp += maxlen;
+ len -= maxlen;
+ }
+
+ if (!align->code_fill[len]) {
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("invalid alignment size %d"), len);
+ return 1;
+ }
+ /* Handle rest of code fill */
+ memcpy(*bufp, align->code_fill[len], len);
+ *bufp += len;
+ } else {
+ /* Just fill with 0 */
+ memset(*bufp, 0, len);
+ *bufp += len;
+ }
+ return 0;
+}
+
+yasm_bytecode *
+yasm_bc_create_align(yasm_expr *boundary, yasm_expr *fill,
+ yasm_expr *maxskip, const unsigned char **code_fill,
+ unsigned long line)
+{
+ bytecode_align *align = yasm_xmalloc(sizeof(bytecode_align));
+
+ align->boundary = boundary;
+ align->fill = fill;
+ align->maxskip = maxskip;
+ align->code_fill = code_fill;
+
+ return yasm_bc_create_common(&bc_align_callback, align, line);
+}
diff --git a/libyasm/bc-data.c b/libyasm/bc-data.c
new file mode 100644
index 00000000..c6913bdc
--- /dev/null
+++ b/libyasm/bc-data.c
@@ -0,0 +1,456 @@
+/*
+ * Data (and LEB128) bytecode
+ *
+ * Copyright (C) 2001-2006 Peter Johnson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#define YASM_LIB_INTERNAL
+#include "util.h"
+/*@unused@*/ RCSID("$Id$");
+
+#include "coretype.h"
+
+#include "errwarn.h"
+#include "intnum.h"
+#include "expr.h"
+#include "value.h"
+
+#include "bytecode.h"
+#include "arch.h"
+
+#include "bc-int.h"
+
+
+struct yasm_dataval {
+ /*@reldef@*/ STAILQ_ENTRY(yasm_dataval) link;
+
+ enum { DV_EMPTY, DV_VALUE, DV_RAW, DV_ULEB128, DV_SLEB128 } type;
+
+ union {
+ yasm_value val;
+ struct {
+ /*@only@*/ unsigned char *contents;
+ unsigned long len;
+ } raw;
+ } data;
+};
+
+typedef struct bytecode_data {
+ /* converted data (linked list) */
+ yasm_datavalhead datahead;
+} bytecode_data;
+
+static void bc_data_destroy(void *contents);
+static void bc_data_print(const void *contents, FILE *f, int indent_level);
+static void bc_data_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc);
+static int bc_data_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
+ void *add_span_data);
+static int bc_data_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ /*@null@*/ yasm_output_reloc_func output_reloc);
+
+static const yasm_bytecode_callback bc_data_callback = {
+ bc_data_destroy,
+ bc_data_print,
+ bc_data_finalize,
+ bc_data_calc_len,
+ yasm_bc_expand_common,
+ bc_data_tobytes,
+ 0
+};
+
+
+static void
+bc_data_destroy(void *contents)
+{
+ bytecode_data *bc_data = (bytecode_data *)contents;
+ yasm_dvs_destroy(&bc_data->datahead);
+ yasm_xfree(contents);
+}
+
+static void
+bc_data_print(const void *contents, FILE *f, int indent_level)
+{
+ const bytecode_data *bc_data = (const bytecode_data *)contents;
+ fprintf(f, "%*s_Data_\n", indent_level, "");
+ fprintf(f, "%*sElements:\n", indent_level+1, "");
+ yasm_dvs_print(&bc_data->datahead, f, indent_level+2);
+}
+
+static void
+bc_data_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc)
+{
+ bytecode_data *bc_data = (bytecode_data *)bc->contents;
+ yasm_dataval *dv;
+ yasm_intnum *intn;
+
+ /* Convert values from simple expr to value. */
+ STAILQ_FOREACH(dv, &bc_data->datahead, link) {
+ switch (dv->type) {
+ case DV_VALUE:
+ if (yasm_value_finalize(&dv->data.val)) {
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("data expression too complex"));
+ return;
+ }
+ break;
+ case DV_ULEB128:
+ case DV_SLEB128:
+ intn = yasm_expr_get_intnum(&dv->data.val.abs, NULL);
+ if (!intn) {
+ yasm_error_set(YASM_ERROR_NOT_CONSTANT,
+ N_("LEB128 requires constant values"));
+ return;
+ }
+ /* Warn for negative values in unsigned environment.
+ * This could be an error instead: the likelihood this is
+ * desired is very low!
+ */
+ if (yasm_intnum_sign(intn) == -1 && dv->type == DV_ULEB128)
+ yasm_warn_set(YASM_WARN_GENERAL,
+ N_("negative value in unsigned LEB128"));
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+static int
+bc_data_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
+ void *add_span_data)
+{
+ bytecode_data *bc_data = (bytecode_data *)bc->contents;
+ yasm_dataval *dv;
+ yasm_intnum *intn;
+
+ /* Count up element sizes, rounding up string length. */
+ STAILQ_FOREACH(dv, &bc_data->datahead, link) {
+ switch (dv->type) {
+ case DV_EMPTY:
+ break;
+ case DV_VALUE:
+ bc->len += dv->data.val.size/8;
+ break;
+ case DV_RAW:
+ bc->len += dv->data.raw.len;
+ break;
+ case DV_ULEB128:
+ case DV_SLEB128:
+ intn = yasm_expr_get_intnum(&dv->data.val.abs, NULL);
+ if (!intn)
+ yasm_internal_error(N_("non-constant in data_tobytes"));
+ bc->len +=
+ yasm_intnum_size_leb128(intn, dv->type == DV_SLEB128);
+ break;
+ }
+ }
+
+ return 0;
+}
+
+static int
+bc_data_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ /*@unused@*/ yasm_output_reloc_func output_reloc)
+{
+ bytecode_data *bc_data = (bytecode_data *)bc->contents;
+ yasm_dataval *dv;
+ unsigned char *bufp_orig = *bufp;
+ yasm_intnum *intn;
+ unsigned int val_len;
+
+ STAILQ_FOREACH(dv, &bc_data->datahead, link) {
+ switch (dv->type) {
+ case DV_EMPTY:
+ break;
+ case DV_VALUE:
+ val_len = dv->data.val.size/8;
+ if (output_value(&dv->data.val, *bufp, val_len,
+ (unsigned long)(*bufp-bufp_orig), bc, 1, d))
+ return 1;
+ *bufp += val_len;
+ break;
+ case DV_RAW:
+ memcpy(*bufp, dv->data.raw.contents, dv->data.raw.len);
+ *bufp += dv->data.raw.len;
+ break;
+ case DV_ULEB128:
+ case DV_SLEB128:
+ intn = yasm_expr_get_intnum(&dv->data.val.abs, NULL);
+ if (!intn)
+ yasm_internal_error(N_("non-constant in data_tobytes"));
+ *bufp +=
+ yasm_intnum_get_leb128(intn, *bufp, dv->type == DV_SLEB128);
+ }
+ }
+
+ return 0;
+}
+
+yasm_bytecode *
+yasm_bc_create_data(yasm_datavalhead *datahead, unsigned int size,
+ int append_zero, yasm_arch *arch, unsigned long line)
+{
+ bytecode_data *data = yasm_xmalloc(sizeof(bytecode_data));
+ yasm_bytecode *bc = yasm_bc_create_common(&bc_data_callback, data, line);
+ yasm_dataval *dv, *dv2, *dvo;
+ yasm_intnum *intn;
+ unsigned long len = 0, rlen, i;
+
+
+ yasm_dvs_initialize(&data->datahead);
+
+ /* Prescan input data for length, etc. Careful: this needs to be
+ * precisely paired with the second loop.
+ */
+ STAILQ_FOREACH(dv, datahead, link) {
+ switch (dv->type) {
+ case DV_EMPTY:
+ break;
+ case DV_VALUE:
+ case DV_ULEB128:
+ case DV_SLEB128:
+ intn = yasm_expr_get_intnum(&dv->data.val.abs, NULL);
+ if (intn && dv->type == DV_VALUE && (arch || size == 1))
+ len += size;
+ else if (intn && dv->type == DV_ULEB128)
+ len += yasm_intnum_size_leb128(intn, 0);
+ else if (intn && dv->type == DV_SLEB128)
+ len += yasm_intnum_size_leb128(intn, 1);
+ else {
+ if (len > 0) {
+ /* Create bytecode for all previous len */
+ dvo = yasm_dv_create_raw(yasm_xmalloc(len), len);
+ STAILQ_INSERT_TAIL(&data->datahead, dvo, link);
+ len = 0;
+ }
+
+ /* Create bytecode for this value */
+ dvo = yasm_xmalloc(sizeof(yasm_dataval));
+ STAILQ_INSERT_TAIL(&data->datahead, dvo, link);
+ }
+ break;
+ case DV_RAW:
+ rlen = dv->data.raw.len;
+ /* find count, rounding up to nearest multiple of size */
+ rlen = (rlen + size - 1) / size;
+ len += rlen*size;
+ break;
+ }
+ if (append_zero)
+ len++;
+ }
+
+ /* Create final dataval for any trailing length */
+ if (len > 0) {
+ dvo = yasm_dv_create_raw(yasm_xmalloc(len), len);
+ STAILQ_INSERT_TAIL(&data->datahead, dvo, link);
+ }
+
+ /* Second iteration: copy data and delete input datavals. */
+ dv = STAILQ_FIRST(datahead);
+ dvo = STAILQ_FIRST(&data->datahead);
+ len = 0;
+ while (dv) {
+ switch (dv->type) {
+ case DV_EMPTY:
+ break;
+ case DV_VALUE:
+ case DV_ULEB128:
+ case DV_SLEB128:
+ intn = yasm_expr_get_intnum(&dv->data.val.abs, NULL);
+ if (intn && dv->type == DV_VALUE && (arch || size == 1)) {
+ if (size == 1)
+ yasm_intnum_get_sized(intn,
+ &dvo->data.raw.contents[len],
+ 1, 8, 0, 0, 1);
+ else
+ yasm_arch_intnum_tobytes(arch, intn,
+ &dvo->data.raw.contents[len],
+ size, size*8, 0, bc, 1);
+ yasm_value_delete(&dv->data.val);
+ len += size;
+ } else if (intn && dv->type == DV_ULEB128) {
+ len += yasm_intnum_get_leb128(intn,
+ &dvo->data.raw.contents[len],
+ 0);
+ } else if (intn && dv->type == DV_SLEB128) {
+ len += yasm_intnum_get_leb128(intn,
+ &dvo->data.raw.contents[len],
+ 1);
+ } else {
+ dvo->type = dv->type;
+ dvo->data.val = dv->data.val; /* structure copy */
+ dvo->data.val.size = size*8; /* remember size */
+ dvo = STAILQ_NEXT(dvo, link);
+ len = 0;
+ }
+ break;
+ case DV_RAW:
+ rlen = dv->data.raw.len;
+ memcpy(&dvo->data.raw.contents[len], dv->data.raw.contents,
+ rlen);
+ yasm_xfree(dv->data.raw.contents);
+ len += rlen;
+ /* pad with 0's to nearest multiple of size */
+ rlen %= size;
+ if (rlen > 0) {
+ rlen = size-rlen;
+ for (i=0; i<rlen; i++)
+ dvo->data.raw.contents[len++] = 0;
+ }
+ break;
+ }
+ if (append_zero)
+ dvo->data.raw.contents[len++] = 0;
+ dv2 = STAILQ_NEXT(dv, link);
+ yasm_xfree(dv);
+ dv = dv2;
+ }
+
+ return bc;
+}
+
+yasm_bytecode *
+yasm_bc_create_leb128(yasm_datavalhead *datahead, int sign, unsigned long line)
+{
+ yasm_dataval *dv;
+
+ /* Convert all values into LEB type, error on strings/raws */
+ STAILQ_FOREACH(dv, datahead, link) {
+ switch (dv->type) {
+ case DV_VALUE:
+ dv->type = sign ? DV_SLEB128 : DV_ULEB128;
+ break;
+ case DV_RAW:
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("LEB128 does not allow string constants"));
+ break;
+ default:
+ break;
+ }
+ }
+
+ return yasm_bc_create_data(datahead, 0, 0, 0, line);
+}
+
+yasm_dataval *
+yasm_dv_create_expr(yasm_expr *e)
+{
+ yasm_dataval *retval = yasm_xmalloc(sizeof(yasm_dataval));
+
+ retval->type = DV_VALUE;
+ yasm_value_initialize(&retval->data.val, e, 0);
+
+ return retval;
+}
+
+yasm_dataval *
+yasm_dv_create_raw(unsigned char *contents, unsigned long len)
+{
+ yasm_dataval *retval = yasm_xmalloc(sizeof(yasm_dataval));
+
+ retval->type = DV_RAW;
+ retval->data.raw.contents = contents;
+ retval->data.raw.len = len;
+
+ return retval;
+}
+
+void
+yasm_dvs_destroy(yasm_datavalhead *headp)
+{
+ yasm_dataval *cur, *next;
+
+ cur = STAILQ_FIRST(headp);
+ while (cur) {
+ next = STAILQ_NEXT(cur, link);
+ switch (cur->type) {
+ case DV_VALUE:
+ yasm_value_delete(&cur->data.val);
+ break;
+ case DV_RAW:
+ yasm_xfree(cur->data.raw.contents);
+ break;
+ default:
+ break;
+ }
+ yasm_xfree(cur);
+ cur = next;
+ }
+ STAILQ_INIT(headp);
+}
+
+yasm_dataval *
+yasm_dvs_append(yasm_datavalhead *headp, yasm_dataval *dv)
+{
+ if (dv) {
+ STAILQ_INSERT_TAIL(headp, dv, link);
+ return dv;
+ }
+ return (yasm_dataval *)NULL;
+}
+
+void
+yasm_dvs_print(const yasm_datavalhead *head, FILE *f, int indent_level)
+{
+ yasm_dataval *cur;
+ unsigned long i;
+
+ STAILQ_FOREACH(cur, head, link) {
+ switch (cur->type) {
+ case DV_EMPTY:
+ fprintf(f, "%*sEmpty\n", indent_level, "");
+ break;
+ case DV_VALUE:
+ fprintf(f, "%*sValue:\n", indent_level, "");
+ yasm_value_print(&cur->data.val, f, indent_level+1);
+ break;
+ case DV_RAW:
+ fprintf(f, "%*sLength=%lu\n", indent_level, "",
+ cur->data.raw.len);
+ fprintf(f, "%*sBytes=[", indent_level, "");
+ for (i=0; i<cur->data.raw.len; i++)
+ fprintf(f, "0x%02x, ", cur->data.raw.contents[i]);
+ fprintf(f, "]\n");
+ break;
+ case DV_ULEB128:
+ fprintf(f, "%*sULEB128 value:\n", indent_level, "");
+ yasm_value_print(&cur->data.val, f, indent_level+1);
+ break;
+ case DV_SLEB128:
+ fprintf(f, "%*sSLEB128 value:\n", indent_level, "");
+ yasm_value_print(&cur->data.val, f, indent_level+1);
+ break;
+ }
+ }
+}
+
+/* Non-macro yasm_dvs_initialize() for non-YASM_LIB_INTERNAL users. */
+#undef yasm_dvs_initialize
+void
+yasm_dvs_initialize(yasm_datavalhead *headp)
+{
+ STAILQ_INIT(headp);
+}
diff --git a/libyasm/bc-incbin.c b/libyasm/bc-incbin.c
new file mode 100644
index 00000000..7201f8df
--- /dev/null
+++ b/libyasm/bc-incbin.c
@@ -0,0 +1,260 @@
+/*
+ * Incbin bytecode
+ *
+ * Copyright (C) 2001-2006 Peter Johnson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#define YASM_LIB_INTERNAL
+#include "util.h"
+/*@unused@*/ RCSID("$Id$");
+
+#include "coretype.h"
+
+#include "errwarn.h"
+#include "intnum.h"
+#include "expr.h"
+#include "value.h"
+
+#include "bytecode.h"
+
+#include "bc-int.h"
+
+
+typedef struct bytecode_incbin {
+ /*@only@*/ char *filename; /* file to include data from */
+
+ /* starting offset to read from (NULL=0) */
+ /*@only@*/ /*@null@*/ yasm_expr *start;
+
+ /* maximum number of bytes to read (NULL=no limit) */
+ /*@only@*/ /*@null@*/ yasm_expr *maxlen;
+} bytecode_incbin;
+
+static void bc_incbin_destroy(void *contents);
+static void bc_incbin_print(const void *contents, FILE *f, int indent_level);
+static void bc_incbin_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc);
+static int bc_incbin_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
+ void *add_span_data);
+static int bc_incbin_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ /*@null@*/ yasm_output_reloc_func output_reloc);
+
+static const yasm_bytecode_callback bc_incbin_callback = {
+ bc_incbin_destroy,
+ bc_incbin_print,
+ bc_incbin_finalize,
+ bc_incbin_calc_len,
+ yasm_bc_expand_common,
+ bc_incbin_tobytes,
+ 0
+};
+
+
+static void
+bc_incbin_destroy(void *contents)
+{
+ bytecode_incbin *incbin = (bytecode_incbin *)contents;
+ yasm_xfree(incbin->filename);
+ yasm_expr_destroy(incbin->start);
+ yasm_expr_destroy(incbin->maxlen);
+ yasm_xfree(contents);
+}
+
+static void
+bc_incbin_print(const void *contents, FILE *f, int indent_level)
+{
+ const bytecode_incbin *incbin = (const bytecode_incbin *)contents;
+ fprintf(f, "%*s_IncBin_\n", indent_level, "");
+ fprintf(f, "%*sFilename=`%s'\n", indent_level, "",
+ incbin->filename);
+ fprintf(f, "%*sStart=", indent_level, "");
+ if (!incbin->start)
+ fprintf(f, "nil (0)");
+ else
+ yasm_expr_print(incbin->start, f);
+ fprintf(f, "%*sMax Len=", indent_level, "");
+ if (!incbin->maxlen)
+ fprintf(f, "nil (unlimited)");
+ else
+ yasm_expr_print(incbin->maxlen, f);
+ fprintf(f, "\n");
+}
+
+static void
+bc_incbin_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc)
+{
+ bytecode_incbin *incbin = (bytecode_incbin *)bc->contents;
+ yasm_value val;
+
+ if (yasm_value_finalize_expr(&val, incbin->start, 0))
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("start expression too complex"));
+ else if (val.rel)
+ yasm_error_set(YASM_ERROR_NOT_ABSOLUTE,
+ N_("start expression not absolute"));
+ incbin->start = val.abs;
+
+ if (yasm_value_finalize_expr(&val, incbin->maxlen, 0))
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("maximum length expression too complex"));
+ else if (val.rel)
+ yasm_error_set(YASM_ERROR_NOT_ABSOLUTE,
+ N_("maximum length expression not absolute"));
+ incbin->maxlen = val.abs;
+}
+
+static int
+bc_incbin_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
+ void *add_span_data)
+{
+ bytecode_incbin *incbin = (bytecode_incbin *)bc->contents;
+ FILE *f;
+ /*@dependent@*/ /*@null@*/ const yasm_intnum *num;
+ unsigned long start = 0, maxlen = 0xFFFFFFFFUL, flen;
+
+ /* Try to convert start to integer value */
+ if (incbin->start) {
+ num = yasm_expr_get_intnum(&incbin->start, NULL);
+ if (num)
+ start = yasm_intnum_get_uint(num);
+ if (!num) {
+ /* FIXME */
+ yasm_error_set(YASM_ERROR_NOT_IMPLEMENTED,
+ N_("incbin does not yet understand non-constant"));
+ return -1;
+ }
+ }
+
+ /* Try to convert maxlen to integer value */
+ if (incbin->maxlen) {
+ num = yasm_expr_get_intnum(&incbin->maxlen, NULL);
+ if (num)
+ maxlen = yasm_intnum_get_uint(num);
+ if (!num) {
+ /* FIXME */
+ yasm_error_set(YASM_ERROR_NOT_IMPLEMENTED,
+ N_("incbin does not yet understand non-constant"));
+ return -1;
+ }
+ }
+
+ /* FIXME: Search include path for filename. Save full path back into
+ * filename if save is true.
+ */
+
+ /* Open file and determine its length */
+ f = fopen(incbin->filename, "rb");
+ if (!f) {
+ yasm_error_set(YASM_ERROR_IO,
+ N_("`incbin': unable to open file `%s'"),
+ incbin->filename);
+ return -1;
+ }
+ if (fseek(f, 0L, SEEK_END) < 0) {
+ yasm_error_set(YASM_ERROR_IO,
+ N_("`incbin': unable to seek on file `%s'"),
+ incbin->filename);
+ return -1;
+ }
+ flen = (unsigned long)ftell(f);
+ fclose(f);
+
+ /* Compute length of incbin from start, maxlen, and len */
+ if (start > flen) {
+ yasm_warn_set(YASM_WARN_GENERAL,
+ N_("`incbin': start past end of file `%s'"),
+ incbin->filename);
+ start = flen;
+ }
+ flen -= start;
+ if (incbin->maxlen)
+ if (maxlen < flen)
+ flen = maxlen;
+ bc->len += flen;
+ return 0;
+}
+
+static int
+bc_incbin_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ /*@unused@*/ yasm_output_reloc_func output_reloc)
+{
+ bytecode_incbin *incbin = (bytecode_incbin *)bc->contents;
+ FILE *f;
+ /*@dependent@*/ /*@null@*/ const yasm_intnum *num;
+ unsigned long start = 0;
+
+ /* Convert start to integer value */
+ if (incbin->start) {
+ num = yasm_expr_get_intnum(&incbin->start, NULL);
+ if (!num)
+ yasm_internal_error(
+ N_("could not determine start in bc_tobytes_incbin"));
+ start = yasm_intnum_get_uint(num);
+ }
+
+ /* Open file */
+ f = fopen(incbin->filename, "rb");
+ if (!f) {
+ yasm_error_set(YASM_ERROR_IO, N_("`incbin': unable to open file `%s'"),
+ incbin->filename);
+ return 1;
+ }
+
+ /* Seek to start of data */
+ if (fseek(f, (long)start, SEEK_SET) < 0) {
+ yasm_error_set(YASM_ERROR_IO,
+ N_("`incbin': unable to seek on file `%s'"),
+ incbin->filename);
+ fclose(f);
+ return 1;
+ }
+
+ /* Read len bytes */
+ if (fread(*bufp, 1, (size_t)bc->len, f) < (size_t)bc->len) {
+ yasm_error_set(YASM_ERROR_IO,
+ N_("`incbin': unable to read %lu bytes from file `%s'"),
+ bc->len, incbin->filename);
+ fclose(f);
+ return 1;
+ }
+
+ *bufp += bc->len;
+ fclose(f);
+ return 0;
+}
+
+yasm_bytecode *
+yasm_bc_create_incbin(char *filename, yasm_expr *start, yasm_expr *maxlen,
+ unsigned long line)
+{
+ bytecode_incbin *incbin = yasm_xmalloc(sizeof(bytecode_incbin));
+
+ /*@-mustfree@*/
+ incbin->filename = filename;
+ incbin->start = start;
+ incbin->maxlen = maxlen;
+ /*@=mustfree@*/
+
+ return yasm_bc_create_common(&bc_incbin_callback, incbin, line);
+}
diff --git a/libyasm/bc-insn.c b/libyasm/bc-insn.c
new file mode 100644
index 00000000..4d3afacb
--- /dev/null
+++ b/libyasm/bc-insn.c
@@ -0,0 +1,348 @@
+/*
+ * Insn bytecode
+ *
+ * Copyright (C) 2005-2006 Peter Johnson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#define YASM_LIB_INTERNAL
+#include "util.h"
+/*@unused@*/ RCSID("$Id$");
+
+#include "coretype.h"
+
+#include "errwarn.h"
+#include "expr.h"
+#include "value.h"
+
+#include "bytecode.h"
+#include "arch.h"
+
+#include "bc-int.h"
+
+
+typedef struct bytecode_insn {
+ /*@dependent@*/ yasm_arch *arch;
+ unsigned long insn_data[4];
+
+ int num_operands;
+ /*@null@*/ yasm_insn_operands operands;
+
+ /* array of 4-element prefix_data arrays */
+ int num_prefixes;
+ /*@null@*/ unsigned long **prefixes;
+
+ /* array of segment prefixes */
+ int num_segregs;
+ /*@null@*/ unsigned long *segregs;
+} bytecode_insn;
+
+static void bc_insn_destroy(void *contents);
+static void bc_insn_print(const void *contents, FILE *f, int indent_level);
+static void bc_insn_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc);
+static int bc_insn_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
+ void *add_span_data);
+static int bc_insn_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ /*@null@*/ yasm_output_reloc_func output_reloc);
+
+static const yasm_bytecode_callback bc_insn_callback = {
+ bc_insn_destroy,
+ bc_insn_print,
+ bc_insn_finalize,
+ bc_insn_calc_len,
+ yasm_bc_expand_common,
+ bc_insn_tobytes,
+ 0
+};
+
+
+yasm_immval *
+yasm_imm_create_expr(yasm_expr *e)
+{
+ yasm_immval *im = yasm_xmalloc(sizeof(yasm_immval));
+
+ if (yasm_value_finalize_expr(&im->val, e, 0))
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("immediate expression too complex"));
+ im->sign = 0;
+
+ return im;
+}
+
+const yasm_expr *
+yasm_ea_get_disp(const yasm_effaddr *ea)
+{
+ return ea->disp.abs;
+}
+
+void
+yasm_ea_set_len(yasm_effaddr *ptr, unsigned int len)
+{
+ if (!ptr)
+ return;
+
+ /* Currently don't warn if length truncated, as this is called only from
+ * an explicit override, where we expect the user knows what they're doing.
+ */
+
+ ptr->disp.size = (unsigned char)len;
+}
+
+void
+yasm_ea_set_nosplit(yasm_effaddr *ptr, unsigned int nosplit)
+{
+ if (!ptr)
+ return;
+
+ ptr->nosplit = (unsigned char)nosplit;
+}
+
+void
+yasm_ea_set_strong(yasm_effaddr *ptr, unsigned int strong)
+{
+ if (!ptr)
+ return;
+
+ ptr->strong = (unsigned char)strong;
+}
+
+void
+yasm_ea_set_segreg(yasm_effaddr *ea, unsigned long segreg)
+{
+ if (!ea)
+ return;
+
+ if (segreg != 0 && ea->segreg != 0)
+ yasm_warn_set(YASM_WARN_GENERAL,
+ N_("multiple segment overrides, using leftmost"));
+
+ ea->segreg = segreg;
+}
+
+/*@-nullstate@*/
+void
+yasm_ea_destroy(yasm_effaddr *ea)
+{
+ ea->callback->destroy(ea);
+ yasm_value_delete(&ea->disp);
+ yasm_xfree(ea);
+}
+/*@=nullstate@*/
+
+/*@-nullstate@*/
+void
+yasm_ea_print(const yasm_effaddr *ea, FILE *f, int indent_level)
+{
+ fprintf(f, "%*sDisp:\n", indent_level, "");
+ yasm_value_print(&ea->disp, f, indent_level+1);
+ fprintf(f, "%*sNoSplit=%u\n", indent_level, "", (unsigned int)ea->nosplit);
+ ea->callback->print(ea, f, indent_level);
+}
+/*@=nullstate@*/
+
+static void
+bc_insn_destroy(void *contents)
+{
+ bytecode_insn *insn = (bytecode_insn *)contents;
+ if (insn->num_operands > 0)
+ yasm_ops_delete(&insn->operands, 0);
+ if (insn->num_prefixes > 0) {
+ int i;
+ for (i=0; i<insn->num_prefixes; i++)
+ yasm_xfree(insn->prefixes[i]);
+ yasm_xfree(insn->prefixes);
+ }
+ if (insn->num_segregs > 0)
+ yasm_xfree(insn->segregs);
+ yasm_xfree(contents);
+}
+
+static void
+bc_insn_print(const void *contents, FILE *f, int indent_level)
+{
+}
+
+static void
+bc_insn_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc)
+{
+ bytecode_insn *insn = (bytecode_insn *)bc->contents;
+ int i;
+ yasm_insn_operand *op;
+ yasm_error_class eclass;
+ char *str, *xrefstr;
+ unsigned long xrefline;
+
+ /* Simplify the operands' expressions first. */
+ for (i = 0, op = yasm_ops_first(&insn->operands);
+ op && i<insn->num_operands; op = yasm_operand_next(op), i++) {
+ /* Check operand type */
+ switch (op->type) {
+ case YASM_INSN__OPERAND_MEMORY:
+ /* Don't get over-ambitious here; some archs' memory expr
+ * parser are sensitive to the presence of *1, etc, so don't
+ * simplify reg*1 identities.
+ */
+ if (op->data.ea)
+ op->data.ea->disp.abs =
+ yasm_expr__level_tree(op->data.ea->disp.abs, 1, 1, 0,
+ NULL, NULL, NULL, NULL);
+ if (yasm_error_occurred()) {
+ /* Add a pointer to where it was used to the error */
+ yasm_error_fetch(&eclass, &str, &xrefline, &xrefstr);
+ if (xrefstr) {
+ yasm_error_set_xref(xrefline, "%s", xrefstr);
+ yasm_xfree(xrefstr);
+ }
+ if (str) {
+ yasm_error_set(eclass, "%s in memory expression", str);
+ yasm_xfree(str);
+ }
+ return;
+ }
+ break;
+ case YASM_INSN__OPERAND_IMM:
+ op->data.val =
+ yasm_expr__level_tree(op->data.val, 1, 1, 1, NULL, NULL,
+ NULL, NULL);
+ if (yasm_error_occurred()) {
+ /* Add a pointer to where it was used to the error */
+ yasm_error_fetch(&eclass, &str, &xrefline, &xrefstr);
+ if (xrefstr) {
+ yasm_error_set_xref(xrefline, "%s", xrefstr);
+ yasm_xfree(xrefstr);
+ }
+ if (str) {
+ yasm_error_set(eclass, "%s in immediate expression",
+ str);
+ yasm_xfree(str);
+ }
+ return;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ yasm_arch_finalize_insn(insn->arch, bc, prev_bc, insn->insn_data,
+ insn->num_operands, &insn->operands,
+ insn->num_prefixes, insn->prefixes,
+ insn->num_segregs, insn->segregs);
+}
+
+static int
+bc_insn_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
+ void *add_span_data)
+{
+ yasm_internal_error(N_("bc_insn_calc_len() is not implemented"));
+ /*@notreached@*/
+ return 0;
+}
+
+static int
+bc_insn_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ /*@unused@*/ yasm_output_reloc_func output_reloc)
+{
+ yasm_internal_error(N_("bc_insn_tobytes() is not implemented"));
+ /*@notreached@*/
+ return 1;
+}
+
+yasm_bytecode *
+yasm_bc_create_insn(yasm_arch *arch, const unsigned long insn_data[4],
+ int num_operands, /*@null@*/ yasm_insn_operands *operands,
+ unsigned long line)
+{
+ bytecode_insn *insn = yasm_xmalloc(sizeof(bytecode_insn));
+
+ insn->arch = arch;
+ insn->insn_data[0] = insn_data[0];
+ insn->insn_data[1] = insn_data[1];
+ insn->insn_data[2] = insn_data[2];
+ insn->insn_data[3] = insn_data[3];
+ insn->num_operands = num_operands;
+ if (operands)
+ insn->operands = *operands; /* structure copy */
+ else
+ yasm_ops_initialize(&insn->operands);
+ insn->num_prefixes = 0;
+ insn->prefixes = NULL;
+ insn->num_segregs = 0;
+ insn->segregs = NULL;
+
+ return yasm_bc_create_common(&bc_insn_callback, insn, line);
+}
+
+yasm_bytecode *
+yasm_bc_create_empty_insn(yasm_arch *arch, unsigned long line)
+{
+ bytecode_insn *insn = yasm_xmalloc(sizeof(bytecode_insn));
+
+ insn->arch = arch;
+ insn->insn_data[0] = 0;
+ insn->insn_data[1] = 0;
+ insn->insn_data[2] = 0;
+ insn->insn_data[3] = 0;
+ insn->num_operands = 0;
+ yasm_ops_initialize(&insn->operands);
+ insn->num_prefixes = 0;
+ insn->prefixes = NULL;
+ insn->num_segregs = 0;
+ insn->segregs = NULL;
+
+ return yasm_bc_create_common(&bc_insn_callback, insn, line);
+}
+
+void
+yasm_bc_insn_add_prefix(yasm_bytecode *bc, const unsigned long prefix_data[4])
+{
+ bytecode_insn *insn = (bytecode_insn *)bc->contents;
+
+ assert(bc->callback == bc_insn_callback);
+
+ insn->prefixes =
+ yasm_xrealloc(insn->prefixes,
+ (insn->num_prefixes+1)*sizeof(unsigned long *));
+ insn->prefixes[insn->num_prefixes] =
+ yasm_xmalloc(4*sizeof(unsigned long));
+ insn->prefixes[insn->num_prefixes][0] = prefix_data[0];
+ insn->prefixes[insn->num_prefixes][1] = prefix_data[1];
+ insn->prefixes[insn->num_prefixes][2] = prefix_data[2];
+ insn->prefixes[insn->num_prefixes][3] = prefix_data[3];
+ insn->num_prefixes++;
+}
+
+void
+yasm_bc_insn_add_seg_prefix(yasm_bytecode *bc, unsigned long segreg)
+{
+ bytecode_insn *insn = (bytecode_insn *)bc->contents;
+
+ assert(bc->callback == bc_insn_callback);
+
+ insn->segregs =
+ yasm_xrealloc(insn->segregs,
+ (insn->num_segregs+1)*sizeof(unsigned long));
+ insn->segregs[insn->num_segregs] = segreg;
+ insn->num_segregs++;
+}
diff --git a/libyasm/bc-int.h b/libyasm/bc-int.h
index 9bdea87c..a25eeb3b 100644
--- a/libyasm/bc-int.h
+++ b/libyasm/bc-int.h
@@ -27,34 +27,6 @@
#ifndef YASM_BC_INT_H
#define YASM_BC_INT_H
-typedef struct yasm_effaddr_callback {
- void (*destroy) (yasm_effaddr *ea);
- void (*print) (const yasm_effaddr *ea, FILE *f, int indent_level);
-} yasm_effaddr_callback;
-
-struct yasm_effaddr {
- const yasm_effaddr_callback *callback; /* callback functions */
-
- /*@only@*/ /*@null@*/ yasm_expr *disp; /* address displacement */
- unsigned long segreg; /* segment register override (0 if none) */
- unsigned char len; /* length of disp (in bytes), 0 if unknown,
- * 0xff if unknown and required to be >0.
- */
- unsigned char nosplit; /* 1 if reg*2 should not be split into
- reg+reg. (0 if not) */
- unsigned char strong; /* 1 if effective address is *definitely*
- * an effective address, e.g. in GAS if
- * expr(,1) form is used vs. just expr.
- */
-};
-
-struct yasm_immval {
- /*@only@*/ /*@null@*/ yasm_expr *val;
-
- unsigned char len; /* final length (in bytes), 0 if unknown */
- unsigned char sign; /* 1 if final imm is treated as signed */
-};
-
typedef struct yasm_bytecode_callback {
void (*destroy) (/*@only@*/ void *contents);
void (*print) (const void *contents, FILE *f, int indent_level);
@@ -64,8 +36,9 @@ typedef struct yasm_bytecode_callback {
int (*expand) (yasm_bytecode *bc, int span, long old_val, long new_val,
/*@out@*/ long *neg_thres, /*@out@*/ long *pos_thres);
int (*tobytes) (yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
+ yasm_output_value_func output_value,
/*@null@*/ yasm_output_reloc_func output_reloc);
+ int reserve; /* Reserve space instead of outputting data */
} yasm_bytecode_callback;
struct yasm_bytecode {
diff --git a/libyasm/bc-org.c b/libyasm/bc-org.c
new file mode 100644
index 00000000..27760192
--- /dev/null
+++ b/libyasm/bc-org.c
@@ -0,0 +1,147 @@
+/*
+ * ORG bytecode
+ *
+ * Copyright (C) 2005-2006 Peter Johnson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#define YASM_LIB_INTERNAL
+#include "util.h"
+/*@unused@*/ RCSID("$Id$");
+
+#include "coretype.h"
+#include "file.h"
+
+#include "errwarn.h"
+#include "intnum.h"
+#include "expr.h"
+#include "value.h"
+
+#include "bytecode.h"
+
+#include "bc-int.h"
+
+
+typedef struct bytecode_org {
+ unsigned long start; /* target starting offset within section */
+} bytecode_org;
+
+static void bc_org_destroy(void *contents);
+static void bc_org_print(const void *contents, FILE *f, int indent_level);
+static void bc_org_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc);
+static int bc_org_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
+ void *add_span_data);
+static int bc_org_expand(yasm_bytecode *bc, int span, long old_val,
+ long new_val, /*@out@*/ long *neg_thres,
+ /*@out@*/ long *pos_thres);
+static int bc_org_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ /*@null@*/ yasm_output_reloc_func output_reloc);
+
+static const yasm_bytecode_callback bc_org_callback = {
+ bc_org_destroy,
+ bc_org_print,
+ bc_org_finalize,
+ bc_org_calc_len,
+ bc_org_expand,
+ bc_org_tobytes,
+ 0
+};
+
+
+static void
+bc_org_destroy(void *contents)
+{
+ yasm_xfree(contents);
+}
+
+static void
+bc_org_print(const void *contents, FILE *f, int indent_level)
+{
+ const bytecode_org *org = (const bytecode_org *)contents;
+ fprintf(f, "%*s_Org_\n", indent_level, "");
+ fprintf(f, "%*sStart=%lu\n", indent_level, "", org->start);
+}
+
+static void
+bc_org_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc)
+{
+}
+
+static int
+bc_org_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
+ void *add_span_data)
+{
+ yasm_internal_error(N_("org not yet implemented"));
+#if 0
+ bytecode_org *org = (bytecode_org *)bc->contents;
+
+ /* Check for overrun */
+ if (bc->offset > org->start) {
+ yasm_error_set(YASM_ERROR_GENERAL,
+ N_("ORG overlap with already existing data"));
+ return YASM_BC_RESOLVE_ERROR | YASM_BC_RESOLVE_UNKNOWN_LEN;
+ }
+
+ /* Generate space to start offset */
+ bc->len = org->start - bc->offset;
+#endif
+ return 0;
+}
+
+static int
+bc_org_expand(yasm_bytecode *bc, int span, long old_val, long new_val,
+ /*@out@*/ long *neg_thres, /*@out@*/ long *pos_thres)
+{
+ yasm_internal_error(N_("org not yet implemented"));
+ return 0;
+}
+
+static int
+bc_org_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ /*@unused@*/ yasm_output_reloc_func output_reloc)
+{
+ bytecode_org *org = (bytecode_org *)bc->contents;
+ unsigned long len, i;
+
+ /* Sanity check for overrun */
+ if (bc->offset > org->start) {
+ yasm_error_set(YASM_ERROR_GENERAL,
+ N_("ORG overlap with already existing data"));
+ return 1;
+ }
+ len = org->start - bc->offset;
+ for (i=0; i<len; i++)
+ YASM_WRITE_8(*bufp, 0);
+ return 0;
+}
+
+yasm_bytecode *
+yasm_bc_create_org(unsigned long start, unsigned long line)
+{
+ bytecode_org *org = yasm_xmalloc(sizeof(bytecode_org));
+
+ org->start = start;
+
+ return yasm_bc_create_common(&bc_org_callback, org, line);
+}
diff --git a/libyasm/bc-reserve.c b/libyasm/bc-reserve.c
new file mode 100644
index 00000000..03280d18
--- /dev/null
+++ b/libyasm/bc-reserve.c
@@ -0,0 +1,158 @@
+/*
+ * Bytecode utility functions
+ *
+ * Copyright (C) 2001 Peter Johnson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#define YASM_LIB_INTERNAL
+#include "util.h"
+/*@unused@*/ RCSID("$Id$");
+
+#include "coretype.h"
+
+#include "errwarn.h"
+#include "intnum.h"
+#include "expr.h"
+#include "value.h"
+
+#include "bytecode.h"
+
+#include "bc-int.h"
+#include "expr-int.h"
+
+
+typedef struct bytecode_reserve {
+ /*@only@*/ /*@null@*/ yasm_expr *numitems; /* number of items to reserve */
+ unsigned char itemsize; /* size of each item (in bytes) */
+} bytecode_reserve;
+
+static void bc_reserve_destroy(void *contents);
+static void bc_reserve_print(const void *contents, FILE *f, int indent_level);
+static void bc_reserve_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc);
+static int bc_reserve_calc_len(yasm_bytecode *bc,
+ yasm_bc_add_span_func add_span,
+ void *add_span_data);
+static int bc_reserve_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ /*@null@*/ yasm_output_reloc_func output_reloc);
+
+static const yasm_bytecode_callback bc_reserve_callback = {
+ bc_reserve_destroy,
+ bc_reserve_print,
+ bc_reserve_finalize,
+ bc_reserve_calc_len,
+ yasm_bc_expand_common,
+ bc_reserve_tobytes,
+ 1
+};
+
+
+static void
+bc_reserve_destroy(void *contents)
+{
+ bytecode_reserve *reserve = (bytecode_reserve *)contents;
+ yasm_expr_destroy(reserve->numitems);
+ yasm_xfree(contents);
+}
+
+static void
+bc_reserve_print(const void *contents, FILE *f, int indent_level)
+{
+ const bytecode_reserve *reserve = (const bytecode_reserve *)contents;
+ fprintf(f, "%*s_Reserve_\n", indent_level, "");
+ fprintf(f, "%*sNum Items=", indent_level, "");
+ yasm_expr_print(reserve->numitems, f);
+ fprintf(f, "\n%*sItem Size=%u\n", indent_level, "",
+ (unsigned int)reserve->itemsize);
+}
+
+static void
+bc_reserve_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc)
+{
+ bytecode_reserve *reserve = (bytecode_reserve *)bc->contents;
+ yasm_value val;
+
+ if (yasm_value_finalize_expr(&val, reserve->numitems, 0))
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("reserve expression too complex"));
+ else if (val.rel)
+ yasm_error_set(YASM_ERROR_NOT_ABSOLUTE,
+ N_("reserve expression not absolute"));
+ else if (val.abs && yasm_expr__contains(val.abs, YASM_EXPR_FLOAT))
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("expression must not contain floating point value"));
+ reserve->numitems = val.abs;
+}
+
+static int
+bc_reserve_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
+ void *add_span_data)
+{
+ bytecode_reserve *reserve = (bytecode_reserve *)bc->contents;
+ /*@dependent@*/ /*@null@*/ const yasm_intnum *num;
+
+ if (!reserve->numitems)
+ return 0;
+
+ num = yasm_expr_get_intnum(&reserve->numitems, NULL);
+ if (!num) {
+ /* Check for use of floats first. */
+ if (reserve->numitems &&
+ yasm_expr__contains(reserve->numitems, YASM_EXPR_FLOAT)) {
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("expression must not contain floating point value"));
+ return -1;
+ }
+ /* FIXME: Non-constant currently not allowed. */
+ yasm_error_set(YASM_ERROR_NOT_CONSTANT,
+ N_("attempt to reserve non-constant quantity of space"));
+ return -1;
+ }
+
+ bc->len += yasm_intnum_get_uint(num)*reserve->itemsize;
+ return 0;
+}
+
+static int
+bc_reserve_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ /*@unused@*/ yasm_output_reloc_func output_reloc)
+{
+ yasm_internal_error(N_("bc_reserve_tobytes called"));
+ /*@notreached@*/
+ return 1;
+}
+
+yasm_bytecode *
+yasm_bc_create_reserve(yasm_expr *numitems, unsigned int itemsize,
+ unsigned long line)
+{
+ bytecode_reserve *reserve = yasm_xmalloc(sizeof(bytecode_reserve));
+
+ /*@-mustfree@*/
+ reserve->numitems = numitems;
+ /*@=mustfree@*/
+ reserve->itemsize = (unsigned char)itemsize;
+
+ return yasm_bc_create_common(&bc_reserve_callback, reserve, line);
+}
diff --git a/libyasm/bitvect.c b/libyasm/bitvect.c
index fe4a22d8..dd0d1b46 100644
--- a/libyasm/bitvect.c
+++ b/libyasm/bitvect.c
@@ -2093,7 +2093,7 @@ ErrCode BitVector_from_Enum(wordptr addr, charptr string)
N_word bits = bits_(addr);
N_word state = 1;
N_word token;
- N_word indx;
+ N_word indx = 0; /* silence compiler warning */
N_word start = 0; /* silence compiler warning */
if (bits > 0)
diff --git a/libyasm/bytecode.c b/libyasm/bytecode.c
index daffb2ba..e008da1a 100644
--- a/libyasm/bytecode.c
+++ b/libyasm/bytecode.c
@@ -29,333 +29,19 @@
/*@unused@*/ RCSID("$Id$");
#include "coretype.h"
-#include "file.h"
#include "errwarn.h"
#include "intnum.h"
#include "expr.h"
+#include "value.h"
+#include "symrec.h"
#include "bytecode.h"
-#include "arch.h"
-#include "objfmt.h"
-#include "dbgfmt.h"
#include "bc-int.h"
#include "expr-int.h"
-struct yasm_dataval {
- /*@reldef@*/ STAILQ_ENTRY(yasm_dataval) link;
-
- enum { DV_EMPTY, DV_EXPR, DV_STRING } type;
-
- union {
- /*@only@*/ yasm_expr *expn;
- struct {
- /*@only@*/ char *contents;
- size_t len;
- } str;
- } data;
-};
-
-/* Standard bytecode types */
-
-typedef struct bytecode_data {
- /* non-converted data (linked list) */
- yasm_datavalhead datahead;
-
- /* final (converted) size of each element (in bytes) */
- unsigned int size;
-
- /* append a zero byte after each element? */
- int append_zero;
-} bytecode_data;
-
-typedef struct bytecode_leb128 {
- /* source data (linked list) */
- yasm_datavalhead datahead;
-
- /* signedness (0=unsigned, 1=signed) */
- int sign;
-
- /* total length (calculated at finalize time) */
- unsigned long len;
-} bytecode_leb128;
-
-typedef struct bytecode_reserve {
- /*@only@*/ yasm_expr *numitems; /* number of items to reserve */
- unsigned char itemsize; /* size of each item (in bytes) */
-} bytecode_reserve;
-
-typedef struct bytecode_incbin {
- /*@only@*/ char *filename; /* file to include data from */
-
- /* starting offset to read from (NULL=0) */
- /*@only@*/ /*@null@*/ yasm_expr *start;
-
- /* maximum number of bytes to read (NULL=no limit) */
- /*@only@*/ /*@null@*/ yasm_expr *maxlen;
-} bytecode_incbin;
-
-typedef struct bytecode_align {
- /*@only@*/ yasm_expr *boundary; /* alignment boundary */
-
- /* What to fill intervening locations with, NULL if using code_fill */
- /*@only@*/ /*@null@*/ yasm_expr *fill;
-
- /* Maximum number of bytes to skip, NULL if no maximum. */
- /*@only@*/ /*@null@*/ yasm_expr *maxskip;
-
- /* Code fill, NULL if using 0 fill */
- /*@null@*/ const unsigned char **code_fill;
-} bytecode_align;
-
-typedef struct bytecode_org {
- unsigned long start; /* target starting offset within section */
-} bytecode_org;
-
-typedef struct bytecode_insn {
- /*@dependent@*/ yasm_arch *arch;
- unsigned long insn_data[4];
-
- int num_operands;
- /*@null@*/ yasm_insn_operands operands;
-
- /* array of 4-element prefix_data arrays */
- int num_prefixes;
- /*@null@*/ unsigned long **prefixes;
-
- /* array of segment prefixes */
- int num_segregs;
- /*@null@*/ unsigned long *segregs;
-} bytecode_insn;
-
-/* Standard bytecode callback function prototypes */
-
-static void bc_data_destroy(void *contents);
-static void bc_data_print(const void *contents, FILE *f, int indent_level);
-static int bc_data_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
- void *add_span_data);
-static int bc_data_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
- /*@null@*/ yasm_output_reloc_func output_reloc);
-
-static void bc_leb128_destroy(void *contents);
-static void bc_leb128_print(const void *contents, FILE *f, int indent_level);
-static void bc_leb128_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc);
-static int bc_leb128_calc_len(yasm_bytecode *bc,
- yasm_bc_add_span_func add_span,
- void *add_span_data);
-static int bc_leb128_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
- /*@null@*/ yasm_output_reloc_func output_reloc);
-
-static void bc_reserve_destroy(void *contents);
-static void bc_reserve_print(const void *contents, FILE *f, int indent_level);
-static int bc_reserve_calc_len(yasm_bytecode *bc,
- yasm_bc_add_span_func add_span,
- void *add_span_data);
-static int bc_reserve_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
- /*@null@*/ yasm_output_reloc_func output_reloc);
-
-static void bc_incbin_destroy(void *contents);
-static void bc_incbin_print(const void *contents, FILE *f, int indent_level);
-static int bc_incbin_calc_len(yasm_bytecode *bc,
- yasm_bc_add_span_func add_span,
- void *add_span_data);
-static int bc_incbin_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
- /*@null@*/ yasm_output_reloc_func output_reloc);
-
-static void bc_align_destroy(void *contents);
-static void bc_align_print(const void *contents, FILE *f, int indent_level);
-static void bc_align_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc);
-static int bc_align_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
- void *add_span_data);
-static int bc_align_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
- /*@null@*/ yasm_output_reloc_func output_reloc);
-
-static void bc_org_destroy(void *contents);
-static void bc_org_print(const void *contents, FILE *f, int indent_level);
-static int bc_org_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
- void *add_span_data);
-static int bc_org_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
- /*@null@*/ yasm_output_reloc_func output_reloc);
-
-static void bc_insn_destroy(void *contents);
-static void bc_insn_print(const void *contents, FILE *f, int indent_level);
-static void bc_insn_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc);
-static int bc_insn_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
- void *add_span_data);
-static int bc_insn_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
- /*@null@*/ yasm_output_reloc_func output_reloc);
-
-/* Standard bytecode callback structures */
-
-static const yasm_bytecode_callback bc_data_callback = {
- bc_data_destroy,
- bc_data_print,
- yasm_bc_finalize_common,
- bc_data_calc_len,
- yasm_bc_expand_common,
- bc_data_tobytes
-};
-
-static const yasm_bytecode_callback bc_leb128_callback = {
- bc_leb128_destroy,
- bc_leb128_print,
- bc_leb128_finalize,
- bc_leb128_calc_len,
- yasm_bc_expand_common,
- bc_leb128_tobytes
-};
-
-static const yasm_bytecode_callback bc_reserve_callback = {
- bc_reserve_destroy,
- bc_reserve_print,
- yasm_bc_finalize_common,
- bc_reserve_calc_len,
- yasm_bc_expand_common,
- bc_reserve_tobytes
-};
-
-static const yasm_bytecode_callback bc_incbin_callback = {
- bc_incbin_destroy,
- bc_incbin_print,
- yasm_bc_finalize_common,
- bc_incbin_calc_len,
- yasm_bc_expand_common,
- bc_incbin_tobytes
-};
-
-static const yasm_bytecode_callback bc_align_callback = {
- bc_align_destroy,
- bc_align_print,
- bc_align_finalize,
- bc_align_calc_len,
- yasm_bc_expand_common,
- bc_align_tobytes
-};
-
-static const yasm_bytecode_callback bc_org_callback = {
- bc_org_destroy,
- bc_org_print,
- yasm_bc_finalize_common,
- bc_org_calc_len,
- yasm_bc_expand_common,
- bc_org_tobytes
-};
-
-static const yasm_bytecode_callback bc_insn_callback = {
- bc_insn_destroy,
- bc_insn_print,
- bc_insn_finalize,
- bc_insn_calc_len,
- yasm_bc_expand_common,
- bc_insn_tobytes
-};
-
-/* Static structures for when NULL is passed to conversion functions. */
-/* for Convert*ToBytes() */
-unsigned char bytes_static[16];
-
-
-yasm_immval *
-yasm_imm_create_int(unsigned long int_val, unsigned long line)
-{
- return yasm_imm_create_expr(
- yasm_expr_create_ident(yasm_expr_int(yasm_intnum_create_uint(int_val)),
- line));
-}
-
-yasm_immval *
-yasm_imm_create_expr(yasm_expr *expr_ptr)
-{
- yasm_immval *im = yasm_xmalloc(sizeof(yasm_immval));
-
- im->val = expr_ptr;
- im->len = 0;
- im->sign = 0;
-
- return im;
-}
-
-const yasm_expr *
-yasm_ea_get_disp(const yasm_effaddr *ptr)
-{
- return ptr->disp;
-}
-
-void
-yasm_ea_set_len(yasm_effaddr *ptr, unsigned int len)
-{
- if (!ptr)
- return;
-
- /* Currently don't warn if length truncated, as this is called only from
- * an explicit override, where we expect the user knows what they're doing.
- */
-
- ptr->len = (unsigned char)len;
-}
-
-void
-yasm_ea_set_nosplit(yasm_effaddr *ptr, unsigned int nosplit)
-{
- if (!ptr)
- return;
-
- ptr->nosplit = (unsigned char)nosplit;
-}
-
-void
-yasm_ea_set_strong(yasm_effaddr *ptr, unsigned int strong)
-{
- if (!ptr)
- return;
-
- ptr->strong = (unsigned char)strong;
-}
-
-void
-yasm_ea_set_segreg(yasm_effaddr *ea, unsigned long segreg, unsigned long line)
-{
- if (!ea)
- return;
-
- if (segreg != 0 && ea->segreg != 0)
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("multiple segment overrides, using leftmost"));
-
- ea->segreg = segreg;
-}
-
-/*@-nullstate@*/
-void
-yasm_ea_destroy(yasm_effaddr *ea)
-{
- ea->callback->destroy(ea);
- yasm_expr_destroy(ea->disp);
- yasm_xfree(ea);
-}
-/*@=nullstate@*/
-
-/*@-nullstate@*/
-void
-yasm_ea_print(const yasm_effaddr *ea, FILE *f, int indent_level)
-{
- fprintf(f, "%*sDisp=", indent_level, "");
- yasm_expr_print(ea->disp, f);
- fprintf(f, "\n%*sLen=%u\n", indent_level, "", (unsigned int)ea->len);
- fprintf(f, "%*sNoSplit=%u\n", indent_level, "", (unsigned int)ea->nosplit);
- ea->callback->print(ea, f, indent_level);
-}
-/*@=nullstate@*/
-
void
yasm_bc_set_multiple(yasm_bytecode *bc, yasm_expr *e)
{
@@ -416,811 +102,6 @@ yasm_bc_create_common(const yasm_bytecode_callback *callback, void *contents,
return bc;
}
-static void
-bc_data_destroy(void *contents)
-{
- bytecode_data *bc_data = (bytecode_data *)contents;
- yasm_dvs_destroy(&bc_data->datahead);
- yasm_xfree(contents);
-}
-
-static void
-bc_data_print(const void *contents, FILE *f, int indent_level)
-{
- const bytecode_data *bc_data = (const bytecode_data *)contents;
- fprintf(f, "%*s_Data_\n", indent_level, "");
- fprintf(f, "%*sFinal Element Size=%u\n", indent_level+1, "", bc_data->size);
- fprintf(f, "%*sAppend Zero=%i\n", indent_level+1, "", bc_data->append_zero);
- fprintf(f, "%*sElements:\n", indent_level+1, "");
- yasm_dvs_print(&bc_data->datahead, f, indent_level+2);
-}
-
-static int
-bc_data_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
- void *add_span_data)
-{
- bytecode_data *bc_data = (bytecode_data *)bc->contents;
- yasm_dataval *dv;
- size_t slen;
-
- /* Count up element sizes, rounding up string length. */
- STAILQ_FOREACH(dv, &bc_data->datahead, link) {
- switch (dv->type) {
- case DV_EMPTY:
- break;
- case DV_EXPR:
- bc->len += bc_data->size;
- break;
- case DV_STRING:
- slen = dv->data.str.len;
- /* find count, rounding up to nearest multiple of size */
- slen = (slen + bc_data->size - 1) / bc_data->size;
- bc->len += slen*bc_data->size;
- break;
- }
- if (bc_data->append_zero)
- bc->len++;
- }
-
- return 0;
-}
-
-static int
-bc_data_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
- /*@unused@*/ yasm_output_reloc_func output_reloc)
-{
- bytecode_data *bc_data = (bytecode_data *)bc->contents;
- yasm_dataval *dv;
- size_t slen;
- size_t i;
- unsigned char *bufp_orig = *bufp;
-
- STAILQ_FOREACH(dv, &bc_data->datahead, link) {
- switch (dv->type) {
- case DV_EMPTY:
- break;
- case DV_EXPR:
- if (output_expr(&dv->data.expn, *bufp, bc_data->size,
- (size_t)(bc_data->size*8), 0,
- (unsigned long)(*bufp-bufp_orig), bc, 0, 1, d))
- return 1;
- *bufp += bc_data->size;
- break;
- case DV_STRING:
- slen = dv->data.str.len;
- memcpy(*bufp, dv->data.str.contents, slen);
- *bufp += slen;
- /* pad with 0's to nearest multiple of size */
- slen %= bc_data->size;
- if (slen > 0) {
- slen = bc_data->size-slen;
- for (i=0; i<slen; i++)
- YASM_WRITE_8(*bufp, 0);
- }
- break;
- }
- if (bc_data->append_zero)
- YASM_WRITE_8(*bufp, 0);
- }
-
- return 0;
-}
-
-yasm_bytecode *
-yasm_bc_create_data(yasm_datavalhead *datahead, unsigned int size,
- int append_zero, unsigned long line)
-{
- bytecode_data *data = yasm_xmalloc(sizeof(bytecode_data));
-
- data->datahead = *datahead;
- data->size = size;
- data->append_zero = append_zero;
-
- return yasm_bc_create_common(&bc_data_callback, data, line);
-}
-
-static void
-bc_leb128_destroy(void *contents)
-{
- bytecode_leb128 *bc_leb128 = (bytecode_leb128 *)contents;
- yasm_dvs_destroy(&bc_leb128->datahead);
- yasm_xfree(contents);
-}
-
-static void
-bc_leb128_print(const void *contents, FILE *f, int indent_level)
-{
- const bytecode_leb128 *bc_leb128 = (const bytecode_leb128 *)contents;
- fprintf(f, "%*s_Data_\n", indent_level, "");
- fprintf(f, "%*sSign=%u\n", indent_level+1, "",
- (unsigned int)bc_leb128->sign);
- fprintf(f, "%*sElements:\n", indent_level+1, "");
- yasm_dvs_print(&bc_leb128->datahead, f, indent_level+2);
-}
-
-static void
-bc_leb128_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc)
-{
- bytecode_leb128 *bc_leb128 = (bytecode_leb128 *)bc->contents;
- yasm_dataval *dv;
- /*@dependent@*/ /*@null@*/ yasm_intnum *intn;
-
- /* Only constant expressions are allowed.
- * Because of this, go ahead and calculate length.
- */
- bc_leb128->len = 0;
- STAILQ_FOREACH(dv, &bc_leb128->datahead, link) {
- switch (dv->type) {
- case DV_EMPTY:
- break;
- case DV_EXPR:
- intn = yasm_expr_get_intnum(&dv->data.expn, NULL);
- if (!intn) {
- yasm__error(bc->line,
- N_("LEB128 requires constant values"));
- return;
- }
- /* Warn for negative values in unsigned environment.
- * This could be an error instead: the likelihood this is
- * desired is very low!
- */
- if (yasm_intnum_sign(intn) == -1 && !bc_leb128->sign)
- yasm__warning(YASM_WARN_GENERAL, bc->line,
- N_("negative value in unsigned LEB128"));
- bc_leb128->len +=
- yasm_intnum_size_leb128(intn, bc_leb128->sign);
- break;
- case DV_STRING:
- yasm__error(bc->line,
- N_("LEB128 does not allow string constants"));
- return;
- }
- }
-}
-
-static int
-bc_leb128_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
- void *add_span_data)
-{
- bytecode_leb128 *bc_leb128 = (bytecode_leb128 *)bc->contents;
- bc->len += bc_leb128->len;
- return 0;
-}
-
-static int
-bc_leb128_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
- /*@unused@*/ yasm_output_reloc_func output_reloc)
-{
- bytecode_leb128 *bc_leb128 = (bytecode_leb128 *)bc->contents;
- yasm_dataval *dv;
- /*@dependent@*/ /*@null@*/ yasm_intnum *intn;
-
- STAILQ_FOREACH(dv, &bc_leb128->datahead, link) {
- switch (dv->type) {
- case DV_EMPTY:
- break;
- case DV_EXPR:
- intn = yasm_expr_get_intnum(&dv->data.expn, NULL);
- if (!intn)
- yasm_internal_error(N_("non-constant in leb128_tobytes"));
- *bufp += yasm_intnum_get_leb128(intn, *bufp, bc_leb128->sign);
- break;
- case DV_STRING:
- yasm_internal_error(N_("string in leb128_tobytes"));
- }
- }
-
- return 0;
-}
-
-yasm_bytecode *
-yasm_bc_create_leb128(yasm_datavalhead *datahead, int sign, unsigned long line)
-{
- bytecode_leb128 *leb128 = yasm_xmalloc(sizeof(bytecode_leb128));
-
- leb128->datahead = *datahead;
- leb128->sign = sign;
-
- return yasm_bc_create_common(&bc_leb128_callback, leb128, line);
-}
-
-static void
-bc_reserve_destroy(void *contents)
-{
- bytecode_reserve *reserve = (bytecode_reserve *)contents;
- yasm_expr_destroy(reserve->numitems);
- yasm_xfree(contents);
-}
-
-static void
-bc_reserve_print(const void *contents, FILE *f, int indent_level)
-{
- const bytecode_reserve *reserve = (const bytecode_reserve *)contents;
- fprintf(f, "%*s_Reserve_\n", indent_level, "");
- fprintf(f, "%*sNum Items=", indent_level, "");
- yasm_expr_print(reserve->numitems, f);
- fprintf(f, "\n%*sItem Size=%u\n", indent_level, "",
- (unsigned int)reserve->itemsize);
-}
-
-static int
-bc_reserve_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
- void *add_span_data)
-{
- bytecode_reserve *reserve = (bytecode_reserve *)bc->contents;
- /*@dependent@*/ /*@null@*/ const yasm_intnum *num;
-
- num = yasm_expr_get_intnum(&reserve->numitems, NULL);
- if (!num) {
- /* Check for use of floats first. */
- if (reserve->numitems &&
- yasm_expr__contains(reserve->numitems, YASM_EXPR_FLOAT)) {
- yasm__error(bc->line,
- N_("expression must not contain floating point value"));
- return -1;
- }
- /* FIXME: Non-constant currently not allowed. */
- yasm__error(bc->line,
- N_("attempt to reserve non-constant quantity of space"));
- return -1;
- }
-
- bc->len += yasm_intnum_get_uint(num)*reserve->itemsize;
- return 0;
-}
-
-static int
-bc_reserve_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
- /*@unused@*/ yasm_output_reloc_func output_reloc)
-{
- yasm_internal_error(N_("bc_reserve_tobytes called"));
- /*@notreached@*/
- return 1;
-}
-
-yasm_bytecode *
-yasm_bc_create_reserve(yasm_expr *numitems, unsigned int itemsize,
- unsigned long line)
-{
- bytecode_reserve *reserve = yasm_xmalloc(sizeof(bytecode_reserve));
-
- /*@-mustfree@*/
- reserve->numitems = numitems;
- /*@=mustfree@*/
- reserve->itemsize = (unsigned char)itemsize;
-
- return yasm_bc_create_common(&bc_reserve_callback, reserve, line);
-}
-
-static void
-bc_incbin_destroy(void *contents)
-{
- bytecode_incbin *incbin = (bytecode_incbin *)contents;
- yasm_xfree(incbin->filename);
- yasm_expr_destroy(incbin->start);
- yasm_expr_destroy(incbin->maxlen);
- yasm_xfree(contents);
-}
-
-static void
-bc_incbin_print(const void *contents, FILE *f, int indent_level)
-{
- const bytecode_incbin *incbin = (const bytecode_incbin *)contents;
- fprintf(f, "%*s_IncBin_\n", indent_level, "");
- fprintf(f, "%*sFilename=`%s'\n", indent_level, "",
- incbin->filename);
- fprintf(f, "%*sStart=", indent_level, "");
- if (!incbin->start)
- fprintf(f, "nil (0)");
- else
- yasm_expr_print(incbin->start, f);
- fprintf(f, "%*sMax Len=", indent_level, "");
- if (!incbin->maxlen)
- fprintf(f, "nil (unlimited)");
- else
- yasm_expr_print(incbin->maxlen, f);
- fprintf(f, "\n");
-}
-
-static int
-bc_incbin_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
- void *add_span_data)
-{
- bytecode_incbin *incbin = (bytecode_incbin *)bc->contents;
- FILE *f;
- /*@dependent@*/ /*@null@*/ const yasm_intnum *num;
- unsigned long start = 0, maxlen = 0xFFFFFFFFUL, flen;
-
- /* Try to convert start to integer value */
- if (incbin->start) {
- num = yasm_expr_get_intnum(&incbin->start, NULL);
- if (num)
- start = yasm_intnum_get_uint(num);
- if (!num) {
- /* FIXME */
- yasm__error(bc->line,
- N_("incbin does not yet understand non-constant"));
- return -1;
- }
- }
-
- /* Try to convert maxlen to integer value */
- if (incbin->maxlen) {
- num = yasm_expr_get_intnum(&incbin->maxlen, NULL);
- if (num)
- maxlen = yasm_intnum_get_uint(num);
- if (!num) {
- /* FIXME */
- yasm__error(bc->line,
- N_("incbin does not yet understand non-constant"));
- return -1;
- }
- }
-
- /* FIXME: Search include path for filename. Save full path back into
- * filename if save is true.
- */
-
- /* Open file and determine its length */
- f = fopen(incbin->filename, "rb");
- if (!f) {
- yasm__error(bc->line, N_("`incbin': unable to open file `%s'"),
- incbin->filename);
- return -1;
- }
- if (fseek(f, 0L, SEEK_END) < 0) {
- yasm__error(bc->line, N_("`incbin': unable to seek on file `%s'"),
- incbin->filename);
- return -1;
- }
- flen = (unsigned long)ftell(f);
- fclose(f);
-
- /* Compute length of incbin from start, maxlen, and len */
- if (start > flen) {
- yasm__error(bc->line, N_("`incbin': start past end of file `%s'"),
- incbin->filename);
- return -1;
- }
- flen -= start;
- if (incbin->maxlen)
- if (maxlen < flen)
- flen = maxlen;
- bc->len += flen;
-
- return 0;
-}
-
-static int
-bc_incbin_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
- /*@unused@*/ yasm_output_reloc_func output_reloc)
-{
- bytecode_incbin *incbin = (bytecode_incbin *)bc->contents;
- FILE *f;
- /*@dependent@*/ /*@null@*/ const yasm_intnum *num;
- unsigned long start = 0;
-
- /* Convert start to integer value */
- if (incbin->start) {
- num = yasm_expr_get_intnum(&incbin->start, NULL);
- if (!num)
- yasm_internal_error(
- N_("could not determine start in bc_tobytes_incbin"));
- start = yasm_intnum_get_uint(num);
- }
-
- /* Open file */
- f = fopen(incbin->filename, "rb");
- if (!f) {
- yasm__error(bc->line, N_("`incbin': unable to open file `%s'"),
- incbin->filename);
- return 1;
- }
-
- /* Seek to start of data */
- if (fseek(f, (long)start, SEEK_SET) < 0) {
- yasm__error(bc->line, N_("`incbin': unable to seek on file `%s'"),
- incbin->filename);
- fclose(f);
- return 1;
- }
-
- /* Read len bytes */
- if (fread(*bufp, 1, (size_t)bc->len, f) < (size_t)bc->len) {
- yasm__error(bc->line,
- N_("`incbin': unable to read %lu bytes from file `%s'"),
- bc->len, incbin->filename);
- fclose(f);
- return 1;
- }
-
- *bufp += bc->len;
- fclose(f);
- return 0;
-}
-
-yasm_bytecode *
-yasm_bc_create_incbin(char *filename, yasm_expr *start, yasm_expr *maxlen,
- unsigned long line)
-{
- bytecode_incbin *incbin = yasm_xmalloc(sizeof(bytecode_incbin));
-
- /*@-mustfree@*/
- incbin->filename = filename;
- incbin->start = start;
- incbin->maxlen = maxlen;
- /*@=mustfree@*/
-
- return yasm_bc_create_common(&bc_incbin_callback, incbin, line);
-}
-
-static void
-bc_align_destroy(void *contents)
-{
- bytecode_align *align = (bytecode_align *)contents;
- if (align->fill)
- yasm_expr_destroy(align->fill);
- yasm_xfree(contents);
-}
-
-static void
-bc_align_print(const void *contents, FILE *f, int indent_level)
-{
- const bytecode_align *align = (const bytecode_align *)contents;
- fprintf(f, "%*s_Align_\n", indent_level, "");
- fprintf(f, "%*sBoundary=", indent_level, "");
- yasm_expr_print(align->boundary, f);
- fprintf(f, "\n%*sFill=", indent_level, "");
- yasm_expr_print(align->fill, f);
- fprintf(f, "\n%*sMax Skip=", indent_level, "");
- yasm_expr_print(align->maxskip, f);
- fprintf(f, "\n");
-}
-
-static void
-bc_align_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc)
-{
- bytecode_align *align = (bytecode_align *)bc->contents;
- if (!yasm_expr_get_intnum(&align->boundary, NULL))
- yasm__error(bc->line, N_("align boundary must be a constant"));
- if (align->fill && !yasm_expr_get_intnum(&align->fill, NULL))
- yasm__error(bc->line, N_("align fill must be a constant"));
- if (align->maxskip && !yasm_expr_get_intnum(&align->maxskip, NULL))
- yasm__error(bc->line, N_("align maximum skip must be a constant"));
-}
-
-static int
-bc_align_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
- void *add_span_data)
-{
- yasm_internal_error(N_("align not yet implemented"));
- /*
- bytecode_align *align = (bytecode_align *)bc->contents;
- unsigned long end;
- unsigned long boundary =
- yasm_intnum_get_uint(yasm_expr_get_intnum(&align->boundary, NULL));
-
- if (boundary == 0) {
- bc->len = 0;
- return YASM_BC_RESOLVE_MIN_LEN;
- }
-
- end = bc->offset;
- if (bc->offset & (boundary-1))
- end = (bc->offset & ~(boundary-1)) + boundary;
-
- bc->len = end - bc->offset;
-
- if (align->maxskip) {
- unsigned long maxskip =
- yasm_intnum_get_uint(yasm_expr_get_intnum(&align->maxskip, NULL));
- if ((end - bc->offset) > maxskip)
- bc->len = 0;
- }
- return YASM_BC_RESOLVE_MIN_LEN;
- */
- return 0;
-}
-
-static int
-bc_align_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
- /*@unused@*/ yasm_output_reloc_func output_reloc)
-{
- bytecode_align *align = (bytecode_align *)bc->contents;
- unsigned long len;
- unsigned long boundary =
- yasm_intnum_get_uint(yasm_expr_get_intnum(&align->boundary, NULL));
-
- if (boundary == 0)
- return 0;
- else {
- unsigned long end = bc->offset;
- if (bc->offset & (boundary-1))
- end = (bc->offset & ~(boundary-1)) + boundary;
- len = end - bc->offset;
- if (len == 0)
- return 0;
- if (align->maxskip) {
- unsigned long maxskip =
- yasm_intnum_get_uint(yasm_expr_get_intnum(&align->maxskip,
- NULL));
- if (len > maxskip)
- return 0;
- }
- }
-
- if (align->fill) {
- unsigned long v;
- v = yasm_intnum_get_uint(yasm_expr_get_intnum(&align->fill, NULL));
- memset(*bufp, (int)v, len);
- *bufp += len;
- } else if (align->code_fill) {
- unsigned long maxlen = 15;
- while (!align->code_fill[maxlen] && maxlen>0)
- maxlen--;
- if (maxlen == 0) {
- yasm__error(bc->line, N_("could not find any code alignment size"));
- return 1;
- }
-
- /* Fill with maximum code fill as much as possible */
- while (len > maxlen) {
- memcpy(*bufp, align->code_fill[maxlen], maxlen);
- *bufp += maxlen;
- len -= maxlen;
- }
-
- if (!align->code_fill[len]) {
- yasm__error(bc->line, N_("invalid alignment size %d"), len);
- return 1;
- }
- /* Handle rest of code fill */
- memcpy(*bufp, align->code_fill[len], len);
- *bufp += len;
- } else {
- /* Just fill with 0 */
- memset(*bufp, 0, len);
- *bufp += len;
- }
- return 0;
-}
-
-yasm_bytecode *
-yasm_bc_create_align(yasm_expr *boundary, yasm_expr *fill,
- yasm_expr *maxskip, const unsigned char **code_fill,
- unsigned long line)
-{
- bytecode_align *align = yasm_xmalloc(sizeof(bytecode_align));
-
- align->boundary = boundary;
- align->fill = fill;
- align->maxskip = maxskip;
- align->code_fill = code_fill;
-
- return yasm_bc_create_common(&bc_align_callback, align, line);
-}
-
-static void
-bc_org_destroy(void *contents)
-{
- yasm_xfree(contents);
-}
-
-static void
-bc_org_print(const void *contents, FILE *f, int indent_level)
-{
- const bytecode_org *org = (const bytecode_org *)contents;
- fprintf(f, "%*s_Org_\n", indent_level, "");
- fprintf(f, "%*sStart=%lu\n", indent_level, "", org->start);
-}
-
-static int
-bc_org_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
- void *add_span_data)
-{
- yasm_internal_error(N_("org not yet implemented"));
-#if 0
- bytecode_org *org = (bytecode_org *)bc->contents;
-
- /* Check for overrun */
- if (bc->offset > org->start) {
- yasm__error(bc->line, N_("ORG overlap with already existing data"));
- return YASM_BC_RESOLVE_ERROR | YASM_BC_RESOLVE_UNKNOWN_LEN;
- }
-
- /* Generate space to start offset */
- bc->len = org->start - bc->offset;
- return YASM_BC_RESOLVE_MIN_LEN;
-#endif
- return 0;
-}
-
-static int
-bc_org_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
- /*@unused@*/ yasm_output_reloc_func output_reloc)
-{
- bytecode_org *org = (bytecode_org *)bc->contents;
- unsigned long len, i;
-
- /* Sanity check for overrun */
- if (bc->offset > org->start) {
- yasm__error(bc->line, N_("ORG overlap with already existing data"));
- return 1;
- }
- len = org->start - bc->offset;
- for (i=0; i<len; i++)
- YASM_WRITE_8(*bufp, 0);
- return 0;
-}
-
-yasm_bytecode *
-yasm_bc_create_org(unsigned long start, unsigned long line)
-{
- bytecode_org *org = yasm_xmalloc(sizeof(bytecode_org));
-
- org->start = start;
-
- return yasm_bc_create_common(&bc_org_callback, org, line);
-}
-
-static void
-bc_insn_destroy(void *contents)
-{
- bytecode_insn *insn = (bytecode_insn *)contents;
- if (insn->num_operands > 0)
- yasm_ops_delete(&insn->operands, 0);
- if (insn->num_prefixes > 0) {
- int i;
- for (i=0; i<insn->num_prefixes; i++)
- yasm_xfree(insn->prefixes[i]);
- yasm_xfree(insn->prefixes);
- }
- if (insn->num_segregs > 0)
- yasm_xfree(insn->segregs);
- yasm_xfree(contents);
-}
-
-static void
-bc_insn_print(const void *contents, FILE *f, int indent_level)
-{
-}
-
-static void
-bc_insn_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc)
-{
- bytecode_insn *insn = (bytecode_insn *)bc->contents;
- int i;
- yasm_insn_operand *op;
-
- /* Simplify the operands' expressions first. */
- for (i = 0, op = yasm_ops_first(&insn->operands);
- op && i<insn->num_operands; op = yasm_operand_next(op), i++) {
- /* Check operand type */
- switch (op->type) {
- case YASM_INSN__OPERAND_MEMORY:
- /* Don't get over-ambitious here; some archs' memory expr
- * parser are sensitive to the presence of *1, etc, so don't
- * simplify identities.
- */
- if (op->data.ea)
- op->data.ea->disp =
- yasm_expr__level_tree(op->data.ea->disp, 1, 0, NULL,
- NULL, NULL, NULL);
- break;
- case YASM_INSN__OPERAND_IMM:
- op->data.val = yasm_expr_simplify(op->data.val, NULL);
- break;
- default:
- break;
- }
- }
-
- yasm_arch_finalize_insn(insn->arch, bc, prev_bc, insn->insn_data,
- insn->num_operands, &insn->operands,
- insn->num_prefixes, insn->prefixes,
- insn->num_segregs, insn->segregs);
-}
-
-static int
-bc_insn_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
- void *add_span_data)
-{
- yasm_internal_error(N_("bc_insn_calc_len() is not implemented"));
- /*@notreached@*/
- return 0;
-}
-
-static int
-bc_insn_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
- /*@unused@*/ yasm_output_reloc_func output_reloc)
-{
- yasm_internal_error(N_("bc_insn_tobytes() is not implemented"));
- /*@notreached@*/
- return 1;
-}
-
-yasm_bytecode *
-yasm_bc_create_insn(yasm_arch *arch, const unsigned long insn_data[4],
- int num_operands, /*@null@*/ yasm_insn_operands *operands,
- unsigned long line)
-{
- bytecode_insn *insn = yasm_xmalloc(sizeof(bytecode_insn));
-
- insn->arch = arch;
- insn->insn_data[0] = insn_data[0];
- insn->insn_data[1] = insn_data[1];
- insn->insn_data[2] = insn_data[2];
- insn->insn_data[3] = insn_data[3];
- insn->num_operands = num_operands;
- if (operands)
- insn->operands = *operands; /* structure copy */
- insn->num_prefixes = 0;
- insn->prefixes = NULL;
- insn->num_segregs = 0;
- insn->segregs = NULL;
-
- return yasm_bc_create_common(&bc_insn_callback, insn, line);
-}
-
-yasm_bytecode *
-yasm_bc_create_empty_insn(yasm_arch *arch, unsigned long line)
-{
- bytecode_insn *insn = yasm_xmalloc(sizeof(bytecode_insn));
-
- insn->arch = arch;
- insn->insn_data[0] = 0;
- insn->insn_data[1] = 0;
- insn->insn_data[2] = 0;
- insn->insn_data[3] = 0;
- insn->num_operands = 0;
- insn->num_prefixes = 0;
- insn->prefixes = NULL;
- insn->num_segregs = 0;
- insn->segregs = NULL;
-
- return yasm_bc_create_common(&bc_insn_callback, insn, line);
-}
-
-void
-yasm_bc_insn_add_prefix(yasm_bytecode *bc, const unsigned long prefix_data[4])
-{
- bytecode_insn *insn = (bytecode_insn *)bc->contents;
-
- assert(bc->callback == bc_insn_callback);
-
- insn->prefixes =
- yasm_xrealloc(insn->prefixes,
- (insn->num_prefixes+1)*sizeof(unsigned long *));
- insn->prefixes[insn->num_prefixes] =
- yasm_xmalloc(4*sizeof(unsigned long));
- insn->prefixes[insn->num_prefixes][0] = prefix_data[0];
- insn->prefixes[insn->num_prefixes][1] = prefix_data[1];
- insn->prefixes[insn->num_prefixes][2] = prefix_data[2];
- insn->prefixes[insn->num_prefixes][3] = prefix_data[3];
- insn->num_prefixes++;
-}
-
-void
-yasm_bc_insn_add_seg_prefix(yasm_bytecode *bc, unsigned long segreg)
-{
- bytecode_insn *insn = (bytecode_insn *)bc->contents;
-
- assert(bc->callback == bc_insn_callback);
-
- insn->segregs =
- yasm_xrealloc(insn->segregs,
- (insn->num_segregs+1)*sizeof(unsigned long));
- insn->segregs[insn->num_segregs] = segreg;
- insn->num_segregs++;
-}
-
yasm_section *
yasm_bc_get_section(yasm_bytecode *bc)
{
@@ -1257,7 +138,8 @@ yasm_bc_destroy(yasm_bytecode *bc)
if (bc->callback)
bc->callback->destroy(bc->contents);
yasm_expr_destroy(bc->multiple);
- yasm_xfree(bc->symrecs);
+ if (bc->symrecs)
+ yasm_xfree(bc->symrecs);
yasm_xfree(bc);
}
@@ -1283,36 +165,36 @@ yasm_bc_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc)
{
if (bc->callback)
bc->callback->finalize(bc, prev_bc);
+ if (bc->multiple) {
+ yasm_value val;
+
+ if (yasm_value_finalize_expr(&val, bc->multiple, 0))
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("multiple expression too complex"));
+ else if (val.rel)
+ yasm_error_set(YASM_ERROR_NOT_ABSOLUTE,
+ N_("multiple expression not absolute"));
+ bc->multiple = val.abs;
+ }
}
/*@null@*/ yasm_intnum *
-yasm_common_calc_bc_dist(/*@null@*/ yasm_bytecode *precbc1,
- /*@null@*/ yasm_bytecode *precbc2)
+yasm_common_calc_bc_dist(yasm_bytecode *precbc1, yasm_bytecode *precbc2)
{
- unsigned int dist;
+ unsigned long dist;
yasm_intnum *intn;
- if (precbc2) {
- dist = precbc2->offset + precbc2->len;
- if (precbc1) {
- if (dist < precbc1->offset + precbc1->len) {
- intn = yasm_intnum_create_uint(precbc1->offset + precbc1->len
- - dist);
- yasm_intnum_calc(intn, YASM_EXPR_NEG, NULL, precbc1->line);
- return intn;
- }
- dist -= precbc1->offset + precbc1->len;
- }
- return yasm_intnum_create_uint(dist);
- } else {
- if (precbc1) {
- intn = yasm_intnum_create_uint(precbc1->offset + precbc1->len);
- yasm_intnum_calc(intn, YASM_EXPR_NEG, NULL, precbc1->line);
- return intn;
- } else {
- return yasm_intnum_create_uint(0);
- }
+ if (precbc1->section != precbc2->section)
+ return NULL;
+
+ dist = precbc2->offset + precbc2->len;
+ if (dist < precbc1->offset + precbc1->len) {
+ intn = yasm_intnum_create_uint(precbc1->offset + precbc1->len - dist);
+ yasm_intnum_calc(intn, YASM_EXPR_NEG, NULL);
+ return intn;
}
+ dist -= precbc1->offset + precbc1->len;
+ return yasm_intnum_create_uint(dist);
}
int
@@ -1335,7 +217,7 @@ yasm_bc_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
num = yasm_expr_get_intnum(&bc->multiple, NULL);
if (!num) {
if (yasm_expr__contains(bc->multiple, YASM_EXPR_FLOAT)) {
- yasm__error(bc->line,
+ yasm_error_set(YASM_ERROR_VALUE,
N_("expression must not contain floating point value"));
retval = -1;
} else {
@@ -1369,153 +251,72 @@ yasm_bc_expand(yasm_bytecode *bc, int span, long old_val, long new_val,
/*@null@*/ /*@only@*/ unsigned char *
yasm_bc_tobytes(yasm_bytecode *bc, unsigned char *buf, unsigned long *bufsize,
- /*@out@*/ unsigned long *multiple, /*@out@*/ int *gap,
- void *d, yasm_output_expr_func output_expr,
+ /*@out@*/ int *gap, void *d,
+ yasm_output_value_func output_value,
/*@null@*/ yasm_output_reloc_func output_reloc)
/*@sets *buf@*/
{
/*@only@*/ /*@null@*/ unsigned char *mybuf = NULL;
unsigned char *origbuf, *destbuf;
- /*@dependent@*/ /*@null@*/ const yasm_intnum *num;
- unsigned long datasize;
+ unsigned long datasize, multiple, i;
int error = 0;
- if (bc->multiple) {
- num = yasm_expr_get_intnum(&bc->multiple, NULL);
- if (!num)
- yasm_internal_error(
- N_("could not determine multiple in bc_tobytes"));
- if (yasm_intnum_sign(num) < 0) {
- yasm__error(bc->line, N_("multiple is negative"));
- *bufsize = 0;
- return NULL;
- }
- *multiple = yasm_intnum_get_uint(num);
- if (*multiple == 0) {
- *bufsize = 0;
- return NULL;
- }
- } else
- *multiple = 1;
-
- datasize = bc->len / (*multiple);
- *bufsize = datasize;
+ if (yasm_bc_get_multiple(bc, &multiple, NULL) || multiple == 0) {
+ *bufsize = 0;
+ return NULL;
+ }
/* special case for reserve bytecodes */
- if (bc->callback == &bc_reserve_callback) {
+ if (bc->callback->reserve) {
+ *bufsize = bc->len;
*gap = 1;
return NULL; /* we didn't allocate a buffer */
}
-
*gap = 0;
- if (*bufsize < datasize) {
+ if (*bufsize < bc->len) {
mybuf = yasm_xmalloc(bc->len);
- origbuf = mybuf;
destbuf = mybuf;
- } else {
- origbuf = buf;
+ } else
destbuf = buf;
- }
+
+ *bufsize = bc->len;
+ datasize = bc->len / multiple;
if (!bc->callback)
yasm_internal_error(N_("got empty bytecode in bc_tobytes"));
- else
- error = bc->callback->tobytes(bc, &destbuf, d, output_expr,
+ else for (i=0; i<multiple; i++) {
+ origbuf = destbuf;
+ error = bc->callback->tobytes(bc, &destbuf, d, output_value,
output_reloc);
- if (!error && ((unsigned long)(destbuf - origbuf) != datasize))
- yasm_internal_error(
- N_("written length does not match optimized length"));
- return mybuf;
-}
-
-yasm_dataval *
-yasm_dv_create_expr(yasm_expr *expn)
-{
- yasm_dataval *retval = yasm_xmalloc(sizeof(yasm_dataval));
-
- retval->type = DV_EXPR;
- retval->data.expn = expn;
-
- return retval;
-}
-
-yasm_dataval *
-yasm_dv_create_string(char *contents, size_t len)
-{
- yasm_dataval *retval = yasm_xmalloc(sizeof(yasm_dataval));
-
- retval->type = DV_STRING;
- retval->data.str.contents = contents;
- retval->data.str.len = len;
-
- return retval;
-}
-
-void
-yasm_dvs_destroy(yasm_datavalhead *headp)
-{
- yasm_dataval *cur, *next;
-
- cur = STAILQ_FIRST(headp);
- while (cur) {
- next = STAILQ_NEXT(cur, link);
- switch (cur->type) {
- case DV_EXPR:
- yasm_expr_destroy(cur->data.expn);
- break;
- case DV_STRING:
- yasm_xfree(cur->data.str.contents);
- break;
- default:
- break;
- }
- yasm_xfree(cur);
- cur = next;
+ if (!error && ((unsigned long)(destbuf - origbuf) != datasize))
+ yasm_internal_error(
+ N_("written length does not match optimized length"));
}
- STAILQ_INIT(headp);
-}
-yasm_dataval *
-yasm_dvs_append(yasm_datavalhead *headp, yasm_dataval *dv)
-{
- if (dv) {
- STAILQ_INSERT_TAIL(headp, dv, link);
- return dv;
- }
- return (yasm_dataval *)NULL;
+ return mybuf;
}
-void
-yasm_dvs_print(const yasm_datavalhead *head, FILE *f, int indent_level)
+int
+yasm_bc_get_multiple(yasm_bytecode *bc, unsigned long *multiple,
+ yasm_calc_bc_dist_func calc_bc_dist)
{
- yasm_dataval *cur;
+ /*@dependent@*/ /*@null@*/ const yasm_intnum *num;
- STAILQ_FOREACH(cur, head, link) {
- switch (cur->type) {
- case DV_EMPTY:
- fprintf(f, "%*sEmpty\n", indent_level, "");
- break;
- case DV_EXPR:
- fprintf(f, "%*sExpr=", indent_level, "");
- yasm_expr_print(cur->data.expn, f);
- fprintf(f, "\n");
- break;
- case DV_STRING:
- fprintf(f, "%*sLength=%lu\n", indent_level, "",
- (unsigned long)cur->data.str.len);
- fprintf(f, "%*sString=\"%s\"\n", indent_level, "",
- cur->data.str.contents);
- break;
+ *multiple = 1;
+ if (bc->multiple) {
+ num = yasm_expr_get_intnum(&bc->multiple, calc_bc_dist);
+ if (!num) {
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("could not determine multiple"));
+ return 1;
+ }
+ if (yasm_intnum_sign(num) < 0) {
+ yasm_error_set(YASM_ERROR_VALUE, N_("multiple is negative"));
+ return 1;
}
+ *multiple = yasm_intnum_get_uint(num);
}
-}
-
-/* Non-macro yasm_dvs_initialize() for non-YASM_LIB_INTERNAL users. */
-#undef yasm_dvs_initialize
-void
-yasm_dvs_initialize(yasm_datavalhead *headp)
-{
- STAILQ_INIT(headp);
+ return 0;
}
diff --git a/libyasm/bytecode.h b/libyasm/bytecode.h
index 8260c88e..181d1bb5 100644
--- a/libyasm/bytecode.h
+++ b/libyasm/bytecode.h
@@ -34,10 +34,52 @@
#ifndef YASM_BYTECODE_H
#define YASM_BYTECODE_H
-/** An effective address (opaque type). */
+/** An effective address. */
typedef struct yasm_effaddr yasm_effaddr;
-/** An immediate value (opaque type). */
-typedef struct yasm_immval yasm_immval;
+
+/** Callbacks for effective address implementations. */
+typedef struct yasm_effaddr_callback {
+ /** Destroy the effective address (freeing it).
+ * \param ea effective address
+ */
+ void (*destroy) (/*@only@*/ yasm_effaddr *ea);
+
+ /** Print the effective address.
+ * \param ea effective address
+ * \param f file to output to
+ * \param indent_level indentation level
+ */
+ void (*print) (const yasm_effaddr *ea, FILE *f, int indent_level);
+} yasm_effaddr_callback;
+
+/** An effective address. */
+struct yasm_effaddr {
+ const yasm_effaddr_callback *callback; /**< callback functions */
+
+ yasm_value disp; /**< address displacement */
+
+ unsigned long segreg; /**< segment register override (0 if none) */
+
+ unsigned char need_nonzero_len; /**< 1 if length of disp must be >0. */
+ unsigned char need_disp; /**< 1 if a displacement should be present
+ * in the output.
+ */
+ unsigned char nosplit; /**< 1 if reg*2 should not be split into
+ * reg+reg. (0 if not)
+ */
+ unsigned char strong; /**< 1 if effective address is *definitely*
+ * an effective address, e.g. in GAS if
+ * expr(,1) form is used vs. just expr.
+ */
+};
+
+/** An immediate value. */
+typedef struct yasm_immval {
+ yasm_value val; /**< the immediate value itself */
+
+ unsigned char sign; /**< 1 if final imm is treated as signed */
+} yasm_immval;
+
/** A data value (opaque type). */
typedef struct yasm_dataval yasm_dataval;
/** A list of data values (opaque type). */
@@ -47,14 +89,6 @@ typedef struct yasm_datavalhead yasm_datavalhead;
/*@reldef@*/ STAILQ_HEAD(yasm_datavalhead, yasm_dataval);
#endif
-/** Create an immediate value from an unsigned integer.
- * \param int_val unsigned integer
- * \param line virtual line (from yasm_linemap)
- * \return Newly allocated immediate value.
- */
-/*@only@*/ yasm_immval *yasm_imm_create_int(unsigned long int_val,
- unsigned long line);
-
/** Create an immediate value from an expression.
* \param e expression (kept, do not free).
* \return Newly allocated immediate value.
@@ -68,9 +102,9 @@ typedef struct yasm_datavalhead yasm_datavalhead;
/*@observer@*/ const yasm_expr *yasm_ea_get_disp(const yasm_effaddr *ea);
/** Set the length of the displacement portion of an effective address.
- * The length is specified in bytes.
+ * The length is specified in bits.
* \param ea effective address
- * \param len length in bytes
+ * \param len length in bits
*/
void yasm_ea_set_len(yasm_effaddr *ea, unsigned int len);
@@ -99,10 +133,8 @@ void yasm_ea_set_strong(yasm_effaddr *ea, unsigned int strong);
* addresses. A override of an override will result in a warning.
* \param ea effective address
* \param segreg segment register (0 if none)
- * \param line virtual line number
*/
-void yasm_ea_set_segreg(yasm_effaddr *ea, unsigned long segreg,
- unsigned long line);
+void yasm_ea_set_segreg(yasm_effaddr *ea, unsigned long segreg);
/** Delete (free allocated memory for) an effective address.
* \param ea effective address (only pointer to it).
@@ -129,12 +161,14 @@ void yasm_bc_set_multiple(yasm_bytecode *bc, /*@keep@*/ yasm_expr *e);
* \param size storage size (in bytes) for each data value
* \param append_zero append a single zero byte after each data value
* (if non-zero)
+ * \param arch architecture (optional); if provided, data items
+ * are directly simplified to bytes if possible
* \param line virtual line (from yasm_linemap)
* \return Newly allocated bytecode.
*/
/*@only@*/ yasm_bytecode *yasm_bc_create_data
(yasm_datavalhead *datahead, unsigned int size, int append_zero,
- unsigned long line);
+ /*@null@*/ yasm_arch *arch, unsigned long line);
/** Create a bytecode containing LEB128-encoded data value(s).
* \param datahead list of data values (kept, do not free)
@@ -270,20 +304,23 @@ void yasm_bc_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc);
* yasm_expr output functions.
* \see yasm_calc_bc_dist_func for parameter descriptions.
*/
-/*@null@*/ yasm_intnum *yasm_common_calc_bc_dist
- (/*@null@*/ yasm_bytecode *precbc1, /*@null@*/ yasm_bytecode *precbc2);
+/*@null@*/ /*@only@*/ yasm_intnum *yasm_common_calc_bc_dist
+ (yasm_bytecode *precbc1, yasm_bytecode *precbc2);
/**
- * \param critical dependent expression for bytecode expansion
+ * \param value dependent value for bytecode expansion
+ * \param origin_prevbc origin for distance computation to relative portion of
+ * value; value.rel and origin must be within the same
+ * section.
* \param neg_thres negative threshold for long/short decision
* \param pos_thres positive threshold for long/short decision
*/
typedef void (*yasm_bc_add_span_func)
- (void *add_span_data, yasm_bytecode *bc, int id,
- /*@only@*/ yasm_expr *dependent, long neg_thres, long pos_thres);
+ (void *add_span_data, yasm_bytecode *bc, int id, yasm_value *value,
+ /*@null@*/ yasm_bytecode *origin_prevbc, long neg_thres, long pos_thres);
/** Resolve EQUs in a bytecode and calculate its minimum size.
- * Returns dependent bytecode spans for cases where, if the length spanned
+ * Generates dependent bytecode spans for cases where, if the length spanned
* increases, it could cause the bytecode size to increase.
* Any bytecode multiple is NOT included in the length or spans generation;
* this must be handled at a higher level.
@@ -317,13 +354,11 @@ int yasm_bc_expand(yasm_bytecode *bc, int span, long old_val, long new_val,
* \param buf byte representation destination buffer
* \param bufsize size of buf (in bytes) prior to call; size of the
* generated data after call
- * \param multiple number of times the data should be duplicated when
- * written to the object file [output]
* \param gap if nonzero, indicates the data does not really need to
* exist in the object file; if nonzero, contents of buf
* are undefined [output]
- * \param d data to pass to each call to output_expr/output_reloc
- * \param output_expr function to call to convert expressions into their byte
+ * \param d data to pass to each call to output_value/output_reloc
+ * \param output_value function to call to convert values into their byte
* representation
* \param output_reloc function to call to output relocation entries
* for a single sym
@@ -336,11 +371,19 @@ int yasm_bc_expand(yasm_bytecode *bc, int span, long old_val, long new_val,
*/
/*@null@*/ /*@only@*/ unsigned char *yasm_bc_tobytes
(yasm_bytecode *bc, unsigned char *buf, unsigned long *bufsize,
- /*@out@*/ unsigned long *multiple, /*@out@*/ int *gap, void *d,
- yasm_output_expr_func output_expr,
+ /*@out@*/ int *gap, void *d, yasm_output_value_func output_value,
/*@null@*/ yasm_output_reloc_func output_reloc)
/*@sets *buf@*/;
+/** Get the bytecode multiple value as an unsigned long integer.
+ * \param bc bytecode
+ * \param multiple multiple value (output)
+ * \param calc_bc_dist bytecode distance calculation function (optional)
+ * \return 1 on error (set with yasm_error_set), 0 on success.
+ */
+int yasm_bc_get_multiple(yasm_bytecode *bc, /*@out@*/ unsigned long *multiple,
+ /*@null@*/ yasm_calc_bc_dist_func calc_bc_dist);
+
/** Create a new data value from an expression.
* \param expn expression
* \return Newly allocated data value.
@@ -348,12 +391,25 @@ int yasm_bc_expand(yasm_bytecode *bc, int span, long old_val, long new_val,
yasm_dataval *yasm_dv_create_expr(/*@keep@*/ yasm_expr *expn);
/** Create a new data value from a string.
- * \param contents string (raw, may contain NULs)
+ * \param contents string (may contain NULs)
* \param len length of string
* \return Newly allocated data value.
*/
yasm_dataval *yasm_dv_create_string(/*@keep@*/ char *contents, size_t len);
+/** Create a new data value from raw bytes data.
+ * \param contents raw data (may contain NULs)
+ * \param len length
+ * \return Newly allocated data value.
+ */
+yasm_dataval *yasm_dv_create_raw(/*@keep@*/ unsigned char *contents,
+ unsigned long len);
+
+#ifndef YASM_DOXYGEN
+#define yasm_dv_create_string(s, l) yasm_dv_create_raw((unsigned char *)(s), \
+ (unsigned long)(l))
+#endif
+
/** Initialize a list of data values.
* \param headp list of data values
*/
diff --git a/libyasm/coretype.h b/libyasm/coretype.h
index 80580b5a..89e5ed35 100644
--- a/libyasm/coretype.h
+++ b/libyasm/coretype.h
@@ -66,6 +66,11 @@ typedef struct yasm_assoc_data_callback {
void (*print) (void *data, FILE *f, int indent_level);
} yasm_assoc_data_callback;
+/** Set of collected error/warnings (opaque type).
+ * \see errwarn.h for details.
+ */
+typedef struct yasm_errwarns yasm_errwarns;
+
/** Bytecode (opaque type).
* \see bytecode.h for related functions.
* Define YASM_BC_INTERNAL to get visible internals.
@@ -96,6 +101,65 @@ typedef struct yasm_intnum yasm_intnum;
*/
typedef struct yasm_floatnum yasm_floatnum;
+/** A value. May be absolute or relative. Outside the parser, yasm_expr
+ * should only be used for absolute exprs. Anything that could contain
+ * a relocatable value should use this structure instead.
+ * \see value.h for related functions.
+ */
+typedef struct yasm_value {
+ /** The absolute portion of the value. May contain *differences* between
+ * symrecs but not standalone symrecs. May be NULL if there is no
+ * absolute portion (e.g. the absolute portion is 0).
+ */
+ /*@null@*/ /*@only@*/ yasm_expr *abs;
+
+ /** The relative portion of the value. This is the portion that may
+ * need to generate a relocation. May be NULL if no relative portion.
+ */
+ /*@null@*/ /*@dependent@*/ yasm_symrec *rel;
+
+ /** What the relative portion is in reference to. NULL if the default. */
+ /*@null@*/ /*@dependent@*/ yasm_symrec *wrt;
+
+ /** If the segment of the relative portion should be used, not the
+ * relative portion itself. Boolean.
+ */
+ unsigned int seg_of : 1;
+
+ /** If the relative portion of the value should be shifted right
+ * (supported only by a few object formats). If just the absolute portion
+ * should be shifted, that must be in the abs expr, not here!
+ */
+ unsigned int rshift : 7;
+
+ /** Indicates the relative portion of the value should be relocated
+ * relative to the current assembly position rather than relative to the
+ * section start. "Current assembly position" here refers to the starting
+ * address of the bytecode containing this value. Boolean.
+ */
+ unsigned int curpos_rel : 1;
+
+ /** Indicates that curpos_rel was set due to IP-relative relocation;
+ * in some objfmt/arch combinations (e.g. win64/x86-amd64) this info
+ * is needed to generate special relocations.
+ */
+ unsigned int ip_rel : 1;
+
+ /** Indicates the relative portion of the value should be relocated
+ * relative to its own section start rather than relative to the
+ * section start of the bytecode containing this value. E.g. the value
+ * resulting from the relative portion should be the offset from its
+ * section start. Boolean.
+ */
+ unsigned int section_rel : 1;
+
+ /** Size of the value, in bits. */
+ unsigned int size : 8;
+} yasm_value;
+
+/** Maximum value of #yasm_value.rshift */
+#define YASM_VALUE_RSHIFT_MAX 127
+
/** Line number mapping repository (opaque type). \see linemgr.h for related
* functions.
*/
@@ -131,12 +195,16 @@ typedef enum {
YASM_EXPR_OR, /**< Bitwise OR. */
YASM_EXPR_AND, /**< Bitwise AND. */
YASM_EXPR_XOR, /**< Bitwise XOR. */
+ YASM_EXPR_XNOR, /**< Bitwise XNOR. */
YASM_EXPR_NOR, /**< Bitwise NOR. */
YASM_EXPR_SHL, /**< Shift left (logical). */
YASM_EXPR_SHR, /**< Shift right (logical). */
YASM_EXPR_LOR, /**< Logical OR. */
YASM_EXPR_LAND, /**< Logical AND. */
YASM_EXPR_LNOT, /**< Logical negation. */
+ YASM_EXPR_LXOR, /**< Logical XOR. */
+ YASM_EXPR_LXNOR, /**< Logical XNOR. */
+ YASM_EXPR_LNOR, /**< Logical NOR. */
YASM_EXPR_LT, /**< Less than comparison. */
YASM_EXPR_GT, /**< Greater than comparison. */
YASM_EXPR_EQ, /**< Equality comparison. */
@@ -158,7 +226,8 @@ typedef enum {
YASM_SYM_LOCAL = 0, /**< Default, local only */
YASM_SYM_GLOBAL = 1 << 0, /**< If symbol is declared GLOBAL */
YASM_SYM_COMMON = 1 << 1, /**< If symbol is declared COMMON */
- YASM_SYM_EXTERN = 1 << 2 /**< If symbol is declared EXTERN */
+ YASM_SYM_EXTERN = 1 << 2, /**< If symbol is declared EXTERN */
+ YASM_SYM_DLOCAL = 1 << 3 /**< If symbol is explicitly declared LOCAL */
} yasm_sym_vis;
/** Determine the distance between the starting offsets of two bytecodes.
@@ -167,25 +236,21 @@ typedef enum {
* \return Distance in bytes between the two bytecodes (bc2-bc1), or NULL if
* the distance was indeterminate.
*/
-typedef /*@null@*/ yasm_intnum * (*yasm_calc_bc_dist_func)
+typedef /*@null@*/ /*@only@*/ yasm_intnum * (*yasm_calc_bc_dist_func)
(yasm_bytecode *precbc1, yasm_bytecode *precbc2);
-/** Convert yasm_expr to its byte representation. Usually implemented by
+/** Convert yasm_value to its byte representation. Usually implemented by
* object formats to keep track of relocations and verify legal expressions.
* Must put the value into the least significant bits of the destination,
* unless shifted into more significant bits by the shift parameter. The
* destination bits must be cleared before being set.
- * \param ep (double) pointer to expression
+ * \param value value
* \param buf buffer for byte representation
* \param destsize destination size (in bytes)
- * \param valsize size (in bits)
- * \param shift left shift (in bits); may be negative to specify right
- * shift (standard warnings include truncation to boundary)
* \param offset offset (in bytes) of the expr contents from the start
- * of the bytecode (sometimes needed for conditional jumps)
+ * of the bytecode (needed for relative)
* \param bc current bytecode (usually passed into higher-level
* calling function)
- * \param rel if nonzero, expr should be treated as PC/IP-relative
* \param warn enables standard warnings: zero for none;
* nonzero for overflow/underflow floating point warnings;
* negative for signed integer warnings,
@@ -194,10 +259,9 @@ typedef /*@null@*/ yasm_intnum * (*yasm_calc_bc_dist_func)
* function)
* \return Nonzero if an error occurred, 0 otherwise.
*/
-typedef int (*yasm_output_expr_func)
- (yasm_expr **ep, /*@out@*/ unsigned char *buf, size_t destsize,
- size_t valsize, int shift, unsigned long offset, yasm_bytecode *bc,
- int rel, int warn, /*@null@*/ void *d) /*@uses *ep@*/;
+typedef int (*yasm_output_value_func)
+ (yasm_value *value, /*@out@*/ unsigned char *buf, size_t destsize,
+ unsigned long offset, yasm_bytecode *bc, int warn, /*@null@*/ void *d);
/** Convert a symbol reference to its byte representation. Usually implemented
* by object formats and debug formats to keep track of relocations generated
diff --git a/libyasm/dbgfmt.h b/libyasm/dbgfmt.h
index e18182b3..8f767f7c 100644
--- a/libyasm/dbgfmt.h
+++ b/libyasm/dbgfmt.h
@@ -55,16 +55,13 @@ typedef struct yasm_dbgfmt_module {
/** Create debug format.
* Module-level implementation of yasm_dbgfmt_create().
* The filenames are provided solely for informational purposes.
- * \param in_filename primary input filename
- * \param obj_filename object filename
* \param object object
* \param of object format in use
* \param a architecture in use
* \return NULL if object format does not provide needed support.
*/
/*@null@*/ /*@only@*/ yasm_dbgfmt * (*create)
- (const char *in_filename, const char *obj_filename,
- yasm_object *object, yasm_objfmt *of, yasm_arch *a);
+ (yasm_object *object, yasm_objfmt *of, yasm_arch *a);
/** Module-level implementation of yasm_dbgfmt_destroy().
* Call yasm_dbgfmt_destroy() instead of calling this function.
@@ -75,12 +72,13 @@ typedef struct yasm_dbgfmt_module {
* Call yasm_dbgfmt_directive() instead of calling this function.
*/
int (*directive) (yasm_dbgfmt *dbgfmt, const char *name,
- yasm_valparamhead *valparams, unsigned long line);
+ yasm_section *sect, yasm_valparamhead *valparams,
+ unsigned long line);
/** Module-level implementation of yasm_dbgfmt_generate().
* Call yasm_dbgfmt_generate() instead of calling this function.
*/
- void (*generate) (yasm_dbgfmt *dbgfmt);
+ void (*generate) (yasm_dbgfmt *dbgfmt, yasm_errwarns *errwarns);
} yasm_dbgfmt_module;
/** Get the keyword used to select a debug format.
@@ -93,16 +91,13 @@ const char *yasm_dbgfmt_keyword(const yasm_dbgfmt *dbgfmt);
* format functions. The filenames are provided solely for informational
* purposes.
* \param module debug format module
- * \param in_filename primary input filename
- * \param obj_filename object filename
* \param object object to generate debugging information for
* \param of object format in use
* \param a architecture in use
* \return NULL if object format does not provide needed support.
*/
/*@null@*/ /*@only@*/ yasm_dbgfmt *yasm_dbgfmt_create
- (const yasm_dbgfmt_module *module, const char *in_filename,
- const char *obj_filename, yasm_object *object, yasm_objfmt *of,
+ (const yasm_dbgfmt_module *module, yasm_object *object, yasm_objfmt *of,
yasm_arch *a);
/** Cleans up any allocated debug format memory.
@@ -113,18 +108,22 @@ void yasm_dbgfmt_destroy(/*@only@*/ yasm_dbgfmt *dbgfmt);
/** DEBUG directive support.
* \param dbgfmt debug format
* \param name directive name
+ * \param sect current active section
* \param valparams value/parameters
* \param line virtual line (from yasm_linemap)
* \return Nonzero if directive was not recognized; 0 if directive was
* recognized even if it wasn't valid.
*/
int yasm_dbgfmt_directive(yasm_dbgfmt *dbgfmt, const char *name,
- yasm_valparamhead *valparams, unsigned long line);
+ yasm_section *sect, yasm_valparamhead *valparams,
+ unsigned long line);
/** Generate debugging information bytecodes.
* \param dbgfmt debug format
+ * \param errwarns error/warning set
+ * \note Errors and warnings are stored into errwarns.
*/
-void yasm_dbgfmt_generate(yasm_dbgfmt *dbgfmt);
+void yasm_dbgfmt_generate(yasm_dbgfmt *dbgfmt, yasm_errwarns *errwarns);
#ifndef YASM_DOXYGEN
@@ -133,16 +132,16 @@ void yasm_dbgfmt_generate(yasm_dbgfmt *dbgfmt);
#define yasm_dbgfmt_keyword(dbgfmt) \
(((yasm_dbgfmt_base *)dbgfmt)->module->keyword)
-#define yasm_dbgfmt_create(module, in_filename, obj_filename, object, of, a) \
- module->create(in_filename, obj_filename, object, of, a)
+#define yasm_dbgfmt_create(module, object, of, a) \
+ module->create(object, of, a)
#define yasm_dbgfmt_destroy(dbgfmt) \
((yasm_dbgfmt_base *)dbgfmt)->module->destroy(dbgfmt)
-#define yasm_dbgfmt_directive(dbgfmt, name, valparams, line) \
- ((yasm_dbgfmt_base *)dbgfmt)->module->directive(dbgfmt, name, valparams, \
- line)
-#define yasm_dbgfmt_generate(dbgfmt) \
- ((yasm_dbgfmt_base *)dbgfmt)->module->generate(dbgfmt)
+#define yasm_dbgfmt_directive(dbgfmt, name, sect, valparams, line) \
+ ((yasm_dbgfmt_base *)dbgfmt)->module->directive(dbgfmt, name, sect, \
+ valparams, line)
+#define yasm_dbgfmt_generate(dbgfmt, ews) \
+ ((yasm_dbgfmt_base *)dbgfmt)->module->generate(dbgfmt, ews)
#endif
diff --git a/libyasm/errwarn.c b/libyasm/errwarn.c
index e8c37905..44c73e89 100644
--- a/libyasm/errwarn.c
+++ b/libyasm/errwarn.c
@@ -55,34 +55,48 @@ static const char *def_gettext_hook(const char *msgid);
/*@exits@*/ void (*yasm_fatal) (const char *message, va_list va) = def_fatal;
const char * (*yasm_gettext_hook) (const char *msgid) = def_gettext_hook;
+/* Error indicator */
+/* yasm_eclass is not static so that yasm_error_occurred macro can access it */
+yasm_error_class yasm_eclass;
+static /*@only@*/ /*@null@*/ char *yasm_estr;
+static unsigned long yasm_exrefline;
+static /*@only@*/ /*@null@*/ char *yasm_exrefstr;
+
+/* Warning indicator */
+typedef struct warn {
+ /*@reldef@*/ STAILQ_ENTRY(warn) link;
+
+ yasm_warn_class wclass;
+ /*@owned@*/ /*@null@*/ char *wstr;
+} warn;
+static STAILQ_HEAD(, warn) yasm_warns;
+
/* Enabled warnings. See errwarn.h for a list. */
static unsigned long warn_class_enabled;
-/* Total error count */
-static unsigned int error_count;
-
-/* Total warning count */
-static unsigned int warning_count;
-
-typedef /*@reldef@*/ SLIST_HEAD(errwarndatahead_s, errwarn_data)
- errwarndatahead;
-static /*@only@*/ /*@null@*/ errwarndatahead errwarns;
-
typedef struct errwarn_data {
/*@reldef@*/ SLIST_ENTRY(errwarn_data) link;
enum { WE_UNKNOWN, WE_ERROR, WE_WARNING, WE_PARSERERROR } type;
unsigned long line;
- unsigned long displine;
-
- /* FIXME: This should not be a fixed size. But we don't have vasprintf()
- * right now. */
- char msg[MSG_MAXSIZE];
+ unsigned long xrefline;
+ /*@owned@*/ char *msg;
+ /*@owned@*/ char *xrefmsg;
} errwarn_data;
-/* Last inserted error/warning. Used to speed up insertions. */
-static /*@null@*/ errwarn_data *previous_we;
+struct yasm_errwarns {
+ /*@reldef@*/ SLIST_HEAD(, errwarn_data) errwarns;
+
+ /* Total error count */
+ unsigned int ecount;
+
+ /* Total warning count */
+ unsigned int wcount;
+
+ /* Last inserted error/warning. Used to speed up insertions. */
+ /*@null@*/ errwarn_data *previous_we;
+};
/* Static buffer for use by conv_unprint(). */
static char unprint[5];
@@ -103,24 +117,19 @@ yasm_errwarn_initialize(void)
(1UL<<YASM_WARN_PREPROC) | (0UL<<YASM_WARN_ORPHAN_LABEL) |
(1UL<<YASM_WARN_UNINIT_CONTENTS);
- error_count = 0;
- warning_count = 0;
- SLIST_INIT(&errwarns);
- previous_we = NULL;
+ yasm_eclass = YASM_ERROR_NONE;
+ yasm_estr = NULL;
+ yasm_exrefline = 0;
+ yasm_exrefstr = NULL;
+
+ STAILQ_INIT(&yasm_warns);
}
void
yasm_errwarn_cleanup(void)
{
- errwarn_data *we;
-
- /* Delete all error/warnings */
- while (!SLIST_EMPTY(&errwarns)) {
- we = SLIST_FIRST(&errwarns);
-
- SLIST_REMOVE_HEAD(&errwarns, link);
- yasm_xfree(we);
- }
+ yasm_error_clear();
+ yasm_warn_clear();
}
/* Convert a possibly unprintable character into a printable string, using
@@ -179,7 +188,7 @@ def_fatal(const char *fmt, va_list va)
* type is WE_PARSERERROR.
*/
static errwarn_data *
-errwarn_data_new(unsigned long line, unsigned long displine,
+errwarn_data_new(yasm_errwarns *errwarns, unsigned long line,
int replace_parser_error)
{
errwarn_data *first, *next, *ins_we, *we;
@@ -188,8 +197,8 @@ errwarn_data_new(unsigned long line, unsigned long displine,
/* Find the entry with either line=line or the last one with line<line.
* Start with the last entry added to speed the search.
*/
- ins_we = previous_we;
- first = SLIST_FIRST(&errwarns);
+ ins_we = errwarns->previous_we;
+ first = SLIST_FIRST(&errwarns->errwarns);
if (!ins_we || !first)
action = INS_HEAD;
while (action == INS_NONE) {
@@ -216,10 +225,12 @@ errwarn_data_new(unsigned long line, unsigned long displine,
we->type = WE_UNKNOWN;
we->line = line;
- we->displine = displine;
+ we->xrefline = 0;
+ we->msg = NULL;
+ we->xrefmsg = NULL;
if (action == INS_HEAD)
- SLIST_INSERT_HEAD(&errwarns, we, link);
+ SLIST_INSERT_HEAD(&errwarns->errwarns, we, link);
else if (action == INS_AFTER) {
assert(ins_we != NULL);
SLIST_INSERT_AFTER(ins_we, we, link);
@@ -228,114 +239,149 @@ errwarn_data_new(unsigned long line, unsigned long displine,
}
/* Remember previous err/warn */
- previous_we = we;
+ errwarns->previous_we = we;
return we;
}
-/* Register an error at line line, displaying line displine. Does not print
- * the error, only stores it for output_all() to print.
- */
void
-yasm__error_va_at(unsigned long line, unsigned long displine, const char *fmt,
- va_list va)
+yasm_error_clear(void)
{
- errwarn_data *we = errwarn_data_new(line, displine, 1);
+ if (yasm_estr)
+ yasm_xfree(yasm_estr);
+ if (yasm_exrefstr)
+ yasm_xfree(yasm_exrefstr);
+ yasm_eclass = YASM_ERROR_NONE;
+ yasm_estr = NULL;
+ yasm_exrefline = 0;
+ yasm_exrefstr = NULL;
+}
+
+int
+yasm_error_matches(yasm_error_class eclass)
+{
+ if (yasm_eclass == YASM_ERROR_NONE)
+ return eclass == YASM_ERROR_NONE;
+ if (yasm_eclass == YASM_ERROR_GENERAL)
+ return eclass == YASM_ERROR_GENERAL;
+ return (yasm_eclass & eclass) == eclass;
+}
- we->type = WE_ERROR;
+void
+yasm_error_set_va(yasm_error_class eclass, const char *format, va_list va)
+{
+ if (yasm_eclass != YASM_ERROR_NONE)
+ return;
+ yasm_eclass = eclass;
+ yasm_estr = yasm_xmalloc(MSG_MAXSIZE+1);
#ifdef HAVE_VSNPRINTF
- vsnprintf(we->msg, MSG_MAXSIZE, yasm_gettext_hook(fmt), va);
+ vsnprintf(yasm_estr, MSG_MAXSIZE, yasm_gettext_hook(format), va);
#else
- vsprintf(we->msg, yasm_gettext_hook(fmt), va);
+ vsprintf(yasm_estr, yasm_gettext_hook(format), va);
#endif
-
- error_count++;
}
-/* Register an warning at line line, displaying line displine. Does not print
- * the warning, only stores it for output_all() to print.
- */
void
-yasm__warning_va_at(yasm_warn_class num, unsigned long line,
- unsigned long displine, const char *fmt, va_list va)
+yasm_error_set(yasm_error_class eclass, const char *format, ...)
{
- errwarn_data *we;
-
- if (!(warn_class_enabled & (1UL<<num)))
- return; /* warning is part of disabled class */
+ va_list va;
+ va_start(va, format);
+ yasm_error_set_va(eclass, format, va);
+ va_end(va);
+}
- we = errwarn_data_new(line, displine, 0);
+void
+yasm_error_set_xref_va(unsigned long xrefline, const char *format, va_list va)
+{
+ if (yasm_eclass != YASM_ERROR_NONE)
+ return;
- we->type = WE_WARNING;
+ yasm_exrefline = xrefline;
+ yasm_exrefstr = yasm_xmalloc(MSG_MAXSIZE+1);
#ifdef HAVE_VSNPRINTF
- vsnprintf(we->msg, MSG_MAXSIZE, yasm_gettext_hook(fmt), va);
+ vsnprintf(yasm_exrefstr, MSG_MAXSIZE, yasm_gettext_hook(format), va);
#else
- vsprintf(we->msg, yasm_gettext_hook(fmt), va);
+ vsprintf(yasm_exrefstr, yasm_gettext_hook(format), va);
#endif
-
- warning_count++;
}
-/* Register an error at line line. Does not print the error, only stores it
- * for output_all() to print.
- */
void
-yasm__error(unsigned long line, const char *fmt, ...)
+yasm_error_set_xref(unsigned long xrefline, const char *format, ...)
{
va_list va;
- va_start(va, fmt);
- yasm__error_va_at(line, line, fmt, va);
+ va_start(va, format);
+ yasm_error_set_xref_va(xrefline, format, va);
va_end(va);
}
-/* Register an error at line line, displaying line displine. Does not print
- * the error, only stores it for output_all() to print.
- */
void
-yasm__error_at(unsigned long line, unsigned long displine, const char *fmt,
- ...)
+yasm_error_fetch(yasm_error_class *eclass, char **str, unsigned long *xrefline,
+ char **xrefstr)
{
- va_list va;
- va_start(va, fmt);
- yasm__error_va_at(line, displine, fmt, va);
- va_end(va);
+ *eclass = yasm_eclass;
+ *str = yasm_estr;
+ *xrefline = yasm_exrefline;
+ *xrefstr = yasm_exrefstr;
+ yasm_eclass = YASM_ERROR_NONE;
+ yasm_estr = NULL;
+ yasm_exrefline = 0;
+ yasm_exrefstr = NULL;
+}
+
+void yasm_warn_clear(void)
+{
+ /* Delete all error/warnings */
+ while (!STAILQ_EMPTY(&yasm_warns)) {
+ warn *w = STAILQ_FIRST(&yasm_warns);
+
+ if (w->wstr)
+ yasm_xfree(w->wstr);
+
+ STAILQ_REMOVE_HEAD(&yasm_warns, link);
+ yasm_xfree(w);
+ }
}
-/* Register an warning at line line. Does not print the warning, only stores
- * it for output_all() to print.
- */
void
-yasm__warning(yasm_warn_class num, unsigned long line, const char *fmt, ...)
+yasm_warn_set_va(yasm_warn_class wclass, const char *format, va_list va)
{
- va_list va;
- va_start(va, fmt);
- yasm__warning_va_at(num, line, line, fmt, va);
- va_end(va);
+ warn *w;
+
+ if (!(warn_class_enabled & (1UL<<wclass)))
+ return; /* warning is part of disabled class */
+
+ w = yasm_xmalloc(sizeof(warn));
+ w->wclass = wclass;
+ w->wstr = yasm_xmalloc(MSG_MAXSIZE+1);
+#ifdef HAVE_VSNPRINTF
+ vsnprintf(w->wstr, MSG_MAXSIZE, yasm_gettext_hook(format), va);
+#else
+ vsprintf(w->wstr, yasm_gettext_hook(format), va);
+#endif
+ STAILQ_INSERT_TAIL(&yasm_warns, w, link);
}
-/* Register an warning at line line, displaying line displine. Does not print
- * the warning, only stores it for output_all() to print.
- */
void
-yasm__warning_at(yasm_warn_class num, unsigned long line,
- unsigned long displine, const char *fmt, ...)
+yasm_warn_set(yasm_warn_class wclass, const char *format, ...)
{
va_list va;
- va_start(va, fmt);
- yasm__warning_va_at(num, line, line, fmt, va);
+ va_start(va, format);
+ yasm_warn_set_va(wclass, format, va);
va_end(va);
}
-/* Parser error handler. Moves YACC-style error into our error handling
- * system.
- */
void
-yasm__parser_error(unsigned long line, const char *s)
+yasm_warn_fetch(yasm_warn_class *wclass, char **str)
{
- yasm__error(line, N_("parser error: %s"), s);
- previous_we->type = WE_PARSERERROR;
+ warn *w = STAILQ_FIRST(&yasm_warns);
+
+ *wclass = w->wclass;
+ *str = w->wstr;
+
+ STAILQ_REMOVE_HEAD(&yasm_warns, link);
+ yasm_xfree(w);
}
void
@@ -356,18 +402,77 @@ yasm_warn_disable_all(void)
warn_class_enabled = 0;
}
+yasm_errwarns *
+yasm_errwarns_create(void)
+{
+ yasm_errwarns *errwarns = yasm_xmalloc(sizeof(yasm_errwarns));
+ SLIST_INIT(&errwarns->errwarns);
+ errwarns->ecount = 0;
+ errwarns->wcount = 0;
+ errwarns->previous_we = NULL;
+ return errwarns;
+}
+
+void
+yasm_errwarns_destroy(yasm_errwarns *errwarns)
+{
+ errwarn_data *we;
+
+ /* Delete all error/warnings */
+ while (!SLIST_EMPTY(&errwarns->errwarns)) {
+ we = SLIST_FIRST(&errwarns->errwarns);
+ if (we->msg)
+ yasm_xfree(we->msg);
+ if (we->xrefmsg)
+ yasm_xfree(we->xrefmsg);
+
+ SLIST_REMOVE_HEAD(&errwarns->errwarns, link);
+ yasm_xfree(we);
+ }
+
+ yasm_xfree(errwarns);
+}
+
+void
+yasm_errwarn_propagate(yasm_errwarns *errwarns, unsigned long line)
+{
+ if (yasm_eclass != YASM_ERROR_NONE) {
+ errwarn_data *we = errwarn_data_new(errwarns, line, 1);
+ yasm_error_class eclass;
+
+ yasm_error_fetch(&eclass, &we->msg, &we->xrefline, &we->xrefmsg);
+ if (eclass != YASM_ERROR_GENERAL
+ && (eclass & YASM_ERROR_PARSE) == YASM_ERROR_PARSE)
+ we->type = WE_PARSERERROR;
+ else
+ we->type = WE_ERROR;
+ errwarns->ecount++;
+ }
+
+ while (!STAILQ_EMPTY(&yasm_warns)) {
+ errwarn_data *we = errwarn_data_new(errwarns, line, 0);
+ yasm_warn_class wclass;
+
+ yasm_warn_fetch(&wclass, &we->msg);
+ we->type = WE_WARNING;
+ errwarns->wcount++;
+ }
+}
+
unsigned int
-yasm_get_num_errors(int warning_as_error)
+yasm_errwarns_num_errors(yasm_errwarns *errwarns, int warning_as_error)
{
if (warning_as_error)
- return error_count+warning_count;
+ return errwarns->ecount+errwarns->wcount;
else
- return error_count;
+ return errwarns->ecount;
}
void
-yasm_errwarn_output_all(yasm_linemap *lm, int warning_as_error,
- yasm_print_error_func print_error, yasm_print_warning_func print_warning)
+yasm_errwarns_output_all(yasm_errwarns *errwarns, yasm_linemap *lm,
+ int warning_as_error,
+ yasm_print_error_func print_error,
+ yasm_print_warning_func print_warning)
{
errwarn_data *we;
const char *filename;
@@ -376,16 +481,17 @@ yasm_errwarn_output_all(yasm_linemap *lm, int warning_as_error,
/* If we're treating warnings as errors, tell the user about it. */
if (warning_as_error && warning_as_error != 2) {
print_error("", 0,
- yasm_gettext_hook(N_("warnings being treated as errors")));
+ yasm_gettext_hook(N_("warnings being treated as errors")),
+ 0, NULL);
warning_as_error = 2;
}
/* Output error/warnings. */
- SLIST_FOREACH(we, &errwarns, link) {
+ SLIST_FOREACH(we, &errwarns->errwarns, link) {
/* Output error/warning */
- yasm_linemap_lookup(lm, we->displine, &filename, &line);
- if (we->type == WE_ERROR)
- print_error(filename, line, we->msg);
+ yasm_linemap_lookup(lm, we->line, &filename, &line);
+ if (we->type == WE_ERROR || we->type == WE_PARSERERROR)
+ print_error(filename, line, we->msg, we->xrefline, we->xrefmsg);
else
print_warning(filename, line, we->msg);
}
diff --git a/libyasm/errwarn.h b/libyasm/errwarn.h
index dc05f705..1a9e82f2 100644
--- a/libyasm/errwarn.h
+++ b/libyasm/errwarn.h
@@ -36,13 +36,35 @@
/** Warning classes (that may be enabled/disabled). */
typedef enum {
- YASM_WARN_GENERAL = 0, /**< Non-specific warnings */
+ YASM_WARN_NONE = 0, /**< No warning */
+ YASM_WARN_GENERAL, /**< Non-specific warnings */
YASM_WARN_UNREC_CHAR, /**< Unrecognized characters (while tokenizing) */
YASM_WARN_PREPROC, /**< Preprocessor warnings */
YASM_WARN_ORPHAN_LABEL, /**< Label alone on a line without a colon */
- YASM_WARN_UNINIT_CONTENTS /**< Uninitialized space in code/data section */
+ YASM_WARN_UNINIT_CONTENTS /**< Uninitialized space in code/data section */
} yasm_warn_class;
+/** Error classes. Bitmask-based to support limited subclassing. */
+typedef enum {
+ YASM_ERROR_NONE = 0x0000, /**< No error */
+ YASM_ERROR_GENERAL = 0xFFFF, /**< Non-specific */
+ YASM_ERROR_ARITHMETIC = 0x0001, /**< Arithmetic error (general) */
+ YASM_ERROR_OVERFLOW = 0x8001, /**< Arithmetic overflow */
+ YASM_ERROR_FLOATING_POINT = 0x4001, /**< Floating point error */
+ YASM_ERROR_ZERO_DIVISION = 0x2001, /**< Divide-by-zero */
+ YASM_ERROR_ASSERTION = 0x0002, /**< Assertion error */
+ YASM_ERROR_VALUE = 0x0004, /**< Value inappropriate
+ * (e.g. not in range) */
+ YASM_ERROR_NOT_ABSOLUTE = 0x8004, /**< Absolute expression required */
+ YASM_ERROR_TOO_COMPLEX = 0x4004, /**< Expression too complex */
+ YASM_ERROR_NOT_CONSTANT = 0x2004, /**< Constant expression required */
+ YASM_ERROR_IO = 0x0008, /**< I/O error */
+ YASM_ERROR_NOT_IMPLEMENTED = 0x0010, /**< Not implemented error */
+ YASM_ERROR_TYPE = 0x0020, /**< Type error */
+ YASM_ERROR_SYNTAX = 0x0040, /**< Syntax error */
+ YASM_ERROR_PARSE = 0x8040 /**< Parser error */
+} yasm_error_class;
+
/** Initialize any internal data structures. */
void yasm_errwarn_initialize(void);
@@ -85,101 +107,118 @@ extern /*@exits@*/ void (*yasm_fatal) (const char *message, va_list va);
*/
/*@exits@*/ void yasm__fatal(const char *message, ...);
-/** Log an error at a given line, displaying a different line. va_list version
- * of yasm__error_at().
- * \internal
- * \param line virtual line
- * \param displine displayed virtual line
- * \param message printf-like-format message
- * \param va argument list for message
+/** Unconditionally clear the error indicator, freeing any associated data.
+ * Has no effect if the error indicator is not set.
*/
-void yasm__error_va_at(unsigned long line, unsigned long displine,
- const char *message, va_list va);
+void yasm_error_clear(void);
-/** Log an error. va_list version of yasm__error().
- * \internal
- * \param line virtual line
- * \param message printf-like-format message
- * \param va argument list for message
+/** Get the error indicator. YASM_ERROR_NONE is returned if no error has
+ * been set. Note that as YASM_ERROR_NONE is 0, the return value can also
+ * be treated as a boolean value.
+ * \return Current error indicator.
*/
-#define yasm__error_va(line, message, va) \
- yasm__error_va_at(line, line, message, va)
+yasm_error_class yasm_error_occurred(void);
-/** Log a warning at a given line, displaying a different line. va_list
- * version of yasm__warning_at().
- * \internal
- * \param wclass warning class
- * \param line virtual line
- * \param displine displayed virtual line
- * \param message printf-like-format message
- * \param va argument list for message
+/** Check the error indicator against an error class. To check if any error
+ * has been set, check against the YASM_ERROR_GENERAL class. This function
+ * properly checks error subclasses.
+ * \param eclass base error class to check against
+ * \return Nonzero if error indicator is set and a subclass of eclass, 0
+ * otherwise.
*/
-void yasm__warning_va_at(yasm_warn_class wclass, unsigned long line,
- unsigned long displine, const char *message,
- va_list va);
+int yasm_error_matches(yasm_error_class eclass);
-/** Log a warning. va_list version of yasm__warning().
- * \internal
- * \param wclass warning class
- * \param line virtual line
- * \param message printf-like-format message
- * \param va argument list for message
+#ifndef YASM_DOXYGEN
+extern yasm_error_class yasm_eclass;
+#define yasm_error_occurred() yasm_eclass
+#endif
+
+/** Set the error indicator (va_list version). Has no effect if the error
+ * indicator is already set.
+ * \param eclass error class
+ * \param format printf format string
+ * \param va argument list for format
*/
-#define yasm__warning_va(wclass, line, message, va) \
- yasm__warning_va_at(wclass, line, line, message, va)
+void yasm_error_set_va(yasm_error_class eclass, const char *format, va_list va);
-/** Log an error. Does not print it out immediately; yasm_errwarn_output_all()
- * outputs errors and warnings.
- * \internal
- * \param line virtual line
- * \param message printf-like-format message
- * \param ... argument list for message
+/** Set the error indicator. Has no effect if the error indicator is already
+ * set.
+ * \param eclass error class
+ * \param format printf format string
+ * \param ... argument list for format
*/
-void yasm__error(unsigned long line, const char *message, ...)
+void yasm_error_set(yasm_error_class eclass, const char *format, ...)
/*@printflike@*/;
-/** Log an error at a given line, displaying a different line. Does not print
- * it out immediately; yasm_errwarn_output_all() outputs errors and warnings.
- * \internal
- * \param line virtual line
- * \param displine displayed virtual line
- * \param message printf-like-format message
- * \param ... argument list for message
+/** Set a cross-reference for a new error (va_list version). Has no effect
+ * if the error indicator is already set (e.g. with yasm_error_set()). This
+ * function must be called prior to its corresponding yasm_error_set() call.
+ * \param xrefline virtual line to cross-reference to (should not be 0)
+ * \param format printf format string
+ * \param va argument list for format
*/
-void yasm__error_at(unsigned long line, unsigned long displine,
- const char *message, ...) /*@printflike@*/;
+void yasm_error_set_xref_va(unsigned long xrefline, const char *format,
+ va_list va);
-/** Log a warning. Does not print it out immediately;
- * yasm_errwarn_output_all() outputs errors and warnings.
- * \internal
+/** Set a cross-reference for a new error. Has no effect if the error
+ * indicator is already set (e.g. with yasm_error_set()). This function
+ * must be called prior to its corresponding yasm_error_set() call.
+ * \param xrefline virtual line to cross-reference to (should not be 0)
+ * \param format printf format string
+ * \param ... argument list for format
+ */
+void yasm_error_set_xref(unsigned long xrefline, const char *format, ...)
+ /*@printflike@*/;
+
+/** Fetch the error indicator and all associated data. If the error
+ * indicator is set, the output pointers are set to the current error
+ * indicator values, and the error indicator is cleared.
+ * The code using this function is then responsible for yasm_xfree()'ing
+ * str and xrefstr (if non-NULL). If the error indicator is not set,
+ * all output values are set to 0 (including eclass, which is set to
+ * YASM_ERROR_NONE).
+ * \param eclass error class (output)
+ * \param str error message
+ * \param xrefline virtual line used for cross-referencing (0 if no xref)
+ * \param xrefstr cross-reference error message (NULL if no xref)
+ */
+void yasm_error_fetch(/*@out@*/ yasm_error_class *eclass,
+ /*@out@*/ /*@only@*/ /*@null@*/ char **str,
+ /*@out@*/ unsigned long *xrefline,
+ /*@out@*/ /*@only@*/ /*@null@*/ char **xrefstr);
+
+/** Unconditionally clear all warning indicators, freeing any associated data.
+ * Has no effect if no warning indicators have been set.
+ */
+void yasm_warn_clear(void);
+
+/** Add a warning indicator (va_list version).
* \param wclass warning class
- * \param line virtual line
- * \param message printf-like-format message
- * \param ... argument list for message
+ * \param format printf format string
+ * \param va argument list for format
*/
-void yasm__warning(yasm_warn_class wclass, unsigned long line,
- const char *message, ...) /*@printflike@*/;
+void yasm_warn_set_va(yasm_warn_class wclass, const char *format, va_list va);
-/** Log a warning at a given line, displaying a different line. Does not print
- * it out immediately; yasm_errwarn_output_all() outputs errors and warnings.
- * \internal
+/** Add a warning indicator.
* \param wclass warning class
- * \param line virtual line
- * \param displine displayed virtual line
- * \param message printf-like-format message
- * \param ... argument list for message
+ * \param format printf format string
+ * \param ... argument list for format
*/
-void yasm__warning_at(yasm_warn_class wclass, unsigned long line,
- unsigned long displine, const char *message, ...)
+void yasm_warn_set(yasm_warn_class wclass, const char *format, ...)
/*@printflike@*/;
-/** Log a parser error. Parser errors can be overwritten by non-parser errors
- * on the same line.
- * \internal
- * \param line virtual line
- * \param message parser error message
+/** Fetch the first warning indicator and all associated data. If there
+ * is at least one warning indicator, the output pointers are set to the
+ * first warning indicator values, and first warning indicator is removed.
+ * The code using this function is then responsible for yasm_xfree()'ing
+ * str and xrefstr (if non-NULL). If there is no warning indicator set,
+ * all output values are set to 0 (including wclass, which is set to
+ * YASM_WARN_NONE).
+ * \param wclass warning class (output)
+ * \param str warning message
*/
-void yasm__parser_error(unsigned long line, const char *message);
+void yasm_warn_fetch(/*@out@*/ yasm_warn_class *wclass,
+ /*@out@*/ /*@only@*/ char **str);
/** Enable a class of warnings.
* \param wclass warning class
@@ -194,11 +233,35 @@ void yasm_warn_disable(yasm_warn_class wclass);
/** Disable all classes of warnings. */
void yasm_warn_disable_all(void);
+/** Create an error/warning set for collection of multiple error/warnings.
+ * \return Newly allocated set.
+ */
+/*@only@*/ yasm_errwarns *yasm_errwarns_create(void);
+
+/** Destroy an error/warning set.
+ * \param errwarns error/warning set
+ */
+void yasm_errwarns_destroy(/*@only@*/ yasm_errwarns *errwarns);
+
+/** Propagate error indicator and warning indicator(s) to an error/warning set.
+ * Has no effect if the error indicator and warning indicator are not set.
+ * Does not print immediately; yasm_errwarn_output_all() outputs
+ * accumulated errors and warnings.
+ * Generally multiple errors on the same line will be reported, but errors
+ * of class YASM_ERROR_PARSE will get overwritten by any other class on the
+ * same line.
+ * \param errwarns error/warning set
+ * \param line virtual line
+ */
+void yasm_errwarn_propagate(yasm_errwarns *errwarns, unsigned long line);
+
/** Get total number of errors logged.
+ * \param errwarns error/warning set
* \param warning_as_error if nonzero, warnings are treated as errors.
* \return Number of errors.
*/
-unsigned int yasm_get_num_errors(int warning_as_error);
+unsigned int yasm_errwarns_num_errors(yasm_errwarns *errwarns,
+ int warning_as_error);
/** Print out an error.
* \param fn filename of source file
@@ -206,7 +269,8 @@ unsigned int yasm_get_num_errors(int warning_as_error);
* \param msg error message
*/
typedef void (*yasm_print_error_func)
- (const char *fn, unsigned long line, const char *msg);
+ (const char *fn, unsigned long line, const char *msg,
+ unsigned long xrefline, /*@null@*/ const char *xrefmsg);
/** Print out a warning.
* \param fn filename of source file
@@ -216,15 +280,16 @@ typedef void (*yasm_print_error_func)
typedef void (*yasm_print_warning_func)
(const char *fn, unsigned long line, const char *msg);
-/** Outputs all errors and warnings.
+/** Outputs error/warning set in sorted order (sorted by virtual line number).
+ * \param errwarns error/warning set
* \param lm line map (to convert virtual lines into filename/line pairs)
- * \param warning_as_error if nonzero, treat warnings as errors
+ * \param warning_as_error if nonzero, treat warnings as errors.
* \param print_error function called to print out errors
* \param print_warning function called to print out warnings
*/
-void yasm_errwarn_output_all
- (yasm_linemap *lm, int warning_as_error, yasm_print_error_func print_error,
- yasm_print_warning_func print_warning);
+void yasm_errwarns_output_all
+ (yasm_errwarns *errwarns, yasm_linemap *lm, int warning_as_error,
+ yasm_print_error_func print_error, yasm_print_warning_func print_warning);
/** Convert a possibly unprintable character into a printable string.
* \internal
diff --git a/libyasm/expr-int.h b/libyasm/expr-int.h
index a93b8282..456da9ca 100644
--- a/libyasm/expr-int.h
+++ b/libyasm/expr-int.h
@@ -34,7 +34,8 @@ typedef enum {
YASM_EXPR_INT = 1<<1,
YASM_EXPR_FLOAT = 1<<2,
YASM_EXPR_SYM = 1<<3,
- YASM_EXPR_EXPR = 1<<4
+ YASM_EXPR_SYMEXP = 1<<4, /* post-expanded sym (due to absolute expansion) */
+ YASM_EXPR_EXPR = 1<<5
} yasm_expr__type;
struct yasm_expr__item {
diff --git a/libyasm/expr.c b/libyasm/expr.c
index 164d0589..a0f55693 100644
--- a/libyasm/expr.c
+++ b/libyasm/expr.c
@@ -50,6 +50,12 @@ static int expr_traverse_nodes_post(/*@null@*/ yasm_expr *e,
int (*func) (/*@null@*/ yasm_expr *e,
/*@null@*/ void *d));
+/* Bitmap of used items. We should really never need more than 2 at a time,
+ * so 31 is pretty much overkill.
+ */
+static unsigned long itempool_used = 0;
+static yasm_expr__item itempool[31];
+
/* allocate a new expression node, with children as defined.
* If it's a unary operator, put the element in left and set right=NULL. */
/*@-compmempass@*/
@@ -58,6 +64,7 @@ yasm_expr_create(yasm_expr_op op, yasm_expr__item *left,
yasm_expr__item *right, unsigned long line)
{
yasm_expr *ptr, *sube;
+ unsigned long z;
ptr = yasm_xmalloc(sizeof(yasm_expr));
ptr->op = op;
@@ -66,7 +73,10 @@ yasm_expr_create(yasm_expr_op op, yasm_expr__item *left,
ptr->terms[1].type = YASM_EXPR_NONE;
if (left) {
ptr->terms[0] = *left; /* structure copy */
- yasm_xfree(left);
+ z = left-itempool;
+ if (z>=31)
+ yasm_internal_error(N_("could not find expritem in pool"));
+ itempool_used &= ~(1<<z);
ptr->numterms++;
/* Search downward until we find something *other* than an
@@ -86,7 +96,10 @@ yasm_expr_create(yasm_expr_op op, yasm_expr__item *left,
if (right) {
ptr->terms[1] = *right; /* structure copy */
- yasm_xfree(right);
+ z = right-itempool;
+ if (z>=31)
+ yasm_internal_error(N_("could not find expritem in pool"));
+ itempool_used &= ~(1<<z);
ptr->numterms++;
/* Search downward until we find something *other* than an
@@ -109,10 +122,26 @@ yasm_expr_create(yasm_expr_op op, yasm_expr__item *left,
/*@=compmempass@*/
/* helpers */
+static yasm_expr__item *
+expr_get_item(void)
+{
+ int z = 0;
+ unsigned long v = itempool_used & 0x7fffffff;
+
+ while (v & 1) {
+ v >>= 1;
+ z++;
+ }
+ if (z>=31)
+ yasm_internal_error(N_("too many expritems"));
+ itempool_used |= 1<<z;
+ return &itempool[z];
+}
+
yasm_expr__item *
yasm_expr_sym(yasm_symrec *s)
{
- yasm_expr__item *e = yasm_xmalloc(sizeof(yasm_expr__item));
+ yasm_expr__item *e = expr_get_item();
e->type = YASM_EXPR_SYM;
e->data.sym = s;
return e;
@@ -121,7 +150,7 @@ yasm_expr_sym(yasm_symrec *s)
yasm_expr__item *
yasm_expr_expr(yasm_expr *x)
{
- yasm_expr__item *e = yasm_xmalloc(sizeof(yasm_expr__item));
+ yasm_expr__item *e = expr_get_item();
e->type = YASM_EXPR_EXPR;
e->data.expn = x;
return e;
@@ -130,7 +159,7 @@ yasm_expr_expr(yasm_expr *x)
yasm_expr__item *
yasm_expr_int(yasm_intnum *i)
{
- yasm_expr__item *e = yasm_xmalloc(sizeof(yasm_expr__item));
+ yasm_expr__item *e = expr_get_item();
e->type = YASM_EXPR_INT;
e->data.intn = i;
return e;
@@ -139,7 +168,7 @@ yasm_expr_int(yasm_intnum *i)
yasm_expr__item *
yasm_expr_float(yasm_floatnum *f)
{
- yasm_expr__item *e = yasm_xmalloc(sizeof(yasm_expr__item));
+ yasm_expr__item *e = expr_get_item();
e->type = YASM_EXPR_FLOAT;
e->data.flt = f;
return e;
@@ -148,15 +177,14 @@ yasm_expr_float(yasm_floatnum *f)
yasm_expr__item *
yasm_expr_reg(unsigned long reg)
{
- yasm_expr__item *e = yasm_xmalloc(sizeof(yasm_expr__item));
+ yasm_expr__item *e = expr_get_item();
e->type = YASM_EXPR_REG;
e->data.reg = reg;
return e;
}
/* Transforms instances of symrec-symrec [symrec+(-1*symrec)] into integers if
- * possible. Also transforms single symrec's that reference absolute sections.
- * Uses a simple n^2 algorithm because n is usually quite small.
+ * possible. Uses a simple n^2 algorithm because n is usually quite small.
*/
static /*@only@*/ yasm_expr *
expr_xform_bc_dist(/*@returned@*/ /*@only@*/ yasm_expr *e,
@@ -168,24 +196,6 @@ expr_xform_bc_dist(/*@returned@*/ /*@only@*/ yasm_expr *e,
/*@null@*/ yasm_intnum *dist;
int numterms;
- for (i=0; i<e->numterms; i++) {
- /* Transform symrecs that reference absolute sections into
- * absolute start expr + intnum(dist).
- */
- if (e->terms[i].type == YASM_EXPR_SYM &&
- yasm_symrec_get_label(e->terms[i].data.sym, &precbc) &&
- (sect = yasm_bc_get_section(precbc)) &&
- yasm_section_is_absolute(sect) &&
- (dist = calc_bc_dist(yasm_section_bcs_first(sect), precbc))) {
- const yasm_expr *start = yasm_section_get_start(sect);
- e->terms[i].type = YASM_EXPR_EXPR;
- e->terms[i].data.expn =
- yasm_expr_create(YASM_EXPR_ADD,
- yasm_expr_expr(yasm_expr_copy(start)),
- yasm_expr_int(dist), e->line);
- }
- }
-
/* Handle symrec-symrec in ADD exprs by looking for (-1*symrec) and
* symrec term pairs (where both symrecs are in the same segment).
*/
@@ -208,10 +218,12 @@ expr_xform_bc_dist(/*@returned@*/ /*@only@*/ yasm_expr *e,
continue;
if (sube->terms[0].type == YASM_EXPR_INT &&
- sube->terms[1].type == YASM_EXPR_SYM) {
+ (sube->terms[1].type == YASM_EXPR_SYM ||
+ sube->terms[1].type == YASM_EXPR_SYMEXP)) {
intn = sube->terms[0].data.intn;
sym = sube->terms[1].data.sym;
- } else if (sube->terms[0].type == YASM_EXPR_SYM &&
+ } else if ((sube->terms[0].type == YASM_EXPR_SYM ||
+ sube->terms[0].type == YASM_EXPR_SYMEXP) &&
sube->terms[1].type == YASM_EXPR_INT) {
sym = sube->terms[0].data.sym;
intn = sube->terms[1].data.intn;
@@ -227,7 +239,8 @@ expr_xform_bc_dist(/*@returned@*/ /*@only@*/ yasm_expr *e,
/* Now look for a symrec term in the same segment */
for (j=0; j<e->numterms; j++) {
- if (e->terms[j].type == YASM_EXPR_SYM &&
+ if ((e->terms[j].type == YASM_EXPR_SYM ||
+ e->terms[j].type == YASM_EXPR_SYMEXP) &&
yasm_symrec_get_label(e->terms[j].data.sym, &precbc2) &&
(sect = yasm_bc_get_section(precbc2)) &&
sect == sect2 &&
@@ -320,8 +333,7 @@ expr_xform_neg_helper(/*@returned@*/ /*@only@*/ yasm_expr *e)
* floatnums present below; if there ARE floatnums, recurse.
*/
if (e->terms[0].type == YASM_EXPR_FLOAT)
- yasm_floatnum_calc(e->terms[0].data.flt, YASM_EXPR_NEG, NULL,
- e->line);
+ yasm_floatnum_calc(e->terms[0].data.flt, YASM_EXPR_NEG, NULL);
else if (e->terms[0].type == YASM_EXPR_EXPR &&
yasm_expr__contains(e->terms[0].data.expn, YASM_EXPR_FLOAT))
expr_xform_neg_helper(e->terms[0].data.expn);
@@ -389,8 +401,10 @@ expr_xform_neg(/*@returned@*/ /*@only@*/ yasm_expr *e)
static int
expr_is_constant(yasm_expr_op op, yasm_intnum *intn)
{
- return ((yasm_intnum_is_zero(intn) && op == YASM_EXPR_MUL) ||
- (yasm_intnum_is_zero(intn) && op == YASM_EXPR_AND) ||
+ int iszero = yasm_intnum_is_zero(intn);
+ return ((iszero && op == YASM_EXPR_MUL) ||
+ (iszero && op == YASM_EXPR_AND) ||
+ (iszero && op == YASM_EXPR_LAND) ||
(yasm_intnum_is_neg1(intn) && op == YASM_EXPR_OR));
}
@@ -398,24 +412,31 @@ expr_is_constant(yasm_expr_op op, yasm_intnum *intn)
static int
expr_can_destroy_int_left(yasm_expr_op op, yasm_intnum *intn)
{
+ int iszero = yasm_intnum_is_zero(intn);
return ((yasm_intnum_is_pos1(intn) && op == YASM_EXPR_MUL) ||
- (yasm_intnum_is_zero(intn) && op == YASM_EXPR_ADD) ||
+ (iszero && op == YASM_EXPR_ADD) ||
(yasm_intnum_is_neg1(intn) && op == YASM_EXPR_AND) ||
- (yasm_intnum_is_zero(intn) && op == YASM_EXPR_OR));
+ (!iszero && op == YASM_EXPR_LAND) ||
+ (iszero && op == YASM_EXPR_OR) ||
+ (iszero && op == YASM_EXPR_LOR));
}
/* Look for simple "right" identities like x+|-0, x*&/1 */
static int
expr_can_destroy_int_right(yasm_expr_op op, yasm_intnum *intn)
{
- return ((yasm_intnum_is_pos1(intn) && op == YASM_EXPR_MUL) ||
- (yasm_intnum_is_pos1(intn) && op == YASM_EXPR_DIV) ||
- (yasm_intnum_is_zero(intn) && op == YASM_EXPR_ADD) ||
- (yasm_intnum_is_zero(intn) && op == YASM_EXPR_SUB) ||
+ int iszero = yasm_intnum_is_zero(intn);
+ int ispos1 = yasm_intnum_is_pos1(intn);
+ return ((ispos1 && op == YASM_EXPR_MUL) ||
+ (ispos1 && op == YASM_EXPR_DIV) ||
+ (iszero && op == YASM_EXPR_ADD) ||
+ (iszero && op == YASM_EXPR_SUB) ||
(yasm_intnum_is_neg1(intn) && op == YASM_EXPR_AND) ||
- (yasm_intnum_is_zero(intn) && op == YASM_EXPR_OR) ||
- (yasm_intnum_is_zero(intn) && op == YASM_EXPR_SHL) ||
- (yasm_intnum_is_zero(intn) && op == YASM_EXPR_SHR));
+ (!iszero && op == YASM_EXPR_LAND) ||
+ (iszero && op == YASM_EXPR_OR) ||
+ (iszero && op == YASM_EXPR_LOR) ||
+ (iszero && op == YASM_EXPR_SHL) ||
+ (iszero && op == YASM_EXPR_SHR));
}
/* Check for and simplify identities. Returns new number of expr terms.
@@ -426,33 +447,46 @@ expr_can_destroy_int_right(yasm_expr_op op, yasm_intnum *intn)
* NOTE: Really designed to only be used by expr_level_op().
*/
static int
-expr_simplify_identity(yasm_expr *e, int numterms, int int_term)
+expr_simplify_identity(yasm_expr *e, int numterms, int int_term,
+ int simplify_reg_mul)
{
int i;
+ int save_numterms;
- /* Check for simple identities that delete the intnum.
- * Don't delete if the intnum is the only thing in the expn.
+ /* Don't do this step if it's 1*REG. Save and restore numterms so
+ * yasm_expr__contains() works correctly.
*/
- if ((int_term == 0 && numterms > 1 &&
- expr_can_destroy_int_left(e->op, e->terms[0].data.intn)) ||
- (int_term > 0 &&
- expr_can_destroy_int_right(e->op, e->terms[int_term].data.intn))) {
- /* Delete the intnum */
- yasm_intnum_destroy(e->terms[int_term].data.intn);
-
- /* Slide everything to its right over by 1 */
- if (int_term != numterms-1) /* if it wasn't last.. */
- memmove(&e->terms[int_term], &e->terms[int_term+1],
- (numterms-1-int_term)*sizeof(yasm_expr__item));
-
- /* Update numterms */
- numterms--;
+ save_numterms = e->numterms;
+ e->numterms = numterms;
+ if (simplify_reg_mul || e->op != YASM_EXPR_MUL
+ || !yasm_intnum_is_pos1(e->terms[int_term].data.intn)
+ || !yasm_expr__contains(e, YASM_EXPR_REG)) {
+ /* Check for simple identities that delete the intnum.
+ * Don't delete if the intnum is the only thing in the expn.
+ */
+ if ((int_term == 0 && numterms > 1 &&
+ expr_can_destroy_int_left(e->op, e->terms[0].data.intn)) ||
+ (int_term > 0 &&
+ expr_can_destroy_int_right(e->op, e->terms[int_term].data.intn))) {
+ /* Delete the intnum */
+ yasm_intnum_destroy(e->terms[int_term].data.intn);
+
+ /* Slide everything to its right over by 1 */
+ if (int_term != numterms-1) /* if it wasn't last.. */
+ memmove(&e->terms[int_term], &e->terms[int_term+1],
+ (numterms-1-int_term)*sizeof(yasm_expr__item));
+
+ /* Update numterms */
+ numterms--;
+ int_term = -1; /* no longer an int term */
+ }
}
+ e->numterms = save_numterms;
/* Check for simple identites that delete everything BUT the intnum.
* Don't bother if the intnum is the only thing in the expn.
*/
- if (numterms > 1 &&
+ if (numterms > 1 && int_term != -1 &&
expr_is_constant(e->op, e->terms[int_term].data.intn)) {
/* Loop through, deleting everything but the integer term */
for (i=0; i<e->numterms; i++)
@@ -479,10 +513,11 @@ expr_simplify_identity(yasm_expr *e, int numterms, int int_term)
numterms = 1;
}
- /* Compute NOT and NEG on single intnum. */
+ /* Compute NOT, NEG, and LNOT on single intnum. */
if (numterms == 1 && int_term == 0 &&
- (e->op == YASM_EXPR_NOT || e->op == YASM_EXPR_NEG))
- yasm_intnum_calc(e->terms[0].data.intn, e->op, NULL, e->line);
+ (e->op == YASM_EXPR_NOT || e->op == YASM_EXPR_NEG ||
+ e->op == YASM_EXPR_LNOT))
+ yasm_intnum_calc(e->terms[0].data.intn, e->op, NULL);
/* Change expression to IDENT if possible. */
if (numterms == 1)
@@ -506,7 +541,7 @@ expr_simplify_identity(yasm_expr *e, int numterms, int int_term)
/*@-mustfree@*/
static /*@only@*/ yasm_expr *
expr_level_op(/*@returned@*/ /*@only@*/ yasm_expr *e, int fold_const,
- int simplify_ident)
+ int simplify_ident, int simplify_reg_mul)
{
int i, j, o, fold_numterms, level_numterms, level_fold_numterms;
int first_int_term = -1;
@@ -571,7 +606,7 @@ expr_level_op(/*@returned@*/ /*@only@*/ yasm_expr *e, int fold_const,
for (i=first_int_term+1, o=first_int_term+1; i<e->numterms; i++) {
if (e->terms[i].type == YASM_EXPR_INT) {
yasm_intnum_calc(e->terms[first_int_term].data.intn, e->op,
- e->terms[i].data.intn, e->line);
+ e->terms[i].data.intn);
fold_numterms--;
level_numterms--;
/* make sure to delete folded intnum */
@@ -586,8 +621,9 @@ expr_level_op(/*@returned@*/ /*@only@*/ yasm_expr *e, int fold_const,
if (simplify_ident) {
int new_fold_numterms;
/* Simplify identities and make IDENT if possible. */
- new_fold_numterms = expr_simplify_identity(e, fold_numterms,
- first_int_term);
+ new_fold_numterms =
+ expr_simplify_identity(e, fold_numterms, first_int_term,
+ simplify_reg_mul);
level_numterms -= fold_numterms-new_fold_numterms;
fold_numterms = new_fold_numterms;
}
@@ -600,7 +636,8 @@ expr_level_op(/*@returned@*/ /*@only@*/ yasm_expr *e, int fold_const,
*/
if ((e->op != YASM_EXPR_ADD && e->op != YASM_EXPR_MUL &&
e->op != YASM_EXPR_OR && e->op != YASM_EXPR_AND &&
- e->op != YASM_EXPR_XOR) ||
+ e->op != YASM_EXPR_LOR && e->op != YASM_EXPR_LAND &&
+ e->op != YASM_EXPR_LXOR && e->op != YASM_EXPR_XOR) ||
level_numterms <= fold_numterms) {
/* Downsize e if necessary */
if (fold_numterms < e->numterms && e->numterms > 2)
@@ -645,8 +682,7 @@ expr_level_op(/*@returned@*/ /*@only@*/ yasm_expr *e, int fold_const,
e->terms[first_int_term] = sube->terms[j]; /* struc */
} else {
yasm_intnum_calc(e->terms[first_int_term].data.intn,
- e->op, sube->terms[j].data.intn,
- e->line);
+ e->op, sube->terms[j].data.intn);
/* make sure to delete folded intnum */
yasm_intnum_destroy(sube->terms[j].data.intn);
}
@@ -676,7 +712,7 @@ expr_level_op(/*@returned@*/ /*@only@*/ yasm_expr *e, int fold_const,
/* Simplify identities, make IDENT if possible, and save to e->numterms. */
if (simplify_ident && first_int_term != -1) {
e->numterms = expr_simplify_identity(e, level_numterms,
- first_int_term);
+ first_int_term, simplify_reg_mul);
} else {
e->numterms = level_numterms;
if (level_numterms == 1)
@@ -695,7 +731,7 @@ typedef struct yasm__exprentry {
/* Level an entire expn tree, expanding equ's as we go */
yasm_expr *
yasm_expr__level_tree(yasm_expr *e, int fold_const, int simplify_ident,
- yasm_calc_bc_dist_func calc_bc_dist,
+ int simplify_reg_mul, yasm_calc_bc_dist_func calc_bc_dist,
yasm_expr_xform_func expr_xform_extra,
void *expr_xform_extra_data, yasm__exprhead *eh)
{
@@ -717,18 +753,23 @@ yasm_expr__level_tree(yasm_expr *e, int fold_const, int simplify_ident,
/* traverse terms */
for (i=0; i<e->numterms; i++) {
- /* First expand equ's */
+ /* Expansion stage first: expand equ's, and expand symrecs that
+ * reference absolute sections into
+ * absolute start expr + (symrec - first bc in abs section).
+ */
if (e->terms[i].type == YASM_EXPR_SYM) {
+ yasm__exprentry *np;
const yasm_expr *equ_expr =
yasm_symrec_get_equ(e->terms[i].data.sym);
- if (equ_expr) {
- yasm__exprentry *np;
+ /*@dependent@*/ yasm_section *sect;
+ /*@dependent@*/ /*@null@*/ yasm_bytecode *precbc;
+ if (equ_expr) {
/* Check for circular reference */
SLIST_FOREACH(np, eh, next) {
if (np->e == equ_expr) {
- yasm__error(e->line,
- N_("circular reference detected."));
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("circular reference detected"));
return e;
}
}
@@ -738,15 +779,54 @@ yasm_expr__level_tree(yasm_expr *e, int fold_const, int simplify_ident,
ee.e = equ_expr;
SLIST_INSERT_HEAD(eh, &ee, next);
+ } else if (yasm_symrec_get_label(e->terms[i].data.sym, &precbc) &&
+ (sect = yasm_bc_get_section(precbc)) &&
+ yasm_section_is_absolute(sect)) {
+ const yasm_expr *start = yasm_section_get_start(sect);
+ yasm_expr *sube, *sube2;
+
+ /* Check for circular reference */
+ SLIST_FOREACH(np, eh, next) {
+ if (np->e == start) {
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("circular reference detected"));
+ return e;
+ }
+ }
+
+ sube = yasm_xmalloc(sizeof(yasm_expr));
+ sube->op = YASM_EXPR_SUB;
+ sube->line = e->line;
+ sube->numterms = 2;
+ sube->terms[0].type = YASM_EXPR_SYMEXP;
+ sube->terms[0].data.sym = e->terms[i].data.sym;
+ sube->terms[1].type = YASM_EXPR_SYMEXP;
+ sube->terms[1].data.sym = yasm_section_abs_get_sym(sect);
+ assert(sube->terms[1].data.sym != NULL);
+
+ sube2 = yasm_xmalloc(sizeof(yasm_expr));
+ sube2->op = YASM_EXPR_ADD;
+ sube2->line = e->line;
+ sube2->numterms = 2;
+ sube2->terms[0].type = YASM_EXPR_EXPR;
+ sube2->terms[0].data.expn = yasm_expr_copy(start);
+ sube2->terms[1].type = YASM_EXPR_EXPR;
+ sube2->terms[1].data.expn = sube;
+
+ e->terms[i].type = YASM_EXPR_EXPR;
+ e->terms[i].data.expn = sube2;
+
+ ee.e = start;
+ SLIST_INSERT_HEAD(eh, &ee, next);
}
}
if (e->terms[i].type == YASM_EXPR_EXPR)
e->terms[i].data.expn =
yasm_expr__level_tree(e->terms[i].data.expn, fold_const,
- simplify_ident, calc_bc_dist,
- expr_xform_extra, expr_xform_extra_data,
- eh);
+ simplify_ident, simplify_reg_mul,
+ calc_bc_dist, expr_xform_extra,
+ expr_xform_extra_data, eh);
if (ee.e) {
SLIST_REMOVE_HEAD(eh, next);
@@ -755,14 +835,14 @@ yasm_expr__level_tree(yasm_expr *e, int fold_const, int simplify_ident,
}
/* do callback */
- e = expr_level_op(e, fold_const, simplify_ident);
+ e = expr_level_op(e, fold_const, simplify_ident, simplify_reg_mul);
if (calc_bc_dist || expr_xform_extra) {
if (calc_bc_dist)
e = expr_xform_bc_dist(e, calc_bc_dist);
if (expr_xform_extra)
e = expr_xform_extra(e, expr_xform_extra_data);
- e = yasm_expr__level_tree(e, fold_const, simplify_ident, NULL, NULL,
- NULL, NULL);
+ e = yasm_expr__level_tree(e, fold_const, simplify_ident,
+ simplify_reg_mul, NULL, NULL, NULL, NULL);
}
return e;
}
@@ -798,6 +878,9 @@ yasm_expr__order_terms(yasm_expr *e)
case YASM_EXPR_OR:
case YASM_EXPR_AND:
case YASM_EXPR_XOR:
+ case YASM_EXPR_LOR:
+ case YASM_EXPR_LAND:
+ case YASM_EXPR_LXOR:
/* Use mergesort to sort. It's fast on already sorted values and a
* stable sort (multiple terms of same type are kept in the same
* order).
@@ -831,6 +914,7 @@ yasm_expr__copy_except(const yasm_expr *e, int except)
dest->type = src->type;
switch (src->type) {
case YASM_EXPR_SYM:
+ case YASM_EXPR_SYMEXP:
/* Symbols don't need to be copied */
dest->data.sym = src->data.sym;
break;
@@ -989,74 +1073,6 @@ yasm_expr__traverse_leaves_in(yasm_expr *e, void *d,
return 0;
}
-yasm_symrec *
-yasm_expr_extract_symrec(yasm_expr **ep,
- yasm_symrec_relocate_action relocate_action,
- yasm_calc_bc_dist_func calc_bc_dist)
-{
- yasm_symrec *sym = NULL;
- int i, symterm = -1;
-
- switch ((*ep)->op) {
- case YASM_EXPR_IDENT:
- /* Be kind, recurse */
- if ((*ep)->terms[0].type == YASM_EXPR_EXPR)
- return yasm_expr_extract_symrec(&((*ep)->terms[0].data.expn),
- relocate_action, calc_bc_dist);
- /* Replace sym with 0 value, return sym */
- if ((*ep)->terms[0].type == YASM_EXPR_SYM) {
- sym = (*ep)->terms[0].data.sym;
- symterm = 0;
- }
- break;
- case YASM_EXPR_ADD:
- /* Search for sym, if found, delete it from expr and return it */
- for (i=0; i<(*ep)->numterms; i++) {
- if ((*ep)->terms[i].type == YASM_EXPR_SYM) {
- sym = (*ep)->terms[i].data.sym;
- symterm = i;
- break;
- }
- }
- break;
- default:
- break;
- }
- if (sym) {
- /*@dependent@*/ /*@null@*/ yasm_bytecode *precbc;
- /*@null@*/ yasm_intnum *intn;
-
- if (yasm_symrec_get_label(sym, &precbc)
- && (relocate_action == YASM_SYMREC_REPLACE_VALUE ||
- (relocate_action == YASM_SYMREC_REPLACE_VALUE_IF_LOCAL
- && yasm_symrec_get_visibility(sym) == YASM_SYM_LOCAL))) {
- intn = calc_bc_dist(yasm_section_bcs_first(
- yasm_bc_get_section(precbc)), precbc);
- if (!intn)
- return NULL;
- } else
- intn = yasm_intnum_create_uint(0);
- (*ep)->terms[symterm].type = YASM_EXPR_INT;
- (*ep)->terms[symterm].data.intn = intn;
- }
- return sym;
-}
-
-yasm_expr *
-yasm_expr_extract_seg(yasm_expr **ep)
-{
- yasm_expr *e = *ep;
-
- /* If not SEG, we can't do this transformation */
- if (e->op != YASM_EXPR_SEG)
- return NULL;
-
- /* Remove the SEG by changing the expression into an IDENT */
- e->op = YASM_EXPR_IDENT;
-
- return e;
-}
-
yasm_expr *
yasm_expr_extract_segoff(yasm_expr **ep)
{
@@ -1114,34 +1130,6 @@ yasm_expr_extract_wrt(yasm_expr **ep)
return retval;
}
-yasm_expr *
-yasm_expr_extract_shr(yasm_expr **ep)
-{
- yasm_expr *retval;
- yasm_expr *e = *ep;
-
- /* If not SHR, we can't do this transformation */
- if (e->op != YASM_EXPR_SHR)
- return NULL;
-
- /* Extract the right side portion out to its own expression */
- if (e->terms[1].type == YASM_EXPR_EXPR)
- retval = e->terms[1].data.expn;
- else {
- /* Need to build IDENT expression to hold non-expression contents */
- retval = yasm_xmalloc(sizeof(yasm_expr));
- retval->op = YASM_EXPR_IDENT;
- retval->numterms = 1;
- retval->terms[0] = e->terms[1]; /* structure copy */
- }
-
- /* Delete the right side portion by changing the expr into an IDENT */
- e->op = YASM_EXPR_IDENT;
- e->numterms = 1;
-
- return retval;
-}
-
/*@-unqualifiedtrans -nullderef -nullstate -onlytrans@*/
yasm_intnum *
yasm_expr_get_intnum(yasm_expr **ep, yasm_calc_bc_dist_func calc_bc_dist)
@@ -1156,27 +1144,15 @@ yasm_expr_get_intnum(yasm_expr **ep, yasm_calc_bc_dist_func calc_bc_dist)
/*@=unqualifiedtrans =nullderef -nullstate -onlytrans@*/
/*@-unqualifiedtrans -nullderef -nullstate -onlytrans@*/
-const yasm_floatnum *
-yasm_expr_get_floatnum(yasm_expr **ep)
-{
- *ep = yasm_expr_simplify(*ep, NULL);
-
- if ((*ep)->op == YASM_EXPR_IDENT &&
- (*ep)->terms[0].type == YASM_EXPR_FLOAT)
- return (*ep)->terms[0].data.flt;
- else
- return (yasm_floatnum *)NULL;
-}
-/*@=unqualifiedtrans =nullderef -nullstate -onlytrans@*/
-
-/*@-unqualifiedtrans -nullderef -nullstate -onlytrans@*/
const yasm_symrec *
yasm_expr_get_symrec(yasm_expr **ep, int simplify)
{
if (simplify)
*ep = yasm_expr_simplify(*ep, NULL);
- if ((*ep)->op == YASM_EXPR_IDENT && (*ep)->terms[0].type == YASM_EXPR_SYM)
+ if ((*ep)->op == YASM_EXPR_IDENT &&
+ ((*ep)->terms[0].type == YASM_EXPR_SYM ||
+ (*ep)->terms[0].type == YASM_EXPR_SYMEXP))
return (*ep)->terms[0].data.sym;
else
return (yasm_symrec *)NULL;
@@ -1200,7 +1176,7 @@ yasm_expr_get_reg(yasm_expr **ep, int simplify)
void
yasm_expr_print(const yasm_expr *e, FILE *f)
{
- char opstr[6];
+ char opstr[8];
int i;
if (!e) {
@@ -1247,6 +1223,9 @@ yasm_expr_print(const yasm_expr *e, FILE *f)
case YASM_EXPR_XOR:
strcpy(opstr, "^");
break;
+ case YASM_EXPR_XNOR:
+ strcpy(opstr, "XNOR");
+ break;
case YASM_EXPR_NOR:
strcpy(opstr, "NOR");
break;
@@ -1265,6 +1244,15 @@ yasm_expr_print(const yasm_expr *e, FILE *f)
case YASM_EXPR_LNOT:
strcpy(opstr, "!");
break;
+ case YASM_EXPR_LXOR:
+ strcpy(opstr, "^^");
+ break;
+ case YASM_EXPR_LXNOR:
+ strcpy(opstr, "LXNOR");
+ break;
+ case YASM_EXPR_LNOR:
+ strcpy(opstr, "LNOR");
+ break;
case YASM_EXPR_LT:
strcpy(opstr, "<");
break;
@@ -1303,6 +1291,7 @@ yasm_expr_print(const yasm_expr *e, FILE *f)
for (i=0; i<e->numterms; i++) {
switch (e->terms[i].type) {
case YASM_EXPR_SYM:
+ case YASM_EXPR_SYMEXP:
fprintf(f, "%s", yasm_symrec_get_name(e->terms[i].data.sym));
break;
case YASM_EXPR_EXPR:
diff --git a/libyasm/expr.h b/libyasm/expr.h
index 87268d51..59b3b5ae 100644
--- a/libyasm/expr.h
+++ b/libyasm/expr.h
@@ -147,6 +147,7 @@ SLIST_HEAD(yasm__exprhead, yasm__exprentry);
* \param e expression
* \param fold_const enable constant folding if nonzero
* \param simplify_ident simplify identities
+ * \param simplify_reg_mul simplify REG*1 identities
* \param calc_bc_dist bytecode distance-calculation function
* \param expr_xform_extra extra transformation function
* \param expr_xform_extra_data data to pass to expr_xform_extra
@@ -155,7 +156,8 @@ SLIST_HEAD(yasm__exprhead, yasm__exprentry);
*/
/*@only@*/ /*@null@*/ yasm_expr *yasm_expr__level_tree
(/*@returned@*/ /*@only@*/ /*@null@*/ yasm_expr *e, int fold_const,
- int simplify_ident, /*@null@*/ yasm_calc_bc_dist_func calc_bc_dist,
+ int simplify_ident, int simplify_reg_mul,
+ /*@null@*/ yasm_calc_bc_dist_func calc_bc_dist,
/*@null@*/ yasm_expr_xform_func expr_xform_extra,
/*@null@*/ void *expr_xform_extra_data, /*@null@*/ yasm__exprhead *eh);
@@ -167,39 +169,7 @@ SLIST_HEAD(yasm__exprhead, yasm__exprentry);
* \return Simplified expression.
*/
#define yasm_expr_simplify(e, cbd) \
- yasm_expr__level_tree(e, 1, 1, cbd, NULL, NULL, NULL)
-
-/** Relocation actions for yasm_expr_extract_symrec(). */
-typedef enum yasm_symrec_relocate_action {
- YASM_SYMREC_REPLACE_ZERO = 0, /**< Replace the symbol with 0 */
- YASM_SYMREC_REPLACE_VALUE, /**< Replace with symbol's value (offset)
- * if symbol is a label.
- */
- YASM_SYMREC_REPLACE_VALUE_IF_LOCAL /**< Replace with symbol's value only
- * if symbol is label and declared
- * local.
- */
-} yasm_symrec_relocate_action;
-
-/** Extract a single symbol out of an expression. Replaces it with 0, or
- * optionally the symbol's value (if it's a label).
- * \param ep expression (pointer to)
- * \param relocate_action replacement action to take on symbol in expr
- * \param calc_bc_dist bytecode distance-calculation function
- * \return NULL if unable to extract a symbol (too complex of expr, none
- * present, etc); otherwise returns the extracted symbol.
- */
-/*@dependent@*/ /*@null@*/ yasm_symrec *yasm_expr_extract_symrec
- (yasm_expr **ep, yasm_symrec_relocate_action relocate_action,
- yasm_calc_bc_dist_func calc_bc_dist);
-
-/** Remove the SEG unary operator if present, leaving the lower level
- * expression.
- * \param ep expression (pointer to)
- * \return NULL if the expression does not have a top-level operator of SEG;
- * otherwise the modified input expression (without the SEG).
- */
-/*@only@*/ /*@null@*/ yasm_expr *yasm_expr_extract_seg(yasm_expr **ep);
+ yasm_expr__level_tree(e, 1, 1, 1, cbd, NULL, NULL, NULL)
/** Extract the segment portion of a SEG:OFF expression, leaving the offset.
* \param ep expression (pointer to)
@@ -220,16 +190,6 @@ typedef enum yasm_symrec_relocate_action {
*/
/*@only@*/ /*@null@*/ yasm_expr *yasm_expr_extract_wrt(yasm_expr **ep);
-/** Extract the right portion (y) of a x SHR y expression, leaving the left
- * portion (x).
- * \param ep expression (pointer to)
- * \return NULL if unable to extract (YASM_EXPR_SHR not the top-level
- * operator), otherwise the right side of the SHR expression. The
- * input expression is modified such that on return, it's the left side
- * of the SHR expression.
- */
-/*@only@*/ /*@null@*/ yasm_expr *yasm_expr_extract_shr(yasm_expr **ep);
-
/** Get the integer value of an expression if it's just an integer.
* \param ep expression (pointer to)
* \param calc_bc_dist bytecode distance-calculation function
@@ -240,15 +200,6 @@ typedef enum yasm_symrec_relocate_action {
/*@dependent@*/ /*@null@*/ yasm_intnum *yasm_expr_get_intnum
(yasm_expr **ep, /*@null@*/ yasm_calc_bc_dist_func calc_bc_dist);
-/** Get the floating point value of an expression if it's just an floatnum.
- * \param ep expression (pointer to)
- * \return NULL if the expression is too complex (contains anything other than
- * floats, ie integers, non-valued labels, registers); otherwise the
- * floatnum value of the expression.
- */
-/*@dependent@*/ /*@null@*/ const yasm_floatnum *yasm_expr_get_floatnum
- (yasm_expr **ep);
-
/** Get the symbol value of an expression if it's just a symbol.
* \param ep expression (pointer to)
* \param simplify if nonzero, simplify the expression first
diff --git a/libyasm/file.c b/libyasm/file.c
index 4ff42beb..c605137f 100644
--- a/libyasm/file.c
+++ b/libyasm/file.c
@@ -1,7 +1,7 @@
/*
- * Little-endian file functions.
+ * File helper functions.
*
- * Copyright (C) 2001 Peter Johnson
+ * Copyright (C) 2001-2006 Peter Johnson
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -24,6 +24,20 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#undef HAVE_CONFIG_H
+#endif
+
+/* Need either unistd.h or direct.h (on Windows) to prototype getcwd() */
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#elif defined(WIN32) || defined(_WIN32)
+#include <direct.h>
+#endif
+
+#include <ctype.h>
+
#define YASM_LIB_INTERNAL
#include "util.h"
/*@unused@*/ RCSID("$Id$");
@@ -32,6 +46,318 @@
size_t
+yasm__splitpath_unix(const char *path, /*@out@*/ const char **tail)
+{
+ const char *s;
+ s = strrchr(path, '/');
+ if (!s) {
+ /* No head */
+ *tail = path;
+ return 0;
+ }
+ *tail = s+1;
+ /* Strip trailing ./ on path */
+ while ((s-1)>=path && *(s-1) == '.' && *s == '/'
+ && !((s-2)>=path && *(s-2) == '.'))
+ s -= 2;
+ /* Strip trailing slashes on path (except leading) */
+ while (s>path && *s == '/')
+ s--;
+ /* Return length of head */
+ return s-path+1;
+}
+
+size_t
+yasm__splitpath_win(const char *path, /*@out@*/ const char **tail)
+{
+ const char *basepath = path;
+ const char *s;
+
+ /* split off drive letter first, if any */
+ if (isalpha(path[0]) && path[1] == ':')
+ basepath += 2;
+
+ s = basepath;
+ while (*s != '\0')
+ s++;
+ while (s >= basepath && *s != '\\' && *s != '/')
+ s--;
+ if (s < basepath) {
+ *tail = basepath;
+ if (path == basepath)
+ return 0; /* No head */
+ else
+ return 2; /* Drive letter is head */
+ }
+ *tail = s+1;
+ /* Strip trailing .\ or ./ on path */
+ while ((s-1)>=basepath && *(s-1) == '.' && (*s == '/' || *s == '\\')
+ && !((s-2)>=basepath && *(s-2) == '.'))
+ s -= 2;
+ /* Strip trailing slashes on path (except leading) */
+ while (s>basepath && (*s == '/' || *s == '\\'))
+ s--;
+ /* Return length of head */
+ return s-path+1;
+}
+
+/* FIXME: dumb way for now */
+char *
+yasm__abspath_unix(const char *path)
+{
+ char *curdir, *abspath;
+ static const char pathsep[2] = "/";
+
+ curdir = getcwd(NULL, 0);
+
+ abspath = yasm_xmalloc(strlen(curdir) + strlen(path) + 2);
+ strcpy(abspath, curdir);
+ strcat(abspath, pathsep);
+ strcat(abspath, path);
+
+ free(curdir);
+
+ return abspath;
+}
+
+/* FIXME: dumb way for now */
+char *
+yasm__abspath_win(const char *path)
+{
+ char *curdir, *abspath, *ch;
+ static const char pathsep[2] = "\\";
+
+ curdir = getcwd(NULL, 0);
+
+ abspath = yasm_xmalloc(strlen(curdir) + strlen(path) + 2);
+ strcpy(abspath, curdir);
+ strcat(abspath, pathsep);
+ strcat(abspath, path);
+
+ free(curdir);
+
+ /* Replace all / with \ */
+ ch = abspath;
+ while (*ch) {
+ if (*ch == '/')
+ *ch = '\\';
+ ch++;
+ }
+
+ return abspath;
+}
+
+char *
+yasm__combpath_unix(const char *from, const char *to)
+{
+ const char *tail;
+ size_t pathlen, i, j;
+ char *out;
+
+ if (to[0] == '/') {
+ /* absolute "to" */
+ out = yasm_xmalloc(strlen(to)+1);
+ /* Combine any double slashes when copying */
+ for (j=0; *to; to++) {
+ if (*to == '/' && *(to+1) == '/')
+ continue;
+ out[j++] = *to;
+ }
+ out[j++] = '\0';
+ return out;
+ }
+
+ /* Get path component; note this strips trailing slash */
+ pathlen = yasm__splitpath_unix(from, &tail);
+
+ out = yasm_xmalloc(pathlen+strlen(to)+2); /* worst case maximum len */
+
+ /* Combine any double slashes when copying */
+ for (i=0, j=0; i<pathlen; i++) {
+ if (i<pathlen-1 && from[i] == '/' && from[i+1] == '/')
+ continue;
+ out[j++] = from[i];
+ }
+ pathlen = j;
+
+ /* Add trailing slash back in */
+ if (pathlen > 0 && out[pathlen-1] != '/')
+ out[pathlen++] = '/';
+
+ /* Now scan from left to right through "to", stripping off "." and "..";
+ * if we see "..", back up one directory in out unless last directory in
+ * out is also "..".
+ *
+ * Note this does NOT back through ..'s in the "from" path; this is just
+ * as well as that could skip symlinks (e.g. "foo/bar/.." might not be
+ * the same as "foo").
+ */
+ for (;;) {
+ if (to[0] == '.' && to[1] == '/') {
+ to += 2; /* current directory */
+ while (*to == '/')
+ to++; /* strip off any additional slashes */
+ } else if (pathlen == 0)
+ break; /* no more "from" path left, we're done */
+ else if (to[0] == '.' && to[1] == '.' && to[2] == '/') {
+ if (pathlen >= 3 && out[pathlen-1] == '/' && out[pathlen-2] == '.'
+ && out[pathlen-3] == '.') {
+ /* can't ".." against a "..", so we're done. */
+ break;
+ }
+
+ to += 3; /* throw away "../" */
+ while (*to == '/')
+ to++; /* strip off any additional slashes */
+
+ /* and back out last directory in "out" if not already at root */
+ if (pathlen > 1) {
+ pathlen--; /* strip off trailing '/' */
+ while (pathlen > 0 && out[pathlen-1] != '/')
+ pathlen--;
+ }
+ } else
+ break;
+ }
+
+ /* Copy "to" to tail of output, and we're done */
+ /* Combine any double slashes when copying */
+ for (j=pathlen; *to; to++) {
+ if (*to == '/' && *(to+1) == '/')
+ continue;
+ out[j++] = *to;
+ }
+ out[j++] = '\0';
+
+ return out;
+}
+
+char *
+yasm__combpath_win(const char *from, const char *to)
+{
+ const char *tail;
+ size_t pathlen, i, j;
+ char *out;
+
+ if ((isalpha(to[0]) && to[1] == ':') || (to[0] == '/' || to[0] == '\\')) {
+ /* absolute or drive letter "to" */
+ out = yasm_xmalloc(strlen(to)+1);
+ /* Combine any double slashes when copying */
+ for (j=0; *to; to++) {
+ if ((*to == '/' || *to == '\\')
+ && (*(to+1) == '/' || *(to+1) == '\\'))
+ continue;
+ if (*to == '/')
+ out[j++] = '\\';
+ else
+ out[j++] = *to;
+ }
+ out[j++] = '\0';
+ return out;
+ }
+
+ /* Get path component; note this strips trailing slash */
+ pathlen = yasm__splitpath_win(from, &tail);
+
+ out = yasm_xmalloc(pathlen+strlen(to)+2); /* worst case maximum len */
+
+ /* Combine any double slashes when copying */
+ for (i=0, j=0; i<pathlen; i++) {
+ if (i<pathlen-1 && (from[i] == '/' || from[i] == '\\')
+ && (from[i+1] == '/' || from[i+1] == '\\'))
+ continue;
+ if (from[i] == '/')
+ out[j++] = '\\';
+ else
+ out[j++] = from[i];
+ }
+ pathlen = j;
+
+ /* Add trailing slash back in, unless it's only a raw drive letter */
+ if (pathlen > 0 && out[pathlen-1] != '\\'
+ && !(pathlen == 2 && isalpha(out[0]) && out[1] == ':'))
+ out[pathlen++] = '\\';
+
+ /* Now scan from left to right through "to", stripping off "." and "..";
+ * if we see "..", back up one directory in out unless last directory in
+ * out is also "..".
+ *
+ * Note this does NOT back through ..'s in the "from" path; this is just
+ * as well as that could skip symlinks (e.g. "foo/bar/.." might not be
+ * the same as "foo").
+ */
+ for (;;) {
+ if (to[0] == '.' && (to[1] == '/' || to[1] == '\\')) {
+ to += 2; /* current directory */
+ while (*to == '/' || *to == '\\')
+ to++; /* strip off any additional slashes */
+ } else if (pathlen == 0
+ || (pathlen == 2 && isalpha(out[0]) && out[1] == ':'))
+ break; /* no more "from" path left, we're done */
+ else if (to[0] == '.' && to[1] == '.'
+ && (to[2] == '/' || to[2] == '\\')) {
+ if (pathlen >= 3 && out[pathlen-1] == '\\'
+ && out[pathlen-2] == '.' && out[pathlen-3] == '.') {
+ /* can't ".." against a "..", so we're done. */
+ break;
+ }
+
+ to += 3; /* throw away "../" (or "..\") */
+ while (*to == '/' || *to == '\\')
+ to++; /* strip off any additional slashes */
+
+ /* and back out last directory in "out" if not already at root */
+ if (pathlen > 1) {
+ pathlen--; /* strip off trailing '/' */
+ while (pathlen > 0 && out[pathlen-1] != '\\')
+ pathlen--;
+ }
+ } else
+ break;
+ }
+
+ /* Copy "to" to tail of output, and we're done */
+ /* Combine any double slashes when copying */
+ for (j=pathlen; *to; to++) {
+ if ((*to == '/' || *to == '\\') && (*(to+1) == '/' || *(to+1) == '\\'))
+ continue;
+ if (*to == '/')
+ out[j++] = '\\';
+ else
+ out[j++] = *to;
+ }
+ out[j++] = '\0';
+
+ return out;
+}
+
+FILE *
+yasm__fopen_include(const char *iname, const char *from, const char **paths,
+ const char *mode, char **oname)
+{
+ FILE *f;
+ char *combine;
+ const char *path;
+
+ /* Try directly relative to from first, then each of the include paths */
+ path = from;
+ while (path) {
+ combine = yasm__combpath(path, iname);
+ f = fopen(combine, mode);
+ if (f) {
+ *oname = combine;
+ return f;
+ }
+ yasm_xfree(combine);
+ if (!paths)
+ break;
+ path = *paths++;
+ }
+
+ return NULL;
+}
+
+size_t
yasm_fwrite_16_l(unsigned short val, FILE *f)
{
if (fputc(val & 0xFF, f) == EOF)
diff --git a/libyasm/file.h b/libyasm/file.h
index 70ff3a00..2e0e5953 100644
--- a/libyasm/file.h
+++ b/libyasm/file.h
@@ -1,13 +1,13 @@
/**
* \file libyasm/file.h
- * \brief YASM big and little endian file interface.
+ * \brief YASM file helpers.
*
* \rcs
* $Id$
* \endrcs
*
* \license
- * Copyright (C) 2001 Peter Johnson
+ * Copyright (C) 2001-2006 Peter Johnson
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -34,6 +34,135 @@
#ifndef YASM_FILE_H
#define YASM_FILE_H
+/** Split a UNIX pathname into head (directory) and tail (base filename)
+ * portions.
+ * \internal
+ * \param path pathname
+ * \param tail (returned) base filename
+ * \return Length of head (directory).
+ */
+size_t yasm__splitpath_unix(const char *path, /*@out@*/ const char **tail);
+
+/** Split a Windows pathname into head (directory) and tail (base filename)
+ * portions.
+ * \internal
+ * \param path pathname
+ * \param tail (returned) base filename
+ * \return Length of head (directory).
+ */
+size_t yasm__splitpath_win(const char *path, /*@out@*/ const char **tail);
+
+/** Split a pathname into head (directory) and tail (base filename) portions.
+ * Unless otherwise defined, defaults to yasm__splitpath_unix().
+ * \internal
+ * \param path pathname
+ * \param tail (returned) base filename
+ * \return Length of head (directory).
+ */
+#ifndef yasm__splitpath
+# if defined (_WIN32) || defined (WIN32) || defined (__MSDOS__) || \
+ defined (__DJGPP__) || defined (__OS2__) || defined (__CYGWIN__) || \
+ defined (__CYGWIN32__)
+# define yasm__splitpath(path, tail) yasm__splitpath_win(path, tail)
+# else
+# define yasm__splitpath(path, tail) yasm__splitpath_unix(path, tail)
+# endif
+#endif
+
+/** Convert a UNIX relative or absolute pathname into an absolute pathname.
+ * \internal
+ * \param path pathname
+ * \return Absolute version of path (newly allocated).
+ */
+/*@only@*/ char *yasm__abspath_unix(const char *path);
+
+/** Convert a Windows relative or absolute pathname into an absolute pathname.
+ * \internal
+ * \param path pathname
+ * \return Absolute version of path (newly allocated).
+ */
+/*@only@*/ char *yasm__abspath_win(const char *path);
+
+/** Convert a relative or absolute pathname into an absolute pathname.
+ * Unless otherwise defined, defaults to yasm__abspath_unix().
+ * \internal
+ * \param path pathname
+ * \return Absolute version of path (newly allocated).
+ */
+#ifndef yasm__abspath
+# if defined (_WIN32) || defined (WIN32) || defined (__MSDOS__) || \
+ defined (__DJGPP__) || defined (__OS2__) || defined (__CYGWIN__) || \
+ defined (__CYGWIN32__)
+# define yasm__abspath(path) yasm__abspath_win(path)
+# else
+# define yasm__abspath(path) yasm__abspath_unix(path)
+# endif
+#endif
+
+/** Build a UNIX pathname that is equivalent to accessing the "to" pathname
+ * when you're in the directory containing "from". Result is relative if both
+ * from and to are relative.
+ * \internal
+ * \param from from pathname
+ * \param to to pathname
+ * \return Combined path (newly allocated).
+ */
+char *yasm__combpath_unix(const char *from, const char *to);
+
+/** Build a Windows pathname that is equivalent to accessing the "to" pathname
+ * when you're in the directory containing "from". Result is relative if both
+ * from and to are relative.
+ * \internal
+ * \param from from pathname
+ * \param to to pathname
+ * \return Combined path (newly allocated).
+ */
+char *yasm__combpath_win(const char *from, const char *to);
+
+/** Build a pathname that is equivalent to accessing the "to" pathname
+ * when you're in the directory containing "from". Result is relative if both
+ * from and to are relative.
+ * Unless otherwise defined, defaults to yasm__combpath_unix().
+ * \internal
+ * \param from from pathname
+ * \param to to pathname
+ * \return Combined path (newly allocated).
+ */
+#ifndef yasm__combpath
+# if defined (_WIN32) || defined (WIN32) || defined (__MSDOS__) || \
+ defined (__DJGPP__) || defined (__OS2__) || defined (__CYGWIN__) || \
+ defined (__CYGWIN32__)
+# define yasm__combpath(from, to) yasm__combpath_win(from, to)
+# else
+# define yasm__combpath(from, to) yasm__combpath_unix(from, to)
+# endif
+#endif
+
+/** Try to find and open an include file, searching through include paths.
+ * First iname is looked for relative to the directory containing "from", then
+ * it's looked for relative to each of the paths.
+ *
+ * All pathnames may be either absolute or relative; from, oname, and paths,
+ * if relative, are relative from the current working directory.
+ *
+ * First match wins; the full pathname (newly allocated) to the opened file
+ * is saved into oname, and the fopen'ed FILE * is returned. If not found,
+ * NULL is returned.
+ *
+ * \internal
+ * \param iname file to include
+ * \param from file doing the including
+ * \param paths NULL-terminated array of paths to search (relative to from)
+ * may be NULL if no extra paths
+ * \param mode fopen mode string
+ * \param oname full pathname of included file (may be relative)
+ * \return fopen'ed include file, or NULL if not found.
+ */
+/*@null@*/ FILE *yasm__fopen_include(const char *iname, const char *from,
+ /*@null@*/ const char **paths,
+ const char *mode,
+ /*@out@*/ /*@only@*/ char **oname);
+
/** Write an 8-bit value to a buffer, incrementing buffer pointer.
* \note Only works properly if ptr is an (unsigned char *).
* \param ptr buffer
diff --git a/libyasm/floatnum.c b/libyasm/floatnum.c
index 7c65f816..3ddd93ea 100644
--- a/libyasm/floatnum.c
+++ b/libyasm/floatnum.c
@@ -509,15 +509,17 @@ yasm_floatnum_destroy(yasm_floatnum *flt)
yasm_xfree(flt);
}
-void
+int
yasm_floatnum_calc(yasm_floatnum *acc, yasm_expr_op op,
- /*@unused@*/ yasm_floatnum *operand, unsigned long line)
+ /*@unused@*/ yasm_floatnum *operand)
{
- if (op != YASM_EXPR_NEG)
- yasm__error(line,
- N_("Unsupported floating-point arithmetic operation"));
- else
- acc->sign ^= 1;
+ if (op != YASM_EXPR_NEG) {
+ yasm_error_set(YASM_ERROR_FLOATING_POINT,
+ N_("Unsupported floating-point arithmetic operation"));
+ return 1;
+ }
+ acc->sign ^= 1;
+ return 0;
}
int
@@ -525,7 +527,7 @@ yasm_floatnum_get_int(const yasm_floatnum *flt, unsigned long *ret_val)
{
unsigned char t[4];
- if (yasm_floatnum_get_sized(flt, t, 4, 32, 0, 0, 0, 0)) {
+ if (yasm_floatnum_get_sized(flt, t, 4, 32, 0, 0, 0)) {
*ret_val = 0xDEADBEEFUL; /* Obviously incorrect return value */
return 1;
}
@@ -660,7 +662,7 @@ floatnum_get_common(const yasm_floatnum *flt, /*@out@*/ unsigned char *ptr,
int
yasm_floatnum_get_sized(const yasm_floatnum *flt, unsigned char *ptr,
size_t destsize, size_t valsize, size_t shift,
- int bigendian, int warn, unsigned long line)
+ int bigendian, int warn)
{
int retval;
if (destsize*8 != valsize || shift>0 || bigendian) {
@@ -684,10 +686,10 @@ yasm_floatnum_get_sized(const yasm_floatnum *flt, unsigned char *ptr,
}
if (warn) {
if (retval < 0)
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("underflow in floating point expression"));
else if (retval > 0)
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("overflow in floating point expression"));
}
return retval;
@@ -722,21 +724,21 @@ yasm_floatnum_print(const yasm_floatnum *flt, FILE *f)
/* 32-bit (single precision) format */
fprintf(f, "32-bit: %d: ",
- yasm_floatnum_get_sized(flt, out, 4, 32, 0, 0, 0, 0));
+ yasm_floatnum_get_sized(flt, out, 4, 32, 0, 0, 0));
for (i=0; i<4; i++)
fprintf(f, "%02x ", out[i]);
fprintf(f, "\n");
/* 64-bit (double precision) format */
fprintf(f, "64-bit: %d: ",
- yasm_floatnum_get_sized(flt, out, 8, 64, 0, 0, 0, 0));
+ yasm_floatnum_get_sized(flt, out, 8, 64, 0, 0, 0));
for (i=0; i<8; i++)
fprintf(f, "%02x ", out[i]);
fprintf(f, "\n");
/* 80-bit (extended precision) format */
fprintf(f, "80-bit: %d: ",
- yasm_floatnum_get_sized(flt, out, 10, 80, 0, 0, 0, 0));
+ yasm_floatnum_get_sized(flt, out, 10, 80, 0, 0, 0));
for (i=0; i<10; i++)
fprintf(f, "%02x ", out[i]);
fprintf(f, "\n");
diff --git a/libyasm/floatnum.h b/libyasm/floatnum.h
index a7523dd5..3e488f10 100644
--- a/libyasm/floatnum.h
+++ b/libyasm/floatnum.h
@@ -66,10 +66,10 @@ void yasm_floatnum_destroy(/*@only@*/ yasm_floatnum *flt);
* \param acc floatnum accumulator
* \param op operation
* \param operand floatnum operand
- * \param line virtual line (of expression)
+ * \return Nonzero on error.
*/
-void yasm_floatnum_calc(yasm_floatnum *acc, yasm_expr_op op,
- yasm_floatnum *operand, unsigned long line);
+int yasm_floatnum_calc(yasm_floatnum *acc, yasm_expr_op op,
+ yasm_floatnum *operand);
/** Convert a floatnum to single-precision and return as 32-bit value.
* The 32-bit value is a "standard" C value (eg, of unknown endian).
@@ -95,13 +95,12 @@ int yasm_floatnum_get_int(const yasm_floatnum *flt,
* \param shift left shift (in bits)
* \param bigendian endianness (nonzero=big, zero=little)
* \param warn enables standard overflow/underflow warnings
- * \param line virtual line; may be 0 if warn is 0.
* \return Nonzero if flt can't fit into the specified precision: -1 if
* underflow occurred, 1 if overflow occurred.
*/
int yasm_floatnum_get_sized(const yasm_floatnum *flt, unsigned char *ptr,
size_t destsize, size_t valsize, size_t shift,
- int bigendian, int warn, unsigned long line);
+ int bigendian, int warn);
/** Basic check to see if size is valid for flt conversion (using
* yasm_floatnum_get_sized()). Doesn't actually check for underflow/overflow
diff --git a/libyasm/hamt.c b/libyasm/hamt.c
index 6290e3ee..129bae14 100644
--- a/libyasm/hamt.c
+++ b/libyasm/hamt.c
@@ -37,11 +37,11 @@
#include "hamt.h"
#include "_stdint.h" /* for uintptr_t */
-typedef struct HAMTEntry {
+struct HAMTEntry {
STAILQ_ENTRY(HAMTEntry) next; /* next hash table entry */
/*@dependent@*/ const char *str; /* string being hashed */
/*@owned@*/ void *data; /* data pointer being stored */
-} HAMTEntry;
+};
typedef struct HAMTNode {
unsigned long BitMapKey; /* 32 bits, bitmap or hash key */
@@ -114,7 +114,9 @@ HAMT_delete_trie(HAMTNode *node)
/* Count total number of bits in bitmap to determine size */
BitCount(Size, node->BitMapKey);
- Size &= 0x1F; /* Clamp to <32 */
+ Size &= 0x1F;
+ if (Size == 0)
+ Size = 32;
for (i=0; i<Size; i++)
HAMT_delete_trie(&(GetSubTrie(node))[i]);
@@ -150,10 +152,30 @@ HAMT_traverse(HAMT *hamt, void *d,
/*@null@*/ void *d))
{
HAMTEntry *entry;
- STAILQ_FOREACH(entry, &hamt->entries, next)
- if (func(entry->data, d) == 0)
- return 0;
- return 1;
+ STAILQ_FOREACH(entry, &hamt->entries, next) {
+ int retval = func(entry->data, d);
+ if (retval != 0)
+ return retval;
+ }
+ return 0;
+}
+
+const HAMTEntry *
+HAMT_first(const HAMT *hamt)
+{
+ return STAILQ_FIRST(&hamt->entries);
+}
+
+const HAMTEntry *
+HAMT_next(const HAMTEntry *prev)
+{
+ return STAILQ_NEXT(prev, next);
+}
+
+void *
+HAMTEntry_get_data(const HAMTEntry *entry)
+{
+ return entry->data;
}
/*@-temptrans -kepttrans -mustfree@*/
@@ -187,7 +209,8 @@ HAMT_insert(HAMT *hamt, const char *str, void *data, int *replace,
for (;;) {
if (!(IsSubTrie(node))) {
- if (node->BitMapKey == key) {
+ if (node->BitMapKey == key
+ && strcmp(((HAMTEntry *)(node->BaseValue))->str, str) == 0) {
/*@-branchstate@*/
if (*replace) {
deletefunc(((HAMTEntry *)(node->BaseValue))->data);
@@ -272,7 +295,7 @@ HAMT_insert(HAMT *hamt, const char *str, void *data, int *replace,
/* Count total number of bits in bitmap to determine new size */
BitCount(Size, node->BitMapKey);
- Size &= 0x1F; /* Clamp to <=32 */
+ Size &= 0x1F;
if (Size == 0)
Size = 32;
newnodes = yasm_xmalloc(Size*sizeof(HAMTNode));
diff --git a/libyasm/hamt.h b/libyasm/hamt.h
index 7a6e7f3a..865844ca 100644
--- a/libyasm/hamt.h
+++ b/libyasm/hamt.h
@@ -36,6 +36,8 @@
/** Hash array mapped trie data structure (opaque type). */
typedef struct HAMT HAMT;
+/** Hash array mapped trie entry (opaque type). */
+typedef struct HAMTEntry HAMTEntry;
/** Create new, empty, HAMT. error_func() is called when an internal error is
* encountered--it should NOT return to the calling function.
@@ -81,14 +83,32 @@ void HAMT_destroy(/*@only@*/ HAMT *hamt,
/*@dependent@*/ /*@null@*/ void *HAMT_search(HAMT *hamt, const char *str);
/** Traverse over all keys in HAMT, calling function on each data item.
- * Stops early if func returns 0.
* \param hamt Hash array mapped trie
* \param d Data to pass to each call to func.
* \param func Function to call
- * \return 0 if stopped early, 1 if all data items were traversed.
+ * \return Stops early (and returns func's return value) if func returns a
+ * nonzero value; otherwise 0.
*/
int HAMT_traverse(HAMT *hamt, /*@null@*/ void *d,
int (*func) (/*@dependent@*/ /*@null@*/ void *node,
/*@null@*/ void *d));
+/** Get the first entry in a HAMT.
+ * \param hamt Hash array mapped trie
+ * \return First entry in HAMT, or NULL if HAMT is empty.
+ */
+const HAMTEntry *HAMT_first(const HAMT *hamt);
+
+/** Get the next entry in a HAMT.
+ * \param prev Previous entry in HAMT
+ * \return Next entry in HAMT, or NULL if no more entries.
+ */
+/*@null@*/ const HAMTEntry *HAMT_next(const HAMTEntry *prev);
+
+/** Get the corresponding data for a HAMT entry.
+ * \param entry HAMT entry (as returned by HAMT_first() and HAMT_next())
+ * \return Corresponding data item.
+ */
+void *HAMTEntry_get_data(const HAMTEntry *entry);
+
#endif
diff --git a/libyasm/intnum.c b/libyasm/intnum.c
index b8e0a5ac..94b8e733 100644
--- a/libyasm/intnum.c
+++ b/libyasm/intnum.c
@@ -83,7 +83,7 @@ yasm_intnum_cleanup(void)
}
yasm_intnum *
-yasm_intnum_create_dec(char *str, unsigned long line)
+yasm_intnum_create_dec(char *str)
{
yasm_intnum *intn = yasm_xmalloc(sizeof(yasm_intnum));
@@ -91,7 +91,7 @@ yasm_intnum_create_dec(char *str, unsigned long line)
if (BitVector_from_Dec_static(from_dec_data, conv_bv,
(unsigned char *)str) == ErrCode_Ovfl)
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("Numeric constant too large for internal format"));
if (Set_Max(conv_bv) < 32) {
intn->type = INTNUM_UL;
@@ -105,14 +105,14 @@ yasm_intnum_create_dec(char *str, unsigned long line)
}
yasm_intnum *
-yasm_intnum_create_bin(char *str, unsigned long line)
+yasm_intnum_create_bin(char *str)
{
yasm_intnum *intn = yasm_xmalloc(sizeof(yasm_intnum));
intn->origsize = (unsigned char)strlen(str);
if(intn->origsize > BITVECT_NATIVE_SIZE)
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("Numeric constant too large for internal format"));
BitVector_from_Bin(conv_bv, (unsigned char *)str);
@@ -128,14 +128,14 @@ yasm_intnum_create_bin(char *str, unsigned long line)
}
yasm_intnum *
-yasm_intnum_create_oct(char *str, unsigned long line)
+yasm_intnum_create_oct(char *str)
{
yasm_intnum *intn = yasm_xmalloc(sizeof(yasm_intnum));
intn->origsize = strlen(str)*3;
if(intn->origsize > BITVECT_NATIVE_SIZE)
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("Numeric constant too large for internal format"));
BitVector_from_Oct(conv_bv, (unsigned char *)str);
@@ -151,14 +151,14 @@ yasm_intnum_create_oct(char *str, unsigned long line)
}
yasm_intnum *
-yasm_intnum_create_hex(char *str, unsigned long line)
+yasm_intnum_create_hex(char *str)
{
yasm_intnum *intn = yasm_xmalloc(sizeof(yasm_intnum));
intn->origsize = strlen(str)*4;
if(intn->origsize > BITVECT_NATIVE_SIZE)
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("Numeric constant too large for internal format"));
BitVector_from_Hex(conv_bv, (unsigned char *)str);
@@ -175,7 +175,7 @@ yasm_intnum_create_hex(char *str, unsigned long line)
/*@-usedef -compdef -uniondef@*/
yasm_intnum *
-yasm_intnum_create_charconst_nasm(const char *str, unsigned long line)
+yasm_intnum_create_charconst_nasm(const char *str)
{
yasm_intnum *intn = yasm_xmalloc(sizeof(yasm_intnum));
size_t len = strlen(str);
@@ -183,7 +183,7 @@ yasm_intnum_create_charconst_nasm(const char *str, unsigned long line)
intn->origsize = len*8;
if(intn->origsize > BITVECT_NATIVE_SIZE)
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("Character constant too large for internal format"));
if (len > 4) {
@@ -259,6 +259,82 @@ yasm_intnum_create_int(long i)
}
yasm_intnum *
+yasm_intnum_create_leb128(const unsigned char *ptr, int sign,
+ unsigned long *size)
+{
+ yasm_intnum *intn = yasm_xmalloc(sizeof(yasm_intnum));
+ const unsigned char *ptr_orig = ptr;
+ unsigned long i = 0;
+
+ intn->origsize = 0;
+
+ BitVector_Empty(conv_bv);
+ for (;;) {
+ BitVector_Chunk_Store(conv_bv, 7, i, *ptr);
+ i += 7;
+ if ((*ptr & 0x80) != 0x80)
+ break;
+ ptr++;
+ }
+
+ *size = (ptr-ptr_orig)+1;
+
+ if(i > BITVECT_NATIVE_SIZE)
+ yasm_warn_set(YASM_WARN_GENERAL,
+ N_("Numeric constant too large for internal format"));
+ else if (sign && (*ptr & 0x40) == 0x40)
+ BitVector_Interval_Fill(conv_bv, i, BITVECT_NATIVE_SIZE-1);
+
+ if (Set_Max(conv_bv) < 32) {
+ intn->type = INTNUM_UL;
+ intn->val.ul = BitVector_Chunk_Read(conv_bv, 32, 0);
+ } else {
+ intn->type = INTNUM_BV;
+ intn->val.bv = BitVector_Clone(conv_bv);
+ }
+
+ return intn;
+}
+
+yasm_intnum *
+yasm_intnum_create_sized(unsigned char *ptr, int sign, size_t srcsize,
+ int bigendian)
+{
+ yasm_intnum *intn = yasm_xmalloc(sizeof(yasm_intnum));
+ unsigned long i = 0;
+
+ intn->origsize = 0;
+
+ if (srcsize*8 > BITVECT_NATIVE_SIZE)
+ yasm_warn_set(YASM_WARN_GENERAL,
+ N_("Numeric constant too large for internal format"));
+
+ /* Read the buffer into a bitvect */
+ BitVector_Empty(conv_bv);
+ if (bigendian) {
+ /* TODO */
+ yasm_internal_error(N_("big endian not implemented"));
+ } else {
+ for (i = 0; i < srcsize; i++)
+ BitVector_Chunk_Store(conv_bv, 8, i*8, ptr[i]);
+ }
+
+ /* Sign extend if needed */
+ if (srcsize*8 < BITVECT_NATIVE_SIZE && sign && (ptr[i] & 0x80) == 0x80)
+ BitVector_Interval_Fill(conv_bv, i*8, BITVECT_NATIVE_SIZE-1);
+
+ if (Set_Max(conv_bv) < 32) {
+ intn->type = INTNUM_UL;
+ intn->val.ul = BitVector_Chunk_Read(conv_bv, 32, 0);
+ } else {
+ intn->type = INTNUM_BV;
+ intn->val.bv = BitVector_Clone(conv_bv);
+ }
+
+ return intn;
+}
+
+yasm_intnum *
yasm_intnum_copy(const yasm_intnum *intn)
{
yasm_intnum *n = yasm_xmalloc(sizeof(yasm_intnum));
@@ -286,12 +362,12 @@ yasm_intnum_destroy(yasm_intnum *intn)
}
/*@-nullderef -nullpass -branchstate@*/
-void
-yasm_intnum_calc(yasm_intnum *acc, yasm_expr_op op, yasm_intnum *operand,
- unsigned long line)
+int
+yasm_intnum_calc(yasm_intnum *acc, yasm_expr_op op, yasm_intnum *operand)
{
boolean carry = 0;
wordptr op1, op2 = NULL;
+ N_int count;
/* Always do computations with in full bit vector.
* Bit vector results must be calculated through intermediate storage.
@@ -315,8 +391,12 @@ yasm_intnum_calc(yasm_intnum *acc, yasm_expr_op op, yasm_intnum *operand,
}
if (!operand && op != YASM_EXPR_NEG && op != YASM_EXPR_NOT &&
- op != YASM_EXPR_LNOT)
- yasm_internal_error(N_("Operation needs an operand"));
+ op != YASM_EXPR_LNOT) {
+ yasm_error_set(YASM_ERROR_ARITHMETIC,
+ N_("operation needs an operand"));
+ BitVector_Empty(result);
+ return 1;
+ }
/* A operation does a bitvector computation if result is allocated. */
switch (op) {
@@ -331,17 +411,37 @@ yasm_intnum_calc(yasm_intnum *acc, yasm_expr_op op, yasm_intnum *operand,
break;
case YASM_EXPR_DIV:
/* TODO: make sure op1 and op2 are unsigned */
- BitVector_Divide(result, op1, op2, spare);
+ if (BitVector_is_empty(op2)) {
+ yasm_error_set(YASM_ERROR_ZERO_DIVISION, N_("divide by zero"));
+ BitVector_Empty(result);
+ return 1;
+ } else
+ BitVector_Divide(result, op1, op2, spare);
break;
case YASM_EXPR_SIGNDIV:
- BitVector_Divide(result, op1, op2, spare);
+ if (BitVector_is_empty(op2)) {
+ yasm_error_set(YASM_ERROR_ZERO_DIVISION, N_("divide by zero"));
+ BitVector_Empty(result);
+ return 1;
+ } else
+ BitVector_Divide(result, op1, op2, spare);
break;
case YASM_EXPR_MOD:
/* TODO: make sure op1 and op2 are unsigned */
- BitVector_Divide(spare, op1, op2, result);
+ if (BitVector_is_empty(op2)) {
+ yasm_error_set(YASM_ERROR_ZERO_DIVISION, N_("divide by zero"));
+ BitVector_Empty(result);
+ return 1;
+ } else
+ BitVector_Divide(spare, op1, op2, result);
break;
case YASM_EXPR_SIGNMOD:
- BitVector_Divide(spare, op1, op2, result);
+ if (BitVector_is_empty(op2)) {
+ yasm_error_set(YASM_ERROR_ZERO_DIVISION, N_("divide by zero"));
+ BitVector_Empty(result);
+ return 1;
+ } else
+ BitVector_Divide(spare, op1, op2, result);
break;
case YASM_EXPR_NEG:
BitVector_Negate(result, op1);
@@ -358,6 +458,10 @@ yasm_intnum_calc(yasm_intnum *acc, yasm_expr_op op, yasm_intnum *operand,
case YASM_EXPR_XOR:
Set_ExclusiveOr(result, op1, op2);
break;
+ case YASM_EXPR_XNOR:
+ Set_ExclusiveOr(result, op1, op2);
+ Set_Complement(result, result);
+ break;
case YASM_EXPR_NOR:
Set_Union(result, op1, op2);
Set_Complement(result, result);
@@ -372,7 +476,10 @@ yasm_intnum_calc(yasm_intnum *acc, yasm_expr_op op, yasm_intnum *operand,
case YASM_EXPR_SHR:
if (operand->type == INTNUM_UL) {
BitVector_Copy(result, op1);
- BitVector_Move_Right(result, (N_int)operand->val.ul);
+ carry = BitVector_msb_(op1);
+ count = (N_int)operand->val.ul;
+ while (count-- > 0)
+ BitVector_shift_right(result, carry);
} else /* don't even bother, just zero result */
BitVector_Empty(result);
break;
@@ -390,45 +497,66 @@ yasm_intnum_calc(yasm_intnum *acc, yasm_expr_op op, yasm_intnum *operand,
BitVector_Empty(result);
BitVector_LSB(result, BitVector_is_empty(op1));
break;
+ case YASM_EXPR_LXOR:
+ BitVector_Empty(result);
+ BitVector_LSB(result, !BitVector_is_empty(op1) ^
+ !BitVector_is_empty(op2));
+ break;
+ case YASM_EXPR_LXNOR:
+ BitVector_Empty(result);
+ BitVector_LSB(result, !(!BitVector_is_empty(op1) ^
+ !BitVector_is_empty(op2)));
+ break;
+ case YASM_EXPR_LNOR:
+ BitVector_Empty(result);
+ BitVector_LSB(result, !(!BitVector_is_empty(op1) ||
+ !BitVector_is_empty(op2)));
+ break;
case YASM_EXPR_EQ:
BitVector_Empty(result);
BitVector_LSB(result, BitVector_equal(op1, op2));
break;
case YASM_EXPR_LT:
BitVector_Empty(result);
- BitVector_LSB(result, BitVector_Lexicompare(op1, op2) < 0);
+ BitVector_LSB(result, BitVector_Compare(op1, op2) < 0);
break;
case YASM_EXPR_GT:
BitVector_Empty(result);
- BitVector_LSB(result, BitVector_Lexicompare(op1, op2) > 0);
+ BitVector_LSB(result, BitVector_Compare(op1, op2) > 0);
break;
case YASM_EXPR_LE:
BitVector_Empty(result);
- BitVector_LSB(result, BitVector_Lexicompare(op1, op2) <= 0);
+ BitVector_LSB(result, BitVector_Compare(op1, op2) <= 0);
break;
case YASM_EXPR_GE:
BitVector_Empty(result);
- BitVector_LSB(result, BitVector_Lexicompare(op1, op2) >= 0);
+ BitVector_LSB(result, BitVector_Compare(op1, op2) >= 0);
break;
case YASM_EXPR_NE:
BitVector_Empty(result);
BitVector_LSB(result, !BitVector_equal(op1, op2));
break;
case YASM_EXPR_SEG:
- yasm__error(line, N_("invalid use of '%s'"), "SEG");
+ yasm_error_set(YASM_ERROR_ARITHMETIC, N_("invalid use of '%s'"),
+ "SEG");
break;
case YASM_EXPR_WRT:
- yasm__error(line, N_("invalid use of '%s'"), "WRT");
+ yasm_error_set(YASM_ERROR_ARITHMETIC, N_("invalid use of '%s'"),
+ "WRT");
break;
case YASM_EXPR_SEGOFF:
- yasm__error(line, N_("invalid use of '%s'"), ":");
+ yasm_error_set(YASM_ERROR_ARITHMETIC, N_("invalid use of '%s'"),
+ ":");
break;
case YASM_EXPR_IDENT:
if (result)
BitVector_Copy(result, op1);
break;
default:
- yasm_internal_error(N_("invalid operation in intnum calculation"));
+ yasm_error_set(YASM_ERROR_ARITHMETIC,
+ N_("invalid operation in intnum calculation"));
+ BitVector_Empty(result);
+ return 1;
}
/* Try to fit the result into 32 bits if possible */
@@ -446,17 +574,24 @@ yasm_intnum_calc(yasm_intnum *acc, yasm_expr_op op, yasm_intnum *operand,
acc->val.bv = BitVector_Clone(result);
}
}
+ return 0;
}
/*@=nullderef =nullpass =branchstate@*/
void
yasm_intnum_zero(yasm_intnum *intn)
{
+ yasm_intnum_set_uint(intn, 0);
+}
+
+void
+yasm_intnum_set_uint(yasm_intnum *intn, unsigned long val)
+{
if (intn->type == INTNUM_BV) {
BitVector_Destroy(intn->val.bv);
intn->type = INTNUM_UL;
}
- intn->val.ul = 0;
+ intn->val.ul = val;
}
int
@@ -540,7 +675,7 @@ yasm_intnum_get_int(const yasm_intnum *intn)
void
yasm_intnum_get_sized(const yasm_intnum *intn, unsigned char *ptr,
size_t destsize, size_t valsize, int shift,
- int bigendian, int warn, unsigned long line)
+ int bigendian, int warn)
{
wordptr op1 = op1static, op2;
unsigned char *buf;
@@ -553,8 +688,12 @@ yasm_intnum_get_sized(const yasm_intnum *intn, unsigned char *ptr,
yasm_internal_error(N_("destination too large"));
/* General size warnings */
- if (warn && !yasm_intnum_check_size(intn, valsize, rshift, 2))
- yasm__warning(YASM_WARN_GENERAL, line,
+ if (warn<0 && !yasm_intnum_check_size(intn, valsize, rshift, 1))
+ yasm_warn_set(YASM_WARN_GENERAL,
+ N_("value does not fit in signed %d bit field"),
+ valsize);
+ if (warn>0 && !yasm_intnum_check_size(intn, valsize, rshift, 2))
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("value does not fit in %d bit field"), valsize);
/* Read the original data into a bitvect */
@@ -578,7 +717,7 @@ yasm_intnum_get_sized(const yasm_intnum *intn, unsigned char *ptr,
BitVector_Copy(conv_bv, op2);
BitVector_Move_Left(conv_bv, BITVECT_NATIVE_SIZE-rshift);
if (!BitVector_is_empty(conv_bv))
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("misaligned value, truncating to boundary"));
}
@@ -687,27 +826,12 @@ yasm_intnum_in_range(const yasm_intnum *intn, long low, long high)
&& BitVector_Compare(val, hval) <= 0);
}
-unsigned long
-yasm_intnum_get_leb128(const yasm_intnum *intn, unsigned char *ptr, int sign)
+static unsigned long
+get_leb128(wordptr val, unsigned char *ptr, int sign)
{
- wordptr val = op1static;
unsigned long i, size;
unsigned char *ptr_orig = ptr;
- /* Shortcut 0 */
- if (intn->type == INTNUM_UL && intn->val.ul == 0) {
- *ptr = 0;
- return 1;
- }
-
- /* If not already a bitvect, convert value to be written to a bitvect */
- if (intn->type == INTNUM_BV)
- val = intn->val.bv;
- else {
- BitVector_Empty(val);
- BitVector_Chunk_Store(val, 32, 0, intn->val.ul);
- }
-
if (sign) {
/* Signed mode */
if (BitVector_msb_(val)) {
@@ -733,6 +857,47 @@ yasm_intnum_get_leb128(const yasm_intnum *intn, unsigned char *ptr, int sign)
return (unsigned long)(ptr-ptr_orig);
}
+static unsigned long
+size_leb128(wordptr val, int sign)
+{
+ if (sign) {
+ /* Signed mode */
+ if (BitVector_msb_(val)) {
+ /* Negative */
+ BitVector_Negate(conv_bv, val);
+ return (Set_Max(conv_bv)+8)/7;
+ } else {
+ /* Positive */
+ return (Set_Max(val)+8)/7;
+ }
+ } else {
+ /* Unsigned mode */
+ return (Set_Max(val)+7)/7;
+ }
+}
+
+unsigned long
+yasm_intnum_get_leb128(const yasm_intnum *intn, unsigned char *ptr, int sign)
+{
+ wordptr val = op1static;
+
+ /* Shortcut 0 */
+ if (intn->type == INTNUM_UL && intn->val.ul == 0) {
+ *ptr = 0;
+ return 1;
+ }
+
+ /* If not already a bitvect, convert value to be written to a bitvect */
+ if (intn->type == INTNUM_BV)
+ val = intn->val.bv;
+ else {
+ BitVector_Empty(val);
+ BitVector_Chunk_Store(val, 32, 0, intn->val.ul);
+ }
+
+ return get_leb128(val, ptr, sign);
+}
+
unsigned long
yasm_intnum_size_leb128(const yasm_intnum *intn, int sign)
{
@@ -751,20 +916,107 @@ yasm_intnum_size_leb128(const yasm_intnum *intn, int sign)
BitVector_Chunk_Store(val, 32, 0, intn->val.ul);
}
- if (sign) {
- /* Signed mode */
- if (BitVector_msb_(val)) {
- /* Negative */
- BitVector_Negate(conv_bv, val);
- return (Set_Max(conv_bv)+8)/7;
- } else {
- /* Positive */
- return (Set_Max(val)+8)/7;
- }
- } else {
- /* Unsigned mode */
- return (Set_Max(val)+7)/7;
+ return size_leb128(val, sign);
+}
+
+unsigned long
+yasm_get_sleb128(long v, unsigned char *ptr)
+{
+ wordptr val = op1static;
+
+ /* Shortcut 0 */
+ if (v == 0) {
+ *ptr = 0;
+ return 1;
+ }
+
+ BitVector_Empty(val);
+ if (v >= 0)
+ BitVector_Chunk_Store(val, 32, 0, (unsigned long)v);
+ else {
+ BitVector_Chunk_Store(val, 32, 0, (unsigned long)(-v));
+ BitVector_Negate(val, val);
+ }
+ return get_leb128(val, ptr, 1);
+}
+
+unsigned long
+yasm_size_sleb128(long v)
+{
+ wordptr val = op1static;
+
+ if (v == 0)
+ return 1;
+
+ BitVector_Empty(val);
+ if (v >= 0)
+ BitVector_Chunk_Store(val, 32, 0, (unsigned long)v);
+ else {
+ BitVector_Chunk_Store(val, 32, 0, (unsigned long)(-v));
+ BitVector_Negate(val, val);
+ }
+ return size_leb128(val, 1);
+}
+
+unsigned long
+yasm_get_uleb128(unsigned long v, unsigned char *ptr)
+{
+ wordptr val = op1static;
+
+ /* Shortcut 0 */
+ if (v == 0) {
+ *ptr = 0;
+ return 1;
+ }
+
+ BitVector_Empty(val);
+ BitVector_Chunk_Store(val, 32, 0, v);
+ return get_leb128(val, ptr, 0);
+}
+
+unsigned long
+yasm_size_uleb128(unsigned long v)
+{
+ wordptr val = op1static;
+
+ if (v == 0)
+ return 1;
+
+ BitVector_Empty(val);
+ BitVector_Chunk_Store(val, 32, 0, v);
+ return size_leb128(val, 0);
+}
+
+char *
+yasm_intnum_get_str(const yasm_intnum *intn)
+{
+ char *s, *s2;
+
+ switch (intn->type) {
+ case INTNUM_UL:
+ s = yasm_xmalloc(20);
+ sprintf(s, "0x%lx", intn->val.ul);
+ return s;
+ case INTNUM_BV:
+ if (BitVector_msb_(intn->val.bv)) {
+ /* it's negative: negate the bitvector to get positive */
+ BitVector_Negate(conv_bv, intn->val.bv);
+ s2 = (char *)BitVector_to_Hex(conv_bv);
+ s = yasm_xmalloc(strlen(s2)+4);
+ strcpy(s, "-0x");
+ strcat(s, s2);
+ yasm_xfree(s2);
+ } else {
+ s2 = (char *)BitVector_to_Hex(intn->val.bv);
+ s = yasm_xmalloc(strlen(s2)+3);
+ strcpy(s, "0x");
+ strcat(s, s2);
+ yasm_xfree(s2);
+ }
+ return s;
}
+ /*@notreached@*/
+ return NULL;
}
void
diff --git a/libyasm/intnum.h b/libyasm/intnum.h
index 5edff6eb..90535154 100644
--- a/libyasm/intnum.h
+++ b/libyasm/intnum.h
@@ -42,41 +42,35 @@ void yasm_intnum_cleanup(void);
/** Create a new intnum from a decimal string.
* \param str decimal string
- * \param line virtual line (where the number came from)
* \return Newly allocated intnum.
*/
-/*@only@*/ yasm_intnum *yasm_intnum_create_dec(char *str, unsigned long line);
+/*@only@*/ yasm_intnum *yasm_intnum_create_dec(char *str);
/** Create a new intnum from a binary string.
* \param str binary string
- * \param line virtual line (where the number came from)
* \return Newly allocated intnum.
*/
-/*@only@*/ yasm_intnum *yasm_intnum_create_bin(char *str, unsigned long line);
+/*@only@*/ yasm_intnum *yasm_intnum_create_bin(char *str);
/** Create a new intnum from an octal string.
* \param str octal string
- * \param line virtual line (where the number came from)
* \return Newly allocated intnum.
*/
-/*@only@*/ yasm_intnum *yasm_intnum_create_oct(char *str, unsigned long line);
+/*@only@*/ yasm_intnum *yasm_intnum_create_oct(char *str);
/** Create a new intnum from a hexidecimal string.
* \param str hexidecimal string
- * \param line virtual line (where the number came from)
* \return Newly allocated intnum.
*/
-/*@only@*/ yasm_intnum *yasm_intnum_create_hex(char *str, unsigned long line);
+/*@only@*/ yasm_intnum *yasm_intnum_create_hex(char *str);
/** Convert character constant to integer value, using NASM rules. NASM syntax
* supports automatic conversion from strings such as 'abcd' to a 32-bit
* integer value. This function performs those conversions.
* \param str character constant string
- * \param line virtual line (where the number came from)
* \return Newly allocated intnum.
*/
-/*@only@*/ yasm_intnum *yasm_intnum_create_charconst_nasm(const char *str,
- unsigned long line);
+/*@only@*/ yasm_intnum *yasm_intnum_create_charconst_nasm(const char *str);
/** Create a new intnum from an unsigned integer value.
* \param i unsigned integer value
@@ -90,6 +84,26 @@ void yasm_intnum_cleanup(void);
*/
/*@only@*/ yasm_intnum *yasm_intnum_create_int(long i);
+/** Create a new intnum from LEB128-encoded form.
+ * \param ptr pointer to start of LEB128 encoded form
+ * \param sign signed (1) or unsigned (0) LEB128 format
+ * \param size number of bytes read from ptr (output)
+ * \return Newly allocated intnum. Number of bytes read returned into
+ * bytes_read parameter.
+ */
+/*@only@*/ yasm_intnum *yasm_intnum_create_leb128
+ (const unsigned char *ptr, int sign, /*@out@*/ unsigned long *size);
+
+/** Create a new intnum from a little-endian or big-endian buffer.
+ * In little endian, the LSB is in ptr[0].
+ * \param ptr pointer to start of buffer
+ * \param sign signed (1) or unsigned (0) source
+ * \param srcsize source buffer size (in bytes)
+ * \param bigendian endianness (nonzero=big, zero=little)
+ */
+/*@only@*/ yasm_intnum *yasm_intnum_create_sized
+ (unsigned char *ptr, int sign, size_t srcsize, int bigendian);
+
/** Duplicate an intnum.
* \param intn intnum
* \return Newly allocated intnum with the same value as intn.
@@ -107,16 +121,21 @@ void yasm_intnum_destroy(/*@only@*/ yasm_intnum *intn);
* \param acc intnum accumulator
* \param op operation
* \param operand intnum operand
- * \param line virtual line (of expression)
+ * \return Nonzero if error occurred.
*/
-void yasm_intnum_calc(yasm_intnum *acc, yasm_expr_op op, yasm_intnum *operand,
- unsigned long line);
+int yasm_intnum_calc(yasm_intnum *acc, yasm_expr_op op, yasm_intnum *operand);
/** Zero an intnum.
* \param intn intnum
*/
void yasm_intnum_zero(yasm_intnum *intn);
+/** Set an intnum to an unsigned integer.
+ * \param intn intnum
+ * \param val integer value
+ */
+void yasm_intnum_set_uint(yasm_intnum *intn, unsigned long val);
+
/** Simple value check for 0.
* \param acc intnum
* \return Nonzero if acc==0.
@@ -171,15 +190,13 @@ long yasm_intnum_get_int(const yasm_intnum *intn);
* shift (standard warnings include truncation to boundary)
* \param bigendian endianness (nonzero=big, zero=little)
* \param warn enables standard warnings (value doesn't fit into valsize
- * bits)
- * \param line virtual line; may be 0 if warn is 0
+ * bits): <0=signed warnings, >0=unsigned warnings, 0=no warn
*/
void yasm_intnum_get_sized(const yasm_intnum *intn, unsigned char *ptr,
size_t destsize, size_t valsize, int shift,
- int bigendian, int warn, unsigned long line);
+ int bigendian, int warn);
/** Check to see if intnum will fit without overflow into size bits.
- * If is_signed is 1, intnum is treated as a signed number.
* \param intn intnum
* \param size number of bits of output space
* \param rshift right shift
@@ -216,6 +233,40 @@ unsigned long yasm_intnum_get_leb128(const yasm_intnum *intn,
*/
unsigned long yasm_intnum_size_leb128(const yasm_intnum *intn, int sign);
+/** Output integer to buffer in signed LEB128-encoded form.
+ * \param v integer
+ * \param ptr pointer to storage for output bytes
+ * \return Number of bytes generated.
+ */
+unsigned long yasm_get_sleb128(long v, unsigned char *ptr);
+
+/** Calculate number of bytes signed LEB128-encoded form of integer will take.
+ * \param v integer
+ * \return Number of bytes.
+ */
+unsigned long yasm_size_sleb128(long v);
+
+/** Output integer to buffer in unsigned LEB128-encoded form.
+ * \param v integer
+ * \param ptr pointer to storage for output bytes
+ * \return Number of bytes generated.
+ */
+unsigned long yasm_get_uleb128(unsigned long v, unsigned char *ptr);
+
+/** Calculate number of bytes unsigned LEB128-encoded form of integer will take.
+ * \param v integer
+ * \return Number of bytes.
+ */
+unsigned long yasm_size_uleb128(unsigned long v);
+
+/** Get an intnum as a signed decimal string. The returned string will
+ * contain a leading '-' if the intnum is negative.
+ * \param intn intnum
+ * \return Newly allocated string containing the decimal representation of
+ * the intnum.
+ */
+/*@only@*/ char *yasm_intnum_get_str(const yasm_intnum *intn);
+
/** Print an intnum. For debugging purposes.
* \param f file
* \param intn intnum
diff --git a/libyasm/linemgr.c b/libyasm/linemgr.c
index e7ca9c48..01b10743 100644
--- a/libyasm/linemgr.c
+++ b/libyasm/linemgr.c
@@ -241,6 +241,13 @@ yasm_linemap_lookup(yasm_linemap *linemap, unsigned long line,
}
int
+yasm_linemap_traverse_filenames(yasm_linemap *linemap, /*@null@*/ void *d,
+ int (*func) (const char *filename, void *d))
+{
+ return HAMT_traverse(linemap->filenames, d, (int (*) (void *, void *))func);
+}
+
+int
yasm_linemap_get_source(yasm_linemap *linemap, unsigned long line,
yasm_bytecode **bcp, const char **sourcep)
{
diff --git a/libyasm/linemgr.h b/libyasm/linemgr.h
index b1e838b8..fecf621a 100644
--- a/libyasm/linemgr.h
+++ b/libyasm/linemgr.h
@@ -75,7 +75,7 @@ void yasm_linemap_add_source(yasm_linemap *linemap,
/*@null@*/ yasm_bytecode *bc,
const char *source);
-/** Go to the next line (increments the current virtual line)l
+/** Go to the next line (increments the current virtual line).
* \param linemap line mapping repository
* \return The current (new) virtual line.
*/
@@ -101,4 +101,17 @@ void yasm_linemap_set(yasm_linemap *linemap, /*@null@*/ const char *filename,
void yasm_linemap_lookup(yasm_linemap *linemap, unsigned long line,
/*@out@*/ const char **filename,
/*@out@*/ unsigned long *file_line);
+
+/** Traverses all filenames used in a linemap, calling a function on each
+ * filename.
+ * \param linemap line mapping repository
+ * \param d data pointer passed to func on each call
+ * \param func function
+ * \return Stops early (and returns func's return value) if func returns a
+ * nonzero value; otherwise 0.
+ */
+int yasm_linemap_traverse_filenames
+ (yasm_linemap *linemap, /*@null@*/ void *d,
+ int (*func) (const char *filename, void *d));
+
#endif
diff --git a/libyasm/md5.c b/libyasm/md5.c
new file mode 100644
index 00000000..d53ef378
--- /dev/null
+++ b/libyasm/md5.c
@@ -0,0 +1,310 @@
+/*
+ * This code implements the MD5 message-digest algorithm.
+ * The algorithm is due to Ron Rivest. This code was
+ * written by Colin Plumb in 1993, no copyright is claimed.
+ * This code is in the public domain; do with it what you wish.
+ *
+ * Equivalent code is available from RSA Data Security, Inc.
+ * This code has been tested against that, and is equivalent,
+ * except that you don't need to include two pages of legalese
+ * with every copy.
+ *
+ * To compute the message digest of a chunk of bytes, declare an
+ * MD5Context structure, pass it to MD5Init, call MD5Update as
+ * needed on buffers full of bytes, and then call MD5Final, which
+ * will fill a supplied 16-byte array with the digest.
+ */
+
+/* This code was modified in 1997 by Jim Kingdon of Cyclic Software to
+ not require an integer type which is exactly 32 bits. This work
+ draws on the changes for the same purpose by Tatu Ylonen
+ <ylo@cs.hut.fi> as part of SSH, but since I didn't actually use
+ that code, there is no copyright issue. I hereby disclaim
+ copyright in any changes I have made; this code remains in the
+ public domain. */
+
+/* Note regarding cvs_* namespace: this avoids potential conflicts
+ with libraries such as some versions of Kerberos. No particular
+ need to worry about whether the system supplies an MD5 library, as
+ this file is only about 3k of object code. */
+
+#include <util.h>
+/*@unused@*/ RCSID("$Id$");
+
+#include "md5.h"
+
+/* Little-endian byte-swapping routines. Note that these do not
+ depend on the size of datatypes such as cvs_uint32, nor do they require
+ us to detect the endianness of the machine we are running on. It
+ is possible they should be macros for speed, but I would be
+ surprised if they were a performance bottleneck for MD5. */
+
+static unsigned long
+getu32(const unsigned char *addr)
+{
+ return (((((unsigned long)addr[3] << 8) | addr[2]) << 8)
+ | addr[1]) << 8 | addr[0];
+}
+
+static void
+putu32(unsigned long data, unsigned char *addr)
+{
+ addr[0] = (unsigned char)data;
+ addr[1] = (unsigned char)(data >> 8);
+ addr[2] = (unsigned char)(data >> 16);
+ addr[3] = (unsigned char)(data >> 24);
+}
+
+/*
+ * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
+ * initialization constants.
+ */
+void
+yasm_md5_init(yasm_md5_context *ctx)
+{
+ ctx->buf[0] = 0x67452301;
+ ctx->buf[1] = 0xefcdab89;
+ ctx->buf[2] = 0x98badcfe;
+ ctx->buf[3] = 0x10325476;
+
+ ctx->bits[0] = 0;
+ ctx->bits[1] = 0;
+}
+
+/*
+ * Update context to reflect the concatenation of another buffer full
+ * of bytes.
+ */
+void
+yasm_md5_update(yasm_md5_context *ctx, unsigned char const *buf,
+ unsigned len)
+{
+ unsigned long t;
+
+ /* Update bitcount */
+
+ t = ctx->bits[0];
+ if ((ctx->bits[0] = (t + ((unsigned long)len << 3)) & 0xffffffff) < t)
+ ctx->bits[1]++; /* Carry from low to high */
+ ctx->bits[1] += len >> 29;
+
+ t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */
+
+ /* Handle any leading odd-sized chunks */
+
+ if ( t ) {
+ unsigned char *p = ctx->in + t;
+
+ t = 64-t;
+ if (len < t) {
+ memcpy(p, buf, len);
+ return;
+ }
+ memcpy(p, buf, t);
+ yasm_md5_transform (ctx->buf, ctx->in);
+ buf += t;
+ len -= t;
+ }
+
+ /* Process data in 64-byte chunks */
+
+ while (len >= 64) {
+ memcpy(ctx->in, buf, 64);
+ yasm_md5_transform (ctx->buf, ctx->in);
+ buf += 64;
+ len -= 64;
+ }
+
+ /* Handle any remaining bytes of data. */
+
+ memcpy(ctx->in, buf, len);
+}
+
+/*
+ * Final wrapup - pad to 64-byte boundary with the bit pattern
+ * 1 0* (64-bit count of bits processed, MSB-first)
+ */
+void
+yasm_md5_final(unsigned char digest[16], yasm_md5_context *ctx)
+{
+ unsigned count;
+ unsigned char *p;
+
+ /* Compute number of bytes mod 64 */
+ count = (ctx->bits[0] >> 3) & 0x3F;
+
+ /* Set the first char of padding to 0x80. This is safe since there is
+ always at least one byte free */
+ p = ctx->in + count;
+ *p++ = 0x80;
+
+ /* Bytes of padding needed to make 64 bytes */
+ count = 64 - 1 - count;
+
+ /* Pad out to 56 mod 64 */
+ if (count < 8) {
+ /* Two lots of padding: Pad the first block to 64 bytes */
+ memset(p, 0, count);
+ yasm_md5_transform (ctx->buf, ctx->in);
+
+ /* Now fill the next block with 56 bytes */
+ memset(ctx->in, 0, 56);
+ } else {
+ /* Pad block to 56 bytes */
+ memset(p, 0, count-8);
+ }
+
+ /* Append length in bits and transform */
+ putu32(ctx->bits[0], ctx->in + 56);
+ putu32(ctx->bits[1], ctx->in + 60);
+
+ yasm_md5_transform (ctx->buf, ctx->in);
+ putu32(ctx->buf[0], digest);
+ putu32(ctx->buf[1], digest + 4);
+ putu32(ctx->buf[2], digest + 8);
+ putu32(ctx->buf[3], digest + 12);
+ memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
+}
+
+#ifndef ASM_MD5
+
+/* The four core functions - F1 is optimized somewhat */
+
+/* #define F1(x, y, z) (x & y | ~x & z) */
+#define F1(x, y, z) (z ^ (x & (y ^ z)))
+#define F2(x, y, z) F1(z, x, y)
+#define F3(x, y, z) (x ^ y ^ z)
+#define F4(x, y, z) (y ^ (x | ~z))
+
+/* This is the central step in the MD5 algorithm. */
+#define MD5STEP(f, w, x, y, z, data, s) \
+ ( w += f(x, y, z) + data, w &= 0xffffffff, w = w<<s | w>>(32-s), w += x )
+
+/*
+ * The core of the MD5 algorithm, this alters an existing MD5 hash to
+ * reflect the addition of 16 longwords of new data. MD5Update blocks
+ * the data and converts bytes into longwords for this routine.
+ */
+void
+yasm_md5_transform(unsigned long buf[4], const unsigned char inraw[64])
+{
+ register unsigned long a, b, c, d;
+ unsigned long in[16];
+ int i;
+
+ for (i = 0; i < 16; ++i)
+ in[i] = getu32 (inraw + 4 * i);
+
+ a = buf[0];
+ b = buf[1];
+ c = buf[2];
+ d = buf[3];
+
+ MD5STEP(F1, a, b, c, d, in[ 0]+0xd76aa478, 7);
+ MD5STEP(F1, d, a, b, c, in[ 1]+0xe8c7b756, 12);
+ MD5STEP(F1, c, d, a, b, in[ 2]+0x242070db, 17);
+ MD5STEP(F1, b, c, d, a, in[ 3]+0xc1bdceee, 22);
+ MD5STEP(F1, a, b, c, d, in[ 4]+0xf57c0faf, 7);
+ MD5STEP(F1, d, a, b, c, in[ 5]+0x4787c62a, 12);
+ MD5STEP(F1, c, d, a, b, in[ 6]+0xa8304613, 17);
+ MD5STEP(F1, b, c, d, a, in[ 7]+0xfd469501, 22);
+ MD5STEP(F1, a, b, c, d, in[ 8]+0x698098d8, 7);
+ MD5STEP(F1, d, a, b, c, in[ 9]+0x8b44f7af, 12);
+ MD5STEP(F1, c, d, a, b, in[10]+0xffff5bb1, 17);
+ MD5STEP(F1, b, c, d, a, in[11]+0x895cd7be, 22);
+ MD5STEP(F1, a, b, c, d, in[12]+0x6b901122, 7);
+ MD5STEP(F1, d, a, b, c, in[13]+0xfd987193, 12);
+ MD5STEP(F1, c, d, a, b, in[14]+0xa679438e, 17);
+ MD5STEP(F1, b, c, d, a, in[15]+0x49b40821, 22);
+
+ MD5STEP(F2, a, b, c, d, in[ 1]+0xf61e2562, 5);
+ MD5STEP(F2, d, a, b, c, in[ 6]+0xc040b340, 9);
+ MD5STEP(F2, c, d, a, b, in[11]+0x265e5a51, 14);
+ MD5STEP(F2, b, c, d, a, in[ 0]+0xe9b6c7aa, 20);
+ MD5STEP(F2, a, b, c, d, in[ 5]+0xd62f105d, 5);
+ MD5STEP(F2, d, a, b, c, in[10]+0x02441453, 9);
+ MD5STEP(F2, c, d, a, b, in[15]+0xd8a1e681, 14);
+ MD5STEP(F2, b, c, d, a, in[ 4]+0xe7d3fbc8, 20);
+ MD5STEP(F2, a, b, c, d, in[ 9]+0x21e1cde6, 5);
+ MD5STEP(F2, d, a, b, c, in[14]+0xc33707d6, 9);
+ MD5STEP(F2, c, d, a, b, in[ 3]+0xf4d50d87, 14);
+ MD5STEP(F2, b, c, d, a, in[ 8]+0x455a14ed, 20);
+ MD5STEP(F2, a, b, c, d, in[13]+0xa9e3e905, 5);
+ MD5STEP(F2, d, a, b, c, in[ 2]+0xfcefa3f8, 9);
+ MD5STEP(F2, c, d, a, b, in[ 7]+0x676f02d9, 14);
+ MD5STEP(F2, b, c, d, a, in[12]+0x8d2a4c8a, 20);
+
+ MD5STEP(F3, a, b, c, d, in[ 5]+0xfffa3942, 4);
+ MD5STEP(F3, d, a, b, c, in[ 8]+0x8771f681, 11);
+ MD5STEP(F3, c, d, a, b, in[11]+0x6d9d6122, 16);
+ MD5STEP(F3, b, c, d, a, in[14]+0xfde5380c, 23);
+ MD5STEP(F3, a, b, c, d, in[ 1]+0xa4beea44, 4);
+ MD5STEP(F3, d, a, b, c, in[ 4]+0x4bdecfa9, 11);
+ MD5STEP(F3, c, d, a, b, in[ 7]+0xf6bb4b60, 16);
+ MD5STEP(F3, b, c, d, a, in[10]+0xbebfbc70, 23);
+ MD5STEP(F3, a, b, c, d, in[13]+0x289b7ec6, 4);
+ MD5STEP(F3, d, a, b, c, in[ 0]+0xeaa127fa, 11);
+ MD5STEP(F3, c, d, a, b, in[ 3]+0xd4ef3085, 16);
+ MD5STEP(F3, b, c, d, a, in[ 6]+0x04881d05, 23);
+ MD5STEP(F3, a, b, c, d, in[ 9]+0xd9d4d039, 4);
+ MD5STEP(F3, d, a, b, c, in[12]+0xe6db99e5, 11);
+ MD5STEP(F3, c, d, a, b, in[15]+0x1fa27cf8, 16);
+ MD5STEP(F3, b, c, d, a, in[ 2]+0xc4ac5665, 23);
+
+ MD5STEP(F4, a, b, c, d, in[ 0]+0xf4292244, 6);
+ MD5STEP(F4, d, a, b, c, in[ 7]+0x432aff97, 10);
+ MD5STEP(F4, c, d, a, b, in[14]+0xab9423a7, 15);
+ MD5STEP(F4, b, c, d, a, in[ 5]+0xfc93a039, 21);
+ MD5STEP(F4, a, b, c, d, in[12]+0x655b59c3, 6);
+ MD5STEP(F4, d, a, b, c, in[ 3]+0x8f0ccc92, 10);
+ MD5STEP(F4, c, d, a, b, in[10]+0xffeff47d, 15);
+ MD5STEP(F4, b, c, d, a, in[ 1]+0x85845dd1, 21);
+ MD5STEP(F4, a, b, c, d, in[ 8]+0x6fa87e4f, 6);
+ MD5STEP(F4, d, a, b, c, in[15]+0xfe2ce6e0, 10);
+ MD5STEP(F4, c, d, a, b, in[ 6]+0xa3014314, 15);
+ MD5STEP(F4, b, c, d, a, in[13]+0x4e0811a1, 21);
+ MD5STEP(F4, a, b, c, d, in[ 4]+0xf7537e82, 6);
+ MD5STEP(F4, d, a, b, c, in[11]+0xbd3af235, 10);
+ MD5STEP(F4, c, d, a, b, in[ 2]+0x2ad7d2bb, 15);
+ MD5STEP(F4, b, c, d, a, in[ 9]+0xeb86d391, 21);
+
+ buf[0] += a;
+ buf[1] += b;
+ buf[2] += c;
+ buf[3] += d;
+}
+#endif
+
+#ifdef TEST
+/* Simple test program. Can use it to manually run the tests from
+ RFC1321 for example. */
+#include <stdio.h>
+
+int
+main (int argc, char **argv)
+{
+ yasm_md5_context context;
+ unsigned char checksum[16];
+ int i;
+ int j;
+
+ if (argc < 2)
+ {
+ fprintf (stderr, "usage: %s string-to-hash\n", argv[0]);
+ exit (1);
+ }
+ for (j = 1; j < argc; ++j)
+ {
+ printf ("MD5 (\"%s\") = ", argv[j]);
+ yasm_md5_init (&context);
+ yasm_md5_update (&context, argv[j], strlen (argv[j]));
+ yasm_md5_final (checksum, &context);
+ for (i = 0; i < 16; i++)
+ {
+ printf ("%02x", (unsigned int) checksum[i]);
+ }
+ printf ("\n");
+ }
+ return 0;
+}
+#endif /* TEST */
diff --git a/libyasm/md5.h b/libyasm/md5.h
new file mode 100644
index 00000000..52559a0d
--- /dev/null
+++ b/libyasm/md5.h
@@ -0,0 +1,28 @@
+/* See md5.c for explanation and copyright information. */
+
+/*
+ * $Id$
+ */
+
+#ifndef YASM_MD5_H
+#define YASM_MD5_H
+
+/* Unlike previous versions of this code, uint32 need not be exactly
+ 32 bits, merely 32 bits or more. Choosing a data type which is 32
+ bits instead of 64 is not important; speed is considerably more
+ important. ANSI guarantees that "unsigned long" will be big enough,
+ and always using it seems to have few disadvantages. */
+
+typedef struct yasm_md5_context {
+ unsigned long buf[4];
+ unsigned long bits[2];
+ unsigned char in[64];
+} yasm_md5_context;
+
+void yasm_md5_init(yasm_md5_context *context);
+void yasm_md5_update(yasm_md5_context *context, unsigned char const *buf,
+ unsigned len);
+void yasm_md5_final(unsigned char digest[16], yasm_md5_context *context);
+void yasm_md5_transform(unsigned long buf[4], const unsigned char in[64]);
+
+#endif /* !YASM_MD5_H */
diff --git a/libyasm/objfmt.h b/libyasm/objfmt.h
index 0bdd6483..4f63c1cc 100644
--- a/libyasm/objfmt.h
+++ b/libyasm/objfmt.h
@@ -57,9 +57,6 @@ typedef struct yasm_objfmt_module {
*/
/*@null@*/ const char *extension;
- /** Default (starting) section name. */
- const char *default_section_name;
-
/** Default (starting) x86 BITS setting. This only appies to the x86
* architecture; other architectures ignore this setting.
*/
@@ -80,25 +77,29 @@ typedef struct yasm_objfmt_module {
/** Create object format.
* Module-level implementation of yasm_objfmt_create().
* Call yasm_objfmt_create() instead of calling this function.
- * \param in_filename main input filename (e.g. "file.asm")
* \param object object
* \param a architecture in use
* \return NULL if architecture/machine combination not supported.
*/
- /*@null@*/ /*@only@*/ yasm_objfmt * (*create)
- (const char *in_filename, yasm_object *object, yasm_arch *a);
+ /*@null@*/ /*@only@*/ yasm_objfmt * (*create) (yasm_object *object,
+ yasm_arch *a);
/** Module-level implementation of yasm_objfmt_output().
* Call yasm_objfmt_output() instead of calling this function.
*/
- void (*output) (yasm_objfmt *of, FILE *f, const char *obj_filename,
- int all_syms, yasm_dbgfmt *df);
+ void (*output) (yasm_objfmt *of, FILE *f, int all_syms, yasm_dbgfmt *df,
+ yasm_errwarns *errwarns);
/** Module-level implementation of yasm_objfmt_destroy().
* Call yasm_objfmt_destroy() instead of calling this function.
*/
void (*destroy) (/*@only@*/ yasm_objfmt *objfmt);
+ /** Module-level implementation of yasm_objfmt_add_default_section().
+ * Call yasm_objfmt_add_default_section() instead of calling this function.
+ */
+ yasm_section * (*add_default_section) (yasm_objfmt *objfmt);
+
/** Module-level implementation of yasm_objfmt_section_switch().
* Call yasm_objfmt_section_switch() instead of calling this function.
*/
@@ -139,33 +140,38 @@ typedef struct yasm_objfmt_module {
/** Create object format.
* \param module object format module
- * \param in_filename main input filename (e.g. "file.asm")
* \param object object
* \param a architecture in use
* \return NULL if architecture/machine combination not supported.
*/
/*@null@*/ /*@only@*/ yasm_objfmt *yasm_objfmt_create
- (const yasm_objfmt_module *module, const char *in_filename,
- yasm_object *object, yasm_arch *a);
+ (const yasm_objfmt_module *module, yasm_object *object, yasm_arch *a);
/** Write out (post-optimized) sections to the object file.
* This function may call yasm_symrec_* functions as necessary (including
* yasm_symrec_traverse()) to retrieve symbolic information.
* \param objfmt object format
* \param f output object file
- * \param obj_filename output filename (e.g. "file.o")
* \param all_syms if nonzero, all symbols should be included in
* the object file
* \param df debug format in use
+ * \param errwarns error/warning set
+ * \note Errors and warnings are stored into errwarns.
*/
-void yasm_objfmt_output(yasm_objfmt *objfmt, FILE *f, const char *obj_filename,
- int all_syms, yasm_dbgfmt *df);
+void yasm_objfmt_output(yasm_objfmt *objfmt, FILE *f, int all_syms,
+ yasm_dbgfmt *df, yasm_errwarns *errwarns);
/** Cleans up any allocated object format memory.
* \param objfmt object format
*/
void yasm_objfmt_destroy(/*@only@*/ yasm_objfmt *objfmt);
+/** Add a default section to an object.
+ * \param objfmt object format
+ * \return Default section.
+ */
+yasm_section *yasm_objfmt_add_default_section(yasm_objfmt *objfmt);
+
/** Switch object file sections. The first val of the valparams should
* be the section name. Calls yasm_object_get_general() to actually get
* the section.
@@ -235,12 +241,10 @@ int yasm_objfmt_directive(yasm_objfmt *objfmt, const char *name,
/* Inline macro implementations for objfmt functions */
-#define yasm_objfmt_create(module, in_filename, object, a) \
- module->create(in_filename, object, a)
+#define yasm_objfmt_create(module, object, a) module->create(object, a)
-#define yasm_objfmt_output(objfmt, f, obj_fn, all_syms, df) \
- ((yasm_objfmt_base *)objfmt)->module->output(objfmt, f, obj_fn, all_syms, \
- df)
+#define yasm_objfmt_output(objfmt, f, all_syms, df, ews) \
+ ((yasm_objfmt_base *)objfmt)->module->output(objfmt, f, all_syms, df, ews)
#define yasm_objfmt_destroy(objfmt) \
((yasm_objfmt_base *)objfmt)->module->destroy(objfmt)
#define yasm_objfmt_section_switch(objfmt, vpms, oe_vpms, line) \
@@ -258,14 +262,9 @@ int yasm_objfmt_directive(yasm_objfmt *objfmt, const char *name,
#define yasm_objfmt_directive(objfmt, name, vpms, oe_vpms, line) \
((yasm_objfmt_base *)objfmt)->module->directive(objfmt, name, vpms, \
oe_vpms, line)
+#define yasm_objfmt_add_default_section(objfmt) \
+ ((yasm_objfmt_base *)objfmt)->module->add_default_section(objfmt)
#endif
-/** Add a default section to an object.
- * \param objfmt object format
- * \param object object
- * \return Default section.
- */
-yasm_section *yasm_objfmt_add_default_section(yasm_objfmt *objfmt,
- yasm_object *object);
#endif
diff --git a/libyasm/parser.h b/libyasm/parser.h
index 1a94bbb5..80b6fcab 100644
--- a/libyasm/parser.h
+++ b/libyasm/parser.h
@@ -64,12 +64,13 @@ typedef struct yasm_parser_module {
* lines of source into the object's linemap (via
* yasm_linemap_add_data()).
* \param def_sect default (starting) section in the object
- * \note Parse failures are indicated by this function calling
- * yasm__error(); see errwarn.h for details.
+ * \param errwarns error/warning set
+ * \note Parse errors and warnings are stored into errwarns.
*/
- void (*do_parse) (yasm_object *object, yasm_preproc *pp, yasm_arch *a,
- yasm_objfmt *of, FILE *f, const char *in_filename,
- int save_input, yasm_section *def_sect);
+ void (*do_parse)
+ (yasm_object *object, yasm_preproc *pp, yasm_arch *a, yasm_objfmt *of,
+ yasm_dbgfmt *df, FILE *f, const char *in_filename, int save_input,
+ yasm_section *def_sect, yasm_errwarns *errwarns);
} yasm_parser_module;
#endif
diff --git a/libyasm/phash.c b/libyasm/phash.c
new file mode 100644
index 00000000..b828bb65
--- /dev/null
+++ b/libyasm/phash.c
@@ -0,0 +1,268 @@
+/* Modified for use with yasm by Peter Johnson. */
+#define YASM_LIB_INTERNAL
+#include "util.h"
+/*@unused@*/ RCSID("$Id$");
+
+/*
+--------------------------------------------------------------------
+lookupa.c, by Bob Jenkins, December 1996. Same as lookup2.c
+Use this code however you wish. Public Domain. No warranty.
+Source is http://burtleburtle.net/bob/c/lookupa.c
+--------------------------------------------------------------------
+*/
+#include "phash.h"
+
+#define ub4 unsigned long
+
+#define hashsize(n) ((ub4)1<<(n))
+#define hashmask(n) (hashsize(n)-1)
+
+/*
+--------------------------------------------------------------------
+mix -- mix 3 32-bit values reversibly.
+For every delta with one or two bit set, and the deltas of all three
+ high bits or all three low bits, whether the original value of a,b,c
+ is almost all zero or is uniformly distributed,
+* If mix() is run forward or backward, at least 32 bits in a,b,c
+ have at least 1/4 probability of changing.
+* If mix() is run forward, every bit of c will change between 1/3 and
+ 2/3 of the time. (Well, 22/100 and 78/100 for some 2-bit deltas.)
+mix() was built out of 36 single-cycle latency instructions in a
+ structure that could supported 2x parallelism, like so:
+ a -= b;
+ a -= c; x = (c>>13);
+ b -= c; a ^= x;
+ b -= a; x = (a<<8);
+ c -= a; b ^= x;
+ c -= b; x = (b>>13);
+ ...
+ Unfortunately, superscalar Pentiums and Sparcs can't take advantage
+ of that parallelism. They've also turned some of those single-cycle
+ latency instructions into multi-cycle latency instructions. Still,
+ this is the fastest good hash I could find. There were about 2^^68
+ to choose from. I only looked at a billion or so.
+--------------------------------------------------------------------
+*/
+#define mix(a,b,c) \
+{ \
+ a -= b; a -= c; a ^= (c>>13); \
+ a &= 0xffffffff; \
+ b -= c; b -= a; b ^= (a<<8); \
+ b &= 0xffffffff; \
+ c -= a; c -= b; c ^= (b>>13); \
+ c &= 0xffffffff; \
+ a -= b; a -= c; a ^= (c>>12); \
+ a &= 0xffffffff; \
+ b -= c; b -= a; b ^= (a<<16); \
+ b &= 0xffffffff; \
+ c -= a; c -= b; c ^= (b>>5); \
+ c &= 0xffffffff; \
+ a -= b; a -= c; a ^= (c>>3); \
+ a &= 0xffffffff; \
+ b -= c; b -= a; b ^= (a<<10); \
+ b &= 0xffffffff; \
+ c -= a; c -= b; c ^= (b>>15); \
+ c &= 0xffffffff; \
+}
+
+/*
+--------------------------------------------------------------------
+lookup() -- hash a variable-length key into a 32-bit value
+ k : the key (the unaligned variable-length array of bytes)
+ len : the length of the key, counting by bytes
+ level : can be any 4-byte value
+Returns a 32-bit value. Every bit of the key affects every bit of
+the return value. Every 1-bit and 2-bit delta achieves avalanche.
+About 6len+35 instructions.
+
+The best hash table sizes are powers of 2. There is no need to do
+mod a prime (mod is sooo slow!). If you need less than 32 bits,
+use a bitmask. For example, if you need only 10 bits, do
+ h = (h & hashmask(10));
+In which case, the hash table should have hashsize(10) elements.
+
+If you are hashing n strings (ub1 **)k, do it like this:
+ for (i=0, h=0; i<n; ++i) h = lookup( k[i], len[i], h);
+
+By Bob Jenkins, 1996. bob_jenkins@burtleburtle.net. You may use this
+code any way you wish, private, educational, or commercial.
+
+See http://burtleburtle.net/bob/hash/evahash.html
+Use for hash table lookup, or anything where one collision in 2^32 is
+acceptable. Do NOT use for cryptographic purposes.
+--------------------------------------------------------------------
+*/
+
+unsigned long
+phash_lookup(
+ register const char *sk, /* the key */
+ register unsigned long length, /* the length of the key */
+ register unsigned long level) /* the previous hash, or an arbitrary value */
+{
+ register unsigned long a,b,c,len;
+ register const unsigned char *k = (const unsigned char *)sk;
+
+ /* Set up the internal state */
+ len = length;
+ a = b = 0x9e3779b9; /* the golden ratio; an arbitrary value */
+ c = level; /* the previous hash value */
+
+ /*---------------------------------------- handle most of the key */
+ while (len >= 12)
+ {
+ a += (k[0] +((ub4)k[1]<<8) +((ub4)k[2]<<16) +((ub4)k[3]<<24));
+ a &= 0xffffffff;
+ b += (k[4] +((ub4)k[5]<<8) +((ub4)k[6]<<16) +((ub4)k[7]<<24));
+ b &= 0xffffffff;
+ c += (k[8] +((ub4)k[9]<<8) +((ub4)k[10]<<16)+((ub4)k[11]<<24));
+ c &= 0xffffffff;
+ mix(a,b,c);
+ k += 12; len -= 12;
+ }
+
+ /*------------------------------------- handle the last 11 bytes */
+ c += length;
+ switch(len) /* all the case statements fall through */
+ {
+ case 11: c+=((ub4)k[10]<<24);
+ case 10: c+=((ub4)k[9]<<16);
+ case 9 : c+=((ub4)k[8]<<8);
+ c &= 0xffffffff;
+ /* the first byte of c is reserved for the length */
+ case 8 : b+=((ub4)k[7]<<24);
+ case 7 : b+=((ub4)k[6]<<16);
+ case 6 : b+=((ub4)k[5]<<8);
+ case 5 : b+=k[4];
+ b &= 0xffffffff;
+ case 4 : a+=((ub4)k[3]<<24);
+ case 3 : a+=((ub4)k[2]<<16);
+ case 2 : a+=((ub4)k[1]<<8);
+ case 1 : a+=k[0];
+ a &= 0xffffffff;
+ /* case 0: nothing left to add */
+ }
+ mix(a,b,c);
+ /*-------------------------------------------- report the result */
+ return c;
+}
+
+
+/*
+--------------------------------------------------------------------
+mixc -- mixc 8 4-bit values as quickly and thoroughly as possible.
+Repeating mix() three times achieves avalanche.
+Repeating mix() four times eliminates all funnels and all
+ characteristics stronger than 2^{-11}.
+--------------------------------------------------------------------
+*/
+#define mixc(a,b,c,d,e,f,g,h) \
+{ \
+ a^=b<<11; d+=a; b+=c; \
+ b^=c>>2; e+=b; c+=d; \
+ c^=d<<8; f+=c; d+=e; \
+ d^=e>>16; g+=d; e+=f; \
+ e^=f<<10; h+=e; f+=g; \
+ f^=g>>4; a+=f; g+=h; \
+ g^=h<<8; b+=g; h+=a; \
+ h^=a>>9; c+=h; a+=b; \
+}
+
+/*
+--------------------------------------------------------------------
+checksum() -- hash a variable-length key into a 256-bit value
+ k : the key (the unaligned variable-length array of bytes)
+ len : the length of the key, counting by bytes
+ state : an array of CHECKSTATE 4-byte values (256 bits)
+The state is the checksum. Every bit of the key affects every bit of
+the state. There are no funnels. About 112+6.875len instructions.
+
+If you are hashing n strings (ub1 **)k, do it like this:
+ for (i=0; i<8; ++i) state[i] = 0x9e3779b9;
+ for (i=0, h=0; i<n; ++i) checksum( k[i], len[i], state);
+
+(c) Bob Jenkins, 1996. bob_jenkins@burtleburtle.net. You may use this
+code any way you wish, private, educational, or commercial, as long
+as this whole comment accompanies it.
+
+See http://burtleburtle.net/bob/hash/evahash.html
+Use to detect changes between revisions of documents, assuming nobody
+is trying to cause collisions. Do NOT use for cryptography.
+--------------------------------------------------------------------
+*/
+void
+phash_checksum(
+ register const char *sk,
+ register unsigned long len,
+ register unsigned long *state)
+{
+ register unsigned long a,b,c,d,e,f,g,h,length;
+ register const unsigned char *k = (const unsigned char *)sk;
+
+ /* Use the length and level; add in the golden ratio. */
+ length = len;
+ a=state[0]; b=state[1]; c=state[2]; d=state[3];
+ e=state[4]; f=state[5]; g=state[6]; h=state[7];
+
+ /*---------------------------------------- handle most of the key */
+ while (len >= 32)
+ {
+ a += (k[0] +(k[1]<<8) +(k[2]<<16) +(k[3]<<24));
+ b += (k[4] +(k[5]<<8) +(k[6]<<16) +(k[7]<<24));
+ c += (k[8] +(k[9]<<8) +(k[10]<<16)+(k[11]<<24));
+ d += (k[12]+(k[13]<<8)+(k[14]<<16)+(k[15]<<24));
+ e += (k[16]+(k[17]<<8)+(k[18]<<16)+(k[19]<<24));
+ f += (k[20]+(k[21]<<8)+(k[22]<<16)+(k[23]<<24));
+ g += (k[24]+(k[25]<<8)+(k[26]<<16)+(k[27]<<24));
+ h += (k[28]+(k[29]<<8)+(k[30]<<16)+(k[31]<<24));
+ mixc(a,b,c,d,e,f,g,h);
+ mixc(a,b,c,d,e,f,g,h);
+ mixc(a,b,c,d,e,f,g,h);
+ mixc(a,b,c,d,e,f,g,h);
+ k += 32; len -= 32;
+ }
+
+ /*------------------------------------- handle the last 31 bytes */
+ h += length;
+ switch(len)
+ {
+ case 31: h+=(k[30]<<24);
+ case 30: h+=(k[29]<<16);
+ case 29: h+=(k[28]<<8);
+ case 28: g+=(k[27]<<24);
+ case 27: g+=(k[26]<<16);
+ case 26: g+=(k[25]<<8);
+ case 25: g+=k[24];
+ case 24: f+=(k[23]<<24);
+ case 23: f+=(k[22]<<16);
+ case 22: f+=(k[21]<<8);
+ case 21: f+=k[20];
+ case 20: e+=(k[19]<<24);
+ case 19: e+=(k[18]<<16);
+ case 18: e+=(k[17]<<8);
+ case 17: e+=k[16];
+ case 16: d+=(k[15]<<24);
+ case 15: d+=(k[14]<<16);
+ case 14: d+=(k[13]<<8);
+ case 13: d+=k[12];
+ case 12: c+=(k[11]<<24);
+ case 11: c+=(k[10]<<16);
+ case 10: c+=(k[9]<<8);
+ case 9 : c+=k[8];
+ case 8 : b+=(k[7]<<24);
+ case 7 : b+=(k[6]<<16);
+ case 6 : b+=(k[5]<<8);
+ case 5 : b+=k[4];
+ case 4 : a+=(k[3]<<24);
+ case 3 : a+=(k[2]<<16);
+ case 2 : a+=(k[1]<<8);
+ case 1 : a+=k[0];
+ }
+ mixc(a,b,c,d,e,f,g,h);
+ mixc(a,b,c,d,e,f,g,h);
+ mixc(a,b,c,d,e,f,g,h);
+ mixc(a,b,c,d,e,f,g,h);
+
+ /*-------------------------------------------- report the result */
+ state[0]=a; state[1]=b; state[2]=c; state[3]=d;
+ state[4]=e; state[5]=f; state[6]=g; state[7]=h;
+}
diff --git a/libyasm/phash.h b/libyasm/phash.h
new file mode 100644
index 00000000..5fc44e39
--- /dev/null
+++ b/libyasm/phash.h
@@ -0,0 +1,15 @@
+/* Modified for use with yasm by Peter Johnson.
+ * $Id$
+ */
+/*
+------------------------------------------------------------------------------
+By Bob Jenkins, September 1996.
+lookupa.h, a hash function for table lookup, same function as lookup.c.
+Use this code in any way you wish. Public Domain. It has no warranty.
+Source is http://burtleburtle.net/bob/c/lookupa.h
+------------------------------------------------------------------------------
+*/
+
+unsigned long phash_lookup(const char *k, unsigned long length,
+ unsigned long level);
+void phash_checksum(const char *k, unsigned long length, unsigned long *state);
diff --git a/libyasm/preproc.h b/libyasm/preproc.h
index 24b78b68..a4d74906 100644
--- a/libyasm/preproc.h
+++ b/libyasm/preproc.h
@@ -56,16 +56,17 @@ typedef struct yasm_preproc_module {
* Module-level implementation of yasm_preproc_create().
* Call yasm_preproc_create() instead of calling this function.
*
- * The preprocessor needs access to the object format module to find out
- * any output format specific macros.
- *
* \param f initial starting file
* \param in_filename initial starting filename
* \param lm line mapping repository
+ * \param errwarns error/warnning set.
* \return New preprocessor.
+ *
+ * \note Any preprocessor errors and warnings are stored into errwarns.
*/
/*@only@*/ yasm_preproc * (*create) (FILE *f, const char *in_filename,
- yasm_linemap *lm);
+ yasm_linemap *lm,
+ yasm_errwarns *errwarns);
/** Module-level implementation of yasm_preproc_destroy().
* Call yasm_preproc_destroy() instead of calling this function.
@@ -117,11 +118,13 @@ typedef struct yasm_preproc_module {
* \param f initial starting file
* \param in_filename initial starting file filename
* \param lm line mapping repository
+ * \param errwarns error/warning set
* \return New preprocessor.
+ * \note Errors/warnings are stored into errwarns.
*/
/*@only@*/ yasm_preproc *yasm_preproc_create
(yasm_preproc_module *module, FILE *f, const char *in_filename,
- yasm_linemap *lm);
+ yasm_linemap *lm, yasm_errwarns *errwarns);
/** Cleans up any allocated preproc memory.
* \param preproc preprocessor
@@ -184,8 +187,8 @@ void yasm_preproc_builtin_define(yasm_preproc *preproc,
/* Inline macro implementations for preproc functions */
-#define yasm_preproc_create(module, f, in_filename, lm) \
- module->create(f, in_filename, lm)
+#define yasm_preproc_create(module, f, in_filename, lm, ews) \
+ module->create(f, in_filename, lm, ews)
#define yasm_preproc_destroy(preproc) \
((yasm_preproc_base *)preproc)->module->destroy(preproc)
diff --git a/libyasm/section.c b/libyasm/section.c
index 346f18c7..241805ab 100644
--- a/libyasm/section.c
+++ b/libyasm/section.c
@@ -50,6 +50,9 @@
struct yasm_object {
+ /*@owned@*/ char *src_filename;
+ /*@owned@*/ char *obj_filename;
+
yasm_symtab *symtab;
yasm_linemap *linemap;
@@ -65,9 +68,16 @@ struct yasm_section {
union {
/* SECTION_GENERAL data */
- struct general {
+ struct {
/*@owned@*/ char *name; /* strdup()'ed name (given by user) */
} general;
+ /* SECTION_ABSOLUTE data */
+ struct {
+ /* Internally created first symrec in section. Used by
+ * yasm_expr__level_tree during absolute reference expansion.
+ */
+ /*@dependent@*/ yasm_symrec *first;
+ } absolute;
} data;
/* associated data; NULL if none */
@@ -81,6 +91,8 @@ struct yasm_section {
int code; /* section contains code (instructions) */
int res_only; /* allow only resb family of bytecodes? */
+ int def; /* "default" section, e.g. not specified by
+ using section directive */
/* the bytecodes for the section's contents */
/*@reldef@*/ STAILQ_HEAD(yasm_bytecodehead, yasm_bytecode) bcs;
@@ -96,10 +108,13 @@ static void yasm_section_destroy(/*@only@*/ yasm_section *sect);
/*@-compdestroy@*/
yasm_object *
-yasm_object_create(void)
+yasm_object_create(const char *src_filename, const char *obj_filename)
{
yasm_object *object = yasm_xmalloc(sizeof(yasm_object));
+ object->src_filename = yasm__xstrdup(src_filename);
+ object->obj_filename = yasm__xstrdup(obj_filename);
+
/* Create empty symtab and linemap */
object->symtab = yasm_symtab_create();
object->linemap = yasm_linemap_create();
@@ -163,6 +178,7 @@ yasm_object_get_general(yasm_object *object, const char *name,
s->code = code;
s->res_only = res_only;
+ s->def = 0;
*isnew = 1;
return s;
@@ -196,12 +212,36 @@ yasm_object_create_absolute(yasm_object *object, yasm_expr *start,
STAILQ_INIT(&s->relocs);
s->destroy_reloc = NULL;
+ s->data.absolute.first =
+ yasm_symtab_define_label(object->symtab, ".absstart", bc, 0, 0);
+
+ s->code = 0;
s->res_only = 1;
+ s->def = 0;
return s;
}
/*@=onlytrans@*/
+void
+yasm_object_set_source_fn(yasm_object *object, const char *src_filename)
+{
+ yasm_xfree(object->src_filename);
+ object->src_filename = yasm__xstrdup(src_filename);
+}
+
+const char *
+yasm_object_get_source_fn(const yasm_object *object)
+{
+ return object->src_filename;
+}
+
+const char *
+yasm_object_get_object_fn(const yasm_object *object)
+{
+ return object->obj_filename;
+}
+
yasm_symtab *
yasm_object_get_symtab(const yasm_object *object)
{
@@ -238,6 +278,18 @@ yasm_section_set_opt_flags(yasm_section *sect, unsigned long opt_flags)
sect->opt_flags = opt_flags;
}
+int
+yasm_section_is_default(const yasm_section *sect)
+{
+ return sect->def;
+}
+
+void
+yasm_section_set_default(yasm_section *sect, int def)
+{
+ sect->def = def;
+}
+
yasm_object *
yasm_section_get_object(const yasm_section *sect)
{
@@ -271,6 +323,10 @@ yasm_object_destroy(yasm_object *object)
cur = next;
}
+ /* Delete associated filenames */
+ yasm_xfree(object->src_filename);
+ yasm_xfree(object->obj_filename);
+
/* Delete symbol table and line mappings */
yasm_symtab_destroy(object->symtab);
yasm_linemap_destroy(object->linemap);
@@ -295,7 +351,7 @@ yasm_object_print(const yasm_object *object, FILE *f, int indent_level)
}
void
-yasm_object_finalize(yasm_object *object)
+yasm_object_finalize(yasm_object *object, yasm_errwarns *errwarns)
{
yasm_section *sect;
@@ -312,6 +368,7 @@ yasm_object_finalize(yasm_object *object)
while (cur) {
/* Finalize */
yasm_bc_finalize(cur, prev);
+ yasm_errwarn_propagate(errwarns, cur->line);
prev = cur;
cur = STAILQ_NEXT(cur, link);
}
@@ -408,7 +465,9 @@ yasm_section_bcs_append(yasm_section *sect, yasm_bytecode *bc)
}
int
-yasm_section_bcs_traverse(yasm_section *sect, void *d,
+yasm_section_bcs_traverse(yasm_section *sect,
+ /*@null@*/ yasm_errwarns *errwarns,
+ /*@null@*/ void *d,
int (*func) (yasm_bytecode *bc, /*@null@*/ void *d))
{
yasm_bytecode *cur = STAILQ_FIRST(&sect->bcs);
@@ -419,6 +478,8 @@ yasm_section_bcs_traverse(yasm_section *sect, void *d,
/* Iterate through the remainder, if any. */
while (cur) {
int retval = func(cur, d);
+ if (errwarns)
+ yasm_errwarn_propagate(errwarns, cur->line);
if (retval != 0)
return retval;
cur = STAILQ_NEXT(cur, link);
@@ -434,6 +495,14 @@ yasm_section_get_name(const yasm_section *sect)
return NULL;
}
+yasm_symrec *
+yasm_section_abs_get_sym(const yasm_section *sect)
+{
+ if (sect->type == SECTION_ABSOLUTE)
+ return sect->data.absolute.first;
+ return NULL;
+}
+
void
yasm_section_set_start(yasm_section *sect, yasm_expr *start,
unsigned long line)
@@ -635,7 +704,8 @@ typedef struct yasm_span {
/*@dependent@*/ yasm_bytecode *bc;
- /*@owned@*/ yasm_expr *dependent;
+ yasm_value *depval;
+ yasm_bytecode *origin_prevbc;
/* Special handling: see descriptions above */
enum {
@@ -662,14 +732,15 @@ typedef struct optimize_data {
static void
optimize_add_span(void *add_span_data, yasm_bytecode *bc, int id,
- /*@only@*/ yasm_expr *dependent, long neg_thres,
- long pos_thres)
+ yasm_value *value, /*@null@*/ yasm_bytecode *origin_prevbc,
+ long neg_thres, long pos_thres)
{
optimize_data *optd = (optimize_data *)add_span_data;
yasm_span *span = yasm_xmalloc(sizeof(yasm_span));
span->bc = bc;
- span->dependent = dependent;
+ span->depval = value;
+ span->origin_prevbc = origin_prevbc;
span->special = NOT_SPECIAL;
span->cur_val = 0;
span->new_val = 0;
@@ -751,18 +822,28 @@ yasm_object_optimize(yasm_object *object, yasm_arch *arch)
if (saw_error)
return;
-
+#if 0
/* Step 1b */
STAILQ_FOREACH(span, &optd.spans, link) {
- yasm_expr *depcopy = yasm_expr_copy(span->dependent);
- yasm_intnum *intn =
- yasm_expr_get_intnum(&depcopy, yasm_common_calc_bc_dist);
- if (intn)
- span->new_val = yasm_intnum_get_int(intn);
- else {
- /* absolute, external, or too complex; force to longer form */
- span->new_val = LONG_MAX;
- span->active = 0;
+ /* Handle absolute portion */
+ if (span->depval->abs) {
+ yasm_expr *depcopy = yasm_expr_copy(span->depval->abs);
+ yasm_intnum *intn =
+ yasm_expr_get_intnum(&depcopy, yasm_common_calc_bc_dist);
+ if (intn)
+ span->new_val = yasm_intnum_get_int(intn);
+ else {
+ /* absolute, external, or too complex; force to longer form */
+ span->new_val = LONG_MAX;
+ span->active = 0;
+ }
+ yasm_expr_destroy(depcopy);
+ } else
+ span->new_val = 0;
+
+ /* Handle relative portion */
+ if (span->depval->rel && span->new_val != LONG_MAX) {
+ span->new_val +=
}
if (span->new_val < span->neg_thres
@@ -778,9 +859,8 @@ yasm_object_optimize(yasm_object *object, yasm_arch *arch)
span->active = 0;
}
span->cur_val = span->new_val;
- yasm_expr_destroy(depcopy);
}
-
+#endif
if (saw_error)
return;
diff --git a/libyasm/section.h b/libyasm/section.h
index 4a46e295..63d720e4 100644
--- a/libyasm/section.h
+++ b/libyasm/section.h
@@ -50,9 +50,12 @@ struct yasm_reloc {
/** Create a new object. A default section is created as the first section.
* An empty symbol table (yasm_symtab) and line mapping (yasm_linemap) are
* automatically created.
+ * \param src_filename source filename (e.g. "file.asm")
+ * \param obj_filename object filename (e.g. "file.o")
* \return Newly allocated object.
*/
-/*@only@*/ yasm_object *yasm_object_create(void);
+/*@only@*/ yasm_object *yasm_object_create(const char *src_filename,
+ const char *obj_filename);
/** Create a new, or continue an existing, general section. The section is
* added to the object if there's not already a section by that name.
@@ -100,8 +103,10 @@ void yasm_object_print(const yasm_object *object, FILE *f, int indent_level);
/** Finalize an object after parsing.
* \param object object
+ * \param errwarns error/warning set
+ * \note Errors/warnings are stored into errwarns.
*/
-void yasm_object_finalize(yasm_object *object);
+void yasm_object_finalize(yasm_object *object, yasm_errwarns *errwarns);
/** Traverses all sections in an object, calling a function on each section.
* \param object object
@@ -122,6 +127,24 @@ int yasm_object_sections_traverse
/*@dependent@*/ /*@null@*/ yasm_section *yasm_object_find_general
(yasm_object *object, const char *name);
+/** Change the source filename for an object.
+ * \param object object
+ * \param src_filename new source filename (e.g. "file.asm")
+ */
+void yasm_object_set_source_fn(yasm_object *object, const char *src_filename);
+
+/** Get an object's source filename.
+ * \param object object
+ * \return Source filename.
+ */
+const char *yasm_object_get_source_fn(const yasm_object *object);
+
+/** Get an object's object filename.
+ * \param object object
+ * \return Object filename.
+ */
+const char *yasm_object_get_object_fn(const yasm_object *object);
+
/** Get an object's symbol table (#yasm_symtab).
* \param object object
* \return Symbol table.
@@ -167,6 +190,19 @@ unsigned long yasm_section_get_opt_flags(const yasm_section *sect);
*/
void yasm_section_set_opt_flags(yasm_section *sect, unsigned long opt_flags);
+/** Determine if a section was declared as the "default" section (e.g. not
+ * created through a section directive).
+ * \param sect section
+ * \return Nonzero if section was declared as default.
+ */
+int yasm_section_is_default(const yasm_section *sect);
+
+/** Set section "default" flag to a new value.
+ * \param sect section
+ * \param def new value of default flag
+ */
+void yasm_section_set_default(yasm_section *sect, int def);
+
/** Get object owner of a section.
* \param sect section
* \return Object this section is a part of.
@@ -255,15 +291,18 @@ yasm_bytecode *yasm_section_bcs_last(yasm_section *sect);
/*@returned@*/ /*@only@*/ /*@null@*/ yasm_bytecode *bc);
/** Traverses all bytecodes in a section, calling a function on each bytecode.
- * \param sect section
- * \param d data pointer passed to func on each call
- * \param func function
+ * \param sect section
+ * \param errwarns error/warning set (may be NULL)
+ * \param d data pointer passed to func on each call (may be NULL)
+ * \param func function
* \return Stops early (and returns func's return value) if func returns a
* nonzero value; otherwise 0.
+ * \note If errwarns is non-NULL, yasm_errwarn_propagate() is called after
+ * each call to func (with the bytecode's line number).
*/
int yasm_section_bcs_traverse
- (yasm_section *sect, /*@null@*/ void *d,
- int (*func) (yasm_bytecode *bc, /*@null@*/ void *d));
+ (yasm_section *sect, /*@null@*/ yasm_errwarns *errwarns,
+ /*@null@*/ void *d, int (*func) (yasm_bytecode *bc, /*@null@*/ void *d));
/** Get name of a section.
* \param sect section
@@ -272,6 +311,13 @@ int yasm_section_bcs_traverse
/*@observer@*/ /*@null@*/ const char *yasm_section_get_name
(const yasm_section *sect);
+/** Get starting symbol of an absolute section.
+ * \param sect section
+ * \return Starting symrec, or NULL if section is not absolute.
+ */
+/*@dependent@*/ /*@null@*/ yasm_symrec *yasm_section_abs_get_sym
+ (const yasm_section *sect);
+
/** Change starting address of a section.
* \param sect section
* \param start starting address
diff --git a/libyasm/symrec.c b/libyasm/symrec.c
index 43e43aff..08e90f85 100644
--- a/libyasm/symrec.c
+++ b/libyasm/symrec.c
@@ -59,6 +59,8 @@ typedef enum {
SYM_UNKNOWN, /* for unknown type (COMMON/EXTERN) */
SYM_EQU, /* for EQU defined symbols (expressions) */
SYM_LABEL, /* for labels */
+ SYM_CURPOS, /* for labels representing the current
+ assembly position */
SYM_SPECIAL /* for special symbols that need to be in
the symbol table but otherwise have no
purpose */
@@ -166,8 +168,6 @@ symtab_get_or_new(yasm_symtab *symtab, const char *name, int in_table)
}
/*@=freshtrans =mustfree@*/
-/* Call a function with each symrec. Stops early if 0 returned by func.
- Returns 0 if stopped early. */
int
yasm_symtab_traverse(yasm_symtab *symtab, void *d,
int (*func) (yasm_symrec *sym, void *d))
@@ -175,6 +175,24 @@ yasm_symtab_traverse(yasm_symtab *symtab, void *d,
return HAMT_traverse(symtab->sym_table, d, (int (*) (void *, void *))func);
}
+const yasm_symtab_iter *
+yasm_symtab_first(const yasm_symtab *symtab)
+{
+ return (const yasm_symtab_iter *)HAMT_first(symtab->sym_table);
+}
+
+/*@null@*/ const yasm_symtab_iter *
+yasm_symtab_next(const yasm_symtab_iter *prev)
+{
+ return (const yasm_symtab_iter *)HAMT_next((const HAMTEntry *)prev);
+}
+
+yasm_symrec *
+yasm_symtab_iter_value(const yasm_symtab_iter *cur)
+{
+ return (yasm_symrec *)HAMTEntry_get_data((const HAMTEntry *)cur);
+}
+
yasm_symrec *
yasm_symtab_use(yasm_symtab *symtab, const char *name, unsigned long line)
{
@@ -185,6 +203,12 @@ yasm_symtab_use(yasm_symtab *symtab, const char *name, unsigned long line)
return rec;
}
+yasm_symrec *
+yasm_symtab_get(yasm_symtab *symtab, const char *name)
+{
+ return HAMT_search(symtab->sym_table, name);
+}
+
static /*@dependent@*/ yasm_symrec *
symtab_define(yasm_symtab *symtab, const char *name, sym_type type,
int in_table, unsigned long line)
@@ -193,12 +217,13 @@ symtab_define(yasm_symtab *symtab, const char *name, sym_type type,
/* Has it been defined before (either by DEFINED or COMMON/EXTERN)? */
if (rec->status & SYM_DEFINED) {
- yasm__error(line, N_("redefinition of `%s'"), name);
- yasm__error_at(line, rec->line, N_("`%s' previously defined here"),
+ yasm_error_set_xref(rec->line, N_("`%s' previously defined here"),
+ name);
+ yasm_error_set(YASM_ERROR_GENERAL, N_("redefinition of `%s'"),
name);
} else {
if (rec->visibility & YASM_SYM_EXTERN)
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("`%s' both defined and declared extern"), name);
rec->line = line; /* set line number of definition */
rec->type = type;
@@ -231,12 +256,13 @@ yasm_symtab_define_label(yasm_symtab *symtab, const char *name,
}
yasm_symrec *
-yasm_symtab_define_label2(const char *name, yasm_bytecode *precbc,
- int in_table, unsigned long line)
+yasm_symtab_define_curpos(yasm_symtab *symtab, const char *name,
+ yasm_bytecode *precbc, unsigned long line)
{
- return yasm_symtab_define_label(yasm_object_get_symtab(
- yasm_section_get_object(yasm_bc_get_section(precbc))), name, precbc,
- in_table, line);
+ yasm_symrec *rec;
+ rec = symtab_define(symtab, name, SYM_CURPOS, 0, line);
+ rec->value.precbc = precbc;
+ return rec;
}
yasm_symrec *
@@ -279,7 +305,7 @@ yasm_symrec_declare(yasm_symrec *rec, yasm_sym_vis vis, unsigned long line)
((rec->visibility & YASM_SYM_EXTERN) && (vis == YASM_SYM_EXTERN)))))
rec->visibility |= vis;
else
- yasm__error(line,
+ yasm_error_set(YASM_ERROR_GENERAL,
N_("duplicate definition of `%s'; first defined on line %lu"),
rec->name, rec->line);
}
@@ -288,6 +314,7 @@ typedef struct symtab_finalize_info {
unsigned long firstundef_line;
int undef_extern;
/*@null@*/ yasm_objfmt *objfmt;
+ yasm_errwarns *errwarns;
} symtab_finalize_info;
static int
@@ -300,28 +327,32 @@ symtab_parser_finalize_checksym(yasm_symrec *sym, /*@null@*/ void *d)
if (info->undef_extern && info->objfmt)
yasm_objfmt_extern_declare(info->objfmt, sym->name, NULL, 1);
else {
- yasm__error(sym->line, N_("undefined symbol `%s' (first use)"),
- sym->name);
+ yasm_error_set(YASM_ERROR_GENERAL,
+ N_("undefined symbol `%s' (first use)"), sym->name);
+ yasm_errwarn_propagate(info->errwarns, sym->line);
if (sym->line < info->firstundef_line)
info->firstundef_line = sym->line;
}
}
- return 1;
+ return 0;
}
void
yasm_symtab_parser_finalize(yasm_symtab *symtab, int undef_extern,
- yasm_objfmt *objfmt)
+ yasm_objfmt *objfmt, yasm_errwarns *errwarns)
{
symtab_finalize_info info;
info.firstundef_line = ULONG_MAX;
info.undef_extern = undef_extern;
info.objfmt = objfmt;
+ info.errwarns = errwarns;
yasm_symtab_traverse(symtab, &info, symtab_parser_finalize_checksym);
- if (info.firstundef_line < ULONG_MAX)
- yasm__error(info.firstundef_line,
- N_(" (Each undefined symbol is reported only once.)"));
+ if (info.firstundef_line < ULONG_MAX) {
+ yasm_error_set(YASM_ERROR_GENERAL,
+ N_(" (Each undefined symbol is reported only once.)"));
+ yasm_errwarn_propagate(errwarns, info.firstundef_line);
+ }
}
void
@@ -352,7 +383,7 @@ symrec_print_wrapper(yasm_symrec *sym, /*@null@*/ void *d)
assert(data != NULL);
fprintf(data->f, "%*sSymbol `%s'\n", data->indent_level, "", sym->name);
yasm_symrec_print(sym, data->f, data->indent_level+1);
- return 1;
+ return 0;
}
void
@@ -389,7 +420,8 @@ int
yasm_symrec_get_label(const yasm_symrec *sym,
yasm_symrec_get_label_bytecodep *precbc)
{
- if (sym->type != SYM_LABEL || !sym->value.precbc) {
+ if (!(sym->type == SYM_LABEL || sym->type == SYM_CURPOS)
+ || !sym->value.precbc) {
*precbc = (yasm_symrec_get_label_bytecodep)0xDEADBEEF;
return 0;
}
@@ -403,6 +435,12 @@ yasm_symrec_is_special(const yasm_symrec *sym)
return (sym->type == SYM_SPECIAL);
}
+int
+yasm_symrec_is_curpos(const yasm_symrec *sym)
+{
+ return (sym->type == SYM_CURPOS);
+}
+
void *
yasm_symrec_get_data(yasm_symrec *sym,
const yasm_assoc_data_callback *callback)
@@ -431,7 +469,9 @@ yasm_symrec_print(const yasm_symrec *sym, FILE *f, int indent_level)
fprintf(f, "\n");
break;
case SYM_LABEL:
- fprintf(f, "%*s_Label_\n%*sSection:\n", indent_level, "",
+ case SYM_CURPOS:
+ fprintf(f, "%*s_%s_\n%*sSection:\n", indent_level, "",
+ sym->type == SYM_LABEL ? "Label" : "CurPos",
indent_level, "");
yasm_section_print(yasm_bc_get_section(sym->value.precbc), f,
indent_level+1, 0);
diff --git a/libyasm/symrec.h b/libyasm/symrec.h
index 4d4a879d..a4d97391 100644
--- a/libyasm/symrec.h
+++ b/libyasm/symrec.h
@@ -54,6 +54,17 @@ void yasm_symtab_destroy(/*@only@*/ yasm_symtab *symtab);
/*@dependent@*/ yasm_symrec *yasm_symtab_use
(yasm_symtab *symtab, const char *name, unsigned long line);
+/** Get a reference to a symbol, without "using" it. Should be used for cases
+ * when an internal assembler usage of a symbol shouldn't be treated like a
+ * normal user symbol usage.
+ * \param symtab symbol table
+ * \param name symbol name
+ * \return Symbol (dependent pointer, do not free). May be NULL if symbol
+ * doesn't exist.
+ */
+/*@null@*/ /*@dependent@*/ yasm_symrec *yasm_symtab_get
+ (yasm_symtab *symtab, const char *name);
+
/** Define a symbol as an EQU value.
* \param symtab symbol table
* \param name symbol (EQU) name
@@ -78,18 +89,19 @@ void yasm_symtab_destroy(/*@only@*/ yasm_symtab *symtab);
(yasm_symtab *symtab, const char *name,
/*@dependent@*/ yasm_bytecode *precbc, int in_table, unsigned long line);
-/** Define a symbol as a label, shortcut (no need to find out symtab, it's
- * determined from precbc).
+/** Define a symbol as a label representing the current assembly position.
+ * This should be used for this purpose instead of yasm_symtab_define_label()
+ * as value_finalize_scan() looks for usage of this symbol type for special
+ * handling. The symbol created is not inserted into the symbol table.
+ * \param symtab symbol table
* \param name symbol (label) name
* \param precbc bytecode preceding label
- * \param in_table nonzero if the label should be inserted into the symbol
- * table (some specially-generated ones should not be)
* \param line virtual line of label
* \return Symbol (dependent pointer, do not free).
*/
-/*@dependent@*/ yasm_symrec *yasm_symtab_define_label2
- (const char *name, /*@dependent@*/ yasm_bytecode *precbc, int in_table,
- unsigned long line);
+/*@dependent@*/ yasm_symrec *yasm_symtab_define_curpos
+ (yasm_symtab *symtab, const char *name,
+ /*@dependent@*/ yasm_bytecode *precbc, unsigned long line);
/** Define a special symbol that will appear in the symbol table and have a
* defined name, but have no other data associated with it within the
@@ -142,15 +154,40 @@ int /*@alt void@*/ yasm_symtab_traverse
(yasm_symtab *symtab, /*@null@*/ void *d,
yasm_symtab_traverse_callback func);
+/** Symbol table iterator (opaque type). */
+typedef struct yasm_symtab_iter yasm_symtab_iter;
+
+/** Get an iterator pointing to the first symbol in the symbol table.
+ * \param symtab symbol table
+ * \return Iterator for the symbol table.
+ */
+const yasm_symtab_iter *yasm_symtab_first(const yasm_symtab *symtab);
+
+/** Move a symbol table iterator to the next symbol in the symbol table.
+ * \param prev Previous iterator value
+ * \return Next iterator value, or NULL if no more symbols in the table.
+ */
+/*@null@*/ const yasm_symtab_iter *yasm_symtab_next
+ (const yasm_symtab_iter *prev);
+
+/** Get the symbol corresponding to the current symbol table iterator value.
+ * \param cur iterator value
+ * \return Corresponding symbol.
+ */
+yasm_symrec *yasm_symtab_iter_value(const yasm_symtab_iter *cur);
+
/** Finalize symbol table after parsing stage. Checks for symbols that are
* used but never defined or declared #YASM_SYM_EXTERN or #YASM_SYM_COMMON.
* \param symtab symbol table
* \param undef_extern if nonzero, all undef syms should be declared extern
* \param objfmt object format to notify about new extern decls
* (may be NULL if undef_extern is 0)
+ * \param errwarns error/warning set
+ * \note Errors/warnings are stored into errwarns.
*/
void yasm_symtab_parser_finalize(yasm_symtab *symtab, int undef_extern,
- /*@null@*/ yasm_objfmt *objfmt);
+ /*@null@*/ yasm_objfmt *objfmt,
+ yasm_errwarns *errwarns);
/** Print the symbol table. For debugging purposes.
* \param symtab symbol table
@@ -196,6 +233,12 @@ int yasm_symrec_get_label(const yasm_symrec *sym,
*/
int yasm_symrec_is_special(const yasm_symrec *sym);
+/** Determine if symbol is a label representing the current assembly position.
+ * \param sym symbol
+ * \return 0 if symbol is not a current position label, nonzero otherwise.
+ */
+int yasm_symrec_is_curpos(const yasm_symrec *sym);
+
/** Get associated data for a symbol and data callback.
* \param sym symbol
* \param callback callback used when adding data
diff --git a/libyasm/tests/Makefile.inc b/libyasm/tests/Makefile.inc
index 7d2ad8cb..83016245 100644
--- a/libyasm/tests/Makefile.inc
+++ b/libyasm/tests/Makefile.inc
@@ -3,14 +3,21 @@
TESTS += bitvect_test
TESTS += floatnum_test
TESTS += leb128_test
+TESTS += splitpath_test
+TESTS += combpath_test
TESTS += libyasm/tests/libyasm_test.sh
EXTRA_DIST += libyasm/tests/libyasm_test.sh
+EXTRA_DIST += libyasm/tests/absloop-err.asm
+EXTRA_DIST += libyasm/tests/absloop-err.errwarn
EXTRA_DIST += libyasm/tests/charconst64.asm
EXTRA_DIST += libyasm/tests/charconst64.errwarn
EXTRA_DIST += libyasm/tests/charconst64.hex
EXTRA_DIST += libyasm/tests/duplabel-err.asm
EXTRA_DIST += libyasm/tests/duplabel-err.errwarn
+EXTRA_DIST += libyasm/tests/expr-wide-ident.asm
+EXTRA_DIST += libyasm/tests/expr-wide-ident.errwarn
+EXTRA_DIST += libyasm/tests/expr-wide-ident.hex
EXTRA_DIST += libyasm/tests/externdef.asm
EXTRA_DIST += libyasm/tests/externdef.errwarn
EXTRA_DIST += libyasm/tests/externdef.hex
@@ -22,10 +29,14 @@ EXTRA_DIST += libyasm/tests/timesover-err.errwarn
EXTRA_DIST += libyasm/tests/unary.asm
EXTRA_DIST += libyasm/tests/unary.errwarn
EXTRA_DIST += libyasm/tests/unary.hex
+EXTRA_DIST += libyasm/tests/value-err.asm
+EXTRA_DIST += libyasm/tests/value-err.errwarn
check_PROGRAMS += bitvect_test
check_PROGRAMS += floatnum_test
check_PROGRAMS += leb128_test
+check_PROGRAMS += splitpath_test
+check_PROGRAMS += combpath_test
bitvect_test_SOURCES = libyasm/tests/bitvect_test.c
bitvect_test_LDADD = libyasm.a $(INTLLIBS)
@@ -36,3 +47,9 @@ floatnum_test_LDADD = libyasm.a $(INTLLIBS)
leb128_test_SOURCES = libyasm/tests/leb128_test.c
leb128_test_LDADD = libyasm.a $(INTLLIBS)
+splitpath_test_SOURCES = libyasm/tests/splitpath_test.c
+splitpath_test_LDADD = libyasm.a $(INTLLIBS)
+
+combpath_test_SOURCES = libyasm/tests/combpath_test.c
+combpath_test_LDADD = libyasm.a $(INTLLIBS)
+
diff --git a/libyasm/tests/absloop-err.asm b/libyasm/tests/absloop-err.asm
new file mode 100644
index 00000000..27e88a0f
--- /dev/null
+++ b/libyasm/tests/absloop-err.asm
@@ -0,0 +1,6 @@
+[absolute x]
+label1:
+[absolute label1]
+x:
+[section .text]
+mov ax, [x]
diff --git a/libyasm/tests/absloop-err.errwarn b/libyasm/tests/absloop-err.errwarn
new file mode 100644
index 00000000..79983393
--- /dev/null
+++ b/libyasm/tests/absloop-err.errwarn
@@ -0,0 +1 @@
+-:6: circular reference detected in memory expression
diff --git a/libyasm/tests/combpath_test.c b/libyasm/tests/combpath_test.c
new file mode 100644
index 00000000..5667cc7d
--- /dev/null
+++ b/libyasm/tests/combpath_test.c
@@ -0,0 +1,146 @@
+/* $Id$
+ *
+ * Copyright (C) 2006 Peter Johnson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#endif
+
+#include <stdio.h>
+
+#include "libyasm/file.h"
+#include "libyasm/coretype.h"
+
+typedef struct Test_Entry {
+ /* combpath function to test */
+ char * (*combpath) (const char *from, const char *to);
+
+ /* input "from" path */
+ const char *from;
+
+ /* input "to" path */
+ const char *to;
+
+ /* correct path returned */
+ const char *out;
+} Test_Entry;
+
+static Test_Entry tests[] = {
+ /* UNIX */
+ {yasm__combpath_unix, "file1", "file2", "file2"},
+ {yasm__combpath_unix, "./file1.ext", "./file2.ext", "file2.ext"},
+ {yasm__combpath_unix, "/file1", "file2", "/file2"},
+ {yasm__combpath_unix, "file1", "/file2", "/file2"},
+ {yasm__combpath_unix, "/foo/file1", "../../file2", "/file2"},
+ {yasm__combpath_unix, "/foo//file1", "../../file2", "/file2"},
+ {yasm__combpath_unix, "foo/bar/file1", "../file2", "foo/file2"},
+ {yasm__combpath_unix, "foo/bar/file1", "../../../file2", "../file2"},
+ {yasm__combpath_unix, "foo/bar//file1", "../..//..//file2", "../file2"},
+ {yasm__combpath_unix, "foo/bar/", "file2", "foo/bar/file2"},
+ {yasm__combpath_unix, "../../file1", "../../file2", "../../../../file2"},
+ {yasm__combpath_unix, "../foo/bar/../file1", "../../file2", "../foo/bar/../../../file2"},
+ {yasm__combpath_unix, "/", "../file2", "/file2"},
+ {yasm__combpath_unix, "../foo/", "../file2", "../file2"},
+ {yasm__combpath_unix, "../foo/file1", "../../bar/file2", "../../bar/file2"},
+
+ /* Windows */
+ {yasm__combpath_win, "file1", "file2", "file2"},
+ {yasm__combpath_win, "./file1.ext", "./file2.ext", "file2.ext"},
+ {yasm__combpath_win, "./file1.ext", ".\\file2.ext", "file2.ext"},
+ {yasm__combpath_win, ".\\file1.ext", "./file2.ext", "file2.ext"},
+ {yasm__combpath_win, "/file1", "file2", "\\file2"},
+ {yasm__combpath_win, "\\file1", "file2", "\\file2"},
+ {yasm__combpath_win, "file1", "/file2", "\\file2"},
+ {yasm__combpath_win, "file1", "\\file2", "\\file2"},
+ {yasm__combpath_win, "/foo\\file1", "../../file2", "\\file2"},
+ {yasm__combpath_win, "\\foo\\\\file1", "..\\../file2", "\\file2"},
+ {yasm__combpath_win, "foo/bar/file1", "../file2", "foo\\file2"},
+ {yasm__combpath_win, "foo/bar/file1", "../..\\../file2", "..\\file2"},
+ {yasm__combpath_win, "foo/bar//file1", "../..\\\\..//file2", "..\\file2"},
+ {yasm__combpath_win, "foo/bar/", "file2", "foo\\bar\\file2"},
+ {yasm__combpath_win, "..\\../file1", "../..\\file2", "..\\..\\..\\..\\file2"},
+ {yasm__combpath_win, "../foo/bar\\\\../file1", "../..\\file2", "..\\foo\\bar\\..\\..\\..\\file2"},
+ {yasm__combpath_win, "/", "../file2", "\\file2"},
+ {yasm__combpath_win, "../foo/", "../file2", "..\\file2"},
+ {yasm__combpath_win, "../foo/file1", "../..\\bar\\file2", "..\\..\\bar\\file2"},
+ {yasm__combpath_win, "c:/file1.ext", "./file2.ext", "c:\\file2.ext"},
+ {yasm__combpath_win, "e:\\path\\to/file1.ext", ".\\file2.ext", "e:\\path\\to\\file2.ext"},
+ {yasm__combpath_win, ".\\file1.ext", "g:file2.ext", "g:file2.ext"},
+};
+
+static char failed[1000];
+static char failmsg[100];
+
+static int
+run_test(Test_Entry *test)
+{
+ char *out;
+ const char *funcname;
+
+ if (test->combpath == &yasm__combpath_unix)
+ funcname = "unix";
+ else
+ funcname = "win";
+
+ out = test->combpath(test->from, test->to);
+
+ if (strcmp(out, test->out) != 0) {
+ sprintf(failmsg,
+ "combpath_%s(\"%s\", \"%s\"): expected \"%s\", got \"%s\"!",
+ funcname, test->from, test->to, test->out, out);
+ yasm_xfree(out);
+ return 1;
+ }
+
+ yasm_xfree(out);
+ return 0;
+}
+
+int
+main(void)
+{
+ int nf = 0;
+ int numtests = sizeof(tests)/sizeof(Test_Entry);
+ int i;
+
+ failed[0] = '\0';
+ printf("Test combpath_test: ");
+ for (i=0; i<numtests; i++) {
+ int fail = run_test(&tests[i]);
+ printf("%c", fail>0 ? 'F':'.');
+ fflush(stdout);
+ if (fail)
+ sprintf(failed, "%s ** F: %s\n", failed, failmsg);
+ nf += fail;
+ }
+
+ printf(" +%d-%d/%d %d%%\n%s",
+ numtests-nf, nf, numtests, 100*(numtests-nf)/numtests, failed);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/libyasm/tests/expr-wide-ident.asm b/libyasm/tests/expr-wide-ident.asm
new file mode 100644
index 00000000..8a60e781
--- /dev/null
+++ b/libyasm/tests/expr-wide-ident.asm
@@ -0,0 +1,2 @@
+lea edx, [lentry+edx+ecx]
+lentry:
diff --git a/libyasm/tests/expr-wide-ident.errwarn b/libyasm/tests/expr-wide-ident.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/libyasm/tests/expr-wide-ident.errwarn
diff --git a/libyasm/tests/expr-wide-ident.hex b/libyasm/tests/expr-wide-ident.hex
new file mode 100644
index 00000000..f5a9ca48
--- /dev/null
+++ b/libyasm/tests/expr-wide-ident.hex
@@ -0,0 +1,9 @@
+66
+67
+8d
+94
+0a
+09
+00
+00
+00
diff --git a/libyasm/tests/floatnum_test.c b/libyasm/tests/floatnum_test.c
index 48a20d8a..a7bdb698 100644
--- a/libyasm/tests/floatnum_test.c
+++ b/libyasm/tests/floatnum_test.c
@@ -295,7 +295,7 @@ test_get_single_normalized(void)
for (i=0; i<num; i++) {
get_common_setup(vals, i);
- if (yasm_floatnum_get_sized(flt, outval, 4, 32, 0, 0, 0, 0) !=
+ if (yasm_floatnum_get_sized(flt, outval, 4, 32, 0, 0, 0) !=
vals[i].ret32)
return 1;
if (get_common_check_result(4, outval, vals[i].result32) != 0)
@@ -313,7 +313,7 @@ test_get_single_normalized_edgecase(void)
for (i=0; i<num; i++) {
get_common_setup(vals, i);
- if (yasm_floatnum_get_sized(flt, outval, 4, 32, 0, 0, 0, 0) !=
+ if (yasm_floatnum_get_sized(flt, outval, 4, 32, 0, 0, 0) !=
vals[i].ret32)
return 1;
if (get_common_check_result(4, outval, vals[i].result32) != 0)
@@ -335,7 +335,7 @@ test_get_double_normalized(void)
for (i=0; i<num; i++) {
get_common_setup(vals, i);
- if (yasm_floatnum_get_sized(flt, outval, 8, 64, 0, 0, 0, 0) !=
+ if (yasm_floatnum_get_sized(flt, outval, 8, 64, 0, 0, 0) !=
vals[i].ret64)
return 1;
if (get_common_check_result(8, outval, vals[i].result64) != 0)
@@ -353,7 +353,7 @@ test_get_double_normalized_edgecase(void)
for (i=0; i<num; i++) {
get_common_setup(vals, i);
- if (yasm_floatnum_get_sized(flt, outval, 8, 64, 0, 0, 0, 0) !=
+ if (yasm_floatnum_get_sized(flt, outval, 8, 64, 0, 0, 0) !=
vals[i].ret64)
return 1;
if (get_common_check_result(8, outval, vals[i].result64) != 0)
@@ -375,7 +375,7 @@ test_get_extended_normalized(void)
for (i=0; i<num; i++) {
get_common_setup(vals, i);
- if (yasm_floatnum_get_sized(flt, outval, 10, 80, 0, 0, 0, 0) !=
+ if (yasm_floatnum_get_sized(flt, outval, 10, 80, 0, 0, 0) !=
vals[i].ret80)
return 1;
if (get_common_check_result(10, outval, vals[i].result80) != 0)
@@ -393,7 +393,7 @@ test_get_extended_normalized_edgecase(void)
for (i=0; i<num; i++) {
get_common_setup(vals, i);
- if (yasm_floatnum_get_sized(flt, outval, 10, 80, 0, 0, 0, 0) !=
+ if (yasm_floatnum_get_sized(flt, outval, 10, 80, 0, 0, 0) !=
vals[i].ret80)
return 1;
if (get_common_check_result(10, outval, vals[i].result80) != 0)
diff --git a/libyasm/tests/leb128_test.c b/libyasm/tests/leb128_test.c
index f8ab3465..f2e45852 100644
--- a/libyasm/tests/leb128_test.c
+++ b/libyasm/tests/leb128_test.c
@@ -80,10 +80,10 @@ static char failed[1000];
static char failmsg[100];
static int
-run_test(Test_Entry *test)
+run_output_test(Test_Entry *test)
{
char *valstr = yasm__xstrdup(test->input);
- yasm_intnum *intn = yasm_intnum_create_hex(valstr, 0);
+ yasm_intnum *intn = yasm_intnum_create_hex(valstr);
unsigned long size, i;
unsigned char out[100];
int bad;
@@ -91,7 +91,7 @@ run_test(Test_Entry *test)
yasm_xfree(valstr);
if (test->negate)
- yasm_intnum_calc(intn, YASM_EXPR_NEG, NULL, 0);
+ yasm_intnum_calc(intn, YASM_EXPR_NEG, NULL);
size = yasm_intnum_size_leb128(intn, test->sign);
if (size != test->outsize) {
@@ -129,6 +129,43 @@ run_test(Test_Entry *test)
return 0;
}
+static int
+run_input_test(Test_Entry *test)
+{
+ char *valstr = yasm__xstrdup(test->input);
+ yasm_intnum *intn = yasm_intnum_create_hex(valstr);
+ yasm_intnum *testn;
+ unsigned long size;
+
+ yasm_xfree(valstr);
+
+ if (test->negate)
+ yasm_intnum_calc(intn, YASM_EXPR_NEG, NULL);
+
+ testn = yasm_intnum_create_leb128(test->result, test->sign, &size);
+ if (size != test->outsize) {
+ yasm_intnum_destroy(testn);
+ yasm_intnum_destroy(intn);
+ sprintf(failmsg, "%ssigned %s%s create() bad size: expected %lu, got %lu!",
+ test->sign?"":"un", test->negate?"-":"", test->input,
+ test->outsize, size);
+ return 1;
+ }
+
+ yasm_intnum_calc(intn, YASM_EXPR_EQ, testn);
+ if (!yasm_intnum_is_pos1(intn)) {
+ yasm_intnum_destroy(testn);
+ yasm_intnum_destroy(intn);
+ sprintf(failmsg, "%ssigned %s%s create() bad output!",
+ test->sign?"":"un", test->negate?"-":"", test->input);
+ return 1;
+ }
+
+ yasm_intnum_destroy(testn);
+ yasm_intnum_destroy(intn);
+ return 0;
+}
+
int
main(void)
{
@@ -143,7 +180,16 @@ main(void)
failed[0] = '\0';
printf("Test leb128_test: ");
for (i=0; i<numtests; i++) {
- int fail = run_test(&tests[i]);
+ int fail;
+
+ fail = run_output_test(&tests[i]);
+ printf("%c", fail>0 ? 'F':'.');
+ fflush(stdout);
+ if (fail)
+ sprintf(failed, "%s ** F: %s\n", failed, failmsg);
+ nf += fail;
+
+ fail = run_input_test(&tests[i]);
printf("%c", fail>0 ? 'F':'.');
fflush(stdout);
if (fail)
@@ -154,6 +200,7 @@ main(void)
yasm_intnum_cleanup();
printf(" +%d-%d/%d %d%%\n%s",
- numtests-nf, nf, numtests, 100*(numtests-nf)/numtests, failed);
+ numtests*2-nf, nf, numtests*2, 100*(numtests*2-nf)/(numtests*2),
+ failed);
return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}
diff --git a/libyasm/tests/splitpath_test.c b/libyasm/tests/splitpath_test.c
new file mode 100644
index 00000000..c96d907a
--- /dev/null
+++ b/libyasm/tests/splitpath_test.c
@@ -0,0 +1,161 @@
+/* $Id$
+ *
+ * Copyright (C) 2006 Peter Johnson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#endif
+
+#include <stdio.h>
+
+#include "libyasm/file.h"
+
+typedef struct Test_Entry {
+ /* splitpath function to test */
+ size_t (*splitpath) (const char *path, const char **tail);
+
+ /* input path */
+ const char *input;
+
+ /* correct head length returned */
+ size_t headlen;
+
+ /* correct tail returned */
+ const char *tail;
+} Test_Entry;
+
+static Test_Entry tests[] = {
+ /* UNIX split */
+ {yasm__splitpath_unix, "", 0, ""},
+ {yasm__splitpath_unix, "./file.ext", 0, "file.ext"},
+ {yasm__splitpath_unix, "../../file.ext", 5, "file.ext"},
+ {yasm__splitpath_unix, "file.ext", 0, "file.ext"},
+ {yasm__splitpath_unix, "/file.ext", 1, "file.ext"},
+ {yasm__splitpath_unix, "/foo/file.ext", 4, "file.ext"},
+ {yasm__splitpath_unix, "/foo/bar/file.ext", 8, "file.ext"},
+ {yasm__splitpath_unix, "foo/file.ext", 3, "file.ext"},
+ {yasm__splitpath_unix, "foo/bar/file.ext", 7, "file.ext"},
+ {yasm__splitpath_unix, "foo/bar//file.ext", 7, "file.ext"},
+ {yasm__splitpath_unix, "/", 1, ""},
+ {yasm__splitpath_unix, "/foo/", 4, ""},
+ {yasm__splitpath_unix, "/foo/bar/", 8, ""},
+ {yasm__splitpath_unix, "foo/", 3, ""},
+ {yasm__splitpath_unix, "foo/bar/", 7, ""},
+ {yasm__splitpath_unix, "foo/bar//", 7, ""},
+ /* Windows split */
+ {yasm__splitpath_win, "", 0, ""},
+ {yasm__splitpath_win, "file.ext", 0, "file.ext"},
+ {yasm__splitpath_win, "./file.ext", 0, "file.ext"},
+ {yasm__splitpath_win, "/file.ext", 1, "file.ext"},
+ {yasm__splitpath_win, "/foo/file.ext", 4, "file.ext"},
+ {yasm__splitpath_win, "/foo/bar/file.ext", 8, "file.ext"},
+ {yasm__splitpath_win, "foo/file.ext", 3, "file.ext"},
+ {yasm__splitpath_win, "foo/bar/file.ext", 7, "file.ext"},
+ {yasm__splitpath_win, "foo/bar//file.ext", 7, "file.ext"},
+ {yasm__splitpath_win, "..\\..\\file.ext", 5, "file.ext"},
+ {yasm__splitpath_win, "c:file.ext", 2, "file.ext"},
+ {yasm__splitpath_win, "c:.\\file.ext", 2, "file.ext"},
+ {yasm__splitpath_win, "d:/file.ext", 3, "file.ext"},
+ {yasm__splitpath_win, "e:/foo/file.ext", 6, "file.ext"},
+ {yasm__splitpath_win, "f:/foo/bar/file.ext", 10, "file.ext"},
+ {yasm__splitpath_win, "g:foo/file.ext", 5, "file.ext"},
+ {yasm__splitpath_win, "h:foo/bar/file.ext", 9, "file.ext"},
+ {yasm__splitpath_win, "i:foo/bar//file.ext", 9, "file.ext"},
+ {yasm__splitpath_win, "d:\\file.ext", 3, "file.ext"},
+ {yasm__splitpath_win, "e:\\foo/file.ext", 6, "file.ext"},
+ {yasm__splitpath_win, "f:/foo\\bar\\file.ext", 10, "file.ext"},
+ {yasm__splitpath_win, "g:foo\\file.ext", 5, "file.ext"},
+ {yasm__splitpath_win, "h:foo/bar\\file.ext", 9, "file.ext"},
+ {yasm__splitpath_win, "i:foo\\bar//\\file.ext", 9, "file.ext"},
+ {yasm__splitpath_win, "\\", 1, ""},
+ {yasm__splitpath_win, "c:", 2, ""},
+ {yasm__splitpath_win, "d:\\", 3, ""},
+ {yasm__splitpath_win, "e:\\foo/", 6, ""},
+ {yasm__splitpath_win, "f:/foo\\bar\\", 10, ""},
+ {yasm__splitpath_win, "g:foo\\", 5, ""},
+ {yasm__splitpath_win, "h:foo/bar\\", 9, ""},
+ {yasm__splitpath_win, "i:foo\\bar//\\", 9, ""},
+};
+
+static char failed[1000];
+static char failmsg[100];
+
+static int
+run_test(Test_Entry *test)
+{
+ size_t headlen;
+ const char *tail;
+ const char *funcname;
+
+ if (test->splitpath == &yasm__splitpath_unix)
+ funcname = "unix";
+ else
+ funcname = "win";
+
+ headlen = test->splitpath(test->input, &tail);
+ if (headlen != test->headlen) {
+ sprintf(failmsg,
+ "splitpath_%s(\"%s\") bad head len: expected %lu, got %lu!",
+ funcname, test->input, (unsigned long)test->headlen,
+ (unsigned long)headlen);
+ return 1;
+ }
+
+ if (strcmp(tail, test->tail) != 0) {
+ sprintf(failmsg,
+ "splitpath_%s(\"%s\") bad tail: expected \"%s\", got \"%s\"!",
+ funcname, test->input, test->tail, tail);
+ return 1;
+ }
+
+ return 0;
+}
+
+int
+main(void)
+{
+ int nf = 0;
+ int numtests = sizeof(tests)/sizeof(Test_Entry);
+ int i;
+
+ failed[0] = '\0';
+ printf("Test splitpath_test: ");
+ for (i=0; i<numtests; i++) {
+ int fail = run_test(&tests[i]);
+ printf("%c", fail>0 ? 'F':'.');
+ fflush(stdout);
+ if (fail)
+ sprintf(failed, "%s ** F: %s\n", failed, failmsg);
+ nf += fail;
+ }
+
+ printf(" +%d-%d/%d %d%%\n%s",
+ numtests-nf, nf, numtests, 100*(numtests-nf)/numtests, failed);
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/libyasm/tests/value-err.asm b/libyasm/tests/value-err.asm
new file mode 100644
index 00000000..883fa6fa
--- /dev/null
+++ b/libyasm/tests/value-err.asm
@@ -0,0 +1,9 @@
+label:
+mov [label/2+1], ax
+mov ax, label*2
+mov [label+5], ax
+mov ax, label wrt foo
+foo:
+dd label
+dd label<<5
+dd label>>2
diff --git a/libyasm/tests/value-err.errwarn b/libyasm/tests/value-err.errwarn
new file mode 100644
index 00000000..a7535524
--- /dev/null
+++ b/libyasm/tests/value-err.errwarn
@@ -0,0 +1,3 @@
+-:2: effective address too complex
+-:3: immediate expression too complex
+-:8: data expression too complex
diff --git a/libyasm/value.c b/libyasm/value.c
new file mode 100644
index 00000000..1a0c8b61
--- /dev/null
+++ b/libyasm/value.c
@@ -0,0 +1,541 @@
+/*
+ * Value handling
+ *
+ * Copyright (C) 2006 Peter Johnson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#define YASM_LIB_INTERNAL
+#include "util.h"
+/*@unused@*/ RCSID("$Id$");
+
+#include "coretype.h"
+#include "bitvect.h"
+
+#include "errwarn.h"
+#include "intnum.h"
+#include "floatnum.h"
+#include "expr.h"
+#include "value.h"
+#include "symrec.h"
+
+#include "bytecode.h"
+#include "section.h"
+
+#include "arch.h"
+
+#include "expr-int.h"
+#include "bc-int.h"
+
+static int
+value_finalize_scan(yasm_value *value, yasm_expr *e, int ssym_not_ok)
+{
+ int i;
+ /*@dependent@*/ yasm_section *sect;
+ /*@dependent@*/ /*@null@*/ yasm_bytecode *precbc;
+
+ unsigned long shamt; /* for SHR */
+
+ /* Yes, this has a maximum upper bound on 32 terms, based on an
+ * "insane number of terms" (and ease of implementation) WAG.
+ * The right way to do this would be a stack-based alloca, but that's
+ * not ISO C. We really don't want to malloc here as this function is
+ * hit a lot!
+ *
+ * This is a bitmask to keep things small, as this is a recursive
+ * routine and we don't want to eat up stack space.
+ */
+ unsigned long used; /* for ADD */
+
+ /* Thanks to this running after a simplify, we don't need to iterate
+ * down through IDENTs or handle SUB.
+ *
+ * We scan for a single symrec, gathering info along the way. After
+ * we've found the symrec, we keep scanning but error if we find
+ * another one. We pull out the single symrec and any legal operations
+ * performed on it.
+ *
+ * Also, if we find a float anywhere, we don't allow mixing of a single
+ * symrec with it.
+ */
+ switch (e->op) {
+ case YASM_EXPR_ADD:
+ /* Okay for single symrec anywhere in expr.
+ * Check for single symrec anywhere.
+ * Handle symrec-symrec by checking for (-1*symrec)
+ * and symrec term pairs (where both symrecs are in the same
+ * segment).
+ */
+ if (e->numterms > 32)
+ yasm__fatal(N_("expression on line %d has too many add terms;"
+ " internal limit of 32"), e->line);
+
+ used = 0;
+
+ for (i=0; i<e->numterms; i++) {
+ int j;
+ yasm_expr *sube;
+ yasm_intnum *intn;
+ yasm_symrec *sym;
+ /*@dependent@*/ yasm_section *sect2;
+ /*@dependent@*/ /*@null@*/ yasm_bytecode *precbc2;
+
+ /* First look for an (-1*symrec) term */
+ if (e->terms[i].type != YASM_EXPR_EXPR)
+ continue;
+ sube = e->terms[i].data.expn;
+
+ if (sube->op != YASM_EXPR_MUL || sube->numterms != 2) {
+ /* recurse instead */
+ if (value_finalize_scan(value, sube, ssym_not_ok))
+ return 1;
+ continue;
+ }
+
+ if (sube->terms[0].type == YASM_EXPR_INT &&
+ (sube->terms[1].type == YASM_EXPR_SYM ||
+ sube->terms[1].type == YASM_EXPR_SYMEXP)) {
+ intn = sube->terms[0].data.intn;
+ sym = sube->terms[1].data.sym;
+ } else if ((sube->terms[0].type == YASM_EXPR_SYM ||
+ sube->terms[0].type == YASM_EXPR_SYMEXP) &&
+ sube->terms[1].type == YASM_EXPR_INT) {
+ sym = sube->terms[0].data.sym;
+ intn = sube->terms[1].data.intn;
+ } else {
+ if (value_finalize_scan(value, sube, ssym_not_ok))
+ return 1;
+ continue;
+ }
+
+ if (!yasm_intnum_is_neg1(intn)) {
+ if (value_finalize_scan(value, sube, ssym_not_ok))
+ return 1;
+ continue;
+ }
+
+ if (!yasm_symrec_get_label(sym, &precbc)) {
+ if (value_finalize_scan(value, sube, ssym_not_ok))
+ return 1;
+ continue;
+ }
+ sect2 = yasm_bc_get_section(precbc);
+
+ /* Now look for a unused symrec term in the same segment */
+ for (j=0; j<e->numterms; j++) {
+ if ((e->terms[j].type == YASM_EXPR_SYM
+ || e->terms[j].type == YASM_EXPR_SYMEXP)
+ && yasm_symrec_get_label(e->terms[j].data.sym,
+ &precbc2)
+ && (sect = yasm_bc_get_section(precbc2))
+ && sect == sect2
+ && (used & (1<<j)) == 0) {
+ /* Mark as used */
+ used |= 1<<j;
+ break; /* stop looking */
+ }
+ }
+
+ /* We didn't match in the same segment. If the
+ * -1*symrec is actually -1*curpos, we can match
+ * unused symrec terms in other segments and generate
+ * a curpos-relative reloc.
+ *
+ * Don't do this if we've already become curpos-relative.
+ * The unmatched symrec will be caught below.
+ */
+ if (j == e->numterms && yasm_symrec_is_curpos(sym)
+ && !value->curpos_rel) {
+ for (j=0; j<e->numterms; j++) {
+ if ((e->terms[j].type == YASM_EXPR_SYM
+ || e->terms[j].type == YASM_EXPR_SYMEXP)
+ && yasm_symrec_get_label(e->terms[j].data.sym,
+ &precbc2)
+ && (used & (1<<j)) == 0) {
+ /* Mark as used */
+ used |= 1<<j;
+ /* Mark value as curpos-relative */
+ if (value->rel || ssym_not_ok)
+ return 1;
+ value->rel = e->terms[j].data.sym;
+ value->curpos_rel = 1;
+ /* Replace both symrec portions with 0 */
+ yasm_expr_destroy(sube);
+ e->terms[i].type = YASM_EXPR_INT;
+ e->terms[i].data.intn = yasm_intnum_create_uint(0);
+ e->terms[j].type = YASM_EXPR_INT;
+ e->terms[j].data.intn = yasm_intnum_create_uint(0);
+ break; /* stop looking */
+ }
+ }
+ }
+
+ if (j == e->numterms)
+ return 1; /* We didn't find a match! */
+ }
+
+ /* Look for unmatched symrecs. If we've already found one or
+ * we don't WANT to find one, error out.
+ */
+ for (i=0; i<e->numterms; i++) {
+ if ((e->terms[i].type == YASM_EXPR_SYM
+ || e->terms[i].type == YASM_EXPR_SYMEXP)
+ && (used & (1<<i)) == 0) {
+ if (value->rel || ssym_not_ok)
+ return 1;
+ value->rel = e->terms[i].data.sym;
+ /* and replace with 0 */
+ e->terms[i].type = YASM_EXPR_INT;
+ e->terms[i].data.intn = yasm_intnum_create_uint(0);
+ }
+ }
+ break;
+ case YASM_EXPR_SHR:
+ /* Okay for single symrec in LHS and constant on RHS.
+ * Single symrecs are not okay on RHS.
+ * If RHS is non-constant, don't allow single symrec on LHS.
+ * XXX: should rshift be an expr instead??
+ */
+
+ /* Check for not allowed cases on RHS */
+ switch (e->terms[1].type) {
+ case YASM_EXPR_REG:
+ case YASM_EXPR_FLOAT:
+ return 1; /* not legal */
+ case YASM_EXPR_SYM:
+ case YASM_EXPR_SYMEXP:
+ return 1;
+ case YASM_EXPR_EXPR:
+ if (value_finalize_scan(value, e->terms[1].data.expn, 1))
+ return 1;
+ break;
+ default:
+ break;
+ }
+
+ /* Check for single sym and allowed cases on LHS */
+ switch (e->terms[0].type) {
+ /*case YASM_EXPR_REG: ????? should this be illegal ????? */
+ case YASM_EXPR_FLOAT:
+ return 1; /* not legal */
+ case YASM_EXPR_SYM:
+ case YASM_EXPR_SYMEXP:
+ if (value->rel || ssym_not_ok)
+ return 1;
+ value->rel = e->terms[0].data.sym;
+ /* and replace with 0 */
+ e->terms[0].type = YASM_EXPR_INT;
+ e->terms[0].data.intn = yasm_intnum_create_uint(0);
+ break;
+ case YASM_EXPR_EXPR:
+ /* recurse */
+ if (value_finalize_scan(value, e->terms[0].data.expn,
+ ssym_not_ok))
+ return 1;
+ break;
+ default:
+ break; /* ignore */
+ }
+
+ /* Handle RHS */
+ if (!value->rel)
+ break; /* no handling needed */
+ if (e->terms[1].type != YASM_EXPR_INT)
+ return 1; /* can't shift sym by non-constant integer */
+ shamt = yasm_intnum_get_uint(e->terms[1].data.intn);
+ if ((shamt + value->rshift) > YASM_VALUE_RSHIFT_MAX)
+ return 1; /* total shift would be too large */
+ value->rshift += shamt;
+
+ /* Just leave SHR in place */
+ break;
+ case YASM_EXPR_SEG:
+ /* Okay for single symrec (can only be done once).
+ * Not okay for anything BUT a single symrec as an immediate
+ * child.
+ */
+ if (e->terms[0].type != YASM_EXPR_SYM
+ && e->terms[0].type != YASM_EXPR_SYMEXP)
+ return 1;
+
+ if (value->seg_of)
+ return 1; /* multiple SEG not legal */
+ value->seg_of = 1;
+
+ if (value->rel || ssym_not_ok)
+ return 1; /* got a relative portion somewhere else? */
+ value->rel = e->terms[0].data.sym;
+
+ /* replace with ident'ed 0 */
+ e->op = YASM_EXPR_IDENT;
+ e->terms[0].type = YASM_EXPR_INT;
+ e->terms[0].data.intn = yasm_intnum_create_uint(0);
+ break;
+ case YASM_EXPR_WRT:
+ /* Okay for single symrec in LHS and either a register or single
+ * symrec (as an immediate child) on RHS.
+ * If a single symrec on RHS, can only be done once.
+ * WRT reg is left in expr for arch to look at.
+ */
+
+ /* Handle RHS */
+ switch (e->terms[1].type) {
+ case YASM_EXPR_SYM:
+ case YASM_EXPR_SYMEXP:
+ if (value->wrt)
+ return 1;
+ value->wrt = e->terms[1].data.sym;
+ /* and drop the WRT portion */
+ e->op = YASM_EXPR_IDENT;
+ e->numterms = 1;
+ break;
+ case YASM_EXPR_REG:
+ break; /* ignore */
+ default:
+ return 1;
+ }
+
+ /* Handle LHS */
+ switch (e->terms[0].type) {
+ case YASM_EXPR_SYM:
+ case YASM_EXPR_SYMEXP:
+ if (value->rel || ssym_not_ok)
+ return 1;
+ value->rel = e->terms[0].data.sym;
+ /* and replace with 0 */
+ e->terms[0].type = YASM_EXPR_INT;
+ e->terms[0].data.intn = yasm_intnum_create_uint(0);
+ break;
+ case YASM_EXPR_EXPR:
+ /* recurse */
+ return value_finalize_scan(value, e->terms[0].data.expn,
+ ssym_not_ok);
+ default:
+ break; /* ignore */
+ }
+
+ break;
+ default:
+ /* Single symrec not allowed anywhere */
+ for (i=0; i<e->numterms; i++) {
+ switch (e->terms[i].type) {
+ case YASM_EXPR_SYM:
+ case YASM_EXPR_SYMEXP:
+ return 1;
+ case YASM_EXPR_EXPR:
+ /* recurse */
+ return value_finalize_scan(value,
+ e->terms[i].data.expn, 1);
+ default:
+ break;
+ }
+ }
+ break;
+ }
+
+ return 0;
+}
+
+int
+yasm_value_finalize_expr(yasm_value *value, yasm_expr *e, unsigned int size)
+{
+ if (!e) {
+ yasm_value_initialize(value, NULL, size);
+ return 0;
+ }
+
+ yasm_value_initialize(value, yasm_expr__level_tree
+ (e, 1, 1, 0, NULL, NULL, NULL, NULL), size);
+
+ /* quit early if there was an issue in simplify() */
+ if (yasm_error_occurred())
+ return 1;
+
+ /* Handle trivial (IDENT) cases immediately */
+ if (value->abs->op == YASM_EXPR_IDENT) {
+ switch (value->abs->terms[0].type) {
+ case YASM_EXPR_INT:
+ if (yasm_intnum_is_zero(value->abs->terms[0].data.intn)) {
+ yasm_expr_destroy(value->abs);
+ value->abs = NULL;
+ }
+ return 0;
+ case YASM_EXPR_REG:
+ case YASM_EXPR_FLOAT:
+ return 0;
+ case YASM_EXPR_SYM:
+ case YASM_EXPR_SYMEXP:
+ value->rel = value->abs->terms[0].data.sym;
+ yasm_expr_destroy(value->abs);
+ value->abs = NULL;
+ return 0;
+ case YASM_EXPR_EXPR:
+ /* Bring up lower values. */
+ while (value->abs->op == YASM_EXPR_IDENT
+ && value->abs->terms[0].type == YASM_EXPR_EXPR) {
+ yasm_expr *sube = value->abs->terms[0].data.expn;
+ yasm_xfree(value->abs);
+ value->abs = sube;
+ }
+ break;
+ default:
+ yasm_internal_error(N_("unexpected expr term type"));
+ }
+ }
+
+ if (value_finalize_scan(value, value->abs, 0))
+ return 1;
+
+ value->abs = yasm_expr__level_tree(value->abs, 1, 1, 0, NULL, NULL, NULL,
+ NULL);
+
+ /* Simplify 0 in abs to NULL */
+ if (value->abs->op == YASM_EXPR_IDENT
+ && value->abs->terms[0].type == YASM_EXPR_INT
+ && yasm_intnum_is_zero(value->abs->terms[0].data.intn)) {
+ yasm_expr_destroy(value->abs);
+ value->abs = NULL;
+ }
+ return 0;
+}
+
+int
+yasm_value_finalize(yasm_value *value)
+{
+ unsigned int valsize = value->size;
+ return yasm_value_finalize_expr(value, value->abs, valsize);
+}
+
+int
+yasm_value_output_basic(yasm_value *value, /*@out@*/ unsigned char *buf,
+ size_t destsize, yasm_bytecode *bc, int warn,
+ yasm_arch *arch, yasm_calc_bc_dist_func calc_bc_dist)
+{
+ /*@dependent@*/ /*@null@*/ yasm_intnum *intn = NULL;
+ /*@only@*/ yasm_intnum *outval;
+ int sym_local;
+ int retval = 1;
+ unsigned int valsize = value->size;
+
+ if (value->abs) {
+ /* Handle floating point expressions */
+ if (!value->rel && value->abs->op == YASM_EXPR_IDENT
+ && value->abs->terms[0].type == YASM_EXPR_FLOAT) {
+ if (yasm_arch_floatnum_tobytes(arch, value->abs->terms[0].data.flt,
+ buf, destsize, valsize, 0, warn))
+ return -1;
+ else
+ return 1;
+ }
+
+ /* Check for complex float expressions */
+ if (yasm_expr__contains(value->abs, YASM_EXPR_FLOAT)) {
+ yasm_error_set(YASM_ERROR_FLOATING_POINT,
+ N_("floating point expression too complex"));
+ return -1;
+ }
+
+ /* Handle integer expressions */
+ intn = yasm_expr_get_intnum(&value->abs, calc_bc_dist);
+ if (!intn) {
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("expression too complex"));
+ return -1;
+ }
+ }
+
+ if (value->rel) {
+ /* If relative portion is not in bc section, don't try to handle it
+ * here. Otherwise get the relative portion's offset.
+ */
+ /*@dependent@*/ yasm_bytecode *rel_prevbc;
+ unsigned long dist;
+
+ sym_local = yasm_symrec_get_label(value->rel, &rel_prevbc);
+ if (value->wrt || value->seg_of || value->section_rel || !sym_local)
+ return 0; /* we can't handle SEG, WRT, or external symbols */
+ if (rel_prevbc->section != bc->section)
+ return 0; /* not in this section */
+ if (!value->curpos_rel)
+ return 0; /* not PC-relative */
+
+ /* Calculate value relative to current assembly position */
+ dist = rel_prevbc->offset + rel_prevbc->len;
+ if (dist < bc->offset) {
+ outval = yasm_intnum_create_uint(bc->offset - dist);
+ yasm_intnum_calc(outval, YASM_EXPR_NEG, NULL);
+ } else {
+ dist -= bc->offset;
+ outval = yasm_intnum_create_uint(dist);
+ }
+
+ if (value->rshift > 0) {
+ /*@only@*/ yasm_intnum *shamt =
+ yasm_intnum_create_uint((unsigned long)value->rshift);
+ yasm_intnum_calc(outval, YASM_EXPR_SHR, shamt);
+ yasm_intnum_destroy(shamt);
+ }
+ /* Add in absolute portion */
+ if (intn)
+ yasm_intnum_calc(outval, YASM_EXPR_ADD, intn);
+ /* Output! */
+ if (yasm_arch_intnum_tobytes(arch, outval, buf, destsize, valsize, 0,
+ bc, warn))
+ retval = -1;
+ yasm_intnum_destroy(outval);
+ } else if (intn) {
+ /* Output just absolute portion */
+ if (yasm_arch_intnum_tobytes(arch, intn, buf, destsize, valsize, 0, bc,
+ warn))
+ retval = -1;
+ } else {
+ /* No absolute or relative portions: output 0 */
+ outval = yasm_intnum_create_uint(0);
+ if (yasm_arch_intnum_tobytes(arch, outval, buf, destsize, valsize, 0,
+ bc, warn))
+ retval = -1;
+ yasm_intnum_destroy(outval);
+ }
+ return retval;
+}
+
+void
+yasm_value_print(const yasm_value *value, FILE *f, int indent_level)
+{
+ fprintf(f, "%*sAbsolute portion=", indent_level, "");
+ yasm_expr_print(value->abs, f);
+ fprintf(f, "\n");
+ if (value->rel) {
+ fprintf(f, "%*sRelative to=%s%s\n", indent_level, "",
+ value->seg_of ? "SEG " : "",
+ yasm_symrec_get_name(value->rel));
+ if (value->wrt)
+ fprintf(f, "%*s(With respect to=%s)\n", indent_level, "",
+ yasm_symrec_get_name(value->wrt));
+ if (value->rshift > 0)
+ fprintf(f, "%*s(Right shifted by=%u)\n", indent_level, "",
+ value->rshift);
+ if (value->curpos_rel)
+ fprintf(f, "%*s(Relative to current position)\n", indent_level,
+ "");
+ }
+}
diff --git a/libyasm/value.h b/libyasm/value.h
new file mode 100644
index 00000000..8687f9c8
--- /dev/null
+++ b/libyasm/value.h
@@ -0,0 +1,164 @@
+/**
+ * \file libyasm/value.h
+ * \brief YASM value interface.
+ *
+ * \rcs
+ * $Id$
+ * \endrcs
+ *
+ * \license
+ * Copyright (C) 2006 Peter Johnson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ * \endlicense
+ */
+#ifndef YASM_VALUE_H
+#define YASM_VALUE_H
+
+/** Initialize a #yasm_value with just an expression. No processing is
+ * performed, the expression is simply stuck into value.abs and the other
+ * fields are initialized. Use yasm_expr_extract_value() to perform "smart"
+ * processing into a #yasm_value. This function is intended for use during
+ * parsing simply to ensure all fields of the value are initialized; after
+ * the parse is complete, yasm_value_extract() should be called to finalize
+ * the value.
+ * \param value value to be initialized
+ * \param e expression (kept)
+ * \param size value size (in bits)
+ */
+void yasm_value_initialize(/*@out@*/ yasm_value *value,
+ /*@null@*/ /*@kept@*/ yasm_expr *e,
+ unsigned int size);
+
+/** Initialize a #yasm_value with just a symrec. No processing is performed,
+ * the symrec is simply stuck into value.rel and the other fields are
+ * initialized.
+ * \param value value to be initialized
+ * \param sym symrec
+ */
+void yasm_value_init_sym(/*@out@*/ yasm_value *value,
+ /*@null@*/ yasm_symrec *sym);
+
+/** Frees any memory inside value; does not free value itself.
+ * \param value value
+ */
+void yasm_value_delete(yasm_value *value);
+
+/** Perform yasm_value_finalize_expr() on a value that already exists from
+ * being initialized with yasm_value_initialize().
+ * \param value value
+ * \return Nonzero if value could not be split.
+ */
+int yasm_value_finalize(yasm_value *value);
+
+/** Break a #yasm_expr into a #yasm_value constituent parts. Extracts
+ * the relative portion of the value, SEG and WRT portions, and top-level
+ * right shift, if any. Places the remaining expr into the absolute
+ * portion of the value. Essentially a combination of yasm_value_initialize()
+ * and yasm_value_finalize(). First expands references to symrecs in
+ * absolute sections by expanding with the absolute section start plus the
+ * symrec offset within the absolute section.
+ * \param value value to store split portions into
+ * \param e expression input
+ * \param size value size (in bits)
+ * \return Nonzero if the expr could not be split into a value for some
+ * reason (e.g. the relative portion was not added, but multiplied,
+ * etc).
+ * \caution Do not use e after this call. Even if an error is returned, e
+ * is stored into value.
+ * \note This should only be called after the parse is complete. Calling
+ * before the parse is complete will usually result in an error return.
+ */
+int yasm_value_finalize_expr(/*@out@*/ yasm_value *value,
+ /*@null@*/ /*@kept@*/ yasm_expr *e,
+ unsigned int size);
+
+/** Output value if constant or PC-relative section-local. This should be
+ * used from objfmt yasm_output_value_func() functions.
+ * functions.
+ * \param value value
+ * \param buf buffer for byte representation
+ * \param destsize destination size (in bytes)
+ * \param bc current bytecode (usually passed into higher-level
+ * calling function)
+ * \param warn enables standard warnings: zero for none;
+ * nonzero for overflow/underflow floating point warnings;
+ * negative for signed integer warnings,
+ * positive for unsigned integer warnings
+ * \param arch architecture
+ * \param calc_bc_dist function used to determine bytecode distance
+ * \note Adds in value.rel (correctly) if PC-relative and in the same section
+ * as bc (and there is no WRT or SEG); if this is not the desired
+ * behavior, e.g. a reloc is needed in this case, don't use this
+ * function!
+ * \return 0 if no value output due to value needing relocation;
+ * 1 if value output; -1 if error.
+ */
+int yasm_value_output_basic
+ (yasm_value *value, /*@out@*/ unsigned char *buf, size_t destsize,
+ yasm_bytecode *bc, int warn, yasm_arch *arch,
+ yasm_calc_bc_dist_func calc_bc_dist);
+
+/** Print a value. For debugging purposes.
+ * \param value value
+ * \param indent_level indentation level
+ * \param f file
+ */
+void yasm_value_print(const yasm_value *value, FILE *f, int indent_level);
+
+
+#ifndef YASM_DOXYGEN
+#define yasm_value_initialize(value, e, sz) \
+ do { \
+ (value)->abs = e; \
+ (value)->rel = NULL; \
+ (value)->wrt = NULL; \
+ (value)->seg_of = 0; \
+ (value)->rshift = 0; \
+ (value)->curpos_rel = 0; \
+ (value)->ip_rel = 0; \
+ (value)->section_rel = 0; \
+ (value)->size = sz; \
+ } while(0)
+
+#define yasm_value_init_sym(value, sym, sz) \
+ do { \
+ (value)->abs = NULL; \
+ (value)->rel = sym; \
+ (value)->wrt = NULL; \
+ (value)->seg_of = 0; \
+ (value)->rshift = 0; \
+ (value)->curpos_rel = 0; \
+ (value)->ip_rel = 0; \
+ (value)->section_rel = 0; \
+ (value)->size = sz; \
+ } while(0)
+
+#define yasm_value_delete(value) \
+ do { \
+ yasm_expr_destroy((value)->abs); \
+ (value)->abs = NULL; \
+ (value)->rel = NULL; \
+ } while(0)
+#endif
+
+#endif
diff --git a/libyasm/xstrdup.c b/libyasm/xstrdup.c
index 3e1ebb59..c52c12cc 100644
--- a/libyasm/xstrdup.c
+++ b/libyasm/xstrdup.c
@@ -39,16 +39,6 @@ static char sccsid[] = "@(#)strdup.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
-#ifndef STDC_HEADERS
-size_t strlen(const char *);
-# ifndef HAVE_MEMCPY
-void bcopy(const void *, void *, size_t);
-# define memcpy(d, s, n) bcopy((s), (d), (n))
-# else
-void memcpy(void *, const void *, size_t);
-# endif
-#endif
-
#ifdef WITH_DMALLOC
#undef yasm__xstrdup
#endif
diff --git a/m4/Makefile.inc b/m4/Makefile.inc
index 6cd21522..4dac7a1c 100644
--- a/m4/Makefile.inc
+++ b/m4/Makefile.inc
@@ -26,3 +26,5 @@ EXTRA_DIST += m4/longlong.m4
EXTRA_DIST += m4/progtest.m4
EXTRA_DIST += m4/stdint_h.m4
EXTRA_DIST += m4/uintmax_t.m4
+EXTRA_DIST += m4/pythonhead.m4
+EXTRA_DIST += m4/pyrex.m4
diff --git a/m4/ax_create_stdint_h.m4 b/m4/ax_create_stdint_h.m4
index 7e6882cc..927fb696 100644
--- a/m4/ax_create_stdint_h.m4
+++ b/m4/ax_create_stdint_h.m4
@@ -80,7 +80,7 @@ AC_CACHE_CHECK([for stdint uintptr_t], [ac_cv_header_stdint_x],[
unset ac_cv_type_uint64_t
AC_CHECK_TYPE(uintptr_t,[ac_cv_header_stdint_x=$i],continue,[#include <$i>])
AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>])
- m4_ifvaln([$1],[$1]) break
+ break;
done
AC_MSG_CHECKING([for stdint uintptr_t])
])
@@ -95,7 +95,6 @@ AC_CACHE_CHECK([for stdint uint32_t], [ac_cv_header_stdint_o],[
unset ac_cv_type_uint64_t
AC_CHECK_TYPE(uint32_t,[ac_cv_header_stdint_o=$i],continue,[#include <$i>])
AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>])
- m4_ifvaln([$1],[$1]) break
break;
done
AC_MSG_CHECKING([for stdint uint32_t])
@@ -111,7 +110,6 @@ AC_CACHE_CHECK([for stdint u_int32_t], [ac_cv_header_stdint_u],[
unset ac_cv_type_u_int64_t
AC_CHECK_TYPE(u_int32_t,[ac_cv_header_stdint_u=$i],continue,[#include <$i>])
AC_CHECK_TYPE(u_int64_t,[and64="/u_int64_t"],[and64=""],[#include<$i>])
- m4_ifvaln([$1],[$1]) break
break;
done
AC_MSG_CHECKING([for stdint u_int32_t])
@@ -203,11 +201,11 @@ AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>])
fi # shortcircut to system "stdint.h"
# ------------------ PREPARE VARIABLES ------------------------------
-if test "$GCC" = "yes" ; then
-ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
-else
+#if test "$GCC" = "yes" ; then
+#ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
+#else
ac_cv_stdint_message="using $CC"
-fi
+#fi
AC_MSG_RESULT([make use of $ac_cv_header_stdint in $ac_stdint_h dnl
$ac_cv_stdint_result])
@@ -353,11 +351,11 @@ echo "" >>$ac_stdint
#ifndef _STDINT_HEADER_INTPTR
#define _STDINT_NEED_INTPTR_T
+#endif
+
#ifndef _STDINT_HAVE_INTMAX_T
#define _STDINT_NEED_INTMAX_T
#endif
-#endif
-
/* .................... definition part ............................ */
diff --git a/m4/pyrex.m4 b/m4/pyrex.m4
new file mode 100644
index 00000000..b7610c29
--- /dev/null
+++ b/m4/pyrex.m4
@@ -0,0 +1,17 @@
+dnl a macro to check for the installed Pyrex version; note PYTHON needs to
+dnl be set before this function is called.
+dnl PYREX_CHECK_VERSION([MIN-VERSION], [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+AC_DEFUN([PYREX_CHECK_VERSION],
+ [prog="import sys
+from Pyrex.Compiler.Version import version
+# split strings by '.' and convert to numeric. Append some zeros
+# because we need at least 4 digits for the hex conversion.
+pyrexver = map(int, version.split('.')) + [[0, 0, 0]]
+pyrexverhex = 0
+for i in xrange(0, 4): pyrexverhex = (pyrexverhex << 8) + pyrexver[[i]]
+minver = map(int, '$1'.split('.')) + [[0, 0, 0]]
+minverhex = 0
+for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]]
+sys.exit(pyrexverhex < minverhex)"
+ AS_IF([AM_RUN_LOG([$PYTHON -c "$prog"])], [$2], [$3])])
+
diff --git a/m4/pythonhead.m4 b/m4/pythonhead.m4
new file mode 100644
index 00000000..1e0f2b63
--- /dev/null
+++ b/m4/pythonhead.m4
@@ -0,0 +1,24 @@
+dnl a macro to check for ability to create python extensions
+dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
+dnl function also defines PYTHON_INCLUDES
+AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
+[AC_REQUIRE([AM_PATH_PYTHON])
+AC_MSG_CHECKING(for headers required to compile python extensions)
+dnl deduce PYTHON_INCLUDES
+py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
+py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
+PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
+if test "$py_prefix" != "$py_exec_prefix"; then
+ PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
+fi
+AC_SUBST(PYTHON_INCLUDES)
+dnl check if the headers exist:
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
+AC_TRY_CPP([#include <Python.h>],dnl
+[AC_MSG_RESULT(found)
+$1],dnl
+[AC_MSG_RESULT(not found)
+$2])
+CPPFLAGS="$save_CPPFLAGS"
+])
diff --git a/modules/arch/lc3b/lc3barch.c b/modules/arch/lc3b/lc3barch.c
index 7691b081..cefbeb19 100644
--- a/modules/arch/lc3b/lc3barch.c
+++ b/modules/arch/lc3b/lc3barch.c
@@ -71,6 +71,12 @@ lc3b_get_machine(/*@unused@*/ const yasm_arch *arch)
return "lc3b";
}
+static unsigned int
+lc3b_get_address_size(/*@unused@*/ const yasm_arch *arch)
+{
+ return 16;
+}
+
static int
lc3b_set_var(yasm_arch *arch, const char *var, unsigned long val)
{
@@ -93,35 +99,42 @@ static const unsigned char **
lc3b_get_fill(const yasm_arch *arch)
{
/* NOP pattern is all 0's per LC-3b Assembler 3.50 output */
- static const char *fill[16] = {
+ static const unsigned char *fill[16] = {
NULL, /* unused */
NULL, /* 1 - illegal; all opcodes are 2 bytes long */
+ (const unsigned char *)
"\x00\x00", /* 4 */
NULL, /* 3 - illegal */
+ (const unsigned char *)
"\x00\x00\x00\x00", /* 4 */
NULL, /* 5 - illegal */
+ (const unsigned char *)
"\x00\x00\x00\x00\x00\x00", /* 6 */
NULL, /* 7 - illegal */
+ (const unsigned char *)
"\x00\x00\x00\x00\x00\x00" /* 8 */
"\x00\x00",
NULL, /* 9 - illegal */
+ (const unsigned char *)
"\x00\x00\x00\x00\x00\x00" /* 10 */
"\x00\x00\x00\x00",
NULL, /* 11 - illegal */
+ (const unsigned char *)
"\x00\x00\x00\x00\x00\x00" /* 12 */
"\x00\x00\x00\x00\x00\x00",
NULL, /* 13 - illegal */
+ (const unsigned char *)
"\x00\x00\x00\x00\x00\x00" /* 14 */
"\x00\x00\x00\x00\x00\x00\x00\x00",
NULL /* 15 - illegal */
};
- return (const unsigned char **)fill;
+ return fill;
}
static unsigned int
lc3b_get_reg_size(/*@unused@*/ yasm_arch *arch, /*@unused@*/ unsigned long reg)
{
- return 2;
+ return 16;
}
static unsigned long
@@ -141,9 +154,10 @@ lc3b_reg_print(/*@unused@*/ yasm_arch *arch, unsigned long reg, FILE *f)
static int
lc3b_floatnum_tobytes(yasm_arch *arch, const yasm_floatnum *flt,
unsigned char *buf, size_t destsize, size_t valsize,
- size_t shift, int warn, unsigned long line)
+ size_t shift, int warn)
{
- yasm__error(line, N_("LC-3b does not support floating point"));
+ yasm_error_set(YASM_ERROR_FLOATING_POINT,
+ N_("LC-3b does not support floating point"));
return 1;
}
@@ -167,19 +181,15 @@ yasm_arch_module yasm_lc3b_LTX_arch = {
lc3b_create,
lc3b_destroy,
lc3b_get_machine,
+ lc3b_get_address_size,
lc3b_set_var,
yasm_lc3b__parse_cpu,
- yasm_lc3b__parse_check_reg,
- yasm_lc3b__parse_check_reggroup,
- yasm_lc3b__parse_check_segreg,
- yasm_lc3b__parse_check_insn,
- yasm_lc3b__parse_check_prefix,
- yasm_lc3b__parse_check_targetmod,
+ yasm_lc3b__parse_check_insnprefix,
+ yasm_lc3b__parse_check_regtmod,
lc3b_parse_directive,
lc3b_get_fill,
yasm_lc3b__finalize_insn,
lc3b_floatnum_tobytes,
- yasm_lc3b__intnum_fixup_rel,
yasm_lc3b__intnum_tobytes,
lc3b_get_reg_size,
lc3b_reggroup_get_reg,
@@ -188,6 +198,7 @@ yasm_arch_module yasm_lc3b_LTX_arch = {
lc3b_ea_create_expr,
lc3b_machines,
"lc3b",
- 2,
- 512
+ 16,
+ 512,
+ 2
};
diff --git a/modules/arch/lc3b/lc3barch.h b/modules/arch/lc3b/lc3barch.h
index f034d4da..7d199bb9 100644
--- a/modules/arch/lc3b/lc3barch.h
+++ b/modules/arch/lc3b/lc3barch.h
@@ -42,37 +42,23 @@ typedef enum lc3b_imm_type {
/* Bytecode types */
typedef struct lc3b_insn {
- /*@null@*/ yasm_expr *imm; /* immediate or relative value */
+ yasm_value imm; /* immediate or relative value */
lc3b_imm_type imm_type; /* size of the immediate */
- /*@null@*/ /*@dependent@*/ yasm_symrec *origin; /* PC origin if needed */
+ /* PC origin if needed */
+ /*@null@*/ /*@dependent@*/ yasm_bytecode *origin_prevbc;
unsigned int opcode; /* opcode */
} lc3b_insn;
void yasm_lc3b__bc_transform_insn(yasm_bytecode *bc, lc3b_insn *insn);
-void yasm_lc3b__parse_cpu(yasm_arch *arch, const char *cpuid,
- unsigned long line);
+void yasm_lc3b__parse_cpu(yasm_arch *arch, const char *cpuid, size_t cpuid_len);
-int yasm_lc3b__parse_check_reg
- (yasm_arch *arch, unsigned long data[1], const char *id,
- unsigned long line);
-int yasm_lc3b__parse_check_reggroup
- (yasm_arch *arch, unsigned long data[1], const char *id,
- unsigned long line);
-int yasm_lc3b__parse_check_segreg
- (yasm_arch *arch, unsigned long data[1], const char *id,
- unsigned long line);
-int yasm_lc3b__parse_check_insn
- (yasm_arch *arch, unsigned long data[4], const char *id,
- unsigned long line);
-int yasm_lc3b__parse_check_prefix
- (yasm_arch *arch, unsigned long data[4], const char *id,
- unsigned long line);
-int yasm_lc3b__parse_check_targetmod
- (yasm_arch *arch, unsigned long data[1], const char *id,
- unsigned long line);
+yasm_arch_insnprefix yasm_lc3b__parse_check_insnprefix
+ (yasm_arch *arch, unsigned long data[4], const char *id, size_t id_len);
+yasm_arch_regtmod yasm_lc3b__parse_check_regtmod
+ (yasm_arch *arch, unsigned long *data, const char *id, size_t id_len);
void yasm_lc3b__finalize_insn
(yasm_arch *arch, yasm_bytecode *bc, yasm_bytecode *prev_bc,
@@ -80,12 +66,8 @@ void yasm_lc3b__finalize_insn
/*@null@*/ yasm_insn_operands *operands, int num_prefixes,
unsigned long **prefixes, int num_segregs, const unsigned long *segregs);
-int yasm_lc3b__intnum_fixup_rel
- (yasm_arch *arch, yasm_intnum *intn, size_t valsize,
- const yasm_bytecode *bc, unsigned long line);
-
int yasm_lc3b__intnum_tobytes
(yasm_arch *arch, const yasm_intnum *intn, unsigned char *buf,
size_t destsize, size_t valsize, int shift, const yasm_bytecode *bc,
- int warn, unsigned long line);
+ int warn);
#endif
diff --git a/modules/arch/lc3b/lc3bbc.c b/modules/arch/lc3b/lc3bbc.c
index 6f189d40..59e607fa 100644
--- a/modules/arch/lc3b/lc3bbc.c
+++ b/modules/arch/lc3b/lc3bbc.c
@@ -42,7 +42,7 @@ static void lc3b_bc_insn_print(const void *contents, FILE *f,
static yasm_bc_resolve_flags lc3b_bc_insn_resolve
(yasm_bytecode *bc, int save, yasm_calc_bc_dist_func calc_bc_dist);
static int lc3b_bc_insn_tobytes(yasm_bytecode *bc, unsigned char **bufp,
- void *d, yasm_output_expr_func output_expr,
+ void *d, yasm_output_value_func output_value,
/*@null@*/ yasm_output_reloc_func output_reloc);
/* Bytecode callback structures */
@@ -52,7 +52,8 @@ static const yasm_bytecode_callback lc3b_bc_callback_insn = {
lc3b_bc_insn_print,
yasm_bc_finalize_common,
lc3b_bc_insn_resolve,
- lc3b_bc_insn_tobytes
+ lc3b_bc_insn_tobytes,
+ 0
};
@@ -66,8 +67,7 @@ static void
lc3b_bc_insn_destroy(void *contents)
{
lc3b_insn *insn = (lc3b_insn *)contents;
- if (insn->imm)
- yasm_expr_destroy(insn->imm);
+ yasm_value_delete(&insn->imm);
yasm_xfree(contents);
}
@@ -78,13 +78,13 @@ lc3b_bc_insn_print(const void *contents, FILE *f, int indent_level)
fprintf(f, "%*s_Instruction_\n", indent_level, "");
fprintf(f, "%*sImmediate Value:", indent_level, "");
- if (!insn->imm)
+ if (!insn->imm.abs)
fprintf(f, " (nil)\n");
else {
indent_level++;
- fprintf(f, "\n%*sVal=", indent_level, "");
- yasm_expr_print(insn->imm, f);
- fprintf(f, "\n%*sType=", indent_level, "");
+ fprintf(f, "\n");
+ yasm_value_print(&insn->imm, f, indent_level);
+ fprintf(f, "%*sType=", indent_level, "");
switch (insn->imm_type) {
case LC3B_IMM_NONE:
fprintf(f, "NONE-SHOULDN'T HAPPEN");
@@ -113,12 +113,14 @@ lc3b_bc_insn_print(const void *contents, FILE *f, int indent_level)
}
indent_level--;
}
+ /* FIXME
fprintf(f, "\n%*sOrigin=", indent_level, "");
if (insn->origin) {
fprintf(f, "\n");
yasm_symrec_print(insn->origin, f, indent_level+1);
} else
fprintf(f, "(nil)\n");
+ */
fprintf(f, "%*sOpcode: %04x\n", indent_level, "",
(unsigned int)insn->opcode);
}
@@ -128,8 +130,8 @@ lc3b_bc_insn_resolve(yasm_bytecode *bc, int save,
yasm_calc_bc_dist_func calc_bc_dist)
{
lc3b_insn *insn = (lc3b_insn *)bc->contents;
- /*@null@*/ yasm_expr *temp;
- /*@dependent@*/ /*@null@*/ const yasm_intnum *num;
+ yasm_bytecode *target_prevbc;
+ /*@only@*/ yasm_intnum *num;
long rel;
/* Fixed size instruction length */
@@ -141,21 +143,35 @@ lc3b_bc_insn_resolve(yasm_bytecode *bc, int save,
if (insn->imm_type != LC3B_IMM_9_PC || !save)
return YASM_BC_RESOLVE_MIN_LEN;
- temp = yasm_expr_copy(insn->imm);
- temp = yasm_expr_create(YASM_EXPR_SUB, yasm_expr_expr(temp),
- yasm_expr_sym(insn->origin), bc->line);
- num = yasm_expr_get_intnum(&temp, calc_bc_dist);
- if (!num) {
- yasm__error(bc->line, N_("target external or out of segment"));
+ if (!insn->imm.rel)
+ num = yasm_intnum_create_uint(0);
+ else if (!yasm_symrec_get_label(insn->imm.rel, &target_prevbc)
+ || target_prevbc->section != insn->origin_prevbc->section
+ || !(num = calc_bc_dist(insn->origin_prevbc, target_prevbc))) {
+ /* External or out of segment, so we can't check distance. */
+ return YASM_BC_RESOLVE_MIN_LEN;
+ }
+
+ if (insn->imm.abs) {
+ /*@only@*/ yasm_expr *temp = yasm_expr_copy(insn->imm.abs);
+ /*@dependent@*/ /*@null@*/ yasm_intnum *num2;
+ num2 = yasm_expr_get_intnum(&temp, calc_bc_dist);
+ if (!num2) {
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("jump target too complex"));
+ yasm_expr_destroy(temp);
+ return YASM_BC_RESOLVE_ERROR | YASM_BC_RESOLVE_UNKNOWN_LEN;
+ }
+ yasm_intnum_calc(num, YASM_EXPR_ADD, num2);
yasm_expr_destroy(temp);
- return YASM_BC_RESOLVE_ERROR | YASM_BC_RESOLVE_UNKNOWN_LEN;
}
+
rel = yasm_intnum_get_int(num);
+ yasm_intnum_destroy(num);
rel -= 2;
- yasm_expr_destroy(temp);
/* 9-bit signed, word-multiple displacement */
if (rel < -512 || rel > 511) {
- yasm__error(bc->line, N_("target out of range"));
+ yasm_error_set(YASM_ERROR_OVERFLOW, N_("target out of range"));
return YASM_BC_RESOLVE_ERROR | YASM_BC_RESOLVE_UNKNOWN_LEN;
}
return YASM_BC_RESOLVE_MIN_LEN;
@@ -163,10 +179,11 @@ lc3b_bc_insn_resolve(yasm_bytecode *bc, int save,
static int
lc3b_bc_insn_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
+ yasm_output_value_func output_value,
/*@unused@*/ yasm_output_reloc_func output_reloc)
{
lc3b_insn *insn = (lc3b_insn *)bc->contents;
+ /*@only@*/ yasm_intnum *delta;
/* Output opcode */
YASM_SAVE_16_L(*bufp, insn->opcode);
@@ -176,34 +193,49 @@ lc3b_bc_insn_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
case LC3B_IMM_NONE:
break;
case LC3B_IMM_4:
- if (output_expr(&insn->imm, *bufp, 2, 4, 0, 0, bc, 0, 1, d))
+ insn->imm.size = 4;
+ if (output_value(&insn->imm, *bufp, 2, 0, bc, 1, d))
return 1;
break;
case LC3B_IMM_5:
- if (output_expr(&insn->imm, *bufp, 2, 5, 0, 0, bc, 0, 1, d))
+ insn->imm.size = 5;
+ if (output_value(&insn->imm, *bufp, 2, 0, bc, -1, d))
return 1;
break;
case LC3B_IMM_6_WORD:
- if (output_expr(&insn->imm, *bufp, 2, 6, -1, 0, bc, 0, 1, d))
+ insn->imm.size = 6;
+ if (output_value(&insn->imm, *bufp, 2, 0, bc, 1, d))
return 1;
break;
case LC3B_IMM_6_BYTE:
- if (output_expr(&insn->imm, *bufp, 2, 6, 0, 0, bc, 0, 1, d))
+ insn->imm.size = 6;
+ if (output_value(&insn->imm, *bufp, 2, 0, bc, -1, d))
return 1;
break;
case LC3B_IMM_8:
- if (output_expr(&insn->imm, *bufp, 2, 8, -1, 0, bc, 0, 1, d))
+ insn->imm.size = 8;
+ if (output_value(&insn->imm, *bufp, 2, 0, bc, 1, d))
return 1;
break;
case LC3B_IMM_9_PC:
- insn->imm = yasm_expr_create(YASM_EXPR_SUB,
- yasm_expr_expr(insn->imm), yasm_expr_sym(insn->origin),
- bc->line);
- if (output_expr(&insn->imm, *bufp, 2, 9, -1, 0, bc, 1, 1, d))
+ /* Adjust relative displacement to end of bytecode */
+ delta = yasm_intnum_create_int(-1);
+ if (!insn->imm.abs)
+ insn->imm.abs = yasm_expr_create_ident(yasm_expr_int(delta),
+ bc->line);
+ else
+ insn->imm.abs =
+ yasm_expr_create(YASM_EXPR_ADD,
+ yasm_expr_expr(insn->imm.abs),
+ yasm_expr_int(delta), bc->line);
+
+ insn->imm.size = 9;
+ if (output_value(&insn->imm, *bufp, 2, 0, bc, -1, d))
return 1;
break;
case LC3B_IMM_9:
- if (output_expr(&insn->imm, *bufp, 2, 9, -1, 0, bc, 0, 1, d))
+ insn->imm.size = 9;
+ if (output_value(&insn->imm, *bufp, 2, 0, bc, 1, d))
return 1;
break;
default:
@@ -215,28 +247,11 @@ lc3b_bc_insn_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
}
int
-yasm_lc3b__intnum_fixup_rel(yasm_arch *arch, yasm_intnum *intn,
- size_t valsize, const yasm_bytecode *bc,
- unsigned long line)
-{
- yasm_intnum *delta;
- if (valsize != 9)
- yasm_internal_error(
- N_("tried to do PC-relative offset from invalid sized value"));
- delta = yasm_intnum_create_uint(bc->len);
- yasm_intnum_calc(intn, YASM_EXPR_SUB, delta, line);
- yasm_intnum_destroy(delta);
- return 0;
-}
-
-int
yasm_lc3b__intnum_tobytes(yasm_arch *arch, const yasm_intnum *intn,
unsigned char *buf, size_t destsize, size_t valsize,
- int shift, const yasm_bytecode *bc, int warn,
- unsigned long line)
+ int shift, const yasm_bytecode *bc, int warn)
{
/* Write value out. */
- yasm_intnum_get_sized(intn, buf, destsize, valsize, shift, 0, warn,
- line);
+ yasm_intnum_get_sized(intn, buf, destsize, valsize, shift, 0, warn);
return 0;
}
diff --git a/modules/arch/lc3b/lc3bid.re b/modules/arch/lc3b/lc3bid.re
index 4a8926ba..0c7e82a4 100644
--- a/modules/arch/lc3b/lc3bid.re
+++ b/modules/arch/lc3b/lc3bid.re
@@ -119,7 +119,7 @@ typedef struct lc3b_insn_info {
#define RET_INSN(group, mod) do { \
DEF_INSN_DATA(group, mod); \
- return 1; \
+ return YASM_ARCH_INSN; \
} while (0)
/*
@@ -232,16 +232,16 @@ yasm_lc3b__finalize_insn(yasm_arch *arch, yasm_bytecode *bc,
if (!found) {
/* Didn't find a matching one */
- yasm__error(bc->line,
- N_("invalid combination of opcode and operands"));
+ yasm_error_set(YASM_ERROR_TYPE,
+ N_("invalid combination of opcode and operands"));
return;
}
/* Copy what we can from info */
insn = yasm_xmalloc(sizeof(lc3b_insn));
- insn->imm = NULL;
+ yasm_value_initialize(&insn->imm, NULL, 0);
insn->imm_type = LC3B_IMM_NONE;
- insn->origin = NULL;
+ insn->origin_prevbc = NULL;
insn->opcode = info->opcode;
/* Apply modifiers */
@@ -258,6 +258,7 @@ yasm_lc3b__finalize_insn(yasm_arch *arch, yasm_bytecode *bc,
if (operands) {
for(i = 0, op = yasm_ops_first(operands); op && i<info->num_operands;
op = yasm_operand_next(op), i++) {
+
switch ((int)(info->operands[i] & OPA_MASK)) {
case OPA_None:
/* Throw away the operand contents */
@@ -275,14 +276,28 @@ yasm_lc3b__finalize_insn(yasm_arch *arch, yasm_bytecode *bc,
insn->opcode |= ((unsigned int)(op->data.reg & 0x7)) << 6;
break;
case OPA_Imm:
+ insn->imm_type = (info->operands[i] & OPI_MASK)>>3;
switch (op->type) {
case YASM_INSN__OPERAND_IMM:
- insn->imm = op->data.val;
+ if (insn->imm_type == LC3B_IMM_6_WORD
+ || insn->imm_type == LC3B_IMM_8
+ || insn->imm_type == LC3B_IMM_9
+ || insn->imm_type == LC3B_IMM_9_PC)
+ op->data.val = yasm_expr_create(YASM_EXPR_SHR,
+ yasm_expr_expr(op->data.val),
+ yasm_expr_int(yasm_intnum_create_uint(1)),
+ op->data.val->line);
+ if (yasm_value_finalize_expr(&insn->imm,
+ op->data.val, 0))
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("immediate expression too complex"));
break;
case YASM_INSN__OPERAND_REG:
- insn->imm = yasm_expr_create_ident(yasm_expr_int(
- yasm_intnum_create_uint(op->data.reg & 0x7)),
- bc->line);
+ if (yasm_value_finalize_expr(&insn->imm,
+ yasm_expr_create_ident(yasm_expr_int(
+ yasm_intnum_create_uint(op->data.reg & 0x7)),
+ bc->line), 0))
+ yasm_internal_error(N_("reg expr too complex?"));
break;
default:
yasm_internal_error(N_("invalid operand conversion"));
@@ -291,75 +306,61 @@ yasm_lc3b__finalize_insn(yasm_arch *arch, yasm_bytecode *bc,
default:
yasm_internal_error(N_("unknown operand action"));
}
+ }
- insn->imm_type = (info->operands[i] & OPI_MASK)>>3;
- if (insn->imm_type == LC3B_IMM_9_PC)
- insn->origin = yasm_symtab_define_label2("$", prev_bc, 0,
- bc->line);
+ if (insn->imm_type == LC3B_IMM_9_PC) {
+ insn->origin_prevbc = prev_bc;
+ if (insn->imm.seg_of || insn->imm.rshift > 1
+ || insn->imm.curpos_rel)
+ yasm_error_set(YASM_ERROR_VALUE, N_("invalid jump target"));
+ insn->imm.curpos_rel = 1;
}
}
- if (!insn->imm)
- insn->imm_type = LC3B_IMM_NONE;
-
/* Transform the bytecode */
yasm_lc3b__bc_transform_insn(bc, insn);
}
-#define YYCTYPE char
+#define YYCTYPE unsigned char
#define YYCURSOR id
#define YYLIMIT id
#define YYMARKER marker
#define YYFILL(n) (void)(n)
void
-yasm_lc3b__parse_cpu(yasm_arch *arch, const char *id, unsigned long line)
+yasm_lc3b__parse_cpu(yasm_arch *arch, const char *cpuid, size_t cpuid_len)
{
}
-int
-yasm_lc3b__parse_check_reg(yasm_arch *arch, unsigned long data[1],
- const char *id, unsigned long line)
+yasm_arch_regtmod
+yasm_lc3b__parse_check_regtmod(yasm_arch *arch, unsigned long *data,
+ const char *oid, size_t id_len)
{
- const char *oid = id;
+ const YYCTYPE *id = (const YYCTYPE *)oid;
/*const char *marker;*/
/*!re2c
/* integer registers */
'r' [0-7] {
- data[0] = (oid[1]-'0');
- return 1;
+ *data = (oid[1]-'0');
+ return YASM_ARCH_REG;
}
/* catchalls */
[\001-\377]+ {
- return 0;
+ return YASM_ARCH_NOTREGTMOD;
}
[\000] {
- return 0;
+ return YASM_ARCH_NOTREGTMOD;
}
*/
}
-int
-yasm_lc3b__parse_check_reggroup(yasm_arch *arch, unsigned long data[1],
- const char *id, unsigned long line)
-{
- return 0;
-}
-
-int
-yasm_lc3b__parse_check_segreg(yasm_arch *arch, unsigned long data[1],
- const char *id, unsigned long line)
+yasm_arch_insnprefix
+yasm_lc3b__parse_check_insnprefix(yasm_arch *arch, unsigned long data[4],
+ const char *oid, size_t id_len)
{
- return 0;
-}
-
-int
-yasm_lc3b__parse_check_insn(yasm_arch *arch, unsigned long data[4],
- const char *id, unsigned long line)
-{
- const char *oid = id;
+ const YYCTYPE *id = (const YYCTYPE *)oid;
/*const char *marker;*/
/*!re2c
/* instructions */
@@ -403,24 +404,10 @@ yasm_lc3b__parse_check_insn(yasm_arch *arch, unsigned long data[4],
/* catchalls */
[\001-\377]+ {
- return 0;
+ return YASM_ARCH_NOTINSNPREFIX;
}
[\000] {
- return 0;
+ return YASM_ARCH_NOTINSNPREFIX;
}
*/
}
-
-int
-yasm_lc3b__parse_check_prefix(yasm_arch *arch, unsigned long data[4],
- const char *id, unsigned long line)
-{
- return 0;
-}
-
-int
-yasm_lc3b__parse_check_targetmod(yasm_arch *arch, unsigned long data[1],
- const char *id, unsigned long line)
-{
- return 0;
-}
diff --git a/modules/arch/lc3b/tests/lc3b-basic.asm b/modules/arch/lc3b/tests/lc3b-basic.asm
index 93b6f40f..4cfa7754 100644
--- a/modules/arch/lc3b/tests/lc3b-basic.asm
+++ b/modules/arch/lc3b/tests/lc3b-basic.asm
@@ -2,7 +2,7 @@ add r7, r6, r5
add r4, r3, 22
label:
and r2, r1, r0
-and r2, r5, 22
+and r2, r5, 5
brz label
br label2
diff --git a/modules/arch/lc3b/tests/lc3b-basic.errwarn b/modules/arch/lc3b/tests/lc3b-basic.errwarn
index e69de29b..8a232a02 100644
--- a/modules/arch/lc3b/tests/lc3b-basic.errwarn
+++ b/modules/arch/lc3b/tests/lc3b-basic.errwarn
@@ -0,0 +1 @@
+-:2: warning: value does not fit in signed 5 bit field
diff --git a/modules/arch/lc3b/tests/lc3b-basic.hex b/modules/arch/lc3b/tests/lc3b-basic.hex
index d23ea431..9e90c961 100644
--- a/modules/arch/lc3b/tests/lc3b-basic.hex
+++ b/modules/arch/lc3b/tests/lc3b-basic.hex
@@ -4,7 +4,7 @@ f6
18
40
54
-76
+65
55
fd
05
diff --git a/modules/arch/x86/Makefile.inc b/modules/arch/x86/Makefile.inc
index b50caf80..24e90fa7 100644
--- a/modules/arch/x86/Makefile.inc
+++ b/modules/arch/x86/Makefile.inc
@@ -4,18 +4,20 @@ libyasm_a_SOURCES += modules/arch/x86/x86arch.c
libyasm_a_SOURCES += modules/arch/x86/x86arch.h
libyasm_a_SOURCES += modules/arch/x86/x86bc.c
libyasm_a_SOURCES += modules/arch/x86/x86expr.c
-libyasm_a_SOURCES += x86id.c
+libyasm_a_SOURCES += modules/arch/x86/x86id.c
YASM_MODULES += arch_x86
-x86id.c: $(srcdir)/modules/arch/x86/x86id.re re2c$(EXEEXT)
- $(top_builddir)/re2c$(EXEEXT) -s -o $@ $(srcdir)/modules/arch/x86/x86id.re
+modules/arch/x86/x86id.c: x86parse.c
-BUILT_SOURCES += x86id.c
+EXTRA_DIST += modules/arch/x86/x86parse.gap
-CLEANFILES += x86id.c
+x86parse.c: $(srcdir)/modules/arch/x86/x86parse.gap gap$(EXEEXT)
+ $(top_builddir)/gap$(EXEEXT) $(srcdir)/modules/arch/x86/x86parse.gap $@
+
+BUILT_SOURCES += x86parse.c
+CLEANFILES += x86parse.c
EXTRA_DIST += modules/arch/x86/tests/Makefile.inc
-EXTRA_DIST += modules/arch/x86/x86id.re
include modules/arch/x86/tests/Makefile.inc
diff --git a/modules/arch/x86/tests/Makefile.inc b/modules/arch/x86/tests/Makefile.inc
index 3110b842..2e075691 100644
--- a/modules/arch/x86/tests/Makefile.inc
+++ b/modules/arch/x86/tests/Makefile.inc
@@ -39,6 +39,9 @@ EXTRA_DIST += modules/arch/x86/tests/effaddr.hex
EXTRA_DIST += modules/arch/x86/tests/enter.asm
EXTRA_DIST += modules/arch/x86/tests/enter.errwarn
EXTRA_DIST += modules/arch/x86/tests/enter.hex
+EXTRA_DIST += modules/arch/x86/tests/far64.asm
+EXTRA_DIST += modules/arch/x86/tests/far64.errwarn
+EXTRA_DIST += modules/arch/x86/tests/far64.hex
EXTRA_DIST += modules/arch/x86/tests/farbasic.asm
EXTRA_DIST += modules/arch/x86/tests/farbasic.errwarn
EXTRA_DIST += modules/arch/x86/tests/farbasic.hex
@@ -127,6 +130,14 @@ EXTRA_DIST += modules/arch/x86/tests/pshift.hex
EXTRA_DIST += modules/arch/x86/tests/push64.asm
EXTRA_DIST += modules/arch/x86/tests/push64.errwarn
EXTRA_DIST += modules/arch/x86/tests/push64.hex
+EXTRA_DIST += modules/arch/x86/tests/pushf.asm
+EXTRA_DIST += modules/arch/x86/tests/pushf.errwarn
+EXTRA_DIST += modules/arch/x86/tests/pushf.hex
+EXTRA_DIST += modules/arch/x86/tests/pushf-err.asm
+EXTRA_DIST += modules/arch/x86/tests/pushf-err.errwarn
+EXTRA_DIST += modules/arch/x86/tests/pushnosize.asm
+EXTRA_DIST += modules/arch/x86/tests/pushnosize.errwarn
+EXTRA_DIST += modules/arch/x86/tests/pushnosize.hex
EXTRA_DIST += modules/arch/x86/tests/rep.asm
EXTRA_DIST += modules/arch/x86/tests/rep.errwarn
EXTRA_DIST += modules/arch/x86/tests/rep.hex
@@ -157,6 +168,9 @@ EXTRA_DIST += modules/arch/x86/tests/sse3.hex
EXTRA_DIST += modules/arch/x86/tests/stos.asm
EXTRA_DIST += modules/arch/x86/tests/stos.errwarn
EXTRA_DIST += modules/arch/x86/tests/stos.hex
+EXTRA_DIST += modules/arch/x86/tests/str.asm
+EXTRA_DIST += modules/arch/x86/tests/str.errwarn
+EXTRA_DIST += modules/arch/x86/tests/str.hex
EXTRA_DIST += modules/arch/x86/tests/stringseg.asm
EXTRA_DIST += modules/arch/x86/tests/stringseg.errwarn
EXTRA_DIST += modules/arch/x86/tests/stringseg.hex
diff --git a/modules/arch/x86/tests/addbyte.errwarn b/modules/arch/x86/tests/addbyte.errwarn
index dd7e671c..a154fd48 100644
--- a/modules/arch/x86/tests/addbyte.errwarn
+++ b/modules/arch/x86/tests/addbyte.errwarn
@@ -1,2 +1,4 @@
--:15: warning: value does not fit in 8 bit field
--:32: warning: value does not fit in 8 bit field
+-:12: warning: value does not fit in signed 8 bit field
+-:15: warning: value does not fit in signed 8 bit field
+-:29: warning: value does not fit in signed 8 bit field
+-:32: warning: value does not fit in signed 8 bit field
diff --git a/modules/arch/x86/tests/arithsmall.errwarn b/modules/arch/x86/tests/arithsmall.errwarn
index 4c42cce4..7b1c7ab9 100644
--- a/modules/arch/x86/tests/arithsmall.errwarn
+++ b/modules/arch/x86/tests/arithsmall.errwarn
@@ -1,2 +1,2 @@
--:6: warning: value does not fit in 8 bit field
--:12: warning: value does not fit in 8 bit field
+-:6: warning: value does not fit in signed 8 bit field
+-:12: warning: value does not fit in signed 8 bit field
diff --git a/modules/arch/x86/tests/far64.asm b/modules/arch/x86/tests/far64.asm
new file mode 100644
index 00000000..4456b88d
--- /dev/null
+++ b/modules/arch/x86/tests/far64.asm
@@ -0,0 +1,7 @@
+[bits 64]
+call far dword [0]
+call far qword [0]
+call far [0]
+jmp far dword [0]
+jmp far qword [0]
+jmp far [0]
diff --git a/modules/arch/x86/tests/far64.errwarn b/modules/arch/x86/tests/far64.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/arch/x86/tests/far64.errwarn
diff --git a/modules/arch/x86/tests/far64.hex b/modules/arch/x86/tests/far64.hex
new file mode 100644
index 00000000..88bdcd75
--- /dev/null
+++ b/modules/arch/x86/tests/far64.hex
@@ -0,0 +1,44 @@
+ff
+1c
+25
+00
+00
+00
+00
+48
+ff
+1c
+25
+00
+00
+00
+00
+ff
+1c
+25
+00
+00
+00
+00
+ff
+2c
+25
+00
+00
+00
+00
+48
+ff
+2c
+25
+00
+00
+00
+00
+ff
+2c
+25
+00
+00
+00
+00
diff --git a/modules/arch/x86/tests/fwdequ64.asm b/modules/arch/x86/tests/fwdequ64.asm
index 4418fa4f..ac096a5f 100644
--- a/modules/arch/x86/tests/fwdequ64.asm
+++ b/modules/arch/x86/tests/fwdequ64.asm
@@ -1,4 +1,4 @@
[bits 64]
l1:
inc dword [l2]
-l2 equ 4-l1
+l2 equ 4-(l1-$$)
diff --git a/modules/arch/x86/tests/gas32/align32.hex b/modules/arch/x86/tests/gas32/align32.hex
index 66b48bb9..77181969 100644
--- a/modules/arch/x86/tests/gas32/align32.hex
+++ b/modules/arch/x86/tests/gas32/align32.hex
@@ -80,84 +80,84 @@ eb
90
ff
ff
-8d
-b4
-26
-00
-00
-00
-00
-8d
-bc
-27
-00
-00
-00
-00
+eb
+0c
+90
+90
+90
+90
+90
+90
+90
+90
+90
+90
+90
+90
ff
ff
ff
-8d
-b6
-00
-00
-00
-00
-8d
-bc
-27
-00
-00
-00
-00
+eb
+0b
+90
+90
+90
+90
+90
+90
+90
+90
+90
+90
+90
ff
ff
ff
ff
-8d
-b6
-00
-00
-00
-00
-8d
-bf
-00
-00
-00
-00
+eb
+0a
+90
+90
+90
+90
+90
+90
+90
+90
+90
+90
ff
ff
ff
ff
ff
-8d
-74
-26
-00
-8d
-bc
-27
-00
-00
-00
-00
+eb
+09
+90
+90
+90
+90
+90
+90
+90
+90
+90
ff
ff
ff
ff
ff
ff
-8d
-76
-00
-8d
-bc
-27
-00
-00
-00
-00
+eb
+08
+90
+90
+90
+90
+90
+90
+90
+90
ff
ff
ff
@@ -165,15 +165,15 @@ ff
ff
ff
ff
-89
-f6
-8d
-bc
-27
-00
-00
-00
-00
+eb
+07
+90
+90
+90
+90
+90
+90
+90
ff
ff
ff
diff --git a/modules/arch/x86/tests/gas64/Makefile.inc b/modules/arch/x86/tests/gas64/Makefile.inc
index f8a1f87e..d92a4715 100644
--- a/modules/arch/x86/tests/gas64/Makefile.inc
+++ b/modules/arch/x86/tests/gas64/Makefile.inc
@@ -18,6 +18,9 @@ EXTRA_DIST += modules/arch/x86/tests/gas64/gas-inout.hex
EXTRA_DIST += modules/arch/x86/tests/gas64/gas-moreinsn.asm
EXTRA_DIST += modules/arch/x86/tests/gas64/gas-moreinsn.errwarn
EXTRA_DIST += modules/arch/x86/tests/gas64/gas-moreinsn.hex
+EXTRA_DIST += modules/arch/x86/tests/gas64/gas-movabs.asm
+EXTRA_DIST += modules/arch/x86/tests/gas64/gas-movabs.errwarn
+EXTRA_DIST += modules/arch/x86/tests/gas64/gas-movabs.hex
EXTRA_DIST += modules/arch/x86/tests/gas64/gas-movdq64.asm
EXTRA_DIST += modules/arch/x86/tests/gas64/gas-movdq64.errwarn
EXTRA_DIST += modules/arch/x86/tests/gas64/gas-movdq64.hex
diff --git a/modules/arch/x86/tests/gas64/gas-fp.hex b/modules/arch/x86/tests/gas64/gas-fp.hex
index f61bb837..cfea2727 100644
--- a/modules/arch/x86/tests/gas64/gas-fp.hex
+++ b/modules/arch/x86/tests/gas64/gas-fp.hex
@@ -136,7 +136,7 @@ db
00
00
00
-d9
+dd
d9
d9
1c
diff --git a/modules/arch/x86/tests/gas64/gas-movabs.asm b/modules/arch/x86/tests/gas64/gas-movabs.asm
new file mode 100644
index 00000000..d4d9a1a9
--- /dev/null
+++ b/modules/arch/x86/tests/gas64/gas-movabs.asm
@@ -0,0 +1,4 @@
+.comm _CONE, 4, 16
+
+movabsl %eax,(_CONE)
+movabsl (_CONE), %eax
diff --git a/modules/arch/x86/tests/gas64/gas-movabs.errwarn b/modules/arch/x86/tests/gas64/gas-movabs.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/arch/x86/tests/gas64/gas-movabs.errwarn
diff --git a/modules/arch/x86/tests/gas64/gas-movabs.hex b/modules/arch/x86/tests/gas64/gas-movabs.hex
new file mode 100644
index 00000000..05c97a31
--- /dev/null
+++ b/modules/arch/x86/tests/gas64/gas-movabs.hex
@@ -0,0 +1,672 @@
+7f
+45
+4c
+46
+02
+01
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+3e
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+00
+00
+40
+00
+06
+00
+01
+00
+a3
+00
+00
+00
+00
+00
+00
+00
+00
+a1
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+74
+65
+78
+74
+00
+2e
+72
+65
+6c
+61
+2e
+74
+65
+78
+74
+00
+2e
+73
+74
+72
+74
+61
+62
+00
+2e
+73
+79
+6d
+74
+61
+62
+00
+2e
+73
+68
+73
+74
+72
+74
+61
+62
+00
+00
+2d
+00
+5f
+43
+4f
+4e
+45
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+04
+00
+f1
+ff
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+10
+00
+f2
+ff
+10
+00
+00
+00
+00
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+22
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+84
+00
+00
+00
+00
+00
+00
+00
+2c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b0
+00
+00
+00
+00
+00
+00
+00
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1a
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+bc
+00
+00
+00
+00
+00
+00
+00
+60
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+03
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+01
+00
+00
+00
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+00
+00
+00
+00
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+07
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+54
+00
+00
+00
+00
+00
+00
+00
+30
+00
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+04
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
diff --git a/modules/arch/x86/tests/gas64/gas-retenter.asm b/modules/arch/x86/tests/gas64/gas-retenter.asm
index 552598a2..d809a5f8 100644
--- a/modules/arch/x86/tests/gas64/gas-retenter.asm
+++ b/modules/arch/x86/tests/gas64/gas-retenter.asm
@@ -1,3 +1,4 @@
+ret
retw
#retl
retq
@@ -5,7 +6,10 @@ retw $5
#retl $5
retq $5
lretw
-#lretl
+lretl
+lretq
+lretw $5
+lretl $5
lretq $5
enterw $5000, $5
diff --git a/modules/arch/x86/tests/gas64/gas-retenter.hex b/modules/arch/x86/tests/gas64/gas-retenter.hex
index 78304292..ab56fdfa 100644
--- a/modules/arch/x86/tests/gas64/gas-retenter.hex
+++ b/modules/arch/x86/tests/gas64/gas-retenter.hex
@@ -38,7 +38,7 @@
00
00
00
-d0
+e0
00
00
00
@@ -62,6 +62,7 @@ d0
00
01
00
+c3
66
c3
c3
@@ -74,6 +75,17 @@ c2
00
66
cb
+cb
+48
+cb
+66
+ca
+05
+00
+ca
+05
+00
+48
ca
05
00
@@ -270,6 +282,10 @@ ff
00
00
00
+00
+00
+00
+00
17
00
00
@@ -294,7 +310,7 @@ ff
00
00
00
-5c
+68
00
00
00
@@ -358,7 +374,7 @@ ff
00
00
00
-80
+8c
00
00
00
@@ -422,7 +438,7 @@ ff
00
00
00
-84
+90
00
00
00
@@ -494,7 +510,7 @@ ff
00
00
00
-1b
+27
00
00
00
diff --git a/modules/arch/x86/tests/genopcode.hex b/modules/arch/x86/tests/genopcode.hex
index 831f4cd7..4814eb28 100644
--- a/modules/arch/x86/tests/genopcode.hex
+++ b/modules/arch/x86/tests/genopcode.hex
@@ -318,7 +318,7 @@ d9
1e
00
00
-d9
+dd
dc
df
06
diff --git a/modules/arch/x86/tests/push64.errwarn b/modules/arch/x86/tests/push64.errwarn
index 6a622a99..c454a19d 100644
--- a/modules/arch/x86/tests/push64.errwarn
+++ b/modules/arch/x86/tests/push64.errwarn
@@ -1 +1 @@
--:4: warning: value does not fit in 32 bit field
+-:4: warning: value does not fit in signed 32 bit field
diff --git a/modules/arch/x86/tests/pushf-err.asm b/modules/arch/x86/tests/pushf-err.asm
new file mode 100644
index 00000000..13ea4977
--- /dev/null
+++ b/modules/arch/x86/tests/pushf-err.asm
@@ -0,0 +1,29 @@
+[bits 16]
+pushf
+pushfw
+pushfd
+pushfq
+popf
+popfw
+popfd
+popfq
+
+[bits 32]
+pushf
+pushfw
+pushfd
+pushfq
+popf
+popfw
+popfd
+popfq
+
+[bits 64]
+pushf
+pushfw
+pushfd
+pushfq
+popf
+popfw
+popfd
+popfq
diff --git a/modules/arch/x86/tests/pushf-err.errwarn b/modules/arch/x86/tests/pushf-err.errwarn
new file mode 100644
index 00000000..21e094f3
--- /dev/null
+++ b/modules/arch/x86/tests/pushf-err.errwarn
@@ -0,0 +1,10 @@
+-:5: warning: `pushfq' is an instruction in 64-bit mode
+-:9: warning: `popfq' is an instruction in 64-bit mode
+-:15: redefinition of `pushfq'
+-:10: `pushfq' previously defined here
+-:15: warning: `pushfq' is an instruction in 64-bit mode
+-:19: redefinition of `popfq'
+-:18: `popfq' previously defined here
+-:19: warning: `popfq' is an instruction in 64-bit mode
+-:24: `pushfd' invalid in 64-bit mode
+-:28: `popfd' invalid in 64-bit mode
diff --git a/modules/arch/x86/tests/pushf.asm b/modules/arch/x86/tests/pushf.asm
new file mode 100644
index 00000000..35a504ef
--- /dev/null
+++ b/modules/arch/x86/tests/pushf.asm
@@ -0,0 +1,29 @@
+[bits 16]
+pushf
+pushfw
+pushfd
+;pushfq
+popf
+popfw
+popfd
+;popfq
+
+[bits 32]
+pushf
+pushfw
+pushfd
+;pushfq
+popf
+popfw
+popfd
+;popfq
+
+[bits 64]
+pushf
+pushfw
+;pushfd
+pushfq
+popf
+popfw
+;popfd
+popfq
diff --git a/modules/arch/x86/tests/pushf.errwarn b/modules/arch/x86/tests/pushf.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/arch/x86/tests/pushf.errwarn
diff --git a/modules/arch/x86/tests/pushf.hex b/modules/arch/x86/tests/pushf.hex
new file mode 100644
index 00000000..c34b407d
--- /dev/null
+++ b/modules/arch/x86/tests/pushf.hex
@@ -0,0 +1,24 @@
+9c
+9c
+66
+9c
+9d
+9d
+66
+9d
+9c
+66
+9c
+9c
+9d
+66
+9d
+9d
+9c
+66
+9c
+9c
+9d
+66
+9d
+9d
diff --git a/modules/arch/x86/tests/pushnosize.asm b/modules/arch/x86/tests/pushnosize.asm
new file mode 100644
index 00000000..30451a16
--- /dev/null
+++ b/modules/arch/x86/tests/pushnosize.asm
@@ -0,0 +1,29 @@
+[bits 16]
+push 0 ; 6A 00 - equivalent to push byte 0
+push byte 0 ; 6A 00
+push word 0 ; 68 0000
+push dword 0 ; 66 68 00000000
+push 128 ; 68 8000 - doesn't fit in byte, equivalent to push word 128
+push byte 128 ; 6A 80 - warning (signed overflow)
+push word 128 ; 68 8000
+push dword 128 ; 66 68 80000000
+
+[bits 32]
+push 0 ; 6A 00 - equivalent to push byte 0
+push byte 0 ; 6A 00
+push word 0 ; 66 68 0000
+push dword 0 ; 68 00000000
+push 128 ; 68 80000000 - doesn't fit in byte -> push dword 128
+push byte 128 ; 6A 80 - warning (signed overflow)
+push word 128 ; 66 6A 8000
+push dword 128 ; 6A 80000000
+
+[bits 64]
+push 0 ; same as bits 32 output
+push byte 0
+push word 0
+push dword 0
+push 128
+push byte 128 ; warning
+push word 128
+push dword 128
diff --git a/modules/arch/x86/tests/pushnosize.errwarn b/modules/arch/x86/tests/pushnosize.errwarn
new file mode 100644
index 00000000..a042edf8
--- /dev/null
+++ b/modules/arch/x86/tests/pushnosize.errwarn
@@ -0,0 +1,3 @@
+-:7: warning: value does not fit in signed 8 bit field
+-:17: warning: value does not fit in signed 8 bit field
+-:27: warning: value does not fit in signed 8 bit field
diff --git a/modules/arch/x86/tests/pushnosize.hex b/modules/arch/x86/tests/pushnosize.hex
new file mode 100644
index 00000000..e9636688
--- /dev/null
+++ b/modules/arch/x86/tests/pushnosize.hex
@@ -0,0 +1,85 @@
+6a
+00
+6a
+00
+68
+00
+00
+66
+68
+00
+00
+00
+00
+68
+80
+00
+6a
+80
+68
+80
+00
+66
+68
+80
+00
+00
+00
+6a
+00
+6a
+00
+66
+68
+00
+00
+68
+00
+00
+00
+00
+68
+80
+00
+00
+00
+6a
+80
+66
+68
+80
+00
+68
+80
+00
+00
+00
+6a
+00
+6a
+00
+66
+68
+00
+00
+68
+00
+00
+00
+00
+68
+80
+00
+00
+00
+6a
+80
+66
+68
+80
+00
+68
+80
+00
+00
+00
diff --git a/modules/arch/x86/tests/ret.asm b/modules/arch/x86/tests/ret.asm
index ed37bff8..27317d40 100644
--- a/modules/arch/x86/tests/ret.asm
+++ b/modules/arch/x86/tests/ret.asm
@@ -1,7 +1,29 @@
+[bits 16]
ret
ret 4
ret word 2
retn 6
retn word 2
+retf
+retf 8
+retf word 2
+
+[bits 32]
+ret
+ret 4
+ret word 2
+retn 6
+retn word 2
+retf
+retf 8
+retf word 2
+
+[bits 64]
+ret
+ret 4
+ret word 2
+retn 6
+retn word 2
+retf
retf 8
retf word 2
diff --git a/modules/arch/x86/tests/ret.hex b/modules/arch/x86/tests/ret.hex
index 1b5e6643..431c1924 100644
--- a/modules/arch/x86/tests/ret.hex
+++ b/modules/arch/x86/tests/ret.hex
@@ -11,9 +11,53 @@ c2
c2
02
00
+cb
ca
08
00
ca
02
00
+c3
+c2
+04
+00
+c2
+02
+00
+c2
+06
+00
+c2
+02
+00
+cb
+ca
+08
+00
+ca
+02
+00
+c3
+c2
+04
+00
+c2
+02
+00
+c2
+06
+00
+c2
+02
+00
+48
+cb
+48
+ca
+08
+00
+48
+ca
+02
+00
diff --git a/modules/arch/x86/tests/str.asm b/modules/arch/x86/tests/str.asm
new file mode 100644
index 00000000..3310b9ac
--- /dev/null
+++ b/modules/arch/x86/tests/str.asm
@@ -0,0 +1,4 @@
+[bits 32]
+str [esp]
+[bits 16]
+str [bp]
diff --git a/modules/arch/x86/tests/str.errwarn b/modules/arch/x86/tests/str.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/arch/x86/tests/str.errwarn
diff --git a/modules/arch/x86/tests/str.hex b/modules/arch/x86/tests/str.hex
new file mode 100644
index 00000000..82c563c9
--- /dev/null
+++ b/modules/arch/x86/tests/str.hex
@@ -0,0 +1,8 @@
+0f
+00
+0c
+24
+0f
+00
+4e
+00
diff --git a/modules/arch/x86/x86arch.c b/modules/arch/x86/x86arch.c
index be37760e..72b2b4da 100644
--- a/modules/arch/x86/x86arch.c
+++ b/modules/arch/x86/x86arch.c
@@ -91,6 +91,18 @@ x86_get_machine(const yasm_arch *arch)
return "x86";
}
+static unsigned int
+x86_get_address_size(const yasm_arch *arch)
+{
+ const yasm_arch_x86 *arch_x86 = (const yasm_arch_x86 *)arch;
+ if (arch_x86->mode_bits != 0)
+ return arch_x86->mode_bits;
+ if (arch_x86->amd64_machine)
+ return 64;
+ else
+ return 32;
+}
+
static int
x86_set_var(yasm_arch *arch, const char *var, unsigned long val)
{
@@ -107,7 +119,8 @@ x86_parse_directive(yasm_arch *arch, const char *name,
yasm_valparamhead *valparams,
/*@unused@*/ /*@null@*/
yasm_valparamhead *objext_valparams,
- /*@unused@*/ yasm_object *object, unsigned long line)
+ /*@unused@*/ yasm_object *object,
+ /*@unused@*/ unsigned long line)
{
yasm_arch_x86 *arch_x86 = (yasm_arch_x86 *)arch;
yasm_valparam *vp;
@@ -122,7 +135,8 @@ x86_parse_directive(yasm_arch *arch, const char *name,
(lval == 16 || lval == 32 || lval == 64))
arch_x86->mode_bits = (unsigned char)lval;
else
- yasm__error(line, N_("invalid argument to [%s]"), "BITS");
+ yasm_error_set(YASM_ERROR_VALUE, N_("invalid argument to [%s]"),
+ "BITS");
return 0;
} else
return 1;
@@ -134,98 +148,166 @@ x86_get_fill(const yasm_arch *arch)
const yasm_arch_x86 *arch_x86 = (const yasm_arch_x86 *)arch;
/* Fill patterns that GAS uses. */
- static const char *fill16[16] = {
+ static const unsigned char *fill16[16] = {
NULL, /* unused */
+ (const unsigned char *)
"\x90", /* 1 - nop */
+ (const unsigned char *)
"\x89\xf6", /* 2 - mov si, si */
+ (const unsigned char *)
"\x8d\x74\x00", /* 3 - lea si, [si+byte 0] */
+ (const unsigned char *)
"\x8d\xb4\x00\x00", /* 4 - lea si, [si+word 0] */
+ (const unsigned char *)
"\x90" /* 5 - nop */
"\x8d\xb4\x00\x00", /* lea si, [si+word 0] */
+ (const unsigned char *)
"\x89\xf6" /* 6 - mov si, si */
"\x8d\xbd\x00\x00", /* lea di, [di+word 0] */
+ (const unsigned char *)
"\x8d\x74\x00" /* 7 - lea si, [si+byte 0] */
"\x8d\xbd\x00\x00", /* lea di, [di+word 0] */
+ (const unsigned char *)
"\x8d\xb4\x00\x00" /* 8 - lea si, [si+word 0] */
- "\x8d\xbd\x00\x00" /* lea di, [di+word 0] */
+ "\x8d\xbd\x00\x00", /* lea di, [di+word 0] */
+ (const unsigned char *)
"\xeb\x07\x90\x90\x90\x90\x90" /* 9 - jmp $+9; nop fill */
"\x90\x90",
+ (const unsigned char *)
"\xeb\x08\x90\x90\x90\x90\x90" /* 10 - jmp $+10; nop fill */
"\x90\x90\x90",
+ (const unsigned char *)
"\xeb\x09\x90\x90\x90\x90\x90" /* 11 - jmp $+11; nop fill */
"\x90\x90\x90\x90",
+ (const unsigned char *)
"\xeb\x0a\x90\x90\x90\x90\x90" /* 12 - jmp $+12; nop fill */
"\x90\x90\x90\x90\x90",
+ (const unsigned char *)
"\xeb\x0b\x90\x90\x90\x90\x90" /* 13 - jmp $+13; nop fill */
"\x90\x90\x90\x90\x90\x90",
+ (const unsigned char *)
"\xeb\x0c\x90\x90\x90\x90\x90" /* 14 - jmp $+14; nop fill */
"\x90\x90\x90\x90\x90\x90\x90",
+ (const unsigned char *)
"\xeb\x0d\x90\x90\x90\x90\x90" /* 15 - jmp $+15; nop fill */
"\x90\x90\x90\x90\x90\x90\x90\x90"
};
- static const char *fill32[16] = {
+ static const unsigned char *fill32[16] = {
NULL, /* unused */
+ (const unsigned char *)
"\x90", /* 1 - nop */
+ (const unsigned char *)
"\x89\xf6", /* 2 - mov esi, esi */
+ (const unsigned char *)
"\x8d\x76\x00", /* 3 - lea esi, [esi+byte 0] */
+ (const unsigned char *)
"\x8d\x74\x26\x00", /* 4 - lea esi, [esi*1+byte 0] */
+ (const unsigned char *)
"\x90" /* 5 - nop */
"\x8d\x74\x26\x00", /* lea esi, [esi*1+byte 0] */
+ (const unsigned char *)
"\x8d\xb6\x00\x00\x00\x00", /* 6 - lea esi, [esi+dword 0] */
+ (const unsigned char *)
"\x8d\xb4\x26\x00\x00\x00\x00", /* 7 - lea esi, [esi*1+dword 0] */
+ (const unsigned char *)
"\x90" /* 8 - nop */
"\x8d\xb4\x26\x00\x00\x00\x00", /* lea esi, [esi*1+dword 0] */
+#if 0
+ /* GAS uses these */
+ (const unsigned char *)
"\x89\xf6" /* 9 - mov esi, esi */
"\x8d\xbc\x27\x00\x00\x00\x00", /* lea edi, [edi*1+dword 0] */
+ (const unsigned char *)
"\x8d\x76\x00" /* 10 - lea esi, [esi+byte 0] */
"\x8d\xbc\x27\x00\x00\x00\x00", /* lea edi, [edi+dword 0] */
+ (const unsigned char *)
"\x8d\x74\x26\x00" /* 11 - lea esi, [esi*1+byte 0] */
"\x8d\xbc\x27\x00\x00\x00\x00", /* lea edi, [edi*1+dword 0]*/
+ (const unsigned char *)
"\x8d\xb6\x00\x00\x00\x00" /* 12 - lea esi, [esi+dword 0] */
"\x8d\xbf\x00\x00\x00\x00", /* lea edi, [edi+dword 0] */
+ (const unsigned char *)
"\x8d\xb6\x00\x00\x00\x00" /* 13 - lea esi, [esi+dword 0] */
"\x8d\xbc\x27\x00\x00\x00\x00", /* lea edi, [edi*1+dword 0]*/
+ (const unsigned char *)
"\x8d\xb4\x26\x00\x00\x00\x00" /* 14 - lea esi, [esi*1+dword 0]*/
"\x8d\xbc\x27\x00\x00\x00\x00", /* lea edi, [edi*1+dword 0]*/
+#else
+ /* But on newer processors, these are recommended */
+ (const unsigned char *)
+ "\xeb\x07\x90\x90\x90\x90\x90" /* 9 - jmp $+9; nop fill */
+ "\x90\x90",
+ (const unsigned char *)
+ "\xeb\x08\x90\x90\x90\x90\x90" /* 10 - jmp $+10; nop fill */
+ "\x90\x90\x90",
+ (const unsigned char *)
+ "\xeb\x09\x90\x90\x90\x90\x90" /* 11 - jmp $+11; nop fill */
+ "\x90\x90\x90\x90",
+ (const unsigned char *)
+ "\xeb\x0a\x90\x90\x90\x90\x90" /* 12 - jmp $+12; nop fill */
+ "\x90\x90\x90\x90\x90",
+ (const unsigned char *)
+ "\xeb\x0b\x90\x90\x90\x90\x90" /* 13 - jmp $+13; nop fill */
+ "\x90\x90\x90\x90\x90\x90",
+ (const unsigned char *)
+ "\xeb\x0c\x90\x90\x90\x90\x90" /* 14 - jmp $+14; nop fill */
+ "\x90\x90\x90\x90\x90\x90\x90",
+#endif
+ (const unsigned char *)
"\xeb\x0d\x90\x90\x90\x90\x90" /* 15 - jmp $+15; nop fill */
"\x90\x90\x90\x90\x90\x90\x90\x90"
};
- static const char *fill64[16] = {
+ static const unsigned char *fill64[16] = {
NULL, /* unused */
+ (const unsigned char *)
"\x90", /* 1 - nop */
+ (const unsigned char *)
"\x66\x90", /* 2 - o16; nop */
+ (const unsigned char *)
"\x66\x66\x90", /* 3 - o16; o16; nop */
+ (const unsigned char *)
"\x66\x66\x66\x90", /* 4 - o16; o16; o16; nop */
+ (const unsigned char *)
"\x66\x66\x90\x66\x90", /* 5 */
+ (const unsigned char *)
"\x66\x66\x90\x66\x66\x90", /* 6 */
+ (const unsigned char *)
"\x66\x66\x66\x90\x66\x66\x90", /* 7 */
+ (const unsigned char *)
"\x66\x66\x66\x90\x66\x66\x66" /* 8 */
"\x90",
+ (const unsigned char *)
"\x66\x66\x90\x66\x66\x90\x66" /* 9 */
"\x66\x90",
+ (const unsigned char *)
"\x66\x66\x66\x90\x66\x66\x90" /* 10 */
"\x66\x66\x90",
+ (const unsigned char *)
"\x66\x66\x66\x90\x66\x66\x66" /* 11 */
"\x90\x66\x66\x90",
+ (const unsigned char *)
"\x66\x66\x66\x90\x66\x66\x66" /* 12 */
"\x90\x66\x66\x66\x90",
+ (const unsigned char *)
"\x66\x66\x66\x90\x66\x66\x90" /* 13 */
"\x66\x66\x90\x66\x66\x90",
+ (const unsigned char *)
"\x66\x66\x66\x90\x66\x66\x66" /* 14 */
"\x90\x66\x66\x90\x66\x66\x90",
+ (const unsigned char *)
"\x66\x66\x66\x90\x66\x66\x66" /* 15 */
"\x90\x66\x66\x66\x90\x66\x66\x90"
};
switch (arch_x86->mode_bits) {
case 16:
- return (const unsigned char **)fill16;
+ return fill16;
case 32:
- return (const unsigned char **)fill32;
+ return fill32;
case 64:
- return (const unsigned char **)fill64;
+ return fill64;
default:
- yasm_internal_error(N_("Invalid mode_bits in x86_get_fill"));
- /*@notreached@*/
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("Invalid mode_bits in x86_get_fill"));
return NULL;
}
}
@@ -236,23 +318,23 @@ yasm_x86__get_reg_size(yasm_arch *arch, unsigned long reg)
switch ((x86_expritem_reg_size)(reg & ~0xFUL)) {
case X86_REG8:
case X86_REG8X:
- return 1;
+ return 8;
case X86_REG16:
- return 2;
+ return 16;
case X86_REG32:
case X86_CRREG:
case X86_DRREG:
case X86_TRREG:
- return 4;
+ return 32;
case X86_REG64:
case X86_MMXREG:
- return 8;
+ return 64;
case X86_XMMREG:
- return 16;
+ return 128;
case X86_FPUREG:
- return 10;
+ return 80;
default:
- yasm_internal_error(N_("unknown register size"));
+ yasm_error_set(YASM_ERROR_VALUE, N_("unknown register size"));
}
return 0;
}
@@ -276,7 +358,7 @@ x86_reggroup_get_reg(yasm_arch *arch, unsigned long reggroup,
return 0;
return reggroup | (regindex & 7);
default:
- yasm_internal_error(N_("bad register group"));
+ yasm_error_set(YASM_ERROR_VALUE, N_("bad register group"));
}
return 0;
}
@@ -337,7 +419,7 @@ x86_reg_print(yasm_arch *arch, unsigned long reg, FILE *f)
fprintf(f, "st%d", (int)(reg&0xF));
break;
default:
- yasm_internal_error(N_("unknown register size"));
+ yasm_error_set(YASM_ERROR_VALUE, N_("unknown register size"));
}
}
@@ -362,19 +444,15 @@ yasm_arch_module yasm_x86_LTX_arch = {
x86_create,
x86_destroy,
x86_get_machine,
+ x86_get_address_size,
x86_set_var,
yasm_x86__parse_cpu,
- yasm_x86__parse_check_reg,
- yasm_x86__parse_check_reggroup,
- yasm_x86__parse_check_segreg,
- yasm_x86__parse_check_insn,
- yasm_x86__parse_check_prefix,
- yasm_x86__parse_check_targetmod,
+ yasm_x86__parse_check_insnprefix,
+ yasm_x86__parse_check_regtmod,
x86_parse_directive,
x86_get_fill,
yasm_x86__finalize_insn,
yasm_x86__floatnum_tobytes,
- yasm_x86__intnum_fixup_rel,
yasm_x86__intnum_tobytes,
yasm_x86__get_reg_size,
x86_reggroup_get_reg,
@@ -383,6 +461,7 @@ yasm_arch_module yasm_x86_LTX_arch = {
yasm_x86__ea_create_expr,
x86_machines,
"x86",
- 2,
- 128
+ 16,
+ 128,
+ 1
};
diff --git a/modules/arch/x86/x86arch.h b/modules/arch/x86/x86arch.h
index 7065f487..725d3d97 100644
--- a/modules/arch/x86/x86arch.h
+++ b/modules/arch/x86/x86arch.h
@@ -57,6 +57,7 @@
#define CPU_Priv (1UL<<24) /* Priveleged instruction */
#define CPU_SVM (1UL<<25) /* Secure Virtual Machine instruction */
#define CPU_PadLock (1UL<<25) /* VIA PadLock instruction */
+#define CPU_EM64T (1UL<<26) /* Intel EM64T or better */
/* Technically not CPU capabilities, they do affect what instructions are
* available. These are tested against BITS==64.
@@ -135,24 +136,40 @@ int yasm_x86__set_rex_from_reg(unsigned char *rex, unsigned char *low3,
unsigned long reg, unsigned int bits,
x86_rex_bit_pos rexbit);
-void yasm_x86__ea_set_disponly(yasm_effaddr *ea);
-yasm_effaddr *yasm_x86__ea_create_reg(unsigned long reg, unsigned char *rex,
- unsigned int bits);
-yasm_effaddr *yasm_x86__ea_create_imm
+/* Effective address type */
+typedef struct x86_effaddr {
+ yasm_effaddr ea; /* base structure */
+
+ /* How the spare (register) bits in Mod/RM are handled:
+ * Even if valid_modrm=0, the spare bits are still valid (don't overwrite!)
+ * They're set in bytecode_create_insn().
+ */
+ unsigned char modrm;
+ unsigned char valid_modrm; /* 1 if Mod/RM byte currently valid, 0 if not */
+ unsigned char need_modrm; /* 1 if Mod/RM byte needed, 0 if not */
+
+ unsigned char sib;
+ unsigned char valid_sib; /* 1 if SIB byte currently valid, 0 if not */
+ unsigned char need_sib; /* 1 if SIB byte needed, 0 if not,
+ 0xff if unknown */
+} x86_effaddr;
+
+void yasm_x86__ea_init(x86_effaddr *x86_ea, unsigned int spare);
+
+void yasm_x86__ea_set_disponly(x86_effaddr *x86_ea);
+x86_effaddr *yasm_x86__ea_create_reg(unsigned long reg, unsigned char *rex,
+ unsigned int bits);
+x86_effaddr *yasm_x86__ea_create_imm
(/*@keep@*/ yasm_expr *imm, unsigned int im_len);
yasm_effaddr *yasm_x86__ea_create_expr(yasm_arch *arch,
/*@keep@*/ yasm_expr *e);
-/*@observer@*/ /*@null@*/ yasm_effaddr *yasm_x86__bc_insn_get_ea
- (/*@null@*/ yasm_bytecode *bc);
-
void yasm_x86__bc_insn_opersize_override(yasm_bytecode *bc,
unsigned int opersize);
void yasm_x86__bc_insn_addrsize_override(yasm_bytecode *bc,
unsigned int addrsize);
void yasm_x86__bc_insn_set_lockrep_prefix(yasm_bytecode *bc,
- unsigned int prefix,
- unsigned long line);
+ unsigned int prefix);
/* Bytecode types */
typedef struct x86_common {
@@ -172,7 +189,7 @@ typedef struct x86_insn {
x86_common common; /* common x86 information */
x86_opcode opcode;
- /*@null@*/ yasm_effaddr *ea; /* effective address */
+ /*@null@*/ x86_effaddr *x86_ea; /* effective address */
/*@null@*/ yasm_immval *imm; /* immediate or relative value */
@@ -187,44 +204,17 @@ typedef struct x86_insn {
/* None */
X86_POSTOP_NONE = 0,
- /* Shift opcodes have an immediate form and a ,1 form (with no
- * immediate). In the parser, we set this and opcode_len=1, but store
- * the non-,1 version in the second byte of the opcode array. We then
- * choose between the two versions once we know the actual value of
- * imm (because we don't know it in the parser module).
- *
- * A override to force the imm version should just leave this at
- * 0. Then later code won't know the ,1 version even exists.
- * TODO: Figure out how this affects CPU flags processing.
- */
- X86_POSTOP_SHIFT,
-
/* Instructions that take a sign-extended imm8 as well as imm values
* (eg, the arith instructions and a subset of the imul instructions)
- * should set this and put the non-imm8 form in the second byte of the
- * opcode.
+ * should set this and put the imm8 form in the second (and possibly
+ * third) byte of the opcode.
*/
X86_POSTOP_SIGNEXT_IMM8,
- /* Long (modrm+sib) mov instructions in amd64 can be optimized into
- * short mov instructions if a 32-bit address override is applied in
- * 64-bit mode to an EA of just an offset (no registers) and the
- * target register is al/ax/eax/rax.
- */
- X86_POSTOP_SHORTMOV,
-
/* Override any attempt at address-size override to 16 bits, and never
* generate a prefix. This is used for the ENTER opcode.
*/
- X86_POSTOP_ADDRESS16,
-
- /* Used for 64-bit mov immediate, which can take a sign-extended
- * imm32 as well as imm64 values. The imm32 form is put in the
- * second byte of the opcode and its ModRM byte is put in the third
- * byte of the opcode.
- * FIXME: Update for new optimizer.
- */
- X86_POSTOP_SIGNEXT_IMM32
+ X86_POSTOP_ADDRESS16
} postop;
} x86_insn;
@@ -232,8 +222,8 @@ typedef struct x86_jmp {
x86_common common; /* common x86 information */
x86_opcode shortop, nearop;
- yasm_expr *target; /* target location */
- /*@dependent@*/ yasm_symrec *origin; /* jump origin */
+ yasm_value target; /* jump target */
+ /*@dependent@*/ yasm_bytecode *origin_prevbc; /* jump origin */
/* which opcode are we using? */
/* The *FORCED forms are specified in the source as such */
@@ -248,8 +238,8 @@ typedef struct x86_jmpfar {
x86_common common; /* common x86 information */
x86_opcode opcode;
- yasm_expr *segment; /* target segment */
- yasm_expr *offset; /* target offset */
+ yasm_value segment; /* target segment */
+ yasm_value offset; /* target offset */
} x86_jmpfar;
void yasm_x86__bc_transform_insn(yasm_bytecode *bc, x86_insn *insn);
@@ -258,42 +248,23 @@ void yasm_x86__bc_transform_jmpfar(yasm_bytecode *bc, x86_jmpfar *jmpfar);
void yasm_x86__bc_apply_prefixes
(x86_common *common, unsigned char *rex, int num_prefixes,
- unsigned long **prefixes, unsigned long line);
-
-void yasm_x86__ea_init(yasm_effaddr *ea, unsigned int spare,
- /*@null@*/ yasm_symrec *origin);
+ unsigned long **prefixes);
/* Check an effective address. Returns 0 if EA was successfully determined,
* 1 if invalid EA, or 2 if indeterminate EA.
*/
int yasm_x86__expr_checkea
- (yasm_expr **ep, unsigned char *addrsize, unsigned int bits,
- unsigned int nosplit, int address16_op, unsigned char *displen,
- unsigned char *modrm, unsigned char *v_modrm, unsigned char *n_modrm,
- unsigned char *sib, unsigned char *v_sib, unsigned char *n_sib,
- unsigned char *pcrel, unsigned char *rex);
-
-void yasm_x86__parse_cpu(yasm_arch *arch, const char *cpuid,
- unsigned long line);
-
-int yasm_x86__parse_check_reg
- (yasm_arch *arch, /*@out@*/ unsigned long data[1], const char *id,
- unsigned long line);
-int yasm_x86__parse_check_reggroup
- (yasm_arch *arch, /*@out@*/ unsigned long data[1], const char *id,
- unsigned long line);
-int yasm_x86__parse_check_segreg
- (yasm_arch *arch, /*@out@*/ unsigned long data[1], const char *id,
- unsigned long line);
-int yasm_x86__parse_check_insn
- (yasm_arch *arch, /*@out@*/ unsigned long data[4], const char *id,
- unsigned long line);
-int yasm_x86__parse_check_prefix
+ (x86_effaddr *x86_ea, unsigned char *addrsize, unsigned int bits,
+ int address16_op, unsigned char *rex);
+
+void yasm_x86__parse_cpu(yasm_arch *arch, const char *cpuid, size_t cpuid_len);
+
+yasm_arch_insnprefix yasm_x86__parse_check_insnprefix
(yasm_arch *arch, /*@out@*/ unsigned long data[4], const char *id,
- unsigned long line);
-int yasm_x86__parse_check_targetmod
- (yasm_arch *arch, /*@out@*/ unsigned long data[1], const char *id,
- unsigned long line);
+ size_t id_len);
+yasm_arch_regtmod yasm_x86__parse_check_regtmod
+ (yasm_arch *arch, /*@out@*/ unsigned long *data, const char *id,
+ size_t id_len);
void yasm_x86__finalize_insn
(yasm_arch *arch, yasm_bytecode *bc, yasm_bytecode *prev_bc,
@@ -303,15 +274,11 @@ void yasm_x86__finalize_insn
int yasm_x86__floatnum_tobytes
(yasm_arch *arch, const yasm_floatnum *flt, unsigned char *buf,
- size_t destsize, size_t valsize, size_t shift, int warn,
- unsigned long line);
-int yasm_x86__intnum_fixup_rel
- (yasm_arch *arch, yasm_intnum *intn, size_t valsize,
- const yasm_bytecode *bc, unsigned long line);
+ size_t destsize, size_t valsize, size_t shift, int warn);
int yasm_x86__intnum_tobytes
(yasm_arch *arch, const yasm_intnum *intn, unsigned char *buf,
size_t destsize, size_t valsize, int shift, const yasm_bytecode *bc,
- int warn, unsigned long line);
+ int warn);
unsigned int yasm_x86__get_reg_size(yasm_arch *arch, unsigned long reg);
#endif
diff --git a/modules/arch/x86/x86bc.c b/modules/arch/x86/x86bc.c
index 7bfc4cc6..d5bbfa18 100644
--- a/modules/arch/x86/x86bc.c
+++ b/modules/arch/x86/x86bc.c
@@ -35,30 +35,6 @@
#include "x86arch.h"
-/* Effective address type */
-
-typedef struct x86_effaddr {
- yasm_effaddr ea; /* base structure */
-
- /* PC-relative portions are for AMD64 only (RIP addressing) */
- /*@null@*/ /*@dependent@*/ yasm_symrec *origin; /* pcrel origin */
-
- /* How the spare (register) bits in Mod/RM are handled:
- * Even if valid_modrm=0, the spare bits are still valid (don't overwrite!)
- * They're set in bytecode_create_insn().
- */
- unsigned char modrm;
- unsigned char valid_modrm; /* 1 if Mod/RM byte currently valid, 0 if not */
- unsigned char need_modrm; /* 1 if Mod/RM byte needed, 0 if not */
-
- unsigned char sib;
- unsigned char valid_sib; /* 1 if SIB byte currently valid, 0 if not */
- unsigned char need_sib; /* 1 if SIB byte needed, 0 if not,
- 0xff if unknown */
-
- unsigned char pcrel; /* 1 if PC-relative transformation needed */
-} x86_effaddr;
-
/* Effective address callback function prototypes */
static void x86_ea_destroy(yasm_effaddr *ea);
@@ -76,7 +52,7 @@ static int x86_bc_insn_expand(yasm_bytecode *bc, int span, long old_val,
long new_val, /*@out@*/ long *neg_thres,
/*@out@*/ long *pos_thres);
static int x86_bc_insn_tobytes(yasm_bytecode *bc, unsigned char **bufp,
- void *d, yasm_output_expr_func output_expr,
+ void *d, yasm_output_value_func output_value,
/*@null@*/ yasm_output_reloc_func output_reloc);
static void x86_bc_jmp_destroy(void *contents);
@@ -88,7 +64,7 @@ static int x86_bc_jmp_expand(yasm_bytecode *bc, int span, long old_val,
long new_val, /*@out@*/ long *neg_thres,
/*@out@*/ long *pos_thres);
static int x86_bc_jmp_tobytes(yasm_bytecode *bc, unsigned char **bufp,
- void *d, yasm_output_expr_func output_expr,
+ void *d, yasm_output_value_func output_value,
/*@null@*/ yasm_output_reloc_func output_reloc);
static void x86_bc_jmpfar_destroy(void *contents);
@@ -99,7 +75,7 @@ static int x86_bc_jmpfar_calc_len(yasm_bytecode *bc,
void *add_span_data);
static int x86_bc_jmpfar_tobytes
(yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
+ yasm_output_value_func output_value,
/*@null@*/ yasm_output_reloc_func output_reloc);
/* Effective address callback structures */
@@ -117,7 +93,8 @@ static const yasm_bytecode_callback x86_bc_callback_insn = {
yasm_bc_finalize_common,
x86_bc_insn_calc_len,
x86_bc_insn_expand,
- x86_bc_insn_tobytes
+ x86_bc_insn_tobytes,
+ 0
};
static const yasm_bytecode_callback x86_bc_callback_jmp = {
@@ -126,7 +103,8 @@ static const yasm_bytecode_callback x86_bc_callback_jmp = {
yasm_bc_finalize_common,
x86_bc_jmp_calc_len,
x86_bc_jmp_expand,
- x86_bc_jmp_tobytes
+ x86_bc_jmp_tobytes,
+ 0
};
static const yasm_bytecode_callback x86_bc_callback_jmpfar = {
@@ -135,7 +113,8 @@ static const yasm_bytecode_callback x86_bc_callback_jmpfar = {
yasm_bc_finalize_common,
x86_bc_jmpfar_calc_len,
yasm_bc_expand_common,
- x86_bc_jmpfar_tobytes
+ x86_bc_jmpfar_tobytes,
+ 0
};
int
@@ -182,27 +161,25 @@ yasm_x86__bc_transform_jmpfar(yasm_bytecode *bc, x86_jmpfar *jmpfar)
}
void
-yasm_x86__ea_init(yasm_effaddr *ea, unsigned int spare, yasm_symrec *origin)
+yasm_x86__ea_init(x86_effaddr *x86_ea, unsigned int spare)
{
- x86_effaddr *x86_ea = (x86_effaddr *)ea;
- x86_ea->origin = origin;
+ if (yasm_value_finalize(&x86_ea->ea.disp))
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("effective address too complex"));
x86_ea->modrm &= 0xC7; /* zero spare/reg bits */
x86_ea->modrm |= (spare << 3) & 0x38; /* plug in provided bits */
}
void
-yasm_x86__ea_set_disponly(yasm_effaddr *ea)
+yasm_x86__ea_set_disponly(x86_effaddr *x86_ea)
{
- x86_effaddr *x86_ea = (x86_effaddr *)ea;
-
x86_ea->valid_modrm = 0;
x86_ea->need_modrm = 0;
x86_ea->valid_sib = 0;
x86_ea->need_sib = 0;
- x86_ea->pcrel = 0;
}
-yasm_effaddr *
+x86_effaddr *
yasm_x86__ea_create_reg(unsigned long reg, unsigned char *rex,
unsigned int bits)
{
@@ -215,8 +192,9 @@ yasm_x86__ea_create_reg(unsigned long reg, unsigned char *rex,
x86_ea = yasm_xmalloc(sizeof(x86_effaddr));
x86_ea->ea.callback = &x86_ea_callback;
- x86_ea->ea.disp = (yasm_expr *)NULL;
- x86_ea->ea.len = 0;
+ yasm_value_initialize(&x86_ea->ea.disp, NULL, 0);
+ x86_ea->ea.need_nonzero_len = 0;
+ x86_ea->ea.need_disp = 0;
x86_ea->ea.nosplit = 0;
x86_ea->ea.strong = 0;
x86_ea->ea.segreg = 0;
@@ -226,9 +204,8 @@ yasm_x86__ea_create_reg(unsigned long reg, unsigned char *rex,
x86_ea->sib = 0;
x86_ea->valid_sib = 0;
x86_ea->need_sib = 0;
- x86_ea->pcrel = 0;
- return (yasm_effaddr *)x86_ea;
+ return x86_ea;
}
yasm_effaddr *
@@ -255,8 +232,9 @@ yasm_x86__ea_create_expr(yasm_arch *arch, yasm_expr *e)
yasm_expr_reg(X86_RIP), e->line);
}
}
- x86_ea->ea.disp = e;
- x86_ea->ea.len = 0;
+ yasm_value_initialize(&x86_ea->ea.disp, e, 0);
+ x86_ea->ea.need_nonzero_len = 0;
+ x86_ea->ea.need_disp = 1;
x86_ea->ea.nosplit = 0;
x86_ea->ea.strong = 0;
x86_ea->ea.segreg = 0;
@@ -269,13 +247,12 @@ yasm_x86__ea_create_expr(yasm_arch *arch, yasm_expr *e)
* the BITS/address override setting.
*/
x86_ea->need_sib = 0xff;
- x86_ea->pcrel = 0;
return (yasm_effaddr *)x86_ea;
}
/*@-compmempass@*/
-yasm_effaddr *
+x86_effaddr *
yasm_x86__ea_create_imm(yasm_expr *imm, unsigned int im_len)
{
x86_effaddr *x86_ea;
@@ -283,8 +260,8 @@ yasm_x86__ea_create_imm(yasm_expr *imm, unsigned int im_len)
x86_ea = yasm_xmalloc(sizeof(x86_effaddr));
x86_ea->ea.callback = &x86_ea_callback;
- x86_ea->ea.disp = imm;
- x86_ea->ea.len = (unsigned char)im_len;
+ yasm_value_initialize(&x86_ea->ea.disp, imm, im_len);
+ x86_ea->ea.need_disp = 1;
x86_ea->ea.nosplit = 0;
x86_ea->ea.strong = 0;
x86_ea->ea.segreg = 0;
@@ -294,16 +271,14 @@ yasm_x86__ea_create_imm(yasm_expr *imm, unsigned int im_len)
x86_ea->sib = 0;
x86_ea->valid_sib = 0;
x86_ea->need_sib = 0;
- x86_ea->pcrel = 0;
- return (yasm_effaddr *)x86_ea;
+ return x86_ea;
}
/*@=compmempass@*/
void
yasm_x86__bc_apply_prefixes(x86_common *common, unsigned char *rex,
- int num_prefixes, unsigned long **prefixes,
- unsigned long line)
+ int num_prefixes, unsigned long **prefixes)
{
int i;
int first = 1;
@@ -312,7 +287,7 @@ yasm_x86__bc_apply_prefixes(x86_common *common, unsigned char *rex,
switch ((x86_parse_insn_prefix)prefixes[i][0]) {
case X86_LOCKREP:
if (common->lockrep_pre != 0)
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("multiple LOCK or REP prefixes, using leftmost"));
common->lockrep_pre = (unsigned char)prefixes[i][1];
break;
@@ -330,18 +305,18 @@ yasm_x86__bc_apply_prefixes(x86_common *common, unsigned char *rex,
break;
case X86_REX:
if (!rex)
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("ignoring REX prefix on jump"));
+ yasm_warn_set(YASM_WARN_GENERAL,
+ N_("ignoring REX prefix on jump"));
else if (*rex == 0xff)
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("REX prefix not allowed on this instruction, ignoring"));
else {
if (*rex != 0) {
if (first)
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("overriding generated REX prefix"));
else
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("multiple REX prefixes, using leftmost"));
}
/* Here we assume that we can't get this prefix in non
@@ -360,10 +335,10 @@ static void
x86_bc_insn_destroy(void *contents)
{
x86_insn *insn = (x86_insn *)contents;
- if (insn->ea)
- yasm_ea_destroy((yasm_effaddr *)insn->ea);
+ if (insn->x86_ea)
+ yasm_ea_destroy((yasm_effaddr *)insn->x86_ea);
if (insn->imm) {
- yasm_expr_destroy(insn->imm->val);
+ yasm_value_delete(&insn->imm->val);
yasm_xfree(insn->imm);
}
yasm_xfree(contents);
@@ -373,7 +348,7 @@ static void
x86_bc_jmp_destroy(void *contents)
{
x86_jmp *jmp = (x86_jmp *)contents;
- yasm_expr_destroy(jmp->target);
+ yasm_value_delete(&jmp->target);
yasm_xfree(contents);
}
@@ -381,8 +356,8 @@ static void
x86_bc_jmpfar_destroy(void *contents)
{
x86_jmpfar *jmpfar = (x86_jmpfar *)contents;
- yasm_expr_destroy(jmpfar->segment);
- yasm_expr_destroy(jmpfar->offset);
+ yasm_value_delete(&jmpfar->segment);
+ yasm_value_delete(&jmpfar->offset);
yasm_xfree(contents);
}
@@ -395,8 +370,8 @@ static void
x86_ea_print(const yasm_effaddr *ea, FILE *f, int indent_level)
{
const x86_effaddr *x86_ea = (const x86_effaddr *)ea;
- fprintf(f, "%*sSegmentOv=%02x PCRel=%u\n", indent_level, "",
- (unsigned int)x86_ea->ea.segreg, (unsigned int)x86_ea->pcrel);
+ fprintf(f, "%*sSegmentOv=%02x\n", indent_level, "",
+ (unsigned int)x86_ea->ea.segreg);
fprintf(f, "%*sModRM=%03o ValidRM=%u NeedRM=%u\n", indent_level, "",
(unsigned int)x86_ea->modrm, (unsigned int)x86_ea->valid_modrm,
(unsigned int)x86_ea->need_modrm);
@@ -433,9 +408,9 @@ x86_bc_insn_print(const void *contents, FILE *f, int indent_level)
fprintf(f, "%*s_Instruction_\n", indent_level, "");
fprintf(f, "%*sEffective Address:", indent_level, "");
- if (insn->ea) {
+ if (insn->x86_ea) {
fprintf(f, "\n");
- yasm_ea_print((yasm_effaddr *)insn->ea, f, indent_level+1);
+ yasm_ea_print((yasm_effaddr *)insn->x86_ea, f, indent_level+1);
} else
fprintf(f, " (nil)\n");
fprintf(f, "%*sImmediate Value:", indent_level, "");
@@ -443,14 +418,9 @@ x86_bc_insn_print(const void *contents, FILE *f, int indent_level)
fprintf(f, " (nil)\n");
else {
indent_level++;
- fprintf(f, "\n%*sVal=", indent_level, "");
- if (insn->imm->val)
- yasm_expr_print(insn->imm->val, f);
- else
- fprintf(f, "(nil-SHOULDN'T HAPPEN)");
fprintf(f, "\n");
- fprintf(f, "%*sLen=%u, Sign=%u\n", indent_level, "",
- (unsigned int)insn->imm->len,
+ yasm_value_print(&insn->imm->val, f, indent_level);
+ fprintf(f, "%*sSign=%u\n", indent_level, "",
(unsigned int)insn->imm->sign);
indent_level--;
}
@@ -468,10 +438,12 @@ x86_bc_jmp_print(const void *contents, FILE *f, int indent_level)
const x86_jmp *jmp = (const x86_jmp *)contents;
fprintf(f, "%*s_Jump_\n", indent_level, "");
- fprintf(f, "%*sTarget=", indent_level, "");
- yasm_expr_print(jmp->target, f);
+ fprintf(f, "%*sTarget:\n", indent_level, "");
+ yasm_value_print(&jmp->target, f, indent_level+1);
+ /* FIXME
fprintf(f, "%*sOrigin=\n", indent_level, "");
yasm_symrec_print(jmp->origin, f, indent_level+1);
+ */
fprintf(f, "\n%*sShort Form:\n", indent_level, "");
if (jmp->shortop.len == 0)
fprintf(f, "%*sNone\n", indent_level+1, "");
@@ -512,10 +484,10 @@ x86_bc_jmpfar_print(const void *contents, FILE *f, int indent_level)
const x86_jmpfar *jmpfar = (const x86_jmpfar *)contents;
fprintf(f, "%*s_Far_Jump_\n", indent_level, "");
- fprintf(f, "%*sSegment=", indent_level, "");
- yasm_expr_print(jmpfar->segment, f);
- fprintf(f, "\n%*sOffset=", indent_level, "");
- yasm_expr_print(jmpfar->offset, f);
+ fprintf(f, "%*sSegment:\n", indent_level, "");
+ yasm_value_print(&jmpfar->segment, f, indent_level+1);
+ fprintf(f, "%*sOffset:\n", indent_level, "");
+ yasm_value_print(&jmpfar->offset, f, indent_level+1);
x86_opcode_print(&jmpfar->opcode, f, indent_level);
x86_common_print(&jmpfar->common, f, indent_level);
}
@@ -542,50 +514,33 @@ x86_bc_insn_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
void *add_span_data)
{
x86_insn *insn = (x86_insn *)bc->contents;
- /*@null@*/ yasm_expr *temp;
- x86_effaddr *x86_ea = (x86_effaddr *)insn->ea;
- yasm_effaddr *ea = &x86_ea->ea;
+ x86_effaddr *x86_ea = insn->x86_ea;
yasm_immval *imm = insn->imm;
- if (ea) {
- if (ea->disp) {
- /* Handle shortmov special-casing */
- if (insn->postop == X86_POSTOP_SHORTMOV &&
- insn->common.mode_bits == 64 && insn->common.addrsize == 32 &&
- !yasm_expr__contains(ea->disp, YASM_EXPR_REG)) {
- yasm_x86__ea_set_disponly((yasm_effaddr *)x86_ea);
- /* Make the short form permanent. */
- insn->opcode.opcode[0] = insn->opcode.opcode[1];
- }
+ if (x86_ea) {
+ /* Check validity of effective address and calc R/M bits of
+ * Mod/RM byte and SIB byte. We won't know the Mod field
+ * of the Mod/RM byte until we know more about the
+ * displacement.
+ */
+ if (yasm_x86__expr_checkea(x86_ea, &insn->common.addrsize,
+ insn->common.mode_bits, insn->postop == X86_POSTOP_ADDRESS16,
+ &insn->rex))
+ /* failed, don't bother checking rest of insn */
+ return -1;
- /* Check validity of effective address and calc R/M bits of
- * Mod/RM byte and SIB byte. We won't know the Mod field
- * of the Mod/RM byte until we know more about the
- * displacement.
+ if (x86_ea->ea.disp.size == 0) {
+ /* Handle unknown case, default to byte-sized and set as
+ * critical expression.
*/
- if (yasm_x86__expr_checkea(&ea->disp, &insn->common.addrsize,
- insn->common.mode_bits, ea->nosplit,
- insn->postop == X86_POSTOP_ADDRESS16, &ea->len,
- &x86_ea->modrm, &x86_ea->valid_modrm, &x86_ea->need_modrm,
- &x86_ea->sib, &x86_ea->valid_sib, &x86_ea->need_sib,
- &x86_ea->pcrel, &insn->rex))
- /* failed, don't bother checking rest of insn */
- return -1;
-
- /* Handle address16 postop case */
- if (insn->postop == X86_POSTOP_ADDRESS16)
- insn->common.addrsize = 0;
-
- if (ea->len == 0xff) {
- /* Handle unknown case, default to byte-sized and set as
- * critical expression.
- */
- bc->len += 1;
- add_span(add_span_data, bc, 1, yasm_expr_copy(ea->disp), -128,
- 127);
- } else
- bc->len += ea->len;
- }
+ bc->len += 1;
+ add_span(add_span_data, bc, 1, &x86_ea->ea.disp, NULL, -128, 127);
+ } else
+ bc->len + x86_ea->ea.disp.size/8;
+
+ /* Handle address16 postop case */
+ if (insn->postop == X86_POSTOP_ADDRESS16)
+ insn->common.addrsize = 0;
/* Compute length of ea and add to total */
bc->len += x86_ea->need_modrm + (x86_ea->need_sib ? 1:0);
@@ -593,65 +548,48 @@ x86_bc_insn_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
}
if (imm) {
- int immlen = imm->len;
-
- if (imm->val) {
- /* TODO: check imm->len vs. sized len from expr? */
-
- /* Handle signext_imm8 postop special-casing */
- if (insn->postop == X86_POSTOP_SIGNEXT_IMM8) {
- /*@dependent@*/ /*@null@*/ yasm_intnum *num;
- num = yasm_expr_get_intnum(&imm->val, NULL);
- if (num) {
- int val = yasm_intnum_get_int(num);
- if (val >= -128 && val <= 127) {
- /* We can use the sign-extended byte form: shorten
- * the immediate length to 1.
- */
- imm->len = 1;
- immlen = 1;
- } else {
- /* We can't use the ,1. */
- insn->opcode.opcode[0] = insn->opcode.opcode[1];
- }
- insn->postop = X86_POSTOP_NONE;
- } else {
- /* Unknown; default to byte form and set as critical
- * expression.
- */
- immlen = 1;
- add_span(add_span_data, bc, 2, yasm_expr_copy(imm->val),
- -128, 127);
- }
- }
+ yasm_intnum *zero = yasm_intnum_create_uint(0);
+ const yasm_intnum *num = zero;
+ unsigned int immlen = imm->val.size;
+ long val;
- /* Handle shift postop special-casing */
- if (insn->postop == X86_POSTOP_SHIFT) {
- /*@dependent@*/ /*@null@*/ yasm_intnum *num;
- num = yasm_expr_get_intnum(&imm->val, NULL);
- if (num) {
- if (yasm_intnum_get_uint(num) == 1) {
- /* We can use the ,1. */
- yasm_expr_destroy(imm->val);
- yasm_xfree(imm);
- insn->imm = NULL;
- immlen = 0;
- } else {
- /* We can't use the ,1. */
- insn->opcode.opcode[0] = insn->opcode.opcode[1];
- }
- insn->postop = X86_POSTOP_NONE;
- } else {
- /* Just assume we can't use the ,1 form: allowing this
- * is more work than it's worth.
+ if (imm->val.abs)
+ num = yasm_expr_get_intnum(&imm->val.abs, NULL);
+
+ /* TODO: check imm->len vs. sized len from expr? */
+
+ /* Handle signext_imm8 postop special-casing */
+ if (insn->postop == X86_POSTOP_SIGNEXT_IMM8) {
+ if (imm->val.rel || num) {
+ if (imm->val.rel)
+ val = 1000; /* has relative portion, don't collapse */
+ else
+ val = yasm_intnum_get_int(num);
+ if (val >= -128 && val <= 127) {
+ /* We can use the sign-extended byte form: shorten
+ * the immediate length to 1 and make the byte form
+ * permanent.
*/
- insn->opcode.opcode[0] = insn->opcode.opcode[1];
- insn->postop = X86_POSTOP_NONE;
+ imm->val.size = 8;
+ immlen = 8;
+ if (insn->opcode.opcode[2] != 0) {
+ insn->opcode.opcode[1] = insn->opcode.opcode[2];
+ insn->opcode.len++;
+ }
}
+ insn->postop = X86_POSTOP_NONE;
+ } else {
+ /* Unknown; default to byte form and set as critical
+ * expression.
+ */
+ immlen = 8;
+ add_span(add_span_data, bc, 2, &imm->val, NULL, -128, 127);
}
}
- bc->len += immlen;
+ yasm_intnum_destroy(zero);
+
+ bc->len += immlen/8;
}
bc->len += insn->opcode.len;
@@ -671,25 +609,25 @@ x86_bc_insn_expand(yasm_bytecode *bc, int span, long old_val, long new_val,
{
x86_insn *insn = (x86_insn *)bc->contents;
/*@null@*/ yasm_expr *temp;
- x86_effaddr *x86_ea = (x86_effaddr *)insn->ea;
+ x86_effaddr *x86_ea = insn->x86_ea;
yasm_effaddr *ea = &x86_ea->ea;
yasm_immval *imm = insn->imm;
- if (ea && ea->disp) {
+ if (ea && ea->disp.abs) {
/* Change displacement length into word-sized */
- if (ea->len == 0xff) {
- ea->len = (insn->common.addrsize == 16) ? 2U : 4U;
+ if (ea->disp.size == 0) {
+ ea->disp.size = (insn->common.addrsize == 16) ? 16 : 32;
x86_ea->modrm &= ~0300;
x86_ea->modrm |= 0200;
bc->len--;
- bc->len += ea->len;
+ bc->len += ea->disp.size/8;
}
}
- if (imm && imm->val) {
+ if (imm && imm->val.abs) {
if (insn->postop == X86_POSTOP_SIGNEXT_IMM8) {
bc->len--;
- bc->len += imm->len;
+ bc->len += imm->val.size/8;
insn->postop = X86_POSTOP_NONE;
}
}
@@ -702,6 +640,11 @@ x86_bc_jmp_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
void *add_span_data)
{
x86_jmp *jmp = (x86_jmp *)bc->contents;
+ yasm_bytecode *target_prevbc;
+ /*@null@*/ yasm_expr *temp;
+ /*@only@*/ yasm_intnum *num;
+ /*@dependent@*/ /*@null@*/ yasm_intnum *num2;
+ long rel;
unsigned char opersize;
/* As opersize may be 0, figure out its "real" value. */
@@ -712,7 +655,7 @@ x86_bc_jmp_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
if (jmp->op_sel == JMP_NEAR_FORCED || jmp->shortop.len == 0) {
if (jmp->nearop.len == 0) {
- yasm__error(bc->line, N_("near jump does not exist"));
+ yasm_error_set(YASM_ERROR_TYPE, N_("near jump does not exist"));
return -1;
}
@@ -724,7 +667,7 @@ x86_bc_jmp_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
if (jmp->op_sel == JMP_SHORT_FORCED || jmp->nearop.len == 0) {
if (jmp->shortop.len == 0) {
- yasm__error(bc->line, N_("short jump does not exist"));
+ yasm_error_set(YASM_ERROR_TYPE, N_("short jump does not exist"));
return -1;
}
@@ -733,13 +676,27 @@ x86_bc_jmp_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
*/
}
- /* Short jump, generate span */
+ if (jmp->target.rel
+ && (!yasm_symrec_get_label(jmp->target.rel, &target_prevbc)
+ || target_prevbc->section != jmp->origin_prevbc->section)) {
+ /* External or out of segment, so we can't check distance.
+ * Allowing forced short jumps depends on the objfmt supporting
+ * 8-bit relocs. While most don't, some might, so allow it here.
+ * Otherwise default to word-sized.
+ * The objfmt will error if not supported.
+ */
+ if (jmp->op_sel == JMP_SHORT_FORCED || jmp->nearop.len == 0) {
+ bc->len += jmp->shortop.len + 1;
+ } else {
+ bc->len += jmp->nearop.len;
+ bc->len += (opersize == 16) ? 2 : 4;
+ }
+ return 0;
+ }
+
+ /* Default to short jump and generate span */
bc->len += jmp->shortop.len + 1;
- add_span(add_span_data, bc, 1,
- yasm_expr_create(YASM_EXPR_SUB,
- yasm_expr_expr(yasm_expr_copy(jmp->target)),
- yasm_expr_sym(jmp->origin), bc->line),
- -128, 127);
+ add_span(add_span_data, bc, 1, &jmp->target, jmp->origin_prevbc, -128, 127);
return 0;
}
@@ -758,7 +715,7 @@ x86_bc_jmp_expand(yasm_bytecode *bc, int span, long old_val, long new_val,
jmp->common.mode_bits : jmp->common.opersize;
if (jmp->nearop.len == 0) {
- yasm__error(bc->line, N_("short jump out of range"));
+ yasm_error_set(YASM_ERROR_VALUE, N_("short jump out of range"));
return -1;
}
@@ -815,20 +772,19 @@ x86_opcode_tobytes(const x86_opcode *opcode, unsigned char **bufp)
static int
x86_bc_insn_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
+ yasm_output_value_func output_value,
/*@unused@*/ yasm_output_reloc_func output_reloc)
{
x86_insn *insn = (x86_insn *)bc->contents;
- /*@null@*/ x86_effaddr *x86_ea = (x86_effaddr *)insn->ea;
- /*@null@*/ yasm_effaddr *ea = &x86_ea->ea;
+ /*@null@*/ x86_effaddr *x86_ea = (x86_effaddr *)insn->x86_ea;
yasm_immval *imm = insn->imm;
- unsigned int i;
unsigned char *bufp_orig = *bufp;
/* Prefixes */
if (insn->special_prefix != 0)
YASM_WRITE_8(*bufp, insn->special_prefix);
- x86_common_tobytes(&insn->common, bufp, ea ? (ea->segreg>>8) : 0);
+ x86_common_tobytes(&insn->common, bufp,
+ x86_ea ? (x86_ea->ea.segreg>>8) : 0);
if (insn->rex != 0xff) {
if (insn->common.mode_bits == 64 && insn->common.opersize == 64 &&
insn->def_opersize_64 != 64)
@@ -847,7 +803,7 @@ x86_bc_insn_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
/* Effective address: ModR/M (if required), SIB (if required), and
* displacement (if required).
*/
- if (ea) {
+ if (x86_ea) {
if (x86_ea->need_modrm) {
if (!x86_ea->valid_modrm)
yasm_internal_error(N_("invalid Mod/RM in x86 tobytes_insn"));
@@ -860,49 +816,53 @@ x86_bc_insn_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
YASM_WRITE_8(*bufp, x86_ea->sib);
}
- if (ea->disp) {
- /* Simplify expression */
- ea->disp = yasm_expr_simplify(ea->disp, yasm_common_calc_bc_dist);
- if (x86_ea->pcrel) {
- /*@null@*/ yasm_expr *wrt = yasm_expr_extract_wrt(&ea->disp);
- ea->disp =
- yasm_expr_create(YASM_EXPR_SUB, yasm_expr_expr(ea->disp),
- yasm_expr_sym(x86_ea->origin), bc->line);
- if (wrt) {
- ea->disp =
- yasm_expr_create(YASM_EXPR_WRT,
- yasm_expr_expr(ea->disp),
- yasm_expr_expr(wrt), bc->line);
- }
- if (output_expr(&ea->disp, *bufp, ea->len,
- (size_t)(ea->len*8), 0,
- (unsigned long)(*bufp-bufp_orig), bc, 1, 1,
- d))
- return 1;
- } else {
- if (output_expr(&ea->disp, *bufp, ea->len,
- (size_t)(ea->len*8), 0,
- (unsigned long)(*bufp-bufp_orig), bc, 0, 1,
- d))
- return 1;
+ if (x86_ea->ea.need_disp) {
+ x86_effaddr eat = *x86_ea; /* structure copy */
+ unsigned char addrsize = insn->common.addrsize;
+ unsigned int disp_len = x86_ea->ea.disp.size/8;
+
+ eat.valid_modrm = 0; /* force checkea to actually run */
+
+ if (x86_ea->ea.disp.abs) {
+ /* Call checkea() to simplify the registers out of the
+ * displacement. Throw away all of the return values except
+ * for the modified expr.
+ */
+ if (yasm_x86__expr_checkea
+ (&eat, &addrsize, insn->common.mode_bits,
+ insn->postop == X86_POSTOP_ADDRESS16, &insn->rex))
+ yasm_internal_error(N_("checkea failed"));
+ x86_ea->ea.disp.abs = eat.ea.disp.abs;
}
- *bufp += ea->len;
- } else {
- /* 0 displacement, but we didn't know it before, so we have to
- * write out 0 value.
- * FIXME: Is this still needed?
- */
- for (i=0; i<ea->len; i++)
- YASM_WRITE_8(*bufp, 0);
+
+ if (x86_ea->ea.disp.ip_rel) {
+ /* Adjust relative displacement to end of bytecode */
+ /*@only@*/ yasm_intnum *delta;
+ delta = yasm_intnum_create_int(-(long)bc->len);
+ if (!x86_ea->ea.disp.abs)
+ x86_ea->ea.disp.abs =
+ yasm_expr_create_ident(yasm_expr_int(delta), bc->line);
+ else
+ x86_ea->ea.disp.abs =
+ yasm_expr_create(YASM_EXPR_ADD,
+ yasm_expr_expr(x86_ea->ea.disp.abs),
+ yasm_expr_int(delta), bc->line);
+ }
+ if (output_value(&x86_ea->ea.disp, *bufp, disp_len,
+ (unsigned long)(*bufp-bufp_orig), bc, 1, d))
+ return 1;
+ *bufp += disp_len;
}
}
/* Immediate (if required) */
- if (imm && imm->val && insn->postop != X86_POSTOP_SHIFT) {
- if (output_expr(&imm->val, *bufp, imm->len, (size_t)(imm->len*8), 0,
- (unsigned long)(*bufp-bufp_orig), bc, 0, 1, d))
+ if (imm) {
+ unsigned int imm_len = imm->val.size/8;
+ if (output_value(&imm->val, *bufp, imm_len,
+ (unsigned long)(*bufp-bufp_orig), bc, imm->sign?-1:1,
+ d))
return 1;
- *bufp += imm->len;
+ *bufp += imm_len;
}
return 0;
@@ -910,14 +870,14 @@ x86_bc_insn_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
static int
x86_bc_jmp_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
+ yasm_output_value_func output_value,
/*@unused@*/ yasm_output_reloc_func output_reloc)
{
x86_jmp *jmp = (x86_jmp *)bc->contents;
unsigned char opersize;
unsigned int i;
unsigned char *bufp_orig = *bufp;
- /*@null@*/ yasm_expr *wrt;
+ /*@only@*/ yasm_intnum *delta;
/* Prefixes */
x86_common_tobytes(&jmp->common, bufp, 0);
@@ -937,17 +897,20 @@ x86_bc_jmp_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
/* Opcode */
x86_opcode_tobytes(&jmp->shortop, bufp);
- /* Relative displacement */
- wrt = yasm_expr_extract_wrt(&jmp->target);
- jmp->target =
- yasm_expr_create(YASM_EXPR_SUB, yasm_expr_expr(jmp->target),
- yasm_expr_sym(jmp->origin), bc->line);
- if (wrt)
- jmp->target = yasm_expr_create_tree(jmp->target,
- YASM_EXPR_WRT, wrt,
- bc->line);
- if (output_expr(&jmp->target, *bufp, 1, 8, 0,
- (unsigned long)(*bufp-bufp_orig), bc, 1, 1, d))
+ /* Adjust relative displacement to end of bytecode */
+ delta = yasm_intnum_create_int(-(long)bc->len);
+ if (!jmp->target.abs)
+ jmp->target.abs = yasm_expr_create_ident(yasm_expr_int(delta),
+ bc->line);
+ else
+ jmp->target.abs =
+ yasm_expr_create(YASM_EXPR_ADD,
+ yasm_expr_expr(jmp->target.abs),
+ yasm_expr_int(delta), bc->line);
+
+ jmp->target.size = 8;
+ if (output_value(&jmp->target, *bufp, 1,
+ (unsigned long)(*bufp-bufp_orig), bc, -1, d))
return 1;
*bufp += 1;
break;
@@ -955,25 +918,30 @@ x86_bc_jmp_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
case JMP_NEAR:
/* 2/4 byte relative displacement (depending on operand size) */
if (jmp->nearop.len == 0) {
- yasm__error(bc->line, N_("near jump does not exist"));
+ yasm_error_set(YASM_ERROR_TYPE,
+ N_("near jump does not exist"));
return 1;
}
/* Opcode */
x86_opcode_tobytes(&jmp->nearop, bufp);
- /* Relative displacement */
- wrt = yasm_expr_extract_wrt(&jmp->target);
- jmp->target =
- yasm_expr_create(YASM_EXPR_SUB, yasm_expr_expr(jmp->target),
- yasm_expr_sym(jmp->origin), bc->line);
- if (wrt)
- jmp->target = yasm_expr_create_tree(jmp->target,
- YASM_EXPR_WRT, wrt,
- bc->line);
i = (opersize == 16) ? 2 : 4;
- if (output_expr(&jmp->target, *bufp, i, i*8, 0,
- (unsigned long)(*bufp-bufp_orig), bc, 1, 1, d))
+
+ /* Adjust relative displacement to end of bytecode */
+ delta = yasm_intnum_create_int(-(long)bc->len);
+ if (!jmp->target.abs)
+ jmp->target.abs = yasm_expr_create_ident(yasm_expr_int(delta),
+ bc->line);
+ else
+ jmp->target.abs =
+ yasm_expr_create(YASM_EXPR_ADD,
+ yasm_expr_expr(jmp->target.abs),
+ yasm_expr_int(delta), bc->line);
+
+ jmp->target.size = i*8;
+ if (output_value(&jmp->target, *bufp, i,
+ (unsigned long)(*bufp-bufp_orig), bc, -1, d))
return 1;
*bufp += i;
break;
@@ -985,7 +953,7 @@ x86_bc_jmp_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
static int
x86_bc_jmpfar_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
+ yasm_output_value_func output_value,
/*@unused@*/ yasm_output_reloc_func output_reloc)
{
x86_jmpfar *jmpfar = (x86_jmpfar *)bc->contents;
@@ -1002,12 +970,14 @@ x86_bc_jmpfar_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
/* Absolute displacement: segment and offset */
i = (opersize == 16) ? 2 : 4;
- if (output_expr(&jmpfar->offset, *bufp, i, i*8, 0,
- (unsigned long)(*bufp-bufp_orig), bc, 0, 1, d))
+ jmpfar->offset.size = i*8;
+ if (output_value(&jmpfar->offset, *bufp, i,
+ (unsigned long)(*bufp-bufp_orig), bc, 1, d))
return 1;
*bufp += i;
- if (output_expr(&jmpfar->segment, *bufp, 2, 2*8, 0,
- (unsigned long)(*bufp-bufp_orig), bc, 0, 1, d))
+ jmpfar->segment.size = 16;
+ if (output_value(&jmpfar->segment, *bufp, 2,
+ (unsigned long)(*bufp-bufp_orig), bc, 1, d))
return 1;
*bufp += 2;
@@ -1015,27 +985,11 @@ x86_bc_jmpfar_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
}
int
-yasm_x86__intnum_fixup_rel(yasm_arch *arch, yasm_intnum *intn, size_t valsize,
- const yasm_bytecode *bc, unsigned long line)
-{
- yasm_intnum *delta;
- if (valsize != 8 && valsize != 16 && valsize != 32)
- yasm_internal_error(
- N_("tried to do PC-relative offset from invalid sized value"));
- delta = yasm_intnum_create_uint(bc->len);
- yasm_intnum_calc(intn, YASM_EXPR_SUB, delta, line);
- yasm_intnum_destroy(delta);
- return 0;
-}
-
-int
yasm_x86__intnum_tobytes(yasm_arch *arch, const yasm_intnum *intn,
unsigned char *buf, size_t destsize, size_t valsize,
- int shift, const yasm_bytecode *bc, int warn,
- unsigned long line)
+ int shift, const yasm_bytecode *bc, int warn)
{
/* Write value out. */
- yasm_intnum_get_sized(intn, buf, destsize, valsize, shift, 0, warn,
- line);
+ yasm_intnum_get_sized(intn, buf, destsize, valsize, shift, 0, warn);
return 0;
}
diff --git a/modules/arch/x86/x86expr.c b/modules/arch/x86/x86expr.c
index 1570e8b7..01a1cb45 100644
--- a/modules/arch/x86/x86expr.c
+++ b/modules/arch/x86/x86expr.c
@@ -247,22 +247,46 @@ x86_expr_checkea_distcheck_reg(yasm_expr **ep, unsigned int bits)
* and 0 if all values successfully determined and saved in data.
*/
static int
-x86_expr_checkea_getregusage(yasm_expr **ep, /*@null@*/ yasm_expr **wrt,
- /*@null@*/ int *indexreg, unsigned char *pcrel, unsigned int bits,
- void *data, int *(*get_reg)(yasm_expr__item *ei, int *regnum, void *d))
+x86_expr_checkea_getregusage(yasm_expr **ep, /*@null@*/ int *indexreg,
+ int *pcrel, unsigned int bits, void *data,
+ int *(*get_reg)(yasm_expr__item *ei, int *regnum, void *d))
{
int i;
int *reg;
int regnum;
int indexval = 0;
int indexmult = 0;
- yasm_expr *e;
+ yasm_expr *e, *wrt;
/*@-unqualifiedtrans@*/
- *ep = yasm_expr__level_tree(*ep, 1, indexreg == 0, NULL, NULL, NULL, NULL);
- if (*wrt)
- *wrt = yasm_expr__level_tree(*wrt, 1, indexreg == 0, NULL, NULL, NULL,
- NULL);
+ *ep = yasm_expr__level_tree(*ep, 1, 1, indexreg == 0, NULL, NULL, NULL,
+ NULL);
+
+ /* Check for WRT rip first */
+ wrt = yasm_expr_extract_wrt(ep);
+ if (wrt && wrt->op == YASM_EXPR_IDENT &&
+ wrt->terms[0].type == YASM_EXPR_REG) {
+ if (bits != 64) { /* only valid in 64-bit mode */
+ yasm_expr_destroy(wrt);
+ return 1;
+ }
+ reg = get_reg(&wrt->terms[0], &regnum, data);
+ if (!reg || regnum != 16) { /* only accept rip */
+ yasm_expr_destroy(wrt);
+ return 1;
+ }
+ (*reg)++;
+
+ /* Delete WRT. Set pcrel to 1 to indicate to x86
+ * bytecode code to do PC-relative displacement transform.
+ */
+ *pcrel = 1;
+ yasm_expr_destroy(wrt);
+ } else if (wrt) {
+ yasm_expr_destroy(wrt);
+ return 1;
+ }
+
/*@=unqualifiedtrans@*/
assert(*ep != NULL);
e = *ep;
@@ -271,7 +295,7 @@ x86_expr_checkea_getregusage(yasm_expr **ep, /*@null@*/ yasm_expr **wrt,
return 1;
case 2:
/* Need to simplify again */
- *ep = yasm_expr__level_tree(*ep, 1, indexreg == 0, NULL, NULL,
+ *ep = yasm_expr__level_tree(*ep, 1, 1, indexreg == 0, NULL, NULL,
NULL, NULL);
e = *ep;
break;
@@ -279,29 +303,6 @@ x86_expr_checkea_getregusage(yasm_expr **ep, /*@null@*/ yasm_expr **wrt,
break;
}
- if (*wrt && (*wrt)->op == YASM_EXPR_IDENT &&
- (*wrt)->terms[0].type == YASM_EXPR_REG) {
- /* Handle xx WRT rip. */
- if (bits != 64) /* only valid in 64-bit mode */
- return 1;
- reg = get_reg(&(*wrt)->terms[0], &regnum, data);
- if (!reg || regnum != 16) /* only accept rip */
- return 1;
- (*reg)++;
-
- /* Delete WRT. Set pcrel to 1 to indicate to x86
- * bytecode code to do PC-relative displacement transform.
- */
- *pcrel = 1;
- yasm_expr_destroy(*wrt);
-
- /* Drill down to next WRT and recurse if there was one. */
- *wrt = yasm_expr_extract_wrt(ep);
- if (*wrt)
- return x86_expr_checkea_getregusage(ep, wrt, indexreg, pcrel,
- bits, data, get_reg);
- }
-
switch (e->op) {
case YASM_EXPR_ADD:
/* Prescan for non-int multipliers against a reg.
@@ -394,62 +395,60 @@ x86_expr_checkea_getregusage(yasm_expr **ep, /*@null@*/ yasm_expr **wrt,
/* Calculate the displacement length, if possible.
* Takes several extra inputs so it can be used by both 32-bit and 16-bit
* expressions:
- * wordsize=2 for 16-bit, =4 for 32-bit.
+ * wordsize=16 for 16-bit, =32 for 32-bit.
* noreg=1 if the *ModRM byte* has no registers used.
* dispreq=1 if a displacement value is *required* (even if =0).
* Returns 0 if successfully calculated, 1 if not.
*/
/*@-nullstate@*/
static int
-x86_checkea_calc_displen(yasm_expr **ep, unsigned int wordsize, int noreg,
- int dispreq, unsigned char *displen,
- unsigned char *modrm, unsigned char *v_modrm)
+x86_checkea_calc_displen(x86_effaddr *x86_ea, unsigned int wordsize, int noreg,
+ int dispreq)
{
- yasm_expr *e = *ep;
- const yasm_intnum *intn;
+ /*@null@*/ const yasm_intnum *intn = NULL;
long dispval;
- *v_modrm = 0; /* default to not yet valid */
+ x86_ea->valid_modrm = 0; /* default to not yet valid */
- switch (*displen) {
+ switch (x86_ea->ea.disp.size) {
case 0:
break;
/* If not 0, the displacement length was forced; set the Mod bits
* appropriately and we're done with the ModRM byte.
*/
- case 1:
+ case 8:
/* Byte is not valid override in noreg case; fix it. */
if (noreg) {
- *displen = 0;
- yasm__warning(YASM_WARN_GENERAL, e->line,
+ x86_ea->ea.disp.size = 0;
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("invalid displacement size; fixed"));
} else
- *modrm |= 0100;
- *v_modrm = 1;
+ x86_ea->modrm |= 0100;
+ x86_ea->valid_modrm = 1;
break;
- case 2:
- case 4:
- if (wordsize != *displen) {
- yasm__error(e->line,
+ case 16:
+ case 32:
+ if (wordsize != x86_ea->ea.disp.size) {
+ yasm_error_set(YASM_ERROR_VALUE,
N_("invalid effective address (displacement size)"));
return 1;
}
/* 2/4 is not valid override in noreg case; fix it. */
if (noreg) {
- if (wordsize != *displen)
- yasm__warning(YASM_WARN_GENERAL, e->line,
+ if (wordsize != x86_ea->ea.disp.size)
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("invalid displacement size; fixed"));
- *displen = 0;
+ x86_ea->ea.disp.size = 0;
} else
- *modrm |= 0200;
- *v_modrm = 1;
+ x86_ea->modrm |= 0200;
+ x86_ea->valid_modrm = 1;
break;
default:
/* we shouldn't ever get any other size! */
yasm_internal_error(N_("strange EA displacement size"));
}
- if (*displen == 0) {
+ if (x86_ea->ea.disp.size == 0) {
/* the displacement length hasn't been forced (or the forcing wasn't
* valid), try to determine what it is.
*/
@@ -458,18 +457,34 @@ x86_checkea_calc_displen(yasm_expr **ep, unsigned int wordsize, int noreg,
* and as the Mod bits are set to 0 by the caller, we're done
* with the ModRM byte.
*/
- *displen = wordsize;
- *v_modrm = 1;
+ x86_ea->ea.disp.size = wordsize;
+ x86_ea->valid_modrm = 1;
return 0;
} else if (dispreq) {
/* for BP/EBP, there *must* be a displacement value, but we
* may not know the size (8 or 16/32) for sure right now.
- * We can't leave displen at 0, because that just means
- * unknown displacement, including none.
*/
- *displen = 0xff;
- *modrm |= 0100;
- *v_modrm = 1;
+ x86_ea->ea.need_nonzero_len = 1;
+ x86_ea->modrm |= 0100;
+ x86_ea->valid_modrm = 1;
+ return 0;
+ }
+
+ /* Relative displacement; basically all object formats need non-byte
+ * for relocation here, so just do that.
+ */
+ if (x86_ea->ea.disp.rel)
+ x86_ea->ea.disp.size = wordsize;
+
+ /* don't try to find out what size displacement we have if
+ * displen is known.
+ */
+ if (x86_ea->ea.disp.size != 0) {
+ if (x86_ea->ea.disp.size == 8)
+ x86_ea->modrm |= 0100;
+ else
+ x86_ea->modrm |= 0200;
+ x86_ea->valid_modrm = 1;
return 0;
}
@@ -483,38 +498,41 @@ x86_checkea_calc_displen(yasm_expr **ep, unsigned int wordsize, int noreg,
* expansion and one for 16-bit expansion. The complex expression
* equaling zero is probably a rare case, so we ignore it for now.
*/
-
- intn = yasm_expr_get_intnum(ep, NULL);
- if (!intn) {
+ if (x86_ea->ea.disp.abs &&
+ !(intn = yasm_expr_get_intnum(&x86_ea->ea.disp.abs, NULL))) {
/* expr still has unknown values: treat like BP/EBP above */
- *displen = 0xff;
- *modrm |= 0100;
- *v_modrm = 1;
+ x86_ea->ea.need_nonzero_len = 1;
+ x86_ea->modrm |= 0100;
+ x86_ea->valid_modrm = 1;
return 0;
- }
+ }
- dispval = yasm_intnum_get_int(intn);
+ if (intn)
+ dispval = yasm_intnum_get_int(intn);
+ else
+ dispval = 0;
/* Figure out what size displacement we will have. */
- if (dispval == 0) {
+ if (!x86_ea->ea.need_nonzero_len && dispval == 0) {
/* if we know that the displacement is 0 right now,
- * go ahead and delete the expr (making it so no
- * displacement value is included in the output).
+ * go ahead and delete the expr and make it so no
+ * displacement value is included in the output.
* The Mod bits of ModRM are set to 0 above, and
* we're done with the ModRM byte!
*/
- yasm_expr_destroy(e);
- *ep = (yasm_expr *)NULL;
+ yasm_expr_destroy(x86_ea->ea.disp.abs);
+ x86_ea->ea.disp.abs = NULL;
+ x86_ea->ea.need_disp = 0;
} else if (dispval >= -128 && dispval <= 127) {
/* It fits into a signed byte */
- *displen = 1;
- *modrm |= 0100;
+ x86_ea->ea.disp.size = 8;
+ x86_ea->modrm |= 0100;
} else {
/* It's a 16/32-bit displacement */
- *displen = wordsize;
- *modrm |= 0200;
+ x86_ea->ea.disp.size = wordsize;
+ x86_ea->modrm |= 0200;
}
- *v_modrm = 1; /* We're done with ModRM */
+ x86_ea->valid_modrm = 1; /* We're done with ModRM */
}
return 0;
@@ -547,49 +565,39 @@ x86_expr_checkea_getregsize_callback(yasm_expr__item *ei, void *d)
}
int
-yasm_x86__expr_checkea(yasm_expr **ep, unsigned char *addrsize,
- unsigned int bits, unsigned int nosplit,
- int address16_op, unsigned char *displen,
- unsigned char *modrm, unsigned char *v_modrm,
- unsigned char *n_modrm, unsigned char *sib,
- unsigned char *v_sib, unsigned char *n_sib,
- unsigned char *pcrel, unsigned char *rex)
+yasm_x86__expr_checkea(x86_effaddr *x86_ea, unsigned char *addrsize,
+ unsigned int bits, int address16_op, unsigned char *rex)
{
- yasm_expr *e, *wrt;
int retval;
- /* First split off any top-level WRT. We'll add it back in at the end */
- wrt = yasm_expr_extract_wrt(ep);
- e = *ep;
-
if (*addrsize == 0) {
/* we need to figure out the address size from what we know about:
* - the displacement length
* - what registers are used in the expression
* - the bits setting
*/
- switch (*displen) {
- case 2:
+ switch (x86_ea->ea.disp.size) {
+ case 16:
/* must be 16-bit */
*addrsize = 16;
break;
- case 8:
+ case 64:
/* We have to support this for the MemOffs case, but it's
* otherwise illegal. It's also illegal in non-64-bit mode.
*/
- if (*n_modrm || *n_sib) {
- yasm__error(e->line,
+ if (x86_ea->need_modrm || x86_ea->need_sib) {
+ yasm_error_set(YASM_ERROR_VALUE,
N_("invalid effective address (displacement size)"));
return 1;
}
*addrsize = 64;
break;
- case 4:
+ case 32:
/* Must be 32-bit in 16-bit or 32-bit modes. In 64-bit mode,
* we don't know unless we look at the registers, except in the
* MemOffs case (see the end of this function).
*/
- if (bits != 64 || (!*n_modrm && !*n_sib)) {
+ if (bits != 64 || (!x86_ea->need_modrm && !x86_ea->need_sib)) {
*addrsize = 32;
break;
}
@@ -598,8 +606,9 @@ yasm_x86__expr_checkea(yasm_expr **ep, unsigned char *addrsize,
/* check for use of 16 or 32-bit registers; if none are used
* default to bits setting.
*/
- if (!yasm_expr__traverse_leaves_in(e, addrsize,
- x86_expr_checkea_getregsize_callback))
+ if (!x86_ea->ea.disp.abs ||
+ !yasm_expr__traverse_leaves_in(x86_ea->ea.disp.abs,
+ addrsize, x86_expr_checkea_getregsize_callback))
*addrsize = bits;
/* TODO: Add optional warning here if switched address size
* from bits setting just by register use.. eg [ax] in
@@ -609,7 +618,8 @@ yasm_x86__expr_checkea(yasm_expr **ep, unsigned char *addrsize,
}
if ((*addrsize == 32 || *addrsize == 64) &&
- ((*n_modrm && !*v_modrm) || (*n_sib && !*v_sib))) {
+ ((x86_ea->need_modrm && !x86_ea->valid_modrm) ||
+ (x86_ea->need_sib && !x86_ea->valid_sib))) {
int i;
unsigned char low3;
typedef enum {
@@ -640,7 +650,7 @@ yasm_x86__expr_checkea(yasm_expr **ep, unsigned char *addrsize,
/* We can only do 64-bit addresses in 64-bit mode. */
if (*addrsize == 64 && bits != 64) {
- yasm__error(e->line,
+ yasm_error_set(YASM_ERROR_TYPE,
N_("invalid effective address (64-bit in non-64-bit mode)"));
return 1;
}
@@ -648,13 +658,29 @@ yasm_x86__expr_checkea(yasm_expr **ep, unsigned char *addrsize,
reg3264_data.regs = reg3264mult;
reg3264_data.bits = bits;
reg3264_data.addrsize = *addrsize;
- if (x86_expr_checkea_getregusage(ep, &wrt, &indexreg, pcrel, bits,
- &reg3264_data,
- x86_expr_checkea_get_reg3264)) {
- yasm__error((*ep)->line, N_("invalid effective address"));
- return 1;
+ if (x86_ea->ea.disp.abs) {
+ int pcrel = 0;
+ switch (x86_expr_checkea_getregusage
+ (&x86_ea->ea.disp.abs, &indexreg, &pcrel, bits,
+ &reg3264_data, x86_expr_checkea_get_reg3264)) {
+ case 1:
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("invalid effective address"));
+ return 1;
+ case 2:
+ if (pcrel) {
+ x86_ea->ea.disp.curpos_rel = 1;
+ x86_ea->ea.disp.ip_rel = 1;
+ }
+ return 2;
+ default:
+ if (pcrel) {
+ x86_ea->ea.disp.curpos_rel = 1;
+ x86_ea->ea.disp.ip_rel = 1;
+ }
+ break;
+ }
}
- e = *ep;
/* If indexreg mult is 0, discard it.
* This is possible because of the way indexreg is found in
@@ -669,7 +695,8 @@ yasm_x86__expr_checkea(yasm_expr **ep, unsigned char *addrsize,
*/
for (i=0; i<17; i++) {
if (reg3264mult[i] < 0) {
- yasm__error(e->line, N_("invalid effective address"));
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("invalid effective address"));
return 1;
}
if (i != indexreg && reg3264mult[i] == 1 &&
@@ -686,14 +713,14 @@ yasm_x86__expr_checkea(yasm_expr **ep, unsigned char *addrsize,
switch (reg3264mult[indexreg]) {
case 1:
/* Only optimize this way if nosplit wasn't specified */
- if (!nosplit) {
+ if (!x86_ea->ea.nosplit) {
basereg = indexreg;
indexreg = -1;
}
break;
case 2:
/* Only split if nosplit wasn't specified */
- if (!nosplit) {
+ if (!x86_ea->ea.nosplit) {
basereg = indexreg;
reg3264mult[indexreg] = 1;
}
@@ -711,7 +738,8 @@ yasm_x86__expr_checkea(yasm_expr **ep, unsigned char *addrsize,
*/
for (i=0; i<17; i++)
if (i != basereg && i != indexreg && reg3264mult[i] != 0) {
- yasm__error(e->line, N_("invalid effective address"));
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("invalid effective address"));
return 1;
}
@@ -719,7 +747,7 @@ yasm_x86__expr_checkea(yasm_expr **ep, unsigned char *addrsize,
if (indexreg != REG3264_NONE && reg3264mult[indexreg] != 1 &&
reg3264mult[indexreg] != 2 && reg3264mult[indexreg] != 4 &&
reg3264mult[indexreg] != 8) {
- yasm__error(e->line, N_("invalid effective address"));
+ yasm_error_set(YASM_ERROR_VALUE, N_("invalid effective address"));
return 1;
}
@@ -729,7 +757,8 @@ yasm_x86__expr_checkea(yasm_expr **ep, unsigned char *addrsize,
* legal.
*/
if (reg3264mult[REG3264_ESP] > 1 || basereg == REG3264_ESP) {
- yasm__error(e->line, N_("invalid effective address"));
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("invalid effective address"));
return 1;
}
/* If mult==1 and basereg is not ESP, swap indexreg w/basereg. */
@@ -740,7 +769,7 @@ yasm_x86__expr_checkea(yasm_expr **ep, unsigned char *addrsize,
/* RIP is only legal if it's the ONLY register used. */
if (indexreg == REG64_RIP ||
(basereg == REG64_RIP && indexreg != REG3264_NONE)) {
- yasm__error(e->line, N_("invalid effective address"));
+ yasm_error_set(YASM_ERROR_VALUE, N_("invalid effective address"));
return 1;
}
@@ -750,31 +779,28 @@ yasm_x86__expr_checkea(yasm_expr **ep, unsigned char *addrsize,
*/
/* First determine R/M (Mod is later determined from disp size) */
- *n_modrm = 1; /* we always need ModRM */
+ x86_ea->need_modrm = 1; /* we always need ModRM */
if (basereg == REG3264_NONE && indexreg == REG3264_NONE) {
/* Just a disp32: in 64-bit mode the RM encoding is used for RIP
* offset addressing, so we need to use the SIB form instead.
*/
if (bits == 64) {
- *modrm |= 4;
- *n_sib = 1;
+ x86_ea->modrm |= 4;
+ x86_ea->need_sib = 1;
} else {
- *modrm |= 5;
- *sib = 0;
- *v_sib = 0;
- *n_sib = 0;
+ x86_ea->modrm |= 5;
+ x86_ea->sib = 0;
+ x86_ea->valid_sib = 0;
+ x86_ea->need_sib = 0;
}
} else if (basereg == REG64_RIP) {
- *modrm |= 5;
- *sib = 0;
- *v_sib = 0;
- *n_sib = 0;
+ x86_ea->modrm |= 5;
+ x86_ea->sib = 0;
+ x86_ea->valid_sib = 0;
+ x86_ea->need_sib = 0;
/* RIP always requires a 32-bit displacement */
- *v_modrm = 1;
- *displen = 4;
- if (wrt)
- *ep = yasm_expr_create_tree(*ep, YASM_EXPR_WRT, wrt,
- (*ep)->line);
+ x86_ea->valid_modrm = 1;
+ x86_ea->ea.disp.size = 32;
return 0;
} else if (indexreg == REG3264_NONE) {
/* basereg only */
@@ -785,81 +811,79 @@ yasm_x86__expr_checkea(yasm_expr **ep, unsigned char *addrsize,
if (yasm_x86__set_rex_from_reg(rex, &low3,
(unsigned int)(X86_REG64 | basereg),
bits, X86_REX_B)) {
- yasm__error(e->line,
+ yasm_error_set(YASM_ERROR_TYPE,
N_("invalid combination of operands and effective address"));
return 1;
}
- *modrm |= low3;
+ x86_ea->modrm |= low3;
/* we don't need an SIB *unless* basereg is ESP or R12 */
if (basereg == REG3264_ESP || basereg == REG64_R12)
- *n_sib = 1;
+ x86_ea->need_sib = 1;
else {
- *sib = 0;
- *v_sib = 0;
- *n_sib = 0;
+ x86_ea->sib = 0;
+ x86_ea->valid_sib = 0;
+ x86_ea->need_sib = 0;
}
} else {
/* index or both base and index */
- *modrm |= 4;
- *n_sib = 1;
+ x86_ea->modrm |= 4;
+ x86_ea->need_sib = 1;
}
/* Determine SIB if needed */
- if (*n_sib == 1) {
- *sib = 0; /* start with 0 */
+ if (x86_ea->need_sib == 1) {
+ x86_ea->sib = 0; /* start with 0 */
/* Special case: no basereg */
if (basereg == REG3264_NONE)
- *sib |= 5;
+ x86_ea->sib |= 5;
else {
if (yasm_x86__set_rex_from_reg(rex, &low3, (unsigned int)
(X86_REG64 | basereg), bits,
X86_REX_B)) {
- yasm__error(e->line,
+ yasm_error_set(YASM_ERROR_TYPE,
N_("invalid combination of operands and effective address"));
return 1;
}
- *sib |= low3;
+ x86_ea->sib |= low3;
}
/* Put in indexreg, checking for none case */
if (indexreg == REG3264_NONE)
- *sib |= 040;
+ x86_ea->sib |= 040;
/* Any scale field is valid, just leave at 0. */
else {
if (yasm_x86__set_rex_from_reg(rex, &low3, (unsigned int)
(X86_REG64 | indexreg), bits,
X86_REX_X)) {
- yasm__error(e->line,
+ yasm_error_set(YASM_ERROR_TYPE,
N_("invalid combination of operands and effective address"));
return 1;
}
- *sib |= low3 << 3;
+ x86_ea->sib |= low3 << 3;
/* Set scale field, 1 case -> 0, so don't bother. */
switch (reg3264mult[indexreg]) {
case 2:
- *sib |= 0100;
+ x86_ea->sib |= 0100;
break;
case 4:
- *sib |= 0200;
+ x86_ea->sib |= 0200;
break;
case 8:
- *sib |= 0300;
+ x86_ea->sib |= 0300;
break;
}
}
- *v_sib = 1; /* Done with SIB */
+ x86_ea->valid_sib = 1; /* Done with SIB */
}
/* Calculate displacement length (if possible) */
- retval = x86_checkea_calc_displen(ep, 4, basereg == REG3264_NONE,
- basereg == REG3264_EBP || basereg == REG64_R13, displen, modrm,
- v_modrm);
- if (wrt)
- *ep = yasm_expr_create_tree(*ep, YASM_EXPR_WRT, wrt, (*ep)->line);
+ retval = x86_checkea_calc_displen
+ (x86_ea, 32, basereg == REG3264_NONE,
+ basereg == REG3264_EBP || basereg == REG64_R13);
return retval;
- } else if (*addrsize == 16 && *n_modrm && !*v_modrm) {
+ } else if (*addrsize == 16 && x86_ea->need_modrm && !x86_ea->valid_modrm) {
static const unsigned char modrm16[16] = {
0006 /* disp16 */, 0007 /* [BX] */, 0004 /* [SI] */,
0000 /* [BX+SI] */, 0005 /* [DI] */, 0001 /* [BX+DI] */,
@@ -879,28 +903,44 @@ yasm_x86__expr_checkea(yasm_expr **ep, unsigned char *addrsize,
/* 64-bit mode does not allow 16-bit addresses */
if (bits == 64 && !address16_op) {
- yasm__error(e->line,
+ yasm_error_set(YASM_ERROR_TYPE,
N_("16-bit addresses not supported in 64-bit mode"));
return 1;
}
/* 16-bit cannot have SIB */
- *sib = 0;
- *v_sib = 0;
- *n_sib = 0;
-
- if (x86_expr_checkea_getregusage(ep, &wrt, NULL, pcrel, bits,
- &reg16mult,
- x86_expr_checkea_get_reg16)) {
- yasm__error((*ep)->line, N_("invalid effective address"));
- return 1;
+ x86_ea->sib = 0;
+ x86_ea->valid_sib = 0;
+ x86_ea->need_sib = 0;
+
+ if (x86_ea->ea.disp.abs) {
+ int pcrel = 0;
+ switch (x86_expr_checkea_getregusage
+ (&x86_ea->ea.disp.abs, (int *)NULL, &pcrel, bits,
+ &reg16mult, x86_expr_checkea_get_reg16)) {
+ case 1:
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("invalid effective address"));
+ return 1;
+ case 2:
+ if (pcrel) {
+ x86_ea->ea.disp.curpos_rel = 1;
+ x86_ea->ea.disp.ip_rel = 1;
+ }
+ return 2;
+ default:
+ if (pcrel) {
+ x86_ea->ea.disp.curpos_rel = 1;
+ x86_ea->ea.disp.ip_rel = 1;
+ }
+ break;
+ }
}
- e = *ep;
/* reg multipliers not 0 or 1 are illegal. */
if (reg16mult.bx & ~1 || reg16mult.si & ~1 || reg16mult.di & ~1 ||
reg16mult.bp & ~1) {
- yasm__error(e->line, N_("invalid effective address"));
+ yasm_error_set(YASM_ERROR_VALUE, N_("invalid effective address"));
return 1;
}
@@ -916,60 +956,56 @@ yasm_x86__expr_checkea(yasm_expr **ep, unsigned char *addrsize,
/* Check the modrm value for invalid combinations. */
if (modrm16[havereg] & 0070) {
- yasm__error(e->line, N_("invalid effective address"));
+ yasm_error_set(YASM_ERROR_VALUE, N_("invalid effective address"));
return 1;
}
/* Set ModRM byte for registers */
- *modrm |= modrm16[havereg];
+ x86_ea->modrm |= modrm16[havereg];
/* Calculate displacement length (if possible) */
- retval = x86_checkea_calc_displen(ep, 2, havereg == HAVE_NONE,
- havereg == HAVE_BP, displen, modrm,
- v_modrm);
- if (wrt)
- *ep = yasm_expr_create_tree(*ep, YASM_EXPR_WRT, wrt, (*ep)->line);
+ retval = x86_checkea_calc_displen
+ (x86_ea, 16, havereg == HAVE_NONE, havereg == HAVE_BP);
return retval;
- } else if (!*n_modrm && !*n_sib) {
+ } else if (!x86_ea->need_modrm && !x86_ea->need_sib) {
/* Special case for MOV MemOffs opcode: displacement but no modrm. */
switch (*addrsize) {
case 64:
if (bits != 64) {
- yasm__error(e->line,
+ yasm_error_set(YASM_ERROR_TYPE,
N_("invalid effective address (64-bit in non-64-bit mode)"));
return 1;
}
- *displen = 8;
+ x86_ea->ea.disp.size = 64;
break;
case 32:
- *displen = 4;
+ x86_ea->ea.disp.size = 32;
break;
case 16:
/* 64-bit mode does not allow 16-bit addresses */
if (bits == 64 && !address16_op) {
- yasm__error(e->line,
+ yasm_error_set(YASM_ERROR_TYPE,
N_("16-bit addresses not supported in 64-bit mode"));
return 1;
}
- *displen = 2;
+ x86_ea->ea.disp.size = 16;
break;
}
}
- if (wrt)
- *ep = yasm_expr_create_tree(*ep, YASM_EXPR_WRT, wrt, (*ep)->line);
return 0;
}
int
yasm_x86__floatnum_tobytes(yasm_arch *arch, const yasm_floatnum *flt,
unsigned char *buf, size_t destsize, size_t valsize,
- size_t shift, int warn, unsigned long line)
+ size_t shift, int warn)
{
if (!yasm_floatnum_check_size(flt, valsize)) {
- yasm__error(line, N_("invalid floating point constant size"));
+ yasm_error_set(YASM_ERROR_FLOATING_POINT,
+ N_("invalid floating point constant size"));
return 1;
}
- yasm_floatnum_get_sized(flt, buf, destsize, valsize, shift, 0, warn, line);
+ yasm_floatnum_get_sized(flt, buf, destsize, valsize, shift, 0, warn);
return 0;
}
diff --git a/modules/arch/x86/x86id.re b/modules/arch/x86/x86id.c
index 7f1d50aa..f0245707 100644
--- a/modules/arch/x86/x86id.re
+++ b/modules/arch/x86/x86id.c
@@ -24,6 +24,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include <ctype.h>
#include <util.h>
RCSID("$Id$");
@@ -31,6 +32,7 @@ RCSID("$Id$");
#define YASM_BC_INTERNAL
#define YASM_EXPR_INTERNAL
#include <libyasm.h>
+#include <libyasm/phash.h>
#include "modules/arch/x86/x86arch.h"
@@ -106,10 +108,13 @@ RCSID("$Id$");
* 14 = CR4
* 15 = memory offset (an EA, but with no registers allowed)
* [special case for MOV opcode]
+ * 16 = immediate, value=1 (for special-case shift)
* - 3 bits = size (user-specified, or from register size):
* 0 = any size acceptable/no size spec acceptable (dep. on strict)
* 1/2/3/4 = 8/16/32/64 bits (from user or reg size)
* 5/6 = 80/128 bits (from user)
+ * 7 = current BITS setting; when this is used the size matched
+ * gets stored into the opersize as well.
* - 1 bit = size implicit or explicit ("strictness" of size matching on
* non-registers -- registers are always strictly matched):
* 0 = user size must exactly match size above.
@@ -143,17 +148,16 @@ RCSID("$Id$");
* 9 = operand size goes into address size (jmp only)
* A = far jump (outputs a farjmp instead of normal insn)
* The below describes postponed actions: actions which can't be completed at
- * parse-time due to things like EQU and complex expressions. For these, some
+ * parse-time due to possibly dependent expressions. For these, some
* additional data (stored in the second byte of the opcode with a one-byte
* opcode) is passed to later stages of the assembler with flags set to
* indicate postponed actions.
* - 3 bits = postponed action:
* 0 = none
- * 1 = shift operation with a ,1 short form (instead of imm8).
- * 2 = large imm16/32 that can become a sign-extended imm8.
- * 3 = could become a short opcode mov with bits=64 and a32 prefix
- * 4 = forced 16-bit address size (override ignored, no prefix)
- * 5 = large imm64 that can become a sign-extended imm32.
+ * 1 = large imm16/32 that can become a sign-extended imm8.
+ * 2 = could become a short opcode mov with bits=64 and a32 prefix
+ * 3 = forced 16-bit address size (override ignored, no prefix)
+ * 4 = large imm64 that can become a sign-extended imm32.
*/
#define OPT_Imm 0x0
#define OPT_Reg 0x1
@@ -177,6 +181,7 @@ RCSID("$Id$");
#define OPT_SS 0x13
#define OPT_CR4 0x14
#define OPT_MemOffs 0x15
+#define OPT_Imm1 0x16
#define OPT_MASK 0x1F
#define OPS_Any (0UL<<5)
@@ -186,6 +191,7 @@ RCSID("$Id$");
#define OPS_64 (4UL<<5)
#define OPS_80 (5UL<<5)
#define OPS_128 (6UL<<5)
+#define OPS_BITS (7UL<<5)
#define OPS_MASK (7UL<<5)
#define OPS_SHIFT 5
@@ -217,11 +223,10 @@ RCSID("$Id$");
#define OPA_MASK (0xFUL<<13)
#define OPAP_None (0UL<<17)
-#define OPAP_ShiftOp (1UL<<17)
-#define OPAP_SImm8Avail (2UL<<17)
-#define OPAP_ShortMov (3UL<<17)
-#define OPAP_A16 (4UL<<17)
-#define OPAP_SImm32Avail (5UL<<17)
+#define OPAP_SImm8Avail (1UL<<17)
+#define OPAP_ShortMov (2UL<<17)
+#define OPAP_A16 (3UL<<17)
+#define OPAP_SImm32Avail (4UL<<17)
#define OPAP_MASK (7UL<<17)
typedef struct x86_insn_info {
@@ -272,16 +277,6 @@ typedef struct x86_insn_info {
unsigned long operands[3];
} x86_insn_info;
-/* Define lexer arch-specific data with 0-3 modifiers.
- * This assumes arch_x86 is locally defined.
- */
-#define DEF_INSN_DATA(group, mod, cpu) do { \
- data[0] = (unsigned long)group##_insn; \
- data[1] = (((unsigned long)mod)<<8) | \
- ((unsigned char)(sizeof(group##_insn)/sizeof(x86_insn_info))); \
- data[2] = cpu; \
- } while (0)
-
/*
* General instruction groupings
*/
@@ -304,7 +299,7 @@ static const x86_insn_info onebyte_insn[] = {
/* One byte opcode instructions with "special" prefix with no operands */
static const x86_insn_info onebyte_prefix_insn[] = {
- { CPU_Any, MOD_Op0Add|MOD_PreAdd, 0, 0, 0x00, 2, {0x00, 0, 0}, 0, 0,
+ { CPU_Any, MOD_Op0Add|MOD_PreAdd, 0, 0, 0x00, 1, {0x00, 0, 0}, 0, 0,
{0, 0, 0} }
};
@@ -633,9 +628,12 @@ static const x86_insn_info push_insn[] = {
{ CPU_386|CPU_Not64, MOD_GasOnly|MOD_GasSufL, 32, 0, 0, 1,
{0x68, 0x6A, 0}, 0, 1,
{OPT_Imm|OPS_32|OPS_Relaxed|OPA_Imm|OPAP_SImm8Avail, 0, 0} },
- { CPU_Hammer|CPU_64, MOD_GasOnly|MOD_GasSufQ, 64, 64, 0, 1,
+ { CPU_Hammer|CPU_64, MOD_GasSufQ, 64, 64, 0, 1,
{0x68, 0x6A, 0}, 0, 1,
{OPT_Imm|OPS_32|OPS_Relaxed|OPA_SImm|OPAP_SImm8Avail, 0, 0} },
+ { CPU_Any|CPU_Not64, MOD_GasIllegal, 0, 0, 0, 1,
+ {0x68, 0x6A, 0}, 0, 1,
+ {OPT_Imm|OPS_BITS|OPS_Relaxed|OPA_Imm|OPAP_SImm8Avail, 0, 0} },
{ CPU_Not64, 0, 0, 0, 0, 1, {0x0E, 0, 0}, 0, 1,
{OPT_CS|OPS_Any|OPA_None, 0, 0} },
{ CPU_Not64, MOD_GasSufW, 16, 0, 0, 1, {0x0E, 0, 0}, 0, 1,
@@ -1050,23 +1048,23 @@ static const x86_insn_info imul_insn[] = {
{ CPU_Hammer|CPU_64, MOD_GasSufQ, 64, 0, 0, 1, {0x6B, 0, 0}, 0, 2,
{OPT_Reg|OPS_64|OPA_SpareEA, OPT_Imm|OPS_8|OPA_SImm, 0} },
- { CPU_186, MOD_GasSufW, 16, 0, 0, 1, {0x6B, 0x69, 0}, 0, 3,
+ { CPU_186, MOD_GasSufW, 16, 0, 0, 1, {0x69, 0x6B, 0}, 0, 3,
{OPT_Reg|OPS_16|OPA_Spare, OPT_RM|OPS_16|OPS_Relaxed|OPA_EA,
OPT_Imm|OPS_16|OPS_Relaxed|OPA_SImm|OPAP_SImm8Avail} },
- { CPU_386, MOD_GasSufL, 32, 0, 0, 1, {0x6B, 0x69, 0}, 0, 3,
+ { CPU_386, MOD_GasSufL, 32, 0, 0, 1, {0x69, 0x6B, 0}, 0, 3,
{OPT_Reg|OPS_32|OPA_Spare, OPT_RM|OPS_32|OPS_Relaxed|OPA_EA,
OPT_Imm|OPS_32|OPS_Relaxed|OPA_SImm|OPAP_SImm8Avail} },
- { CPU_Hammer|CPU_64, MOD_GasSufQ, 64, 0, 0, 1, {0x6B, 0x69, 0}, 0, 3,
+ { CPU_Hammer|CPU_64, MOD_GasSufQ, 64, 0, 0, 1, {0x69, 0x6B, 0}, 0, 3,
{OPT_Reg|OPS_64|OPA_Spare, OPT_RM|OPS_64|OPS_Relaxed|OPA_EA,
OPT_Imm|OPS_32|OPS_Relaxed|OPA_SImm|OPAP_SImm8Avail} },
- { CPU_186, MOD_GasSufW, 16, 0, 0, 1, {0x6B, 0x69, 0}, 0, 2,
+ { CPU_186, MOD_GasSufW, 16, 0, 0, 1, {0x69, 0x6B, 0}, 0, 2,
{OPT_Reg|OPS_16|OPA_SpareEA,
OPT_Imm|OPS_16|OPS_Relaxed|OPA_SImm|OPAP_SImm8Avail, 0} },
- { CPU_386, MOD_GasSufL, 32, 0, 0, 1, {0x6B, 0x69, 0}, 0, 2,
+ { CPU_386, MOD_GasSufL, 32, 0, 0, 1, {0x69, 0x6B, 0}, 0, 2,
{OPT_Reg|OPS_32|OPA_SpareEA,
OPT_Imm|OPS_32|OPS_Relaxed|OPA_SImm|OPAP_SImm8Avail, 0} },
- { CPU_Hammer|CPU_64, MOD_GasSufQ, 64, 0, 0, 1, {0x6B, 0x69, 0}, 0, 2,
+ { CPU_Hammer|CPU_64, MOD_GasSufQ, 64, 0, 0, 1, {0x69, 0x6B, 0}, 0, 2,
{OPT_Reg|OPS_64|OPA_SpareEA,
OPT_Imm|OPS_32|OPS_Relaxed|OPA_SImm|OPAP_SImm8Avail, 0} }
};
@@ -1075,33 +1073,28 @@ static const x86_insn_info imul_insn[] = {
static const x86_insn_info shift_insn[] = {
{ CPU_Any, MOD_SpAdd|MOD_GasSufB, 0, 0, 0, 1, {0xD2, 0, 0}, 0, 2,
{OPT_RM|OPS_8|OPA_EA, OPT_Creg|OPS_8|OPA_None, 0} },
- /* FIXME: imm8 is only avail on 186+, but we use imm8 to get to postponed
- * ,1 form, so it has to be marked as Any. We need to store the active
- * CPU flags somewhere to pass that parse-time info down the line.
- */
- { CPU_Any, MOD_SpAdd|MOD_GasSufB, 0, 0, 0, 1, {0xD0, 0xC0, 0}, 0, 2,
- {OPT_RM|OPS_8|OPA_EA, OPT_Imm|OPS_8|OPS_Relaxed|OPA_Imm|OPAP_ShiftOp,
- 0} },
+ { CPU_Any, MOD_SpAdd|MOD_GasSufB, 0, 0, 0, 1, {0xD0, 0, 0}, 0, 2,
+ {OPT_RM|OPS_8|OPA_EA, OPT_Imm1|OPS_8|OPS_Relaxed|OPA_None, 0} },
+ { CPU_186, MOD_SpAdd|MOD_GasSufB, 0, 0, 0, 1, {0xC0, 0, 0}, 0, 2,
+ {OPT_RM|OPS_8|OPA_EA, OPT_Imm|OPS_8|OPS_Relaxed|OPA_Imm, 0} },
{ CPU_Any, MOD_SpAdd|MOD_GasSufW, 16, 0, 0, 1, {0xD3, 0, 0}, 0, 2,
{OPT_RM|OPS_16|OPA_EA, OPT_Creg|OPS_8|OPA_None, 0} },
- { CPU_Any, MOD_SpAdd|MOD_GasSufW, 16, 0, 0, 1, {0xD1, 0xC1, 0}, 0, 2,
- {OPT_RM|OPS_16|OPA_EA, OPT_Imm|OPS_8|OPS_Relaxed|OPA_Imm|OPAP_ShiftOp,
- 0} },
+ { CPU_Any, MOD_SpAdd|MOD_GasSufW, 16, 0, 0, 1, {0xD1, 0, 0}, 0, 2,
+ {OPT_RM|OPS_16|OPA_EA, OPT_Imm1|OPS_8|OPS_Relaxed|OPA_None, 0} },
+ { CPU_186, MOD_SpAdd|MOD_GasSufW, 16, 0, 0, 1, {0xC1, 0, 0}, 0, 2,
+ {OPT_RM|OPS_16|OPA_EA, OPT_Imm|OPS_8|OPS_Relaxed|OPA_Imm, 0} },
{ CPU_Any, MOD_SpAdd|MOD_GasSufL, 32, 0, 0, 1, {0xD3, 0, 0}, 0, 2,
{OPT_RM|OPS_32|OPA_EA, OPT_Creg|OPS_8|OPA_None, 0} },
- { CPU_Any, MOD_SpAdd|MOD_GasSufL, 32, 0, 0, 1, {0xD1, 0xC1, 0}, 0, 2,
- {OPT_RM|OPS_32|OPA_EA, OPT_Imm|OPS_8|OPS_Relaxed|OPA_Imm|OPAP_ShiftOp,
- 0} },
- { CPU_Hammer|CPU_64, MOD_SpAdd, 64, 0, 0, 1, {0xD3, 0, 0}, 0, 2,
- {OPT_RM|OPS_64|OPA_EA, OPT_Creg|OPS_8|OPA_None, 0} },
- { CPU_Hammer|CPU_64, MOD_SpAdd, 64, 0, 0, 1, {0xD1, 0xC1, 0}, 0, 2,
- {OPT_RM|OPS_64|OPA_EA, OPT_Imm|OPS_8|OPS_Relaxed|OPA_Imm|OPAP_ShiftOp,
- 0} },
+ { CPU_386, MOD_SpAdd|MOD_GasSufL, 32, 0, 0, 1, {0xD1, 0, 0}, 0, 2,
+ {OPT_RM|OPS_32|OPA_EA, OPT_Imm1|OPS_8|OPS_Relaxed|OPA_None, 0} },
+ { CPU_386, MOD_SpAdd|MOD_GasSufL, 32, 0, 0, 1, {0xC1, 0, 0}, 0, 2,
+ {OPT_RM|OPS_32|OPA_EA, OPT_Imm|OPS_8|OPS_Relaxed|OPA_Imm, 0} },
{ CPU_Hammer|CPU_64, MOD_SpAdd|MOD_GasSufQ, 64, 0, 0, 1, {0xD3, 0, 0}, 0,
2, {OPT_RM|OPS_64|OPA_EA, OPT_Creg|OPS_8|OPA_None, 0} },
- { CPU_Hammer|CPU_64, MOD_SpAdd|MOD_GasSufQ, 64, 0, 0, 1, {0xD1, 0xC1, 0},
- 0, 2, {OPT_RM|OPS_64|OPA_EA,
- OPT_Imm|OPS_8|OPS_Relaxed|OPA_Imm|OPAP_ShiftOp, 0} },
+ { CPU_Hammer|CPU_64, MOD_SpAdd|MOD_GasSufQ, 64, 0, 0, 1, {0xD1, 0, 0},
+ 0, 2, {OPT_RM|OPS_64|OPA_EA, OPT_Imm1|OPS_8|OPS_Relaxed|OPA_None, 0} },
+ { CPU_Hammer|CPU_64, MOD_SpAdd|MOD_GasSufQ, 64, 0, 0, 1, {0xC1, 0, 0},
+ 0, 2, {OPT_RM|OPS_64|OPA_EA, OPT_Imm|OPS_8|OPS_Relaxed|OPA_Imm, 0} },
/* In GAS mode, single operands are equivalent to shifting by 1 forms */
{ CPU_Any, MOD_SpAdd|MOD_GasOnly|MOD_GasSufB, 0, 0, 0, 1, {0xD0, 0, 0},
0, 1, {OPT_RM|OPS_8|OPA_EA, 0, 0} },
@@ -1193,6 +1186,8 @@ static const x86_insn_info call_insn[] = {
{OPT_Mem|OPS_16|OPTM_Far|OPA_EA, 0, 0} },
{ CPU_386, 0, 32, 0, 0, 1, {0xFF, 0, 0}, 3, 1,
{OPT_Mem|OPS_32|OPTM_Far|OPA_EA, 0, 0} },
+ { CPU_EM64T|CPU_64, 0, 64, 0, 0, 1, {0xFF, 0, 0}, 3, 1,
+ {OPT_Mem|OPS_64|OPTM_Far|OPA_EA, 0, 0} },
{ CPU_Any, 0, 0, 0, 0, 1, {0xFF, 0, 0}, 3, 1,
{OPT_Mem|OPS_Any|OPTM_Far|OPA_EA, 0, 0} }
};
@@ -1245,23 +1240,25 @@ static const x86_insn_info jmp_insn[] = {
{OPT_Mem|OPS_16|OPTM_Far|OPA_EA, 0, 0} },
{ CPU_386, 0, 32, 0, 0, 1, {0xFF, 0, 0}, 5, 1,
{OPT_Mem|OPS_32|OPTM_Far|OPA_EA, 0, 0} },
+ { CPU_EM64T|CPU_64, 0, 64, 0, 0, 1, {0xFF, 0, 0}, 5, 1,
+ {OPT_Mem|OPS_64|OPTM_Far|OPA_EA, 0, 0} },
{ CPU_Any, 0, 0, 0, 0, 1, {0xFF, 0, 0}, 5, 1,
{OPT_Mem|OPS_Any|OPTM_Far|OPA_EA, 0, 0} }
};
static const x86_insn_info retnf_insn[] = {
- { CPU_Any, MOD_Op0Add, 0, 0, 0, 1,
+ { CPU_Not64, MOD_Op0Add, 0, 0, 0, 1,
{0x01, 0, 0}, 0, 0, {0, 0, 0} },
- { CPU_Any, MOD_Op0Add, 0, 0, 0, 1,
+ { CPU_Not64, MOD_Op0Add, 0, 0, 0, 1,
{0x00, 0, 0}, 0, 1, {OPT_Imm|OPS_16|OPS_Relaxed|OPA_Imm, 0, 0} },
- /* GAS suffix versions */
- { CPU_Any, MOD_Op0Add|MOD_GasSufW, 16, 0, 0, 1,
+ { CPU_64, MOD_Op0Add|MOD_OpSizeR, 0, 0, 0, 1,
{0x01, 0, 0}, 0, 0, {0, 0, 0} },
- { CPU_Any, MOD_Op0Add|MOD_GasSufW, 16, 0, 0, 1,
+ { CPU_64, MOD_Op0Add|MOD_OpSizeR, 0, 0, 0, 1,
{0x00, 0, 0}, 0, 1, {OPT_Imm|OPS_16|OPS_Relaxed|OPA_Imm, 0, 0} },
- { CPU_Any, MOD_Op0Add|MOD_GasSufL|MOD_GasSufQ, 0, 0, 0, 1,
- {0x01, 0, 0}, 0, 0, {0, 0, 0} },
- { CPU_Any, MOD_Op0Add|MOD_GasSufL|MOD_GasSufQ, 0, 0, 0, 1,
- {0x00, 0, 0}, 0, 1, {OPT_Imm|OPS_16|OPS_Relaxed|OPA_Imm, 0, 0} }
+ /* GAS suffix versions */
+ { CPU_Any, MOD_Op0Add|MOD_OpSizeR|MOD_GasSufW|MOD_GasSufL|MOD_GasSufQ, 0,
+ 0, 0, 1, {0x01, 0, 0}, 0, 0, {0, 0, 0} },
+ { CPU_Any, MOD_Op0Add|MOD_OpSizeR|MOD_GasSufW|MOD_GasSufL|MOD_GasSufQ, 0,
+ 0, 0, 1, {0x00, 0, 0}, 0, 1, {OPT_Imm|OPS_16|OPS_Relaxed|OPA_Imm, 0, 0} }
};
static const x86_insn_info enter_insn[] = {
{ CPU_186|CPU_Not64, MOD_GasNoRev|MOD_GasSufL, 0, 0, 0, 1, {0xC8, 0, 0}, 0,
@@ -1379,14 +1376,14 @@ static const x86_insn_info arpl_insn[] = {
{OPT_RM|OPS_16|OPS_Relaxed|OPA_EA, OPT_Reg|OPS_16|OPA_Spare, 0} }
};
static const x86_insn_info str_insn[] = {
- { CPU_Hammer, MOD_GasSufW, 16, 0, 0, 2, {0x0F, 0x00, 0}, 1, 1,
+ { CPU_286|CPU_Prot, MOD_GasSufW, 16, 0, 0, 2, {0x0F, 0x00, 0}, 1, 1,
{OPT_Reg|OPS_16|OPA_EA, 0, 0} },
- { CPU_Hammer, MOD_GasSufL, 32, 0, 0, 2, {0x0F, 0x00, 0}, 1, 1,
+ { CPU_386|CPU_Prot, MOD_GasSufL, 32, 0, 0, 2, {0x0F, 0x00, 0}, 1, 1,
{OPT_Reg|OPS_32|OPA_EA, 0, 0} },
- { CPU_Hammer|CPU_64, MOD_GasSufQ, 64, 0, 0, 2, {0x0F, 0x00, 0}, 1, 1,
- {OPT_Reg|OPS_64|OPA_EA, 0, 0} },
- { CPU_286, MOD_Op1Add|MOD_SpAdd|MOD_GasSufW, 0, 0, 0, 2, {0x0F, 0x00, 0},
- 0, 1, {OPT_RM|OPS_16|OPS_Relaxed|OPA_EA, 0, 0} }
+ { CPU_Hammer|CPU_64|CPU_Prot, MOD_GasSufQ, 64, 0, 0, 2, {0x0F, 0x00, 0}, 1,
+ 1, {OPT_Reg|OPS_64|OPA_EA, 0, 0} },
+ { CPU_286|CPU_Prot, MOD_GasSufW|MOD_GasSufL, 0, 0, 0, 2, {0x0F, 0x00, 0},
+ 1, 1, {OPT_RM|OPS_16|OPS_Relaxed|OPA_EA, 0, 0} }
};
static const x86_insn_info prot286_insn[] = {
{ CPU_286, MOD_Op1Add|MOD_SpAdd|MOD_GasSufW, 0, 0, 0, 2, {0x0F, 0x00, 0},
@@ -1408,19 +1405,29 @@ static const x86_insn_info sldtmsw_insn[] = {
};
/* Floating point instructions - load/store with pop (integer and normal) */
-static const x86_insn_info fldstp_insn[] = {
- { CPU_FPU, MOD_Gap0|MOD_SpAdd|MOD_GasSufS, 0, 0, 0, 1, {0xD9, 0, 0}, 0, 1,
+static const x86_insn_info fld_insn[] = {
+ { CPU_FPU, MOD_GasSufS, 0, 0, 0, 1, {0xD9, 0, 0}, 0, 1,
+ {OPT_Mem|OPS_32|OPA_EA, 0, 0} },
+ { CPU_FPU, MOD_GasSufL, 0, 0, 0, 1, {0xDD, 0, 0}, 0, 1,
+ {OPT_Mem|OPS_64|OPA_EA, 0, 0} },
+ { CPU_FPU, 0, 0, 0, 0, 1, {0xDB, 0, 0}, 5, 1,
+ {OPT_Mem|OPS_80|OPA_EA, 0, 0} },
+ { CPU_FPU, 0, 0, 0, 0, 2, {0xD9, 0xC0, 0}, 0, 1,
+ {OPT_Reg|OPS_80|OPA_Op1Add, 0, 0} }
+};
+static const x86_insn_info fstp_insn[] = {
+ { CPU_FPU, MOD_GasSufS, 0, 0, 0, 1, {0xD9, 0, 0}, 3, 1,
{OPT_Mem|OPS_32|OPA_EA, 0, 0} },
- { CPU_FPU, MOD_Gap0|MOD_SpAdd|MOD_GasSufL, 0, 0, 0, 1, {0xDD, 0, 0}, 0, 1,
+ { CPU_FPU, MOD_GasSufL, 0, 0, 0, 1, {0xDD, 0, 0}, 3, 1,
{OPT_Mem|OPS_64|OPA_EA, 0, 0} },
- { CPU_FPU, MOD_Gap0|MOD_Gap1|MOD_SpAdd, 0, 0, 0, 1, {0xDB, 0, 0}, 0, 1,
+ { CPU_FPU, 0, 0, 0, 0, 1, {0xDB, 0, 0}, 7, 1,
{OPT_Mem|OPS_80|OPA_EA, 0, 0} },
- { CPU_FPU, MOD_Op1Add, 0, 0, 0, 2, {0xD9, 0x00, 0}, 0, 1,
+ { CPU_FPU, 0, 0, 0, 0, 2, {0xDD, 0xD8, 0}, 0, 1,
{OPT_Reg|OPS_80|OPA_Op1Add, 0, 0} }
};
/* Long memory version of floating point load/store for GAS */
static const x86_insn_info fldstpt_insn[] = {
- { CPU_FPU, MOD_Gap0|MOD_Gap1|MOD_SpAdd, 0, 0, 0, 1, {0xDB, 0, 0}, 0, 1,
+ { CPU_FPU, MOD_SpAdd, 0, 0, 0, 1, {0xDB, 0, 0}, 0, 1,
{OPT_Mem|OPS_80|OPA_EA, 0, 0} }
};
static const x86_insn_info fildstp_insn[] = {
@@ -2047,6 +2054,7 @@ x86_finalize_jmpfar(yasm_arch *arch, yasm_bytecode *bc,
{
x86_jmpfar *jmpfar;
yasm_insn_operand *op;
+ /*@only@*/ yasm_expr *segment;
jmpfar = yasm_xmalloc(sizeof(x86_jmpfar));
x86_finalize_common(&jmpfar->common, info, data[3]);
@@ -2057,23 +2065,31 @@ x86_finalize_jmpfar(yasm_arch *arch, yasm_bytecode *bc,
switch (op->targetmod) {
case X86_FAR:
/* "FAR imm" target needs to become "seg imm:imm". */
- jmpfar->offset = yasm_expr_copy(op->data.val);
- jmpfar->segment = yasm_expr_create_branch(YASM_EXPR_SEG,
- op->data.val, bc->line);
+ if (yasm_value_finalize_expr(&jmpfar->offset,
+ yasm_expr_copy(op->data.val), 0)
+ || yasm_value_finalize_expr(&jmpfar->segment, op->data.val, 16))
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("jump target expression too complex"));
+ jmpfar->segment.seg_of = 1;
break;
case X86_FAR_SEGOFF:
/* SEG:OFF expression; split it. */
- jmpfar->offset = op->data.val;
- jmpfar->segment = yasm_expr_extract_segoff(&jmpfar->offset);
- if (!jmpfar->segment)
+ segment = yasm_expr_extract_segoff(&op->data.val);
+ if (!segment)
yasm_internal_error(N_("didn't get SEG:OFF expression in jmpfar"));
+ if (yasm_value_finalize_expr(&jmpfar->segment, segment, 16))
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("jump target segment too complex"));
+ if (yasm_value_finalize_expr(&jmpfar->offset, op->data.val, 0))
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("jump target offset too complex"));
break;
default:
yasm_internal_error(N_("didn't get FAR expression in jmpfar"));
}
yasm_x86__bc_apply_prefixes((x86_common *)jmpfar, NULL, num_prefixes,
- prefixes, bc->line);
+ prefixes);
/* Transform the bytecode */
yasm_x86__bc_transform_jmpfar(bc, jmpfar);
@@ -2102,10 +2118,15 @@ x86_finalize_jmp(yasm_arch *arch, yasm_bytecode *bc, yasm_bytecode *prev_bc,
jmp = yasm_xmalloc(sizeof(x86_jmp));
x86_finalize_common(&jmp->common, jinfo, mode_bits);
- jmp->target = op->data.val;
+ if (yasm_value_finalize_expr(&jmp->target, op->data.val, 0))
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("jump target expression too complex"));
+ if (jmp->target.seg_of || jmp->target.rshift || jmp->target.curpos_rel)
+ yasm_error_set(YASM_ERROR_VALUE, N_("invalid jump target"));
+ jmp->target.curpos_rel = 1;
/* Need to save jump origin for relative jumps. */
- jmp->origin = yasm_symtab_define_label2("$", prev_bc, 0, bc->line);
+ jmp->origin_prevbc = prev_bc;
/* See if the user explicitly specified short/near/far. */
switch ((int)(jinfo->operands[0] & OPTM_MASK)) {
@@ -2171,14 +2192,21 @@ x86_finalize_jmp(yasm_arch *arch, yasm_bytecode *bc, yasm_bytecode *prev_bc,
}
if ((jmp->op_sel == JMP_SHORT_FORCED) && (jmp->nearop.len == 0))
- yasm__error(bc->line,
- N_("no SHORT form of that jump instruction exists"));
+ yasm_error_set(YASM_ERROR_TYPE,
+ N_("no SHORT form of that jump instruction exists"));
if ((jmp->op_sel == JMP_NEAR_FORCED) && (jmp->shortop.len == 0))
- yasm__error(bc->line,
- N_("no NEAR form of that jump instruction exists"));
+ yasm_error_set(YASM_ERROR_TYPE,
+ N_("no NEAR form of that jump instruction exists"));
+
+ if (jmp->op_sel == JMP_NONE) {
+ if (jmp->nearop.len == 0)
+ jmp->op_sel = JMP_SHORT_FORCED;
+ if (jmp->shortop.len == 0)
+ jmp->op_sel = JMP_NEAR_FORCED;
+ }
yasm_x86__bc_apply_prefixes((x86_common *)jmp, NULL, num_prefixes,
- prefixes, bc->line);
+ prefixes);
/* Transform the bytecode */
yasm_x86__bc_transform_jmp(bc, jmp);
@@ -2201,13 +2229,15 @@ yasm_x86__finalize_insn(yasm_arch *arch, yasm_bytecode *bc,
unsigned long suffix = (data[3]>>8) & 0xFF;
int found = 0;
yasm_insn_operand *op, *ops[4], *rev_ops[4], **use_ops;
- /*@null@*/ yasm_symrec *origin;
/*@null@*/ yasm_expr *imm;
unsigned char im_len;
unsigned char im_sign;
unsigned char spare;
int i;
- static const unsigned int size_lookup[] = {0, 1, 2, 4, 8, 10, 16, 0};
+ unsigned int size_lookup[] = {0, 8, 16, 32, 64, 80, 128, 0};
+ unsigned long do_postop = 0;
+
+ size_lookup[7] = mode_bits;
if (!info) {
num_info = 1;
@@ -2218,7 +2248,7 @@ yasm_x86__finalize_insn(yasm_arch *arch, yasm_bytecode *bc,
* of 3 operands.
*/
if (num_operands > 3) {
- yasm__error(bc->line, N_("too many operands"));
+ yasm_error_set(YASM_ERROR_TYPE, N_("too many operands"));
return;
}
ops[0] = ops[1] = ops[2] = ops[3] = NULL;
@@ -2247,7 +2277,7 @@ yasm_x86__finalize_insn(yasm_arch *arch, yasm_bytecode *bc,
if (!op->deref && (op->type == YASM_INSN__OPERAND_REG
|| (op->type == YASM_INSN__OPERAND_MEMORY
&& op->data.ea->strong)))
- yasm__warning(YASM_WARN_GENERAL, bc->line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("indirect call without `*'"));
if (!op->deref && op->type == YASM_INSN__OPERAND_MEMORY
&& !op->data.ea->strong) {
@@ -2255,9 +2285,10 @@ yasm_x86__finalize_insn(yasm_arch *arch, yasm_bytecode *bc,
* actually an immediate for the purposes of relative jumps.
*/
if (op->data.ea->segreg != 0)
- yasm__warning(YASM_WARN_GENERAL, bc->line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("skipping prefixes on this instruction"));
- imm = yasm_expr_copy(op->data.ea->disp);
+ imm = op->data.ea->disp.abs;
+ op->data.ea->disp.abs = NULL;
yasm_ea_destroy(op->data.ea);
op->type = YASM_INSN__OPERAND_IMM;
op->data.val = imm;
@@ -2479,6 +2510,15 @@ yasm_x86__finalize_insn(yasm_arch *arch, yasm_bytecode *bc,
YASM_EXPR_REG))
mismatch = 1;
break;
+ case OPT_Imm1:
+ if (op->type == YASM_INSN__OPERAND_IMM) {
+ const yasm_intnum *num;
+ num = yasm_expr_get_intnum(&op->data.val, NULL);
+ if (!num || !yasm_intnum_is_pos1(num))
+ mismatch = 1;
+ } else
+ mismatch = 1;
+ break;
default:
yasm_internal_error(N_("invalid operand type"));
}
@@ -2521,12 +2561,12 @@ yasm_x86__finalize_insn(yasm_arch *arch, yasm_bytecode *bc,
if (mismatch)
break;
- /* Check for 64-bit effective address size */
- if (op->type == YASM_INSN__OPERAND_MEMORY) {
+ /* Check for 64-bit effective address size in NASM mode */
+ if (suffix == 0 && op->type == YASM_INSN__OPERAND_MEMORY) {
if ((info->operands[i] & OPEAS_MASK) == OPEAS_64) {
- if (op->data.ea->len != 8)
+ if (op->data.ea->disp.size != 64)
mismatch = 1;
- } else if (op->data.ea->len == 8)
+ } else if (op->data.ea->disp.size == 64)
mismatch = 1;
}
@@ -2569,8 +2609,8 @@ yasm_x86__finalize_insn(yasm_arch *arch, yasm_bytecode *bc,
if (!found) {
/* Didn't find a matching one */
- yasm__error(bc->line,
- N_("invalid combination of opcode and operands"));
+ yasm_error_set(YASM_ERROR_TYPE,
+ N_("invalid combination of opcode and operands"));
return;
}
@@ -2583,10 +2623,12 @@ yasm_x86__finalize_insn(yasm_arch *arch, yasm_bytecode *bc,
switch ((int)((info->modifiers & MOD_ExtIndex_MASK)
>> MOD_ExtIndex_SHIFT)) {
case 0:
- yasm__error(bc->line, N_("mismatch in operand sizes"));
+ yasm_error_set(YASM_ERROR_TYPE,
+ N_("mismatch in operand sizes"));
break;
case 1:
- yasm__error(bc->line, N_("operand size not specified"));
+ yasm_error_set(YASM_ERROR_TYPE,
+ N_("operand size not specified"));
break;
default:
yasm_internal_error(N_("unrecognized x86 ext mod index"));
@@ -2622,8 +2664,7 @@ yasm_x86__finalize_insn(yasm_arch *arch, yasm_bytecode *bc,
insn = yasm_xmalloc(sizeof(x86_insn));
x86_finalize_common(&insn->common, info, mode_bits);
x86_finalize_opcode(&insn->opcode, info);
- insn->ea = NULL;
- origin = NULL;
+ insn->x86_ea = NULL;
imm = NULL;
insn->def_opersize_64 = info->def_opersize_64;
insn->special_prefix = info->special_prefix;
@@ -2667,7 +2708,7 @@ yasm_x86__finalize_insn(yasm_arch *arch, yasm_bytecode *bc,
if (info->modifiers & MOD_Imm8) {
imm = yasm_expr_create_ident(yasm_expr_int(
yasm_intnum_create_uint(mod_data & 0xFF)), bc->line);
- im_len = 1;
+ im_len = 8;
mod_data >>= 8;
}
if (info->modifiers & MOD_DOpS64R) {
@@ -2701,7 +2742,7 @@ yasm_x86__finalize_insn(yasm_arch *arch, yasm_bytecode *bc,
case OPA_EA:
switch (op->type) {
case YASM_INSN__OPERAND_REG:
- insn->ea =
+ insn->x86_ea =
yasm_x86__ea_create_reg(op->data.reg,
&insn->rex,
mode_bits);
@@ -2710,20 +2751,16 @@ yasm_x86__finalize_insn(yasm_arch *arch, yasm_bytecode *bc,
yasm_internal_error(
N_("invalid operand conversion"));
case YASM_INSN__OPERAND_MEMORY:
- insn->ea = op->data.ea;
+ insn->x86_ea = (x86_effaddr *)op->data.ea;
if ((info->operands[i] & OPT_MASK) == OPT_MemOffs)
/* Special-case for MOV MemOffs instruction */
- yasm_x86__ea_set_disponly(insn->ea);
- else if (mode_bits == 64)
- /* Save origin for possible RIP-relative */
- origin =
- yasm_symtab_define_label2("$", prev_bc, 0,
- bc->line);
+ yasm_x86__ea_set_disponly(insn->x86_ea);
break;
case YASM_INSN__OPERAND_IMM:
- insn->ea = yasm_x86__ea_create_imm(op->data.val,
- size_lookup[(info->operands[i] &
- OPS_MASK)>>OPS_SHIFT]);
+ insn->x86_ea =
+ yasm_x86__ea_create_imm(op->data.val,
+ size_lookup[(info->operands[i] &
+ OPS_MASK)>>OPS_SHIFT]);
break;
}
break;
@@ -2750,7 +2787,7 @@ yasm_x86__finalize_insn(yasm_arch *arch, yasm_bytecode *bc,
else if (op->type == YASM_INSN__OPERAND_REG) {
if (yasm_x86__set_rex_from_reg(&insn->rex, &spare,
op->data.reg, mode_bits, X86_REX_R)) {
- yasm__error(bc->line,
+ yasm_error_set(YASM_ERROR_TYPE,
N_("invalid combination of opcode and operands"));
return;
}
@@ -2762,7 +2799,7 @@ yasm_x86__finalize_insn(yasm_arch *arch, yasm_bytecode *bc,
unsigned char opadd;
if (yasm_x86__set_rex_from_reg(&insn->rex, &opadd,
op->data.reg, mode_bits, X86_REX_B)) {
- yasm__error(bc->line,
+ yasm_error_set(YASM_ERROR_TYPE,
N_("invalid combination of opcode and operands"));
return;
}
@@ -2775,7 +2812,7 @@ yasm_x86__finalize_insn(yasm_arch *arch, yasm_bytecode *bc,
unsigned char opadd;
if (yasm_x86__set_rex_from_reg(&insn->rex, &opadd,
op->data.reg, mode_bits, X86_REX_B)) {
- yasm__error(bc->line,
+ yasm_error_set(YASM_ERROR_TYPE,
N_("invalid combination of opcode and operands"));
return;
}
@@ -2785,16 +2822,16 @@ yasm_x86__finalize_insn(yasm_arch *arch, yasm_bytecode *bc,
break;
case OPA_SpareEA:
if (op->type == YASM_INSN__OPERAND_REG) {
- insn->ea = yasm_x86__ea_create_reg(op->data.reg,
- &insn->rex,
- mode_bits);
- if (!insn->ea ||
+ insn->x86_ea = yasm_x86__ea_create_reg(op->data.reg,
+ &insn->rex,
+ mode_bits);
+ if (!insn->x86_ea ||
yasm_x86__set_rex_from_reg(&insn->rex, &spare,
op->data.reg, mode_bits, X86_REX_R)) {
- yasm__error(bc->line,
+ yasm_error_set(YASM_ERROR_TYPE,
N_("invalid combination of opcode and operands"));
- if (insn->ea)
- yasm_xfree(insn->ea);
+ if (insn->x86_ea)
+ yasm_xfree(insn->x86_ea);
yasm_xfree(insn);
return;
}
@@ -2805,23 +2842,23 @@ yasm_x86__finalize_insn(yasm_arch *arch, yasm_bytecode *bc,
yasm_internal_error(N_("unknown operand action"));
}
+ if ((info->operands[i] & OPS_MASK) == OPS_BITS)
+ insn->common.opersize = (unsigned char)mode_bits;
+
switch ((int)(info->operands[i] & OPAP_MASK)) {
case OPAP_None:
break;
- case OPAP_ShiftOp:
- insn->postop = X86_POSTOP_SHIFT;
- break;
case OPAP_SImm8Avail:
insn->postop = X86_POSTOP_SIGNEXT_IMM8;
break;
case OPAP_ShortMov:
- insn->postop = X86_POSTOP_SHORTMOV;
+ do_postop = OPAP_ShortMov;
break;
case OPAP_A16:
insn->postop = X86_POSTOP_ADDRESS16;
break;
case OPAP_SImm32Avail:
- insn->postop = X86_POSTOP_SIGNEXT_IMM32;
+ do_postop = OPAP_SImm32Avail;
break;
default:
yasm_internal_error(
@@ -2830,1877 +2867,298 @@ yasm_x86__finalize_insn(yasm_arch *arch, yasm_bytecode *bc,
}
}
- if (insn->ea) {
- yasm_x86__ea_init(insn->ea, spare, origin);
+ if (insn->x86_ea) {
+ yasm_x86__ea_init(insn->x86_ea, spare);
for (i=0; i<num_segregs; i++)
- yasm_ea_set_segreg(insn->ea, segregs[i], bc->line);
+ yasm_ea_set_segreg(&insn->x86_ea->ea, segregs[i]);
} else if (num_segregs > 0 && insn->special_prefix == 0) {
if (num_segregs > 1)
- yasm__warning(YASM_WARN_GENERAL, bc->line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("multiple segment overrides, using leftmost"));
insn->special_prefix = segregs[num_segregs-1]>>8;
}
if (imm) {
insn->imm = yasm_imm_create_expr(imm);
- insn->imm->len = im_len;
+ insn->imm->val.size = im_len;
insn->imm->sign = im_sign;
} else
insn->imm = NULL;
yasm_x86__bc_apply_prefixes((x86_common *)insn, &insn->rex, num_prefixes,
- prefixes, bc->line);
+ prefixes);
if (insn->postop == X86_POSTOP_ADDRESS16 && insn->common.addrsize) {
- yasm__warning(YASM_WARN_GENERAL, bc->line,
- N_("address size override ignored"));
+ yasm_warn_set(YASM_WARN_GENERAL, N_("address size override ignored"));
insn->common.addrsize = 0;
}
+ /* Handle non-span-dependent post-ops here */
+ switch (do_postop) {
+ case OPAP_ShortMov:
+ /* Long (modrm+sib) mov instructions in amd64 can be optimized into
+ * short mov instructions if a 32-bit address override is applied in
+ * 64-bit mode to an EA of just an offset (no registers) and the
+ * target register is al/ax/eax/rax.
+ */
+ if (insn->common.mode_bits == 64 && insn->common.addrsize == 32 &&
+ (!insn->x86_ea->ea.disp.abs ||
+ !yasm_expr__contains(insn->x86_ea->ea.disp.abs,
+ YASM_EXPR_REG))) {
+ yasm_x86__ea_set_disponly(insn->x86_ea);
+ /* Make the short form permanent. */
+ insn->opcode.opcode[0] = insn->opcode.opcode[1];
+ }
+ insn->opcode.opcode[1] = 0; /* avoid possible confusion */
+ break;
+ case OPAP_SImm32Avail:
+ /* Used for 64-bit mov immediate, which can take a sign-extended
+ * imm32 as well as imm64 values. The imm32 form is put in the
+ * second byte of the opcode and its ModRM byte is put in the third
+ * byte of the opcode.
+ */
+ if (!insn->imm->val.abs ||
+ yasm_intnum_check_size(
+ yasm_expr_get_intnum(&insn->imm->val.abs, NULL),
+ 32, 0, 1)) {
+ /* Throwaway REX byte */
+ unsigned char rex_temp = 0;
+
+ /* Build ModRM EA - CAUTION: this depends on
+ * opcode 0 being a mov instruction!
+ */
+ insn->x86_ea = yasm_x86__ea_create_reg(
+ (unsigned long)insn->opcode.opcode[0]-0xB8, &rex_temp, 64);
+
+ /* Make the imm32s form permanent. */
+ insn->opcode.opcode[0] = insn->opcode.opcode[1];
+ insn->imm->val.size = 32;
+ }
+ insn->opcode.opcode[1] = 0; /* avoid possible confusion */
+ break;
+ default:
+ break;
+ }
+
/* Transform the bytecode */
yasm_x86__bc_transform_insn(bc, insn);
}
+/* Static parse data structure for instructions */
+typedef struct insnprefix_parse_data {
+ const char *name;
-#define YYCTYPE char
-#define YYCURSOR id
-#define YYLIMIT id
-#define YYMARKER marker
-#define YYFILL(n) (void)(n)
-
-/*!re2c
- any = [\000-\377];
- A = [aA];
- B = [bB];
- C = [cC];
- D = [dD];
- E = [eE];
- F = [fF];
- G = [gG];
- H = [hH];
- I = [iI];
- J = [jJ];
- K = [kK];
- L = [lL];
- M = [mM];
- N = [nN];
- O = [oO];
- P = [pP];
- Q = [qQ];
- R = [rR];
- S = [sS];
- T = [tT];
- U = [uU];
- V = [vV];
- W = [wW];
- X = [xX];
- Y = [yY];
- Z = [zZ];
-*/
-
-void
-yasm_x86__parse_cpu(yasm_arch *arch, const char *id, unsigned long line)
-{
- yasm_arch_x86 *arch_x86 = (yasm_arch_x86 *)arch;
- /*const char *marker;*/
-
- /*!re2c
- /* The standard CPU names /set/ cpu_enabled. */
- "8086" {
- arch_x86->cpu_enabled = CPU_Priv;
- return;
- }
- ("80" | I)? "186" {
- arch_x86->cpu_enabled = CPU_186|CPU_Priv;
- return;
- }
- ("80" | I)? "286" {
- arch_x86->cpu_enabled = CPU_186|CPU_286|CPU_Priv;
- return;
- }
- ("80" | I)? "386" {
- arch_x86->cpu_enabled =
- CPU_186|CPU_286|CPU_386|CPU_SMM|CPU_Prot|CPU_Priv;
- return;
- }
- ("80" | I)? "486" {
- arch_x86->cpu_enabled =
- CPU_186|CPU_286|CPU_386|CPU_486|CPU_FPU|CPU_SMM|CPU_Prot|
- CPU_Priv;
- return;
- }
- (I? "586") | 'pentium' | 'p5' {
- arch_x86->cpu_enabled =
- CPU_186|CPU_286|CPU_386|CPU_486|CPU_586|CPU_FPU|CPU_SMM|
- CPU_Prot|CPU_Priv;
- return;
- }
- (I? "686") | 'p6' | 'ppro' | 'pentiumpro' {
- arch_x86->cpu_enabled =
- CPU_186|CPU_286|CPU_386|CPU_486|CPU_586|CPU_686|CPU_FPU|
- CPU_SMM|CPU_Prot|CPU_Priv;
- return;
- }
- ('p2') | ('pentium' "-"? ("2" | 'ii')) {
- arch_x86->cpu_enabled =
- CPU_186|CPU_286|CPU_386|CPU_486|CPU_586|CPU_686|CPU_FPU|
- CPU_MMX|CPU_SMM|CPU_Prot|CPU_Priv;
- return;
- }
- ('p3') | ('pentium' "-"? ("3" | 'iii')) | 'katmai' {
- arch_x86->cpu_enabled =
- CPU_186|CPU_286|CPU_386|CPU_486|CPU_586|CPU_686|CPU_P3|CPU_FPU|
- CPU_MMX|CPU_SSE|CPU_SMM|CPU_Prot|CPU_Priv;
- return;
- }
- ('p4') | ('pentium' "-"? ("4" | 'iv')) | 'williamette' {
- arch_x86->cpu_enabled =
- CPU_186|CPU_286|CPU_386|CPU_486|CPU_586|CPU_686|CPU_P3|CPU_P4|
- CPU_FPU|CPU_MMX|CPU_SSE|CPU_SSE2|CPU_SMM|CPU_Prot|CPU_Priv;
- return;
- }
- ('ia' "-"? "64") | 'itanium' {
- arch_x86->cpu_enabled =
- CPU_186|CPU_286|CPU_386|CPU_486|CPU_586|CPU_686|CPU_P3|CPU_P4|
- CPU_IA64|CPU_FPU|CPU_MMX|CPU_SSE|CPU_SSE2|CPU_SMM|CPU_Prot|
- CPU_Priv;
- return;
- }
- 'k6' {
- arch_x86->cpu_enabled =
- CPU_186|CPU_286|CPU_386|CPU_486|CPU_586|CPU_686|CPU_K6|CPU_FPU|
- CPU_MMX|CPU_3DNow|CPU_SMM|CPU_Prot|CPU_Priv;
- return;
- }
- 'athlon' | 'k7' {
- arch_x86->cpu_enabled =
- CPU_186|CPU_286|CPU_386|CPU_486|CPU_586|CPU_686|CPU_K6|
- CPU_Athlon|CPU_FPU|CPU_MMX|CPU_SSE|CPU_3DNow|CPU_SMM|CPU_Prot|
- CPU_Priv;
- return;
- }
- ('sledge'? 'hammer') | 'opteron' | ('athlon' "-"? "64") {
- arch_x86->cpu_enabled =
- CPU_186|CPU_286|CPU_386|CPU_486|CPU_586|CPU_686|CPU_K6|
- CPU_Athlon|CPU_Hammer|CPU_FPU|CPU_MMX|CPU_SSE|CPU_SSE2|
- CPU_3DNow|CPU_SMM|CPU_Prot|CPU_Priv;
- return;
- }
- 'prescott' {
- arch_x86->cpu_enabled =
- CPU_186|CPU_286|CPU_386|CPU_486|CPU_586|CPU_686|CPU_K6|
- CPU_Athlon|CPU_Hammer|CPU_FPU|CPU_MMX|CPU_SSE|CPU_SSE2|
- CPU_SSE3|CPU_3DNow|CPU_SMM|CPU_Prot|CPU_Priv;
- return;
- }
-
- /* Features have "no" versions to disable them, and only set/reset the
- * specific feature being changed. All other bits are left alone.
- */
- 'fpu' { arch_x86->cpu_enabled |= CPU_FPU; return; }
- 'nofpu' { arch_x86->cpu_enabled &= ~CPU_FPU; return; }
- 'mmx' { arch_x86->cpu_enabled |= CPU_MMX; return; }
- 'nommx' { arch_x86->cpu_enabled &= ~CPU_MMX; return; }
- 'sse' { arch_x86->cpu_enabled |= CPU_SSE; return; }
- 'nosse' { arch_x86->cpu_enabled &= ~CPU_SSE; return; }
- 'sse2' { arch_x86->cpu_enabled |= CPU_SSE2; return; }
- 'nosse2' { arch_x86->cpu_enabled &= ~CPU_SSE2; return; }
- 'sse3' { arch_x86->cpu_enabled |= CPU_SSE3; return; }
- 'nosse3' { arch_x86->cpu_enabled &= ~CPU_SSE3; return; }
- 'pni' { arch_x86->cpu_enabled |= CPU_SSE3; return; }
- 'nopni' { arch_x86->cpu_enabled &= ~CPU_SSE3; return; }
- '3dnow' { arch_x86->cpu_enabled |= CPU_3DNow; return; }
- 'no3dnow' { arch_x86->cpu_enabled &= ~CPU_3DNow; return; }
- 'cyrix' { arch_x86->cpu_enabled |= CPU_Cyrix; return; }
- 'nocyrix' { arch_x86->cpu_enabled &= ~CPU_Cyrix; return; }
- 'amd' { arch_x86->cpu_enabled |= CPU_AMD; return; }
- 'noamd' { arch_x86->cpu_enabled &= ~CPU_AMD; return; }
- 'smm' { arch_x86->cpu_enabled |= CPU_SMM; return; }
- 'nosmm' { arch_x86->cpu_enabled &= ~CPU_SMM; return; }
- 'prot' { arch_x86->cpu_enabled |= CPU_Prot; return; }
- 'noprot' { arch_x86->cpu_enabled &= ~CPU_Prot; return; }
- 'undoc' { arch_x86->cpu_enabled |= CPU_Undoc; return; }
- 'noundoc' { arch_x86->cpu_enabled &= ~CPU_Undoc; return; }
- 'obs' { arch_x86->cpu_enabled |= CPU_Obs; return; }
- 'noobs' { arch_x86->cpu_enabled &= ~CPU_Obs; return; }
- 'priv' { arch_x86->cpu_enabled |= CPU_Priv; return; }
- 'nopriv' { arch_x86->cpu_enabled &= ~CPU_Priv; return; }
- 'svm' { arch_x86->cpu_enabled |= CPU_SVM; return; }
- 'nosvm' { arch_x86->cpu_enabled &= ~CPU_SVM; return; }
- 'padlock' { arch_x86->cpu_enabled |= CPU_PadLock; return; }
- 'nopadlock' { arch_x86->cpu_enabled &= ~CPU_PadLock; return; }
-
- /* catchalls */
- [\001-\377]+ {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("unrecognized CPU identifier `%s'"), id);
- return;
- }
- [\000] {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("unrecognized CPU identifier `%s'"), id);
- return;
- }
- */
-}
+ /* instruction parse group - NULL if prefix */
+ /*@null@*/ const x86_insn_info *group;
-int
-yasm_x86__parse_check_targetmod(yasm_arch *arch, unsigned long data[1],
- const char *id, unsigned long line)
-{
- /*!re2c
- /* target modifiers */
- 'near' {
- data[0] = X86_NEAR;
- return 1;
- }
- 'short' {
- data[0] = X86_SHORT;
- return 1;
- }
- 'far' {
- data[0] = X86_FAR;
- return 1;
- }
- 'to' {
- data[0] = X86_TO;
- return 1;
- }
+ /* For instruction, modifier in upper 24 bits, number of elements in group
+ * in lower 8 bits.
+ * For prefix, prefix type.
+ */
+ unsigned long data1;
- /* catchalls */
- [\001-\377]+ {
- return 0;
- }
- [\000] {
- return 0;
- }
- */
- return 0;
-}
+ /* For instruction, cpu flags.
+ * For prefix, prefix value.
+ */
+ unsigned long data2;
+
+ /* suffix flags for instructions */
+ enum {
+ NONE = 0,
+ SUF_B = (MOD_GasSufB >> MOD_GasSuf_SHIFT),
+ SUF_W = (MOD_GasSufW >> MOD_GasSuf_SHIFT),
+ SUF_L = (MOD_GasSufL >> MOD_GasSuf_SHIFT),
+ SUF_Q = (MOD_GasSufQ >> MOD_GasSuf_SHIFT),
+ SUF_S = (MOD_GasSufS >> MOD_GasSuf_SHIFT),
+ WEAK = 0x80 /* Relaxed operand mode for GAS */
+ } flags;
+} insnprefix_parse_data;
+#define INSN(name, flags, group, mod, cpu) \
+ { name, group##_insn, (mod##UL<<8)|NELEMS(group##_insn), cpu, flags }
+#define PREFIX(name, type, value) \
+ { name, NULL, type, value, NONE }
+
+/* Static parse data structure for CPU feature flags */
+typedef struct cpu_parse_data {
+ const char *name;
-int
-yasm_x86__parse_check_prefix(yasm_arch *arch, unsigned long data[4],
- const char *id, unsigned long line)
+ unsigned long cpu;
+ enum {
+ CPU_MODE_VERBATIM,
+ CPU_MODE_SET,
+ CPU_MODE_CLEAR
+ } mode;
+} cpu_parse_data;
+
+typedef struct regtmod_parse_data {
+ const char *name;
+
+ unsigned long regtmod;
+} regtmod_parse_data;
+#define REG(name, type, index, bits) \
+ { name, (((unsigned long)YASM_ARCH_REG) << 24) | \
+ (((unsigned long)bits) << 16) | (type | index) }
+#define REGGROUP(name, group) \
+ { name, (((unsigned long)YASM_ARCH_REGGROUP) << 24) | (group) }
+#define SEGREG(name, prefix, num, bits) \
+ { name, (((unsigned long)YASM_ARCH_SEGREG) << 24) | \
+ (((unsigned long)bits) << 16) | (prefix << 8) | (num) }
+#define TARGETMOD(name, mod) \
+ { name, (((unsigned long)YASM_ARCH_TARGETMOD) << 24) | (mod) }
+
+/* Pull in all parse data */
+#include "x86parse.c"
+
+yasm_arch_insnprefix
+yasm_x86__parse_check_insnprefix(yasm_arch *arch, unsigned long data[4],
+ const char *id, size_t id_len)
{
yasm_arch_x86 *arch_x86 = (yasm_arch_x86 *)arch;
- const char *oid = id;
- /*!re2c
- /* operand size overrides */
- 'o16' | 'data16' | 'word' {
- if (oid[0] != 'o' && arch_x86->parser != X86_PARSER_GAS)
- return 0;
- data[0] = X86_OPERSIZE;
- data[1] = 16;
- return 1;
- }
- 'o32' | 'data32' | 'dword' {
- if (oid[0] != 'o' && arch_x86->parser != X86_PARSER_GAS)
- return 0;
- if (arch_x86->mode_bits == 64) {
- yasm__error(line,
- N_("Cannot override data size to 32 bits in 64-bit mode"));
- return 0;
- }
- data[0] = X86_OPERSIZE;
- data[1] = 32;
- return 1;
- }
- 'o64' | 'data64' | 'qword' {
- if (oid[0] != 'o' && arch_x86->parser != X86_PARSER_GAS)
- return 0;
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a prefix in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_OPERSIZE;
- data[1] = 64;
- return 1;
- }
- /* address size overrides */
- 'a16' | 'addr16' | 'aword' {
- if (oid[1] != '1' && arch_x86->parser != X86_PARSER_GAS)
- return 0;
- if (arch_x86->mode_bits == 64) {
- yasm__error(line,
- N_("Cannot override address size to 16 bits in 64-bit mode"));
- return 0;
- }
- data[0] = X86_ADDRSIZE;
- data[1] = 16;
- return 1;
- }
- 'a32' | 'addr32' | 'adword' {
- if (oid[1] != '3' && arch_x86->parser != X86_PARSER_GAS)
- return 0;
- data[0] = X86_ADDRSIZE;
- data[1] = 32;
- return 1;
- }
- 'a64' | 'addr64' | 'aqword' {
- if (oid[1] != '6' && arch_x86->parser != X86_PARSER_GAS)
- return 0;
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a prefix in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_ADDRSIZE;
- data[1] = 64;
- return 1;
- }
-
- /* instruction prefixes */
- 'lock' {
- data[0] = X86_LOCKREP;
- data[1] = 0xF0;
- return 1;
- }
- 'repn' ('e' | 'z') {
- data[0] = X86_LOCKREP;
- data[1] = 0xF2;
- return 1;
- }
- 'rep' ('e' | 'z')? {
- data[0] = X86_LOCKREP;
- data[1] = 0xF3;
- return 1;
- }
-
- /* other prefixes (limited to GAS-only at the moment) */
- /* Hint taken/not taken (for jumps */
- 'ht' {
- if (arch_x86->parser != X86_PARSER_GAS)
- return 0;
- data[0] = X86_SEGREG;
- data[1] = 0x3E;
- return 1;
- }
- 'hnt' {
- if (arch_x86->parser != X86_PARSER_GAS)
- return 0;
- data[0] = X86_SEGREG;
- data[1] = 0x2E;
- return 1;
- }
- /* REX byte explicit prefixes */
- 'rex' {
- if (arch_x86->parser != X86_PARSER_GAS
- || arch_x86->mode_bits != 64)
- return 0;
- data[0] = X86_REX;
- data[1] = 0x40;
- return 1;
- }
- 'rexz' {
- if (arch_x86->parser != X86_PARSER_GAS
- || arch_x86->mode_bits != 64)
- return 0;
- data[0] = X86_REX;
- data[1] = 0x41;
- return 1;
- }
- 'rexy' {
- if (arch_x86->parser != X86_PARSER_GAS
- || arch_x86->mode_bits != 64)
- return 0;
- data[0] = X86_REX;
- data[1] = 0x42;
- return 1;
- }
- 'rexyz' {
- if (arch_x86->parser != X86_PARSER_GAS
- || arch_x86->mode_bits != 64)
- return 0;
- data[0] = X86_REX;
- data[1] = 0x43;
- return 1;
- }
- 'rexx' {
- if (arch_x86->parser != X86_PARSER_GAS
- || arch_x86->mode_bits != 64)
- return 0;
- data[0] = X86_REX;
- data[1] = 0x44;
- return 1;
- }
- 'rexxz' {
- if (arch_x86->parser != X86_PARSER_GAS
- || arch_x86->mode_bits != 64)
- return 0;
- data[0] = X86_REX;
- data[1] = 0x45;
- return 1;
- }
- 'rexxy' {
- if (arch_x86->parser != X86_PARSER_GAS
- || arch_x86->mode_bits != 64)
- return 0;
- data[0] = X86_REX;
- data[1] = 0x46;
- return 1;
- }
- 'rexxyz' {
- if (arch_x86->parser != X86_PARSER_GAS
- || arch_x86->mode_bits != 64)
- return 0;
- data[0] = X86_REX;
- data[1] = 0x47;
- return 1;
- }
- 'rex64' {
- if (arch_x86->parser != X86_PARSER_GAS
- || arch_x86->mode_bits != 64)
- return 0;
- data[0] = X86_REX;
- data[1] = 0x48;
- return 1;
- }
- 'rex64z' {
- if (arch_x86->parser != X86_PARSER_GAS
- || arch_x86->mode_bits != 64)
- return 0;
- data[0] = X86_REX;
- data[1] = 0x49;
- return 1;
- }
- 'rex64y' {
- if (arch_x86->parser != X86_PARSER_GAS
- || arch_x86->mode_bits != 64)
- return 0;
- data[0] = X86_REX;
- data[1] = 0x4a;
- return 1;
- }
- 'rex64yz' {
- if (arch_x86->parser != X86_PARSER_GAS
- || arch_x86->mode_bits != 64)
- return 0;
- data[0] = X86_REX;
- data[1] = 0x4b;
- return 1;
- }
- 'rex64x' {
- if (arch_x86->parser != X86_PARSER_GAS
- || arch_x86->mode_bits != 64)
- return 0;
- data[0] = X86_REX;
- data[1] = 0x4c;
- return 1;
- }
- 'rex64xz' {
- if (arch_x86->parser != X86_PARSER_GAS
- || arch_x86->mode_bits != 64)
- return 0;
- data[0] = X86_REX;
- data[1] = 0x4d;
- return 1;
- }
- 'rex64xy' {
- if (arch_x86->parser != X86_PARSER_GAS
- || arch_x86->mode_bits != 64)
- return 0;
- data[0] = X86_REX;
- data[1] = 0x4e;
- return 1;
- }
- 'rex64xyz' {
- if (arch_x86->parser != X86_PARSER_GAS
- || arch_x86->mode_bits != 64)
- return 0;
- data[0] = X86_REX;
- data[1] = 0x4f;
- return 1;
- }
-
- /* catchalls */
- [\001-\377]+ {
- return 0;
- }
- [\000] {
- return 0;
- }
- */
- return 0;
+ /*@null@*/ const insnprefix_parse_data *pdata;
+ size_t i;
+ static char lcaseid[16];
+
+ if (id_len > 15)
+ return YASM_ARCH_NOTINSNPREFIX;
+ for (i=0; i<id_len; i++)
+ lcaseid[i] = tolower(id[i]);
+ lcaseid[id_len] = '\0';
+
+ switch (arch_x86->parser) {
+ case X86_PARSER_NASM:
+ pdata = insnprefix_nasm_find(lcaseid, id_len);
+ break;
+ case X86_PARSER_GAS:
+ pdata = insnprefix_gas_find(lcaseid, id_len);
+ break;
+ default:
+ pdata = NULL;
+ }
+ if (!pdata)
+ return YASM_ARCH_NOTINSNPREFIX;
+
+ if (pdata->group) {
+ unsigned long cpu = pdata->data2;
+
+ if ((cpu & CPU_64) && arch_x86->mode_bits != 64) {
+ yasm_warn_set(YASM_WARN_GENERAL,
+ N_("`%s' is an instruction in 64-bit mode"), id);
+ return YASM_ARCH_NOTINSNPREFIX;
+ }
+ if ((cpu & CPU_Not64) && arch_x86->mode_bits == 64) {
+ yasm_error_set(YASM_ERROR_GENERAL,
+ N_("`%s' invalid in 64-bit mode"), id);
+ data[0] = (unsigned long)not64_insn;
+ data[1] = NELEMS(not64_insn);
+ data[2] = CPU_Not64;
+ data[3] = arch_x86->mode_bits;
+ return YASM_ARCH_INSN;
+ }
+
+ data[0] = (unsigned long)pdata->group;
+ data[1] = pdata->data1;
+ data[2] = cpu;
+ data[3] = (((unsigned long)pdata->flags)<<8) | arch_x86->mode_bits;
+ return YASM_ARCH_INSN;
+ } else {
+ unsigned long type = pdata->data1;
+ unsigned long value = pdata->data2;
+
+ if (arch_x86->mode_bits == 64 && type == X86_OPERSIZE && value == 32) {
+ yasm_error_set(YASM_ERROR_GENERAL,
+ N_("Cannot override data size to 32 bits in 64-bit mode"));
+ return YASM_ARCH_NOTINSNPREFIX;
+ }
+
+ if (arch_x86->mode_bits == 64 && type == X86_ADDRSIZE && value == 16) {
+ yasm_error_set(YASM_ERROR_GENERAL,
+ N_("Cannot override address size to 16 bits in 64-bit mode"));
+ return YASM_ARCH_NOTINSNPREFIX;
+ }
+
+ if ((type == X86_REX ||
+ (value == 64 && (type == X86_OPERSIZE || type == X86_ADDRSIZE)))
+ && arch_x86->mode_bits != 64) {
+ yasm_warn_set(YASM_WARN_GENERAL,
+ N_("`%s' is a prefix in 64-bit mode"), id);
+ return YASM_ARCH_NOTINSNPREFIX;
+ }
+ data[0] = type;
+ data[1] = value;
+ return YASM_ARCH_PREFIX;
+ }
}
-int
-yasm_x86__parse_check_reg(yasm_arch *arch, unsigned long data[1],
- const char *id, unsigned long line)
+void
+yasm_x86__parse_cpu(yasm_arch *arch, const char *cpuid, size_t cpuid_len)
{
yasm_arch_x86 *arch_x86 = (yasm_arch_x86 *)arch;
- const char *oid = id;
- /*!re2c
- /* control, debug, and test registers */
- 'cr' [02-48] {
- if (arch_x86->mode_bits != 64 && oid[2] == '8') {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_CRREG | (oid[2]-'0');
- return 1;
- }
- 'dr' [0-7] {
- data[0] = X86_DRREG | (oid[2]-'0');
- return 1;
- }
- 'tr' [0-7] {
- data[0] = X86_TRREG | (oid[2]-'0');
- return 1;
- }
-
- /* floating point, MMX, and SSE/SSE2 registers */
- 'st' [0-7] {
- data[0] = X86_FPUREG | (oid[2]-'0');
- return 1;
- }
- 'mm' [0-7] {
- data[0] = X86_MMXREG | (oid[2]-'0');
- return 1;
- }
- 'xmm' [0-9] {
- if (arch_x86->mode_bits != 64 &&
- (oid[3] == '8' || oid[3] == '9')) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_XMMREG | (oid[3]-'0');
- return 1;
- }
- 'xmm' "1" [0-5] {
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_XMMREG | (10+oid[4]-'0');
- return 1;
- }
-
- /* integer registers */
- 'rax' {
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_REG64 | 0;
- return 1;
- }
- 'rcx' {
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_REG64 | 1;
- return 1;
- }
- 'rdx' {
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_REG64 | 2;
- return 1;
- }
- 'rbx' {
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_REG64 | 3;
- return 1;
- }
- 'rsp' {
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_REG64 | 4;
- return 1;
- }
- 'rbp' {
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_REG64 | 5;
- return 1;
- }
- 'rsi' {
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_REG64 | 6;
- return 1;
- }
- 'rdi' {
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_REG64 | 7;
- return 1;
- }
- R [8-9] {
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_REG64 | (oid[1]-'0');
- return 1;
- }
- 'r1' [0-5] {
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_REG64 | (10+oid[2]-'0');
- return 1;
- }
-
- 'eax' { data[0] = X86_REG32 | 0; return 1; }
- 'ecx' { data[0] = X86_REG32 | 1; return 1; }
- 'edx' { data[0] = X86_REG32 | 2; return 1; }
- 'ebx' { data[0] = X86_REG32 | 3; return 1; }
- 'esp' { data[0] = X86_REG32 | 4; return 1; }
- 'ebp' { data[0] = X86_REG32 | 5; return 1; }
- 'esi' { data[0] = X86_REG32 | 6; return 1; }
- 'edi' { data[0] = X86_REG32 | 7; return 1; }
- R [8-9] D {
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_REG32 | (oid[1]-'0');
- return 1;
- }
- R "1" [0-5] D {
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_REG32 | (10+oid[2]-'0');
- return 1;
- }
-
- 'ax' { data[0] = X86_REG16 | 0; return 1; }
- 'cx' { data[0] = X86_REG16 | 1; return 1; }
- 'dx' { data[0] = X86_REG16 | 2; return 1; }
- 'bx' { data[0] = X86_REG16 | 3; return 1; }
- 'sp' { data[0] = X86_REG16 | 4; return 1; }
- 'bp' { data[0] = X86_REG16 | 5; return 1; }
- 'si' { data[0] = X86_REG16 | 6; return 1; }
- 'di' { data[0] = X86_REG16 | 7; return 1; }
- R [8-9] W {
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_REG16 | (oid[1]-'0');
- return 1;
- }
- R "1" [0-5] W {
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_REG16 | (10+oid[2]-'0');
- return 1;
- }
-
- 'al' { data[0] = X86_REG8 | 0; return 1; }
- 'cl' { data[0] = X86_REG8 | 1; return 1; }
- 'dl' { data[0] = X86_REG8 | 2; return 1; }
- 'bl' { data[0] = X86_REG8 | 3; return 1; }
- 'ah' { data[0] = X86_REG8 | 4; return 1; }
- 'ch' { data[0] = X86_REG8 | 5; return 1; }
- 'dh' { data[0] = X86_REG8 | 6; return 1; }
- 'bh' { data[0] = X86_REG8 | 7; return 1; }
- 'spl' {
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_REG8X | 4;
- return 1;
- }
- 'bpl' {
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_REG8X | 5;
- return 1;
- }
- 'sil' {
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_REG8X | 6;
- return 1;
- }
- 'dil' {
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_REG8X | 7;
- return 1;
- }
- R [8-9] B {
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_REG8 | (oid[1]-'0');
- return 1;
- }
- R "1" [0-5] B {
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_REG8 | (10+oid[2]-'0');
- return 1;
- }
-
- /* RIP for 64-bit mode IP-relative offsets */
- 'rip' {
- if (arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is a register in 64-bit mode"), oid);
- return 0;
- }
- data[0] = X86_RIP;
- return 1;
- }
-
- /* catchalls */
- [\001-\377]+ {
- return 0;
- }
- [\000] {
- return 0;
- }
- */
- return 0;
-}
-
-int
-yasm_x86__parse_check_reggroup(yasm_arch *arch, unsigned long data[1],
- const char *id, unsigned long line)
-{
- /*const char *oid = id;*/
- /*!re2c
- /* floating point, MMX, and SSE/SSE2 registers */
- 'st' {
- data[0] = X86_FPUREG;
- return 1;
- }
- 'mm' {
- data[0] = X86_MMXREG;
- return 1;
- }
- 'xmm' {
- data[0] = X86_XMMREG;
- return 1;
- }
-
- /* catchalls */
- [\001-\377]+ {
- return 0;
- }
- [\000] {
- return 0;
- }
- */
- return 0;
-}
+ /*@null@*/ const cpu_parse_data *pdata;
+ size_t i;
+ static char lcaseid[16];
-int
-yasm_x86__parse_check_segreg(yasm_arch *arch, unsigned long data[1],
- const char *id, unsigned long line)
-{
- yasm_arch_x86 *arch_x86 = (yasm_arch_x86 *)arch;
- const char *oid = id;
- /*!re2c
- /* segment registers */
- 'es' {
- if (arch_x86->mode_bits == 64)
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' segment register ignored in 64-bit mode"), oid);
- data[0] = 0x2600;
- return 1;
- }
- 'cs' { data[0] = 0x2e01; return 1; }
- 'ss' {
- if (arch_x86->mode_bits == 64)
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' segment register ignored in 64-bit mode"), oid);
- data[0] = 0x3602;
- return 1;
- }
- 'ds' {
- if (arch_x86->mode_bits == 64)
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' segment register ignored in 64-bit mode"), oid);
- data[0] = 0x3e03;
- return 1;
- }
- 'fs' { data[0] = 0x6404; return 1; }
- 'gs' { data[0] = 0x6505; return 1; }
+ if (cpuid_len > 15)
+ return;
+ for (i=0; i<cpuid_len; i++)
+ lcaseid[i] = tolower(cpuid[i]);
+ lcaseid[cpuid_len] = '\0';
+
+ pdata = cpu_find(lcaseid, cpuid_len);
+ if (!pdata) {
+ yasm_warn_set(YASM_WARN_GENERAL,
+ N_("unrecognized CPU identifier `%s'"), cpuid);
+ return;
+ }
- /* catchalls */
- [\001-\377]+ {
- return 0;
- }
- [\000] {
- return 0;
- }
- */
- return 0;
+ switch (pdata->mode) {
+ case CPU_MODE_VERBATIM:
+ arch_x86->cpu_enabled = pdata->cpu;
+ break;
+ case CPU_MODE_SET:
+ arch_x86->cpu_enabled |= pdata->cpu;
+ break;
+ case CPU_MODE_CLEAR:
+ arch_x86->cpu_enabled &= ~pdata->cpu;
+ break;
+ }
}
-#define RET_INSN(nosuffixsize, group, mod, cpu) do { \
- suffix = (id-oid) > nosuffixsize; \
- DEF_INSN_DATA(group, mod, cpu); \
- goto done; \
- } while (0)
-
-/* No suffix version of RET_INSN */
-#define RET_INSN_NS(group, mod, cpu) do { \
- DEF_INSN_DATA(group, mod, cpu); \
- goto done; \
- } while (0)
-
-#define RET_INSN_GAS(nosuffixsize, group, mod, cpu) do { \
- if (arch_x86->parser != X86_PARSER_GAS) \
- return 0; \
- RET_INSN(nosuffixsize, group, mod, cpu); \
- } while (0)
-
-#define RET_INSN_NONGAS(nosuffixsize, group, mod, cpu) do { \
- if (arch_x86->parser == X86_PARSER_GAS) \
- return 0; \
- RET_INSN(nosuffixsize, group, mod, cpu); \
- } while (0)
-
-int
-yasm_x86__parse_check_insn(yasm_arch *arch, unsigned long data[4],
- const char *id, unsigned long line)
+yasm_arch_regtmod
+yasm_x86__parse_check_regtmod(yasm_arch *arch, unsigned long *data,
+ const char *id, size_t id_len)
{
yasm_arch_x86 *arch_x86 = (yasm_arch_x86 *)arch;
- const char *oid = id;
- /*const char *marker;*/
- int suffix = 0;
- int not64 = 0;
- int warn64 = 0;
- int suffix_ofs = -1;
- char suffix_over = '\0';
-
- data[3] = arch_x86->mode_bits;
-
- /*!re2c
- /* instructions */
-
- /* Move */
- 'mov' [bBwWlL]? { RET_INSN(3, mov, 0, CPU_Any); }
- 'movabs' [bBwWlLqQ]? { RET_INSN_GAS(6, movabs, 0, CPU_Hammer|CPU_64); }
- /* Move with sign/zero extend */
- 'movsb' [wWlL] { suffix_ofs = -2; RET_INSN_GAS(4, movszx, 0xBE, CPU_386); }
- 'movswl' { suffix_ofs = -2; RET_INSN_GAS(4, movszx, 0xBE, CPU_386); }
- 'movs' [bBwW] Q {
- suffix_ofs = -2;
- warn64 = 1;
- RET_INSN_GAS(4, movszx, 0xBE, CPU_Hammer|CPU_64);
- }
- 'movsx' [bBwW]? { RET_INSN(5, movszx, 0xBE, CPU_386); }
- 'movslq' {
- suffix_ofs = -2;
- warn64 = 1;
- RET_INSN_GAS(4, movsxd, 0, CPU_Hammer|CPU_64);
- }
- 'movsxd' {
- warn64 = 1;
- RET_INSN_NONGAS(6, movsxd, 0, CPU_Hammer|CPU_64);
- }
- 'movzb' [wWlL] { suffix_ofs = -2; RET_INSN_GAS(4, movszx, 0xB6, CPU_386); }
- 'movzwl' { suffix_ofs = -2; RET_INSN_GAS(4, movszx, 0xB6, CPU_386); }
- 'movz' [bBwW] Q {
- suffix_ofs = -2;
- warn64 = 1;
- RET_INSN_GAS(4, movszx, 0xB6, CPU_Hammer|CPU_64);
- }
- 'movzx' { RET_INSN_NS(movszx, 0xB6, CPU_386); }
- /* Push instructions */
- 'push' [wWlLqQ]? { RET_INSN(4, push, 0, CPU_Any); }
- 'pusha' {
- not64 = 1;
- RET_INSN_NS(onebyte, 0x0060, CPU_186);
- }
- 'pushad' {
- not64 = 1;
- RET_INSN_NONGAS(6, onebyte, 0x2060, CPU_386);
- }
- 'pushal' {
- not64 = 1;
- RET_INSN_GAS(6, onebyte, 0x2060, CPU_386);
- }
- 'pushaw' {
- not64 = 1;
- RET_INSN_NS(onebyte, 0x1060, CPU_186);
- }
- /* Pop instructions */
- 'pop' [wWlLqQ]? { RET_INSN(3, pop, 0, CPU_Any); }
- 'popa' {
- not64 = 1;
- RET_INSN_NS(onebyte, 0x0061, CPU_186);
- }
- 'popad' {
- not64 = 1;
- RET_INSN_NONGAS(5, onebyte, 0x2061, CPU_386);
- }
- 'popal' {
- not64 = 1;
- RET_INSN_GAS(5, onebyte, 0x2061, CPU_386);
- }
- 'popaw' {
- not64 = 1;
- RET_INSN_NS(onebyte, 0x1061, CPU_186);
- }
- /* Exchange */
- 'xchg' [bBwWlLqQ]? { RET_INSN(4, xchg, 0, CPU_Any); }
- /* In/out from ports */
- 'in' [bBwWlL]? { RET_INSN(2, in, 0, CPU_Any); }
- 'out' [bBwWlL]? { RET_INSN(3, out, 0, CPU_Any); }
- /* Load effective address */
- 'lea' [wWlLqQ]? { RET_INSN(3, lea, 0, CPU_Any); }
- /* Load segment registers from memory */
- 'lds' [wWlL]? {
- not64 = 1;
- RET_INSN(3, ldes, 0xC5, CPU_Any);
- }
- 'les' [wWlL]? {
- not64 = 1;
- RET_INSN(3, ldes, 0xC4, CPU_Any);
- }
- 'lfs' [wWlL]? { RET_INSN(3, lfgss, 0xB4, CPU_386); }
- 'lgs' [wWlL]? { RET_INSN(3, lfgss, 0xB5, CPU_386); }
- 'lss' [wWlL]? { RET_INSN(3, lfgss, 0xB2, CPU_386); }
- /* Flags register instructions */
- 'clc' { RET_INSN_NS(onebyte, 0x00F8, CPU_Any); }
- 'cld' { RET_INSN_NS(onebyte, 0x00FC, CPU_Any); }
- 'cli' { RET_INSN_NS(onebyte, 0x00FA, CPU_Any); }
- 'clts' { RET_INSN_NS(twobyte, 0x0F06, CPU_286|CPU_Priv); }
- 'cmc' { RET_INSN_NS(onebyte, 0x00F5, CPU_Any); }
- 'lahf' { RET_INSN_NS(onebyte, 0x009F, CPU_Any); }
- 'sahf' { RET_INSN_NS(onebyte, 0x009E, CPU_Any); }
- 'pushf' { RET_INSN_NS(onebyte, 0x009C, CPU_Any); }
- 'pushfd' { RET_INSN_NONGAS(6, onebyte, 0x209C, CPU_386); }
- 'pushfl' { RET_INSN_GAS(6, onebyte, 0x209C, CPU_386); }
- 'pushfw' { RET_INSN_NS(onebyte, 0x109C, CPU_Any); }
- 'pushfq' {
- warn64 = 1;
- RET_INSN_NS(onebyte, 0x409C, CPU_Hammer|CPU_64);
- }
- 'popf' { RET_INSN_NS(onebyte, 0x40009D, CPU_Any); }
- 'popfd' {
- not64 = 1;
- RET_INSN_NONGAS(5, onebyte, 0x00209D, CPU_386);
- }
- 'popfl' {
- not64 = 1;
- RET_INSN_GAS(5, onebyte, 0x00209D, CPU_386);
- }
- 'popfw' { RET_INSN_NS(onebyte, 0x40109D, CPU_Any); }
- 'popfq' {
- warn64 = 1;
- RET_INSN_NS(onebyte, 0x40409D, CPU_Hammer|CPU_64);
- }
- 'stc' { RET_INSN_NS(onebyte, 0x00F9, CPU_Any); }
- 'std' { RET_INSN_NS(onebyte, 0x00FD, CPU_Any); }
- 'sti' { RET_INSN_NS(onebyte, 0x00FB, CPU_Any); }
- /* Arithmetic */
- 'add' [bBwWlLqQ]? { RET_INSN(3, arith, 0x0000, CPU_Any); }
- 'inc' [bBwWlLqQ]? { RET_INSN(3, incdec, 0x0040, CPU_Any); }
- 'sub' [bBwWlLqQ]? { RET_INSN(3, arith, 0x0528, CPU_Any); }
- 'dec' [bBwWlLqQ]? { RET_INSN(3, incdec, 0x0148, CPU_Any); }
- 'sbb' [bBwWlLqQ]? { RET_INSN(3, arith, 0x0318, CPU_Any); }
- 'cmp' [bBwWlLqQ]? { RET_INSN(3, arith, 0x0738, CPU_Any); }
- 'test' [bBwWlLqQ]? { RET_INSN(4, test, 0, CPU_Any); }
- 'and' [bBwWlLqQ]? { RET_INSN(3, arith, 0x0420, CPU_Any); }
- 'or' [bBwWlLqQ]? { RET_INSN(2, arith, 0x0108, CPU_Any); }
- 'xor' [bBwWlLqQ]? { RET_INSN(3, arith, 0x0630, CPU_Any); }
- 'adc' [bBwWlLqQ]? { RET_INSN(3, arith, 0x0210, CPU_Any); }
- 'neg' [bBwWlLqQ]? { RET_INSN(3, f6, 0x03, CPU_Any); }
- 'not' [bBwWlLqQ]? { RET_INSN(3, f6, 0x02, CPU_Any); }
- 'aaa' {
- not64 = 1;
- RET_INSN_NS(onebyte, 0x0037, CPU_Any);
- }
- 'aas' {
- not64 = 1;
- RET_INSN_NS(onebyte, 0x003F, CPU_Any);
- }
- 'daa' {
- not64 = 1;
- RET_INSN_NS(onebyte, 0x0027, CPU_Any);
- }
- 'das' {
- not64 = 1;
- RET_INSN_NS(onebyte, 0x002F, CPU_Any);
- }
- 'aad' {
- not64 = 1;
- RET_INSN_NS(aadm, 0x01, CPU_Any);
- }
- 'aam' {
- not64 = 1;
- RET_INSN_NS(aadm, 0x00, CPU_Any);
- }
- /* Conversion instructions */
- 'cbw' { RET_INSN_NS(onebyte, 0x1098, CPU_Any); }
- 'cwde' { RET_INSN_NS(onebyte, 0x2098, CPU_386); }
- 'cdqe' {
- warn64 = 1;
- RET_INSN_NS(onebyte, 0x4098, CPU_Hammer|CPU_64);
- }
- 'cwd' { RET_INSN_NS(onebyte, 0x1099, CPU_Any); }
- 'cdq' { RET_INSN_NS(onebyte, 0x2099, CPU_386); }
- 'cqo' {
- warn64 = 1;
- RET_INSN_NS(onebyte, 0x4099, CPU_Hammer|CPU_64);
- }
- /* Conversion instructions - GAS / AT&T naming */
- 'cbtw' { RET_INSN_GAS(4, onebyte, 0x1098, CPU_Any); }
- 'cwtl' { RET_INSN_GAS(4, onebyte, 0x2098, CPU_386); }
- 'cltq' {
- warn64 = 1;
- RET_INSN_GAS(4, onebyte, 0x4098, CPU_Hammer|CPU_64);
- }
- 'cwtd' { RET_INSN_GAS(4, onebyte, 0x1099, CPU_Any); }
- 'cltd' { RET_INSN_GAS(4, onebyte, 0x2099, CPU_386); }
- 'cqto' {
- warn64 = 1;
- RET_INSN_GAS(4, onebyte, 0x4099, CPU_Hammer|CPU_64);
- }
- /* Multiplication and division */
- 'mul' [bBwWlLqQ]? { RET_INSN(3, f6, 0x04, CPU_Any); }
- 'imul' [bBwWlLqQ]? { RET_INSN(4, imul, 0, CPU_Any); }
- 'div' [bBwWlLqQ]? { RET_INSN(3, div, 0x06, CPU_Any); }
- 'idiv' [bBwWlLqQ]? { RET_INSN(4, div, 0x07, CPU_Any); }
- /* Shifts */
- 'rol' [bBwWlLqQ]? { RET_INSN(3, shift, 0x00, CPU_Any); }
- 'ror' [bBwWlLqQ]? { RET_INSN(3, shift, 0x01, CPU_Any); }
- 'rcl' [bBwWlLqQ]? { RET_INSN(3, shift, 0x02, CPU_Any); }
- 'rcr' [bBwWlLqQ]? { RET_INSN(3, shift, 0x03, CPU_Any); }
- 'sal' [bBwWlLqQ]? { RET_INSN(3, shift, 0x04, CPU_Any); }
- 'shl' [bBwWlLqQ]? { RET_INSN(3, shift, 0x04, CPU_Any); }
- 'shr' [bBwWlLqQ]? { RET_INSN(3, shift, 0x05, CPU_Any); }
- 'sar' [bBwWlLqQ]? { RET_INSN(3, shift, 0x07, CPU_Any); }
- 'shld' [wWlLqQ]? { RET_INSN(4, shlrd, 0xA4, CPU_386); }
- 'shrd' [wWlLqQ]? { RET_INSN(4, shlrd, 0xAC, CPU_386); }
- /* Control transfer instructions (unconditional) */
- 'call' { RET_INSN(4, call, 0, CPU_Any); }
- 'jmp' { RET_INSN(3, jmp, 0, CPU_Any); }
- 'ret' W? { RET_INSN(3, retnf, 0xC2, CPU_Any); }
- 'retl' {
- not64 = 1;
- RET_INSN_GAS(3, retnf, 0xC2, CPU_Any);
- }
- 'retq' {
- warn64 = 1;
- RET_INSN_GAS(3, retnf, 0xC2, CPU_Hammer|CPU_64);
- }
- 'retn' { RET_INSN_NONGAS(4, retnf, 0xC2, CPU_Any); }
- 'retf' { RET_INSN_NONGAS(4, retnf, 0xCA, CPU_Any); }
- 'lretw' { RET_INSN_GAS(4, retnf, 0xCA, CPU_Any); }
- 'lretl' {
- not64 = 1;
- RET_INSN_GAS(4, retnf, 0xCA, CPU_Any);
- }
- 'lretq' {
- warn64 = 1;
- RET_INSN_GAS(4, retnf, 0xCA, CPU_Any);
- }
- 'enter' [wWlLqQ]? { RET_INSN(5, enter, 0, CPU_186); }
- 'leave' { RET_INSN_NS(onebyte, 0x4000C9, CPU_186); }
- 'leave' [wW] { RET_INSN_GAS(6, onebyte, 0x0010C9, CPU_186); }
- 'leave' [lLqQ] { RET_INSN_GAS(6, onebyte, 0x4000C9, CPU_186); }
- /* Conditional jumps */
- 'jo' { RET_INSN_NS(jcc, 0x00, CPU_Any); }
- 'jno' { RET_INSN_NS(jcc, 0x01, CPU_Any); }
- 'jb' { RET_INSN_NS(jcc, 0x02, CPU_Any); }
- 'jc' { RET_INSN_NS(jcc, 0x02, CPU_Any); }
- 'jnae' { RET_INSN_NS(jcc, 0x02, CPU_Any); }
- 'jnb' { RET_INSN_NS(jcc, 0x03, CPU_Any); }
- 'jnc' { RET_INSN_NS(jcc, 0x03, CPU_Any); }
- 'jae' { RET_INSN_NS(jcc, 0x03, CPU_Any); }
- 'je' { RET_INSN_NS(jcc, 0x04, CPU_Any); }
- 'jz' { RET_INSN_NS(jcc, 0x04, CPU_Any); }
- 'jne' { RET_INSN_NS(jcc, 0x05, CPU_Any); }
- 'jnz' { RET_INSN_NS(jcc, 0x05, CPU_Any); }
- 'jbe' { RET_INSN_NS(jcc, 0x06, CPU_Any); }
- 'jna' { RET_INSN_NS(jcc, 0x06, CPU_Any); }
- 'jnbe' { RET_INSN_NS(jcc, 0x07, CPU_Any); }
- 'ja' { RET_INSN_NS(jcc, 0x07, CPU_Any); }
- 'js' { RET_INSN_NS(jcc, 0x08, CPU_Any); }
- 'jns' { RET_INSN_NS(jcc, 0x09, CPU_Any); }
- 'jp' { RET_INSN_NS(jcc, 0x0A, CPU_Any); }
- 'jpe' { RET_INSN_NS(jcc, 0x0A, CPU_Any); }
- 'jnp' { RET_INSN_NS(jcc, 0x0B, CPU_Any); }
- 'jpo' { RET_INSN_NS(jcc, 0x0B, CPU_Any); }
- 'jl' { RET_INSN_NS(jcc, 0x0C, CPU_Any); }
- 'jnge' { RET_INSN_NS(jcc, 0x0C, CPU_Any); }
- 'jnl' { RET_INSN_NS(jcc, 0x0D, CPU_Any); }
- 'jge' { RET_INSN_NS(jcc, 0x0D, CPU_Any); }
- 'jle' { RET_INSN_NS(jcc, 0x0E, CPU_Any); }
- 'jng' { RET_INSN_NS(jcc, 0x0E, CPU_Any); }
- 'jnle' { RET_INSN_NS(jcc, 0x0F, CPU_Any); }
- 'jg' { RET_INSN_NS(jcc, 0x0F, CPU_Any); }
- 'jcxz' { RET_INSN_NS(jcxz, 16, CPU_Any); }
- 'jecxz' { RET_INSN_NS(jcxz, 32, CPU_386); }
- 'jrcxz' {
- warn64 = 1;
- RET_INSN_NS(jcxz, 64, CPU_Hammer|CPU_64);
- }
- /* Loop instructions */
- 'loop' { RET_INSN_NS(loop, 0x02, CPU_Any); }
- 'loopz' { RET_INSN_NS(loop, 0x01, CPU_Any); }
- 'loope' { RET_INSN_NS(loop, 0x01, CPU_Any); }
- 'loopnz' { RET_INSN_NS(loop, 0x00, CPU_Any); }
- 'loopne' { RET_INSN_NS(loop, 0x00, CPU_Any); }
- /* Set byte on flag instructions */
- 'seto' B? { RET_INSN(4, setcc, 0x00, CPU_386); }
- 'setno' B? { RET_INSN(5, setcc, 0x01, CPU_386); }
- 'setb' B? { RET_INSN(4, setcc, 0x02, CPU_386); }
- 'setc' B? { RET_INSN(4, setcc, 0x02, CPU_386); }
- 'setnae' B? { RET_INSN(6, setcc, 0x02, CPU_386); }
- 'setnb' B? { RET_INSN(5, setcc, 0x03, CPU_386); }
- 'setnc' B? { RET_INSN(5, setcc, 0x03, CPU_386); }
- 'setae' B? { RET_INSN(5, setcc, 0x03, CPU_386); }
- 'sete' B? { RET_INSN(4, setcc, 0x04, CPU_386); }
- 'setz' B? { RET_INSN(4, setcc, 0x04, CPU_386); }
- 'setne' B? { RET_INSN(5, setcc, 0x05, CPU_386); }
- 'setnz' B? { RET_INSN(5, setcc, 0x05, CPU_386); }
- 'setbe' B? { RET_INSN(5, setcc, 0x06, CPU_386); }
- 'setna' B? { RET_INSN(5, setcc, 0x06, CPU_386); }
- 'setnbe' B? { RET_INSN(6, setcc, 0x07, CPU_386); }
- 'seta' B? { RET_INSN(4, setcc, 0x07, CPU_386); }
- 'sets' B? { RET_INSN(4, setcc, 0x08, CPU_386); }
- 'setns' B? { RET_INSN(5, setcc, 0x09, CPU_386); }
- 'setp' B? { RET_INSN(4, setcc, 0x0A, CPU_386); }
- 'setpe' B? { RET_INSN(5, setcc, 0x0A, CPU_386); }
- 'setnp' B? { RET_INSN(5, setcc, 0x0B, CPU_386); }
- 'setpo' B? { RET_INSN(5, setcc, 0x0B, CPU_386); }
- 'setl' B? { RET_INSN(4, setcc, 0x0C, CPU_386); }
- 'setnge' B? { RET_INSN(6, setcc, 0x0C, CPU_386); }
- 'setnl' B? { RET_INSN(5, setcc, 0x0D, CPU_386); }
- 'setge' B? { RET_INSN(5, setcc, 0x0D, CPU_386); }
- 'setle' B? { RET_INSN(5, setcc, 0x0E, CPU_386); }
- 'setng' B? { RET_INSN(5, setcc, 0x0E, CPU_386); }
- 'setnle' B? { RET_INSN(6, setcc, 0x0F, CPU_386); }
- 'setg' B? { RET_INSN(4, setcc, 0x0F, CPU_386); }
- /* String instructions. */
- 'cmpsb' { RET_INSN_NS(onebyte, 0x00A6, CPU_Any); }
- 'cmpsw' { RET_INSN_NS(onebyte, 0x10A7, CPU_Any); }
- 'cmpsd' { RET_INSN_NS(cmpsd, 0, CPU_Any); }
- 'cmpsl' { RET_INSN_GAS(5, onebyte, 0x20A7, CPU_386); }
- 'cmpsq' {
- warn64 = 1;
- RET_INSN_NS(onebyte, 0x40A7, CPU_Hammer|CPU_64);
- }
- 'insb' { RET_INSN_NS(onebyte, 0x006C, CPU_Any); }
- 'insw' { RET_INSN_NS(onebyte, 0x106D, CPU_Any); }
- 'insd' { RET_INSN_NONGAS(4, onebyte, 0x206D, CPU_386); }
- 'insl' { RET_INSN_GAS(4, onebyte, 0x206D, CPU_386); }
- 'outsb' { RET_INSN_NS(onebyte, 0x006E, CPU_Any); }
- 'outsw' { RET_INSN_NS(onebyte, 0x106F, CPU_Any); }
- 'outsd' { RET_INSN_NONGAS(5, onebyte, 0x206F, CPU_386); }
- 'outsl' { RET_INSN_GAS(5, onebyte, 0x206F, CPU_386); }
- 'lodsb' { RET_INSN_NS(onebyte, 0x00AC, CPU_Any); }
- 'lodsw' { RET_INSN_NS(onebyte, 0x10AD, CPU_Any); }
- 'lodsd' { RET_INSN_NONGAS(5, onebyte, 0x20AD, CPU_386); }
- 'lodsl' { RET_INSN_GAS(5, onebyte, 0x20AD, CPU_386); }
- 'lodsq' {
- warn64 = 1;
- RET_INSN_NS(onebyte, 0x40AD, CPU_Hammer|CPU_64);
- }
- 'movsb' { RET_INSN_NS(onebyte, 0x00A4, CPU_Any); }
- 'movsw' { RET_INSN_NS(onebyte, 0x10A5, CPU_Any); }
- 'movsd' { RET_INSN_NS(movsd, 0, CPU_Any); }
- 'movsl' { RET_INSN_GAS(5, onebyte, 0x20A5, CPU_386); }
- 'movsq' {
- warn64 = 1;
- RET_INSN_NS(onebyte, 0x40A5, CPU_Any);
- }
- /* smov alias for movs in GAS mode */
- 'smovb' { RET_INSN_GAS(5, onebyte, 0x00A4, CPU_Any); }
- 'smovw' { RET_INSN_GAS(5, onebyte, 0x10A5, CPU_Any); }
- 'smovl' { RET_INSN_GAS(5, onebyte, 0x20A5, CPU_386); }
- 'smovq' {
- warn64 = 1;
- RET_INSN_GAS(5, onebyte, 0x40A5, CPU_Any);
- }
- 'scasb' { RET_INSN_NS(onebyte, 0x00AE, CPU_Any); }
- 'scasw' { RET_INSN_NS(onebyte, 0x10AF, CPU_Any); }
- 'scasd' { RET_INSN_NONGAS(5, onebyte, 0x20AF, CPU_386); }
- 'scasl' { RET_INSN_GAS(5, onebyte, 0x20AF, CPU_386); }
- 'scasq' {
- warn64 = 1;
- RET_INSN_NS(onebyte, 0x40AF, CPU_Hammer|CPU_64);
- }
- /* ssca alias for scas in GAS mode */
- 'sscab' { RET_INSN_GAS(5, onebyte, 0x00AE, CPU_Any); }
- 'sscaw' { RET_INSN_GAS(5, onebyte, 0x10AF, CPU_Any); }
- 'sscal' { RET_INSN_GAS(5, onebyte, 0x20AF, CPU_386); }
- 'sscaq' {
- warn64 = 1;
- RET_INSN_GAS(5, onebyte, 0x40AF, CPU_Hammer|CPU_64);
- }
- 'stosb' { RET_INSN_NS(onebyte, 0x00AA, CPU_Any); }
- 'stosw' { RET_INSN_NS(onebyte, 0x10AB, CPU_Any); }
- 'stosd' { RET_INSN_NONGAS(5, onebyte, 0x20AB, CPU_386); }
- 'stosl' { RET_INSN_GAS(5, onebyte, 0x20AB, CPU_386); }
- 'stosq' {
- warn64 = 1;
- RET_INSN_NS(onebyte, 0x40AB, CPU_Hammer|CPU_64);
- }
- 'xlat' B? { RET_INSN(5, onebyte, 0x00D7, CPU_Any); }
- /* Bit manipulation */
- 'bsf' [wWlLqQ]? { RET_INSN(3, bsfr, 0xBC, CPU_386); }
- 'bsr' [wWlLqQ]? { RET_INSN(3, bsfr, 0xBD, CPU_386); }
- 'bt' [wWlLqQ]? { RET_INSN(2, bittest, 0x04A3, CPU_386); }
- 'btc' [wWlLqQ]? { RET_INSN(3, bittest, 0x07BB, CPU_386); }
- 'btr' [wWlLqQ]? { RET_INSN(3, bittest, 0x06B3, CPU_386); }
- 'bts' [wWlLqQ]? { RET_INSN(3, bittest, 0x05AB, CPU_386); }
- /* Interrupts and operating system instructions */
- 'int' { RET_INSN_NS(int, 0, CPU_Any); }
- 'int3' { RET_INSN_NS(onebyte, 0x00CC, CPU_Any); }
- 'int03' { RET_INSN_NONGAS(5, onebyte, 0x00CC, CPU_Any); }
- 'into' {
- not64 = 1;
- RET_INSN_NS(onebyte, 0x00CE, CPU_Any);
- }
- 'iret' { RET_INSN_NS(onebyte, 0x00CF, CPU_Any); }
- 'iretw' { RET_INSN_NS(onebyte, 0x10CF, CPU_Any); }
- 'iretd' { RET_INSN_NONGAS(5, onebyte, 0x20CF, CPU_386); }
- 'iretl' { RET_INSN_GAS(5, onebyte, 0x20CF, CPU_386); }
- 'iretq' {
- warn64 = 1;
- RET_INSN_NS(onebyte, 0x40CF, CPU_Hammer|CPU_64);
- }
- 'rsm' { RET_INSN_NS(twobyte, 0x0FAA, CPU_586|CPU_SMM); }
- 'bound' [wWlL]? {
- not64 = 1;
- RET_INSN(5, bound, 0, CPU_186);
- }
- 'hlt' { RET_INSN_NS(onebyte, 0x00F4, CPU_Priv); }
- 'nop' { RET_INSN_NS(onebyte, 0x0090, CPU_Any); }
- /* Protection control */
- 'arpl' W? {
- not64 = 1;
- RET_INSN(4, arpl, 0, CPU_286|CPU_Prot);
- }
- 'lar' [wWlLqQ]? { RET_INSN(3, bsfr, 0x02, CPU_286|CPU_Prot); }
- 'lgdt' [wWlLqQ]? { RET_INSN(4, twobytemem, 0x020F01, CPU_286|CPU_Priv); }
- 'lidt' [wWlLqQ]? { RET_INSN(4, twobytemem, 0x030F01, CPU_286|CPU_Priv); }
- 'lldt' W? { RET_INSN(4, prot286, 0x0200, CPU_286|CPU_Prot|CPU_Priv); }
- 'lmsw' W? { RET_INSN(4, prot286, 0x0601, CPU_286|CPU_Priv); }
- 'lsl' [wWlLqQ]? { RET_INSN(3, bsfr, 0x03, CPU_286|CPU_Prot); }
- 'ltr' W? { RET_INSN(3, prot286, 0x0300, CPU_286|CPU_Prot|CPU_Priv); }
- 'sgdt' [wWlLqQ]? { RET_INSN(4, twobytemem, 0x000F01, CPU_286|CPU_Priv); }
- 'sidt' [wWlLqQ]? { RET_INSN(4, twobytemem, 0x010F01, CPU_286|CPU_Priv); }
- 'sldt' [wWlLqQ]? { RET_INSN(4, sldtmsw, 0x0000, CPU_286); }
- 'smsw' [wWlLqQ]? { RET_INSN(4, sldtmsw, 0x0401, CPU_286); }
- 'str' [wWlLqQ]? { RET_INSN(3, str, 0, CPU_286|CPU_Prot); }
- 'verr' W? { RET_INSN(4, prot286, 0x0400, CPU_286|CPU_Prot); }
- 'verw' W? { RET_INSN(4, prot286, 0x0500, CPU_286|CPU_Prot); }
- /* Floating point instructions */
- 'fld' [lLsS]? { RET_INSN(3, fldstp, 0x0500C0, CPU_FPU); }
- 'fldt' {
- data[3] |= 0x80 << 8;
- RET_INSN_GAS(4, fldstpt, 0x0500C0, CPU_FPU);
- }
- 'fild' [lLqQsS]? { RET_INSN(4, fildstp, 0x050200, CPU_FPU); }
- 'fildll' { RET_INSN_GAS(6, fbldstp, 0x05, CPU_FPU); }
- 'fbld' { RET_INSN(4, fbldstp, 0x04, CPU_FPU); }
- 'fst' [lLsS]? { RET_INSN(3, fst, 0, CPU_FPU); }
- 'fist' [lLsS]? { RET_INSN(4, fiarith, 0x02DB, CPU_FPU); }
- 'fstp' [lLsS]? { RET_INSN(4, fldstp, 0x0703D8, CPU_FPU); }
- 'fstpt' {
- data[3] |= 0x80 << 8;
- RET_INSN_GAS(5, fldstpt, 0x0703D8, CPU_FPU);
- }
- 'fistp' [lLqQsS]? { RET_INSN(5, fildstp, 0x070203, CPU_FPU); }
- 'fistpll' { RET_INSN_GAS(7, fbldstp, 0x07, CPU_FPU); }
- 'fbstp' { RET_INSN_NS(fbldstp, 0x06, CPU_FPU); }
- 'fxch' { RET_INSN_NS(fxch, 0, CPU_FPU); }
- 'fcom' [lLsS]? { RET_INSN(4, fcom, 0x02D0, CPU_FPU); }
- 'ficom' [lLsS]? { RET_INSN(5, fiarith, 0x02DA, CPU_FPU); }
- 'fcomp' [lLsS]? { RET_INSN(5, fcom, 0x03D8, CPU_FPU); }
- 'ficomp' [lLsS]? { RET_INSN(6, fiarith, 0x03DA, CPU_FPU); }
- 'fcompp' { RET_INSN_NS(twobyte, 0xDED9, CPU_FPU); }
- 'fucom' { RET_INSN_NS(fcom2, 0xDDE0, CPU_286|CPU_FPU); }
- 'fucomp' { RET_INSN_NS(fcom2, 0xDDE8, CPU_286|CPU_FPU); }
- 'fucompp' { RET_INSN_NS(twobyte, 0xDAE9, CPU_286|CPU_FPU); }
- 'ftst' { RET_INSN_NS(twobyte, 0xD9E4, CPU_FPU); }
- 'fxam' { RET_INSN_NS(twobyte, 0xD9E5, CPU_FPU); }
- 'fld1' { RET_INSN_NS(twobyte, 0xD9E8, CPU_FPU); }
- 'fldl2t' { RET_INSN_NS(twobyte, 0xD9E9, CPU_FPU); }
- 'fldl2e' { RET_INSN_NS(twobyte, 0xD9EA, CPU_FPU); }
- 'fldpi' { RET_INSN_NS(twobyte, 0xD9EB, CPU_FPU); }
- 'fldlg2' { RET_INSN_NS(twobyte, 0xD9EC, CPU_FPU); }
- 'fldln2' { RET_INSN_NS(twobyte, 0xD9ED, CPU_FPU); }
- 'fldz' { RET_INSN_NS(twobyte, 0xD9EE, CPU_FPU); }
- 'fadd' [lLsS]? { RET_INSN(4, farith, 0x00C0C0, CPU_FPU); }
- 'faddp' { RET_INSN_NS(farithp, 0xC0, CPU_FPU); }
- 'fiadd' [lLsS]? { RET_INSN(5, fiarith, 0x00DA, CPU_FPU); }
- 'fsub' [lLsS]? { RET_INSN(4, farith, 0x04E0E8, CPU_FPU); }
- 'fisub' [lLsS]? { RET_INSN(5, fiarith, 0x04DA, CPU_FPU); }
- 'fsubp' { RET_INSN_NS(farithp, 0xE8, CPU_FPU); }
- 'fsubr' [lLsS]? { RET_INSN(5, farith, 0x05E8E0, CPU_FPU); }
- 'fisubr' [lLsS]? { RET_INSN(6, fiarith, 0x05DA, CPU_FPU); }
- 'fsubrp' { RET_INSN_NS(farithp, 0xE0, CPU_FPU); }
- 'fmul' [lLsS]? { RET_INSN(4, farith, 0x01C8C8, CPU_FPU); }
- 'fimul' [lLsS]? { RET_INSN(5, fiarith, 0x01DA, CPU_FPU); }
- 'fmulp' { RET_INSN_NS(farithp, 0xC8, CPU_FPU); }
- 'fdiv' [lLsS]? { RET_INSN(4, farith, 0x06F0F8, CPU_FPU); }
- 'fidiv' [lLsS]? { RET_INSN(5, fiarith, 0x06DA, CPU_FPU); }
- 'fdivp' { RET_INSN_NS(farithp, 0xF8, CPU_FPU); }
- 'fdivr' [lLsS]? { RET_INSN(5, farith, 0x07F8F0, CPU_FPU); }
- 'fidivr' [lLsS]? { RET_INSN(6, fiarith, 0x07DA, CPU_FPU); }
- 'fdivrp' { RET_INSN_NS(farithp, 0xF0, CPU_FPU); }
- 'f2xm1' { RET_INSN_NS(twobyte, 0xD9F0, CPU_FPU); }
- 'fyl2x' { RET_INSN_NS(twobyte, 0xD9F1, CPU_FPU); }
- 'fptan' { RET_INSN_NS(twobyte, 0xD9F2, CPU_FPU); }
- 'fpatan' { RET_INSN_NS(twobyte, 0xD9F3, CPU_FPU); }
- 'fxtract' { RET_INSN_NS(twobyte, 0xD9F4, CPU_FPU); }
- 'fprem1' { RET_INSN_NS(twobyte, 0xD9F5, CPU_286|CPU_FPU); }
- 'fdecstp' { RET_INSN_NS(twobyte, 0xD9F6, CPU_FPU); }
- 'fincstp' { RET_INSN_NS(twobyte, 0xD9F7, CPU_FPU); }
- 'fprem' { RET_INSN_NS(twobyte, 0xD9F8, CPU_FPU); }
- 'fyl2xp1' { RET_INSN_NS(twobyte, 0xD9F9, CPU_FPU); }
- 'fsqrt' { RET_INSN_NS(twobyte, 0xD9FA, CPU_FPU); }
- 'fsincos' { RET_INSN_NS(twobyte, 0xD9FB, CPU_286|CPU_FPU); }
- 'frndint' { RET_INSN_NS(twobyte, 0xD9FC, CPU_FPU); }
- 'fscale' { RET_INSN_NS(twobyte, 0xD9FD, CPU_FPU); }
- 'fsin' { RET_INSN_NS(twobyte, 0xD9FE, CPU_286|CPU_FPU); }
- 'fcos' { RET_INSN_NS(twobyte, 0xD9FF, CPU_286|CPU_FPU); }
- 'fchs' { RET_INSN_NS(twobyte, 0xD9E0, CPU_FPU); }
- 'fabs' { RET_INSN_NS(twobyte, 0xD9E1, CPU_FPU); }
- 'fninit' { RET_INSN_NS(twobyte, 0xDBE3, CPU_FPU); }
- 'finit' { RET_INSN_NS(threebyte, 0x9BDBE3UL, CPU_FPU); }
- 'fldcw' W? { RET_INSN(5, fldnstcw, 0x05, CPU_FPU); }
- 'fnstcw' W? { RET_INSN(6, fldnstcw, 0x07, CPU_FPU); }
- 'fstcw' W? { RET_INSN(5, fstcw, 0, CPU_FPU); }
- 'fnstsw' W? { RET_INSN(6, fnstsw, 0, CPU_FPU); }
- 'fstsw' W? { RET_INSN(5, fstsw, 0, CPU_FPU); }
- 'fnclex' { RET_INSN_NS(twobyte, 0xDBE2, CPU_FPU); }
- 'fclex' { RET_INSN_NS(threebyte, 0x9BDBE2UL, CPU_FPU); }
- 'fnstenv' [lLsS]? { RET_INSN(7, onebytemem, 0x06D9, CPU_FPU); }
- 'fstenv' [lLsS]? { RET_INSN(6, twobytemem, 0x069BD9, CPU_FPU); }
- 'fldenv' [lLsS]? { RET_INSN(6, onebytemem, 0x04D9, CPU_FPU); }
- 'fnsave' [lLsS]? { RET_INSN(6, onebytemem, 0x06DD, CPU_FPU); }
- 'fsave' [lLsS]? { RET_INSN(5, twobytemem, 0x069BDD, CPU_FPU); }
- 'frstor' [lLsS]? { RET_INSN(6, onebytemem, 0x04DD, CPU_FPU); }
- 'ffree' { RET_INSN_NS(ffree, 0xDD, CPU_FPU); }
- 'ffreep' { RET_INSN_NS(ffree, 0xDF, CPU_686|CPU_FPU|CPU_Undoc); }
- 'fnop' { RET_INSN_NS(twobyte, 0xD9D0, CPU_FPU); }
- 'fwait' { RET_INSN_NS(onebyte, 0x009B, CPU_FPU); }
- /* Prefixes (should the others be here too? should wait be a prefix? */
- 'wait' { RET_INSN_NS(onebyte, 0x009B, CPU_Any); }
- /* 486 extensions */
- 'bswap' [lLqQ]? { RET_INSN(5, bswap, 0, CPU_486); }
- 'xadd' [bBwWlLqQ]? { RET_INSN(4, cmpxchgxadd, 0xC0, CPU_486); }
- 'cmpxchg' [bBwWlLqQ]? { RET_INSN(7, cmpxchgxadd, 0xB0, CPU_486); }
- 'cmpxchg486' { RET_INSN_NONGAS(10, cmpxchgxadd, 0xA6, CPU_486|CPU_Undoc); }
- 'invd' { RET_INSN_NS(twobyte, 0x0F08, CPU_486|CPU_Priv); }
- 'wbinvd' { RET_INSN_NS(twobyte, 0x0F09, CPU_486|CPU_Priv); }
- 'invlpg' { RET_INSN_NS(twobytemem, 0x070F01, CPU_486|CPU_Priv); }
- /* 586+ and late 486 extensions */
- 'cpuid' { RET_INSN_NS(twobyte, 0x0FA2, CPU_486); }
- /* Pentium extensions */
- 'wrmsr' { RET_INSN_NS(twobyte, 0x0F30, CPU_586|CPU_Priv); }
- 'rdtsc' { RET_INSN_NS(twobyte, 0x0F31, CPU_586); }
- 'rdmsr' { RET_INSN_NS(twobyte, 0x0F32, CPU_586|CPU_Priv); }
- 'cmpxchg8b' Q? { RET_INSN(9, cmpxchg8b, 0, CPU_586); }
- /* Pentium II/Pentium Pro extensions */
- 'sysenter' {
- not64 = 1;
- RET_INSN_NS(twobyte, 0x0F34, CPU_686);
- }
- 'sysexit' {
- not64 = 1;
- RET_INSN_NS(twobyte, 0x0F35, CPU_686|CPU_Priv);
- }
- 'fxsave' Q? { RET_INSN(6, twobytemem, 0x000FAE, CPU_686|CPU_FPU); }
- 'fxrstor' Q? { RET_INSN(7, twobytemem, 0x010FAE, CPU_686|CPU_FPU); }
- 'rdpmc' { RET_INSN_NS(twobyte, 0x0F33, CPU_686); }
- 'ud2' { RET_INSN_NS(twobyte, 0x0F0B, CPU_286); }
- 'ud1' { RET_INSN_NS(twobyte, 0x0FB9, CPU_286|CPU_Undoc); }
- 'cmovo' [wWlLqQ]? { RET_INSN(5, cmovcc, 0x00, CPU_686); }
- 'cmovno' [wWlLqQ]? { RET_INSN(6, cmovcc, 0x01, CPU_686); }
- 'cmovb' [wWlLqQ]? { RET_INSN(5, cmovcc, 0x02, CPU_686); }
- 'cmovc' [wWlLqQ]? { RET_INSN(5, cmovcc, 0x02, CPU_686); }
- 'cmovnae' [wWlLqQ]? { RET_INSN(7, cmovcc, 0x02, CPU_686); }
- 'cmovnb' [wWlLqQ]? { RET_INSN(6, cmovcc, 0x03, CPU_686); }
- 'cmovnc' [wWlLqQ]? { RET_INSN(6, cmovcc, 0x03, CPU_686); }
- 'cmovae' [wWlLqQ]? { RET_INSN(6, cmovcc, 0x03, CPU_686); }
- 'cmove' [wWlLqQ]? { RET_INSN(5, cmovcc, 0x04, CPU_686); }
- 'cmovz' [wWlLqQ]? { RET_INSN(5, cmovcc, 0x04, CPU_686); }
- 'cmovne' [wWlLqQ]? { RET_INSN(6, cmovcc, 0x05, CPU_686); }
- 'cmovnz' [wWlLqQ]? { RET_INSN(6, cmovcc, 0x05, CPU_686); }
- 'cmovbe' [wWlLqQ]? { RET_INSN(6, cmovcc, 0x06, CPU_686); }
- 'cmovna' [wWlLqQ]? { RET_INSN(6, cmovcc, 0x06, CPU_686); }
- 'cmovnbe' [wWlLqQ]? { RET_INSN(7, cmovcc, 0x07, CPU_686); }
- 'cmova' [wWlLqQ]? { RET_INSN(5, cmovcc, 0x07, CPU_686); }
- 'cmovs' [wWlLqQ]? { RET_INSN(5, cmovcc, 0x08, CPU_686); }
- 'cmovns' [wWlLqQ]? { RET_INSN(6, cmovcc, 0x09, CPU_686); }
- 'cmovp' [wWlLqQ]? { RET_INSN(5, cmovcc, 0x0A, CPU_686); }
- 'cmovpe' [wWlLqQ]? { RET_INSN(6, cmovcc, 0x0A, CPU_686); }
- 'cmovnp' [wWlLqQ]? { RET_INSN(6, cmovcc, 0x0B, CPU_686); }
- 'cmovpo' [wWlLqQ]? { RET_INSN(6, cmovcc, 0x0B, CPU_686); }
- 'cmovl' [wWlLqQ]? { RET_INSN(5, cmovcc, 0x0C, CPU_686); }
- 'cmovnge' [wWlLqQ]? { RET_INSN(7, cmovcc, 0x0C, CPU_686); }
- 'cmovnl' [wWlLqQ]? { RET_INSN(6, cmovcc, 0x0D, CPU_686); }
- 'cmovge' [wWlLqQ]? { RET_INSN(6, cmovcc, 0x0D, CPU_686); }
- 'cmovle' [wWlLqQ]? { RET_INSN(6, cmovcc, 0x0E, CPU_686); }
- 'cmovng' [wWlLqQ]? { RET_INSN(6, cmovcc, 0x0E, CPU_686); }
- 'cmovnle' [wWlLqQ]? { RET_INSN(7, cmovcc, 0x0F, CPU_686); }
- 'cmovg' [wWlLqQ]? { RET_INSN(5, cmovcc, 0x0F, CPU_686); }
- 'fcmovb' { RET_INSN_NS(fcmovcc, 0xDAC0, CPU_686|CPU_FPU); }
- 'fcmove' { RET_INSN_NS(fcmovcc, 0xDAC8, CPU_686|CPU_FPU); }
- 'fcmovbe' { RET_INSN_NS(fcmovcc, 0xDAD0, CPU_686|CPU_FPU); }
- 'fcmovu' { RET_INSN_NS(fcmovcc, 0xDAD8, CPU_686|CPU_FPU); }
- 'fcmovnb' { RET_INSN_NS(fcmovcc, 0xDBC0, CPU_686|CPU_FPU); }
- 'fcmovne' { RET_INSN_NS(fcmovcc, 0xDBC8, CPU_686|CPU_FPU); }
- 'fcmovnbe' { RET_INSN_NS(fcmovcc, 0xDBD0, CPU_686|CPU_FPU); }
- 'fcmovnu' { RET_INSN_NS(fcmovcc, 0xDBD8, CPU_686|CPU_FPU); }
- 'fcomi' { RET_INSN_NS(fcom2, 0xDBF0, CPU_686|CPU_FPU); }
- 'fucomi' { RET_INSN_NS(fcom2, 0xDBE8, CPU_686|CPU_FPU); }
- 'fcomip' { RET_INSN_NS(fcom2, 0xDFF0, CPU_686|CPU_FPU); }
- 'fucomip' { RET_INSN_NS(fcom2, 0xDFE8, CPU_686|CPU_FPU); }
- /* Pentium4 extensions */
- 'movnti' [lLqQ]? { RET_INSN(6, movnti, 0, CPU_P4); }
- 'clflush' { RET_INSN_NS(clflush, 0, CPU_P3); }
- 'lfence' { RET_INSN_NS(threebyte, 0x0FAEE8, CPU_P3); }
- 'mfence' { RET_INSN_NS(threebyte, 0x0FAEF0, CPU_P3); }
- 'pause' { RET_INSN_NS(onebyte_prefix, 0xF390, CPU_P4); }
- /* MMX/SSE2 instructions */
- 'emms' { RET_INSN_NS(twobyte, 0x0F77, CPU_MMX); }
- 'movd' { RET_INSN_NS(movd, 0, CPU_MMX); }
- 'movq' {
- if (arch_x86->parser == X86_PARSER_GAS)
- RET_INSN(3, mov, 0, CPU_Any);
- else
- RET_INSN_NS(movq, 0, CPU_MMX);
- }
- 'packssdw' { RET_INSN_NS(mmxsse2, 0x6B, CPU_MMX); }
- 'packsswb' { RET_INSN_NS(mmxsse2, 0x63, CPU_MMX); }
- 'packuswb' { RET_INSN_NS(mmxsse2, 0x67, CPU_MMX); }
- 'paddb' { RET_INSN_NS(mmxsse2, 0xFC, CPU_MMX); }
- 'paddw' { RET_INSN_NS(mmxsse2, 0xFD, CPU_MMX); }
- 'paddd' { RET_INSN_NS(mmxsse2, 0xFE, CPU_MMX); }
- 'paddq' { RET_INSN_NS(mmxsse2, 0xD4, CPU_MMX); }
- 'paddsb' { RET_INSN_NS(mmxsse2, 0xEC, CPU_MMX); }
- 'paddsw' { RET_INSN_NS(mmxsse2, 0xED, CPU_MMX); }
- 'paddusb' { RET_INSN_NS(mmxsse2, 0xDC, CPU_MMX); }
- 'paddusw' { RET_INSN_NS(mmxsse2, 0xDD, CPU_MMX); }
- 'pand' { RET_INSN_NS(mmxsse2, 0xDB, CPU_MMX); }
- 'pandn' { RET_INSN_NS(mmxsse2, 0xDF, CPU_MMX); }
- 'pcmpeqb' { RET_INSN_NS(mmxsse2, 0x74, CPU_MMX); }
- 'pcmpeqw' { RET_INSN_NS(mmxsse2, 0x75, CPU_MMX); }
- 'pcmpeqd' { RET_INSN_NS(mmxsse2, 0x76, CPU_MMX); }
- 'pcmpgtb' { RET_INSN_NS(mmxsse2, 0x64, CPU_MMX); }
- 'pcmpgtw' { RET_INSN_NS(mmxsse2, 0x65, CPU_MMX); }
- 'pcmpgtd' { RET_INSN_NS(mmxsse2, 0x66, CPU_MMX); }
- 'pmaddwd' { RET_INSN_NS(mmxsse2, 0xF5, CPU_MMX); }
- 'pmulhw' { RET_INSN_NS(mmxsse2, 0xE5, CPU_MMX); }
- 'pmullw' { RET_INSN_NS(mmxsse2, 0xD5, CPU_MMX); }
- 'por' { RET_INSN_NS(mmxsse2, 0xEB, CPU_MMX); }
- 'psllw' { RET_INSN_NS(pshift, 0x0671F1, CPU_MMX); }
- 'pslld' { RET_INSN_NS(pshift, 0x0672F2, CPU_MMX); }
- 'psllq' { RET_INSN_NS(pshift, 0x0673F3, CPU_MMX); }
- 'psraw' { RET_INSN_NS(pshift, 0x0471E1, CPU_MMX); }
- 'psrad' { RET_INSN_NS(pshift, 0x0472E2, CPU_MMX); }
- 'psrlw' { RET_INSN_NS(pshift, 0x0271D1, CPU_MMX); }
- 'psrld' { RET_INSN_NS(pshift, 0x0272D2, CPU_MMX); }
- 'psrlq' { RET_INSN_NS(pshift, 0x0273D3, CPU_MMX); }
- 'psubb' { RET_INSN_NS(mmxsse2, 0xF8, CPU_MMX); }
- 'psubw' { RET_INSN_NS(mmxsse2, 0xF9, CPU_MMX); }
- 'psubd' { RET_INSN_NS(mmxsse2, 0xFA, CPU_MMX); }
- 'psubq' { RET_INSN_NS(mmxsse2, 0xFB, CPU_MMX); }
- 'psubsb' { RET_INSN_NS(mmxsse2, 0xE8, CPU_MMX); }
- 'psubsw' { RET_INSN_NS(mmxsse2, 0xE9, CPU_MMX); }
- 'psubusb' { RET_INSN_NS(mmxsse2, 0xD8, CPU_MMX); }
- 'psubusw' { RET_INSN_NS(mmxsse2, 0xD9, CPU_MMX); }
- 'punpckhbw' { RET_INSN_NS(mmxsse2, 0x68, CPU_MMX); }
- 'punpckhwd' { RET_INSN_NS(mmxsse2, 0x69, CPU_MMX); }
- 'punpckhdq' { RET_INSN_NS(mmxsse2, 0x6A, CPU_MMX); }
- 'punpcklbw' { RET_INSN_NS(mmxsse2, 0x60, CPU_MMX); }
- 'punpcklwd' { RET_INSN_NS(mmxsse2, 0x61, CPU_MMX); }
- 'punpckldq' { RET_INSN_NS(mmxsse2, 0x62, CPU_MMX); }
- 'pxor' { RET_INSN_NS(mmxsse2, 0xEF, CPU_MMX); }
- /* PIII (Katmai) new instructions / SIMD instructions */
- 'addps' { RET_INSN_NS(sseps, 0x58, CPU_SSE); }
- 'addss' { RET_INSN_NS(ssess, 0xF358, CPU_SSE); }
- 'andnps' { RET_INSN_NS(sseps, 0x55, CPU_SSE); }
- 'andps' { RET_INSN_NS(sseps, 0x54, CPU_SSE); }
- 'cmpeqps' { RET_INSN_NS(ssecmpps, 0x00, CPU_SSE); }
- 'cmpeqss' { RET_INSN_NS(ssecmpss, 0x00F3, CPU_SSE); }
- 'cmpleps' { RET_INSN_NS(ssecmpps, 0x02, CPU_SSE); }
- 'cmpless' { RET_INSN_NS(ssecmpss, 0x02F3, CPU_SSE); }
- 'cmpltps' { RET_INSN_NS(ssecmpps, 0x01, CPU_SSE); }
- 'cmpltss' { RET_INSN_NS(ssecmpss, 0x01F3, CPU_SSE); }
- 'cmpneqps' { RET_INSN_NS(ssecmpps, 0x04, CPU_SSE); }
- 'cmpneqss' { RET_INSN_NS(ssecmpss, 0x04F3, CPU_SSE); }
- 'cmpnleps' { RET_INSN_NS(ssecmpps, 0x06, CPU_SSE); }
- 'cmpnless' { RET_INSN_NS(ssecmpss, 0x06F3, CPU_SSE); }
- 'cmpnltps' { RET_INSN_NS(ssecmpps, 0x05, CPU_SSE); }
- 'cmpnltss' { RET_INSN_NS(ssecmpss, 0x05F3, CPU_SSE); }
- 'cmpordps' { RET_INSN_NS(ssecmpps, 0x07, CPU_SSE); }
- 'cmpordss' { RET_INSN_NS(ssecmpss, 0x07F3, CPU_SSE); }
- 'cmpunordps' { RET_INSN_NS(ssecmpps, 0x03, CPU_SSE); }
- 'cmpunordss' { RET_INSN_NS(ssecmpss, 0x03F3, CPU_SSE); }
- 'cmpps' { RET_INSN_NS(ssepsimm, 0xC2, CPU_SSE); }
- 'cmpss' { RET_INSN_NS(ssessimm, 0xF3C2, CPU_SSE); }
- 'comiss' { RET_INSN_NS(sseps, 0x2F, CPU_SSE); }
- 'cvtpi2ps' { RET_INSN_NS(cvt_xmm_mm_ps, 0x2A, CPU_SSE); }
- 'cvtps2pi' { RET_INSN_NS(cvt_mm_xmm64, 0x2D, CPU_SSE); }
- 'cvtsi2ss' [lLqQ]? { RET_INSN(8, cvt_xmm_rmx, 0xF32A, CPU_SSE); }
- 'cvtss2si' [lLqQ]? { RET_INSN(8, cvt_rx_xmm32, 0xF32D, CPU_SSE); }
- 'cvttps2pi' { RET_INSN_NS(cvt_mm_xmm64, 0x2C, CPU_SSE); }
- 'cvttss2si' [lLqQ]? { RET_INSN(9, cvt_rx_xmm32, 0xF32C, CPU_SSE); }
- 'divps' { RET_INSN_NS(sseps, 0x5E, CPU_SSE); }
- 'divss' { RET_INSN_NS(ssess, 0xF35E, CPU_SSE); }
- 'ldmxcsr' { RET_INSN_NS(ldstmxcsr, 0x02, CPU_SSE); }
- 'maskmovq' { RET_INSN_NS(maskmovq, 0, CPU_P3|CPU_MMX); }
- 'maxps' { RET_INSN_NS(sseps, 0x5F, CPU_SSE); }
- 'maxss' { RET_INSN_NS(ssess, 0xF35F, CPU_SSE); }
- 'minps' { RET_INSN_NS(sseps, 0x5D, CPU_SSE); }
- 'minss' { RET_INSN_NS(ssess, 0xF35D, CPU_SSE); }
- 'movaps' { RET_INSN_NS(movaups, 0x28, CPU_SSE); }
- 'movhlps' { RET_INSN_NS(movhllhps, 0x12, CPU_SSE); }
- 'movhps' { RET_INSN_NS(movhlps, 0x16, CPU_SSE); }
- 'movlhps' { RET_INSN_NS(movhllhps, 0x16, CPU_SSE); }
- 'movlps' { RET_INSN_NS(movhlps, 0x12, CPU_SSE); }
- 'movmskps' [lLqQ]? { RET_INSN(8, movmskps, 0, CPU_SSE); }
- 'movntps' { RET_INSN_NS(movntps, 0, CPU_SSE); }
- 'movntq' { RET_INSN_NS(movntq, 0, CPU_SSE); }
- 'movss' { RET_INSN_NS(movss, 0, CPU_SSE); }
- 'movups' { RET_INSN_NS(movaups, 0x10, CPU_SSE); }
- 'mulps' { RET_INSN_NS(sseps, 0x59, CPU_SSE); }
- 'mulss' { RET_INSN_NS(ssess, 0xF359, CPU_SSE); }
- 'orps' { RET_INSN_NS(sseps, 0x56, CPU_SSE); }
- 'pavgb' { RET_INSN_NS(mmxsse2, 0xE0, CPU_P3|CPU_MMX); }
- 'pavgw' { RET_INSN_NS(mmxsse2, 0xE3, CPU_P3|CPU_MMX); }
- 'pextrw' [lLqQ]? { RET_INSN(6, pextrw, 0, CPU_P3|CPU_MMX); }
- 'pinsrw' [lLqQ]? { RET_INSN(6, pinsrw, 0, CPU_P3|CPU_MMX); }
- 'pmaxsw' { RET_INSN_NS(mmxsse2, 0xEE, CPU_P3|CPU_MMX); }
- 'pmaxub' { RET_INSN_NS(mmxsse2, 0xDE, CPU_P3|CPU_MMX); }
- 'pminsw' { RET_INSN_NS(mmxsse2, 0xEA, CPU_P3|CPU_MMX); }
- 'pminub' { RET_INSN_NS(mmxsse2, 0xDA, CPU_P3|CPU_MMX); }
- 'pmovmskb' [lLqQ]? { RET_INSN(8, pmovmskb, 0, CPU_SSE); }
- 'pmulhuw' { RET_INSN_NS(mmxsse2, 0xE4, CPU_P3|CPU_MMX); }
- 'prefetchnta' { RET_INSN_NS(twobytemem, 0x000F18, CPU_P3); }
- 'prefetcht0' { RET_INSN_NS(twobytemem, 0x010F18, CPU_P3); }
- 'prefetcht1' { RET_INSN_NS(twobytemem, 0x020F18, CPU_P3); }
- 'prefetcht2' { RET_INSN_NS(twobytemem, 0x030F18, CPU_P3); }
- 'psadbw' { RET_INSN_NS(mmxsse2, 0xF6, CPU_P3|CPU_MMX); }
- 'pshufw' { RET_INSN_NS(pshufw, 0, CPU_P3|CPU_MMX); }
- 'rcpps' { RET_INSN_NS(sseps, 0x53, CPU_SSE); }
- 'rcpss' { RET_INSN_NS(ssess, 0xF353, CPU_SSE); }
- 'rsqrtps' { RET_INSN_NS(sseps, 0x52, CPU_SSE); }
- 'rsqrtss' { RET_INSN_NS(ssess, 0xF352, CPU_SSE); }
- 'sfence' { RET_INSN_NS(threebyte, 0x0FAEF8, CPU_P3); }
- 'shufps' { RET_INSN_NS(ssepsimm, 0xC6, CPU_SSE); }
- 'sqrtps' { RET_INSN_NS(sseps, 0x51, CPU_SSE); }
- 'sqrtss' { RET_INSN_NS(ssess, 0xF351, CPU_SSE); }
- 'stmxcsr' { RET_INSN_NS(ldstmxcsr, 0x03, CPU_SSE); }
- 'subps' { RET_INSN_NS(sseps, 0x5C, CPU_SSE); }
- 'subss' { RET_INSN_NS(ssess, 0xF35C, CPU_SSE); }
- 'ucomiss' { RET_INSN_NS(ssess, 0x2E, CPU_SSE); }
- 'unpckhps' { RET_INSN_NS(sseps, 0x15, CPU_SSE); }
- 'unpcklps' { RET_INSN_NS(sseps, 0x14, CPU_SSE); }
- 'xorps' { RET_INSN_NS(sseps, 0x57, CPU_SSE); }
- /* SSE2 instructions */
- 'addpd' { RET_INSN_NS(ssess, 0x6658, CPU_SSE2); }
- 'addsd' { RET_INSN_NS(ssess, 0xF258, CPU_SSE2); }
- 'andnpd' { RET_INSN_NS(ssess, 0x6655, CPU_SSE2); }
- 'andpd' { RET_INSN_NS(ssess, 0x6654, CPU_SSE2); }
- 'cmpeqpd' { RET_INSN_NS(ssecmpss, 0x0066, CPU_SSE2); }
- 'cmpeqsd' { RET_INSN_NS(ssecmpss, 0x00F2, CPU_SSE2); }
- 'cmplepd' { RET_INSN_NS(ssecmpss, 0x0266, CPU_SSE2); }
- 'cmplesd' { RET_INSN_NS(ssecmpss, 0x02F2, CPU_SSE2); }
- 'cmpltpd' { RET_INSN_NS(ssecmpss, 0x0166, CPU_SSE2); }
- 'cmpltsd' { RET_INSN_NS(ssecmpss, 0x01F2, CPU_SSE2); }
- 'cmpneqpd' { RET_INSN_NS(ssecmpss, 0x0466, CPU_SSE2); }
- 'cmpneqsd' { RET_INSN_NS(ssecmpss, 0x04F2, CPU_SSE2); }
- 'cmpnlepd' { RET_INSN_NS(ssecmpss, 0x0666, CPU_SSE2); }
- 'cmpnlesd' { RET_INSN_NS(ssecmpss, 0x06F2, CPU_SSE2); }
- 'cmpnltpd' { RET_INSN_NS(ssecmpss, 0x0566, CPU_SSE2); }
- 'cmpnltsd' { RET_INSN_NS(ssecmpss, 0x05F2, CPU_SSE2); }
- 'cmpordpd' { RET_INSN_NS(ssecmpss, 0x0766, CPU_SSE2); }
- 'cmpordsd' { RET_INSN_NS(ssecmpss, 0x07F2, CPU_SSE2); }
- 'cmpunordpd' { RET_INSN_NS(ssecmpss, 0x0366, CPU_SSE2); }
- 'cmpunordsd' { RET_INSN_NS(ssecmpss, 0x03F2, CPU_SSE2); }
- 'cmppd' { RET_INSN_NS(ssessimm, 0x66C2, CPU_SSE2); }
- /* C M P S D is in string instructions above */
- 'comisd' { RET_INSN_NS(ssess, 0x662F, CPU_SSE2); }
- 'cvtpi2pd' { RET_INSN_NS(cvt_xmm_mm_ss, 0x662A, CPU_SSE2); }
- 'cvtsi2sd' [lLqQ]? { RET_INSN(8, cvt_xmm_rmx, 0xF22A, CPU_SSE2); }
- 'divpd' { RET_INSN_NS(ssess, 0x665E, CPU_SSE2); }
- 'divsd' { RET_INSN_NS(ssess, 0xF25E, CPU_SSE2); }
- 'maxpd' { RET_INSN_NS(ssess, 0x665F, CPU_SSE2); }
- 'maxsd' { RET_INSN_NS(ssess, 0xF25F, CPU_SSE2); }
- 'minpd' { RET_INSN_NS(ssess, 0x665D, CPU_SSE2); }
- 'minsd' { RET_INSN_NS(ssess, 0xF25D, CPU_SSE2); }
- 'movapd' { RET_INSN_NS(movaupd, 0x28, CPU_SSE2); }
- 'movhpd' { RET_INSN_NS(movhlpd, 0x16, CPU_SSE2); }
- 'movlpd' { RET_INSN_NS(movhlpd, 0x12, CPU_SSE2); }
- 'movmskpd' [lLqQ]? { RET_INSN(8, movmskpd, 0, CPU_SSE2); }
- 'movntpd' { RET_INSN_NS(movntpddq, 0x2B, CPU_SSE2); }
- 'movntdq' { RET_INSN_NS(movntpddq, 0xE7, CPU_SSE2); }
- /* M O V S D is in string instructions above */
- 'movupd' { RET_INSN_NS(movaupd, 0x10, CPU_SSE2); }
- 'mulpd' { RET_INSN_NS(ssess, 0x6659, CPU_SSE2); }
- 'mulsd' { RET_INSN_NS(ssess, 0xF259, CPU_SSE2); }
- 'orpd' { RET_INSN_NS(ssess, 0x6656, CPU_SSE2); }
- 'shufpd' { RET_INSN_NS(ssessimm, 0x66C6, CPU_SSE2); }
- 'sqrtpd' { RET_INSN_NS(ssess, 0x6651, CPU_SSE2); }
- 'sqrtsd' { RET_INSN_NS(ssess, 0xF251, CPU_SSE2); }
- 'subpd' { RET_INSN_NS(ssess, 0x665C, CPU_SSE2); }
- 'subsd' { RET_INSN_NS(ssess, 0xF25C, CPU_SSE2); }
- 'ucomisd' { RET_INSN_NS(ssess, 0x662E, CPU_SSE2); }
- 'unpckhpd' { RET_INSN_NS(ssess, 0x6615, CPU_SSE2); }
- 'unpcklpd' { RET_INSN_NS(ssess, 0x6614, CPU_SSE2); }
- 'xorpd' { RET_INSN_NS(ssess, 0x6657, CPU_SSE2); }
- 'cvtdq2pd' { RET_INSN_NS(cvt_xmm_xmm64_ss, 0xF3E6, CPU_SSE2); }
- 'cvtpd2dq' { RET_INSN_NS(ssess, 0xF2E6, CPU_SSE2); }
- 'cvtdq2ps' { RET_INSN_NS(sseps, 0x5B, CPU_SSE2); }
- 'cvtpd2pi' { RET_INSN_NS(cvt_mm_xmm, 0x662D, CPU_SSE2); }
- 'cvtpd2ps' { RET_INSN_NS(ssess, 0x665A, CPU_SSE2); }
- 'cvtps2pd' { RET_INSN_NS(cvt_xmm_xmm64_ps, 0x5A, CPU_SSE2); }
- 'cvtps2dq' { RET_INSN_NS(ssess, 0x665B, CPU_SSE2); }
- 'cvtsd2si' [lLqQ]? { RET_INSN(8, cvt_rx_xmm64, 0xF22D, CPU_SSE2); }
- 'cvtsd2ss' { RET_INSN_NS(cvt_xmm_xmm64_ss, 0xF25A, CPU_SSE2); }
- /* P4 VMX Instructions */
- 'vmcall' { RET_INSN_NS(threebyte, 0x0F01C1, CPU_P4); }
- 'vmlaunch' { RET_INSN_NS(threebyte, 0x0F01C2, CPU_P4); }
- 'vmresume' { RET_INSN_NS(threebyte, 0x0F01C3, CPU_P4); }
- 'vmxoff' { RET_INSN_NS(threebyte, 0x0F01C4, CPU_P4); }
- 'vmread' [lLqQ]? { RET_INSN(6, vmxmemrd, 0x0F78, CPU_P4); }
- 'vmwrite' [lLqQ]? { RET_INSN(7, vmxmemwr, 0x0F79, CPU_P4); }
- 'vmptrld' { RET_INSN_NS(vmxtwobytemem, 0x06C7, CPU_P4); }
- 'vmptrst' { RET_INSN_NS(vmxtwobytemem, 0x07C7, CPU_P4); }
- 'vmclear' { RET_INSN_NS(vmxthreebytemem, 0x0666C7, CPU_P4); }
- 'vmxon' { RET_INSN_NS(vmxthreebytemem, 0x06F3C7, CPU_P4); }
- 'cvtss2sd' { RET_INSN_NS(cvt_xmm_xmm32, 0xF35A, CPU_SSE2); }
- 'cvttpd2pi' { RET_INSN_NS(cvt_mm_xmm, 0x662C, CPU_SSE2); }
- 'cvttsd2si' [lLqQ]? { RET_INSN(9, cvt_rx_xmm64, 0xF22C, CPU_SSE2); }
- 'cvttpd2dq' { RET_INSN_NS(ssess, 0x66E6, CPU_SSE2); }
- 'cvttps2dq' { RET_INSN_NS(ssess, 0xF35B, CPU_SSE2); }
- 'maskmovdqu' { RET_INSN_NS(maskmovdqu, 0, CPU_SSE2); }
- 'movdqa' { RET_INSN_NS(movdqau, 0x66, CPU_SSE2); }
- 'movdqu' { RET_INSN_NS(movdqau, 0xF3, CPU_SSE2); }
- 'movdq2q' { RET_INSN_NS(movdq2q, 0, CPU_SSE2); }
- 'movq2dq' { RET_INSN_NS(movq2dq, 0, CPU_SSE2); }
- 'pmuludq' { RET_INSN_NS(mmxsse2, 0xF4, CPU_SSE2); }
- 'pshufd' { RET_INSN_NS(ssessimm, 0x6670, CPU_SSE2); }
- 'pshufhw' { RET_INSN_NS(ssessimm, 0xF370, CPU_SSE2); }
- 'pshuflw' { RET_INSN_NS(ssessimm, 0xF270, CPU_SSE2); }
- 'pslldq' { RET_INSN_NS(pslrldq, 0x07, CPU_SSE2); }
- 'psrldq' { RET_INSN_NS(pslrldq, 0x03, CPU_SSE2); }
- 'punpckhqdq' { RET_INSN_NS(ssess, 0x666D, CPU_SSE2); }
- 'punpcklqdq' { RET_INSN_NS(ssess, 0x666C, CPU_SSE2); }
- /* SSE3 / PNI (Prescott New Instructions) instructions */
- 'addsubpd' { RET_INSN_NS(ssess, 0x66D0, CPU_SSE3); }
- 'addsubps' { RET_INSN_NS(ssess, 0xF2D0, CPU_SSE3); }
- 'fisttp' [sSlLqQ]? { RET_INSN(6, fildstp, 0x010001, CPU_SSE3); }
- 'fisttpll' {
- suffix_over='q';
- RET_INSN_GAS(8, fildstp, 0x07, CPU_FPU);
- }
- 'haddpd' { RET_INSN_NS(ssess, 0x667C, CPU_SSE3); }
- 'haddps' { RET_INSN_NS(ssess, 0xF27C, CPU_SSE3); }
- 'hsubpd' { RET_INSN_NS(ssess, 0x667D, CPU_SSE3); }
- 'hsubps' { RET_INSN_NS(ssess, 0xF27D, CPU_SSE3); }
- 'lddqu' { RET_INSN_NS(lddqu, 0, CPU_SSE3); }
- 'monitor' { RET_INSN_NS(threebyte, 0x0F01C8, CPU_SSE3); }
- 'movddup' { RET_INSN_NS(cvt_xmm_xmm64_ss, 0xF212, CPU_SSE3); }
- 'movshdup' { RET_INSN_NS(ssess, 0xF316, CPU_SSE3); }
- 'movsldup' { RET_INSN_NS(ssess, 0xF312, CPU_SSE3); }
- 'mwait' { RET_INSN_NS(threebyte, 0x0F01C9, CPU_SSE3); }
- /* AMD 3DNow! instructions */
- 'prefetch' { RET_INSN_NS(twobytemem, 0x000F0D, CPU_3DNow); }
- 'prefetchw' { RET_INSN_NS(twobytemem, 0x010F0D, CPU_3DNow); }
- 'femms' { RET_INSN_NS(twobyte, 0x0F0E, CPU_3DNow); }
- 'pavgusb' { RET_INSN_NS(now3d, 0xBF, CPU_3DNow); }
- 'pf2id' { RET_INSN_NS(now3d, 0x1D, CPU_3DNow); }
- 'pf2iw' { RET_INSN_NS(now3d, 0x1C, CPU_Athlon|CPU_3DNow); }
- 'pfacc' { RET_INSN_NS(now3d, 0xAE, CPU_3DNow); }
- 'pfadd' { RET_INSN_NS(now3d, 0x9E, CPU_3DNow); }
- 'pfcmpeq' { RET_INSN_NS(now3d, 0xB0, CPU_3DNow); }
- 'pfcmpge' { RET_INSN_NS(now3d, 0x90, CPU_3DNow); }
- 'pfcmpgt' { RET_INSN_NS(now3d, 0xA0, CPU_3DNow); }
- 'pfmax' { RET_INSN_NS(now3d, 0xA4, CPU_3DNow); }
- 'pfmin' { RET_INSN_NS(now3d, 0x94, CPU_3DNow); }
- 'pfmul' { RET_INSN_NS(now3d, 0xB4, CPU_3DNow); }
- 'pfnacc' { RET_INSN_NS(now3d, 0x8A, CPU_Athlon|CPU_3DNow); }
- 'pfpnacc' { RET_INSN_NS(now3d, 0x8E, CPU_Athlon|CPU_3DNow); }
- 'pfrcp' { RET_INSN_NS(now3d, 0x96, CPU_3DNow); }
- 'pfrcpit1' { RET_INSN_NS(now3d, 0xA6, CPU_3DNow); }
- 'pfrcpit2' { RET_INSN_NS(now3d, 0xB6, CPU_3DNow); }
- 'pfrsqit1' { RET_INSN_NS(now3d, 0xA7, CPU_3DNow); }
- 'pfrsqrt' { RET_INSN_NS(now3d, 0x97, CPU_3DNow); }
- 'pfsub' { RET_INSN_NS(now3d, 0x9A, CPU_3DNow); }
- 'pfsubr' { RET_INSN_NS(now3d, 0xAA, CPU_3DNow); }
- 'pi2fd' { RET_INSN_NS(now3d, 0x0D, CPU_3DNow); }
- 'pi2fw' { RET_INSN_NS(now3d, 0x0C, CPU_Athlon|CPU_3DNow); }
- 'pmulhrwa' { RET_INSN_NS(now3d, 0xB7, CPU_3DNow); }
- 'pswapd' { RET_INSN_NS(now3d, 0xBB, CPU_Athlon|CPU_3DNow); }
- /* AMD extensions */
- 'syscall' { RET_INSN_NS(twobyte, 0x0F05, CPU_686|CPU_AMD); }
- 'sysret' [lLqQ]? { RET_INSN(6, twobyte, 0x0F07, CPU_686|CPU_AMD|CPU_Priv); }
- /* AMD x86-64 extensions */
- 'swapgs' {
- warn64 = 1;
- RET_INSN_NS(threebyte, 0x0F01F8, CPU_Hammer|CPU_64);
- }
- 'rdtscp' { RET_INSN_NS(threebyte, 0x0F01F9, CPU_686|CPU_AMD|CPU_Priv); }
- /* AMD Pacifica (SVM) instructions */
- 'clgi' { RET_INSN_NS(threebyte, 0x0F01DD, CPU_Hammer|CPU_64|CPU_SVM); }
- 'invlpga' { RET_INSN_NS(invlpga, 0, CPU_Hammer|CPU_64|CPU_SVM); }
- 'skinit' { RET_INSN_NS(skinit, 0, CPU_Hammer|CPU_64|CPU_SVM); }
- 'stgi' { RET_INSN_NS(threebyte, 0x0F01DC, CPU_Hammer|CPU_64|CPU_SVM); }
- 'vmload' { RET_INSN_NS(svm_rax, 0xDA, CPU_Hammer|CPU_64|CPU_SVM); }
- 'vmmcall' { RET_INSN_NS(threebyte, 0x0F01D9, CPU_Hammer|CPU_64|CPU_SVM); }
- 'vmrun' { RET_INSN_NS(svm_rax, 0xD8, CPU_Hammer|CPU_64|CPU_SVM); }
- 'vmsave' { RET_INSN_NS(svm_rax, 0xDB, CPU_Hammer|CPU_64|CPU_SVM); }
- /* VIA PadLock instructions */
- 'xstore' ('rng')? { RET_INSN_NS(padlock, 0xC000A7, CPU_PadLock); }
- 'xcryptecb' { RET_INSN_NS(padlock, 0xC8F3A7, CPU_PadLock); }
- 'xcryptcbc' { RET_INSN_NS(padlock, 0xD0F3A7, CPU_PadLock); }
- 'xcryptctr' { RET_INSN_NS(padlock, 0xD8F3A7, CPU_PadLock); }
- 'xcryptcfb' { RET_INSN_NS(padlock, 0xE0F3A7, CPU_PadLock); }
- 'xcryptofb' { RET_INSN_NS(padlock, 0xE8F3A7, CPU_PadLock); }
- 'montmul' { RET_INSN_NS(padlock, 0xC0F3A6, CPU_PadLock); }
- 'xsha1' { RET_INSN_NS(padlock, 0xC8F3A6, CPU_PadLock); }
- 'xsha256' { RET_INSN_NS(padlock, 0xD0F3A6, CPU_PadLock); }
- /* Cyrix MMX instructions */
- 'paddsiw' { RET_INSN_NS(cyrixmmx, 0x51, CPU_Cyrix|CPU_MMX); }
- 'paveb' { RET_INSN_NS(cyrixmmx, 0x50, CPU_Cyrix|CPU_MMX); }
- 'pdistib' { RET_INSN_NS(cyrixmmx, 0x54, CPU_Cyrix|CPU_MMX); }
- 'pmachriw' { RET_INSN_NS(pmachriw, 0, CPU_Cyrix|CPU_MMX); }
- 'pmagw' { RET_INSN_NS(cyrixmmx, 0x52, CPU_Cyrix|CPU_MMX); }
- 'pmulhriw' { RET_INSN_NS(cyrixmmx, 0x5D, CPU_Cyrix|CPU_MMX); }
- 'pmulhrwc' { RET_INSN_NS(cyrixmmx, 0x59, CPU_Cyrix|CPU_MMX); }
- 'pmvgezb' { RET_INSN_NS(cyrixmmx, 0x5C, CPU_Cyrix|CPU_MMX); }
- 'pmvlzb' { RET_INSN_NS(cyrixmmx, 0x5B, CPU_Cyrix|CPU_MMX); }
- 'pmvnzb' { RET_INSN_NS(cyrixmmx, 0x5A, CPU_Cyrix|CPU_MMX); }
- 'pmvzb' { RET_INSN_NS(cyrixmmx, 0x58, CPU_Cyrix|CPU_MMX); }
- 'psubsiw' { RET_INSN_NS(cyrixmmx, 0x55, CPU_Cyrix|CPU_MMX); }
- /* Cyrix extensions */
- 'rdshr' { RET_INSN_NS(twobyte, 0x0F36, CPU_686|CPU_Cyrix|CPU_SMM); }
- 'rsdc' { RET_INSN_NS(rsdc, 0, CPU_486|CPU_Cyrix|CPU_SMM); }
- 'rsldt' { RET_INSN_NS(cyrixsmm, 0x7B, CPU_486|CPU_Cyrix|CPU_SMM); }
- 'rsts' { RET_INSN_NS(cyrixsmm, 0x7D, CPU_486|CPU_Cyrix|CPU_SMM); }
- 'svdc' { RET_INSN_NS(svdc, 0, CPU_486|CPU_Cyrix|CPU_SMM); }
- 'svldt' { RET_INSN_NS(cyrixsmm, 0x7A, CPU_486|CPU_Cyrix|CPU_SMM); }
- 'svts' { RET_INSN_NS(cyrixsmm, 0x7C, CPU_486|CPU_Cyrix|CPU_SMM); }
- 'smint' { RET_INSN_NS(twobyte, 0x0F38, CPU_686|CPU_Cyrix); }
- 'smintold' { RET_INSN_NS(twobyte, 0x0F7E, CPU_486|CPU_Cyrix|CPU_Obs); }
- 'wrshr' { RET_INSN_NS(twobyte, 0x0F37, CPU_686|CPU_Cyrix|CPU_SMM); }
- /* Obsolete/undocumented instructions */
- 'fsetpm' { RET_INSN_NS(twobyte, 0xDBE4, CPU_286|CPU_FPU|CPU_Obs); }
- 'ibts' { RET_INSN_NS(ibts, 0, CPU_386|CPU_Undoc|CPU_Obs); }
- 'loadall' { RET_INSN_NS(twobyte, 0x0F07, CPU_386|CPU_Undoc); }
- 'loadall286' { RET_INSN_NS(twobyte, 0x0F05, CPU_286|CPU_Undoc); }
- 'salc' {
- not64 = 1;
- RET_INSN_NS(onebyte, 0x00D6, CPU_Undoc);
- }
- 'smi' { RET_INSN_NS(onebyte, 0x00F1, CPU_386|CPU_Undoc); }
- 'umov' { RET_INSN_NS(umov, 0, CPU_386|CPU_Undoc); }
- 'xbts' { RET_INSN_NS(xbts, 0, CPU_386|CPU_Undoc|CPU_Obs); }
-
-
- /* catchalls */
- [\001-\377]+ {
- return 0;
- }
- [\000] {
- return 0;
- }
- */
-done:
- if (suffix) {
- /* If not using the GAS parser, no instructions have suffixes. */
- if (arch_x86->parser != X86_PARSER_GAS)
- return 0;
-
- if (suffix_over == '\0')
- suffix_over = id[suffix_ofs];
- /* Match suffixes */
- switch (suffix_over) {
- case 'b':
- case 'B':
- data[3] |= (MOD_GasSufB >> MOD_GasSuf_SHIFT) << 8;
- break;
- case 'w':
- case 'W':
- data[3] |= (MOD_GasSufW >> MOD_GasSuf_SHIFT) << 8;
- break;
- case 'l':
- case 'L':
- data[3] |= (MOD_GasSufL >> MOD_GasSuf_SHIFT) << 8;
- break;
- case 'q':
- case 'Q':
- data[3] |= (MOD_GasSufQ >> MOD_GasSuf_SHIFT) << 8;
- break;
- case 's':
- case 'S':
- data[3] |= (MOD_GasSufS >> MOD_GasSuf_SHIFT) << 8;
- break;
- default:
- yasm_internal_error(N_("unrecognized suffix"));
- }
+ /*@null@*/ const regtmod_parse_data *pdata;
+ size_t i;
+ static char lcaseid[8];
+ unsigned int bits;
+ yasm_arch_regtmod type;
+
+ if (id_len > 7)
+ return YASM_ARCH_NOTREGTMOD;
+ for (i=0; i<id_len; i++)
+ lcaseid[i] = tolower(id[i]);
+ lcaseid[id_len] = '\0';
+
+ pdata = regtmod_find(lcaseid, id_len);
+ if (!pdata)
+ return YASM_ARCH_NOTREGTMOD;
+
+ type = (yasm_arch_regtmod)(pdata->regtmod >> 24);
+ bits = (pdata->regtmod >> 16) & 0xFF;
+
+ if (type == YASM_ARCH_REG && bits != 0 && arch_x86->mode_bits != bits) {
+ yasm_warn_set(YASM_WARN_GENERAL,
+ N_("`%s' is a register in %u-bit mode"), id, bits);
+ return YASM_ARCH_NOTREGTMOD;
}
- if (warn64 && arch_x86->mode_bits != 64) {
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("`%s' is an instruction in 64-bit mode"),
- oid);
- return 0;
- }
- if (not64 && arch_x86->mode_bits == 64) {
- yasm__error(line, N_("`%s' invalid in 64-bit mode"), oid);
- DEF_INSN_DATA(not64, 0, CPU_Not64);
- return 1;
+
+ if (type == YASM_ARCH_SEGREG && bits != 0 && arch_x86->mode_bits == bits) {
+ yasm_warn_set(YASM_WARN_GENERAL,
+ N_("`%s' segment register ignored in %u-bit mode"), id,
+ bits);
}
- return 1;
+
+ *data = pdata->regtmod & 0x0000FFFFUL;
+ return type;
}
+
diff --git a/modules/arch/x86/x86parse.gap b/modules/arch/x86/x86parse.gap
new file mode 100644
index 00000000..82f4d3bf
--- /dev/null
+++ b/modules/arch/x86/x86parse.gap
@@ -0,0 +1,1144 @@
+# GAP (gen_arch_parse) input file for x86 architecture
+# $Id$
+
+# Configure GAP for x86 generation mode
+ARCH x86
+
+# Supported x86 parsers
+PARSERS nasm gas
+
+# INSN parameters:
+# - parser (- if any)
+# - base name of instruction
+# - if string, each character is an allowed GAS suffix
+# if defined name, value is GAS suffix mode set (no character suffix reqd)
+# - instruction group (sans _insn suffix)
+# - modifiers (up to 3 bytes)
+# - CPU flags
+#
+# The string mode of the second parameter is a shortcut for GAS forms, e.g.:
+# INSN - mov "bwl" mov 0 CPU_Any
+# is equivalent to:
+# INSN - mov NONE mov 0 CPU_Any
+# INSN gas movb SUF_B mov 0 CPU_Any
+# INSN gas movw SUF_W mov 0 CPU_Any
+# INSN gas movl SUF_L mov 0 CPU_Any
+
+# Move
+INSN - mov "bwl" mov 0 CPU_Any
+INSN gas movabs "bwlq" movabs 0 CPU_Hammer|CPU_64
+
+# Move with sign/zero extend
+INSN gas movsbw SUF_B movszx 0xBE CPU_386
+INSN gas movsbl SUF_B movszx 0xBE CPU_386
+INSN gas movswl SUF_W movszx 0xBE CPU_386
+INSN gas movsbq SUF_B movszx 0xBE CPU_Hammer|CPU_64
+INSN gas movswq SUF_W movszx 0xBE CPU_Hammer|CPU_64
+INSN - movsx "bw" movszx 0xBE CPU_386
+INSN gas movslq SUF_L movsxd 0 CPU_Hammer|CPU_64
+INSN nasm movsxd NONE movsxd 0 CPU_Hammer|CPU_64
+INSN gas movzbw SUF_B movszx 0xB6 CPU_386
+INSN gas movzbl SUF_B movszx 0xB6 CPU_386
+INSN gas movzwl SUF_W movszx 0xB6 CPU_386
+INSN gas movzbq SUF_B movszx 0xB6 CPU_Hammer|CPU_64
+INSN gas movzwq SUF_W movszx 0xB6 CPU_Hammer|CPU_64
+INSN - movzx NONE movszx 0xB6 CPU_386
+
+# Push instructions
+INSN - push "wlq" push 0 CPU_Any
+INSN - pusha NONE onebyte 0x0060 CPU_186|CPU_Not64
+INSN nasm pushad NONE onebyte 0x2060 CPU_386|CPU_Not64
+INSN gas pushal NONE onebyte 0x2060 CPU_386|CPU_Not64
+INSN - pushaw NONE onebyte 0x1060 CPU_186|CPU_Not64
+
+# Pop instructions
+INSN - pop "wlq" pop 0 CPU_Any
+INSN - popa NONE onebyte 0x0061 CPU_186|CPU_Not64
+INSN nasm popad NONE onebyte 0x2061 CPU_386|CPU_Not64
+INSN gas popal NONE onebyte 0x2061 CPU_386|CPU_Not64
+INSN - popaw NONE onebyte 0x1061 CPU_186|CPU_Not64
+
+# Exchange
+INSN - xchg "bwlq" xchg 0 CPU_Any
+
+# In/out from ports
+INSN - in "bwl" in 0 CPU_Any
+INSN - out "bwl" out 0 CPU_Any
+# Load effective address
+INSN - lea "wlq" lea 0 CPU_Any
+# Load segment registers from memory
+INSN - lds "wl" ldes 0xC5 CPU_Not64
+INSN - les "wl" ldes 0xC4 CPU_Not64
+INSN - lfs "wl" lfgss 0xB4 CPU_386
+INSN - lgs "wl" lfgss 0xB5 CPU_386
+INSN - lss "wl" lfgss 0xB2 CPU_386
+# Flags register instructions
+INSN - clc NONE onebyte 0x00F8 CPU_Any
+INSN - cld NONE onebyte 0x00FC CPU_Any
+INSN - cli NONE onebyte 0x00FA CPU_Any
+INSN - clts NONE twobyte 0x0F06 CPU_286|CPU_Priv
+INSN - cmc NONE onebyte 0x00F5 CPU_Any
+INSN - lahf NONE onebyte 0x009F CPU_Any
+INSN - sahf NONE onebyte 0x009E CPU_Any
+INSN - pushf NONE onebyte 0x40009C CPU_Any
+INSN nasm pushfd NONE onebyte 0x00209C CPU_386|CPU_Not64
+INSN gas pushfl NONE onebyte 0x00209C CPU_386|CPU_Not64
+INSN - pushfw NONE onebyte 0x40109C CPU_Any
+INSN - pushfq NONE onebyte 0x40409C CPU_Hammer|CPU_64
+INSN - popf NONE onebyte 0x40009D CPU_Any
+INSN nasm popfd NONE onebyte 0x00209D CPU_386|CPU_Not64
+INSN gas popfl NONE onebyte 0x00209D CPU_386|CPU_Not64
+INSN - popfw NONE onebyte 0x40109D CPU_Any
+INSN - popfq NONE onebyte 0x40409D CPU_Hammer|CPU_64
+INSN - stc NONE onebyte 0x00F9 CPU_Any
+INSN - std NONE onebyte 0x00FD CPU_Any
+INSN - sti NONE onebyte 0x00FB CPU_Any
+# Arithmetic
+INSN - add "bwlq" arith 0x0000 CPU_Any
+INSN - inc "bwlq" incdec 0x0040 CPU_Any
+INSN - sub "bwlq" arith 0x0528 CPU_Any
+INSN - dec "bwlq" incdec 0x0148 CPU_Any
+INSN - sbb "bwlq" arith 0x0318 CPU_Any
+INSN - cmp "bwlq" arith 0x0738 CPU_Any
+INSN - test "bwlq" test 0 CPU_Any
+INSN - and "bwlq" arith 0x0420 CPU_Any
+INSN - or "bwlq" arith 0x0108 CPU_Any
+INSN - xor "bwlq" arith 0x0630 CPU_Any
+INSN - adc "bwlq" arith 0x0210 CPU_Any
+INSN - neg "bwlq" f6 0x03 CPU_Any
+INSN - not "bwlq" f6 0x02 CPU_Any
+INSN - aaa NONE onebyte 0x0037 CPU_Not64
+INSN - aas NONE onebyte 0x003F CPU_Not64
+INSN - daa NONE onebyte 0x0027 CPU_Not64
+INSN - das NONE onebyte 0x002F CPU_Not64
+INSN - aad NONE aadm 0x01 CPU_Not64
+INSN - aam NONE aadm 0x00 CPU_Not64
+# Conversion instructions
+INSN - cbw NONE onebyte 0x1098 CPU_Any
+INSN - cwde NONE onebyte 0x2098 CPU_386
+INSN - cdqe NONE onebyte 0x4098 CPU_Hammer|CPU_64
+INSN - cwd NONE onebyte 0x1099 CPU_Any
+INSN - cdq NONE onebyte 0x2099 CPU_386
+INSN - cqo NONE onebyte 0x4099 CPU_Hammer|CPU_64
+# Conversion instructions - GAS / AT&T naming
+INSN gas cbtw NONE onebyte 0x1098 CPU_Any
+INSN gas cwtl NONE onebyte 0x2098 CPU_386
+INSN gas cltq NONE onebyte 0x4098 CPU_Hammer|CPU_64
+INSN gas cwtd NONE onebyte 0x1099 CPU_Any
+INSN gas cltd NONE onebyte 0x2099 CPU_386
+INSN gas cqto NONE onebyte 0x4099 CPU_Hammer|CPU_64
+# Multiplication and division
+INSN - mul "bwlq" f6 0x04 CPU_Any
+INSN - imul "bwlq" imul 0 CPU_Any
+INSN - div "bwlq" div 0x06 CPU_Any
+INSN - idiv "bwlq" div 0x07 CPU_Any
+# Shifts
+INSN - rol "bwlq" shift 0x00 CPU_Any
+INSN - ror "bwlq" shift 0x01 CPU_Any
+INSN - rcl "bwlq" shift 0x02 CPU_Any
+INSN - rcr "bwlq" shift 0x03 CPU_Any
+INSN - sal "bwlq" shift 0x04 CPU_Any
+INSN - shl "bwlq" shift 0x04 CPU_Any
+INSN - shr "bwlq" shift 0x05 CPU_Any
+INSN - sar "bwlq" shift 0x07 CPU_Any
+INSN - shld "wlq" shlrd 0xA4 CPU_386
+INSN - shrd "wlq" shlrd 0xAC CPU_386
+# Control transfer instructions unconditional)
+INSN - call NONE call 0 CPU_Any
+INSN - jmp NONE jmp 0 CPU_Any
+INSN - ret NONE retnf 0x00C2 CPU_Any
+INSN gas retw NONE retnf 0x10C2 CPU_Any
+INSN gas retl NONE retnf 0x00C2 CPU_Not64
+INSN gas retq NONE retnf 0x00C2 CPU_Hammer|CPU_64
+INSN nasm retn NONE retnf 0x00C2 CPU_Any
+INSN nasm retf NONE retnf 0x40CA CPU_Any
+INSN gas lretw NONE retnf 0x10CA CPU_Any
+INSN gas lretl NONE retnf 0x00CA CPU_Any
+INSN gas lretq NONE retnf 0x40CA CPU_Hammer|CPU_64
+INSN - enter "wlq" enter 0 CPU_186
+INSN - leave NONE onebyte 0x4000C9 CPU_186
+INSN gas leavew NONE onebyte 0x0010C9 CPU_186
+INSN gas leavel NONE onebyte 0x4000C9 CPU_186
+INSN gas leaveq NONE onebyte 0x4000C9 CPU_Hammer|CPU_64
+# Conditional jumps
+INSN - jo NONE jcc 0x00 CPU_Any
+INSN - jno NONE jcc 0x01 CPU_Any
+INSN - jb NONE jcc 0x02 CPU_Any
+INSN - jc NONE jcc 0x02 CPU_Any
+INSN - jnae NONE jcc 0x02 CPU_Any
+INSN - jnb NONE jcc 0x03 CPU_Any
+INSN - jnc NONE jcc 0x03 CPU_Any
+INSN - jae NONE jcc 0x03 CPU_Any
+INSN - je NONE jcc 0x04 CPU_Any
+INSN - jz NONE jcc 0x04 CPU_Any
+INSN - jne NONE jcc 0x05 CPU_Any
+INSN - jnz NONE jcc 0x05 CPU_Any
+INSN - jbe NONE jcc 0x06 CPU_Any
+INSN - jna NONE jcc 0x06 CPU_Any
+INSN - jnbe NONE jcc 0x07 CPU_Any
+INSN - ja NONE jcc 0x07 CPU_Any
+INSN - js NONE jcc 0x08 CPU_Any
+INSN - jns NONE jcc 0x09 CPU_Any
+INSN - jp NONE jcc 0x0A CPU_Any
+INSN - jpe NONE jcc 0x0A CPU_Any
+INSN - jnp NONE jcc 0x0B CPU_Any
+INSN - jpo NONE jcc 0x0B CPU_Any
+INSN - jl NONE jcc 0x0C CPU_Any
+INSN - jnge NONE jcc 0x0C CPU_Any
+INSN - jnl NONE jcc 0x0D CPU_Any
+INSN - jge NONE jcc 0x0D CPU_Any
+INSN - jle NONE jcc 0x0E CPU_Any
+INSN - jng NONE jcc 0x0E CPU_Any
+INSN - jnle NONE jcc 0x0F CPU_Any
+INSN - jg NONE jcc 0x0F CPU_Any
+INSN - jcxz NONE jcxz 0x10 CPU_Any
+INSN - jecxz NONE jcxz 0x20 CPU_386
+INSN - jrcxz NONE jcxz 0x40 CPU_Hammer|CPU_64
+# Loop instructions
+INSN - loop NONE loop 0x02 CPU_Any
+INSN - loopz NONE loop 0x01 CPU_Any
+INSN - loope NONE loop 0x01 CPU_Any
+INSN - loopnz NONE loop 0x00 CPU_Any
+INSN - loopne NONE loop 0x00 CPU_Any
+# Set byte on flag instructions
+INSN - seto "b" setcc 0x00 CPU_386
+INSN - setno "b" setcc 0x01 CPU_386
+INSN - setb "b" setcc 0x02 CPU_386
+INSN - setc "b" setcc 0x02 CPU_386
+INSN - setnae "b" setcc 0x02 CPU_386
+INSN - setnb "b" setcc 0x03 CPU_386
+INSN - setnc "b" setcc 0x03 CPU_386
+INSN - setae "b" setcc 0x03 CPU_386
+INSN - sete "b" setcc 0x04 CPU_386
+INSN - setz "b" setcc 0x04 CPU_386
+INSN - setne "b" setcc 0x05 CPU_386
+INSN - setnz "b" setcc 0x05 CPU_386
+INSN - setbe "b" setcc 0x06 CPU_386
+INSN - setna "b" setcc 0x06 CPU_386
+INSN - setnbe "b" setcc 0x07 CPU_386
+INSN - seta "b" setcc 0x07 CPU_386
+INSN - sets "b" setcc 0x08 CPU_386
+INSN - setns "b" setcc 0x09 CPU_386
+INSN - setp "b" setcc 0x0A CPU_386
+INSN - setpe "b" setcc 0x0A CPU_386
+INSN - setnp "b" setcc 0x0B CPU_386
+INSN - setpo "b" setcc 0x0B CPU_386
+INSN - setl "b" setcc 0x0C CPU_386
+INSN - setnge "b" setcc 0x0C CPU_386
+INSN - setnl "b" setcc 0x0D CPU_386
+INSN - setge "b" setcc 0x0D CPU_386
+INSN - setle "b" setcc 0x0E CPU_386
+INSN - setng "b" setcc 0x0E CPU_386
+INSN - setnle "b" setcc 0x0F CPU_386
+INSN - setg "b" setcc 0x0F CPU_386
+# String instructions
+INSN - cmpsb NONE onebyte 0x00A6 CPU_Any
+INSN - cmpsw NONE onebyte 0x10A7 CPU_Any
+INSN - cmpsd NONE cmpsd 0 CPU_Any
+INSN gas cmpsl NONE onebyte 0x20A7 CPU_386
+INSN - cmpsq NONE onebyte 0x40A7 CPU_Hammer|CPU_64
+INSN - insb NONE onebyte 0x006C CPU_Any
+INSN - insw NONE onebyte 0x106D CPU_Any
+INSN nasm insd NONE onebyte 0x206D CPU_386
+INSN gas insl NONE onebyte 0x206D CPU_386
+INSN - outsb NONE onebyte 0x006E CPU_Any
+INSN - outsw NONE onebyte 0x106F CPU_Any
+INSN nasm outsd NONE onebyte 0x206F CPU_386
+INSN gas outsl NONE onebyte 0x206F CPU_386
+INSN - lodsb NONE onebyte 0x00AC CPU_Any
+INSN - lodsw NONE onebyte 0x10AD CPU_Any
+INSN nasm lodsd NONE onebyte 0x20AD CPU_386
+INSN gas lodsl NONE onebyte 0x20AD CPU_386
+INSN - lodsq NONE onebyte 0x40AD CPU_Hammer|CPU_64
+INSN - movsb NONE onebyte 0x00A4 CPU_Any
+INSN - movsw NONE onebyte 0x10A5 CPU_Any
+INSN - movsd NONE movsd 0 CPU_Any
+INSN gas movsl NONE onebyte 0x20A5 CPU_386
+INSN - movsq NONE onebyte 0x40A5 CPU_Hammer|CPU_64
+# smov alias for movs in GAS mode
+INSN gas smovb NONE onebyte 0x00A4 CPU_Any
+INSN gas smovw NONE onebyte 0x10A5 CPU_Any
+INSN gas smovl NONE onebyte 0x20A5 CPU_386
+INSN gas smovq NONE onebyte 0x40A5 CPU_Hammer|CPU_64
+INSN - scasb NONE onebyte 0x00AE CPU_Any
+INSN - scasw NONE onebyte 0x10AF CPU_Any
+INSN nasm scasd NONE onebyte 0x20AF CPU_386
+INSN gas scasl NONE onebyte 0x20AF CPU_386
+INSN - scasq NONE onebyte 0x40AF CPU_Hammer|CPU_64
+# ssca alias for scas in GAS mode
+INSN gas sscab NONE onebyte 0x00AE CPU_Any
+INSN gas sscaw NONE onebyte 0x10AF CPU_Any
+INSN gas sscal NONE onebyte 0x20AF CPU_386
+INSN gas sscaq NONE onebyte 0x40AF CPU_Hammer|CPU_64
+INSN - stosb NONE onebyte 0x00AA CPU_Any
+INSN - stosw NONE onebyte 0x10AB CPU_Any
+INSN nasm stosd NONE onebyte 0x20AB CPU_386
+INSN gas stosl NONE onebyte 0x20AB CPU_386
+INSN - stosq NONE onebyte 0x40AB CPU_Hammer|CPU_64
+INSN - xlatb NONE onebyte 0x00D7 CPU_Any
+# Bit manipulation
+INSN - bsf "wlq" bsfr 0xBC CPU_386
+INSN - bsr "wlq" bsfr 0xBD CPU_386
+INSN - bt "wlq" bittest 0x04A3 CPU_386
+INSN - btc "wlq" bittest 0x07BB CPU_386
+INSN - btr "wlq" bittest 0x06B3 CPU_386
+INSN - bts "wlq" bittest 0x05AB CPU_386
+# Interrupts and operating system instructions
+INSN - int NONE int 0 CPU_Any
+INSN - int3 NONE onebyte 0x00CC CPU_Any
+INSN nasm int03 NONE onebyte 0x00CC CPU_Any
+INSN - into NONE onebyte 0x00CE CPU_Not64
+INSN - iret NONE onebyte 0x00CF CPU_Any
+INSN - iretw NONE onebyte 0x10CF CPU_Any
+INSN nasm iretd NONE onebyte 0x20CF CPU_386
+INSN gas iretl NONE onebyte 0x20CF CPU_386
+INSN - iretq NONE onebyte 0x40CF CPU_Hammer|CPU_64
+INSN - rsm NONE twobyte 0x0FAA CPU_586|CPU_SMM
+INSN - bound "wl" bound 0 CPU_186|CPU_Not64
+INSN - hlt NONE onebyte 0x00F4 CPU_Priv
+INSN - nop NONE onebyte 0x0090 CPU_Any
+# Protection control
+INSN - arpl "w" arpl 0 CPU_286|CPU_Prot|CPU_Not64
+INSN - lar "wlq" bsfr 0x02 CPU_286|CPU_Prot
+INSN - lgdt "wlq" twobytemem 0x020F01 CPU_286|CPU_Priv
+INSN - lidt "wlq" twobytemem 0x030F01 CPU_286|CPU_Priv
+INSN - lldt "w" prot286 0x0200 CPU_286|CPU_Prot|CPU_Priv
+INSN - lmsw "w" prot286 0x0601 CPU_286|CPU_Priv
+INSN - lsl "wlq" bsfr 0x03 CPU_286|CPU_Prot
+INSN - ltr "w" prot286 0x0300 CPU_286|CPU_Prot|CPU_Priv
+INSN - sgdt "wlq" twobytemem 0x000F01 CPU_286|CPU_Priv
+INSN - sidt "wlq" twobytemem 0x010F01 CPU_286|CPU_Priv
+INSN - sldt "wlq" sldtmsw 0x0000 CPU_286
+INSN - smsw "wlq" sldtmsw 0x0401 CPU_286
+INSN - str "wlq" str 0 CPU_286|CPU_Prot
+INSN - verr "w" prot286 0x0400 CPU_286|CPU_Prot
+INSN - verw "w" prot286 0x0500 CPU_286|CPU_Prot
+# Floating point instructions
+INSN - fld "ls" fld 0 CPU_FPU
+INSN gas fldt WEAK fldstpt 0x05 CPU_FPU
+INSN - fild "lqs" fildstp 0x050200 CPU_FPU
+INSN gas fildll NONE fbldstp 0x05 CPU_FPU
+INSN - fbld NONE fbldstp 0x04 CPU_FPU
+INSN - fst "ls" fst 0 CPU_FPU
+INSN - fist "ls" fiarith 0x02DB CPU_FPU
+INSN - fstp "ls" fstp 0 CPU_FPU
+INSN gas fstpt WEAK fldstpt 0x07 CPU_FPU
+INSN - fistp "lqs" fildstp 0x070203 CPU_FPU
+INSN gas fistpll NONE fbldstp 0x07 CPU_FPU
+INSN - fbstp NONE fbldstp 0x06 CPU_FPU
+INSN - fxch NONE fxch 0 CPU_FPU
+INSN - fcom "ls" fcom 0x02D0 CPU_FPU
+INSN - ficom "ls" fiarith 0x02DA CPU_FPU
+INSN - fcomp "ls" fcom 0x03D8 CPU_FPU
+INSN - ficomp "ls" fiarith 0x03DA CPU_FPU
+INSN - fcompp NONE twobyte 0xDED9 CPU_FPU
+INSN - fucom NONE fcom2 0xDDE0 CPU_286|CPU_FPU
+INSN - fucomp NONE fcom2 0xDDE8 CPU_286|CPU_FPU
+INSN - fucompp NONE twobyte 0xDAE9 CPU_286|CPU_FPU
+INSN - ftst NONE twobyte 0xD9E4 CPU_FPU
+INSN - fxam NONE twobyte 0xD9E5 CPU_FPU
+INSN - fld1 NONE twobyte 0xD9E8 CPU_FPU
+INSN - fldl2t NONE twobyte 0xD9E9 CPU_FPU
+INSN - fldl2e NONE twobyte 0xD9EA CPU_FPU
+INSN - fldpi NONE twobyte 0xD9EB CPU_FPU
+INSN - fldlg2 NONE twobyte 0xD9EC CPU_FPU
+INSN - fldln2 NONE twobyte 0xD9ED CPU_FPU
+INSN - fldz NONE twobyte 0xD9EE CPU_FPU
+INSN - fadd "ls" farith 0x00C0C0 CPU_FPU
+INSN - faddp NONE farithp 0xC0 CPU_FPU
+INSN - fiadd "ls" fiarith 0x00DA CPU_FPU
+INSN - fsub "ls" farith 0x04E0E8 CPU_FPU
+INSN - fisub "ls" fiarith 0x04DA CPU_FPU
+INSN - fsubp NONE farithp 0xE8 CPU_FPU
+INSN - fsubr "ls" farith 0x05E8E0 CPU_FPU
+INSN - fisubr "ls" fiarith 0x05DA CPU_FPU
+INSN - fsubrp NONE farithp 0xE0 CPU_FPU
+INSN - fmul "ls" farith 0x01C8C8 CPU_FPU
+INSN - fimul "ls" fiarith 0x01DA CPU_FPU
+INSN - fmulp NONE farithp 0xC8 CPU_FPU
+INSN - fdiv "ls" farith 0x06F0F8 CPU_FPU
+INSN - fidiv "ls" fiarith 0x06DA CPU_FPU
+INSN - fdivp NONE farithp 0xF8 CPU_FPU
+INSN - fdivr "ls" farith 0x07F8F0 CPU_FPU
+INSN - fidivr "ls" fiarith 0x07DA CPU_FPU
+INSN - fdivrp NONE farithp 0xF0 CPU_FPU
+INSN - f2xm1 NONE twobyte 0xD9F0 CPU_FPU
+INSN - fyl2x NONE twobyte 0xD9F1 CPU_FPU
+INSN - fptan NONE twobyte 0xD9F2 CPU_FPU
+INSN - fpatan NONE twobyte 0xD9F3 CPU_FPU
+INSN - fxtract NONE twobyte 0xD9F4 CPU_FPU
+INSN - fprem1 NONE twobyte 0xD9F5 CPU_286|CPU_FPU
+INSN - fdecstp NONE twobyte 0xD9F6 CPU_FPU
+INSN - fincstp NONE twobyte 0xD9F7 CPU_FPU
+INSN - fprem NONE twobyte 0xD9F8 CPU_FPU
+INSN - fyl2xp1 NONE twobyte 0xD9F9 CPU_FPU
+INSN - fsqrt NONE twobyte 0xD9FA CPU_FPU
+INSN - fsincos NONE twobyte 0xD9FB CPU_286|CPU_FPU
+INSN - frndint NONE twobyte 0xD9FC CPU_FPU
+INSN - fscale NONE twobyte 0xD9FD CPU_FPU
+INSN - fsin NONE twobyte 0xD9FE CPU_286|CPU_FPU
+INSN - fcos NONE twobyte 0xD9FF CPU_286|CPU_FPU
+INSN - fchs NONE twobyte 0xD9E0 CPU_FPU
+INSN - fabs NONE twobyte 0xD9E1 CPU_FPU
+INSN - fninit NONE twobyte 0xDBE3 CPU_FPU
+INSN - finit NONE threebyte 0x9BDBE3 CPU_FPU
+INSN - fldcw "w" fldnstcw 0x05 CPU_FPU
+INSN - fnstcw "w" fldnstcw 0x07 CPU_FPU
+INSN - fstcw "w" fstcw 0 CPU_FPU
+INSN - fnstsw "w" fnstsw 0 CPU_FPU
+INSN - fstsw "w" fstsw 0 CPU_FPU
+INSN - fnclex NONE twobyte 0xDBE2 CPU_FPU
+INSN - fclex NONE threebyte 0x9BDBE2 CPU_FPU
+INSN - fnstenv "ls" onebytemem 0x06D9 CPU_FPU
+INSN - fstenv "ls" twobytemem 0x069BD9 CPU_FPU
+INSN - fldenv "ls" onebytemem 0x04D9 CPU_FPU
+INSN - fnsave "ls" onebytemem 0x06DD CPU_FPU
+INSN - fsave "ls" twobytemem 0x069BDD CPU_FPU
+INSN - frstor "ls" onebytemem 0x04DD CPU_FPU
+INSN - ffree NONE ffree 0xDD CPU_FPU
+INSN - ffreep NONE ffree 0xDF CPU_686|CPU_FPU|CPU_Undoc
+INSN - fnop NONE twobyte 0xD9D0 CPU_FPU
+INSN - fwait NONE onebyte 0x009B CPU_FPU
+# Prefixes should the others be here too? should wait be a prefix?
+INSN - wait NONE onebyte 0x009B CPU_Any
+# 486 extensions
+INSN - bswap "lq" bswap 0 CPU_486
+INSN - xadd "bwlq" cmpxchgxadd 0xC0 CPU_486
+INSN - cmpxchg "bwlq" cmpxchgxadd 0xB0 CPU_486
+INSN nasm cmpxchg486 NONE cmpxchgxadd 0xA6 CPU_486|CPU_Undoc
+INSN - invd NONE twobyte 0x0F08 CPU_486|CPU_Priv
+INSN - wbinvd NONE twobyte 0x0F09 CPU_486|CPU_Priv
+INSN - invlpg NONE twobytemem 0x070F01 CPU_486|CPU_Priv
+# 586+ and late 486 extensions
+INSN - cpuid NONE twobyte 0x0FA2 CPU_486
+# Pentium extensions
+INSN - wrmsr NONE twobyte 0x0F30 CPU_586|CPU_Priv
+INSN - rdtsc NONE twobyte 0x0F31 CPU_586
+INSN - rdmsr NONE twobyte 0x0F32 CPU_586|CPU_Priv
+INSN - cmpxchg8b "q" cmpxchg8b 0 CPU_586
+# Pentium II/Pentium Pro extensions
+INSN - sysenter NONE twobyte 0x0F34 CPU_686|CPU_Not64
+INSN - sysexit NONE twobyte 0x0F35 CPU_686|CPU_Priv|CPU_Not64
+INSN - fxsave "q" twobytemem 0x000FAE CPU_686|CPU_FPU
+INSN - fxrstor "q" twobytemem 0x010FAE CPU_686|CPU_FPU
+INSN - rdpmc NONE twobyte 0x0F33 CPU_686
+INSN - ud2 NONE twobyte 0x0F0B CPU_286
+INSN - ud1 NONE twobyte 0x0FB9 CPU_286|CPU_Undoc
+INSN - cmovo "wlq" cmovcc 0x00 CPU_686
+INSN - cmovno "wlq" cmovcc 0x01 CPU_686
+INSN - cmovb "wlq" cmovcc 0x02 CPU_686
+INSN - cmovc "wlq" cmovcc 0x02 CPU_686
+INSN - cmovnae "wlq" cmovcc 0x02 CPU_686
+INSN - cmovnb "wlq" cmovcc 0x03 CPU_686
+INSN - cmovnc "wlq" cmovcc 0x03 CPU_686
+INSN - cmovae "wlq" cmovcc 0x03 CPU_686
+INSN - cmove "wlq" cmovcc 0x04 CPU_686
+INSN - cmovz "wlq" cmovcc 0x04 CPU_686
+INSN - cmovne "wlq" cmovcc 0x05 CPU_686
+INSN - cmovnz "wlq" cmovcc 0x05 CPU_686
+INSN - cmovbe "wlq" cmovcc 0x06 CPU_686
+INSN - cmovna "wlq" cmovcc 0x06 CPU_686
+INSN - cmovnbe "wlq" cmovcc 0x07 CPU_686
+INSN - cmova "wlq" cmovcc 0x07 CPU_686
+INSN - cmovs "wlq" cmovcc 0x08 CPU_686
+INSN - cmovns "wlq" cmovcc 0x09 CPU_686
+INSN - cmovp "wlq" cmovcc 0x0A CPU_686
+INSN - cmovpe "wlq" cmovcc 0x0A CPU_686
+INSN - cmovnp "wlq" cmovcc 0x0B CPU_686
+INSN - cmovpo "wlq" cmovcc 0x0B CPU_686
+INSN - cmovl "wlq" cmovcc 0x0C CPU_686
+INSN - cmovnge "wlq" cmovcc 0x0C CPU_686
+INSN - cmovnl "wlq" cmovcc 0x0D CPU_686
+INSN - cmovge "wlq" cmovcc 0x0D CPU_686
+INSN - cmovle "wlq" cmovcc 0x0E CPU_686
+INSN - cmovng "wlq" cmovcc 0x0E CPU_686
+INSN - cmovnle "wlq" cmovcc 0x0F CPU_686
+INSN - cmovg "wlq" cmovcc 0x0F CPU_686
+INSN - fcmovb NONE fcmovcc 0xDAC0 CPU_686|CPU_FPU
+INSN - fcmove NONE fcmovcc 0xDAC8 CPU_686|CPU_FPU
+INSN - fcmovbe NONE fcmovcc 0xDAD0 CPU_686|CPU_FPU
+INSN - fcmovu NONE fcmovcc 0xDAD8 CPU_686|CPU_FPU
+INSN - fcmovnb NONE fcmovcc 0xDBC0 CPU_686|CPU_FPU
+INSN - fcmovne NONE fcmovcc 0xDBC8 CPU_686|CPU_FPU
+INSN - fcmovnbe NONE fcmovcc 0xDBD0 CPU_686|CPU_FPU
+INSN - fcmovnu NONE fcmovcc 0xDBD8 CPU_686|CPU_FPU
+INSN - fcomi NONE fcom2 0xDBF0 CPU_686|CPU_FPU
+INSN - fucomi NONE fcom2 0xDBE8 CPU_686|CPU_FPU
+INSN - fcomip NONE fcom2 0xDFF0 CPU_686|CPU_FPU
+INSN - fucomip NONE fcom2 0xDFE8 CPU_686|CPU_FPU
+# Pentium4 extensions
+INSN - movnti "lq" movnti 0 CPU_P4
+INSN - clflush NONE clflush 0 CPU_P3
+INSN - lfence NONE threebyte 0x0FAEE8 CPU_P3
+INSN - mfence NONE threebyte 0x0FAEF0 CPU_P3
+INSN - pause NONE onebyte_prefix 0xF390 CPU_P4
+# MMX/SSE2 instructions
+INSN - emms NONE twobyte 0x0F77 CPU_MMX
+INSN - movd NONE movd 0 CPU_MMX
+# For GAS movq must use standard mov instruction.
+# For NASM it can use a dedicated instruction.
+INSN gas movq SUF_Q mov 0 CPU_Any
+INSN nasm movq NONE movq 0 CPU_MMX
+INSN - packssdw NONE mmxsse2 0x6B CPU_MMX
+INSN - packsswb NONE mmxsse2 0x63 CPU_MMX
+INSN - packuswb NONE mmxsse2 0x67 CPU_MMX
+INSN - paddb NONE mmxsse2 0xFC CPU_MMX
+INSN - paddw NONE mmxsse2 0xFD CPU_MMX
+INSN - paddd NONE mmxsse2 0xFE CPU_MMX
+INSN - paddq NONE mmxsse2 0xD4 CPU_MMX
+INSN - paddsb NONE mmxsse2 0xEC CPU_MMX
+INSN - paddsw NONE mmxsse2 0xED CPU_MMX
+INSN - paddusb NONE mmxsse2 0xDC CPU_MMX
+INSN - paddusw NONE mmxsse2 0xDD CPU_MMX
+INSN - pand NONE mmxsse2 0xDB CPU_MMX
+INSN - pandn NONE mmxsse2 0xDF CPU_MMX
+INSN - pcmpeqb NONE mmxsse2 0x74 CPU_MMX
+INSN - pcmpeqw NONE mmxsse2 0x75 CPU_MMX
+INSN - pcmpeqd NONE mmxsse2 0x76 CPU_MMX
+INSN - pcmpgtb NONE mmxsse2 0x64 CPU_MMX
+INSN - pcmpgtw NONE mmxsse2 0x65 CPU_MMX
+INSN - pcmpgtd NONE mmxsse2 0x66 CPU_MMX
+INSN - pmaddwd NONE mmxsse2 0xF5 CPU_MMX
+INSN - pmulhw NONE mmxsse2 0xE5 CPU_MMX
+INSN - pmullw NONE mmxsse2 0xD5 CPU_MMX
+INSN - por NONE mmxsse2 0xEB CPU_MMX
+INSN - psllw NONE pshift 0x0671F1 CPU_MMX
+INSN - pslld NONE pshift 0x0672F2 CPU_MMX
+INSN - psllq NONE pshift 0x0673F3 CPU_MMX
+INSN - psraw NONE pshift 0x0471E1 CPU_MMX
+INSN - psrad NONE pshift 0x0472E2 CPU_MMX
+INSN - psrlw NONE pshift 0x0271D1 CPU_MMX
+INSN - psrld NONE pshift 0x0272D2 CPU_MMX
+INSN - psrlq NONE pshift 0x0273D3 CPU_MMX
+INSN - psubb NONE mmxsse2 0xF8 CPU_MMX
+INSN - psubw NONE mmxsse2 0xF9 CPU_MMX
+INSN - psubd NONE mmxsse2 0xFA CPU_MMX
+INSN - psubq NONE mmxsse2 0xFB CPU_MMX
+INSN - psubsb NONE mmxsse2 0xE8 CPU_MMX
+INSN - psubsw NONE mmxsse2 0xE9 CPU_MMX
+INSN - psubusb NONE mmxsse2 0xD8 CPU_MMX
+INSN - psubusw NONE mmxsse2 0xD9 CPU_MMX
+INSN - punpckhbw NONE mmxsse2 0x68 CPU_MMX
+INSN - punpckhwd NONE mmxsse2 0x69 CPU_MMX
+INSN - punpckhdq NONE mmxsse2 0x6A CPU_MMX
+INSN - punpcklbw NONE mmxsse2 0x60 CPU_MMX
+INSN - punpcklwd NONE mmxsse2 0x61 CPU_MMX
+INSN - punpckldq NONE mmxsse2 0x62 CPU_MMX
+INSN - pxor NONE mmxsse2 0xEF CPU_MMX
+# PIII Katmai new instructions / SIMD instructions
+INSN - addps NONE sseps 0x58 CPU_SSE
+INSN - addss NONE ssess 0xF358 CPU_SSE
+INSN - andnps NONE sseps 0x55 CPU_SSE
+INSN - andps NONE sseps 0x54 CPU_SSE
+INSN - cmpeqps NONE ssecmpps 0x00 CPU_SSE
+INSN - cmpeqss NONE ssecmpss 0x00F3 CPU_SSE
+INSN - cmpleps NONE ssecmpps 0x02 CPU_SSE
+INSN - cmpless NONE ssecmpss 0x02F3 CPU_SSE
+INSN - cmpltps NONE ssecmpps 0x01 CPU_SSE
+INSN - cmpltss NONE ssecmpss 0x01F3 CPU_SSE
+INSN - cmpneqps NONE ssecmpps 0x04 CPU_SSE
+INSN - cmpneqss NONE ssecmpss 0x04F3 CPU_SSE
+INSN - cmpnleps NONE ssecmpps 0x06 CPU_SSE
+INSN - cmpnless NONE ssecmpss 0x06F3 CPU_SSE
+INSN - cmpnltps NONE ssecmpps 0x05 CPU_SSE
+INSN - cmpnltss NONE ssecmpss 0x05F3 CPU_SSE
+INSN - cmpordps NONE ssecmpps 0x07 CPU_SSE
+INSN - cmpordss NONE ssecmpss 0x07F3 CPU_SSE
+INSN - cmpunordps NONE ssecmpps 0x03 CPU_SSE
+INSN - cmpunordss NONE ssecmpss 0x03F3 CPU_SSE
+INSN - cmpps NONE ssepsimm 0xC2 CPU_SSE
+INSN - cmpss NONE ssessimm 0xF3C2 CPU_SSE
+INSN - comiss NONE sseps 0x2F CPU_SSE
+INSN - cvtpi2ps NONE cvt_xmm_mm_ps 0x2A CPU_SSE
+INSN - cvtps2pi NONE cvt_mm_xmm64 0x2D CPU_SSE
+INSN - cvtsi2ss "lq" cvt_xmm_rmx 0xF32A CPU_SSE
+INSN - cvtss2si "lq" cvt_rx_xmm32 0xF32D CPU_SSE
+INSN - cvttps2pi NONE cvt_mm_xmm64 0x2C CPU_SSE
+INSN - cvttss2si "lq" cvt_rx_xmm32 0xF32C CPU_SSE
+INSN - divps NONE sseps 0x5E CPU_SSE
+INSN - divss NONE ssess 0xF35E CPU_SSE
+INSN - ldmxcsr NONE ldstmxcsr 0x02 CPU_SSE
+INSN - maskmovq NONE maskmovq 0 CPU_P3|CPU_MMX
+INSN - maxps NONE sseps 0x5F CPU_SSE
+INSN - maxss NONE ssess 0xF35F CPU_SSE
+INSN - minps NONE sseps 0x5D CPU_SSE
+INSN - minss NONE ssess 0xF35D CPU_SSE
+INSN - movaps NONE movaups 0x28 CPU_SSE
+INSN - movhlps NONE movhllhps 0x12 CPU_SSE
+INSN - movhps NONE movhlps 0x16 CPU_SSE
+INSN - movlhps NONE movhllhps 0x16 CPU_SSE
+INSN - movlps NONE movhlps 0x12 CPU_SSE
+INSN - movmskps "lq" movmskps 0 CPU_SSE
+INSN - movntps NONE movntps 0 CPU_SSE
+INSN - movntq NONE movntq 0 CPU_SSE
+INSN - movss NONE movss 0 CPU_SSE
+INSN - movups NONE movaups 0x10 CPU_SSE
+INSN - mulps NONE sseps 0x59 CPU_SSE
+INSN - mulss NONE ssess 0xF359 CPU_SSE
+INSN - orps NONE sseps 0x56 CPU_SSE
+INSN - pavgb NONE mmxsse2 0xE0 CPU_P3|CPU_MMX
+INSN - pavgw NONE mmxsse2 0xE3 CPU_P3|CPU_MMX
+INSN - pextrw "lq" pextrw 0 CPU_P3|CPU_MMX
+INSN - pinsrw "lq" pinsrw 0 CPU_P3|CPU_MMX
+INSN - pmaxsw NONE mmxsse2 0xEE CPU_P3|CPU_MMX
+INSN - pmaxub NONE mmxsse2 0xDE CPU_P3|CPU_MMX
+INSN - pminsw NONE mmxsse2 0xEA CPU_P3|CPU_MMX
+INSN - pminub NONE mmxsse2 0xDA CPU_P3|CPU_MMX
+INSN - pmovmskb "lq" pmovmskb 0 CPU_SSE
+INSN - pmulhuw NONE mmxsse2 0xE4 CPU_P3|CPU_MMX
+INSN - prefetchnta NONE twobytemem 0x000F18 CPU_P3
+INSN - prefetcht0 NONE twobytemem 0x010F18 CPU_P3
+INSN - prefetcht1 NONE twobytemem 0x020F18 CPU_P3
+INSN - prefetcht2 NONE twobytemem 0x030F18 CPU_P3
+INSN - psadbw NONE mmxsse2 0xF6 CPU_P3|CPU_MMX
+INSN - pshufw NONE pshufw 0 CPU_P3|CPU_MMX
+INSN - rcpps NONE sseps 0x53 CPU_SSE
+INSN - rcpss NONE ssess 0xF353 CPU_SSE
+INSN - rsqrtps NONE sseps 0x52 CPU_SSE
+INSN - rsqrtss NONE ssess 0xF352 CPU_SSE
+INSN - sfence NONE threebyte 0x0FAEF8 CPU_P3
+INSN - shufps NONE ssepsimm 0xC6 CPU_SSE
+INSN - sqrtps NONE sseps 0x51 CPU_SSE
+INSN - sqrtss NONE ssess 0xF351 CPU_SSE
+INSN - stmxcsr NONE ldstmxcsr 0x03 CPU_SSE
+INSN - subps NONE sseps 0x5C CPU_SSE
+INSN - subss NONE ssess 0xF35C CPU_SSE
+INSN - ucomiss NONE ssess 0x2E CPU_SSE
+INSN - unpckhps NONE sseps 0x15 CPU_SSE
+INSN - unpcklps NONE sseps 0x14 CPU_SSE
+INSN - xorps NONE sseps 0x57 CPU_SSE
+# SSE2 instructions
+INSN - addpd NONE ssess 0x6658 CPU_SSE2
+INSN - addsd NONE ssess 0xF258 CPU_SSE2
+INSN - andnpd NONE ssess 0x6655 CPU_SSE2
+INSN - andpd NONE ssess 0x6654 CPU_SSE2
+INSN - cmpeqpd NONE ssecmpss 0x0066 CPU_SSE2
+INSN - cmpeqsd NONE ssecmpss 0x00F2 CPU_SSE2
+INSN - cmplepd NONE ssecmpss 0x0266 CPU_SSE2
+INSN - cmplesd NONE ssecmpss 0x02F2 CPU_SSE2
+INSN - cmpltpd NONE ssecmpss 0x0166 CPU_SSE2
+INSN - cmpltsd NONE ssecmpss 0x01F2 CPU_SSE2
+INSN - cmpneqpd NONE ssecmpss 0x0466 CPU_SSE2
+INSN - cmpneqsd NONE ssecmpss 0x04F2 CPU_SSE2
+INSN - cmpnlepd NONE ssecmpss 0x0666 CPU_SSE2
+INSN - cmpnlesd NONE ssecmpss 0x06F2 CPU_SSE2
+INSN - cmpnltpd NONE ssecmpss 0x0566 CPU_SSE2
+INSN - cmpnltsd NONE ssecmpss 0x05F2 CPU_SSE2
+INSN - cmpordpd NONE ssecmpss 0x0766 CPU_SSE2
+INSN - cmpordsd NONE ssecmpss 0x07F2 CPU_SSE2
+INSN - cmpunordpd NONE ssecmpss 0x0366 CPU_SSE2
+INSN - cmpunordsd NONE ssecmpss 0x03F2 CPU_SSE2
+INSN - cmppd NONE ssessimm 0x66C2 CPU_SSE2
+# cmpsd is in string instructions above
+INSN - comisd NONE ssess 0x662F CPU_SSE2
+INSN - cvtpi2pd NONE cvt_xmm_mm_ss 0x662A CPU_SSE2
+INSN - cvtsi2sd "lq" cvt_xmm_rmx 0xF22A CPU_SSE2
+INSN - divpd NONE ssess 0x665E CPU_SSE2
+INSN - divsd NONE ssess 0xF25E CPU_SSE2
+INSN - maxpd NONE ssess 0x665F CPU_SSE2
+INSN - maxsd NONE ssess 0xF25F CPU_SSE2
+INSN - minpd NONE ssess 0x665D CPU_SSE2
+INSN - minsd NONE ssess 0xF25D CPU_SSE2
+INSN - movapd NONE movaupd 0x28 CPU_SSE2
+INSN - movhpd NONE movhlpd 0x16 CPU_SSE2
+INSN - movlpd NONE movhlpd 0x12 CPU_SSE2
+INSN - movmskpd "lq" movmskpd 0 CPU_SSE2
+INSN - movntpd NONE movntpddq 0x2B CPU_SSE2
+INSN - movntdq NONE movntpddq 0xE7 CPU_SSE2
+# movsd is in string instructions above
+INSN - movupd NONE movaupd 0x10 CPU_SSE2
+INSN - mulpd NONE ssess 0x6659 CPU_SSE2
+INSN - mulsd NONE ssess 0xF259 CPU_SSE2
+INSN - orpd NONE ssess 0x6656 CPU_SSE2
+INSN - shufpd NONE ssessimm 0x66C6 CPU_SSE2
+INSN - sqrtpd NONE ssess 0x6651 CPU_SSE2
+INSN - sqrtsd NONE ssess 0xF251 CPU_SSE2
+INSN - subpd NONE ssess 0x665C CPU_SSE2
+INSN - subsd NONE ssess 0xF25C CPU_SSE2
+INSN - ucomisd NONE ssess 0x662E CPU_SSE2
+INSN - unpckhpd NONE ssess 0x6615 CPU_SSE2
+INSN - unpcklpd NONE ssess 0x6614 CPU_SSE2
+INSN - xorpd NONE ssess 0x6657 CPU_SSE2
+INSN - cvtdq2pd NONE cvt_xmm_xmm64_ss 0xF3E6 CPU_SSE2
+INSN - cvtpd2dq NONE ssess 0xF2E6 CPU_SSE2
+INSN - cvtdq2ps NONE sseps 0x5B CPU_SSE2
+INSN - cvtpd2pi NONE cvt_mm_xmm 0x662D CPU_SSE2
+INSN - cvtpd2ps NONE ssess 0x665A CPU_SSE2
+INSN - cvtps2pd NONE cvt_xmm_xmm64_ps 0x5A CPU_SSE2
+INSN - cvtps2dq NONE ssess 0x665B CPU_SSE2
+INSN - cvtsd2si "lq" cvt_rx_xmm64 0xF22D CPU_SSE2
+INSN - cvtsd2ss NONE cvt_xmm_xmm64_ss 0xF25A CPU_SSE2
+# P4 VMX Instructions
+INSN - vmcall NONE threebyte 0x0F01C1 CPU_P4
+INSN - vmlaunch NONE threebyte 0x0F01C2 CPU_P4
+INSN - vmresume NONE threebyte 0x0F01C3 CPU_P4
+INSN - vmxoff NONE threebyte 0x0F01C4 CPU_P4
+INSN - vmread "lq" vmxmemrd 0x0F78 CPU_P4
+INSN - vmwrite "lq" vmxmemwr 0x0F79 CPU_P4
+INSN - vmptrld NONE vmxtwobytemem 0x06C7 CPU_P4
+INSN - vmptrst NONE vmxtwobytemem 0x07C7 CPU_P4
+INSN - vmclear NONE vmxthreebytemem 0x0666C7 CPU_P4
+INSN - vmxon NONE vmxthreebytemem 0x06F3C7 CPU_P4
+INSN - cvtss2sd NONE cvt_xmm_xmm32 0xF35A CPU_SSE2
+INSN - cvttpd2pi NONE cvt_mm_xmm 0x662C CPU_SSE2
+INSN - cvttsd2si "lq" cvt_rx_xmm64 0xF22C CPU_SSE2
+INSN - cvttpd2dq NONE ssess 0x66E6 CPU_SSE2
+INSN - cvttps2dq NONE ssess 0xF35B CPU_SSE2
+INSN - maskmovdqu NONE maskmovdqu 0 CPU_SSE2
+INSN - movdqa NONE movdqau 0x66 CPU_SSE2
+INSN - movdqu NONE movdqau 0xF3 CPU_SSE2
+INSN - movdq2q NONE movdq2q 0 CPU_SSE2
+INSN - movq2dq NONE movq2dq 0 CPU_SSE2
+INSN - pmuludq NONE mmxsse2 0xF4 CPU_SSE2
+INSN - pshufd NONE ssessimm 0x6670 CPU_SSE2
+INSN - pshufhw NONE ssessimm 0xF370 CPU_SSE2
+INSN - pshuflw NONE ssessimm 0xF270 CPU_SSE2
+INSN - pslldq NONE pslrldq 0x07 CPU_SSE2
+INSN - psrldq NONE pslrldq 0x03 CPU_SSE2
+INSN - punpckhqdq NONE ssess 0x666D CPU_SSE2
+INSN - punpcklqdq NONE ssess 0x666C CPU_SSE2
+# SSE3 / PNI Prescott New Instructions instructions
+INSN - addsubpd NONE ssess 0x66D0 CPU_SSE3
+INSN - addsubps NONE ssess 0xF2D0 CPU_SSE3
+INSN - fisttp "lqs" fildstp 0x010001 CPU_SSE3
+INSN gas fisttpll SUF_Q fildstp 0x07 CPU_FPU
+INSN - haddpd NONE ssess 0x667C CPU_SSE3
+INSN - haddps NONE ssess 0xF27C CPU_SSE3
+INSN - hsubpd NONE ssess 0x667D CPU_SSE3
+INSN - hsubps NONE ssess 0xF27D CPU_SSE3
+INSN - lddqu NONE lddqu 0 CPU_SSE3
+INSN - monitor NONE threebyte 0x0F01C8 CPU_SSE3
+INSN - movddup NONE cvt_xmm_xmm64_ss 0xF212 CPU_SSE3
+INSN - movshdup NONE ssess 0xF316 CPU_SSE3
+INSN - movsldup NONE ssess 0xF312 CPU_SSE3
+INSN - mwait NONE threebyte 0x0F01C9 CPU_SSE3
+# AMD 3DNow! instructions
+INSN - prefetch NONE twobytemem 0x000F0D CPU_3DNow
+INSN - prefetchw NONE twobytemem 0x010F0D CPU_3DNow
+INSN - femms NONE twobyte 0x0F0E CPU_3DNow
+INSN - pavgusb NONE now3d 0xBF CPU_3DNow
+INSN - pf2id NONE now3d 0x1D CPU_3DNow
+INSN - pf2iw NONE now3d 0x1C CPU_Athlon|CPU_3DNow
+INSN - pfacc NONE now3d 0xAE CPU_3DNow
+INSN - pfadd NONE now3d 0x9E CPU_3DNow
+INSN - pfcmpeq NONE now3d 0xB0 CPU_3DNow
+INSN - pfcmpge NONE now3d 0x90 CPU_3DNow
+INSN - pfcmpgt NONE now3d 0xA0 CPU_3DNow
+INSN - pfmax NONE now3d 0xA4 CPU_3DNow
+INSN - pfmin NONE now3d 0x94 CPU_3DNow
+INSN - pfmul NONE now3d 0xB4 CPU_3DNow
+INSN - pfnacc NONE now3d 0x8A CPU_Athlon|CPU_3DNow
+INSN - pfpnacc NONE now3d 0x8E CPU_Athlon|CPU_3DNow
+INSN - pfrcp NONE now3d 0x96 CPU_3DNow
+INSN - pfrcpit1 NONE now3d 0xA6 CPU_3DNow
+INSN - pfrcpit2 NONE now3d 0xB6 CPU_3DNow
+INSN - pfrsqit1 NONE now3d 0xA7 CPU_3DNow
+INSN - pfrsqrt NONE now3d 0x97 CPU_3DNow
+INSN - pfsub NONE now3d 0x9A CPU_3DNow
+INSN - pfsubr NONE now3d 0xAA CPU_3DNow
+INSN - pi2fd NONE now3d 0x0D CPU_3DNow
+INSN - pi2fw NONE now3d 0x0C CPU_Athlon|CPU_3DNow
+INSN - pmulhrwa NONE now3d 0xB7 CPU_3DNow
+INSN - pswapd NONE now3d 0xBB CPU_Athlon|CPU_3DNow
+# AMD extensions
+INSN - syscall NONE twobyte 0x0F05 CPU_686|CPU_AMD
+INSN - sysret "lq" twobyte 0x0F07 CPU_686|CPU_AMD|CPU_Priv
+# AMD x86-64 extensions
+INSN - swapgs NONE threebyte 0x0F01F8 CPU_Hammer|CPU_64
+INSN - rdtscp NONE threebyte 0x0F01F9 CPU_686|CPU_AMD|CPU_Priv
+# AMD Pacifica SVM instructions
+INSN - clgi NONE threebyte 0x0F01DD CPU_Hammer|CPU_64|CPU_SVM
+INSN - invlpga NONE invlpga 0 CPU_Hammer|CPU_64|CPU_SVM
+INSN - skinit NONE skinit 0 CPU_Hammer|CPU_64|CPU_SVM
+INSN - stgi NONE threebyte 0x0F01DC CPU_Hammer|CPU_64|CPU_SVM
+INSN - vmload NONE svm_rax 0xDA CPU_Hammer|CPU_64|CPU_SVM
+INSN - vmmcall NONE threebyte 0x0F01D9 CPU_Hammer|CPU_64|CPU_SVM
+INSN - vmrun NONE svm_rax 0xD8 CPU_Hammer|CPU_64|CPU_SVM
+INSN - vmsave NONE svm_rax 0xDB CPU_Hammer|CPU_64|CPU_SVM
+# VIA PadLock instructions
+INSN - xstore NONE padlock 0xC000A7 CPU_PadLock
+INSN - xstorerng NONE padlock 0xC000A7 CPU_PadLock
+INSN - xcryptecb NONE padlock 0xC8F3A7 CPU_PadLock
+INSN - xcryptcbc NONE padlock 0xD0F3A7 CPU_PadLock
+INSN - xcryptctr NONE padlock 0xD8F3A7 CPU_PadLock
+INSN - xcryptcfb NONE padlock 0xE0F3A7 CPU_PadLock
+INSN - xcryptofb NONE padlock 0xE8F3A7 CPU_PadLock
+INSN - montmul NONE padlock 0xC0F3A6 CPU_PadLock
+INSN - xsha1 NONE padlock 0xC8F3A6 CPU_PadLock
+INSN - xsha256 NONE padlock 0xD0F3A6 CPU_PadLock
+# Cyrix MMX instructions
+INSN - paddsiw NONE cyrixmmx 0x51 CPU_Cyrix|CPU_MMX
+INSN - paveb NONE cyrixmmx 0x50 CPU_Cyrix|CPU_MMX
+INSN - pdistib NONE cyrixmmx 0x54 CPU_Cyrix|CPU_MMX
+INSN - pmachriw NONE pmachriw 0 CPU_Cyrix|CPU_MMX
+INSN - pmagw NONE cyrixmmx 0x52 CPU_Cyrix|CPU_MMX
+INSN - pmulhriw NONE cyrixmmx 0x5D CPU_Cyrix|CPU_MMX
+INSN - pmulhrwc NONE cyrixmmx 0x59 CPU_Cyrix|CPU_MMX
+INSN - pmvgezb NONE cyrixmmx 0x5C CPU_Cyrix|CPU_MMX
+INSN - pmvlzb NONE cyrixmmx 0x5B CPU_Cyrix|CPU_MMX
+INSN - pmvnzb NONE cyrixmmx 0x5A CPU_Cyrix|CPU_MMX
+INSN - pmvzb NONE cyrixmmx 0x58 CPU_Cyrix|CPU_MMX
+INSN - psubsiw NONE cyrixmmx 0x55 CPU_Cyrix|CPU_MMX
+# Cyrix extensions
+INSN - rdshr NONE twobyte 0x0F36 CPU_686|CPU_Cyrix|CPU_SMM
+INSN - rsdc NONE rsdc 0 CPU_486|CPU_Cyrix|CPU_SMM
+INSN - rsldt NONE cyrixsmm 0x7B CPU_486|CPU_Cyrix|CPU_SMM
+INSN - rsts NONE cyrixsmm 0x7D CPU_486|CPU_Cyrix|CPU_SMM
+INSN - svdc NONE svdc 0 CPU_486|CPU_Cyrix|CPU_SMM
+INSN - svldt NONE cyrixsmm 0x7A CPU_486|CPU_Cyrix|CPU_SMM
+INSN - svts NONE cyrixsmm 0x7C CPU_486|CPU_Cyrix|CPU_SMM
+INSN - smint NONE twobyte 0x0F38 CPU_686|CPU_Cyrix
+INSN - smintold NONE twobyte 0x0F7E CPU_486|CPU_Cyrix|CPU_Obs
+INSN - wrshr NONE twobyte 0x0F37 CPU_686|CPU_Cyrix|CPU_SMM
+# Obsolete/undocumented instructions
+INSN - fsetpm NONE twobyte 0xDBE4 CPU_286|CPU_FPU|CPU_Obs
+INSN - ibts NONE ibts 0 CPU_386|CPU_Undoc|CPU_Obs
+INSN - loadall NONE twobyte 0x0F07 CPU_386|CPU_Undoc
+INSN - loadall286 NONE twobyte 0x0F05 CPU_286|CPU_Undoc
+INSN - salc NONE onebyte 0x00D6 CPU_Undoc|CPU_Not64
+INSN - smi NONE onebyte 0x00F1 CPU_386|CPU_Undoc
+INSN - umov NONE umov 0 CPU_386|CPU_Undoc
+INSN - xbts NONE xbts 0 CPU_386|CPU_Undoc|CPU_Obs
+
+
+# DEF_CPU parameters:
+# - CPU name
+# - CPU flags to set
+# DEF_CPU_ALIAS parameters:
+# - CPU alias name
+# - CPU base name
+# DEF_CPU_FEATURE parameters:
+# - CPU feature name
+# - CPU flag to set feature name alone or unset ("no" + feature name)
+
+# The standard CPU names /set/ cpu_enabled.
+CPU 8086 CPU_Priv
+CPU 186 CPU_186|CPU_Priv
+CPU_ALIAS 80186 186
+CPU_ALIAS i186 186
+CPU 286 CPU_186|CPU_286|CPU_Priv
+CPU_ALIAS 80286 286
+CPU_ALIAS i286 286
+CPU 386 CPU_186|CPU_286|CPU_386|CPU_SMM|CPU_Prot|CPU_Priv
+CPU_ALIAS 80386 386
+CPU_ALIAS i386 386
+CPU 486 CPU_186|CPU_286|CPU_386|CPU_486|CPU_FPU|CPU_SMM|\
+ CPU_Prot|CPU_Priv
+CPU_ALIAS 80486 486
+CPU_ALIAS i486 486
+CPU 586 CPU_186|CPU_286|CPU_386|CPU_486|CPU_586|CPU_FPU|\
+ CPU_SMM|CPU_Prot|CPU_Priv
+CPU_ALIAS i586 586
+CPU_ALIAS pentium 586
+CPU_ALIAS p5 586
+CPU 686 CPU_186|CPU_286|CPU_386|CPU_486|CPU_586|CPU_686|\
+ CPU_FPU|CPU_SMM|CPU_Prot|CPU_Priv
+CPU_ALIAS i686 686
+CPU_ALIAS p6 686
+CPU_ALIAS ppro 686
+CPU_ALIAS pentiumpro 686
+CPU p2 CPU_186|CPU_286|CPU_386|CPU_486|CPU_586|CPU_686|\
+ CPU_FPU|CPU_MMX|CPU_SMM|CPU_Prot|CPU_Priv
+CPU_ALIAS pentium2 p2
+CPU_ALIAS pentium-2 p2
+CPU_ALIAS pentiumii p2
+CPU_ALIAS pentium-ii p2
+CPU p3 CPU_186|CPU_286|CPU_386|CPU_486|CPU_586|CPU_686|\
+ CPU_P3|CPU_FPU|CPU_MMX|CPU_SSE|CPU_SMM|CPU_Prot|\
+ CPU_Priv
+CPU_ALIAS pentium3 p3
+CPU_ALIAS pentium-3 p3
+CPU_ALIAS pentiumiii p3
+CPU_ALIAS pentium-iii p3
+CPU_ALIAS katmai p3
+CPU p4 CPU_186|CPU_286|CPU_386|CPU_486|CPU_586|CPU_686|\
+ CPU_P3|CPU_P4|CPU_FPU|CPU_MMX|CPU_SSE|CPU_SSE2|\
+ CPU_SMM|CPU_Prot|CPU_Priv
+CPU_ALIAS pentium4 p4
+CPU_ALIAS pentium-4 p4
+CPU_ALIAS pentiumiv p4
+CPU_ALIAS pentium-iv p4
+CPU_ALIAS williamette p4
+CPU ia64 CPU_186|CPU_286|CPU_386|CPU_486|CPU_586|CPU_686|\
+ CPU_P3|CPU_P4|CPU_IA64|CPU_FPU|CPU_MMX|CPU_SSE|\
+ CPU_SSE2|CPU_SMM|CPU_Prot|CPU_Priv
+CPU_ALIAS ia-64 ia64
+CPU_ALIAS itanium ia64
+CPU k6 CPU_186|CPU_286|CPU_386|CPU_486|CPU_586|CPU_686|\
+ CPU_K6|CPU_FPU|CPU_MMX|CPU_3DNow|CPU_SMM|CPU_Prot|\
+ CPU_Priv
+CPU k7 CPU_186|CPU_286|CPU_386|CPU_486|CPU_586|CPU_686|\
+ CPU_K6|CPU_Athlon|CPU_FPU|CPU_MMX|CPU_SSE|CPU_3DNow|\
+ CPU_SMM|CPU_Prot|CPU_Priv
+CPU_ALIAS athlon k7
+CPU hammer CPU_186|CPU_286|CPU_386|CPU_486|CPU_586|CPU_686|\
+ CPU_K6|CPU_Athlon|CPU_Hammer|CPU_FPU|CPU_MMX|\
+ CPU_SSE|CPU_SSE2|CPU_3DNow|CPU_SMM|CPU_Prot|\
+ CPU_Priv
+CPU_ALIAS sledgehammer hammer
+CPU_ALIAS opteron hammer
+CPU_ALIAS athlon64 hammer
+CPU_ALIAS athlon-64 hammer
+CPU prescott CPU_186|CPU_286|CPU_386|CPU_486|CPU_586|CPU_686|\
+ CPU_K6|CPU_Athlon|CPU_Hammer|CPU_EM64T|CPU_FPU|CPU_MMX|\
+ CPU_SSE|CPU_SSE2|CPU_SSE3|CPU_3DNow|CPU_SMM|\
+ CPU_Prot|CPU_Priv
+
+# Features have "no" versions to disable them, and only set/reset the
+# specific feature being changed. All other bits are left alone.
+
+CPU_FEATURE fpu CPU_FPU
+CPU_FEATURE mmx CPU_MMX
+CPU_FEATURE sse CPU_SSE
+CPU_FEATURE sse2 CPU_SSE2
+CPU_FEATURE sse3 CPU_SSE3
+#CPU_FEATURE pni CPU_PNI
+CPU_FEATURE 3dnow CPU_3DNow
+CPU_FEATURE cyrix CPU_Cyrix
+CPU_FEATURE amd CPU_AMD
+CPU_FEATURE smm CPU_SMM
+CPU_FEATURE prot CPU_Prot
+CPU_FEATURE undoc CPU_Undoc
+CPU_FEATURE obs CPU_Obs
+CPU_FEATURE priv CPU_Priv
+CPU_FEATURE svm CPU_SVM
+CPU_FEATURE padlock CPU_PadLock
+CPU_FEATURE em64t CPU_EM64T
+
+
+# TARGETMOD parameters:
+# - target modifier name
+# - modifier to return
+
+TARGETMOD near X86_NEAR
+TARGETMOD short X86_SHORT
+TARGETMOD far X86_FAR
+TARGETMOD to X86_TO
+
+
+# PREFIX parameters:
+# - parser
+# - prefix name
+# - prefix type
+# - prefix value
+
+# operand size overrides
+PREFIX nasm o16 X86_OPERSIZE 16
+PREFIX gas data16 X86_OPERSIZE 16
+PREFIX gas word X86_OPERSIZE 16
+PREFIX nasm o32 X86_OPERSIZE 32
+PREFIX gas data32 X86_OPERSIZE 32
+PREFIX gas dword X86_OPERSIZE 32
+PREFIX nasm o64 X86_OPERSIZE 64
+PREFIX gas data64 X86_OPERSIZE 64
+PREFIX gas qword X86_OPERSIZE 64
+
+# address size overrides
+PREFIX nasm a16 X86_ADDRSIZE 16
+PREFIX gas addr16 X86_ADDRSIZE 16
+PREFIX gas aword X86_ADDRSIZE 16
+PREFIX nasm a32 X86_ADDRSIZE 32
+PREFIX gas addr32 X86_ADDRSIZE 32
+PREFIX gas adword X86_ADDRSIZE 32
+PREFIX nasm a64 X86_ADDRSIZE 64
+PREFIX gas addr64 X86_ADDRSIZE 64
+PREFIX gas aqword X86_ADDRSIZE 64
+
+# instruction prefixes
+PREFIX - lock X86_LOCKREP 0xF0
+PREFIX - repne X86_LOCKREP 0xF2
+PREFIX - repnz X86_LOCKREP 0xF2
+PREFIX - rep X86_LOCKREP 0xF3
+PREFIX - repe X86_LOCKREP 0xF3
+PREFIX - repz X86_LOCKREP 0xF3
+
+# other prefixes, limited to GAS-only at the moment
+# Hint taken/not taken for jumps
+PREFIX gas ht X86_SEGREG 0x3E
+PREFIX gas hnt X86_SEGREG 0x2E
+
+# REX byte explicit prefixes
+PREFIX gas rex X86_REX 0x40
+PREFIX gas rexz X86_REX 0x41
+PREFIX gas rexy X86_REX 0x42
+PREFIX gas rexyz X86_REX 0x43
+PREFIX gas rexx X86_REX 0x44
+PREFIX gas rexxz X86_REX 0x45
+PREFIX gas rexxy X86_REX 0x46
+PREFIX gas rexxyz X86_REX 0x47
+PREFIX gas rex64 X86_REX 0x48
+PREFIX gas rex64z X86_REX 0x49
+PREFIX gas rex64y X86_REX 0x4A
+PREFIX gas rex64yz X86_REX 0x4B
+PREFIX gas rex64x X86_REX 0x4C
+PREFIX gas rex64xz X86_REX 0x4D
+PREFIX gas rex64xy X86_REX 0x4E
+PREFIX gas rex64xyz X86_REX 0x4F
+
+
+# REG parameters:
+# - register name
+# - register type
+# - register index
+# - required BITS setting (0 for any)
+#
+# REGGROUP parameters:
+# - register group name
+# - register group type
+#
+# SEGREG parameters:
+# - segment register name
+# - prefix encoding
+# - register encoding
+# - BITS in which the segment is ignored
+
+# control, debug, and test registers
+REG cr0 X86_CRREG 0 0
+REG cr2 X86_CRREG 2 0
+REG cr3 X86_CRREG 3 0
+REG cr4 X86_CRREG 4 0
+REG cr8 X86_CRREG 8 64
+
+REG dr0 X86_DRREG 0 0
+REG dr1 X86_DRREG 1 0
+REG dr2 X86_DRREG 2 0
+REG dr3 X86_DRREG 3 0
+REG dr4 X86_DRREG 4 0
+REG dr5 X86_DRREG 5 0
+REG dr6 X86_DRREG 6 0
+REG dr7 X86_DRREG 7 0
+
+REG tr0 X86_TRREG 0 0
+REG tr1 X86_TRREG 1 0
+REG tr2 X86_TRREG 2 0
+REG tr3 X86_TRREG 3 0
+REG tr4 X86_TRREG 4 0
+REG tr5 X86_TRREG 5 0
+REG tr6 X86_TRREG 6 0
+REG tr7 X86_TRREG 7 0
+
+# floating point, MMX, and SSE/SSE2 registers
+REG st0 X86_FPUREG 0 0
+REG st1 X86_FPUREG 1 0
+REG st2 X86_FPUREG 2 0
+REG st3 X86_FPUREG 3 0
+REG st4 X86_FPUREG 4 0
+REG st5 X86_FPUREG 5 0
+REG st6 X86_FPUREG 6 0
+REG st7 X86_FPUREG 7 0
+
+REG mm0 X86_MMXREG 0 0
+REG mm1 X86_MMXREG 1 0
+REG mm2 X86_MMXREG 2 0
+REG mm3 X86_MMXREG 3 0
+REG mm4 X86_MMXREG 4 0
+REG mm5 X86_MMXREG 5 0
+REG mm6 X86_MMXREG 6 0
+REG mm7 X86_MMXREG 7 0
+
+REG xmm0 X86_XMMREG 0 0
+REG xmm1 X86_XMMREG 1 0
+REG xmm2 X86_XMMREG 2 0
+REG xmm3 X86_XMMREG 3 0
+REG xmm4 X86_XMMREG 4 0
+REG xmm5 X86_XMMREG 5 0
+REG xmm6 X86_XMMREG 6 0
+REG xmm7 X86_XMMREG 7 0
+REG xmm8 X86_XMMREG 8 64
+REG xmm9 X86_XMMREG 9 64
+REG xmm10 X86_XMMREG 10 64
+REG xmm11 X86_XMMREG 11 64
+REG xmm12 X86_XMMREG 12 64
+REG xmm13 X86_XMMREG 13 64
+REG xmm14 X86_XMMREG 14 64
+REG xmm15 X86_XMMREG 15 64
+
+# integer registers
+REG rax X86_REG64 0 64
+REG rcx X86_REG64 1 64
+REG rdx X86_REG64 2 64
+REG rbx X86_REG64 3 64
+REG rsp X86_REG64 4 64
+REG rbp X86_REG64 5 64
+REG rsi X86_REG64 6 64
+REG rdi X86_REG64 7 64
+REG r8 X86_REG64 8 64
+REG r9 X86_REG64 9 64
+REG r10 X86_REG64 10 64
+REG r11 X86_REG64 11 64
+REG r12 X86_REG64 12 64
+REG r13 X86_REG64 13 64
+REG r14 X86_REG64 14 64
+REG r15 X86_REG64 15 64
+
+REG eax X86_REG32 0 0
+REG ecx X86_REG32 1 0
+REG edx X86_REG32 2 0
+REG ebx X86_REG32 3 0
+REG esp X86_REG32 4 0
+REG ebp X86_REG32 5 0
+REG esi X86_REG32 6 0
+REG edi X86_REG32 7 0
+REG r8d X86_REG32 8 64
+REG r9d X86_REG32 9 64
+REG r10d X86_REG32 10 64
+REG r11d X86_REG32 11 64
+REG r12d X86_REG32 12 64
+REG r13d X86_REG32 13 64
+REG r14d X86_REG32 14 64
+REG r15d X86_REG32 15 64
+
+REG ax X86_REG16 0 0
+REG cx X86_REG16 1 0
+REG dx X86_REG16 2 0
+REG bx X86_REG16 3 0
+REG sp X86_REG16 4 0
+REG bp X86_REG16 5 0
+REG si X86_REG16 6 0
+REG di X86_REG16 7 0
+REG r8w X86_REG16 8 64
+REG r9w X86_REG16 9 64
+REG r10w X86_REG16 10 64
+REG r11w X86_REG16 11 64
+REG r12w X86_REG16 12 64
+REG r13w X86_REG16 13 64
+REG r14w X86_REG16 14 64
+REG r15w X86_REG16 15 64
+
+REG al X86_REG8 0 0
+REG cl X86_REG8 1 0
+REG dl X86_REG8 2 0
+REG bl X86_REG8 3 0
+REG ah X86_REG8 4 0
+REG ch X86_REG8 5 0
+REG dh X86_REG8 6 0
+REG bh X86_REG8 7 0
+REG r8b X86_REG8 8 64
+REG r9b X86_REG8 9 64
+REG r10b X86_REG8 10 64
+REG r11b X86_REG8 11 64
+REG r12b X86_REG8 12 64
+REG r13b X86_REG8 13 64
+REG r14b X86_REG8 14 64
+REG r15b X86_REG8 15 64
+
+REG spl X86_REG8X 4 64
+REG bpl X86_REG8X 5 64
+REG sil X86_REG8X 6 64
+REG dil X86_REG8X 7 64
+
+REG rip X86_RIP 0 64
+
+# floating point, MMX, and SSE/SSE2 registers
+REGGROUP st X86_FPUREG
+REGGROUP mm X86_MMXREG
+REGGROUP xmm X86_XMMREG
+
+# segment registers
+SEGREG es 0x26 0x00 64
+SEGREG cs 0x2e 0x01 0
+SEGREG ss 0x36 0x02 64
+SEGREG ds 0x3e 0x03 64
+SEGREG fs 0x64 0x04 0
+SEGREG gs 0x65 0x05 0
+
diff --git a/modules/dbgfmts/Makefile.inc b/modules/dbgfmts/Makefile.inc
index 80922198..845b3a7d 100644
--- a/modules/dbgfmts/Makefile.inc
+++ b/modules/dbgfmts/Makefile.inc
@@ -1,7 +1,11 @@
# $Id$
+EXTRA_DIST += modules/dbgfmts/codeview/Makefile.inc
+EXTRA_DIST += modules/dbgfmts/dwarf2/Makefile.inc
EXTRA_DIST += modules/dbgfmts/null/Makefile.inc
EXTRA_DIST += modules/dbgfmts/stabs/Makefile.inc
+include modules/dbgfmts/codeview/Makefile.inc
+include modules/dbgfmts/dwarf2/Makefile.inc
include modules/dbgfmts/null/Makefile.inc
#include modules/dbgfmts/stabs/Makefile.inc
diff --git a/modules/dbgfmts/codeview/Makefile.inc b/modules/dbgfmts/codeview/Makefile.inc
new file mode 100644
index 00000000..1a11f729
--- /dev/null
+++ b/modules/dbgfmts/codeview/Makefile.inc
@@ -0,0 +1,13 @@
+# $Id$
+
+libyasm_a_SOURCES += modules/dbgfmts/codeview/cv-dbgfmt.h
+libyasm_a_SOURCES += modules/dbgfmts/codeview/cv-dbgfmt.c
+libyasm_a_SOURCES += modules/dbgfmts/codeview/cv-symline.c
+libyasm_a_SOURCES += modules/dbgfmts/codeview/cv-type.c
+
+YASM_MODULES += dbgfmt_cv8
+
+EXTRA_DIST += modules/dbgfmts/codeview/cv8.txt
+
+#EXTRA_DIST += modules/dbgfmts/codeview/tests/Makefile.inc
+#include modules/dbgfmts/codeview/tests/Makefile.inc
diff --git a/modules/dbgfmts/codeview/cv-dbgfmt.c b/modules/dbgfmts/codeview/cv-dbgfmt.c
new file mode 100644
index 00000000..c42db191
--- /dev/null
+++ b/modules/dbgfmts/codeview/cv-dbgfmt.c
@@ -0,0 +1,126 @@
+/*
+ * CodeView debugging formats implementation for Yasm
+ *
+ * Copyright (C) 2006 Peter Johnson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <util.h>
+/*@unused@*/ RCSID("$Id$");
+
+#define YASM_LIB_INTERNAL
+#define YASM_BC_INTERNAL
+#include <libyasm.h>
+
+#include "cv-dbgfmt.h"
+
+yasm_dbgfmt_module yasm_cv8_LTX_dbgfmt;
+
+
+static /*@null@*/ /*@only@*/ yasm_dbgfmt *
+cv_dbgfmt_create(yasm_object *object, yasm_objfmt *of, yasm_arch *a,
+ yasm_dbgfmt_module *module, int version)
+{
+ yasm_dbgfmt_cv *dbgfmt_cv = yasm_xmalloc(sizeof(yasm_dbgfmt_cv));
+ size_t i;
+
+ dbgfmt_cv->dbgfmt.module = module;
+
+ dbgfmt_cv->object = object;
+ dbgfmt_cv->symtab = yasm_object_get_symtab(object);
+ dbgfmt_cv->linemap = yasm_object_get_linemap(object);
+ dbgfmt_cv->arch = a;
+
+ dbgfmt_cv->filenames_allocated = 32;
+ dbgfmt_cv->filenames_size = 0;
+ dbgfmt_cv->filenames =
+ yasm_xmalloc(sizeof(cv_filename)*dbgfmt_cv->filenames_allocated);
+ for (i=0; i<dbgfmt_cv->filenames_allocated; i++) {
+ dbgfmt_cv->filenames[i].pathname = NULL;
+ dbgfmt_cv->filenames[i].filename = NULL;
+ dbgfmt_cv->filenames[i].str_off = 0;
+ dbgfmt_cv->filenames[i].info_off = 0;
+ }
+
+ dbgfmt_cv->version = version;
+
+ return (yasm_dbgfmt *)dbgfmt_cv;
+}
+
+static /*@null@*/ /*@only@*/ yasm_dbgfmt *
+cv8_dbgfmt_create(yasm_object *object, yasm_objfmt *of, yasm_arch *a)
+{
+ return cv_dbgfmt_create(object, of, a, &yasm_cv8_LTX_dbgfmt, 8);
+}
+
+static void
+cv_dbgfmt_destroy(/*@only@*/ yasm_dbgfmt *dbgfmt)
+{
+ yasm_dbgfmt_cv *dbgfmt_cv = (yasm_dbgfmt_cv *)dbgfmt;
+ size_t i;
+ for (i=0; i<dbgfmt_cv->filenames_size; i++) {
+ if (dbgfmt_cv->filenames[i].pathname)
+ yasm_xfree(dbgfmt_cv->filenames[i].pathname);
+ }
+ yasm_xfree(dbgfmt_cv->filenames);
+ yasm_xfree(dbgfmt);
+}
+
+/* Add a bytecode to a section, updating offset on insertion;
+ * no optimization necessary.
+ */
+yasm_bytecode *
+yasm_cv__append_bc(yasm_section *sect, yasm_bytecode *bc)
+{
+ yasm_bytecode *precbc = yasm_section_bcs_last(sect);
+ bc->offset = precbc ? precbc->offset + precbc->len : 0;
+ yasm_section_bcs_append(sect, bc);
+ return precbc;
+}
+
+static void
+cv_dbgfmt_generate(yasm_dbgfmt *dbgfmt, yasm_errwarns *errwarns)
+{
+ yasm_dbgfmt_cv *dbgfmt_cv = (yasm_dbgfmt_cv *)dbgfmt;
+
+ yasm_cv__generate_symline(dbgfmt_cv, errwarns);
+
+ yasm_cv__generate_type(dbgfmt_cv);
+}
+
+static int
+cv_dbgfmt_directive(yasm_dbgfmt *dbgfmt, const char *name,
+ yasm_section *sect, yasm_valparamhead *valparams,
+ unsigned long line)
+{
+ return 1; /* TODO */
+}
+
+/* Define dbgfmt structure -- see dbgfmt.h for details */
+yasm_dbgfmt_module yasm_cv8_LTX_dbgfmt = {
+ "CodeView debugging format for VC8",
+ "cv8",
+ cv8_dbgfmt_create,
+ cv_dbgfmt_destroy,
+ cv_dbgfmt_directive,
+ cv_dbgfmt_generate
+};
diff --git a/libyasm/objfmt.c b/modules/dbgfmts/codeview/cv-dbgfmt.h
index 798c1136..246bbdfe 100644
--- a/libyasm/objfmt.c
+++ b/modules/dbgfmts/codeview/cv-dbgfmt.h
@@ -1,7 +1,7 @@
-/*
- * Object format interface
+/* $Id$
+ * CodeView debugging formats implementation for Yasm
*
- * Copyright (C) 2003 Peter Johnson
+ * Copyright (C) 2006 Peter Johnson
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -24,31 +24,40 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-#define YASM_LIB_INTERNAL
-#define YASM_ARCH_INTERNAL
-#include "util.h"
-/*@unused@*/ RCSID("$Id$");
-
-#include "coretype.h"
-#include "valparam.h"
-
-#include "objfmt.h"
-
-
-yasm_section *
-yasm_objfmt_add_default_section(yasm_objfmt *objfmt, yasm_object *object)
-{
- yasm_objfmt_base *of_base = (yasm_objfmt_base *)objfmt;
- yasm_section *retval;
- yasm_valparamhead vps;
- yasm_valparam *vp;
-
- vp = yasm_vp_create(yasm__xstrdup(of_base->module->default_section_name),
- NULL);
- yasm_vps_initialize(&vps);
- yasm_vps_append(&vps, vp);
- retval = yasm_objfmt_section_switch(objfmt, &vps, NULL, 0);
- yasm_vps_delete(&vps);
-
- return retval;
-}
+#ifndef YASM_CV_DBGFMT_H
+#define YASM_CV_DBGFMT_H
+
+typedef struct {
+ char *pathname; /* full pathname (drive+basepath+filename) */
+ char *filename; /* filename as yasm knows it internally */
+ unsigned long str_off; /* offset into pathname string table */
+ unsigned long info_off; /* offset into source info table */
+ unsigned char digest[16]; /* MD5 digest of source file */
+} cv_filename;
+
+/* Global data */
+typedef struct yasm_dbgfmt_cv {
+ yasm_dbgfmt_base dbgfmt; /* base structure */
+
+ yasm_object *object;
+ yasm_symtab *symtab;
+ yasm_linemap *linemap;
+ yasm_arch *arch;
+
+ cv_filename *filenames;
+ size_t filenames_size;
+ size_t filenames_allocated;
+
+ int version;
+} yasm_dbgfmt_cv;
+
+yasm_bytecode *yasm_cv__append_bc(yasm_section *sect, yasm_bytecode *bc);
+
+/* Symbol/Line number functions */
+yasm_section *yasm_cv__generate_symline(yasm_dbgfmt_cv *dbgfmt_cv,
+ yasm_errwarns *errwarns);
+
+/* Type functions */
+yasm_section *yasm_cv__generate_type(yasm_dbgfmt_cv *dbgfmt_cv);
+
+#endif
diff --git a/modules/dbgfmts/codeview/cv-symline.c b/modules/dbgfmts/codeview/cv-symline.c
new file mode 100644
index 00000000..78c1059a
--- /dev/null
+++ b/modules/dbgfmts/codeview/cv-symline.c
@@ -0,0 +1,1106 @@
+/*
+ * CodeView debugging format - symbol and line information
+ *
+ * Copyright (C) 2006 Peter Johnson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the author nor the names of other contributors
+ * may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <util.h>
+/*@unused@*/ RCSID("$Id$");
+
+#define YASM_LIB_INTERNAL
+#define YASM_BC_INTERNAL
+#include <libyasm.h>
+
+#include "cv-dbgfmt.h"
+
+enum cv8_symheadtype {
+ CV8_DEBUG_SYMS = 0xF1, /* CV5 symbol information */
+ CV8_LINE_NUMS = 0xF2, /* line numbers for a section */
+ CV8_FILE_STRTAB = 0xF3, /* filename string table */
+ CV8_FILE_INFO = 0xF4 /* source file info */
+};
+
+enum cv_symtype {
+ /* Non-modal Symbols */
+ CV_S_COMPILE = 0x0001, /* Compile Flag */
+ CV_S_REGISTER = 0x0002, /* Register */
+ CV_S_CONSTANT = 0x0003, /* Constant */
+ CV_S_UDT = 0x0004, /* User-defined Type */
+ CV_S_SSEARCH = 0x0005, /* Start Search */
+ CV_S_END = 0x0006, /* End of Block */
+ CV_S_SKIP = 0x0007, /* Skip Record */
+ CV_S_OBJNAME = 0x0009, /* Object File Name */
+ CV_S_ENDARG = 0x000a, /* End of Arguments */
+ CV_S_COBOLUDT = 0x000b, /* COBOL User-defined Type */
+ CV_S_MANYREG = 0x000c, /* Many Registers */
+ CV_S_RETURN = 0x000d, /* Function Return */
+ CV_S_ENTRYTHIS = 0x000e, /* "this" at Method Entry */
+
+ /* Symbols for 16:16 Segmented Architectures */
+ CV_S_BPREL16 = 0x0100, /* BP Relative 16:16 */
+ CV_S_LDATA16 = 0x0101, /* Local Data 16:16 */
+ CV_S_GDATA16 = 0x0102, /* Global Data Symbol 16:16 */
+ CV_S_PUB16 = 0x0103, /* Public Symbol 16:16 */
+ CV_S_LPROC16 = 0x0104, /* Local Start 16:16 */
+ CV_S_GPROC16 = 0x0105, /* Global Start 16:16 */
+ CV_S_THUNK16 = 0x0106, /* Thunk Start 16:16 */
+ CV_S_BLOCK16 = 0x0107, /* Block Start 16:16 */
+ CV_S_WITH16 = 0x0108, /* With Start 16:16 */
+ CV_S_LABEL16 = 0x0109, /* Code Label 16:16 */
+ CV_S_CEXMODEL16 = 0x0110, /* Change Execution Model 16:16 */
+ CV_S_VFTPATH16 = 0x010b, /* Virtual Function Table Path 16:16 */
+ CV_S_REGREL16 = 0x010c, /* Register Relative 16:16 */
+
+ /* Symbols for 16:32 Segmented Architectures */
+ CV_S_BPREL32 = 0x0200, /* BP Relative 16:32 */
+ CV_S_LDATA32 = 0x0201, /* Local Data 16:32 */
+ CV_S_GDATA32 = 0x0202, /* Global Data Symbol 16:32 */
+ CV_S_PUB32 = 0x0203, /* Public Symbol 16:32 */
+ CV_S_LPROC32 = 0x0204, /* Local Start 16:32 */
+ CV_S_GPROC32 = 0x0205, /* Global Start 16:32 */
+ CV_S_THUNK32 = 0x0206, /* Thunk Start 16:32 */
+ CV_S_BLOCK32 = 0x0207, /* Block Start 16:32 */
+ CV_S_WITH32 = 0x0208, /* With Start 16:32 */
+ CV_S_LABEL32 = 0x0209, /* Code Label 16:32 */
+ CV_S_CEXMODEL32 = 0x0210, /* Change Execution Model 16:32 */
+ CV_S_VFTPATH32 = 0x020b, /* Virtual Function Table Path 16:32 */
+ CV_S_REGREL32 = 0x020c, /* Register Relative 16:32 */
+ CV_S_LTHREAD32 = 0x020d, /* Local Thread Storage 16:32 */
+ CV_S_GTHREAD32 = 0x020e, /* Global Thread Storage 16:32 */
+
+ /* Symbols for MIPS */
+ CV_S_LPROCMIPS = 0x0300, /* Local procedure start MIPS */
+ CV_S_GPROCMIPS = 0x0301, /* Global procedure start MIPS */
+
+ /* Symbols for CV8 - strings are 0 terminated rather than length-prefix.
+ * Incomplete and unofficial.
+ */
+ CV8_S_OBJNAME = 0x1101, /* Object File Name */
+ CV8_S_LABEL32 = 0x1105, /* Code Label 16:32 */
+ CV8_S_LDATA32 = 0x110c, /* Local Data 16:32 */
+ CV8_S_GDATA32 = 0x110d, /* Global Data 16:32 */
+ CV8_S_LPROC32 = 0x1110, /* Local Start 16:32 */
+ CV8_S_COMPILE = 0x1116 /* Compile Flag */
+};
+
+typedef struct cv8_symhead {
+ yasm_dbgfmt_cv *dbgfmt_cv;
+ enum cv8_symheadtype type;
+ yasm_bytecode *start_prevbc;
+ yasm_bytecode *end_prevbc;
+ int first; /* nonzero if first symhead in section */
+} cv8_symhead;
+
+typedef struct cv8_fileinfo {
+ yasm_dbgfmt_cv *dbgfmt_cv;
+ const cv_filename *fn;
+} cv8_fileinfo;
+
+/* Note: each line number group is associated with a file AND a section */
+typedef struct cv8_linepair {
+ unsigned long offset;
+ unsigned long line;
+} cv8_linepair;
+
+/* Decrease linked list overhead a bit doing it this way */
+typedef struct cv8_lineset {
+ STAILQ_ENTRY(cv8_lineset) link;
+ cv8_linepair pairs[126];
+ size_t num_pairs;
+} cv8_lineset;
+
+typedef struct cv8_lineinfo {
+ STAILQ_ENTRY(cv8_lineinfo) link;
+ yasm_dbgfmt_cv *dbgfmt_cv;
+ const cv_filename *fn; /* filename associated with line numbers */
+ yasm_section *sect; /* section line numbers are for */
+ yasm_symrec *sectsym; /* symbol for beginning of sect */
+ unsigned long num_linenums;
+ STAILQ_HEAD(, cv8_lineset) linesets;
+} cv8_lineinfo;
+
+/* Symbols use a bit of meta-programming to encode formats: each character
+ * of format represents the output generated, as follows:
+ * 'b' : 1 byte value (integer)
+ * 'h' : 2 byte value (integer)
+ * 'w' : 4 byte value (integer)
+ * 'Y' : symrec SECREL+SECTION (pointer)
+ * 'T' : type index (integer)
+ * 'S' : length-prefixed string (pointer)
+ * 'Z' : 0-terminated string (pointer)
+ */
+typedef struct cv_sym {
+ yasm_dbgfmt_cv *dbgfmt_cv;
+ enum cv_symtype type;
+ const char *format;
+ union {
+ unsigned long i;
+ void *p;
+ } args[10];
+} cv_sym;
+
+/* Bytecode callback function prototypes */
+static void cv8_symhead_bc_destroy(void *contents);
+static void cv8_symhead_bc_print(const void *contents, FILE *f,
+ int indent_level);
+static int cv8_symhead_bc_calc_len
+ (yasm_bytecode *bc, yasm_bc_add_span_func add_span, void *add_span_data);
+static int cv8_symhead_bc_tobytes
+ (yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ /*@null@*/ yasm_output_reloc_func output_reloc);
+
+static void cv8_fileinfo_bc_destroy(void *contents);
+static void cv8_fileinfo_bc_print(const void *contents, FILE *f,
+ int indent_level);
+static int cv8_fileinfo_bc_calc_len
+ (yasm_bytecode *bc, yasm_bc_add_span_func add_span, void *add_span_data);
+static int cv8_fileinfo_bc_tobytes
+ (yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ /*@null@*/ yasm_output_reloc_func output_reloc);
+
+static void cv8_lineinfo_bc_destroy(void *contents);
+static void cv8_lineinfo_bc_print(const void *contents, FILE *f,
+ int indent_level);
+static int cv8_lineinfo_bc_calc_len
+ (yasm_bytecode *bc, yasm_bc_add_span_func add_span, void *add_span_data);
+static int cv8_lineinfo_bc_tobytes
+ (yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ /*@null@*/ yasm_output_reloc_func output_reloc);
+
+static void cv_sym_bc_destroy(void *contents);
+static void cv_sym_bc_print(const void *contents, FILE *f, int indent_level);
+static int cv_sym_bc_calc_len
+ (yasm_bytecode *bc, yasm_bc_add_span_func add_span, void *add_span_data);
+static int cv_sym_bc_tobytes
+ (yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ /*@null@*/ yasm_output_reloc_func output_reloc);
+
+/* Bytecode callback structures */
+static const yasm_bytecode_callback cv8_symhead_bc_callback = {
+ cv8_symhead_bc_destroy,
+ cv8_symhead_bc_print,
+ yasm_bc_finalize_common,
+ cv8_symhead_bc_calc_len,
+ yasm_bc_expand_common,
+ cv8_symhead_bc_tobytes,
+ 0
+};
+
+static const yasm_bytecode_callback cv8_fileinfo_bc_callback = {
+ cv8_fileinfo_bc_destroy,
+ cv8_fileinfo_bc_print,
+ yasm_bc_finalize_common,
+ cv8_fileinfo_bc_calc_len,
+ yasm_bc_expand_common,
+ cv8_fileinfo_bc_tobytes,
+ 0
+};
+
+static const yasm_bytecode_callback cv8_lineinfo_bc_callback = {
+ cv8_lineinfo_bc_destroy,
+ cv8_lineinfo_bc_print,
+ yasm_bc_finalize_common,
+ cv8_lineinfo_bc_calc_len,
+ yasm_bc_expand_common,
+ cv8_lineinfo_bc_tobytes,
+ 0
+};
+
+static const yasm_bytecode_callback cv_sym_bc_callback = {
+ cv_sym_bc_destroy,
+ cv_sym_bc_print,
+ yasm_bc_finalize_common,
+ cv_sym_bc_calc_len,
+ yasm_bc_expand_common,
+ cv_sym_bc_tobytes,
+ 0
+};
+
+static cv8_symhead *cv8_add_symhead(yasm_dbgfmt_cv *dbgfmt_cv,
+ yasm_section *sect, unsigned long type,
+ int first);
+static void cv8_set_symhead_end(cv8_symhead *head, yasm_bytecode *end_prevbc);
+
+static yasm_bytecode *cv8_add_fileinfo
+ (yasm_dbgfmt_cv *dbgfmt_cv, yasm_section *sect, const cv_filename *fn);
+
+static unsigned long cv_sym_size(const cv_sym *cvs);
+
+
+static cv_sym *
+cv8_add_sym_objname(yasm_dbgfmt_cv *dbgfmt_cv, yasm_section *sect,
+ /*@keep@*/ char *objname)
+{
+ yasm_bytecode *bc;
+ cv_sym *cvs = yasm_xmalloc(sizeof(cv_sym));
+ cvs->dbgfmt_cv = dbgfmt_cv;
+ cvs->type = CV8_S_OBJNAME;
+ cvs->format = "wZ";
+ cvs->args[0].i = 0; /* signature (0=asm) */
+ cvs->args[1].p = objname; /* object filename */
+
+ bc = yasm_bc_create_common(&cv_sym_bc_callback, cvs, 0);
+ bc->len = cv_sym_size(cvs);
+ yasm_cv__append_bc(sect, bc);
+ return cvs;
+}
+
+static cv_sym *
+cv8_add_sym_compile(yasm_dbgfmt_cv *dbgfmt_cv, yasm_section *sect,
+ /*@keep@*/ char *creator)
+{
+ yasm_bytecode *bc;
+ cv_sym *cvs = yasm_xmalloc(sizeof(cv_sym));
+ cvs->dbgfmt_cv = dbgfmt_cv;
+ cvs->type = CV8_S_COMPILE;
+ cvs->format = "wwwwZh";
+ cvs->args[0].i = 3; /* language (3=Masm) */
+
+ /* target processor; 0xD0 = AMD64 */
+ if (strcmp(yasm_arch_keyword(dbgfmt_cv->arch), "x86") == 0) {
+ if (strcmp(yasm_arch_get_machine(dbgfmt_cv->arch), "amd64") == 0)
+ cvs->args[1].i = 0xD0;
+ else
+ cvs->args[1].i = 0x6; /* 686, FIXME */
+ } else
+ cvs->args[1].i = 0; /* XXX: unknown */
+
+ cvs->args[2].i = 0; /* flags (assume 0 for now) */
+ cvs->args[3].i = 0; /* creator version number (assume 0 for now) */
+ cvs->args[4].p = creator; /* creator string */
+ cvs->args[5].i = 0; /* no pairs of key/value */
+
+ bc = yasm_bc_create_common(&cv_sym_bc_callback, cvs, 0);
+ bc->len = cv_sym_size(cvs);
+ yasm_cv__append_bc(sect, bc);
+ return cvs;
+}
+
+static cv_sym *
+cv8_add_sym_label(yasm_dbgfmt_cv *dbgfmt_cv, yasm_section *sect,
+ yasm_symrec *sym)
+{
+ yasm_bytecode *bc;
+ cv_sym *cvs = yasm_xmalloc(sizeof(cv_sym));
+ cvs->dbgfmt_cv = dbgfmt_cv;
+ cvs->type = CV8_S_LABEL32;
+ cvs->format = "YbZ";
+ cvs->args[0].p = sym; /* symrec for label */
+ cvs->args[1].i = 0; /* flags (assume 0 for now) */
+ cvs->args[2].p = yasm__xstrdup(yasm_symrec_get_name(sym));
+
+ bc = yasm_bc_create_common(&cv_sym_bc_callback, cvs, 0);
+ bc->len = cv_sym_size(cvs);
+ yasm_cv__append_bc(sect, bc);
+ return cvs;
+}
+
+static cv_sym *
+cv8_add_sym_data(yasm_dbgfmt_cv *dbgfmt_cv, yasm_section *sect,
+ unsigned long type, yasm_symrec *sym, int is_global)
+{
+ yasm_bytecode *bc;
+ cv_sym *cvs = yasm_xmalloc(sizeof(cv_sym));
+ cvs->dbgfmt_cv = dbgfmt_cv;
+ cvs->type = is_global ? CV8_S_GDATA32 : CV8_S_LDATA32;
+ cvs->format = "wYZ";
+ cvs->args[0].i = type; /* type index */
+ cvs->args[1].p = sym; /* symrec for label */
+ cvs->args[2].p = yasm__xstrdup(yasm_symrec_get_name(sym));
+
+ bc = yasm_bc_create_common(&cv_sym_bc_callback, cvs, 0);
+ bc->len = cv_sym_size(cvs);
+ yasm_cv__append_bc(sect, bc);
+ return cvs;
+}
+
+static size_t
+cv_dbgfmt_add_file(yasm_dbgfmt_cv *dbgfmt_cv, size_t filenum,
+ const char *filename)
+{
+ char *pathname;
+ size_t i;
+ yasm_md5_context context;
+ FILE *f;
+ unsigned char *buf;
+ size_t len;
+
+ /* Put the filename into the filename table */
+ if (filenum == 0) {
+ /* Look to see if we already have that filename in the table */
+ for (; filenum<dbgfmt_cv->filenames_size; filenum++) {
+ if (!dbgfmt_cv->filenames[filenum].filename ||
+ strcmp(dbgfmt_cv->filenames[filenum].filename, filename) == 0)
+ break;
+ }
+ } else
+ filenum--; /* array index is 0-based */
+
+ /* Realloc table if necessary */
+ if (filenum >= dbgfmt_cv->filenames_allocated) {
+ size_t old_allocated = dbgfmt_cv->filenames_allocated;
+ dbgfmt_cv->filenames_allocated = filenum+32;
+ dbgfmt_cv->filenames = yasm_xrealloc(dbgfmt_cv->filenames,
+ sizeof(cv_filename)*dbgfmt_cv->filenames_allocated);
+ for (i=old_allocated; i<dbgfmt_cv->filenames_allocated; i++) {
+ dbgfmt_cv->filenames[i].pathname = NULL;
+ dbgfmt_cv->filenames[i].filename = NULL;
+ dbgfmt_cv->filenames[i].str_off = 0;
+ dbgfmt_cv->filenames[i].info_off = 0;
+ }
+ }
+
+ /* Calculate MD5 checksum of file */
+ buf = yasm_xmalloc(1024);
+ yasm_md5_init(&context);
+ f = fopen(filename, "rb");
+ if (!f)
+ yasm__fatal(N_("codeview: could not open source file"));
+ while ((len = fread(buf, 1, 1024, f)) > 0)
+ yasm_md5_update(&context, buf, len);
+ yasm_md5_final(dbgfmt_cv->filenames[filenum].digest, &context);
+ fclose(f);
+ yasm_xfree(buf);
+
+ /* Actually save in table */
+ if (dbgfmt_cv->filenames[filenum].pathname)
+ yasm_xfree(dbgfmt_cv->filenames[filenum].pathname);
+ if (dbgfmt_cv->filenames[filenum].filename)
+ yasm_xfree(dbgfmt_cv->filenames[filenum].filename);
+
+ pathname = yasm__abspath(filename);
+ dbgfmt_cv->filenames[filenum].pathname = pathname;
+ dbgfmt_cv->filenames[filenum].filename = yasm__xstrdup(filename);
+
+ /* Update table size */
+ if (filenum >= dbgfmt_cv->filenames_size)
+ dbgfmt_cv->filenames_size = filenum + 1;
+
+ return filenum;
+}
+
+static yasm_bytecode *
+cv_append_str(yasm_section *sect, const char *str)
+{
+ yasm_datavalhead dvs;
+ yasm_bytecode *bc;
+
+ yasm_dvs_initialize(&dvs);
+ yasm_dvs_append(&dvs, yasm_dv_create_string(yasm__xstrdup(str),
+ strlen(str)));
+ bc = yasm_bc_create_data(&dvs, 1, 1, NULL, 0);
+ yasm_bc_finalize(bc, yasm_cv__append_bc(sect, bc));
+ yasm_bc_calc_len(bc, NULL, NULL);
+ return bc;
+}
+
+typedef struct cv_line_info {
+ yasm_section *debug_symline;
+ yasm_dbgfmt_cv *dbgfmt_cv;
+ yasm_errwarns *errwarns;
+ unsigned int num_lineinfos;
+ STAILQ_HEAD(, cv8_lineinfo) cv8_lineinfos;
+ /*@null@*/ cv8_lineinfo *cv8_cur_li;
+ /*@null@*/ cv8_lineset *cv8_cur_ls;
+} cv_line_info;
+
+static int
+cv_generate_line_bc(yasm_bytecode *bc, /*@null@*/ void *d)
+{
+ cv_line_info *info = (cv_line_info *)d;
+ yasm_dbgfmt_cv *dbgfmt_cv = info->dbgfmt_cv;
+ size_t i;
+ const char *filename;
+ unsigned long line;
+ /*@null@*/ yasm_bytecode *nextbc = yasm_bc__next(bc);
+ yasm_section *sect = yasm_bc_get_section(bc);
+
+ if (nextbc && bc->offset == nextbc->offset)
+ return 0;
+
+ yasm_linemap_lookup(dbgfmt_cv->linemap, bc->line, &filename, &line);
+
+ if (!info->cv8_cur_li
+ || strcmp(filename, info->cv8_cur_li->fn->filename) != 0) {
+ yasm_bytecode *sectbc;
+ char symname[8];
+
+ /* first see if we already have a lineinfo that is for this section and
+ * filename
+ */
+ STAILQ_FOREACH(info->cv8_cur_li, &info->cv8_lineinfos, link) {
+ if (sect == info->cv8_cur_li->sect
+ && strcmp(filename, info->cv8_cur_li->fn->filename) == 0)
+ break;
+ }
+
+ if (info->cv8_cur_li) {
+ info->cv8_cur_ls = STAILQ_LAST(&info->cv8_cur_li->linesets,
+ cv8_lineset, link);
+ goto done; /* found one */
+ }
+
+ /* Nope; find file */
+ for (i=0; i<dbgfmt_cv->filenames_size; i++) {
+ if (strcmp(filename, dbgfmt_cv->filenames[i].filename) == 0)
+ break;
+ }
+ if (i >= dbgfmt_cv->filenames_size)
+ yasm_internal_error(N_("could not find filename in table"));
+
+ /* and create new lineinfo structure */
+ info->cv8_cur_li = yasm_xmalloc(sizeof(cv8_lineinfo));
+ info->cv8_cur_li->dbgfmt_cv = dbgfmt_cv;
+ info->cv8_cur_li->fn = &dbgfmt_cv->filenames[i];
+ info->cv8_cur_li->sect = sect;
+ sectbc = yasm_section_bcs_first(sect);
+ if (sectbc->symrecs && sectbc->symrecs[0])
+ info->cv8_cur_li->sectsym = sectbc->symrecs[0];
+ else {
+ sprintf(symname, ".%06u", info->num_lineinfos++);
+ info->cv8_cur_li->sectsym =
+ yasm_symtab_define_label(dbgfmt_cv->symtab, symname, sectbc,
+ 1, 0);
+ }
+ info->cv8_cur_li->num_linenums = 0;
+ STAILQ_INIT(&info->cv8_cur_li->linesets);
+ STAILQ_INSERT_TAIL(&info->cv8_lineinfos, info->cv8_cur_li, link);
+ info->cv8_cur_ls = NULL;
+ }
+done:
+
+ /* build new lineset if necessary */
+ if (!info->cv8_cur_ls || info->cv8_cur_ls->num_pairs >= 126) {
+ info->cv8_cur_ls = yasm_xmalloc(sizeof(cv8_lineset));
+ info->cv8_cur_ls->num_pairs = 0;
+ STAILQ_INSERT_TAIL(&info->cv8_cur_li->linesets, info->cv8_cur_ls, link);
+ }
+
+ /* add linepair for this bytecode */
+ info->cv8_cur_ls->pairs[info->cv8_cur_ls->num_pairs].offset = bc->offset;
+ info->cv8_cur_ls->pairs[info->cv8_cur_ls->num_pairs].line =
+ 0x80000000 | line;
+ info->cv8_cur_ls->num_pairs++;
+ info->cv8_cur_li->num_linenums++;
+
+ return 0;
+}
+
+static int
+cv_generate_line_section(yasm_section *sect, /*@null@*/ void *d)
+{
+ cv_line_info *info = (cv_line_info *)d;
+
+ if (!yasm_section_is_code(sect))
+ return 0; /* not code, so no line data for this section */
+
+ info->cv8_cur_li = NULL;
+ info->cv8_cur_ls = NULL;
+
+ yasm_section_bcs_traverse(sect, info->errwarns, info, cv_generate_line_bc);
+
+ return 0;
+}
+
+static int
+cv_generate_filename(const char *filename, void *d)
+{
+ yasm_dbgfmt_cv *dbgfmt_cv = (yasm_dbgfmt_cv *)d;
+ cv_dbgfmt_add_file(dbgfmt_cv, 0, filename);
+ return 0;
+}
+
+static int
+cv_generate_sym(yasm_symrec *sym, void *d)
+{
+ cv_line_info *info = (cv_line_info *)d;
+ yasm_bytecode *precbc;
+
+ /* only care about labels (for now) */
+ if (!yasm_symrec_get_label(sym, &precbc))
+ return 0;
+
+ /* TODO: add data types; until then, just mark everything as UBYTE */
+ if (yasm_section_is_code(yasm_bc_get_section(precbc)))
+ cv8_add_sym_label(info->dbgfmt_cv, info->debug_symline, sym);
+ else
+ cv8_add_sym_data(info->dbgfmt_cv, info->debug_symline, 0x20, sym,
+ yasm_symrec_get_visibility(sym) & YASM_SYM_GLOBAL?1:0);
+ return 0;
+}
+
+yasm_section *
+yasm_cv__generate_symline(yasm_dbgfmt_cv *dbgfmt_cv, yasm_errwarns *errwarns)
+{
+ cv_line_info info;
+ int new;
+ size_t i;
+ cv8_symhead *head;
+ cv8_lineinfo *li;
+ yasm_bytecode *bc;
+ unsigned long off;
+
+ /* Generate filenames based on linemap */
+ yasm_linemap_traverse_filenames(dbgfmt_cv->linemap, dbgfmt_cv,
+ cv_generate_filename);
+
+ info.dbgfmt_cv = dbgfmt_cv;
+ info.errwarns = errwarns;
+ info.debug_symline = yasm_object_get_general(dbgfmt_cv->object,
+ ".debug$S", 0, 1, 0, 0, &new,
+ 0);
+ info.num_lineinfos = 0;
+ STAILQ_INIT(&info.cv8_lineinfos);
+ info.cv8_cur_li = NULL;
+ info.cv8_cur_ls = NULL;
+
+ /* source filenames string table */
+ head = cv8_add_symhead(dbgfmt_cv, info.debug_symline, CV8_FILE_STRTAB, 1);
+ cv_append_str(info.debug_symline, "");
+ off = 1;
+ for (i=0; i<dbgfmt_cv->filenames_size; i++) {
+ if (!dbgfmt_cv->filenames[i].pathname) {
+ yasm_error_set(YASM_ERROR_GENERAL,
+ N_("codeview file number %d unassigned"), i+1);
+ yasm_errwarn_propagate(errwarns, 0);
+ continue;
+ }
+ bc = cv_append_str(info.debug_symline,
+ dbgfmt_cv->filenames[i].pathname);
+ dbgfmt_cv->filenames[i].str_off = off;
+ off += bc->len;
+ }
+ cv8_set_symhead_end(head, yasm_section_bcs_last(info.debug_symline));
+
+ /* Align 4 */
+ bc = yasm_bc_create_align
+ (yasm_expr_create_ident(yasm_expr_int(yasm_intnum_create_uint(4)), 0),
+ NULL, NULL, NULL, 0);
+ yasm_bc_finalize(bc, yasm_cv__append_bc(info.debug_symline, bc));
+ yasm_bc_calc_len(bc, NULL, NULL);
+
+ /* source file info table */
+ head = cv8_add_symhead(dbgfmt_cv, info.debug_symline, CV8_FILE_INFO, 0);
+ off = 0;
+ for (i=0; i<dbgfmt_cv->filenames_size; i++) {
+ if (!dbgfmt_cv->filenames[i].pathname)
+ continue;
+ bc = cv8_add_fileinfo(dbgfmt_cv, info.debug_symline,
+ &dbgfmt_cv->filenames[i]);
+ dbgfmt_cv->filenames[i].info_off = off;
+ off += bc->len;
+ }
+ cv8_set_symhead_end(head, yasm_section_bcs_last(info.debug_symline));
+
+ /* Already aligned 4 */
+
+ /* Generate line numbers for sections */
+ yasm_object_sections_traverse(dbgfmt_cv->object, (void *)&info,
+ cv_generate_line_section);
+
+ /* Output line numbers for sections */
+ STAILQ_FOREACH(li, &info.cv8_lineinfos, link) {
+ head = cv8_add_symhead(dbgfmt_cv, info.debug_symline, CV8_LINE_NUMS,
+ 0);
+ bc = yasm_bc_create_common(&cv8_lineinfo_bc_callback, li, 0);
+ bc->len = 24+li->num_linenums*8;
+ yasm_cv__append_bc(info.debug_symline, bc);
+ cv8_set_symhead_end(head, yasm_section_bcs_last(info.debug_symline));
+ }
+
+ /* Already aligned 4 */
+
+ /* Output debugging symbols */
+ head = cv8_add_symhead(dbgfmt_cv, info.debug_symline, CV8_DEBUG_SYMS, 0);
+ /* add object and compile flag first */
+ cv8_add_sym_objname(dbgfmt_cv, info.debug_symline,
+ yasm__abspath(yasm_object_get_object_fn(dbgfmt_cv->object)));
+ cv8_add_sym_compile(dbgfmt_cv, info.debug_symline,
+ yasm__xstrdup(PACKAGE_NAME " " PACKAGE_INTVER "."
+ PACKAGE_BUILD));
+ /* then iterate through symbol table */
+ yasm_symtab_traverse(dbgfmt_cv->symtab, &info, cv_generate_sym);
+ cv8_set_symhead_end(head, yasm_section_bcs_last(info.debug_symline));
+
+ /* Align 4 at end */
+ bc = yasm_bc_create_align
+ (yasm_expr_create_ident(yasm_expr_int(yasm_intnum_create_uint(4)), 0),
+ NULL, NULL, NULL, 0);
+ yasm_bc_finalize(bc, yasm_cv__append_bc(info.debug_symline, bc));
+ yasm_bc_calc_len(bc, NULL, NULL);
+
+ return info.debug_symline;
+}
+
+static void
+cv_out_sym(yasm_symrec *sym, unsigned long off, yasm_bytecode *bc,
+ unsigned char **bufp, void *d, yasm_output_value_func output_value)
+{
+ yasm_value val;
+
+ /* sym in its section */
+ yasm_value_init_sym(&val, sym, 32);
+ val.section_rel = 1;
+ output_value(&val, *bufp, 4, off, bc, 0, d);
+ *bufp += 4;
+
+ /* section index */
+ yasm_value_init_sym(&val, sym, 16);
+ val.seg_of = 1;
+ output_value(&val, *bufp, 2, off+4, bc, 0, d);
+ *bufp += 2;
+}
+
+static cv8_symhead *
+cv8_add_symhead(yasm_dbgfmt_cv *dbgfmt_cv, yasm_section *sect,
+ unsigned long type, int first)
+{
+ cv8_symhead *head;
+ yasm_bytecode *bc;
+
+ head = yasm_xmalloc(sizeof(cv8_symhead));
+ head->dbgfmt_cv = dbgfmt_cv;
+ head->type = type;
+ head->first = first;
+ head->start_prevbc = yasm_section_bcs_last(sect);
+
+ bc = yasm_bc_create_common(&cv8_symhead_bc_callback, head, 0);
+ if (first)
+ bc->len = 12;
+ else
+ bc->len = 8;
+
+ head->end_prevbc = bc;
+ yasm_cv__append_bc(sect, bc);
+ return head;
+}
+
+static void
+cv8_set_symhead_end(cv8_symhead *head, yasm_bytecode *end_prevbc)
+{
+ head->end_prevbc = end_prevbc;
+}
+
+static void
+cv8_symhead_bc_destroy(void *contents)
+{
+ yasm_xfree(contents);
+}
+
+static void
+cv8_symhead_bc_print(const void *contents, FILE *f, int indent_level)
+{
+ /* TODO */
+}
+
+static int
+cv8_symhead_bc_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
+ void *add_span_data)
+{
+ yasm_internal_error(N_("tried to calc_len a codeview symhead bytecode"));
+ /*@notreached@*/
+ return 0;
+}
+
+static int
+cv8_symhead_bc_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ yasm_output_reloc_func output_reloc)
+{
+ cv8_symhead *head = (cv8_symhead *)bc->contents;
+ yasm_dbgfmt_cv *dbgfmt_cv = head->dbgfmt_cv;
+ unsigned char *buf = *bufp;
+ yasm_intnum *intn, *cval;
+
+ cval = yasm_intnum_create_uint(4);
+ /* Output "version" if first */
+ if (head->first) {
+ yasm_arch_intnum_tobytes(dbgfmt_cv->arch, cval, buf, 4, 32, 0, bc, 0);
+ buf += 4;
+ }
+
+ /* Type contained - 4 bytes */
+ yasm_intnum_set_uint(cval, head->type);
+ yasm_arch_intnum_tobytes(dbgfmt_cv->arch, cval, buf, 4, 32, 0, bc, 0);
+ buf += 4;
+
+ /* Total length of info (following this field) - 4 bytes */
+ yasm_intnum_set_uint(cval, bc->len);
+ intn = yasm_common_calc_bc_dist(head->start_prevbc, head->end_prevbc);
+ yasm_intnum_calc(intn, YASM_EXPR_SUB, cval);
+ yasm_arch_intnum_tobytes(dbgfmt_cv->arch, intn, buf, 4, 32, 0, bc, 0);
+ buf += 4;
+ yasm_intnum_destroy(intn);
+
+ *bufp = buf;
+
+ yasm_intnum_destroy(cval);
+ return 0;
+}
+
+static yasm_bytecode *
+cv8_add_fileinfo(yasm_dbgfmt_cv *dbgfmt_cv, yasm_section *sect,
+ const cv_filename *fn)
+{
+ cv8_fileinfo *fi;
+ yasm_bytecode *bc;
+
+ fi = yasm_xmalloc(sizeof(cv8_fileinfo));
+ fi->dbgfmt_cv = dbgfmt_cv;
+ fi->fn = fn;
+
+ bc = yasm_bc_create_common(&cv8_fileinfo_bc_callback, fi, 0);
+ bc->len = 24;
+
+ yasm_cv__append_bc(sect, bc);
+ return bc;
+}
+
+static void
+cv8_fileinfo_bc_destroy(void *contents)
+{
+ yasm_xfree(contents);
+}
+
+static void
+cv8_fileinfo_bc_print(const void *contents, FILE *f, int indent_level)
+{
+ /* TODO */
+}
+
+static int
+cv8_fileinfo_bc_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
+ void *add_span_data)
+{
+ yasm_internal_error(N_("tried to calc_len a codeview fileinfo bytecode"));
+ /*@notreached@*/
+ return 0;
+}
+
+static int
+cv8_fileinfo_bc_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ yasm_output_reloc_func output_reloc)
+{
+ cv8_fileinfo *fi = (cv8_fileinfo *)bc->contents;
+ yasm_dbgfmt_cv *dbgfmt_cv = fi->dbgfmt_cv;
+ unsigned char *buf = *bufp;
+ yasm_intnum *cval;
+ int i;
+
+ /* Offset in filename string table */
+ cval = yasm_intnum_create_uint(fi->fn->str_off);
+ yasm_arch_intnum_tobytes(dbgfmt_cv->arch, cval, buf, 4, 32, 0, bc, 0);
+ buf += 4;
+
+ /* Checksum type/length */
+ yasm_intnum_set_uint(cval, 0x0110);
+ yasm_arch_intnum_tobytes(dbgfmt_cv->arch, cval, buf, 2, 16, 0, bc, 0);
+ buf += 2;
+
+ /* Checksum */
+ for (i=0; i<16; i++)
+ YASM_WRITE_8(buf, fi->fn->digest[i]);
+
+ /* Pad */
+ YASM_WRITE_8(buf, 0);
+ YASM_WRITE_8(buf, 0);
+
+ *bufp = buf;
+
+ yasm_intnum_destroy(cval);
+ return 0;
+}
+
+static void
+cv8_lineinfo_bc_destroy(void *contents)
+{
+ cv8_lineinfo *li = (cv8_lineinfo *)contents;
+ cv8_lineset *ls1, *ls2;
+
+ /* delete line sets */
+ ls1 = STAILQ_FIRST(&li->linesets);
+ while (ls1) {
+ ls2 = STAILQ_NEXT(ls1, link);
+ yasm_xfree(ls1);
+ ls1 = ls2;
+ }
+
+ yasm_xfree(contents);
+}
+
+static void
+cv8_lineinfo_bc_print(const void *contents, FILE *f, int indent_level)
+{
+ /* TODO */
+}
+
+static int
+cv8_lineinfo_bc_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
+ void *add_span_data)
+{
+ yasm_internal_error(N_("tried to calc_len a codeview linehead bytecode"));
+ /*@notreached@*/
+ return 0;
+}
+
+static int
+cv8_lineinfo_bc_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ yasm_output_reloc_func output_reloc)
+{
+ cv8_lineinfo *li = (cv8_lineinfo *)bc->contents;
+ yasm_dbgfmt_cv *dbgfmt_cv = li->dbgfmt_cv;
+ unsigned char *buf = *bufp;
+ yasm_intnum *cval;
+ unsigned long i;
+ cv8_lineset *ls;
+
+ /* start offset and section */
+ cv_out_sym(li->sectsym, 0, bc, &buf, d, output_value);
+
+ /* Two bytes of pad/alignment */
+ YASM_WRITE_8(buf, 0);
+ YASM_WRITE_8(buf, 0);
+
+ /* Section length covered by line number info */
+ cval = yasm_common_calc_bc_dist(yasm_section_bcs_first(li->sect),
+ yasm_section_bcs_last(li->sect));
+ yasm_arch_intnum_tobytes(dbgfmt_cv->arch, cval, buf, 4, 32, 0, bc, 0);
+ buf += 4;
+
+ /* Offset of source file in info table */
+ yasm_intnum_set_uint(cval, li->fn->info_off);
+ yasm_arch_intnum_tobytes(dbgfmt_cv->arch, cval, buf, 4, 32, 0, bc, 0);
+ buf += 4;
+
+ /* Number of line number pairs */
+ yasm_intnum_set_uint(cval, li->num_linenums);
+ yasm_arch_intnum_tobytes(dbgfmt_cv->arch, cval, buf, 4, 32, 0, bc, 0);
+ buf += 4;
+
+ /* Number of bytes of line number pairs + 12 (no, I don't know why) */
+ yasm_intnum_set_uint(cval, li->num_linenums*8+12);
+ yasm_arch_intnum_tobytes(dbgfmt_cv->arch, cval, buf, 4, 32, 0, bc, 0);
+ buf += 4;
+
+ /* Offset / line number pairs */
+ i = 0;
+ STAILQ_FOREACH(ls, &li->linesets, link) {
+ unsigned long j;
+ for (j=0; i<li->num_linenums && j<126; i++, j++) {
+ /* offset in section */
+ yasm_intnum_set_uint(cval, ls->pairs[j].offset);
+ yasm_arch_intnum_tobytes(dbgfmt_cv->arch, cval, buf, 4, 32, 0, bc,
+ 0);
+ buf += 4;
+
+ /* line number in file */
+ yasm_intnum_set_uint(cval, ls->pairs[j].line);
+ yasm_arch_intnum_tobytes(dbgfmt_cv->arch, cval, buf, 4, 32, 0, bc,
+ 0);
+ buf += 4;
+ }
+ }
+
+ *bufp = buf;
+
+ yasm_intnum_destroy(cval);
+ return 0;
+}
+
+static unsigned long
+cv_sym_size(const cv_sym *cvs)
+{
+ const char *ch = cvs->format;
+ unsigned long len = 4; /* sym length and type */
+ unsigned long slen;
+ int arg = 0;
+
+ while (*ch) {
+ switch (*ch) {
+ case 'b':
+ len++;
+ arg++;
+ break;
+ case 'h':
+ len += 2;
+ arg++;
+ break;
+ case 'w':
+ len += 4;
+ arg++;
+ break;
+ case 'Y':
+ len += 6; /* XXX: will be 4 in 16-bit version */
+ arg++;
+ break;
+ case 'T':
+ len += 4; /* XXX: will be 2 in CV4 */
+ arg++;
+ break;
+ case 'S':
+ len += 1; /* XXX: is this 1 or 2? */
+ slen = strlen((const char *)cvs->args[arg++].p);
+ len += slen <= 0xff ? slen : 0xff;
+ break;
+ case 'Z':
+ len += strlen((const char *)cvs->args[arg++].p) + 1;
+ break;
+ default:
+ yasm_internal_error(N_("unknown sym format character"));
+ }
+ ch++;
+ }
+
+ return len;
+}
+
+static void
+cv_sym_bc_destroy(void *contents)
+{
+ cv_sym *cvs = (cv_sym *)contents;
+ const char *ch = cvs->format;
+ int arg = 0;
+
+ while (*ch) {
+ switch (*ch) {
+ case 'b':
+ case 'h':
+ case 'w':
+ case 'Y':
+ case 'T':
+ arg++;
+ break; /* nothing to destroy */
+ case 'S':
+ case 'Z':
+ yasm_xfree(cvs->args[arg++].p);
+ break;
+ default:
+ yasm_internal_error(N_("unknown sym format character"));
+ }
+ ch++;
+ }
+
+ yasm_xfree(contents);
+}
+
+static void
+cv_sym_bc_print(const void *contents, FILE *f, int indent_level)
+{
+ /* TODO */
+}
+
+static int
+cv_sym_bc_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
+ void *add_span_data)
+{
+ yasm_internal_error(N_("tried to calc_len a codeview sym bytecode"));
+ /*@notreached@*/
+ return 0;
+}
+
+static int
+cv_sym_bc_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ yasm_output_reloc_func output_reloc)
+{
+ cv_sym *cvs = (cv_sym *)bc->contents;
+ yasm_dbgfmt_cv *dbgfmt_cv = cvs->dbgfmt_cv;
+ unsigned char *buf = *bufp;
+ yasm_intnum *cval;
+ const char *ch = cvs->format;
+ size_t len;
+ int arg = 0;
+
+ /* Total length of record (following this field) - 2 bytes */
+ cval = yasm_intnum_create_uint(bc->len-2);
+ yasm_arch_intnum_tobytes(dbgfmt_cv->arch, cval, buf, 2, 16, 0, bc, 1);
+ buf += 2;
+
+ /* Type contained - 2 bytes */
+ yasm_intnum_set_uint(cval, cvs->type);
+ yasm_arch_intnum_tobytes(dbgfmt_cv->arch, cval, buf, 2, 16, 0, bc, 0);
+ buf += 2;
+
+ while (*ch) {
+ switch (*ch) {
+ case 'b':
+ YASM_WRITE_8(buf, cvs->args[arg].i);
+ arg++;
+ break;
+ case 'h':
+ yasm_intnum_set_uint(cval, cvs->args[arg++].i);
+ yasm_arch_intnum_tobytes(dbgfmt_cv->arch, cval, buf, 2, 16, 0,
+ bc, 0);
+ buf += 2;
+ break;
+ case 'w':
+ yasm_intnum_set_uint(cval, cvs->args[arg++].i);
+ yasm_arch_intnum_tobytes(dbgfmt_cv->arch, cval, buf, 4, 32, 0,
+ bc, 0);
+ buf += 4;
+ break;
+ case 'Y':
+ cv_out_sym((yasm_symrec *)cvs->args[arg++].p,
+ (unsigned long)(buf-(*bufp)), bc, &buf, d,
+ output_value);
+ break;
+ case 'T':
+ yasm_intnum_set_uint(cval, cvs->args[arg++].i);
+ yasm_arch_intnum_tobytes(dbgfmt_cv->arch, cval, buf, 4, 32, 0,
+ bc, 0);
+ buf += 4; /* XXX: will be 2 in CV4 */
+ break;
+ case 'S':
+ len = strlen((char *)cvs->args[arg].p);
+ len = len <= 0xff ? len : 0xff;
+ YASM_WRITE_8(buf, len);
+ memcpy(buf, (char *)cvs->args[arg].p, len);
+ buf += len;
+ arg++;
+ break;
+ case 'Z':
+ len = strlen((char *)cvs->args[arg].p)+1;
+ memcpy(buf, (char *)cvs->args[arg].p, len);
+ buf += len;
+ arg++;
+ break;
+ default:
+ yasm_internal_error(N_("unknown leaf format character"));
+ }
+ ch++;
+ }
+
+ *bufp = buf;
+
+ yasm_intnum_destroy(cval);
+ return 0;
+}
diff --git a/modules/dbgfmts/codeview/cv-type.c b/modules/dbgfmts/codeview/cv-type.c
new file mode 100644
index 00000000..c5d049cb
--- /dev/null
+++ b/modules/dbgfmts/codeview/cv-type.c
@@ -0,0 +1,781 @@
+/*
+ * CodeView debugging format - type information
+ *
+ * Copyright (C) 2006 Peter Johnson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the author nor the names of other contributors
+ * may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <util.h>
+/*@unused@*/ RCSID("$Id$");
+
+#define YASM_LIB_INTERNAL
+#define YASM_BC_INTERNAL
+#include <libyasm.h>
+
+#include "cv-dbgfmt.h"
+
+enum cv_reservedtype {
+ /* Bitfields representation - type */
+ CV_TYPE_SPECIAL = 0x00<<4, /* Special */
+ CV_TYPE_SIGNED = 0x01<<4, /* Signed integral value */
+ CV_TYPE_UNSIGNED = 0x02<<4, /* Unsigned integral value */
+ CV_TYPE_BOOLEAN = 0x03<<4, /* Boolean */
+ CV_TYPE_REAL = 0x04<<4, /* Real */
+ CV_TYPE_COMPLEX = 0x05<<4, /* Complex */
+ CV_TYPE_SPECIAL2 = 0x06<<4, /* Special2 */
+ CV_TYPE_REALINT = 0x07<<4, /* Really int value */
+
+ /* "size" of CV_TYPE_SPECIAL */
+ CV_SPECIAL_NOTYPE = 0x00<<0, /* No type */
+ CV_SPECIAL_ABS = 0x01<<0, /* Absolute symbol */
+ CV_SPECIAL_SEG = 0x02<<0, /* Segment */
+ CV_SPECIAL_VOID = 0x03<<0, /* Void */
+ CV_SPECIAL_CURRENCY = 0x04<<0, /* Basic 8-byte currency value */
+ CV_SPECIAL_NEARBSTR = 0x05<<0, /* Near Basic string */
+ CV_SPECIAL_FARBSTR = 0x06<<0, /* Far Basic string */
+
+ /* Size of CV_TYPE_SIGNED, CV_TYPE_UNSIGNED, and CV_TYPE_BOOLEAN */
+ CV_INTEGER_1BYTE = 0x00<<0, /* 1 byte */
+ CV_INTEGER_2BYTE = 0x01<<0, /* 2 byte */
+ CV_INTEGER_4BYTE = 0x02<<0, /* 4 byte */
+ CV_INTEGER_8BYTE = 0x03<<0, /* 8 byte */
+
+ /* Size of CV_TYPE_REAL and CV_TYPE_COMPLEX */
+ CV_REAL_32BIT = 0x00<<0, /* 32 bit */
+ CV_REAL_64BIT = 0x01<<0, /* 64 bit */
+ CV_REAL_80BIT = 0x02<<0, /* 80 bit */
+ CV_REAL_128BIT = 0x03<<0, /* 128 bit */
+ CV_REAL_48BIT = 0x04<<0, /* 48 bit */
+
+ /* "size" of CV_TYPE_SPECIAL2 */
+ CV_SPECIAL2_BIT = 0x00<<0, /* Bit */
+ CV_SPECIAL2_PASCHAR = 0x01<<0, /* Pascal CHAR */
+
+ /* Size of CV_TYPE_REALINT */
+ CV_REALINT_CHAR = 0x00<<0, /* Char */
+ CV_REALINT_WCHAR = 0x01<<0, /* Wide character */
+ CV_REALINT_S2BYTE = 0x02<<0, /* 2-byte signed integer */
+ CV_REALINT_U2BYTE = 0x03<<0, /* 2-byte unsigned integer */
+ CV_REALINT_S4BYTE = 0x04<<0, /* 4-byte signed integer */
+ CV_REALINT_U4BYTE = 0x05<<0, /* 4-byte unsigned integer */
+ CV_REALINT_S8BYTE = 0x06<<0, /* 8-byte signed integer */
+ CV_REALINT_U8BYTE = 0x07<<0, /* 8-byte unsigned integer */
+
+ /* Mode */
+ CV_MODE_DIRECT = 0x00<<8, /* Direct; not a pointer */
+ CV_MODE_NEAR = 0x01<<8, /* Near pointer */
+ CV_MODE_FAR = 0x02<<8, /* Far pointer */
+ CV_MODE_HUGE = 0x03<<8, /* Huge pointer */
+ CV_MODE_NEAR32 = 0x04<<8, /* 32-bit near pointer */
+ CV_MODE_FAR32 = 0x05<<8, /* 32-bit far pointer */
+ CV_MODE_NEAR64 = 0x06<<8, /* 64-bit near pointer */
+
+ /* Pure primitive type listing - based on above bitfields */
+
+ /* Special Types */
+ CV_T_NOTYPE = 0x0000, /* Uncharacterized type (no type) */
+ CV_T_ABS = 0x0001, /* Absolute symbol */
+ CV_T_SEGMENT = 0x0002, /* Segment type */
+ CV_T_VOID = 0x0003, /* Void */
+ CV_T_PVOID = 0x0103, /* Near pointer to void */
+ CV_T_PFVOID = 0x0203, /* Far pointer to void */
+ CV_T_PHVOID = 0x0303, /* Huge pointer to void */
+ CV_T_32PVOID = 0x0403, /* 32-bit near pointer to void */
+ CV_T_32PFVOID = 0x0503, /* 32-bit far pointer to void */
+ CV_T_CURRENCY = 0x0004, /* Basic 8-byte currency value */
+ CV_T_NBASICSTR = 0x0005, /* Near Basic string */
+ CV_T_FBASICSTR = 0x0006, /* Far Basic string */
+ CV_T_BIT = 0x0060, /* Bit */
+ CV_T_PASCHAR = 0x0061, /* Pascal CHAR */
+ /* Character Types */
+ CV_T_CHAR = 0x0010, /* 8-bit signed */
+ CV_T_UCHAR = 0x0020, /* 8-bit unsigned */
+ CV_T_PCHAR = 0x0110, /* Near pointer to 8-bit signed */
+ CV_T_PUCHAR = 0x0120, /* Near pointer to 8-bit unsigned */
+ CV_T_PFCHAR = 0x0210, /* Far pointer to 8-bit signed */
+ CV_T_PFUCHAR = 0x0220, /* Far pointer to 8-bit unsigned */
+ CV_T_PHCHAR = 0x0310, /* Huge pointer to 8-bit signed */
+ CV_T_PHUCHAR = 0x0320, /* Huge pointer to 8-bit unsigned */
+ CV_T_32PCHAR = 0x0410, /* 16:32 near pointer to 8-bit signed */
+ CV_T_32PUCHAR = 0x0420, /* 16:32 near pointer to 8-bit unsigned */
+ CV_T_32PFCHAR = 0x0510, /* 16:32 far pointer to 8-bit signed */
+ CV_T_32PFUCHAR = 0x0520, /* 16:32 far pointer to 8-bit unsigned */
+ /* Real Character Types */
+ CV_T_RCHAR = 0x0070, /* Real char */
+ CV_T_PRCHAR = 0x0170, /* Near pointer to a real char */
+ CV_T_PFRCHAR = 0x0270, /* Far pointer to a real char */
+ CV_T_PHRCHAR = 0x0370, /* Huge pointer to a real char */
+ CV_T_32PRCHAR = 0x0470, /* 16:32 near pointer to a real char */
+ CV_T_32PFRCHAR = 0x0570, /* 16:32 far pointer to a real char */
+ /* Wide Character Types */
+ CV_T_WCHAR = 0x0071, /* Wide char */
+ CV_T_PWCHAR = 0x0171, /* Near pointer to a wide char */
+ CV_T_PFWCHAR = 0x0271, /* Far pointer to a wide char */
+ CV_T_PHWCHAR = 0x0371, /* Huge pointer to a wide char */
+ CV_T_32PWCHAR = 0x0471, /* 16:32 near pointer to a wide char */
+ CV_T_32PFWCHAR = 0x0571, /* 16:32 far pointer to a wide char */
+ /* Real 16-bit Integer Types */
+ CV_T_INT2 = 0x0072, /* Real 16-bit signed int */
+ CV_T_UINT2 = 0x0073, /* Real 16-bit unsigned int */
+ CV_T_PINT2 = 0x0172, /* Near pointer to 16-bit signed int */
+ CV_T_PUINT2 = 0x0173, /* Near pointer to 16-bit unsigned int */
+ CV_T_PFINT2 = 0x0272, /* Far pointer to 16-bit signed int */
+ CV_T_PFUINT2 = 0x0273, /* Far pointer to 16-bit unsigned int */
+ CV_T_PHINT2 = 0x0372, /* Huge pointer to 16-bit signed int */
+ CV_T_PHUINT2 = 0x0373, /* Huge pointer to 16-bit unsigned int */
+ CV_T_32PINT2 = 0x0472, /* 16:32 near pointer to 16-bit signed int */
+ CV_T_32PUINT2 = 0x0473, /* 16:32 near pointer to 16-bit unsigned int */
+ CV_T_32PFINT2 = 0x0572, /* 16:32 far pointer to 16-bit signed int */
+ CV_T_32PFUINT2 = 0x0573, /* 16:32 far pointer to 16-bit unsigned int */
+ /* 16-bit Short Types */
+ CV_T_SHORT = 0x0011, /* 16-bit signed */
+ CV_T_USHORT = 0x0021, /* 16-bit unsigned */
+ CV_T_PSHORT = 0x0111, /* Near pointer to 16-bit signed */
+ CV_T_PUSHORT = 0x0121, /* Near pointer to 16-bit unsigned */
+ CV_T_PFSHORT = 0x0211, /* Far pointer to 16-bit signed */
+ CV_T_PFUSHORT = 0x0221, /* Far pointer to 16-bit unsigned */
+ CV_T_PHSHORT = 0x0311, /* Huge pointer to 16-bit signed */
+ CV_T_PHUSHORT = 0x0321, /* Huge pointer to 16-bit unsigned */
+ CV_T_32PSHORT = 0x0411, /* 16:32 near pointer to 16-bit signed */
+ CV_T_32PUSHORT = 0x0421, /* 16:32 near pointer to 16-bit unsigned */
+ CV_T_32PFSHORT = 0x0511, /* 16:32 far pointer to 16-bit signed */
+ CV_T_32PFUSHORT = 0x0521, /* 16:32 far pointer to 16-bit unsigned */
+ /* Real 32-bit Integer Types */
+ CV_T_INT4 = 0x0074, /* Real 32-bit signed int */
+ CV_T_UINT4 = 0x0075, /* Real 32-bit unsigned int */
+ CV_T_PINT4 = 0x0174, /* Near pointer to 32-bit signed int */
+ CV_T_PUINT4 = 0x0175, /* Near pointer to 32-bit unsigned int */
+ CV_T_PFINT4 = 0x0274, /* Far pointer to 32-bit signed int */
+ CV_T_PFUINT4 = 0x0275, /* Far pointer to 32-bit unsigned int */
+ CV_T_PHINT4 = 0x0374, /* Huge pointer to 32-bit signed int */
+ CV_T_PHUINT4 = 0x0375, /* Huge pointer to 32-bit unsigned int */
+ CV_T_32PINT4 = 0x0474, /* 16:32 near pointer to 32-bit signed int */
+ CV_T_32PUINT4 = 0x0475, /* 16:32 near pointer to 32-bit unsigned int */
+ CV_T_32PFINT4 = 0x0574, /* 16:32 far pointer to 32-bit signed int */
+ CV_T_32PFUINT4 = 0x0575, /* 16:32 far pointer to 32-bit unsigned int */
+ /* 32-bit Long Types */
+ CV_T_LONG = 0x0012, /* 32-bit signed */
+ CV_T_ULONG = 0x0022, /* 32-bit unsigned */
+ CV_T_PLONG = 0x0112, /* Near pointer to 32-bit signed */
+ CV_T_PULONG = 0x0122, /* Near pointer to 32-bit unsigned */
+ CV_T_PFLONG = 0x0212, /* Far pointer to 32-bit signed */
+ CV_T_PFULONG = 0x0222, /* Far pointer to 32-bit unsigned */
+ CV_T_PHLONG = 0x0312, /* Huge pointer to 32-bit signed */
+ CV_T_PHULONG = 0x0322, /* Huge pointer to 32-bit unsigned */
+ CV_T_32PLONG = 0x0412, /* 16:32 near pointer to 32-bit signed */
+ CV_T_32PULONG = 0x0422, /* 16:32 near pointer to 32-bit unsigned */
+ CV_T_32PFLONG = 0x0512, /* 16:32 far pointer to 32-bit signed */
+ CV_T_32PFULONG = 0x0522, /* 16:32 far pointer to 32-bit unsigned */
+ /* Real 64-bit int Types */
+ CV_T_INT8 = 0x0076, /* 64-bit signed int */
+ CV_T_UINT8 = 0x0077, /* 64-bit unsigned int */
+ CV_T_PINT8 = 0x0176, /* Near pointer to 64-bit signed int */
+ CV_T_PUINT8 = 0x0177, /* Near pointer to 64-bit unsigned int */
+ CV_T_PFINT8 = 0x0276, /* Far pointer to 64-bit signed int */
+ CV_T_PFUINT8 = 0x0277, /* Far pointer to 64-bit unsigned int */
+ CV_T_PHINT8 = 0x0376, /* Huge pointer to 64-bit signed int */
+ CV_T_PHUINT8 = 0x0377, /* Huge pointer to 64-bit unsigned int */
+ CV_T_32PINT8 = 0x0476, /* 16:32 near pointer to 64-bit signed int */
+ CV_T_32PUINT8 = 0x0477, /* 16:32 near pointer to 64-bit unsigned int */
+ CV_T_32PFINT8 = 0x0576, /* 16:32 far pointer to 64-bit signed int */
+ CV_T_32PFUINT8 = 0x0577, /* 16:32 far pointer to 64-bit unsigned int */
+ /* 64-bit Integral Types */
+ CV_T_QUAD = 0x0013, /* 64-bit signed */
+ CV_T_UQUAD = 0x0023, /* 64-bit unsigned */
+ CV_T_PQUAD = 0x0113, /* Near pointer to 64-bit signed */
+ CV_T_PUQUAD = 0x0123, /* Near pointer to 64-bit unsigned */
+ CV_T_PFQUAD = 0x0213, /* Far pointer to 64-bit signed */
+ CV_T_PFUQUAD = 0x0223, /* Far pointer to 64-bit unsigned */
+ CV_T_PHQUAD = 0x0313, /* Huge pointer to 64-bit signed */
+ CV_T_PHUQUAD = 0x0323, /* Huge pointer to 64-bit unsigned */
+ CV_T_32PQUAD = 0x0413, /* 16:32 near pointer to 64-bit signed */
+ CV_T_32PUQUAD = 0x0423, /* 16:32 near pointer to 64-bit unsigned */
+ CV_T_32PFQUAD = 0x0513, /* 16:32 far pointer to 64-bit signed */
+ CV_T_32PFUQUAD = 0x0523, /* 16:32 far pointer to 64-bit unsigned */
+ /* 32-bit Real Types */
+ CV_T_REAL32 = 0x0040, /* 32-bit real */
+ CV_T_PREAL32 = 0x0140, /* Near pointer to 32-bit real */
+ CV_T_PFREAL32 = 0x0240, /* Far pointer to 32-bit real */
+ CV_T_PHREAL32 = 0x0340, /* Huge pointer to 32-bit real */
+ CV_T_32PREAL32 = 0x0440, /* 16:32 near pointer to 32-bit real */
+ CV_T_32PFREAL32 = 0x0540, /* 16:32 far pointer to 32-bit real */
+ /* 48-bit Real Types */
+ CV_T_REAL48 = 0x0044, /* 48-bit real */
+ CV_T_PREAL48 = 0x0144, /* Near pointer to 48-bit real */
+ CV_T_PFREAL48 = 0x0244, /* Far pointer to 48-bit real */
+ CV_T_PHREAL48 = 0x0344, /* Huge pointer to 48-bit real */
+ CV_T_32PREAL48 = 0x0444, /* 16:32 near pointer to 48-bit real */
+ CV_T_32PFREAL48 = 0x0544, /* 16:32 far pointer to 48-bit real */
+ /* 64-bit Real Types */
+ CV_T_REAL64 = 0x0041, /* 64-bit real */
+ CV_T_PREAL64 = 0x0141, /* Near pointer to 64-bit real */
+ CV_T_PFREAL64 = 0x0241, /* Far pointer to 64-bit real */
+ CV_T_PHREAL64 = 0x0341, /* Huge pointer to 64-bit real */
+ CV_T_32PREAL64 = 0x0441, /* 16:32 near pointer to 64-bit real */
+ CV_T_32PFREAL64 = 0x0541, /* 16:32 far pointer to 64-bit real */
+ /* 80-bit Real Types */
+ CV_T_REAL80 = 0x0042, /* 80-bit real */
+ CV_T_PREAL80 = 0x0142, /* Near pointer to 80-bit real */
+ CV_T_PFREAL80 = 0x0242, /* Far pointer to 80-bit real */
+ CV_T_PHREAL80 = 0x0342, /* Huge pointer to 80-bit real */
+ CV_T_32PREAL80 = 0x0442, /* 16:32 near pointer to 80-bit real */
+ CV_T_32PFREAL80 = 0x0542, /* 16:32 far pointer to 80-bit real */
+ /* 128-bit Real Types */
+ CV_T_REAL128 = 0x0043, /* 128-bit real */
+ CV_T_PREAL128 = 0x0143, /* Near pointer to 128-bit real */
+ CV_T_PFREAL128 = 0x0243, /* Far pointer to 128-bit real */
+ CV_T_PHREAL128 = 0x0343, /* Huge pointer to 128-bit real */
+ CV_T_32PREAL128 = 0x0443, /* 16:32 near pointer to 128-bit real */
+ CV_T_32PFREAL128 = 0x0543, /* 16:32 far pointer to 128-bit real */
+ /* 32-bit Complex Types */
+ CV_T_CPLX32 = 0x0050, /* 32-bit complex */
+ CV_T_PCPLX32 = 0x0150, /* Near pointer to 32-bit complex */
+ CV_T_PFCPLX32 = 0x0250, /* Far pointer to 32-bit complex */
+ CV_T_PHCPLX32 = 0x0350, /* Huge pointer to 32-bit complex */
+ CV_T_32PCPLX32 = 0x0450, /* 16:32 near pointer to 32-bit complex */
+ CV_T_32PFCPLX32 = 0x0550, /* 16:32 far pointer to 32-bit complex */
+ /* 64-bit Complex Types */
+ CV_T_CPLX64 = 0x0051, /* 64-bit complex */
+ CV_T_PCPLX64 = 0x0151, /* Near pointer to 64-bit complex */
+ CV_T_PFCPLX64 = 0x0251, /* Far pointer to 64-bit complex */
+ CV_T_PHCPLX64 = 0x0351, /* Huge pointer to 64-bit complex */
+ CV_T_32PCPLX64 = 0x0451, /* 16:32 near pointer to 64-bit complex */
+ CV_T_32PFCPLX64 = 0x0551, /* 16:32 far pointer to 64-bit complex */
+ /* 80-bit Complex Types */
+ CV_T_CPLX80 = 0x0052, /* 80-bit complex */
+ CV_T_PCPLX80 = 0x0152, /* Near pointer to 80-bit complex */
+ CV_T_PFCPLX80 = 0x0252, /* Far pointer to 80-bit complex */
+ CV_T_PHCPLX80 = 0x0352, /* Huge pointer to 80-bit complex */
+ CV_T_32PCPLX80 = 0x0452, /* 16:32 near pointer to 80-bit complex */
+ CV_T_32PFCPLX80 = 0x0552, /* 16:32 far pointer to 80-bit complex */
+ /* 128-bit Complex Types */
+ CV_T_CPLX128 = 0x0053, /* 128-bit complex */
+ CV_T_PCPLX128 = 0x0153, /* Near pointer to 128-bit complex */
+ CV_T_PFCPLX128 = 0x0253, /* Far pointer to 128-bit complex */
+ CV_T_PHCPLX128 = 0x0353, /* Huge pointer to 128-bit real */
+ CV_T_32PCPLX128 = 0x0453, /* 16:32 near pointer to 128-bit complex */
+ CV_T_32PFCPLX128 = 0x0553, /* 16:32 far pointer to 128-bit complex */
+ /* Boolean Types */
+ CV_T_BOOL08 = 0x0030, /* 8-bit Boolean */
+ CV_T_BOOL16 = 0x0031, /* 16-bit Boolean */
+ CV_T_BOOL32 = 0x0032, /* 32-bit Boolean */
+ CV_T_BOOL64 = 0x0033, /* 64-bit Boolean */
+ CV_T_PBOOL08 = 0x0130, /* Near pointer to 8-bit Boolean */
+ CV_T_PBOOL16 = 0x0131, /* Near pointer to 16-bit Boolean */
+ CV_T_PBOOL32 = 0x0132, /* Near pointer to 32-bit Boolean */
+ CV_T_PBOOL64 = 0x0133, /* Near pointer to 64-bit Boolean */
+ CV_T_PFBOOL08 = 0x0230, /* Far pointer to 8-bit Boolean */
+ CV_T_PFBOOL16 = 0x0231, /* Far pointer to 16-bit Boolean */
+ CV_T_PFBOOL32 = 0x0232, /* Far pointer to 32-bit Boolean */
+ CV_T_PFBOOL64 = 0x0233, /* Far pointer to 64-bit Boolean */
+ CV_T_PHBOOL08 = 0x0330, /* Huge pointer to 8-bit Boolean */
+ CV_T_PHBOOL16 = 0x0331, /* Huge pointer to 16-bit Boolean */
+ CV_T_PHBOOL32 = 0x0332, /* Huge pointer to 32-bit Boolean */
+ CV_T_PHBOOL64 = 0x0333, /* Huge pointer to 64-bit Boolean */
+ CV_T_32PBOOL08 = 0x0430, /* 16:32 near pointer to 8-bit Boolean */
+ CV_T_32PBOOL16 = 0x0431, /* 16:32 near pointer to 16-bit Boolean */
+ CV_T_32PBOOL32 = 0x0432, /* 16:32 near pointer to 32-bit Boolean */
+ CV_T_32PBOOL64 = 0x0433, /* 16:32 near pointer to 64-bit Boolean */
+ CV_T_32PFBOOL08 = 0x0530, /* 16:32 far pointer to 8-bit Boolean */
+ CV_T_32PFBOOL16 = 0x0531, /* 16:32 far pointer to 16-bit Boolean */
+ CV_T_32PFBOOL32 = 0x0532, /* 16:32 far pointer to 32-bit Boolean */
+ CV_T_32PFBOOL64 = 0x0533, /* 16:32 far pointer to 64-bit Boolean */
+
+ /* Non-primitive types are stored in the TYPES section (generated in
+ * cv-type.c) and start at this index (e.g. 0x1000 is the first type
+ * in TYPES, 0x1001 the second, etc.
+ */
+ CV_FIRST_NONPRIM = 0x1000
+};
+
+enum cv_leaftype {
+ /* Leaf indices for type records that can be referenced from symbols */
+ CV4_LF_MODIFIER = 0x0001, /* Type Modifier */
+ CV4_LF_POINTER = 0x0002, /* Pointer */
+ CV4_LF_ARRAY = 0x0003, /* Simple Array */
+ CV4_LF_CLASS = 0x0004, /* Classes */
+ CV4_LF_STRUCTURE = 0x0005, /* Structures */
+ CV4_LF_UNION = 0x0006, /* Unions */
+ CV4_LF_ENUM = 0x0007, /* Enumeration */
+ CV4_LF_PROCEDURE = 0x0008, /* Procedure */
+ CV4_LF_MFUNCTION = 0x0009, /* Member Function */
+ CV4_LF_VTSHAPE = 0x000a, /* Virtual Function Table Shape */
+ CV4_LF_BARRAY = 0x000d, /* Basic Array */
+ CV4_LF_LABEL = 0x000e, /* Label */
+ CV4_LF_NULL = 0x000f, /* Null */
+ CV4_LF_DIMARRAY = 0x0011, /* Multiply Dimensioned Array */
+ CV4_LF_VFTPATH = 0x0012, /* Path to Virtual Function Table */
+ CV4_LF_PRECOMP = 0x0013, /* Reference Precompiled Types */
+ CV4_LF_ENDPRECOMP = 0x0014, /* End of Precompiled Types */
+
+ /* CodeView 5.0 version */
+ CV5_LF_MODIFIER = 0x1001, /* Type Modifier */
+ CV5_LF_POINTER = 0x1002, /* Pointer */
+ CV5_LF_ARRAY = 0x1003, /* Simple Array */
+ CV5_LF_CLASS = 0x1004, /* Classes */
+ CV5_LF_STRUCTURE = 0x1005, /* Structures */
+ CV5_LF_UNION = 0x1006, /* Unions */
+ CV5_LF_ENUM = 0x1007, /* Enumeration */
+ CV5_LF_PROCEDURE = 0x1008, /* Procedure */
+ CV5_LF_MFUNCTION = 0x1009, /* Member Function */
+ CV5_LF_VTSHAPE = 0x000a, /* Virtual Function Table Shape */
+ CV5_LF_BARRAY = 0x100d, /* Basic Array */
+ CV5_LF_LABEL = 0x000e, /* Label */
+ CV5_LF_NULL = 0x000f, /* Null */
+ CV5_LF_DIMARRAY = 0x100c, /* Multiply Dimensioned Array */
+ CV5_LF_VFTPATH = 0x100d, /* Path to Virtual Function Table */
+ CV5_LF_PRECOMP = 0x100e, /* Reference Precompiled Types */
+ CV5_LF_ENDPRECOMP = 0x0014, /* End of Precompiled Types */
+ CV5_LF_TYPESERVER = 0x0016, /* Reference Typeserver */
+
+ /* Leaf indices for type records that can be referenced from other type
+ * records
+ */
+ CV4_LF_SKIP = 0x0200, /* Skip */
+ CV4_LF_ARGLIST = 0x0201, /* Argument List */
+ CV4_LF_DEFARG = 0x0202, /* Default Argument */
+ CV4_LF_LIST = 0x0203, /* Arbitrary List */
+ CV4_LF_FIELDLIST = 0x0204, /* Field List */
+ CV4_LF_DERIVED = 0x0205, /* Derived Classes */
+ CV4_LF_BITFIELD = 0x0206, /* Bit Fields */
+ CV4_LF_METHODLIST = 0x0207, /* Method List */
+ CV4_LF_DIMCONU = 0x0208, /* Dimensioned Array with Constant Upper Bound */
+ CV4_LF_DIMCONLU = 0x0209, /* Dimensioned Array with Constant Lower and Upper Bounds */
+ CV4_LF_DIMVARU = 0x020a, /* Dimensioned Array with Variable Upper Bound */
+ CV4_LF_DIMVARLU = 0x020b, /* Dimensioned Array with Variable Lower and Upper Bounds */
+ CV4_LF_REFSYM = 0x020c, /* Referenced Symbol */
+
+ /* CodeView 5.0 version */
+ CV5_LF_SKIP = 0x1200, /* Skip */
+ CV5_LF_ARGLIST = 0x1201, /* Argument List */
+ CV5_LF_DEFARG = 0x1202, /* Default Argument */
+ CV5_LF_FIELDLIST = 0x1203, /* Field List */
+ CV5_LF_DERIVED = 0x1204, /* Derived Classes */
+ CV5_LF_BITFIELD = 0x1205, /* Bit Fields */
+ CV5_LF_METHODLIST = 0x1206, /* Method List */
+ CV5_LF_DIMCONU = 0x1207, /* Dimensioned Array with Constant Upper Bound */
+ CV5_LF_DIMCONLU = 0x1208, /* Dimensioned Array with Constant Lower and Upper Bounds */
+ CV5_LF_DIMVARU = 0x1209, /* Dimensioned Array with Variable Upper Bound */
+ CV5_LF_DIMVARLU = 0x120a, /* Dimensioned Array with Variable Lower and Upper Bounds */
+ CV5_LF_REFSYM = 0x020c, /* Referenced Symbol */
+
+ /* Leaf indices for fields of complex lists */
+ CV4_LF_BCLASS = 0x0400, /* Real Base Class */
+ CV4_LF_VBCLASS = 0x0401, /* Direct Virtual Base Class */
+ CV4_LF_IVBCLASS = 0x0402, /* Indirect Virtual Base Class */
+ CV4_LF_ENUMERATE = 0x0403, /* Enumeration Name and Value */
+ CV4_LF_FRIENDFCN = 0x0404, /* Friend Function */
+ CV4_LF_INDEX = 0x0405, /* Index To Another Type Record */
+ CV4_LF_MEMBER = 0x0406, /* Data Member */
+ CV4_LF_STMEMBER = 0x0407, /* Static Data Member */
+ CV4_LF_METHOD = 0x0408, /* Method */
+ CV4_LF_NESTTYPE = 0x0409, /* Nested Type Definition */
+ CV4_LF_VFUNCTAB = 0x040a, /* Virtual Function Table Pointer */
+ CV4_LF_FRIENDCLS = 0x040b, /* Friend Class */
+ CV4_LF_ONEMETHOD = 0x040c, /* One Method */
+ CV4_LF_VFUNCOFF = 0x040d, /* Virtual Function Offset */
+
+ /* CodeView 5.0 version */
+ CV5_LF_BCLASS = 0x1400, /* Real Base Class */
+ CV5_LF_VBCLASS = 0x1401, /* Direct Virtual Base Class */
+ CV5_LF_IVBCLASS = 0x1402, /* Indirect Virtual Base Class */
+ CV5_LF_ENUMERATE = 0x0403, /* Enumeration Name and Value */
+ CV5_LF_FRIENDFCN = 0x1403, /* Friend Function */
+ CV5_LF_INDEX = 0x1404, /* Index To Another Type Record */
+ CV5_LF_MEMBER = 0x1405, /* Data Member */
+ CV5_LF_STMEMBER = 0x1406, /* Static Data Member */
+ CV5_LF_METHOD = 0x1407, /* Method */
+ CV5_LF_NESTTYPE = 0x1408, /* Nested Type Definition */
+ CV5_LF_VFUNCTAB = 0x1409, /* Virtual Function Table Pointer */
+ CV5_LF_FRIENDCLS = 0x140a, /* Friend Class */
+ CV5_LF_ONEMETHOD = 0x140b, /* One Method */
+ CV5_LF_VFUNCOFF = 0x140c, /* Virtual Function Offset */
+ CV5_LF_NESTTYPEEX = 0x140d, /* Nested Type Extended Definition */
+ CV5_LF_MEMBERMODIFY = 0x140e, /* Member Modification */
+ /* XXX: CodeView 5.0 spec also lists 0x040f as LF_MEMBERMODIFY? */
+
+ /* Leaf indices for numeric fields of symbols and type records */
+ CV_LF_NUMERIC = 0x8000,
+ CV_LF_CHAR = 0x8000, /* Signed Char (8-bit) */
+ CV_LF_SHORT = 0x8001, /* Signed Short (16-bit) */
+ CV_LF_USHORT = 0x8002, /* Unsigned Short (16-bit) */
+ CV_LF_LONG = 0x8003, /* Signed Long (32-bit) */
+ CV_LF_ULONG = 0x8004, /* Unsigned Long (32-bit) */
+ CV_LF_REAL32 = 0x8005, /* 32-bit Float */
+ CV_LF_REAL64 = 0x8006, /* 64-bit Float */
+ CV_LF_REAL80 = 0x8007, /* 80-bit Float */
+ CV_LF_REAL128 = 0x8008, /* 128-bit Float */
+ CV_LF_QUADWORD = 0x8009, /* Signed Quad Word (64-bit) */
+ CV_LF_UQUADWORD = 0x800a, /* Unsigned Quad Word (64-bit) */
+ CV_LF_REAL48 = 0x800b, /* 48-bit Float */
+ CV_LF_COMPLEX32 = 0x800c, /* 32-bit Complex */
+ CV_LF_COMPLEX64 = 0x800d, /* 64-bit Complex */
+ CV_LF_COMPLEX80 = 0x800e, /* 80-bit Complex */
+ CV_LF_COMPLEX128 = 0x800f, /* 128-bit Complex */
+ CV_LF_VARSTRING = 0x8010, /* Variable-length String */
+
+ /* Leaf padding bytes */
+ CV_LF_PAD0 = 0xf0,
+ CV_LF_PAD1 = 0xf1,
+ CV_LF_PAD2 = 0xf2,
+ CV_LF_PAD3 = 0xf3,
+ CV_LF_PAD4 = 0xf4,
+ CV_LF_PAD5 = 0xf5,
+ CV_LF_PAD6 = 0xf6,
+ CV_LF_PAD7 = 0xf7,
+ CV_LF_PAD8 = 0xf8,
+ CV_LF_PAD9 = 0xf9,
+ CV_LF_PAD10 = 0xfa,
+ CV_LF_PAD11 = 0xfb,
+ CV_LF_PAD12 = 0xfc,
+ CV_LF_PAD13 = 0xfc,
+ CV_LF_PAD14 = 0xfe,
+ CV_LF_PAD15 = 0xff
+};
+
+/* Leaves use a bit of meta-programming to encode formats: each character
+ * of format represents the output generated, as follows:
+ * 'b' : 1 byte value (integer)
+ * 'h' : 2 byte value (integer)
+ * 'w' : 4 byte value (integer)
+ * 'L' : subleaf, recurses into cv_leaf (pointer)
+ * 'T' : 4 byte type index, pulls cv_type.index from cv_type (pointer)
+ * 'S' : length-prefixed string (pointer)
+ */
+typedef struct cv_leaf {
+ enum cv_leaftype type;
+ const char *format; /* format of args */
+ union {
+ unsigned long i;
+ void *p;
+ } args[6];
+} cv_leaf;
+
+typedef struct cv_type {
+ yasm_dbgfmt_cv *dbgfmt_cv;
+ unsigned long indx; /* type # (must be same as output order) */
+ size_t num_leaves;
+ /*@null@*/ /*@only@*/ cv_leaf **leaves;
+} cv_type;
+
+/* Bytecode callback function prototypes */
+static void cv_type_bc_destroy(void *contents);
+static void cv_type_bc_print(const void *contents, FILE *f, int indent_level);
+static int cv_type_bc_calc_len
+ (yasm_bytecode *bc, yasm_bc_add_span_func add_span, void *add_span_data);
+static int cv_type_bc_tobytes
+ (yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ /*@null@*/ yasm_output_reloc_func output_reloc);
+
+/* Bytecode callback structures */
+static const yasm_bytecode_callback cv_type_bc_callback = {
+ cv_type_bc_destroy,
+ cv_type_bc_print,
+ yasm_bc_finalize_common,
+ cv_type_bc_calc_len,
+ yasm_bc_expand_common,
+ cv_type_bc_tobytes,
+ 0
+};
+
+static cv_type *cv_type_create(yasm_dbgfmt_cv *dbgfmt_cv, unsigned long indx);
+static void cv_type_append_leaf(cv_type *type, /*@keep@*/ cv_leaf *leaf);
+
+
+static cv_leaf *
+cv_leaf_create_label(int is_far)
+{
+ cv_leaf *leaf = yasm_xmalloc(sizeof(cv_leaf));
+ leaf->type = CV5_LF_LABEL;
+ leaf->format = "h";
+ leaf->args[0].i = is_far ? 4 : 0;
+ return leaf;
+}
+
+yasm_section *
+yasm_cv__generate_type(yasm_dbgfmt_cv *dbgfmt_cv)
+{
+ int new;
+ unsigned long indx = CV_FIRST_NONPRIM;
+ yasm_section *debug_type;
+ yasm_bytecode *bc;
+ cv_type *type;
+
+ debug_type = yasm_object_get_general(dbgfmt_cv->object, ".debug$T", 0, 1,
+ 0, 0, &new, 0);
+
+ /* Add label type */
+ type = cv_type_create(dbgfmt_cv, indx++);
+ cv_type_append_leaf(type, cv_leaf_create_label(0));
+ bc = yasm_bc_create_common(&cv_type_bc_callback, type, 0);
+ yasm_bc_finalize(bc, yasm_cv__append_bc(debug_type, bc));
+ yasm_bc_calc_len(bc, NULL, NULL);
+
+ return debug_type;
+}
+
+static void
+cv_leaf_destroy(cv_leaf *leaf)
+{
+ const char *ch = leaf->format;
+ int arg = 0;
+
+ while (*ch) {
+ switch (*ch) {
+ case 'b':
+ case 'h':
+ case 'w':
+ arg++;
+ break; /* nothing to destroy */
+ case 'L':
+ cv_leaf_destroy((cv_leaf *)leaf->args[arg++].p);
+ break;
+ case 'T':
+ arg++; /* nothing to destroy */
+ break;
+ case 'S':
+ yasm_xfree(leaf->args[arg++].p);
+ break;
+ default:
+ yasm_internal_error(N_("unknown leaf format character"));
+ }
+ ch++;
+ }
+}
+
+static unsigned long
+cv_leaf_size(const cv_leaf *leaf)
+{
+ const char *ch = leaf->format;
+ unsigned long len = 2; /* leaf type */
+ unsigned long slen;
+ int arg = 0;
+
+ while (*ch) {
+ switch (*ch) {
+ case 'b':
+ len++;
+ arg++;
+ break;
+ case 'h':
+ len += 2;
+ arg++;
+ break;
+ case 'w':
+ len += 4;
+ arg++;
+ break;
+ case 'L':
+ len += cv_leaf_size((const cv_leaf *)leaf->args[arg++].p);
+ break;
+ case 'T':
+ len += 4; /* XXX: will be 2 in CV4 */
+ arg++;
+ break;
+ case 'S':
+ len += 1; /* XXX: is this 1 or 2? */
+ slen = strlen((const char *)leaf->args[arg++].p);
+ len += slen <= 0xff ? slen : 0xff;
+ break;
+ default:
+ yasm_internal_error(N_("unknown leaf format character"));
+ }
+ ch++;
+ }
+
+ return len;
+}
+
+static void
+cv_leaf_tobytes(const cv_leaf *leaf, yasm_bytecode *bc, yasm_arch *arch,
+ unsigned char **bufp, yasm_intnum *cval)
+{
+ unsigned char *buf = *bufp;
+ const char *ch = leaf->format;
+ size_t len;
+ int arg = 0;
+
+ /* leaf type */
+ yasm_intnum_set_uint(cval, leaf->type);
+ yasm_arch_intnum_tobytes(arch, cval, buf, 2, 16, 0, bc, 0);
+ buf += 2;
+
+ while (*ch) {
+ switch (*ch) {
+ case 'b':
+ YASM_WRITE_8(buf, leaf->args[arg].i);
+ arg++;
+ break;
+ case 'h':
+ yasm_intnum_set_uint(cval, leaf->args[arg++].i);
+ yasm_arch_intnum_tobytes(arch, cval, buf, 2, 16, 0, bc, 0);
+ buf += 2;
+ break;
+ case 'w':
+ yasm_intnum_set_uint(cval, leaf->args[arg++].i);
+ yasm_arch_intnum_tobytes(arch, cval, buf, 4, 32, 0, bc, 0);
+ buf += 4;
+ break;
+ case 'L':
+ cv_leaf_tobytes((const cv_leaf *)leaf->args[arg++].p, bc, arch,
+ &buf, cval);
+ break;
+ case 'T':
+ yasm_intnum_set_uint(cval,
+ ((const cv_type *)leaf->args[arg++].p)->indx);
+ yasm_arch_intnum_tobytes(arch, cval, buf, 4, 32, 0, bc, 0);
+ buf += 4; /* XXX: will be 2 in CV4 */
+ break;
+ case 'S':
+ len = strlen((const char *)leaf->args[arg].p);
+ len = len <= 0xff ? len : 0xff;
+ YASM_WRITE_8(buf, len);
+ memcpy(buf, (const char *)leaf->args[arg].p, len);
+ buf += len;
+ arg++;
+ break;
+ default:
+ yasm_internal_error(N_("unknown leaf format character"));
+ }
+ ch++;
+ }
+
+ *bufp = buf;
+}
+
+static cv_type *
+cv_type_create(yasm_dbgfmt_cv *dbgfmt_cv, unsigned long indx)
+{
+ cv_type *type = yasm_xmalloc(sizeof(cv_type));
+
+ type->dbgfmt_cv = dbgfmt_cv;
+ type->indx = indx;
+ type->num_leaves = 0;
+ type->leaves = NULL;
+
+ return type;
+}
+
+static void
+cv_type_append_leaf(cv_type *type, /*@keep@*/ cv_leaf *leaf)
+{
+ type->num_leaves++;
+
+ /* This is inefficient for large numbers of leaves, but that won't happen
+ * until we add structure support.
+ */
+ type->leaves = yasm_xrealloc(type->leaves,
+ type->num_leaves*sizeof(cv_leaf *));
+
+ type->leaves[type->num_leaves-1] = leaf;
+}
+
+static void
+cv_type_bc_destroy(void *contents)
+{
+ cv_type *type = (cv_type *)contents;
+ size_t i;
+
+ for (i=0; i<type->num_leaves; i++)
+ cv_leaf_destroy(type->leaves[i]);
+ if (type->leaves)
+ yasm_xfree(type->leaves);
+ yasm_xfree(contents);
+}
+
+static void
+cv_type_bc_print(const void *contents, FILE *f, int indent_level)
+{
+ /* TODO */
+}
+
+static int
+cv_type_bc_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
+ void *add_span_data)
+{
+ cv_type *type = (cv_type *)bc->contents;
+ size_t i;
+
+ if (type->indx == CV_FIRST_NONPRIM)
+ bc->len = 4+2;
+ else
+ bc->len = 2;
+
+ for (i=0; i<type->num_leaves; i++)
+ bc->len += cv_leaf_size(type->leaves[i]);
+
+ /* Pad to multiple of 4 */
+ if (bc->len & 0x3)
+ bc->len += 4-(bc->len & 0x3);
+
+ return 0;
+}
+
+static int
+cv_type_bc_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ yasm_output_reloc_func output_reloc)
+{
+ cv_type *type = (cv_type *)bc->contents;
+ yasm_dbgfmt_cv *dbgfmt_cv = type->dbgfmt_cv;
+ unsigned char *buf = *bufp;
+ yasm_intnum *cval;
+ size_t i;
+ unsigned long reclen = bc->len - 2;
+
+ cval = yasm_intnum_create_uint(4); /* version */
+ if (type->indx == CV_FIRST_NONPRIM) {
+ yasm_arch_intnum_tobytes(dbgfmt_cv->arch, cval, buf, 4, 32, 0, bc, 1);
+ buf += 4;
+ reclen -= 4;
+ }
+
+ /* Total length of record (following this field) - 2 bytes */
+ yasm_intnum_set_uint(cval, reclen);
+ yasm_arch_intnum_tobytes(dbgfmt_cv->arch, cval, buf, 2, 16, 0, bc, 1);
+ buf += 2;
+
+ /* Leaves */
+ for (i=0; i<type->num_leaves; i++)
+ cv_leaf_tobytes(type->leaves[i], bc, dbgfmt_cv->arch, &buf, cval);
+
+ /* Pad to multiple of 4 */
+ switch ((buf-(*bufp)) & 0x3) {
+ case 3:
+ YASM_WRITE_8(buf, CV_LF_PAD3);
+ case 2:
+ YASM_WRITE_8(buf, CV_LF_PAD2);
+ case 1:
+ YASM_WRITE_8(buf, CV_LF_PAD1);
+ case 0:
+ break;
+ }
+
+ *bufp = buf;
+
+ yasm_intnum_destroy(cval);
+ return 0;
+}
diff --git a/modules/dbgfmts/codeview/cv8.txt b/modules/dbgfmts/codeview/cv8.txt
new file mode 100644
index 00000000..04f152b2
--- /dev/null
+++ b/modules/dbgfmts/codeview/cv8.txt
@@ -0,0 +1,94 @@
+ CV8 structures (for x86 and AMD64) - used by MSVC 8 (2005)
+ Everything listed in the order MASM seems to output it in.
+
+.debug$S: symbol and line number information
+ 4 bytes - version (4)
+
+Each major portion of DEBUG$S starts with 4 byte type, 4 byte length
+(in bytes following the length field). Each set is 4-byte aligned with 0s at
+the end (not included in length).
+
+0x000000F3: source filename string table
+ 1 byte - 0 (0th filename)
+ 0-terminated filename strings, 1 for each source file
+
+0x000000F4: source file info
+ for each source file:
+ 4 bytes - offset of filename in source filename string table
+ {2 bytes - checksum type/length? (0x0110)
+ 16 bytes - MD5 checksum of source file} OR
+ {2 bytes - no checksum (0)}
+ 2 bytes - 0 (padding?)
+
+0x000000F2: line numbers for section
+ 4 bytes - start offset in section (SECREL to section start)
+ 2 bytes - section index (SECTION to section start)
+ 2 bytes - pad/align (0)
+ 4 bytes - section length covered by line number info
+ 4 bytes - offset of source file in source file info table
+ 4 bytes - number of line number pairs
+ 4 bytes - number of bytes of line number pairs + 12
+
+ followed by pairs of:
+ 4 bytes - offset in section
+ 4 bytes - line number; if high bit is set,
+ end of statement/breakpointable (?) - e.g. lines containing
+ just labels should have line numbers
+
+0x000000F1: symbol information
+ enclosed data per below
+ (each element starts with 2 byte length, 2 byte type)
+ basically slightly updated versions of CV5 symbol info with 0-terminated
+ rather than length-prefixed strings
+
+0x1101 : Name of object file
+ 4 byte signature (0 for asm)
+ 0-terminated object filename
+0x1116 : creator signature (compile flag)
+ 4 bytes - language (3=Masm)
+ 4 bytes - target processor (0xD0 = AMD64)
+ 4 bytes - flags
+ 4 bytes - version
+ 2 bytes - ?
+ 0-terminated string containing creator name
+ pairs of 0-terminated strings - keys/values
+ from CL:
+ cwd - current working directory
+ cl - full path of compiler executable
+ cmd - full args (one long string, double-quoted args if needed)
+ src - relative path to source (from cwd)
+ pdb - full path to pdb file
+ ML doesn't output any pairs
+ pairs list terminated with two empty strings
+0x1105 : Code Label 16:32/64
+ 4 bytes SECREL of symbol
+ 2 bytes SECTION of symbol
+ 1 byte - flags
+ 0-terminated string containing symbol name
+0x110C : local data 16:32/64
+ 4 bytes type index of symbol
+ 4 bytes SECREL of symbol
+ 2 bytes SECTION of symbol
+ 0-terminated string containing symbol name
+0x110D : global data 16:32/64
+ 4 bytes type index of symbol
+ 4 bytes SECREL of symbol
+ 2 bytes SECTION of symbol
+ 0-terminated string containing symbol name
+0x1110 : local/global (?) procedure start 16:32/64
+ 4 bytes - parent
+ 4 bytes - pend
+ 4 bytes - pnext
+ 4 bytes - procedure length (bytes)
+ 4 bytes - debug start (offset from procedure start to frame setup)
+ 4 bytes - debug end (offset from procedure start to frame cleanup)
+ 4 bytes - type index of procedure type
+ 4 bytes - offset of procedure (SECREL of symbol)
+ 2 bytes - segment of procedure (SECTION of symbol)
+ 1 byte - flags
+ 0-terminated string containing procedure name
+
+.debug$T: type information
+ 4 bytes - version (4)
+ followed by type information per CV5 spec, padded to 4-byte boundaries
+
diff --git a/modules/dbgfmts/dwarf2/Makefile.inc b/modules/dbgfmts/dwarf2/Makefile.inc
new file mode 100644
index 00000000..602ae641
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/Makefile.inc
@@ -0,0 +1,12 @@
+# $Id$
+
+libyasm_a_SOURCES += modules/dbgfmts/dwarf2/dwarf2-dbgfmt.h
+libyasm_a_SOURCES += modules/dbgfmts/dwarf2/dwarf2-dbgfmt.c
+libyasm_a_SOURCES += modules/dbgfmts/dwarf2/dwarf2-line.c
+libyasm_a_SOURCES += modules/dbgfmts/dwarf2/dwarf2-aranges.c
+libyasm_a_SOURCES += modules/dbgfmts/dwarf2/dwarf2-info.c
+
+YASM_MODULES += dbgfmt_dwarf2
+
+EXTRA_DIST += modules/dbgfmts/dwarf2/tests/Makefile.inc
+include modules/dbgfmts/dwarf2/tests/Makefile.inc
diff --git a/modules/dbgfmts/dwarf2/dwarf2-aranges.c b/modules/dbgfmts/dwarf2/dwarf2-aranges.c
new file mode 100644
index 00000000..b8056fd6
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/dwarf2-aranges.c
@@ -0,0 +1,126 @@
+/*
+ * DWARF2 debugging format - address range table
+ *
+ * Copyright (C) 2006 Peter Johnson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <util.h>
+/*@unused@*/ RCSID("$Id$");
+
+#define YASM_LIB_INTERNAL
+#define YASM_BC_INTERNAL
+#include <libyasm.h>
+
+#include "dwarf2-dbgfmt.h"
+
+
+static void
+dwarf2_append_arange(yasm_section *debug_aranges, /*@only@*/ yasm_expr *start,
+ /*@only@*/ yasm_expr *length, size_t sizeof_address)
+{
+ yasm_datavalhead dvs;
+ yasm_bytecode *bc;
+
+ yasm_dvs_initialize(&dvs);
+ yasm_dvs_append(&dvs, yasm_dv_create_expr(start));
+ yasm_dvs_append(&dvs, yasm_dv_create_expr(length));
+ bc = yasm_bc_create_data(&dvs, sizeof_address, 0, NULL, 0);
+ yasm_bc_finalize(bc, yasm_dwarf2__append_bc(debug_aranges, bc));
+ yasm_bc_calc_len(bc, NULL, NULL);
+}
+
+typedef struct dwarf2_aranges_info {
+ yasm_section *debug_aranges; /* section to which address ranges go */
+ yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2;
+} dwarf2_aranges_info;
+
+static int
+dwarf2_generate_aranges_section(yasm_section *sect, /*@null@*/ void *d)
+{
+ dwarf2_aranges_info *info = (dwarf2_aranges_info *)d;
+ yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2 = info->dbgfmt_dwarf2;
+ /*@null@*/ dwarf2_section_data *dsd;
+ /*@only@*/ yasm_expr *start, *length;
+
+ dsd = yasm_section_get_data(sect, &yasm_dwarf2__section_data_cb);
+ if (!dsd)
+ return 0; /* no line data for this section */
+
+ /* Create address range descriptor */
+ start = yasm_expr_create_ident(
+ yasm_expr_sym(yasm_dwarf2__bc_sym(dbgfmt_dwarf2->symtab,
+ yasm_section_bcs_first(sect))), 0);
+ length = yasm_expr_create_ident(
+ yasm_expr_int(yasm_common_calc_bc_dist(
+ yasm_section_bcs_first(sect), yasm_section_bcs_last(sect))), 0);
+ dwarf2_append_arange(info->debug_aranges, start, length,
+ dbgfmt_dwarf2->sizeof_address);
+
+ return 0;
+}
+
+yasm_section *
+yasm_dwarf2__generate_aranges(yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2,
+ yasm_section *debug_info)
+{
+ int new;
+ yasm_section *debug_aranges;
+ yasm_bytecode *bc;
+ dwarf2_head *head;
+ dwarf2_aranges_info info;
+
+ debug_aranges =
+ yasm_object_get_general(dbgfmt_dwarf2->object, ".debug_aranges", 0,
+ 2*dbgfmt_dwarf2->sizeof_address, 0, 0, &new,
+ 0);
+
+ /* header */
+ head = yasm_dwarf2__add_head(dbgfmt_dwarf2, debug_aranges, debug_info, 1,
+ 1);
+
+ /* align ranges to 2x address size (range size) */
+ bc = yasm_bc_create_align(
+ yasm_expr_create_ident(yasm_expr_int(
+ yasm_intnum_create_uint(dbgfmt_dwarf2->sizeof_address*2)), 0),
+ NULL, NULL, NULL, 0);
+ yasm_bc_finalize(bc, yasm_dwarf2__append_bc(debug_aranges, bc));
+ yasm_bc_calc_len(bc, NULL, NULL);
+
+ info.debug_aranges = debug_aranges;
+ info.dbgfmt_dwarf2 = dbgfmt_dwarf2;
+
+ yasm_object_sections_traverse(dbgfmt_dwarf2->object, (void *)&info,
+ dwarf2_generate_aranges_section);
+
+ /* Terminate with empty address range descriptor */
+ dwarf2_append_arange(debug_aranges,
+ yasm_expr_create_ident(yasm_expr_int(yasm_intnum_create_uint(0)), 0),
+ yasm_expr_create_ident(yasm_expr_int(yasm_intnum_create_uint(0)), 0),
+ dbgfmt_dwarf2->sizeof_address);
+
+ /* mark end of aranges information */
+ yasm_dwarf2__set_head_end(head, yasm_section_bcs_last(debug_aranges));
+
+ return debug_aranges;
+}
+
diff --git a/modules/dbgfmts/dwarf2/dwarf2-dbgfmt.c b/modules/dbgfmts/dwarf2/dwarf2-dbgfmt.c
new file mode 100644
index 00000000..54f10f4f
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/dwarf2-dbgfmt.c
@@ -0,0 +1,357 @@
+/*
+ * DWARF2 debugging format
+ *
+ * Copyright (C) 2006 Peter Johnson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <util.h>
+/*@unused@*/ RCSID("$Id$");
+
+#define YASM_LIB_INTERNAL
+#define YASM_BC_INTERNAL
+#include <libyasm.h>
+
+#include "dwarf2-dbgfmt.h"
+
+struct dwarf2_head {
+ yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2;
+ yasm_bytecode *start_prevbc;
+ yasm_bytecode *end_prevbc;
+ /*@null@*/ yasm_section *debug_ptr;
+ int with_address;
+ int with_segment;
+};
+
+/* Bytecode callback function prototypes */
+static void dwarf2_head_bc_destroy(void *contents);
+static void dwarf2_head_bc_print(const void *contents, FILE *f,
+ int indent_level);
+static int dwarf2_head_bc_calc_len
+ (yasm_bytecode *bc, yasm_bc_add_span_func add_span, void *add_span_data);
+static int dwarf2_head_bc_tobytes
+ (yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ /*@null@*/ yasm_output_reloc_func output_reloc);
+
+/* Bytecode callback structures */
+static const yasm_bytecode_callback dwarf2_head_bc_callback = {
+ dwarf2_head_bc_destroy,
+ dwarf2_head_bc_print,
+ yasm_bc_finalize_common,
+ dwarf2_head_bc_calc_len,
+ yasm_bc_expand_common,
+ dwarf2_head_bc_tobytes,
+ 0
+};
+
+/* Section data callback function prototypes */
+static void dwarf2_section_data_destroy(void *data);
+static void dwarf2_section_data_print(void *data, FILE *f, int indent_level);
+
+/* Section data callback */
+const yasm_assoc_data_callback yasm_dwarf2__section_data_cb = {
+ dwarf2_section_data_destroy,
+ dwarf2_section_data_print
+};
+
+yasm_dbgfmt_module yasm_dwarf2_LTX_dbgfmt;
+
+
+static /*@null@*/ /*@only@*/ yasm_dbgfmt *
+dwarf2_dbgfmt_create(yasm_object *object, yasm_objfmt *of, yasm_arch *a)
+{
+ yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2 =
+ yasm_xmalloc(sizeof(yasm_dbgfmt_dwarf2));
+ size_t i;
+
+ dbgfmt_dwarf2->dbgfmt.module = &yasm_dwarf2_LTX_dbgfmt;
+
+ dbgfmt_dwarf2->object = object;
+ dbgfmt_dwarf2->symtab = yasm_object_get_symtab(object);
+ dbgfmt_dwarf2->linemap = yasm_object_get_linemap(object);
+ dbgfmt_dwarf2->arch = a;
+
+ dbgfmt_dwarf2->dirs_allocated = 32;
+ dbgfmt_dwarf2->dirs_size = 0;
+ dbgfmt_dwarf2->dirs =
+ yasm_xmalloc(sizeof(char *)*dbgfmt_dwarf2->dirs_allocated);
+
+ dbgfmt_dwarf2->filenames_allocated = 32;
+ dbgfmt_dwarf2->filenames_size = 0;
+ dbgfmt_dwarf2->filenames =
+ yasm_xmalloc(sizeof(dwarf2_filename)*dbgfmt_dwarf2->filenames_allocated);
+ for (i=0; i<dbgfmt_dwarf2->filenames_allocated; i++) {
+ dbgfmt_dwarf2->filenames[i].pathname = NULL;
+ dbgfmt_dwarf2->filenames[i].filename = NULL;
+ dbgfmt_dwarf2->filenames[i].dir = 0;
+ }
+
+ dbgfmt_dwarf2->format = DWARF2_FORMAT_32BIT; /* TODO: flexible? */
+
+ dbgfmt_dwarf2->sizeof_address = yasm_arch_get_address_size(a)/8;
+ switch (dbgfmt_dwarf2->format) {
+ case DWARF2_FORMAT_32BIT:
+ dbgfmt_dwarf2->sizeof_offset = 4;
+ break;
+ case DWARF2_FORMAT_64BIT:
+ dbgfmt_dwarf2->sizeof_offset = 8;
+ break;
+ }
+ dbgfmt_dwarf2->min_insn_len = yasm_arch_min_insn_len(a);
+
+ return (yasm_dbgfmt *)dbgfmt_dwarf2;
+}
+
+static void
+dwarf2_dbgfmt_destroy(/*@only@*/ yasm_dbgfmt *dbgfmt)
+{
+ yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2 = (yasm_dbgfmt_dwarf2 *)dbgfmt;
+ size_t i;
+ for (i=0; i<dbgfmt_dwarf2->dirs_size; i++)
+ if (dbgfmt_dwarf2->dirs[i])
+ yasm_xfree(dbgfmt_dwarf2->dirs[i]);
+ yasm_xfree(dbgfmt_dwarf2->dirs);
+ for (i=0; i<dbgfmt_dwarf2->filenames_size; i++) {
+ if (dbgfmt_dwarf2->filenames[i].pathname)
+ yasm_xfree(dbgfmt_dwarf2->filenames[i].pathname);
+ if (dbgfmt_dwarf2->filenames[i].filename)
+ yasm_xfree(dbgfmt_dwarf2->filenames[i].filename);
+ }
+ yasm_xfree(dbgfmt_dwarf2->filenames);
+ yasm_xfree(dbgfmt);
+}
+
+/* Add a bytecode to a section, updating offset on insertion;
+ * no optimization necessary.
+ */
+yasm_bytecode *
+yasm_dwarf2__append_bc(yasm_section *sect, yasm_bytecode *bc)
+{
+ yasm_bytecode *precbc = yasm_section_bcs_last(sect);
+ bc->offset = precbc ? precbc->offset + precbc->len : 0;
+ yasm_section_bcs_append(sect, bc);
+ return precbc;
+}
+
+static void
+dwarf2_dbgfmt_generate(yasm_dbgfmt *dbgfmt, yasm_errwarns *errwarns)
+{
+ yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2 = (yasm_dbgfmt_dwarf2 *)dbgfmt;
+ size_t num_line_sections;
+ /*@null@*/ yasm_section *debug_info, *debug_line, *main_code;
+
+ /* If we don't have any .file directives, generate line information
+ * based on the asm source.
+ */
+ debug_line = yasm_dwarf2__generate_line(dbgfmt_dwarf2, errwarns,
+ dbgfmt_dwarf2->filenames_size == 0,
+ &main_code, &num_line_sections);
+
+ /* If we don't have a .debug_info (or it's empty), generate the minimal
+ * set of .debug_info, .debug_aranges, and .debug_abbrev so that the
+ * .debug_line we're generating is actually useful.
+ */
+ debug_info = yasm_object_find_general(dbgfmt_dwarf2->object, ".debug_info");
+ if (num_line_sections > 0 &&
+ (!debug_info || yasm_section_bcs_first(debug_info)
+ == yasm_section_bcs_last(debug_info))) {
+ debug_info = yasm_dwarf2__generate_info(dbgfmt_dwarf2, debug_line,
+ main_code);
+ yasm_dwarf2__generate_aranges(dbgfmt_dwarf2, debug_info);
+ /*yasm_dwarf2__generate_pubnames(dbgfmt_dwarf2, debug_info);*/
+ }
+}
+
+yasm_symrec *
+yasm_dwarf2__bc_sym(yasm_symtab *symtab, yasm_bytecode *bc)
+{
+ /*@dependent@*/ yasm_symrec *sym;
+ if (bc->symrecs && bc->symrecs[0])
+ sym = bc->symrecs[0];
+ else
+ sym = yasm_symtab_define_label(symtab, ".bcsym", bc, 0, 0);
+ return sym;
+}
+
+dwarf2_head *
+yasm_dwarf2__add_head
+ (yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2, yasm_section *sect,
+ /*@null@*/ yasm_section *debug_ptr, int with_address, int with_segment)
+{
+ dwarf2_head *head;
+ yasm_bytecode *bc;
+
+ head = yasm_xmalloc(sizeof(dwarf2_head));
+ head->dbgfmt_dwarf2 = dbgfmt_dwarf2;
+ head->start_prevbc = yasm_section_bcs_last(sect);
+
+ bc = yasm_bc_create_common(&dwarf2_head_bc_callback, head, 0);
+ bc->len = dbgfmt_dwarf2->sizeof_offset + 2;
+ if (dbgfmt_dwarf2->format == DWARF2_FORMAT_64BIT)
+ bc->len += 4;
+
+ if (debug_ptr) {
+ head->debug_ptr = debug_ptr;
+ bc->len += dbgfmt_dwarf2->sizeof_offset;
+ } else
+ head->debug_ptr = NULL;
+
+ head->with_address = with_address;
+ head->with_segment = with_segment;
+ if (with_address)
+ bc->len++;
+ if (with_segment)
+ bc->len++;
+
+ head->end_prevbc = bc;
+ yasm_dwarf2__append_bc(sect, bc);
+ return head;
+}
+
+void
+yasm_dwarf2__set_head_end(dwarf2_head *head, yasm_bytecode *end_prevbc)
+{
+ head->end_prevbc = end_prevbc;
+}
+
+static void
+dwarf2_head_bc_destroy(void *contents)
+{
+ yasm_xfree(contents);
+}
+
+static void
+dwarf2_head_bc_print(const void *contents, FILE *f, int indent_level)
+{
+ /* TODO */
+}
+
+static int
+dwarf2_head_bc_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
+ void *add_span_data)
+{
+ yasm_internal_error(N_("tried to calc_len a dwarf2 head bytecode"));
+ /*@notreached@*/
+ return 0;
+}
+
+static int
+dwarf2_head_bc_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ yasm_output_reloc_func output_reloc)
+{
+ dwarf2_head *head = (dwarf2_head *)bc->contents;
+ yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2 = head->dbgfmt_dwarf2;
+ unsigned char *buf = *bufp;
+ yasm_intnum *intn, *cval;
+
+ if (dbgfmt_dwarf2->format == DWARF2_FORMAT_64BIT) {
+ YASM_WRITE_8(buf, 0xff);
+ YASM_WRITE_8(buf, 0xff);
+ YASM_WRITE_8(buf, 0xff);
+ YASM_WRITE_8(buf, 0xff);
+ }
+
+ /* Total length of aranges info (following this field) */
+ cval = yasm_intnum_create_uint(dbgfmt_dwarf2->sizeof_offset);
+ intn = yasm_common_calc_bc_dist(head->start_prevbc, head->end_prevbc);
+ yasm_intnum_calc(intn, YASM_EXPR_SUB, cval);
+ yasm_arch_intnum_tobytes(dbgfmt_dwarf2->arch, intn, buf,
+ dbgfmt_dwarf2->sizeof_offset,
+ dbgfmt_dwarf2->sizeof_offset*8, 0, bc, 0);
+ buf += dbgfmt_dwarf2->sizeof_offset;
+ yasm_intnum_destroy(intn);
+
+ /* DWARF version */
+ yasm_intnum_set_uint(cval, 2);
+ yasm_arch_intnum_tobytes(dbgfmt_dwarf2->arch, cval, buf, 2, 16, 0, bc, 0);
+ buf += 2;
+
+ /* Pointer to another debug section */
+ if (head->debug_ptr) {
+ yasm_value value;
+ yasm_value_init_sym(&value,
+ yasm_dwarf2__bc_sym(dbgfmt_dwarf2->symtab,
+ yasm_section_bcs_first(head->debug_ptr)),
+ dbgfmt_dwarf2->sizeof_offset*8);
+ output_value(&value, buf, dbgfmt_dwarf2->sizeof_offset,
+ (unsigned long)(buf-*bufp), bc, 0, d);
+ buf += dbgfmt_dwarf2->sizeof_offset;
+ }
+
+ /* Size of the offset portion of the address */
+ if (head->with_address)
+ YASM_WRITE_8(buf, dbgfmt_dwarf2->sizeof_address);
+
+ /* Size of a segment descriptor. 0 = flat address space */
+ if (head->with_segment)
+ YASM_WRITE_8(buf, 0);
+
+ *bufp = buf;
+
+ yasm_intnum_destroy(cval);
+ return 0;
+}
+
+static void
+dwarf2_section_data_destroy(void *data)
+{
+ dwarf2_section_data *dsd = data;
+ dwarf2_loc *n1, *n2;
+
+ /* Delete locations */
+ n1 = STAILQ_FIRST(&dsd->locs);
+ while (n1) {
+ n2 = STAILQ_NEXT(n1, link);
+ yasm_xfree(n1);
+ n1 = n2;
+ }
+
+ yasm_xfree(data);
+}
+
+static void
+dwarf2_section_data_print(void *data, FILE *f, int indent_level)
+{
+ /* TODO */
+}
+
+static int
+dwarf2_dbgfmt_directive(yasm_dbgfmt *dbgfmt, const char *name,
+ yasm_section *sect, yasm_valparamhead *valparams,
+ unsigned long line)
+{
+ yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2 = (yasm_dbgfmt_dwarf2 *)dbgfmt;
+ return yasm_dwarf2__line_directive(dbgfmt_dwarf2, name, sect, valparams,
+ line);
+}
+
+/* Define dbgfmt structure -- see dbgfmt.h for details */
+yasm_dbgfmt_module yasm_dwarf2_LTX_dbgfmt = {
+ "DWARF2 debugging format",
+ "dwarf2",
+ dwarf2_dbgfmt_create,
+ dwarf2_dbgfmt_destroy,
+ dwarf2_dbgfmt_directive,
+ dwarf2_dbgfmt_generate
+};
diff --git a/modules/dbgfmts/dwarf2/dwarf2-dbgfmt.h b/modules/dbgfmts/dwarf2/dwarf2-dbgfmt.h
new file mode 100644
index 00000000..4f6ad1bc
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/dwarf2-dbgfmt.h
@@ -0,0 +1,132 @@
+/* $Id$
+ * DWARF2 debugging format
+ *
+ * Copyright (C) 2006 Peter Johnson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef YASM_DWARF2_DBGFMT_H
+#define YASM_DWARF2_DBGFMT_H
+
+#define WITH_DWARF3 1
+
+typedef struct {
+ char *pathname; /* full filename */
+ char *filename; /* basename of full filename */
+ size_t dir; /* index into directories array for relative path;
+ * 0 for current directory. */
+} dwarf2_filename;
+
+/* Global data */
+typedef struct yasm_dbgfmt_dwarf2 {
+ yasm_dbgfmt_base dbgfmt; /* base structure */
+
+ yasm_object *object;
+ yasm_symtab *symtab;
+ yasm_linemap *linemap;
+ yasm_arch *arch;
+
+ char **dirs;
+ size_t dirs_size;
+ size_t dirs_allocated;
+
+ dwarf2_filename *filenames;
+ size_t filenames_size;
+ size_t filenames_allocated;
+
+ enum {
+ DWARF2_FORMAT_32BIT,
+ DWARF2_FORMAT_64BIT
+ } format;
+
+ size_t sizeof_address, sizeof_offset, min_insn_len;
+} yasm_dbgfmt_dwarf2;
+
+/* .loc directive data */
+typedef struct dwarf2_loc {
+ /*@reldef@*/ STAILQ_ENTRY(dwarf2_loc) link;
+
+ unsigned long vline; /* virtual line number of .loc directive */
+
+ /* source information */
+ unsigned long file; /* index into table of filenames */
+ unsigned long line; /* source line number */
+ unsigned long column; /* source column */
+ int isa_change;
+ unsigned long isa;
+ enum {
+ IS_STMT_NOCHANGE = 0,
+ IS_STMT_SET,
+ IS_STMT_CLEAR
+ } is_stmt;
+ int basic_block;
+ int prologue_end;
+ int epilogue_begin;
+
+ yasm_bytecode *bc; /* first bytecode following */
+ yasm_symrec *sym; /* last symbol preceding */
+} dwarf2_loc;
+
+/* Per-section data */
+typedef struct dwarf2_section_data {
+ /* The locations set by the .loc directives in this section, in assembly
+ * source order.
+ */
+ /*@reldef@*/ STAILQ_HEAD(dwarf2_lochead, dwarf2_loc) locs;
+} dwarf2_section_data;
+
+extern const yasm_assoc_data_callback yasm_dwarf2__section_data_cb;
+
+yasm_bytecode *yasm_dwarf2__append_bc(yasm_section *sect, yasm_bytecode *bc);
+
+/*@dependent@*/ yasm_symrec *yasm_dwarf2__bc_sym(yasm_symtab *symtab,
+ yasm_bytecode *bc);
+
+typedef struct dwarf2_head dwarf2_head;
+dwarf2_head *yasm_dwarf2__add_head
+ (yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2, yasm_section *sect,
+ /*@null@*/ yasm_section *debug_ptr, int with_address, int with_segment);
+void yasm_dwarf2__set_head_end(dwarf2_head *head, yasm_bytecode *end_prevbc);
+
+/* Line number functions */
+yasm_section *yasm_dwarf2__generate_line
+ (yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2, yasm_errwarns *errwarns,
+ int asm_source, /*@out@*/ yasm_section **main_code,
+ /*@out@*/ size_t *num_line_sections);
+int yasm_dwarf2__line_directive
+ (yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2, const char *name, yasm_section *sect,
+ yasm_valparamhead *valparams, unsigned long line);
+
+/* Address range table functions */
+yasm_section *yasm_dwarf2__generate_aranges(yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2,
+ yasm_section *debug_info);
+
+/* Name lookup table functions */
+yasm_section *yasm_dwarf2__generate_pubnames(yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2,
+ yasm_section *debug_info);
+
+/* Information functions */
+yasm_section *yasm_dwarf2__generate_info
+ (yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2, yasm_section *debug_line,
+ /*@null@*/ yasm_section *main_code);
+
+#endif
diff --git a/modules/dbgfmts/dwarf2/dwarf2-info.c b/modules/dbgfmts/dwarf2/dwarf2-info.c
new file mode 100644
index 00000000..11ac620b
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/dwarf2-info.c
@@ -0,0 +1,441 @@
+/*
+ * DWARF2 debugging format - info and abbreviation tables
+ *
+ * Copyright (C) 2006 Peter Johnson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#undef HAVE_CONFIG_H
+#endif
+
+/* Need either unistd.h or direct.h (on Windows) to prototype getcwd() */
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#elif defined(WIN32) || defined(_WIN32)
+#include <direct.h>
+#endif
+
+#include <util.h>
+/*@unused@*/ RCSID("$Id$");
+
+#define YASM_LIB_INTERNAL
+#define YASM_BC_INTERNAL
+#include <libyasm.h>
+
+#include "dwarf2-dbgfmt.h"
+
+#define DW_LANG_Mips_Assembler 0x8001
+
+/* Tag encodings */
+typedef enum {
+ DW_TAG_padding = 0x00,
+ DW_TAG_array_type = 0x01,
+ DW_TAG_class_type = 0x02,
+ DW_TAG_entry_point = 0x03,
+ DW_TAG_enumeration_type = 0x04,
+ DW_TAG_formal_parameter = 0x05,
+ DW_TAG_imported_declaration = 0x08,
+ DW_TAG_label = 0x0a,
+ DW_TAG_lexical_block = 0x0b,
+ DW_TAG_member = 0x0d,
+ DW_TAG_pointer_type = 0x0f,
+ DW_TAG_reference_type = 0x10,
+ DW_TAG_compile_unit = 0x11,
+ DW_TAG_string_type = 0x12,
+ DW_TAG_structure_type = 0x13,
+ DW_TAG_subroutine_type = 0x15,
+ DW_TAG_typedef = 0x16,
+ DW_TAG_union_type = 0x17,
+ DW_TAG_unspecified_parameters = 0x18,
+ DW_TAG_variant = 0x19,
+ DW_TAG_common_block = 0x1a,
+ DW_TAG_common_inclusion = 0x1b,
+ DW_TAG_inheritance = 0x1c,
+ DW_TAG_inlined_subroutine = 0x1d,
+ DW_TAG_module = 0x1e,
+ DW_TAG_ptr_to_member_type = 0x1f,
+ DW_TAG_set_type = 0x20,
+ DW_TAG_subrange_type = 0x21,
+ DW_TAG_with_stmt = 0x22,
+ DW_TAG_access_declaration = 0x23,
+ DW_TAG_base_type = 0x24,
+ DW_TAG_catch_block = 0x25,
+ DW_TAG_const_type = 0x26,
+ DW_TAG_constant = 0x27,
+ DW_TAG_enumerator = 0x28,
+ DW_TAG_file_type = 0x29,
+ DW_TAG_friend = 0x2a,
+ DW_TAG_namelist = 0x2b,
+ DW_TAG_namelist_item = 0x2c,
+ DW_TAG_packed_type = 0x2d,
+ DW_TAG_subprogram = 0x2e,
+ DW_TAG_template_type_param = 0x2f,
+ DW_TAG_template_value_param = 0x30,
+ DW_TAG_thrown_type = 0x31,
+ DW_TAG_try_block = 0x32,
+ DW_TAG_variant_part = 0x33,
+ DW_TAG_variable = 0x34,
+ DW_TAG_volatile_type = 0x35
+} dwarf_tag;
+
+/* Attribute form encodings */
+typedef enum {
+ DW_FORM_addr = 0x01,
+ DW_FORM_block2 = 0x03,
+ DW_FORM_block4 = 0x04,
+ DW_FORM_data2 = 0x05,
+ DW_FORM_data4 = 0x06,
+ DW_FORM_data8 = 0x07,
+ DW_FORM_string = 0x08,
+ DW_FORM_block = 0x09,
+ DW_FORM_block1 = 0x0a,
+ DW_FORM_data1 = 0x0b,
+ DW_FORM_flag = 0x0c,
+ DW_FORM_sdata = 0x0d,
+ DW_FORM_strp = 0x0e,
+ DW_FORM_udata = 0x0f,
+ DW_FORM_ref_addr = 0x10,
+ DW_FORM_ref1 = 0x11,
+ DW_FORM_ref2 = 0x12,
+ DW_FORM_ref4 = 0x13,
+ DW_FORM_ref8 = 0x14,
+ DW_FORM_ref_udata = 0x15,
+ DW_FORM_indirect = 0x16
+} dwarf_form;
+
+/* Attribute encodings */
+typedef enum {
+ DW_AT_sibling = 0x01,
+ DW_AT_location = 0x02,
+ DW_AT_name = 0x03,
+ DW_AT_ordering = 0x09,
+ DW_AT_subscr_data = 0x0a,
+ DW_AT_byte_size = 0x0b,
+ DW_AT_bit_offset = 0x0c,
+ DW_AT_bit_size = 0x0d,
+ DW_AT_element_list = 0x0f,
+ DW_AT_stmt_list = 0x10,
+ DW_AT_low_pc = 0x11,
+ DW_AT_high_pc = 0x12,
+ DW_AT_language = 0x13,
+ DW_AT_member = 0x14,
+ DW_AT_discr = 0x15,
+ DW_AT_discr_value = 0x16,
+ DW_AT_visibility = 0x17,
+ DW_AT_import = 0x18,
+ DW_AT_string_length = 0x19,
+ DW_AT_common_reference = 0x1a,
+ DW_AT_comp_dir = 0x1b,
+ DW_AT_const_value = 0x1c,
+ DW_AT_containing_type = 0x1d,
+ DW_AT_default_value = 0x1e,
+ DW_AT_inline = 0x20,
+ DW_AT_is_optional = 0x21,
+ DW_AT_lower_bound = 0x22,
+ DW_AT_producer = 0x25,
+ DW_AT_prototyped = 0x27,
+ DW_AT_return_addr = 0x2a,
+ DW_AT_start_scope = 0x2c,
+ DW_AT_stride_size = 0x2e,
+ DW_AT_upper_bound = 0x2f,
+ DW_AT_abstract_origin = 0x31,
+ DW_AT_accessibility = 0x32,
+ DW_AT_address_class = 0x33,
+ DW_AT_artificial = 0x34,
+ DW_AT_base_types = 0x35,
+ DW_AT_calling_convention = 0x36,
+ DW_AT_count = 0x37,
+ DW_AT_data_member_location = 0x38,
+ DW_AT_decl_column = 0x39,
+ DW_AT_decl_file = 0x3a,
+ DW_AT_decl_line = 0x3b,
+ DW_AT_declaration = 0x3c,
+ DW_AT_discr_list = 0x3d,
+ DW_AT_encoding = 0x3e,
+ DW_AT_external = 0x3f,
+ DW_AT_frame_base = 0x40,
+ DW_AT_friend = 0x41,
+ DW_AT_identifier_case = 0x42,
+ DW_AT_macro_info = 0x43,
+ DW_AT_namelist_items = 0x44,
+ DW_AT_priority = 0x45,
+ DW_AT_segment = 0x46,
+ DW_AT_specification = 0x47,
+ DW_AT_static_link = 0x48,
+ DW_AT_type = 0x49,
+ DW_AT_use_location = 0x4a,
+ DW_AT_variable_parameter = 0x4b,
+ DW_AT_virtuality = 0x4c,
+ DW_AT_vtable_elem_location = 0x4d
+} dwarf_attribute;
+
+typedef struct dwarf2_abbrev_attr {
+ STAILQ_ENTRY(dwarf2_abbrev_attr) link;
+ dwarf_attribute name;
+ dwarf_form form;
+} dwarf2_abbrev_attr;
+
+typedef struct dwarf2_abbrev {
+ unsigned long id;
+ dwarf_tag tag;
+ int has_children;
+ STAILQ_HEAD(dwarf2_abbrev_attrhead, dwarf2_abbrev_attr) attrs;
+} dwarf2_abbrev;
+
+/* Bytecode callback function prototypes */
+
+static void dwarf2_abbrev_bc_destroy(void *contents);
+static void dwarf2_abbrev_bc_print(const void *contents, FILE *f,
+ int indent_level);
+static int dwarf2_abbrev_bc_calc_len
+ (yasm_bytecode *bc, yasm_bc_add_span_func add_span, void *add_span_data);
+static int dwarf2_abbrev_bc_tobytes
+ (yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ /*@null@*/ yasm_output_reloc_func output_reloc);
+
+/* Bytecode callback structures */
+
+static const yasm_bytecode_callback dwarf2_abbrev_bc_callback = {
+ dwarf2_abbrev_bc_destroy,
+ dwarf2_abbrev_bc_print,
+ yasm_bc_finalize_common,
+ dwarf2_abbrev_bc_calc_len,
+ yasm_bc_expand_common,
+ dwarf2_abbrev_bc_tobytes,
+ 0
+};
+
+
+static unsigned long
+dwarf2_add_abbrev_attr(dwarf2_abbrev *abbrev, dwarf_attribute name,
+ dwarf_form form)
+{
+ dwarf2_abbrev_attr *attr = yasm_xmalloc(sizeof(dwarf2_abbrev_attr));
+ attr->name = name;
+ attr->form = form;
+ STAILQ_INSERT_TAIL(&abbrev->attrs, attr, link);
+ return yasm_size_uleb128(name) + yasm_size_uleb128(form);
+}
+
+static void
+dwarf2_append_expr(yasm_section *sect, /*@only@*/ yasm_expr *expr, size_t size,
+ int leb)
+{
+ yasm_datavalhead dvs;
+ yasm_bytecode *bc;
+
+ yasm_dvs_initialize(&dvs);
+ yasm_dvs_append(&dvs, yasm_dv_create_expr(expr));
+ if (leb == 0)
+ bc = yasm_bc_create_data(&dvs, size, 0, NULL, 0);
+ else
+ bc = yasm_bc_create_leb128(&dvs, leb<0, 0);
+ yasm_bc_finalize(bc, yasm_dwarf2__append_bc(sect, bc));
+ yasm_bc_calc_len(bc, NULL, NULL);
+}
+
+static void
+dwarf2_append_str(yasm_section *sect, const char *str)
+{
+ yasm_datavalhead dvs;
+ yasm_bytecode *bc;
+
+ yasm_dvs_initialize(&dvs);
+ yasm_dvs_append(&dvs, yasm_dv_create_string(yasm__xstrdup(str),
+ strlen(str)));
+ bc = yasm_bc_create_data(&dvs, 1, 1, NULL, 0);
+ yasm_bc_finalize(bc, yasm_dwarf2__append_bc(sect, bc));
+ yasm_bc_calc_len(bc, NULL, NULL);
+}
+
+yasm_section *
+yasm_dwarf2__generate_info(yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2,
+ yasm_section *debug_line, yasm_section *main_code)
+{
+ int new;
+ yasm_bytecode *abc;
+ dwarf2_abbrev *abbrev;
+ dwarf2_head *head;
+ char *buf;
+ yasm_section *debug_abbrev =
+ yasm_object_get_general(dbgfmt_dwarf2->object, ".debug_abbrev", 0,
+ 4, 0, 0, &new, 0);
+ yasm_section *debug_info =
+ yasm_object_get_general(dbgfmt_dwarf2->object, ".debug_info", 0, 4, 0,
+ 0, &new, 0);
+
+ yasm_section_set_align(debug_abbrev, 0, 0);
+ yasm_section_set_align(debug_info, 0, 0);
+
+ /* Create abbreviation table entry for compilation unit */
+ abbrev = yasm_xmalloc(sizeof(dwarf2_abbrev));
+ abc = yasm_bc_create_common(&dwarf2_abbrev_bc_callback, abbrev, 0);
+ abbrev->id = 1;
+ abbrev->tag = DW_TAG_compile_unit;
+ abbrev->has_children = 0;
+ abc->len = yasm_size_uleb128(abbrev->id) + yasm_size_uleb128(abbrev->tag)
+ + 3;
+ STAILQ_INIT(&abbrev->attrs);
+ yasm_dwarf2__append_bc(debug_abbrev, abc);
+
+ /* info header */
+ head = yasm_dwarf2__add_head(dbgfmt_dwarf2, debug_info, debug_abbrev, 1, 0);
+
+ /* Generate abbreviations at the same time as info (since they're linked
+ * and we're only generating one piece of info).
+ */
+
+ /* generating info using abbrev 1 */
+ dwarf2_append_expr(debug_info,
+ yasm_expr_create_ident(yasm_expr_int(yasm_intnum_create_uint(1)), 0),
+ 0, 1);
+
+ /* statement list (line numbers) */
+ abc->len += dwarf2_add_abbrev_attr(abbrev, DW_AT_stmt_list, DW_FORM_data4);
+ dwarf2_append_expr(debug_info,
+ yasm_expr_create_ident(yasm_expr_sym(
+ yasm_dwarf2__bc_sym(dbgfmt_dwarf2->symtab,
+ yasm_section_bcs_first(debug_line))), 0),
+ dbgfmt_dwarf2->sizeof_offset, 0);
+
+ if (main_code) {
+ yasm_symrec *first;
+ first = yasm_dwarf2__bc_sym(dbgfmt_dwarf2->symtab,
+ yasm_section_bcs_first(main_code));
+ /* All code is contiguous in one section */
+ abc->len += dwarf2_add_abbrev_attr(abbrev, DW_AT_low_pc, DW_FORM_addr);
+ dwarf2_append_expr(debug_info,
+ yasm_expr_create_ident(yasm_expr_sym(first), 0),
+ dbgfmt_dwarf2->sizeof_address, 0);
+
+ abc->len += dwarf2_add_abbrev_attr(abbrev, DW_AT_high_pc, DW_FORM_addr);
+ dwarf2_append_expr(debug_info,
+ yasm_expr_create(YASM_EXPR_ADD, yasm_expr_sym(first),
+ yasm_expr_int(yasm_common_calc_bc_dist(
+ yasm_section_bcs_first(main_code),
+ yasm_section_bcs_last(main_code))), 0),
+ dbgfmt_dwarf2->sizeof_address, 0);
+ }
+
+ /* input filename */
+ abc->len += dwarf2_add_abbrev_attr(abbrev, DW_AT_name, DW_FORM_string);
+ dwarf2_append_str(debug_info,
+ yasm_object_get_source_fn(dbgfmt_dwarf2->object));
+
+ /* compile directory (current working directory) */
+ abc->len += dwarf2_add_abbrev_attr(abbrev, DW_AT_comp_dir, DW_FORM_string);
+ buf = getcwd(NULL, 0);
+ dwarf2_append_str(debug_info, buf);
+ free(buf);
+
+ /* producer - assembler name */
+ abc->len += dwarf2_add_abbrev_attr(abbrev, DW_AT_producer, DW_FORM_string);
+ dwarf2_append_str(debug_info, PACKAGE " " VERSION);
+
+ /* language - no standard code for assembler, use MIPS as a substitute */
+ abc->len += dwarf2_add_abbrev_attr(abbrev, DW_AT_language, DW_FORM_data2);
+ dwarf2_append_expr(debug_info,
+ yasm_expr_create_ident(yasm_expr_int(
+ yasm_intnum_create_uint(DW_LANG_Mips_Assembler)), 0), 2, 0);
+
+ /* Terminate list of abbreviations */
+ abbrev = yasm_xmalloc(sizeof(dwarf2_abbrev));
+ abc = yasm_bc_create_common(&dwarf2_abbrev_bc_callback, abbrev, 0);
+ abbrev->id = 0;
+ abbrev->tag = 0;
+ abbrev->has_children = 0;
+ STAILQ_INIT(&abbrev->attrs);
+ abc->len = 1;
+ yasm_dwarf2__append_bc(debug_abbrev, abc);
+
+ /* mark end of info */
+ yasm_dwarf2__set_head_end(head, yasm_section_bcs_last(debug_info));
+
+ return debug_info;
+}
+
+static void
+dwarf2_abbrev_bc_destroy(void *contents)
+{
+ dwarf2_abbrev *abbrev = (dwarf2_abbrev *)contents;
+ dwarf2_abbrev_attr *n1, *n2;
+
+ /* Delete attributes */
+ n1 = STAILQ_FIRST(&abbrev->attrs);
+ while (n1) {
+ n2 = STAILQ_NEXT(n1, link);
+ yasm_xfree(n1);
+ n1 = n2;
+ }
+
+ yasm_xfree(contents);
+}
+
+static void
+dwarf2_abbrev_bc_print(const void *contents, FILE *f, int indent_level)
+{
+ /* TODO */
+}
+
+static int
+dwarf2_abbrev_bc_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
+ void *add_span_data)
+{
+ yasm_internal_error(N_("tried to calc_len a dwarf2 aranges head bytecode"));
+ /*@notreached@*/
+ return 0;
+}
+
+static int
+dwarf2_abbrev_bc_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ yasm_output_reloc_func output_reloc)
+{
+ dwarf2_abbrev *abbrev = (dwarf2_abbrev *)bc->contents;
+ unsigned char *buf = *bufp;
+ dwarf2_abbrev_attr *attr;
+
+ if (abbrev->id == 0) {
+ YASM_WRITE_8(buf, 0);
+ *bufp = buf;
+ return 0;
+ }
+
+ buf += yasm_get_uleb128(abbrev->id, buf);
+ buf += yasm_get_uleb128(abbrev->tag, buf);
+ YASM_WRITE_8(buf, abbrev->has_children);
+
+ STAILQ_FOREACH(attr, &abbrev->attrs, link) {
+ buf += yasm_get_uleb128(attr->name, buf);
+ buf += yasm_get_uleb128(attr->form, buf);
+ }
+
+ YASM_WRITE_8(buf, 0);
+ YASM_WRITE_8(buf, 0);
+
+ *bufp = buf;
+ return 0;
+}
+
diff --git a/modules/dbgfmts/dwarf2/dwarf2-line.c b/modules/dbgfmts/dwarf2/dwarf2-line.c
new file mode 100644
index 00000000..e4c35fdc
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/dwarf2-line.c
@@ -0,0 +1,1000 @@
+/*
+ * DWARF2 debugging format - line information
+ *
+ * Copyright (C) 2006 Peter Johnson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the author nor the names of other contributors
+ * may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <util.h>
+/*@unused@*/ RCSID("$Id$");
+
+#define YASM_LIB_INTERNAL
+#define YASM_BC_INTERNAL
+#include <libyasm.h>
+
+#include "dwarf2-dbgfmt.h"
+
+/* DWARF line number opcodes */
+typedef enum {
+ DW_LNS_extended_op = 0,
+ DW_LNS_copy,
+ DW_LNS_advance_pc,
+ DW_LNS_advance_line,
+ DW_LNS_set_file,
+ DW_LNS_set_column,
+ DW_LNS_negate_stmt,
+ DW_LNS_set_basic_block,
+ DW_LNS_const_add_pc,
+ DW_LNS_fixed_advance_pc,
+#ifdef WITH_DWARF3
+ /* DWARF 3 extensions */
+ DW_LNS_set_prologue_end,
+ DW_LNS_set_epilogue_begin,
+ DW_LNS_set_isa,
+#endif
+ DWARF2_LINE_OPCODE_BASE
+} dwarf_line_number_op;
+
+/* # of LEB128 operands needed for each of the above opcodes */
+static unsigned char line_opcode_num_operands[DWARF2_LINE_OPCODE_BASE-1] = {
+ 0, /* DW_LNS_copy */
+ 1, /* DW_LNS_advance_pc */
+ 1, /* DW_LNS_advance_line */
+ 1, /* DW_LNS_set_file */
+ 1, /* DW_LNS_set_column */
+ 0, /* DW_LNS_negate_stmt */
+ 0, /* DW_LNS_set_basic_block */
+ 0, /* DW_LNS_const_add_pc */
+ 1, /* DW_LNS_fixed_advance_pc */
+#ifdef WITH_DWARF3
+ 0, /* DW_LNS_set_prologue_end */
+ 0, /* DW_LNS_set_epilogue_begin */
+ 1 /* DW_LNS_set_isa */
+#endif
+};
+
+/* Line number extended opcodes */
+typedef enum {
+ DW_LNE_end_sequence = 1,
+ DW_LNE_set_address,
+ DW_LNE_define_file
+} dwarf_line_number_ext_op;
+
+/* Base and range for line offsets in special opcodes */
+#define DWARF2_LINE_BASE -5
+#define DWARF2_LINE_RANGE 14
+
+#define DWARF2_MAX_SPECIAL_ADDR_DELTA \
+ (((255-DWARF2_LINE_OPCODE_BASE)/DWARF2_LINE_RANGE)*\
+ dbgfmt_dwarf2->min_insn_len)
+
+/* Initial value of is_stmt register */
+#define DWARF2_LINE_DEFAULT_IS_STMT 1
+
+/* Line number state machine register state */
+typedef struct dwarf2_line_state {
+ /* static configuration */
+ yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2;
+
+ /* DWARF2 state machine registers */
+ unsigned long address;
+ unsigned long file;
+ unsigned long line;
+ unsigned long column;
+ unsigned long isa;
+ int is_stmt;
+
+ /* other state information */
+ /*@null@*/ yasm_bytecode *precbc;
+} dwarf2_line_state;
+
+typedef struct dwarf2_spp {
+ yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2;
+ yasm_bytecode *line_start_prevbc;
+ yasm_bytecode *line_end_prevbc;
+} dwarf2_spp;
+
+typedef struct dwarf2_line_op {
+ dwarf_line_number_op opcode;
+ /*@owned@*/ /*@null@*/ yasm_intnum *operand;
+
+ /* extended opcode */
+ dwarf_line_number_ext_op ext_opcode;
+ /*@null@*/ /*@dependent@*/ yasm_symrec *ext_operand; /* unsigned */
+ unsigned long ext_operandsize;
+} dwarf2_line_op;
+
+/* Bytecode callback function prototypes */
+static void dwarf2_spp_bc_destroy(void *contents);
+static void dwarf2_spp_bc_print(const void *contents, FILE *f,
+ int indent_level);
+static int dwarf2_spp_bc_calc_len
+ (yasm_bytecode *bc, yasm_bc_add_span_func add_span, void *add_span_data);
+static int dwarf2_spp_bc_tobytes
+ (yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ /*@null@*/ yasm_output_reloc_func output_reloc);
+
+static void dwarf2_line_op_bc_destroy(void *contents);
+static void dwarf2_line_op_bc_print(const void *contents, FILE *f,
+ int indent_level);
+static int dwarf2_line_op_bc_calc_len
+ (yasm_bytecode *bc, yasm_bc_add_span_func add_span, void *add_span_data);
+static int dwarf2_line_op_bc_tobytes
+ (yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ /*@null@*/ yasm_output_reloc_func output_reloc);
+
+/* Bytecode callback structures */
+static const yasm_bytecode_callback dwarf2_spp_bc_callback = {
+ dwarf2_spp_bc_destroy,
+ dwarf2_spp_bc_print,
+ yasm_bc_finalize_common,
+ dwarf2_spp_bc_calc_len,
+ yasm_bc_expand_common,
+ dwarf2_spp_bc_tobytes,
+ 0
+};
+
+static const yasm_bytecode_callback dwarf2_line_op_bc_callback = {
+ dwarf2_line_op_bc_destroy,
+ dwarf2_line_op_bc_print,
+ yasm_bc_finalize_common,
+ dwarf2_line_op_bc_calc_len,
+ yasm_bc_expand_common,
+ dwarf2_line_op_bc_tobytes,
+ 0
+};
+
+
+static size_t
+dwarf2_dbgfmt_add_file(yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2, size_t filenum,
+ const char *pathname)
+{
+ size_t dirlen;
+ const char *filename;
+ size_t i, dir;
+
+ /* Put the directory into the directory table */
+ dir = 0;
+ dirlen = yasm__splitpath(pathname, &filename);
+ if (dirlen > 0) {
+ /* Look to see if we already have that dir in the table */
+ for (dir=1; dir<dbgfmt_dwarf2->dirs_size+1; dir++) {
+ if (strncmp(dbgfmt_dwarf2->dirs[dir-1], pathname, dirlen) == 0
+ && dbgfmt_dwarf2->dirs[dir-1][dirlen] == '\0')
+ break;
+ }
+ if (dir >= dbgfmt_dwarf2->dirs_size+1) {
+ /* Not found in table, add to end, reallocing if necessary */
+ if (dir >= dbgfmt_dwarf2->dirs_allocated+1) {
+ dbgfmt_dwarf2->dirs_allocated = dir+32;
+ dbgfmt_dwarf2->dirs = yasm_xrealloc(dbgfmt_dwarf2->dirs,
+ sizeof(char *)*dbgfmt_dwarf2->dirs_allocated);
+ }
+ dbgfmt_dwarf2->dirs[dir-1] = yasm__xstrndup(pathname, dirlen);
+ dbgfmt_dwarf2->dirs_size = dir;
+ }
+ }
+
+ /* Put the filename into the filename table */
+ if (filenum == 0) {
+ /* Look to see if we already have that filename in the table */
+ for (; filenum<dbgfmt_dwarf2->filenames_size; filenum++) {
+ if (!dbgfmt_dwarf2->filenames[filenum].filename ||
+ (dbgfmt_dwarf2->filenames[filenum].dir == dir
+ && strcmp(dbgfmt_dwarf2->filenames[filenum].filename,
+ filename) == 0))
+ break;
+ }
+ } else
+ filenum--; /* array index is 0-based */
+
+ /* Realloc table if necessary */
+ if (filenum >= dbgfmt_dwarf2->filenames_allocated) {
+ size_t old_allocated = dbgfmt_dwarf2->filenames_allocated;
+ dbgfmt_dwarf2->filenames_allocated = filenum+32;
+ dbgfmt_dwarf2->filenames = yasm_xrealloc(dbgfmt_dwarf2->filenames,
+ sizeof(dwarf2_filename)*dbgfmt_dwarf2->filenames_allocated);
+ for (i=old_allocated; i<dbgfmt_dwarf2->filenames_allocated; i++) {
+ dbgfmt_dwarf2->filenames[i].pathname = NULL;
+ dbgfmt_dwarf2->filenames[i].filename = NULL;
+ dbgfmt_dwarf2->filenames[i].dir = 0;
+ }
+ }
+
+ /* Actually save in table */
+ if (dbgfmt_dwarf2->filenames[filenum].pathname)
+ yasm_xfree(dbgfmt_dwarf2->filenames[filenum].pathname);
+ if (dbgfmt_dwarf2->filenames[filenum].filename)
+ yasm_xfree(dbgfmt_dwarf2->filenames[filenum].filename);
+ dbgfmt_dwarf2->filenames[filenum].pathname = yasm__xstrdup(pathname);
+ dbgfmt_dwarf2->filenames[filenum].filename = yasm__xstrdup(filename);
+ dbgfmt_dwarf2->filenames[filenum].dir = dir;
+
+ /* Update table size */
+ if (filenum >= dbgfmt_dwarf2->filenames_size)
+ dbgfmt_dwarf2->filenames_size = filenum + 1;
+
+ return filenum;
+}
+
+/* Create and add a new line opcode to a section, updating offset on insertion;
+ * no optimization necessary.
+ */
+static yasm_bytecode *
+dwarf2_dbgfmt_append_line_op(yasm_section *sect, dwarf_line_number_op opcode,
+ /*@only@*/ /*@null@*/ yasm_intnum *operand)
+{
+ dwarf2_line_op *line_op = yasm_xmalloc(sizeof(dwarf2_line_op));
+ yasm_bytecode *bc;
+
+ line_op->opcode = opcode;
+ line_op->operand = operand;
+ line_op->ext_opcode = 0;
+ line_op->ext_operand = NULL;
+ line_op->ext_operandsize = 0;
+
+ bc = yasm_bc_create_common(&dwarf2_line_op_bc_callback, line_op, 0);
+ bc->len = 1;
+ if (operand)
+ bc->len += yasm_intnum_size_leb128(operand,
+ opcode == DW_LNS_advance_line);
+
+ yasm_dwarf2__append_bc(sect, bc);
+ return bc;
+}
+
+/* Create and add a new extended line opcode to a section, updating offset on
+ * insertion; no optimization necessary.
+ */
+static yasm_bytecode *
+dwarf2_dbgfmt_append_line_ext_op(yasm_section *sect,
+ dwarf_line_number_ext_op ext_opcode,
+ unsigned long ext_operandsize,
+ /*@null@*/ yasm_symrec *ext_operand)
+{
+ dwarf2_line_op *line_op = yasm_xmalloc(sizeof(dwarf2_line_op));
+ yasm_bytecode *bc;
+
+ line_op->opcode = DW_LNS_extended_op;
+ line_op->operand = yasm_intnum_create_uint(ext_operandsize+1);
+ line_op->ext_opcode = ext_opcode;
+ line_op->ext_operand = ext_operand;
+ line_op->ext_operandsize = ext_operandsize;
+
+ bc = yasm_bc_create_common(&dwarf2_line_op_bc_callback, line_op, 0);
+ bc->len = 2 + yasm_intnum_size_leb128(line_op->operand, 0) +
+ ext_operandsize;
+
+ yasm_dwarf2__append_bc(sect, bc);
+ return bc;
+}
+
+static void
+dwarf2_dbgfmt_finalize_locs(yasm_section *sect, dwarf2_section_data *dsd)
+{
+ /*@dependent@*/ yasm_symrec *lastsym = NULL;
+ /*@null@*/ yasm_bytecode *bc;
+ /*@null@*/ dwarf2_loc *loc;
+
+ bc = yasm_section_bcs_first(sect);
+ STAILQ_FOREACH(loc, &dsd->locs, link) {
+ /* Find the first bytecode following this loc by looking at
+ * the virtual line numbers. XXX: this assumes the source file
+ * order will be the same as the actual section order. If we ever
+ * implement subsegs this will NOT necessarily be true and this logic
+ * will need to be fixed to handle it!
+ *
+ * Keep track of last symbol seen prior to the loc.
+ */
+ while (bc && bc->line <= loc->vline) {
+ if (bc->symrecs) {
+ int i = 0;
+ while (bc->symrecs[i]) {
+ lastsym = bc->symrecs[i];
+ i++;
+ }
+ }
+ bc = yasm_bc__next(bc);
+ }
+ loc->sym = lastsym;
+ loc->bc = bc;
+ }
+}
+
+static int
+dwarf2_dbgfmt_gen_line_op(yasm_section *debug_line, dwarf2_line_state *state,
+ const dwarf2_loc *loc,
+ /*@null@*/ const dwarf2_loc *nextloc)
+{
+ unsigned long addr_delta;
+ long line_delta;
+ int opcode1, opcode2;
+ yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2 = state->dbgfmt_dwarf2;
+
+ if (state->file != loc->file) {
+ state->file = loc->file;
+ dwarf2_dbgfmt_append_line_op(debug_line, DW_LNS_set_file,
+ yasm_intnum_create_uint(state->file));
+ }
+ if (state->column != loc->column) {
+ state->column = loc->column;
+ dwarf2_dbgfmt_append_line_op(debug_line, DW_LNS_set_column,
+ yasm_intnum_create_uint(state->column));
+ }
+#ifdef WITH_DWARF3
+ if (loc->isa_change) {
+ state->isa = loc->isa;
+ dwarf2_dbgfmt_append_line_op(debug_line, DW_LNS_set_isa,
+ yasm_intnum_create_uint(state->isa));
+ }
+#endif
+ if (state->is_stmt == 0 && loc->is_stmt == IS_STMT_SET) {
+ state->is_stmt = 1;
+ dwarf2_dbgfmt_append_line_op(debug_line, DW_LNS_negate_stmt, NULL);
+ } else if (state->is_stmt == 1 && loc->is_stmt == IS_STMT_CLEAR) {
+ state->is_stmt = 0;
+ dwarf2_dbgfmt_append_line_op(debug_line, DW_LNS_negate_stmt, NULL);
+ }
+ if (loc->basic_block) {
+ dwarf2_dbgfmt_append_line_op(debug_line, DW_LNS_set_basic_block, NULL);
+ }
+#ifdef WITH_DWARF3
+ if (loc->prologue_end) {
+ dwarf2_dbgfmt_append_line_op(debug_line, DW_LNS_set_prologue_end, NULL);
+ }
+ if (loc->epilogue_begin) {
+ dwarf2_dbgfmt_append_line_op(debug_line, DW_LNS_set_epilogue_begin,
+ NULL);
+ }
+#endif
+
+ /* If multiple loc for the same location, use last */
+ if (nextloc && nextloc->bc->offset == loc->bc->offset)
+ return 0;
+
+ if (!state->precbc) {
+ /* Set the starting address for the section */
+ if (!loc->sym) {
+ /* shouldn't happen! */
+ yasm_error_set(YASM_ERROR_GENERAL,
+ N_("could not find label prior to loc"));
+ return 1;
+ }
+ dwarf2_dbgfmt_append_line_ext_op(debug_line, DW_LNE_set_address,
+ dbgfmt_dwarf2->sizeof_address, loc->sym);
+ addr_delta = 0;
+ } else if (loc->bc) {
+ if (state->precbc->offset > loc->bc->offset)
+ yasm_internal_error(N_("dwarf2 address went backwards?"));
+ addr_delta = loc->bc->offset - state->precbc->offset;
+ } else
+ return 0; /* ran out of bytecodes! XXX: do something? */
+
+ /* Generate appropriate opcode(s). Address can only increment,
+ * whereas line number can go backwards.
+ */
+ line_delta = loc->line - state->line;
+ state->line = loc->line;
+
+ /* First handle the line delta */
+ if (line_delta < DWARF2_LINE_BASE
+ || line_delta >= DWARF2_LINE_BASE+DWARF2_LINE_RANGE) {
+ /* Won't fit in special opcode, use (signed) line advance */
+ dwarf2_dbgfmt_append_line_op(debug_line, DW_LNS_advance_line,
+ yasm_intnum_create_int(line_delta));
+ line_delta = 0;
+ }
+
+ /* Next handle the address delta */
+ opcode1 = DWARF2_LINE_OPCODE_BASE + line_delta - DWARF2_LINE_BASE +
+ DWARF2_LINE_RANGE * (addr_delta / dbgfmt_dwarf2->min_insn_len);
+ opcode2 = DWARF2_LINE_OPCODE_BASE + line_delta - DWARF2_LINE_BASE +
+ DWARF2_LINE_RANGE * ((addr_delta - DWARF2_MAX_SPECIAL_ADDR_DELTA) /
+ dbgfmt_dwarf2->min_insn_len);
+ if (line_delta == 0 && addr_delta == 0) {
+ /* Both line and addr deltas are 0: do DW_LNS_copy */
+ dwarf2_dbgfmt_append_line_op(debug_line, DW_LNS_copy, NULL);
+ } else if (addr_delta <= DWARF2_MAX_SPECIAL_ADDR_DELTA && opcode1 <= 255) {
+ /* Addr delta in range of special opcode */
+ dwarf2_dbgfmt_append_line_op(debug_line, opcode1, NULL);
+ } else if (addr_delta <= 2*DWARF2_MAX_SPECIAL_ADDR_DELTA
+ && opcode2 <= 255) {
+ /* Addr delta in range of const_add_pc + special */
+ dwarf2_dbgfmt_append_line_op(debug_line, DW_LNS_const_add_pc, NULL);
+ dwarf2_dbgfmt_append_line_op(debug_line, opcode2, NULL);
+ } else {
+ /* Need advance_pc */
+ dwarf2_dbgfmt_append_line_op(debug_line, DW_LNS_advance_pc,
+ yasm_intnum_create_uint(addr_delta));
+ /* Take care of any remaining line_delta and add entry to matrix */
+ if (line_delta == 0)
+ dwarf2_dbgfmt_append_line_op(debug_line, DW_LNS_copy, NULL);
+ else {
+ unsigned int opcode;
+ opcode = DWARF2_LINE_OPCODE_BASE + line_delta - DWARF2_LINE_BASE;
+ dwarf2_dbgfmt_append_line_op(debug_line, opcode, NULL);
+ }
+ }
+ state->precbc = loc->bc;
+ return 0;
+}
+
+typedef struct dwarf2_line_bc_info {
+ yasm_section *debug_line;
+ yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2;
+ dwarf2_line_state *state;
+ dwarf2_loc loc;
+ size_t lastfile;
+} dwarf2_line_bc_info;
+
+static int
+dwarf2_generate_line_bc(yasm_bytecode *bc, /*@null@*/ void *d)
+{
+ dwarf2_line_bc_info *info = (dwarf2_line_bc_info *)d;
+ yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2 = info->dbgfmt_dwarf2;
+ size_t i;
+ const char *filename;
+ /*@null@*/ yasm_bytecode *nextbc = yasm_bc__next(bc);
+
+ if (nextbc && bc->offset == nextbc->offset)
+ return 0;
+
+ info->loc.vline = bc->line;
+ info->loc.bc = bc;
+
+ /* Keep track of last symbol seen */
+ if (bc->symrecs) {
+ i = 0;
+ while (bc->symrecs[i]) {
+ info->loc.sym = bc->symrecs[i];
+ i++;
+ }
+ }
+
+ yasm_linemap_lookup(dbgfmt_dwarf2->linemap, bc->line, &filename,
+ &info->loc.line);
+ /* Find file index; just linear search it unless it was the last used */
+ if (info->lastfile > 0
+ && strcmp(filename, dbgfmt_dwarf2->filenames[info->lastfile-1].pathname)
+ == 0)
+ info->loc.file = info->lastfile;
+ else {
+ for (i=0; i<dbgfmt_dwarf2->filenames_size; i++) {
+ if (strcmp(filename, dbgfmt_dwarf2->filenames[i].pathname) == 0)
+ break;
+ }
+ if (i >= dbgfmt_dwarf2->filenames_size)
+ yasm_internal_error(N_("could not find filename in table"));
+ info->loc.file = i+1;
+ info->lastfile = i+1;
+ }
+ if (dwarf2_dbgfmt_gen_line_op(info->debug_line, info->state, &info->loc,
+ NULL))
+ return 1;
+ return 0;
+}
+
+typedef struct dwarf2_line_info {
+ yasm_section *debug_line; /* section to which line number info goes */
+ yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2;
+ yasm_errwarns *errwarns;
+
+ /* Generate based on bytecodes (1) or locs (0)? Use bytecodes if we're
+ * generating line numbers for the actual assembly source file.
+ */
+ int asm_source;
+
+ /* number of sections line number info generated for */
+ size_t num_sections;
+ /* last section line number info generated for */
+ /*@null@*/ yasm_section *last_code;
+} dwarf2_line_info;
+
+static int
+dwarf2_generate_line_section(yasm_section *sect, /*@null@*/ void *d)
+{
+ dwarf2_line_info *info = (dwarf2_line_info *)d;
+ yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2 = info->dbgfmt_dwarf2;
+ /*@null@*/ dwarf2_section_data *dsd;
+ /*@null@*/ yasm_bytecode *bc;
+ dwarf2_line_state state;
+ unsigned long addr_delta;
+
+ dsd = yasm_section_get_data(sect, &yasm_dwarf2__section_data_cb);
+ if (!dsd) {
+ if (info->asm_source && yasm_section_is_code(sect)) {
+ /* Create line data for asm code sections */
+ dsd = yasm_xmalloc(sizeof(dwarf2_section_data));
+ STAILQ_INIT(&dsd->locs);
+ yasm_section_add_data(sect, &yasm_dwarf2__section_data_cb, dsd);
+ } else
+ return 0; /* no line data for this section */
+ }
+
+ info->num_sections++;
+ info->last_code = sect;
+
+ /* initialize state machine registers for each sequence */
+ state.dbgfmt_dwarf2 = dbgfmt_dwarf2;
+ state.address = 0;
+ state.file = 1;
+ state.line = 1;
+ state.column = 0;
+ state.isa = 0;
+ state.is_stmt = DWARF2_LINE_DEFAULT_IS_STMT;
+ state.precbc = NULL;
+
+ if (info->asm_source) {
+ dwarf2_line_bc_info bcinfo;
+
+ bcinfo.debug_line = info->debug_line;
+ bcinfo.dbgfmt_dwarf2 = dbgfmt_dwarf2;
+ bcinfo.state = &state;
+ bcinfo.lastfile = 0;
+ bcinfo.loc.isa_change = 0;
+ bcinfo.loc.column = 0;
+ bcinfo.loc.is_stmt = IS_STMT_NOCHANGE;
+ bcinfo.loc.basic_block = 0;
+ bcinfo.loc.prologue_end = 0;
+ bcinfo.loc.epilogue_begin = 0;
+ bcinfo.loc.sym = NULL;
+
+ /* bcs_traverse() skips first "dummy" bytecode, so look at it
+ * separately to determine the initial symrec.
+ */
+ bc = yasm_section_bcs_first(sect);
+ if (bc->symrecs) {
+ size_t i = 0;
+ while (bc->symrecs[i]) {
+ bcinfo.loc.sym = bc->symrecs[i];
+ i++;
+ }
+ }
+
+ yasm_section_bcs_traverse(sect, info->errwarns, &bcinfo,
+ dwarf2_generate_line_bc);
+ } else {
+ /*@null@*/ dwarf2_loc *loc;
+
+ dwarf2_dbgfmt_finalize_locs(sect, dsd);
+
+ STAILQ_FOREACH(loc, &dsd->locs, link) {
+ if (dwarf2_dbgfmt_gen_line_op(info->debug_line, &state, loc,
+ STAILQ_NEXT(loc, link)))
+ return 1;
+ }
+ }
+
+ /* End sequence: bring address to end of section, then output end
+ * sequence opcode. Don't use a special opcode to do this as we don't
+ * want an extra entry in the line matrix.
+ */
+ if (!state.precbc)
+ state.precbc = yasm_section_bcs_first(sect);
+ bc = yasm_section_bcs_last(sect);
+ addr_delta = bc->offset + bc->len - state.precbc->offset;
+ if (addr_delta == DWARF2_MAX_SPECIAL_ADDR_DELTA)
+ dwarf2_dbgfmt_append_line_op(info->debug_line, DW_LNS_const_add_pc,
+ NULL);
+ else if (addr_delta > 0)
+ dwarf2_dbgfmt_append_line_op(info->debug_line, DW_LNS_advance_pc,
+ yasm_intnum_create_uint(addr_delta));
+ dwarf2_dbgfmt_append_line_ext_op(info->debug_line, DW_LNE_end_sequence, 0,
+ NULL);
+
+ return 0;
+}
+
+static int
+dwarf2_generate_filename(const char *filename, void *d)
+{
+ yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2 = (yasm_dbgfmt_dwarf2 *)d;
+ dwarf2_dbgfmt_add_file(dbgfmt_dwarf2, 0, filename);
+ return 0;
+}
+
+yasm_section *
+yasm_dwarf2__generate_line(yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2,
+ yasm_errwarns *errwarns, int asm_source,
+ /*@out@*/ yasm_section **main_code,
+ /*@out@*/ size_t *num_line_sections)
+{
+ dwarf2_line_info info;
+ int new;
+ size_t i;
+ yasm_bytecode *last, *sppbc;
+ dwarf2_spp *spp;
+ dwarf2_head *head;
+
+ if (asm_source) {
+ /* Generate dirs and filenames based on linemap */
+ yasm_linemap_traverse_filenames(dbgfmt_dwarf2->linemap, dbgfmt_dwarf2,
+ dwarf2_generate_filename);
+ }
+
+ info.num_sections = 0;
+ info.last_code = NULL;
+ info.asm_source = asm_source;
+ info.dbgfmt_dwarf2 = dbgfmt_dwarf2;
+ info.debug_line = yasm_object_get_general(dbgfmt_dwarf2->object,
+ ".debug_line", 0, 1, 0, 0, &new,
+ 0);
+ last = yasm_section_bcs_last(info.debug_line);
+
+ /* header */
+ head = yasm_dwarf2__add_head(dbgfmt_dwarf2, info.debug_line, NULL, 0, 0);
+
+ /* statement program prologue */
+ spp = yasm_xmalloc(sizeof(dwarf2_spp));
+ spp->dbgfmt_dwarf2 = dbgfmt_dwarf2;
+ sppbc = yasm_bc_create_common(&dwarf2_spp_bc_callback, spp, 0);
+ sppbc->len = dbgfmt_dwarf2->sizeof_offset + 5 +
+ NELEMS(line_opcode_num_operands);
+
+ /* directory list */
+ for (i=0; i<dbgfmt_dwarf2->dirs_size; i++)
+ sppbc->len += strlen(dbgfmt_dwarf2->dirs[i])+1;
+ sppbc->len++;
+
+ /* filename list */
+ for (i=0; i<dbgfmt_dwarf2->filenames_size; i++) {
+ if (!dbgfmt_dwarf2->filenames[i].filename) {
+ yasm_error_set(YASM_ERROR_GENERAL,
+ N_("dwarf2 file number %d unassigned"), i+1);
+ yasm_errwarn_propagate(errwarns, 0);
+ continue;
+ }
+ sppbc->len += strlen(dbgfmt_dwarf2->filenames[i].filename) + 1 +
+ yasm_size_uleb128(dbgfmt_dwarf2->filenames[i].dir) + 2;
+ }
+ sppbc->len++;
+ yasm_dwarf2__append_bc(info.debug_line, sppbc);
+
+ /* statement program */
+ yasm_object_sections_traverse(dbgfmt_dwarf2->object, (void *)&info,
+ dwarf2_generate_line_section);
+
+ /* mark end of line information */
+ yasm_dwarf2__set_head_end(head, yasm_section_bcs_last(info.debug_line));
+
+ *num_line_sections = info.num_sections;
+ if (info.num_sections == 1)
+ *main_code = info.last_code;
+ else
+ *main_code = NULL;
+ return info.debug_line;
+}
+
+static void
+dwarf2_spp_bc_destroy(void *contents)
+{
+ yasm_xfree(contents);
+}
+
+static void
+dwarf2_spp_bc_print(const void *contents, FILE *f, int indent_level)
+{
+ /* TODO */
+}
+
+static int
+dwarf2_spp_bc_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
+ void *add_span_data)
+{
+ yasm_internal_error(N_("tried to calc_len a dwarf2 spp bytecode"));
+ /*@notreached@*/
+ return 0;
+}
+
+static int
+dwarf2_spp_bc_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ yasm_output_reloc_func output_reloc)
+{
+ dwarf2_spp *spp = (dwarf2_spp *)bc->contents;
+ yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2 = spp->dbgfmt_dwarf2;
+ unsigned char *buf = *bufp;
+ yasm_intnum *cval;
+ size_t i, len;
+
+ /* Prologue length (following this field) */
+ cval = yasm_intnum_create_uint(bc->len - (buf-*bufp) -
+ dbgfmt_dwarf2->sizeof_offset);
+ yasm_arch_intnum_tobytes(dbgfmt_dwarf2->arch, cval, buf,
+ dbgfmt_dwarf2->sizeof_offset,
+ dbgfmt_dwarf2->sizeof_offset*8, 0, bc, 0);
+ buf += dbgfmt_dwarf2->sizeof_offset;
+
+ YASM_WRITE_8(buf, dbgfmt_dwarf2->min_insn_len); /* minimum_instr_len */
+ YASM_WRITE_8(buf, DWARF2_LINE_DEFAULT_IS_STMT); /* default_is_stmt */
+ YASM_WRITE_8(buf, DWARF2_LINE_BASE); /* line_base */
+ YASM_WRITE_8(buf, DWARF2_LINE_RANGE); /* line_range */
+ YASM_WRITE_8(buf, DWARF2_LINE_OPCODE_BASE); /* opcode_base */
+
+ /* Standard opcode # operands array */
+ for (i=0; i<NELEMS(line_opcode_num_operands); i++)
+ YASM_WRITE_8(buf, line_opcode_num_operands[i]);
+
+ /* directory list */
+ for (i=0; i<dbgfmt_dwarf2->dirs_size; i++) {
+ len = strlen(dbgfmt_dwarf2->dirs[i])+1;
+ memcpy(buf, dbgfmt_dwarf2->dirs[i], len);
+ buf += len;
+ }
+ /* finish with single 0 byte */
+ YASM_WRITE_8(buf, 0);
+
+ /* filename list */
+ for (i=0; i<dbgfmt_dwarf2->filenames_size; i++) {
+ len = strlen(dbgfmt_dwarf2->filenames[i].filename)+1;
+ memcpy(buf, dbgfmt_dwarf2->filenames[i].filename, len);
+ buf += len;
+
+ /* dir */
+ buf += yasm_get_uleb128(dbgfmt_dwarf2->filenames[i].dir, buf);
+ YASM_WRITE_8(buf, 0); /* time */
+ YASM_WRITE_8(buf, 0); /* length */
+ }
+ /* finish with single 0 byte */
+ YASM_WRITE_8(buf, 0);
+
+ *bufp = buf;
+
+ yasm_intnum_destroy(cval);
+ return 0;
+}
+
+static void
+dwarf2_line_op_bc_destroy(void *contents)
+{
+ dwarf2_line_op *line_op = (dwarf2_line_op *)contents;
+ if (line_op->operand)
+ yasm_intnum_destroy(line_op->operand);
+ yasm_xfree(contents);
+}
+
+static void
+dwarf2_line_op_bc_print(const void *contents, FILE *f, int indent_level)
+{
+ /* TODO */
+}
+
+static int
+dwarf2_line_op_bc_calc_len(yasm_bytecode *bc, yasm_bc_add_span_func add_span,
+ void *add_span_data)
+{
+ yasm_internal_error(N_("tried to calc_len a dwarf2 line_op bytecode"));
+ /*@notreached@*/
+ return 0;
+}
+
+static int
+dwarf2_line_op_bc_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ yasm_output_reloc_func output_reloc)
+{
+ dwarf2_line_op *line_op = (dwarf2_line_op *)bc->contents;
+ unsigned char *buf = *bufp;
+
+ YASM_WRITE_8(buf, line_op->opcode);
+ if (line_op->operand)
+ buf += yasm_intnum_get_leb128(line_op->operand, buf,
+ line_op->opcode == DW_LNS_advance_line);
+ if (line_op->ext_opcode > 0) {
+ YASM_WRITE_8(buf, line_op->ext_opcode);
+ if (line_op->ext_operand) {
+ yasm_value value;
+ yasm_value_init_sym(&value, line_op->ext_operand,
+ line_op->ext_operandsize*8);
+ output_value(&value, buf, line_op->ext_operandsize,
+ (unsigned long)(buf-*bufp), bc, 0, d);
+ buf += line_op->ext_operandsize;
+ }
+ }
+
+ *bufp = buf;
+ return 0;
+}
+
+int
+yasm_dwarf2__line_directive(yasm_dbgfmt_dwarf2 *dbgfmt_dwarf2,
+ const char *name, yasm_section *sect,
+ yasm_valparamhead *valparams, unsigned long line)
+{
+ if (yasm__strcasecmp(name, "loc") == 0) {
+ /*@dependent@*/ /*@null@*/ const yasm_intnum *intn;
+ dwarf2_section_data *dsd;
+ dwarf2_loc *loc = yasm_xmalloc(sizeof(dwarf2_loc));
+
+ /* File number (required) */
+ yasm_valparam *vp = yasm_vps_first(valparams);
+ if (!vp || !vp->param) {
+ yasm_error_set(YASM_ERROR_SYNTAX, N_("file number required"));
+ yasm_xfree(loc);
+ return 0;
+ }
+ intn = yasm_expr_get_intnum(&vp->param, NULL);
+ if (!intn) {
+ yasm_error_set(YASM_ERROR_NOT_CONSTANT,
+ N_("file number is not a constant"));
+ yasm_xfree(loc);
+ return 0;
+ }
+ if (yasm_intnum_sign(intn) != 1) {
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("file number less than one"));
+ yasm_xfree(loc);
+ return 0;
+ }
+ loc->file = yasm_intnum_get_uint(intn);
+
+ /* Line number (required) */
+ vp = yasm_vps_next(vp);
+ if (!vp || !vp->param) {
+ yasm_error_set(YASM_ERROR_SYNTAX, N_("line number required"));
+ yasm_xfree(loc);
+ return 0;
+ }
+ intn = yasm_expr_get_intnum(&vp->param, NULL);
+ if (!intn) {
+ yasm_error_set(YASM_ERROR_NOT_CONSTANT,
+ N_("file number is not a constant"));
+ yasm_xfree(loc);
+ return 0;
+ }
+ loc->line = yasm_intnum_get_uint(intn);
+
+ /* Generate new section data if it doesn't already exist */
+ dsd = yasm_section_get_data(sect, &yasm_dwarf2__section_data_cb);
+ if (!dsd) {
+ dsd = yasm_xmalloc(sizeof(dwarf2_section_data));
+ STAILQ_INIT(&dsd->locs);
+ yasm_section_add_data(sect, &yasm_dwarf2__section_data_cb, dsd);
+ }
+
+ /* Defaults for optional settings */
+ loc->column = 0;
+ loc->isa_change = 0;
+ loc->isa = 0;
+ loc->is_stmt = IS_STMT_NOCHANGE;
+ loc->basic_block = 0;
+ loc->prologue_end = 0;
+ loc->epilogue_begin = 0;
+
+ /* Optional column number */
+ vp = yasm_vps_next(vp);
+ if (vp && vp->param) {
+ intn = yasm_expr_get_intnum(&vp->param, NULL);
+ if (!intn) {
+ yasm_error_set(YASM_ERROR_NOT_CONSTANT,
+ N_("column number is not a constant"));
+ yasm_xfree(loc);
+ return 0;
+ }
+ loc->column = yasm_intnum_get_uint(intn);
+ vp = yasm_vps_next(vp);
+ }
+
+ /* Other options */
+ while (vp && vp->val) {
+ if (yasm__strcasecmp(vp->val, "basic_block") == 0)
+ loc->basic_block = 1;
+ else if (yasm__strcasecmp(vp->val, "prologue_end") == 0)
+ loc->prologue_end = 1;
+ else if (yasm__strcasecmp(vp->val, "epilogue_begin") == 0)
+ loc->epilogue_begin = 1;
+ else if (yasm__strcasecmp(vp->val, "is_stmt") == 0) {
+ if (!vp->param) {
+ yasm_error_set(YASM_ERROR_SYNTAX,
+ N_("is_stmt requires value"));
+ yasm_xfree(loc);
+ return 0;
+ }
+ intn = yasm_expr_get_intnum(&vp->param, NULL);
+ if (!intn) {
+ yasm_error_set(YASM_ERROR_NOT_CONSTANT,
+ N_("is_stmt value is not a constant"));
+ yasm_xfree(loc);
+ return 0;
+ }
+ if (yasm_intnum_is_zero(intn))
+ loc->is_stmt = IS_STMT_SET;
+ else if (yasm_intnum_is_pos1(intn))
+ loc->is_stmt = IS_STMT_CLEAR;
+ else {
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("is_stmt value not 0 or 1"));
+ yasm_xfree(loc);
+ return 0;
+ }
+ } else if (yasm__strcasecmp(vp->val, "isa") == 0) {
+ if (!vp->param) {
+ yasm_error_set(YASM_ERROR_SYNTAX, N_("isa requires value"));
+ yasm_xfree(loc);
+ return 0;
+ }
+ intn = yasm_expr_get_intnum(&vp->param, NULL);
+ if (!intn) {
+ yasm_error_set(YASM_ERROR_NOT_CONSTANT,
+ N_("isa value is not a constant"));
+ yasm_xfree(loc);
+ return 0;
+ }
+ if (yasm_intnum_sign(intn) < 0) {
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("isa value less than zero"));
+ yasm_xfree(loc);
+ return 0;
+ }
+ loc->isa_change = 1;
+ loc->isa = yasm_intnum_get_uint(intn);
+ } else
+ yasm_warn_set(YASM_WARN_GENERAL,
+ N_("unrecognized loc option `%s'"), vp->val);
+ }
+
+ /* Append new location */
+ loc->vline = line;
+ loc->bc = NULL;
+ loc->sym = NULL;
+ STAILQ_INSERT_TAIL(&dsd->locs, loc, link);
+
+ return 0;
+ } else if (yasm__strcasecmp(name, "file") == 0) {
+ /*@dependent@*/ /*@null@*/ const yasm_intnum *file_intn;
+ size_t filenum;
+
+ yasm_valparam *vp = yasm_vps_first(valparams);
+
+ if (vp->val) {
+ /* Just a bare filename */
+ yasm_object_set_source_fn(dbgfmt_dwarf2->object, vp->val);
+ return 0;
+ }
+
+ /* Otherwise.. first vp is the file number */
+ file_intn = yasm_expr_get_intnum(&vp->param, NULL);
+ if (!file_intn) {
+ yasm_error_set(YASM_ERROR_NOT_CONSTANT,
+ N_("file number is not a constant"));
+ return 0;
+ }
+ filenum = (size_t)yasm_intnum_get_uint(file_intn);
+
+ vp = yasm_vps_next(vp);
+ if (!vp || !vp->val) {
+ yasm_error_set(YASM_ERROR_SYNTAX,
+ N_("file number given but no filename"));
+ return 0;
+ }
+
+ dwarf2_dbgfmt_add_file(dbgfmt_dwarf2, filenum, vp->val);
+ return 0;
+ }
+ return 1;
+}
+
diff --git a/modules/dbgfmts/dwarf2/tests/Makefile.inc b/modules/dbgfmts/dwarf2/tests/Makefile.inc
new file mode 100644
index 00000000..1136e288
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/tests/Makefile.inc
@@ -0,0 +1,9 @@
+# $Id$
+
+EXTRA_DIST += modules/dbgfmts/dwarf2/tests/pass32/Makefile.inc
+EXTRA_DIST += modules/dbgfmts/dwarf2/tests/pass64/Makefile.inc
+EXTRA_DIST += modules/dbgfmts/dwarf2/tests/passwin64/Makefile.inc
+include modules/dbgfmts/dwarf2/tests/pass32/Makefile.inc
+include modules/dbgfmts/dwarf2/tests/pass64/Makefile.inc
+include modules/dbgfmts/dwarf2/tests/passwin64/Makefile.inc
+
diff --git a/modules/dbgfmts/dwarf2/tests/pass32/Makefile.inc b/modules/dbgfmts/dwarf2/tests/pass32/Makefile.inc
new file mode 100644
index 00000000..03a924ce
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/tests/pass32/Makefile.inc
@@ -0,0 +1,9 @@
+# $Id$
+
+TESTS += modules/dbgfmts/dwarf2/tests/pass32/dwarf2_pass32_test.sh
+
+EXTRA_DIST += modules/dbgfmts/dwarf2/tests/pass32/dwarf2_pass32_test.sh
+EXTRA_DIST += modules/dbgfmts/dwarf2/tests/pass32/dwarf32_testhd.asm
+EXTRA_DIST += modules/dbgfmts/dwarf2/tests/pass32/dwarf32_testhd.errwarn
+EXTRA_DIST += modules/dbgfmts/dwarf2/tests/pass32/dwarf32_testhd.hex
+
diff --git a/modules/dbgfmts/dwarf2/tests/pass32/dwarf2_pass32_test.sh b/modules/dbgfmts/dwarf2/tests/pass32/dwarf2_pass32_test.sh
new file mode 100755
index 00000000..ba89b781
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/tests/pass32/dwarf2_pass32_test.sh
@@ -0,0 +1,4 @@
+#! /bin/sh
+# $Id$
+${srcdir}/out_test.sh dwarf2_pass32_test modules/dbgfmts/dwarf2/tests/pass32 "dwarf2 dbgfmt pass32" "-f elf -p gas -g dwarf2" ".o"
+exit $?
diff --git a/modules/dbgfmts/dwarf2/tests/pass32/dwarf32_testhd.asm b/modules/dbgfmts/dwarf2/tests/pass32/dwarf32_testhd.asm
new file mode 100644
index 00000000..d5a5b08d
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/tests/pass32/dwarf32_testhd.asm
@@ -0,0 +1,980 @@
+ .file "test_hd.c"
+ .section .debug_abbrev,"",@progbits
+.Ldebug_abbrev0:
+ .section .debug_info,"",@progbits
+.Ldebug_info0:
+ .section .debug_line,"",@progbits
+.Ldebug_line0:
+ .text
+.Ltext0:
+ .section .rodata.str1.1,"aMS",@progbits,1
+.LC0:
+ .string "Usage: %s <file>\n"
+.LC1:
+ .string "rb"
+.LC2:
+ .string "Could not open `%s'.\n"
+.LC3:
+ .string "%02x \n"
+.LC4:
+ .string "Error reading from `%s'.\n"
+ .text
+ .p2align 2,,3
+.globl main
+ .type main, @function
+main:
+.LFB3:
+ .file 1 "test_hd.c"
+ .loc 1 33 0
+ pushl %ebp
+.LCFI0:
+ movl %esp, %ebp
+.LCFI1:
+ pushl %esi
+.LCFI2:
+ pushl %ebx
+.LCFI3:
+ movl 12(%ebp), %esi
+ andl $-16, %esp
+ subl $16, %esp
+ .loc 1 37 0
+ cmpl $2, 8(%ebp)
+ je .L2
+ .loc 1 38 0
+ subl $4, %esp
+ pushl (%esi)
+ pushl $.LC0
+ pushl __stderrp
+.LCFI4:
+ call fprintf
+ .loc 1 39 0
+ movl $1, %eax
+ jmp .L1
+ .p2align 2,,3
+.L2:
+ .loc 1 42 0
+ subl $8, %esp
+ pushl $.LC1
+ pushl 4(%esi)
+ call fopen
+ movl %eax, %ebx
+ .loc 1 44 0
+ addl $16, %esp
+ testl %eax, %eax
+ jne .L4
+ .loc 1 45 0
+ subl $4, %esp
+ pushl 4(%esi)
+ pushl $.LC2
+ pushl __stderrp
+ call fprintf
+ .loc 1 46 0
+ movl $1, %eax
+ jmp .L1
+ .p2align 2,,3
+.L6:
+ .loc 1 50 0
+ subl $8, %esp
+ pushl %eax
+ pushl $.LC3
+ call printf
+ addl $16, %esp
+.L4:
+ subl $12, %esp
+ pushl %ebx
+ call fgetc
+ addl $16, %esp
+ cmpl $-1, %eax
+ jne .L6
+ .loc 1 52 0
+ cmpl $0, __isthreaded
+ jne .L8
+ testb $64, 12(%ebx)
+ jne .L9
+ jmp .L7
+.L8:
+ subl $12, %esp
+ pushl %ebx
+ call ferror
+ addl $16, %esp
+ testl %eax, %eax
+ je .L7
+.L9:
+ .loc 1 53 0
+ subl $4, %esp
+ pushl 4(%esi)
+ pushl $.LC4
+ pushl __stderrp
+ call fprintf
+ .loc 1 54 0
+ movl $1, %eax
+ jmp .L1
+.L7:
+ .loc 1 57 0
+ subl $12, %esp
+ pushl %ebx
+ call fclose
+ .loc 1 58 0
+ movl $0, %eax
+ .p2align 2,,3
+.L1:
+ .loc 1 59 0
+ leal -8(%ebp), %esp
+ popl %ebx
+ popl %esi
+ leave
+ ret
+.LFE3:
+ .size main, .-main
+ .section .debug_frame,"",@progbits
+.Lframe0:
+ .long .LECIE0-.LSCIE0
+.LSCIE0:
+ .long 0xffffffff
+ .byte 0x1
+ .string ""
+ .uleb128 0x1
+ .sleb128 -4
+ .byte 0x8
+ .byte 0xc
+ .uleb128 0x4
+ .uleb128 0x4
+ .byte 0x88
+ .uleb128 0x1
+ .p2align 2
+.LECIE0:
+.LSFDE0:
+ .long .LEFDE0-.LASFDE0
+.LASFDE0:
+ .long .Lframe0
+ .long .LFB3
+ .long .LFE3-.LFB3
+ .byte 0x4
+ .long .LCFI0-.LFB3
+ .byte 0xe
+ .uleb128 0x8
+ .byte 0x85
+ .uleb128 0x2
+ .byte 0x4
+ .long .LCFI1-.LCFI0
+ .byte 0xd
+ .uleb128 0x5
+ .byte 0x4
+ .long .LCFI3-.LCFI1
+ .byte 0x83
+ .uleb128 0x4
+ .byte 0x86
+ .uleb128 0x3
+ .byte 0x4
+ .long .LCFI4-.LCFI3
+ .byte 0x2e
+ .uleb128 0x10
+ .p2align 2
+.LEFDE0:
+ .file 2 "/usr/include/stdio.h"
+ .file 3 "/usr/include/sys/_types.h"
+ .file 4 "/usr/include/machine/_types.h"
+ .text
+.Letext0:
+ .section .debug_info
+ .long 0x326
+ .value 0x2
+ .long .Ldebug_abbrev0
+ .byte 0x4
+ .uleb128 0x1
+ .long .Ldebug_line0
+ .long .Letext0
+ .long .Ltext0
+ .long .LASF37
+ .byte 0x1
+ .long .LASF38
+ .long .LASF39
+ .uleb128 0x2
+ .long .LASF0
+ .byte 0x1
+ .byte 0x6
+ .uleb128 0x2
+ .long .LASF1
+ .byte 0x1
+ .byte 0x8
+ .uleb128 0x2
+ .long .LASF2
+ .byte 0x2
+ .byte 0x5
+ .uleb128 0x2
+ .long .LASF3
+ .byte 0x2
+ .byte 0x7
+ .uleb128 0x3
+ .string "int"
+ .byte 0x4
+ .byte 0x5
+ .uleb128 0x2
+ .long .LASF4
+ .byte 0x4
+ .byte 0x7
+ .uleb128 0x4
+ .long .LASF11
+ .byte 0x4
+ .byte 0x3a
+ .long 0x5a
+ .uleb128 0x2
+ .long .LASF5
+ .byte 0x8
+ .byte 0x5
+ .uleb128 0x2
+ .long .LASF6
+ .byte 0x8
+ .byte 0x7
+ .uleb128 0x2
+ .long .LASF7
+ .byte 0x4
+ .byte 0x7
+ .uleb128 0x2
+ .long .LASF8
+ .byte 0x8
+ .byte 0x4
+ .uleb128 0x2
+ .long .LASF9
+ .byte 0x1
+ .byte 0x6
+ .uleb128 0x2
+ .long .LASF10
+ .byte 0x4
+ .byte 0x5
+ .uleb128 0x4
+ .long .LASF12
+ .byte 0x3
+ .byte 0x32
+ .long 0x4f
+ .uleb128 0x2
+ .long .LASF4
+ .byte 0x4
+ .byte 0x7
+ .uleb128 0x4
+ .long .LASF13
+ .byte 0x2
+ .byte 0x2f
+ .long 0x84
+ .uleb128 0x5
+ .long 0xca
+ .long .LASF16
+ .byte 0x8
+ .byte 0x2
+ .byte 0x46
+ .uleb128 0x6
+ .long .LASF14
+ .byte 0x2
+ .byte 0x47
+ .long 0xca
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .uleb128 0x6
+ .long .LASF15
+ .byte 0x2
+ .byte 0x48
+ .long 0x41
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x4
+ .byte 0x0
+ .uleb128 0x7
+ .byte 0x4
+ .long 0x2c
+ .uleb128 0x5
+ .long 0x1f8
+ .long .LASF17
+ .byte 0x58
+ .byte 0x2
+ .byte 0x66
+ .uleb128 0x8
+ .string "_p"
+ .byte 0x2
+ .byte 0x67
+ .long 0xca
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .uleb128 0x8
+ .string "_r"
+ .byte 0x2
+ .byte 0x68
+ .long 0x41
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x4
+ .uleb128 0x8
+ .string "_w"
+ .byte 0x2
+ .byte 0x69
+ .long 0x41
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x8
+ .uleb128 0x6
+ .long .LASF18
+ .byte 0x2
+ .byte 0x6a
+ .long 0x33
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0xc
+ .uleb128 0x6
+ .long .LASF19
+ .byte 0x2
+ .byte 0x6b
+ .long 0x33
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0xe
+ .uleb128 0x8
+ .string "_bf"
+ .byte 0x2
+ .byte 0x6c
+ .long 0xa1
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x10
+ .uleb128 0x6
+ .long .LASF20
+ .byte 0x2
+ .byte 0x6d
+ .long 0x41
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x18
+ .uleb128 0x6
+ .long .LASF21
+ .byte 0x2
+ .byte 0x70
+ .long 0x1f8
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x1c
+ .uleb128 0x6
+ .long .LASF22
+ .byte 0x2
+ .byte 0x71
+ .long 0x20a
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x20
+ .uleb128 0x6
+ .long .LASF23
+ .byte 0x2
+ .byte 0x72
+ .long 0x230
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x24
+ .uleb128 0x6
+ .long .LASF24
+ .byte 0x2
+ .byte 0x73
+ .long 0x250
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x28
+ .uleb128 0x6
+ .long .LASF25
+ .byte 0x2
+ .byte 0x74
+ .long 0x27b
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x2c
+ .uleb128 0x8
+ .string "_ub"
+ .byte 0x2
+ .byte 0x77
+ .long 0xa1
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x30
+ .uleb128 0x9
+ .long .LASF40
+ .byte 0x1
+ .uleb128 0x6
+ .long .LASF26
+ .byte 0x2
+ .byte 0x78
+ .long 0x281
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x38
+ .uleb128 0x8
+ .string "_ur"
+ .byte 0x2
+ .byte 0x79
+ .long 0x41
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x3c
+ .uleb128 0x6
+ .long .LASF27
+ .byte 0x2
+ .byte 0x7c
+ .long 0x287
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x40
+ .uleb128 0x6
+ .long .LASF28
+ .byte 0x2
+ .byte 0x7d
+ .long 0x297
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x43
+ .uleb128 0x8
+ .string "_lb"
+ .byte 0x2
+ .byte 0x80
+ .long 0xa1
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x44
+ .uleb128 0x6
+ .long .LASF29
+ .byte 0x2
+ .byte 0x83
+ .long 0x41
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x4c
+ .uleb128 0x6
+ .long .LASF30
+ .byte 0x2
+ .byte 0x84
+ .long 0x96
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x50
+ .byte 0x0
+ .uleb128 0xa
+ .byte 0x4
+ .uleb128 0xb
+ .long 0x20a
+ .byte 0x1
+ .long 0x41
+ .uleb128 0xc
+ .long 0x1f8
+ .byte 0x0
+ .uleb128 0x7
+ .byte 0x4
+ .long 0x1fa
+ .uleb128 0xb
+ .long 0x22a
+ .byte 0x1
+ .long 0x41
+ .uleb128 0xc
+ .long 0x1f8
+ .uleb128 0xc
+ .long 0x22a
+ .uleb128 0xc
+ .long 0x41
+ .byte 0x0
+ .uleb128 0x7
+ .byte 0x4
+ .long 0x76
+ .uleb128 0x7
+ .byte 0x4
+ .long 0x210
+ .uleb128 0xb
+ .long 0x250
+ .byte 0x1
+ .long 0x96
+ .uleb128 0xc
+ .long 0x1f8
+ .uleb128 0xc
+ .long 0x96
+ .uleb128 0xc
+ .long 0x41
+ .byte 0x0
+ .uleb128 0x7
+ .byte 0x4
+ .long 0x236
+ .uleb128 0xb
+ .long 0x270
+ .byte 0x1
+ .long 0x41
+ .uleb128 0xc
+ .long 0x1f8
+ .uleb128 0xc
+ .long 0x270
+ .uleb128 0xc
+ .long 0x41
+ .byte 0x0
+ .uleb128 0x7
+ .byte 0x4
+ .long 0x276
+ .uleb128 0xd
+ .long 0x76
+ .uleb128 0x7
+ .byte 0x4
+ .long 0x256
+ .uleb128 0x7
+ .byte 0x4
+ .long 0x18f
+ .uleb128 0xe
+ .long 0x297
+ .long 0x2c
+ .uleb128 0xf
+ .long 0x8f
+ .byte 0x2
+ .byte 0x0
+ .uleb128 0xe
+ .long 0x2a7
+ .long 0x2c
+ .uleb128 0xf
+ .long 0x8f
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x4
+ .long .LASF31
+ .byte 0x2
+ .byte 0x85
+ .long 0xd0
+ .uleb128 0x10
+ .long 0x302
+ .byte 0x1
+ .long .LASF41
+ .byte 0x1
+ .byte 0x21
+ .byte 0x1
+ .long 0x41
+ .long .LFB3
+ .long .LFE3
+ .byte 0x1
+ .byte 0x55
+ .uleb128 0x11
+ .long .LASF32
+ .byte 0x1
+ .byte 0x20
+ .long 0x41
+ .byte 0x2
+ .byte 0x91
+ .sleb128 8
+ .uleb128 0x11
+ .long .LASF33
+ .byte 0x1
+ .byte 0x20
+ .long 0x302
+ .byte 0x1
+ .byte 0x56
+ .uleb128 0x12
+ .long .LASF34
+ .byte 0x1
+ .byte 0x22
+ .long 0x308
+ .byte 0x1
+ .byte 0x53
+ .uleb128 0x13
+ .string "ch"
+ .byte 0x1
+ .byte 0x23
+ .long 0x41
+ .byte 0x1
+ .byte 0x50
+ .byte 0x0
+ .uleb128 0x7
+ .byte 0x4
+ .long 0x22a
+ .uleb128 0x7
+ .byte 0x4
+ .long 0x2a7
+ .uleb128 0x14
+ .long .LASF35
+ .byte 0x2
+ .byte 0x8b
+ .long 0x308
+ .byte 0x1
+ .byte 0x1
+ .uleb128 0x15
+ .long .LASF36
+ .byte 0x2
+ .value 0x1a4
+ .long 0x41
+ .byte 0x1
+ .byte 0x1
+ .byte 0x0
+ .section .debug_abbrev
+ .uleb128 0x1
+ .uleb128 0x11
+ .byte 0x1
+ .uleb128 0x10
+ .uleb128 0x6
+ .uleb128 0x12
+ .uleb128 0x1
+ .uleb128 0x11
+ .uleb128 0x1
+ .uleb128 0x25
+ .uleb128 0xe
+ .uleb128 0x13
+ .uleb128 0xb
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x1b
+ .uleb128 0xe
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x2
+ .uleb128 0x24
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3e
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x24
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3e
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x4
+ .uleb128 0x16
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x5
+ .uleb128 0x13
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x6
+ .uleb128 0xd
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x38
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x7
+ .uleb128 0xf
+ .byte 0x0
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x8
+ .uleb128 0xd
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x38
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x9
+ .uleb128 0x13
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3c
+ .uleb128 0xc
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xa
+ .uleb128 0xf
+ .byte 0x0
+ .uleb128 0xb
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xb
+ .uleb128 0x15
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0x27
+ .uleb128 0xc
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xc
+ .uleb128 0x5
+ .byte 0x0
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xd
+ .uleb128 0x26
+ .byte 0x0
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xe
+ .uleb128 0x1
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xf
+ .uleb128 0x21
+ .byte 0x0
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2f
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x10
+ .uleb128 0x2e
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0x3f
+ .uleb128 0xc
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x27
+ .uleb128 0xc
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x11
+ .uleb128 0x1
+ .uleb128 0x12
+ .uleb128 0x1
+ .uleb128 0x40
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x11
+ .uleb128 0x5
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x12
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x13
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x14
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x3f
+ .uleb128 0xc
+ .uleb128 0x3c
+ .uleb128 0xc
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x15
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0x5
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x3f
+ .uleb128 0xc
+ .uleb128 0x3c
+ .uleb128 0xc
+ .byte 0x0
+ .byte 0x0
+ .byte 0x0
+ .section .debug_pubnames,"",@progbits
+ .long 0x17
+ .value 0x2
+ .long .Ldebug_info0
+ .long 0x32a
+ .long 0x2b2
+ .string "main"
+ .long 0x0
+ .section .debug_aranges,"",@progbits
+ .long 0x1c
+ .value 0x2
+ .long .Ldebug_info0
+ .byte 0x4
+ .byte 0x0
+ .value 0x0
+ .value 0x0
+ .long .Ltext0
+ .long .Letext0-.Ltext0
+ .long 0x0
+ .long 0x0
+ .section .debug_str,"MS",@progbits,1
+.LASF34:
+ .string "bfile"
+.LASF20:
+ .string "_lbfsize"
+.LASF16:
+ .string "__sbuf"
+.LASF2:
+ .string "short int"
+.LASF10:
+ .string "long int"
+.LASF26:
+ .string "_extra"
+.LASF17:
+ .string "__sFILE"
+.LASF37:
+ .string "GNU C 3.4.2 [FreeBSD] 20040728"
+.LASF39:
+ .string "/home/pete/project/yasm3/yasm"
+.LASF21:
+ .string "_cookie"
+.LASF28:
+ .string "_nbuf"
+.LASF25:
+ .string "_write"
+.LASF31:
+ .string "FILE"
+.LASF5:
+ .string "long long int"
+.LASF11:
+ .string "__int64_t"
+.LASF29:
+ .string "_blksize"
+.LASF22:
+ .string "_close"
+.LASF33:
+ .string "argv"
+.LASF27:
+ .string "_ubuf"
+.LASF1:
+ .string "unsigned char"
+.LASF23:
+ .string "_read"
+.LASF32:
+ .string "argc"
+.LASF36:
+ .string "__isthreaded"
+.LASF0:
+ .string "signed char"
+.LASF40:
+ .string "__sFILEX"
+.LASF6:
+ .string "long long unsigned int"
+.LASF4:
+ .string "unsigned int"
+.LASF3:
+ .string "short unsigned int"
+.LASF41:
+ .string "main"
+.LASF14:
+ .string "_base"
+.LASF19:
+ .string "_file"
+.LASF9:
+ .string "char"
+.LASF13:
+ .string "fpos_t"
+.LASF7:
+ .string "long unsigned int"
+.LASF35:
+ .string "__stderrp"
+.LASF12:
+ .string "__off_t"
+.LASF24:
+ .string "_seek"
+.LASF8:
+ .string "double"
+.LASF30:
+ .string "_offset"
+.LASF38:
+ .string "test_hd.c"
+.LASF18:
+ .string "_flags"
+.LASF15:
+ .string "_size"
+ .ident "GCC: (GNU) 3.4.2 [FreeBSD] 20040728"
diff --git a/modules/dbgfmts/dwarf2/tests/pass32/dwarf32_testhd.errwarn b/modules/dbgfmts/dwarf2/tests/pass32/dwarf32_testhd.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/tests/pass32/dwarf32_testhd.errwarn
diff --git a/modules/dbgfmts/dwarf2/tests/pass32/dwarf32_testhd.hex b/modules/dbgfmts/dwarf2/tests/pass32/dwarf32_testhd.hex
new file mode 100644
index 00000000..3f197330
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/tests/pass32/dwarf32_testhd.hex
@@ -0,0 +1,5936 @@
+7f
+45
+4c
+46
+01
+01
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+03
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+14
+00
+00
+00
+00
+00
+00
+34
+00
+00
+00
+00
+00
+28
+00
+14
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+55
+89
+e5
+56
+53
+8b
+75
+0c
+83
+e4
+f0
+83
+ec
+10
+83
+7d
+08
+02
+74
+20
+83
+ec
+04
+ff
+36
+68
+00
+00
+00
+00
+ff
+35
+00
+00
+00
+00
+e8
+fc
+ff
+ff
+ff
+b8
+01
+00
+00
+00
+e9
+ad
+00
+00
+00
+90
+83
+ec
+08
+68
+12
+00
+00
+00
+ff
+76
+04
+e8
+fc
+ff
+ff
+ff
+89
+c3
+83
+c4
+10
+85
+c0
+75
+34
+83
+ec
+04
+ff
+76
+04
+68
+15
+00
+00
+00
+ff
+35
+00
+00
+00
+00
+e8
+fc
+ff
+ff
+ff
+b8
+01
+00
+00
+00
+e9
+73
+00
+00
+00
+8d
+76
+00
+83
+ec
+08
+50
+68
+2b
+00
+00
+00
+e8
+fc
+ff
+ff
+ff
+83
+c4
+10
+83
+ec
+0c
+53
+e8
+fc
+ff
+ff
+ff
+83
+c4
+10
+83
+f8
+ff
+75
+de
+83
+3d
+00
+00
+00
+00
+00
+75
+08
+f6
+43
+0c
+40
+75
+12
+eb
+2d
+83
+ec
+0c
+53
+e8
+fc
+ff
+ff
+ff
+83
+c4
+10
+85
+c0
+74
+1d
+83
+ec
+04
+ff
+76
+04
+68
+32
+00
+00
+00
+ff
+35
+00
+00
+00
+00
+e8
+fc
+ff
+ff
+ff
+b8
+01
+00
+00
+00
+eb
+10
+83
+ec
+0c
+53
+e8
+fc
+ff
+ff
+ff
+b8
+00
+00
+00
+00
+89
+f6
+8d
+65
+f8
+5b
+5e
+c9
+c3
+00
+1a
+00
+00
+00
+01
+4b
+00
+00
+20
+00
+00
+00
+01
+55
+00
+00
+25
+00
+00
+00
+02
+56
+00
+00
+38
+00
+00
+00
+01
+4b
+00
+00
+40
+00
+00
+00
+02
+57
+00
+00
+54
+00
+00
+00
+01
+4b
+00
+00
+5a
+00
+00
+00
+01
+55
+00
+00
+5f
+00
+00
+00
+02
+56
+00
+00
+75
+00
+00
+00
+01
+4b
+00
+00
+7a
+00
+00
+00
+02
+58
+00
+00
+86
+00
+00
+00
+02
+59
+00
+00
+94
+00
+00
+00
+01
+5a
+00
+00
+a8
+00
+00
+00
+02
+5b
+00
+00
+ba
+00
+00
+00
+01
+4b
+00
+00
+c0
+00
+00
+00
+01
+55
+00
+00
+c5
+00
+00
+00
+02
+56
+00
+00
+d5
+00
+00
+00
+02
+5c
+00
+00
+01
+11
+01
+10
+06
+12
+01
+11
+01
+25
+0e
+13
+0b
+03
+0e
+1b
+0e
+00
+00
+02
+24
+00
+03
+0e
+0b
+0b
+3e
+0b
+00
+00
+03
+24
+00
+03
+08
+0b
+0b
+3e
+0b
+00
+00
+04
+16
+00
+03
+0e
+3a
+0b
+3b
+0b
+49
+13
+00
+00
+05
+13
+01
+01
+13
+03
+0e
+0b
+0b
+3a
+0b
+3b
+0b
+00
+00
+06
+0d
+00
+03
+0e
+3a
+0b
+3b
+0b
+49
+13
+38
+0a
+00
+00
+07
+0f
+00
+0b
+0b
+49
+13
+00
+00
+08
+0d
+00
+03
+08
+3a
+0b
+3b
+0b
+49
+13
+38
+0a
+00
+00
+09
+13
+00
+03
+0e
+3c
+0c
+00
+00
+0a
+0f
+00
+0b
+0b
+00
+00
+0b
+15
+01
+01
+13
+27
+0c
+49
+13
+00
+00
+0c
+05
+00
+49
+13
+00
+00
+0d
+26
+00
+49
+13
+00
+00
+0e
+01
+01
+01
+13
+49
+13
+00
+00
+0f
+21
+00
+49
+13
+2f
+0b
+00
+00
+10
+2e
+01
+01
+13
+3f
+0c
+03
+0e
+3a
+0b
+3b
+0b
+27
+0c
+49
+13
+11
+01
+12
+01
+40
+0a
+00
+00
+11
+05
+00
+03
+0e
+3a
+0b
+3b
+0b
+49
+13
+02
+0a
+00
+00
+12
+34
+00
+03
+0e
+3a
+0b
+3b
+0b
+49
+13
+02
+0a
+00
+00
+13
+34
+00
+03
+08
+3a
+0b
+3b
+0b
+49
+13
+02
+0a
+00
+00
+14
+34
+00
+03
+0e
+3a
+0b
+3b
+0b
+49
+13
+3f
+0c
+3c
+0c
+00
+00
+15
+34
+00
+03
+0e
+3a
+0b
+3b
+05
+49
+13
+3f
+0c
+3c
+0c
+00
+00
+00
+26
+03
+00
+00
+02
+00
+00
+00
+00
+00
+04
+01
+00
+00
+00
+00
+e7
+00
+00
+00
+00
+00
+00
+00
+38
+00
+00
+00
+01
+8a
+01
+00
+00
+57
+00
+00
+00
+02
+e8
+00
+00
+00
+01
+06
+02
+c2
+00
+00
+00
+01
+08
+02
+16
+00
+00
+00
+02
+05
+02
+21
+01
+00
+00
+02
+07
+03
+69
+6e
+74
+00
+04
+05
+02
+14
+01
+00
+00
+04
+07
+04
+9d
+00
+00
+00
+04
+3a
+5a
+00
+00
+00
+02
+8f
+00
+00
+00
+08
+05
+02
+fd
+00
+00
+00
+08
+07
+02
+51
+01
+00
+00
+04
+07
+02
+7b
+01
+00
+00
+08
+04
+02
+45
+01
+00
+00
+01
+06
+02
+20
+00
+00
+00
+04
+05
+04
+6d
+01
+00
+00
+03
+32
+4f
+00
+00
+00
+02
+14
+01
+00
+00
+04
+07
+04
+4a
+01
+00
+00
+02
+2f
+84
+00
+00
+00
+05
+ca
+00
+00
+00
+0f
+00
+00
+00
+08
+02
+46
+06
+39
+01
+00
+00
+02
+47
+ca
+00
+00
+00
+02
+23
+00
+06
+9b
+01
+00
+00
+02
+48
+41
+00
+00
+00
+02
+23
+04
+00
+07
+04
+2c
+00
+00
+00
+05
+f8
+01
+00
+00
+30
+00
+00
+00
+58
+02
+66
+08
+5f
+70
+00
+02
+67
+ca
+00
+00
+00
+02
+23
+00
+08
+5f
+72
+00
+02
+68
+41
+00
+00
+00
+02
+23
+04
+08
+5f
+77
+00
+02
+69
+41
+00
+00
+00
+02
+23
+08
+06
+94
+01
+00
+00
+02
+6a
+33
+00
+00
+00
+02
+23
+0c
+06
+3f
+01
+00
+00
+02
+6b
+33
+00
+00
+00
+02
+23
+0e
+08
+5f
+62
+66
+00
+02
+6c
+a1
+00
+00
+00
+02
+23
+10
+06
+06
+00
+00
+00
+02
+6d
+41
+00
+00
+00
+02
+23
+18
+06
+75
+00
+00
+00
+02
+70
+f8
+01
+00
+00
+02
+23
+1c
+06
+b0
+00
+00
+00
+02
+71
+0a
+02
+00
+00
+02
+23
+20
+06
+d0
+00
+00
+00
+02
+72
+30
+02
+00
+00
+02
+23
+24
+06
+75
+01
+00
+00
+02
+73
+50
+02
+00
+00
+02
+23
+28
+06
+83
+00
+00
+00
+02
+74
+7b
+02
+00
+00
+02
+23
+2c
+08
+5f
+75
+62
+00
+02
+77
+a1
+00
+00
+00
+02
+23
+30
+09
+f4
+00
+00
+00
+01
+06
+29
+00
+00
+00
+02
+78
+81
+02
+00
+00
+02
+23
+38
+08
+5f
+75
+72
+00
+02
+79
+41
+00
+00
+00
+02
+23
+3c
+06
+bc
+00
+00
+00
+02
+7c
+87
+02
+00
+00
+02
+23
+40
+06
+7d
+00
+00
+00
+02
+7d
+97
+02
+00
+00
+02
+23
+43
+08
+5f
+6c
+62
+00
+02
+80
+a1
+00
+00
+00
+02
+23
+44
+06
+a7
+00
+00
+00
+02
+83
+41
+00
+00
+00
+02
+23
+4c
+06
+82
+01
+00
+00
+02
+84
+96
+00
+00
+00
+02
+23
+50
+00
+0a
+04
+0b
+0a
+02
+00
+00
+01
+41
+00
+00
+00
+0c
+f8
+01
+00
+00
+00
+07
+04
+fa
+01
+00
+00
+0b
+2a
+02
+00
+00
+01
+41
+00
+00
+00
+0c
+f8
+01
+00
+00
+0c
+2a
+02
+00
+00
+0c
+41
+00
+00
+00
+00
+07
+04
+76
+00
+00
+00
+07
+04
+10
+02
+00
+00
+0b
+50
+02
+00
+00
+01
+96
+00
+00
+00
+0c
+f8
+01
+00
+00
+0c
+96
+00
+00
+00
+0c
+41
+00
+00
+00
+00
+07
+04
+36
+02
+00
+00
+0b
+70
+02
+00
+00
+01
+41
+00
+00
+00
+0c
+f8
+01
+00
+00
+0c
+70
+02
+00
+00
+0c
+41
+00
+00
+00
+00
+07
+04
+76
+02
+00
+00
+0d
+76
+00
+00
+00
+07
+04
+56
+02
+00
+00
+07
+04
+8f
+01
+00
+00
+0e
+97
+02
+00
+00
+2c
+00
+00
+00
+0f
+8f
+00
+00
+00
+02
+00
+0e
+a7
+02
+00
+00
+2c
+00
+00
+00
+0f
+8f
+00
+00
+00
+00
+00
+04
+8a
+00
+00
+00
+02
+85
+d0
+00
+00
+00
+10
+02
+03
+00
+00
+01
+34
+01
+00
+00
+01
+21
+01
+41
+00
+00
+00
+00
+00
+00
+00
+e7
+00
+00
+00
+01
+55
+11
+d6
+00
+00
+00
+01
+20
+41
+00
+00
+00
+02
+91
+08
+11
+b7
+00
+00
+00
+01
+20
+02
+03
+00
+00
+01
+56
+12
+00
+00
+00
+00
+01
+22
+08
+03
+00
+00
+01
+53
+13
+63
+68
+00
+01
+23
+41
+00
+00
+00
+01
+50
+00
+07
+04
+2a
+02
+00
+00
+07
+04
+a7
+02
+00
+00
+14
+63
+01
+00
+00
+02
+8b
+08
+03
+00
+00
+01
+01
+15
+db
+00
+00
+00
+02
+a4
+01
+41
+00
+00
+00
+01
+01
+00
+00
+00
+06
+00
+00
+00
+01
+52
+00
+00
+0c
+00
+00
+00
+01
+4e
+00
+00
+10
+00
+00
+00
+01
+53
+00
+00
+14
+00
+00
+00
+01
+53
+00
+00
+18
+00
+00
+00
+01
+03
+00
+00
+1d
+00
+00
+00
+01
+03
+00
+00
+21
+00
+00
+00
+01
+03
+00
+00
+26
+00
+00
+00
+01
+03
+00
+00
+2d
+00
+00
+00
+01
+03
+00
+00
+34
+00
+00
+00
+01
+03
+00
+00
+3b
+00
+00
+00
+01
+03
+00
+00
+49
+00
+00
+00
+01
+03
+00
+00
+50
+00
+00
+00
+01
+03
+00
+00
+5b
+00
+00
+00
+01
+03
+00
+00
+62
+00
+00
+00
+01
+03
+00
+00
+69
+00
+00
+00
+01
+03
+00
+00
+70
+00
+00
+00
+01
+03
+00
+00
+77
+00
+00
+00
+01
+03
+00
+00
+7e
+00
+00
+00
+01
+03
+00
+00
+85
+00
+00
+00
+01
+03
+00
+00
+90
+00
+00
+00
+01
+03
+00
+00
+97
+00
+00
+00
+01
+03
+00
+00
+a6
+00
+00
+00
+01
+03
+00
+00
+ae
+00
+00
+00
+01
+03
+00
+00
+bc
+00
+00
+00
+01
+03
+00
+00
+d5
+00
+00
+00
+01
+03
+00
+00
+04
+01
+00
+00
+01
+03
+00
+00
+12
+01
+00
+00
+01
+03
+00
+00
+2e
+01
+00
+00
+01
+03
+00
+00
+3c
+01
+00
+00
+01
+03
+00
+00
+4a
+01
+00
+00
+01
+03
+00
+00
+58
+01
+00
+00
+01
+03
+00
+00
+66
+01
+00
+00
+01
+03
+00
+00
+74
+01
+00
+00
+01
+03
+00
+00
+90
+01
+00
+00
+01
+03
+00
+00
+96
+01
+00
+00
+01
+03
+00
+00
+b2
+01
+00
+00
+01
+03
+00
+00
+c0
+01
+00
+00
+01
+03
+00
+00
+dc
+01
+00
+00
+01
+03
+00
+00
+ea
+01
+00
+00
+01
+03
+00
+00
+a8
+02
+00
+00
+01
+03
+00
+00
+b8
+02
+00
+00
+01
+03
+00
+00
+c3
+02
+00
+00
+01
+53
+00
+00
+c7
+02
+00
+00
+01
+53
+00
+00
+ce
+02
+00
+00
+01
+03
+00
+00
+dc
+02
+00
+00
+01
+03
+00
+00
+e9
+02
+00
+00
+01
+03
+00
+00
+0f
+03
+00
+00
+01
+03
+00
+00
+1c
+03
+00
+00
+01
+03
+00
+00
+a0
+00
+00
+00
+02
+00
+76
+00
+00
+00
+01
+01
+fb
+0e
+0d
+00
+01
+01
+01
+01
+00
+00
+00
+01
+00
+00
+01
+2f
+75
+73
+72
+2f
+69
+6e
+63
+6c
+75
+64
+65
+00
+2f
+75
+73
+72
+2f
+69
+6e
+63
+6c
+75
+64
+65
+2f
+73
+79
+73
+00
+2f
+75
+73
+72
+2f
+69
+6e
+63
+6c
+75
+64
+65
+2f
+6d
+61
+63
+68
+69
+6e
+65
+00
+00
+74
+65
+73
+74
+5f
+68
+64
+2e
+63
+00
+00
+00
+00
+73
+74
+64
+69
+6f
+2e
+68
+00
+01
+00
+00
+5f
+74
+79
+70
+65
+73
+2e
+68
+00
+02
+00
+00
+5f
+74
+79
+70
+65
+73
+2e
+68
+00
+03
+00
+00
+00
+00
+05
+02
+00
+00
+00
+00
+03
+20
+01
+da
+67
+08
+4b
+af
+08
+22
+75
+08
+59
+cc
+02
+22
+14
+08
+f3
+08
+59
+77
+91
+75
+02
+07
+00
+01
+01
+83
+00
+00
+00
+01
+53
+00
+00
+55
+73
+61
+67
+65
+3a
+20
+25
+73
+20
+3c
+66
+69
+6c
+65
+3e
+0a
+00
+72
+62
+00
+43
+6f
+75
+6c
+64
+20
+6e
+6f
+74
+20
+6f
+70
+65
+6e
+20
+60
+25
+73
+27
+2e
+0a
+00
+25
+30
+32
+78
+20
+0a
+00
+45
+72
+72
+6f
+72
+20
+72
+65
+61
+64
+69
+6e
+67
+20
+66
+72
+6f
+6d
+20
+60
+25
+73
+27
+2e
+0a
+00
+10
+00
+00
+00
+ff
+ff
+ff
+ff
+01
+00
+01
+7c
+08
+0c
+04
+04
+88
+01
+00
+00
+2c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e7
+00
+00
+00
+04
+01
+00
+00
+00
+0e
+08
+85
+02
+04
+02
+00
+00
+00
+0d
+05
+04
+02
+00
+00
+00
+83
+04
+86
+03
+04
+1f
+00
+00
+00
+2e
+10
+18
+00
+00
+00
+01
+37
+00
+00
+1c
+00
+00
+00
+01
+53
+00
+00
+17
+00
+00
+00
+02
+00
+00
+00
+00
+00
+2a
+03
+00
+00
+b2
+02
+00
+00
+6d
+61
+69
+6e
+00
+00
+00
+00
+00
+00
+06
+00
+00
+00
+01
+50
+00
+00
+1c
+00
+00
+00
+02
+00
+00
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e7
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+06
+00
+00
+00
+01
+50
+00
+00
+10
+00
+00
+00
+01
+53
+00
+00
+62
+66
+69
+6c
+65
+00
+5f
+6c
+62
+66
+73
+69
+7a
+65
+00
+5f
+5f
+73
+62
+75
+66
+00
+73
+68
+6f
+72
+74
+20
+69
+6e
+74
+00
+6c
+6f
+6e
+67
+20
+69
+6e
+74
+00
+5f
+65
+78
+74
+72
+61
+00
+5f
+5f
+73
+46
+49
+4c
+45
+00
+47
+4e
+55
+20
+43
+20
+33
+2e
+34
+2e
+32
+20
+5b
+46
+72
+65
+65
+42
+53
+44
+5d
+20
+32
+30
+30
+34
+30
+37
+32
+38
+00
+2f
+68
+6f
+6d
+65
+2f
+70
+65
+74
+65
+2f
+70
+72
+6f
+6a
+65
+63
+74
+2f
+79
+61
+73
+6d
+33
+2f
+79
+61
+73
+6d
+00
+5f
+63
+6f
+6f
+6b
+69
+65
+00
+5f
+6e
+62
+75
+66
+00
+5f
+77
+72
+69
+74
+65
+00
+46
+49
+4c
+45
+00
+6c
+6f
+6e
+67
+20
+6c
+6f
+6e
+67
+20
+69
+6e
+74
+00
+5f
+5f
+69
+6e
+74
+36
+34
+5f
+74
+00
+5f
+62
+6c
+6b
+73
+69
+7a
+65
+00
+5f
+63
+6c
+6f
+73
+65
+00
+61
+72
+67
+76
+00
+5f
+75
+62
+75
+66
+00
+75
+6e
+73
+69
+67
+6e
+65
+64
+20
+63
+68
+61
+72
+00
+5f
+72
+65
+61
+64
+00
+61
+72
+67
+63
+00
+5f
+5f
+69
+73
+74
+68
+72
+65
+61
+64
+65
+64
+00
+73
+69
+67
+6e
+65
+64
+20
+63
+68
+61
+72
+00
+5f
+5f
+73
+46
+49
+4c
+45
+58
+00
+6c
+6f
+6e
+67
+20
+6c
+6f
+6e
+67
+20
+75
+6e
+73
+69
+67
+6e
+65
+64
+20
+69
+6e
+74
+00
+75
+6e
+73
+69
+67
+6e
+65
+64
+20
+69
+6e
+74
+00
+73
+68
+6f
+72
+74
+20
+75
+6e
+73
+69
+67
+6e
+65
+64
+20
+69
+6e
+74
+00
+6d
+61
+69
+6e
+00
+5f
+62
+61
+73
+65
+00
+5f
+66
+69
+6c
+65
+00
+63
+68
+61
+72
+00
+66
+70
+6f
+73
+5f
+74
+00
+6c
+6f
+6e
+67
+20
+75
+6e
+73
+69
+67
+6e
+65
+64
+20
+69
+6e
+74
+00
+5f
+5f
+73
+74
+64
+65
+72
+72
+70
+00
+5f
+5f
+6f
+66
+66
+5f
+74
+00
+5f
+73
+65
+65
+6b
+00
+64
+6f
+75
+62
+6c
+65
+00
+5f
+6f
+66
+66
+73
+65
+74
+00
+74
+65
+73
+74
+5f
+68
+64
+2e
+63
+00
+5f
+66
+6c
+61
+67
+73
+00
+5f
+73
+69
+7a
+65
+00
+00
+47
+43
+43
+3a
+20
+28
+47
+4e
+55
+29
+20
+33
+2e
+34
+2e
+32
+20
+5b
+46
+72
+65
+65
+42
+53
+44
+5d
+20
+32
+30
+30
+34
+30
+37
+32
+38
+00
+00
+00
+00
+2e
+74
+65
+78
+74
+00
+2e
+64
+65
+62
+75
+67
+5f
+61
+62
+62
+72
+65
+76
+00
+2e
+64
+65
+62
+75
+67
+5f
+69
+6e
+66
+6f
+00
+2e
+64
+65
+62
+75
+67
+5f
+6c
+69
+6e
+65
+00
+2e
+72
+6f
+64
+61
+74
+61
+2e
+73
+74
+72
+31
+2e
+31
+00
+2e
+64
+65
+62
+75
+67
+5f
+66
+72
+61
+6d
+65
+00
+2e
+64
+65
+62
+75
+67
+5f
+70
+75
+62
+6e
+61
+6d
+65
+73
+00
+2e
+64
+65
+62
+75
+67
+5f
+61
+72
+61
+6e
+67
+65
+73
+00
+2e
+64
+65
+62
+75
+67
+5f
+73
+74
+72
+00
+2e
+63
+6f
+6d
+6d
+65
+6e
+74
+00
+2e
+72
+65
+6c
+2e
+74
+65
+78
+74
+00
+2e
+72
+65
+6c
+2e
+64
+65
+62
+75
+67
+5f
+69
+6e
+66
+6f
+00
+2e
+72
+65
+6c
+2e
+64
+65
+62
+75
+67
+5f
+6c
+69
+6e
+65
+00
+2e
+72
+65
+6c
+2e
+64
+65
+62
+75
+67
+5f
+66
+72
+61
+6d
+65
+00
+2e
+72
+65
+6c
+2e
+64
+65
+62
+75
+67
+5f
+70
+75
+62
+6e
+61
+6d
+65
+73
+00
+2e
+72
+65
+6c
+2e
+64
+65
+62
+75
+67
+5f
+61
+72
+61
+6e
+67
+65
+73
+00
+2e
+73
+74
+72
+74
+61
+62
+00
+2e
+73
+79
+6d
+74
+61
+62
+00
+2e
+73
+68
+73
+74
+72
+74
+61
+62
+00
+00
+74
+65
+73
+74
+5f
+68
+64
+2e
+63
+00
+6d
+61
+69
+6e
+00
+5f
+5f
+73
+74
+64
+65
+72
+72
+70
+00
+66
+70
+72
+69
+6e
+74
+66
+00
+66
+6f
+70
+65
+6e
+00
+70
+72
+69
+6e
+74
+66
+00
+66
+67
+65
+74
+63
+00
+5f
+5f
+69
+73
+74
+68
+72
+65
+61
+64
+65
+64
+00
+66
+65
+72
+72
+6f
+72
+00
+66
+63
+6c
+6f
+73
+65
+00
+2e
+4c
+64
+65
+62
+75
+67
+5f
+61
+62
+62
+72
+65
+76
+30
+00
+2e
+4c
+64
+65
+62
+75
+67
+5f
+69
+6e
+66
+6f
+30
+00
+2e
+4c
+64
+65
+62
+75
+67
+5f
+6c
+69
+6e
+65
+30
+00
+2e
+4c
+74
+65
+78
+74
+30
+00
+2e
+4c
+43
+30
+00
+2e
+4c
+43
+31
+00
+2e
+4c
+43
+32
+00
+2e
+4c
+43
+33
+00
+2e
+4c
+43
+34
+00
+2e
+4c
+46
+42
+33
+00
+2e
+4c
+43
+46
+49
+30
+00
+2e
+4c
+43
+46
+49
+31
+00
+2e
+4c
+43
+46
+49
+32
+00
+2e
+4c
+43
+46
+49
+33
+00
+2e
+4c
+32
+00
+2e
+4c
+43
+46
+49
+34
+00
+2e
+4c
+31
+00
+2e
+4c
+34
+00
+2e
+4c
+36
+00
+2e
+4c
+38
+00
+2e
+4c
+39
+00
+2e
+4c
+37
+00
+2e
+4c
+46
+45
+33
+00
+2e
+4c
+66
+72
+61
+6d
+65
+30
+00
+2e
+4c
+45
+43
+49
+45
+30
+00
+2e
+4c
+53
+43
+49
+45
+30
+00
+2e
+4c
+53
+46
+44
+45
+30
+00
+2e
+4c
+45
+46
+44
+45
+30
+00
+2e
+4c
+41
+53
+46
+44
+45
+30
+00
+2e
+4c
+65
+74
+65
+78
+74
+30
+00
+2e
+4c
+41
+53
+46
+33
+37
+00
+2e
+4c
+41
+53
+46
+33
+38
+00
+2e
+4c
+41
+53
+46
+33
+39
+00
+2e
+4c
+41
+53
+46
+30
+00
+2e
+4c
+41
+53
+46
+31
+00
+2e
+4c
+41
+53
+46
+32
+00
+2e
+4c
+41
+53
+46
+33
+00
+2e
+4c
+41
+53
+46
+34
+00
+2e
+4c
+41
+53
+46
+31
+31
+00
+2e
+4c
+41
+53
+46
+35
+00
+2e
+4c
+41
+53
+46
+36
+00
+2e
+4c
+41
+53
+46
+37
+00
+2e
+4c
+41
+53
+46
+38
+00
+2e
+4c
+41
+53
+46
+39
+00
+2e
+4c
+41
+53
+46
+31
+30
+00
+2e
+4c
+41
+53
+46
+31
+32
+00
+2e
+4c
+41
+53
+46
+31
+33
+00
+2e
+4c
+41
+53
+46
+31
+36
+00
+2e
+4c
+41
+53
+46
+31
+34
+00
+2e
+4c
+41
+53
+46
+31
+35
+00
+2e
+4c
+41
+53
+46
+31
+37
+00
+2e
+4c
+41
+53
+46
+31
+38
+00
+2e
+4c
+41
+53
+46
+31
+39
+00
+2e
+4c
+41
+53
+46
+32
+30
+00
+2e
+4c
+41
+53
+46
+32
+31
+00
+2e
+4c
+41
+53
+46
+32
+32
+00
+2e
+4c
+41
+53
+46
+32
+33
+00
+2e
+4c
+41
+53
+46
+32
+34
+00
+2e
+4c
+41
+53
+46
+32
+35
+00
+2e
+4c
+41
+53
+46
+34
+30
+00
+2e
+4c
+41
+53
+46
+32
+36
+00
+2e
+4c
+41
+53
+46
+32
+37
+00
+2e
+4c
+41
+53
+46
+32
+38
+00
+2e
+4c
+41
+53
+46
+32
+39
+00
+2e
+4c
+41
+53
+46
+33
+30
+00
+2e
+4c
+41
+53
+46
+33
+31
+00
+2e
+4c
+41
+53
+46
+34
+31
+00
+2e
+4c
+41
+53
+46
+33
+32
+00
+2e
+4c
+41
+53
+46
+33
+33
+00
+2e
+4c
+41
+53
+46
+33
+34
+00
+2e
+4c
+41
+53
+46
+33
+35
+00
+2e
+4c
+41
+53
+46
+33
+36
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+f1
+ff
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+0e
+00
+61
+02
+00
+00
+db
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+59
+02
+00
+00
+63
+01
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+51
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+49
+02
+00
+00
+b7
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+41
+02
+00
+00
+d6
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+39
+02
+00
+00
+34
+01
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+31
+02
+00
+00
+8a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+29
+02
+00
+00
+82
+01
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+21
+02
+00
+00
+a7
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+19
+02
+00
+00
+7d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+11
+02
+00
+00
+bc
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+09
+02
+00
+00
+29
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+01
+02
+00
+00
+f4
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+f9
+01
+00
+00
+83
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+f1
+01
+00
+00
+75
+01
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+e9
+01
+00
+00
+d0
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+e1
+01
+00
+00
+b0
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+d9
+01
+00
+00
+75
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+d1
+01
+00
+00
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+c9
+01
+00
+00
+3f
+01
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+c1
+01
+00
+00
+94
+01
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+b9
+01
+00
+00
+30
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+b1
+01
+00
+00
+9b
+01
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+a9
+01
+00
+00
+39
+01
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+a1
+01
+00
+00
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+99
+01
+00
+00
+4a
+01
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+91
+01
+00
+00
+6d
+01
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+89
+01
+00
+00
+20
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+82
+01
+00
+00
+45
+01
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+7b
+01
+00
+00
+7b
+01
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+74
+01
+00
+00
+51
+01
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+6d
+01
+00
+00
+fd
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+66
+01
+00
+00
+8f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+5e
+01
+00
+00
+9d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+57
+01
+00
+00
+14
+01
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+50
+01
+00
+00
+21
+01
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+49
+01
+00
+00
+16
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+42
+01
+00
+00
+c2
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+3b
+01
+00
+00
+e8
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+33
+01
+00
+00
+57
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+2b
+01
+00
+00
+8a
+01
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+23
+01
+00
+00
+38
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+1a
+01
+00
+00
+e7
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+11
+01
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0c
+00
+09
+01
+00
+00
+44
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0c
+00
+01
+01
+00
+00
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0c
+00
+f9
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0c
+00
+f1
+00
+00
+00
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0c
+00
+e8
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+0c
+00
+e2
+00
+00
+00
+e7
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+de
+00
+00
+00
+d0
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+da
+00
+00
+00
+b3
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+d6
+00
+00
+00
+a3
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+d2
+00
+00
+00
+70
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+ce
+00
+00
+00
+81
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+ca
+00
+00
+00
+e0
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+c3
+00
+00
+00
+24
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+bf
+00
+00
+00
+34
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+b8
+00
+00
+00
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+b1
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+aa
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+a3
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+9d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+98
+00
+00
+00
+32
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0b
+00
+93
+00
+00
+00
+2b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0b
+00
+8e
+00
+00
+00
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0b
+00
+89
+00
+00
+00
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0b
+00
+84
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+0b
+00
+7c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+6e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+09
+00
+60
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+07
+00
+50
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+04
+00
+0b
+00
+00
+00
+00
+00
+00
+00
+e7
+00
+00
+00
+12
+00
+04
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+00
+00
+00
+1a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+00
+00
+00
+22
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+00
+00
+00
+28
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+00
+00
+00
+2f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+00
+00
+00
+35
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+00
+00
+00
+42
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+00
+00
+00
+49
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ee
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+dc
+0a
+00
+00
+f8
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+de
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d4
+0b
+00
+00
+69
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e6
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+0e
+00
+00
+d0
+05
+00
+00
+02
+00
+00
+00
+54
+00
+00
+00
+04
+00
+00
+00
+10
+00
+00
+00
+01
+00
+00
+00
+01
+00
+00
+00
+06
+00
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+e7
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+7c
+00
+00
+00
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+28
+01
+00
+00
+88
+00
+00
+00
+03
+00
+00
+00
+04
+00
+00
+00
+04
+00
+00
+00
+08
+00
+00
+00
+07
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b0
+01
+00
+00
+10
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+15
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c0
+02
+00
+00
+2a
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+86
+00
+00
+00
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ec
+05
+00
+00
+88
+01
+00
+00
+03
+00
+00
+00
+07
+00
+00
+00
+04
+00
+00
+00
+08
+00
+00
+00
+21
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+74
+07
+00
+00
+a4
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+96
+00
+00
+00
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+18
+08
+00
+00
+08
+00
+00
+00
+03
+00
+00
+00
+09
+00
+00
+00
+04
+00
+00
+00
+08
+00
+00
+00
+2d
+00
+00
+00
+01
+00
+00
+00
+32
+00
+00
+00
+00
+00
+00
+00
+20
+08
+00
+00
+4c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+01
+00
+00
+00
+3c
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6c
+08
+00
+00
+44
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+a6
+00
+00
+00
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b0
+08
+00
+00
+10
+00
+00
+00
+03
+00
+00
+00
+0c
+00
+00
+00
+04
+00
+00
+00
+08
+00
+00
+00
+49
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c0
+08
+00
+00
+1b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+b7
+00
+00
+00
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+dc
+08
+00
+00
+08
+00
+00
+00
+03
+00
+00
+00
+0e
+00
+00
+00
+04
+00
+00
+00
+08
+00
+00
+00
+59
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e4
+08
+00
+00
+20
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+cb
+00
+00
+00
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+09
+00
+00
+10
+00
+00
+00
+03
+00
+00
+00
+10
+00
+00
+00
+04
+00
+00
+00
+08
+00
+00
+00
+68
+00
+00
+00
+01
+00
+00
+00
+30
+00
+00
+00
+00
+00
+00
+00
+14
+09
+00
+00
+a1
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+01
+00
+00
+00
+73
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b5
+0a
+00
+00
+25
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
diff --git a/modules/dbgfmts/dwarf2/tests/pass64/Makefile.inc b/modules/dbgfmts/dwarf2/tests/pass64/Makefile.inc
new file mode 100644
index 00000000..84fb033e
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/tests/pass64/Makefile.inc
@@ -0,0 +1,12 @@
+# $Id$
+
+TESTS += modules/dbgfmts/dwarf2/tests/pass64/dwarf2_pass64_test.sh
+
+EXTRA_DIST += modules/dbgfmts/dwarf2/tests/pass64/dwarf2_pass64_test.sh
+EXTRA_DIST += modules/dbgfmts/dwarf2/tests/pass64/dwarf64_2loc.asm
+EXTRA_DIST += modules/dbgfmts/dwarf2/tests/pass64/dwarf64_2loc.errwarn
+EXTRA_DIST += modules/dbgfmts/dwarf2/tests/pass64/dwarf64_2loc.hex
+EXTRA_DIST += modules/dbgfmts/dwarf2/tests/pass64/dwarf64_leb128.asm
+EXTRA_DIST += modules/dbgfmts/dwarf2/tests/pass64/dwarf64_leb128.errwarn
+EXTRA_DIST += modules/dbgfmts/dwarf2/tests/pass64/dwarf64_leb128.hex
+
diff --git a/modules/dbgfmts/dwarf2/tests/pass64/dwarf2_pass64_test.sh b/modules/dbgfmts/dwarf2/tests/pass64/dwarf2_pass64_test.sh
new file mode 100755
index 00000000..f4dddfe8
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/tests/pass64/dwarf2_pass64_test.sh
@@ -0,0 +1,4 @@
+#! /bin/sh
+# $Id$
+${srcdir}/out_test.sh dwarf2_pass64_test modules/dbgfmts/dwarf2/tests/pass64 "dwarf2 dbgfmt pass64" "-f elf64 -p gas -g dwarf2" ".o"
+exit $?
diff --git a/modules/dbgfmts/dwarf2/tests/pass64/dwarf64_2loc.asm b/modules/dbgfmts/dwarf2/tests/pass64/dwarf64_2loc.asm
new file mode 100644
index 00000000..5c7fcc88
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/tests/pass64/dwarf64_2loc.asm
@@ -0,0 +1,8 @@
+.file 1 "dwarf64_2loc.c"
+
+.text
+.loc 1 1 0
+.loc 1 2 0
+ xorq %rax, %rax
+.section .debug_info
+.byte 1
diff --git a/modules/dbgfmts/dwarf2/tests/pass64/dwarf64_2loc.errwarn b/modules/dbgfmts/dwarf2/tests/pass64/dwarf64_2loc.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/tests/pass64/dwarf64_2loc.errwarn
diff --git a/modules/dbgfmts/dwarf2/tests/pass64/dwarf64_2loc.hex b/modules/dbgfmts/dwarf2/tests/pass64/dwarf64_2loc.hex
new file mode 100644
index 00000000..d41612cd
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/tests/pass64/dwarf64_2loc.hex
@@ -0,0 +1,880 @@
+7f
+45
+4c
+46
+02
+01
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+3e
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+70
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+00
+00
+40
+00
+08
+00
+01
+00
+48
+31
+c0
+01
+3c
+00
+00
+00
+02
+00
+25
+00
+00
+00
+01
+01
+fb
+0e
+0d
+00
+01
+01
+01
+01
+00
+00
+00
+01
+00
+00
+01
+00
+64
+77
+61
+72
+66
+36
+34
+5f
+32
+6c
+6f
+63
+2e
+63
+00
+00
+00
+00
+00
+00
+09
+02
+00
+00
+00
+00
+00
+00
+00
+00
+13
+02
+03
+00
+01
+01
+32
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+74
+65
+78
+74
+00
+2e
+64
+65
+62
+75
+67
+5f
+69
+6e
+66
+6f
+00
+2e
+64
+65
+62
+75
+67
+5f
+6c
+69
+6e
+65
+00
+2e
+72
+65
+6c
+61
+2e
+64
+65
+62
+75
+67
+5f
+6c
+69
+6e
+65
+00
+2e
+73
+74
+72
+74
+61
+62
+00
+2e
+73
+79
+6d
+74
+61
+62
+00
+2e
+73
+68
+73
+74
+72
+74
+61
+62
+00
+00
+00
+00
+2d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+04
+00
+f1
+ff
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9c
+00
+00
+00
+00
+00
+00
+00
+4a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+30
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+38
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ec
+00
+00
+00
+00
+00
+00
+00
+78
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+05
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+01
+00
+00
+00
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+07
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+43
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+13
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+44
+00
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1f
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+84
+00
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+06
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
diff --git a/modules/dbgfmts/dwarf2/tests/pass64/dwarf64_leb128.asm b/modules/dbgfmts/dwarf2/tests/pass64/dwarf64_leb128.asm
new file mode 100644
index 00000000..9344003b
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/tests/pass64/dwarf64_leb128.asm
@@ -0,0 +1,9063 @@
+ .file "leb128_test.c"
+ .section .debug_abbrev,"",@progbits
+.Ldebug_abbrev0:
+ .section .debug_info,"",@progbits
+.Ldebug_info0:
+ .section .debug_line,"",@progbits
+.Ldebug_line0:
+ .text
+.Ltext0:
+#APP
+ .ident "$Id: intnum.c 1295 2005-10-30 06:13:24Z peter $"
+#NO_APP
+ .section .rodata.str1.1,"aMS",@progbits,1
+.LC0:
+ .string "0"
+ .section .rodata
+.LC1:
+ .string ""
+ .string ""
+ .section .rodata.str1.1
+.LC2:
+ .string "2"
+.LC3:
+ .string "\002"
+.LC4:
+ .string "7F"
+.LC5:
+ .string "\177"
+.LC6:
+ .string "80"
+.LC7:
+ .string "\200\001"
+.LC8:
+ .string "81"
+.LC9:
+ .string "\201\001"
+.LC10:
+ .string "82"
+.LC11:
+ .string "\202\001"
+.LC12:
+ .string "3239"
+.LC13:
+ .string "\271d"
+ .section .rodata
+.LC14:
+ .string "\377"
+ .string ""
+ .section .rodata.str1.1
+.LC15:
+ .string "~"
+.LC16:
+ .string "\201\177"
+.LC17:
+ .string "\200\177"
+.LC18:
+ .string "\377~"
+ .data
+ .align 32
+ .type tests, @object
+ .size tests, 512
+tests:
+ .long 0
+ .long 0
+ .quad .LC0
+ .quad 1
+ .quad .LC1
+ .long 0
+ .long 0
+ .quad .LC2
+ .quad 1
+ .quad .LC3
+ .long 0
+ .long 0
+ .quad .LC4
+ .quad 1
+ .quad .LC5
+ .long 0
+ .long 0
+ .quad .LC6
+ .quad 2
+ .quad .LC7
+ .long 0
+ .long 0
+ .quad .LC8
+ .quad 2
+ .quad .LC9
+ .long 0
+ .long 0
+ .quad .LC10
+ .quad 2
+ .quad .LC11
+ .long 0
+ .long 0
+ .quad .LC12
+ .quad 2
+ .quad .LC13
+ .long 1
+ .long 0
+ .quad .LC0
+ .quad 1
+ .quad .LC1
+ .long 1
+ .long 0
+ .quad .LC2
+ .quad 1
+ .quad .LC3
+ .long 1
+ .long 0
+ .quad .LC4
+ .quad 2
+ .quad .LC14
+ .long 1
+ .long 0
+ .quad .LC6
+ .quad 2
+ .quad .LC7
+ .long 1
+ .long 0
+ .quad .LC8
+ .quad 2
+ .quad .LC9
+ .long 1
+ .long 1
+ .quad .LC2
+ .quad 1
+ .quad .LC15
+ .long 1
+ .long 1
+ .quad .LC4
+ .quad 2
+ .quad .LC16
+ .long 1
+ .long 1
+ .quad .LC6
+ .quad 2
+ .quad .LC17
+ .long 1
+ .long 1
+ .quad .LC8
+ .quad 2
+ .quad .LC18
+ .text
+ .p2align 4,,15
+.globl yasm_intnum_initialize
+ .type yasm_intnum_initialize, @function
+yasm_intnum_initialize:
+.LFB25:
+ .file 1 "./libyasm/intnum.c"
+ .loc 1 65 0
+.LVL0:
+ subq $8, %rsp
+.LCFI0:
+.LVL1:
+ .loc 1 66 0
+ xorl %esi, %esi
+ movl $128, %edi
+ call BitVector_Create
+ .loc 1 67 0
+ xorl %esi, %esi
+ movl $128, %edi
+ .loc 1 66 0
+ movq %rax, conv_bv(%rip)
+ .loc 1 67 0
+ call BitVector_Create
+ .loc 1 68 0
+ xorl %esi, %esi
+ movl $128, %edi
+ .loc 1 67 0
+ movq %rax, result(%rip)
+ .loc 1 68 0
+ call BitVector_Create
+ .loc 1 69 0
+ xorl %esi, %esi
+ movl $128, %edi
+ .loc 1 68 0
+ movq %rax, spare(%rip)
+ .loc 1 69 0
+ call BitVector_Create
+ .loc 1 70 0
+ xorl %esi, %esi
+ movl $128, %edi
+ .loc 1 69 0
+ movq %rax, op1static(%rip)
+ .loc 1 70 0
+ call BitVector_Create
+ .loc 1 71 0
+ movl $128, %edi
+ .loc 1 70 0
+ movq %rax, op2static(%rip)
+ .loc 1 71 0
+ call BitVector_from_Dec_static_Boot
+ movq %rax, from_dec_data(%rip)
+ .loc 1 72 0
+ addq $8, %rsp
+.LVL2:
+ ret
+.LFE25:
+ .size yasm_intnum_initialize, .-yasm_intnum_initialize
+ .p2align 4,,15
+.globl yasm_intnum_cleanup
+ .type yasm_intnum_cleanup, @function
+yasm_intnum_cleanup:
+.LFB26:
+ .loc 1 76 0
+.LVL3:
+ subq $8, %rsp
+.LCFI1:
+.LVL4:
+ .loc 1 77 0
+ movq from_dec_data(%rip), %rdi
+ call BitVector_from_Dec_static_Shutdown
+ .loc 1 78 0
+ movq op2static(%rip), %rdi
+ call BitVector_Destroy
+ .loc 1 79 0
+ movq op1static(%rip), %rdi
+ call BitVector_Destroy
+ .loc 1 80 0
+ movq spare(%rip), %rdi
+ call BitVector_Destroy
+ .loc 1 81 0
+ movq result(%rip), %rdi
+ call BitVector_Destroy
+ .loc 1 82 0
+ movq conv_bv(%rip), %rdi
+ .loc 1 83 0
+ addq $8, %rsp
+.LVL5:
+ .loc 1 82 0
+ jmp BitVector_Destroy
+.LFE26:
+ .size yasm_intnum_cleanup, .-yasm_intnum_cleanup
+ .section .rodata.str1.8,"aMS",@progbits,1
+ .align 8
+.LC19:
+ .string "Numeric constant too large for internal format"
+ .text
+ .p2align 4,,15
+.globl yasm_intnum_create_dec
+ .type yasm_intnum_create_dec, @function
+yasm_intnum_create_dec:
+.LFB27:
+ .loc 1 87 0
+.LVL6:
+ movq %rbx, -24(%rsp)
+.LCFI2:
+ movq %rbp, -16(%rsp)
+.LCFI3:
+ movq %rdi, %rbx
+ movq %r12, -8(%rsp)
+.LCFI4:
+ .loc 1 88 0
+ movl $16, %edi
+.LVL7:
+ .loc 1 87 0
+ subq $24, %rsp
+.LCFI5:
+.LVL8:
+ .loc 1 87 0
+ movq %rsi, %r12
+ .loc 1 88 0
+ call *yasm_xmalloc(%rip)
+.LVL9:
+.LVL10:
+ .loc 1 90 0
+ movb $0, 12(%rax)
+ .loc 1 92 0
+ movq conv_bv(%rip), %rsi
+ movq %rbx, %rdx
+ movq from_dec_data(%rip), %rdi
+.LVL11:
+ .loc 1 88 0
+ movq %rax, %rbp
+.LVL12:
+ .loc 1 92 0
+ call BitVector_from_Dec_static
+ cmpl $12, %eax
+ je .L13
+.L6:
+ .loc 1 96 0
+ movq conv_bv(%rip), %rdi
+ call Set_Max
+ cmpq $31, %rax
+ jg .L8
+ .loc 1 98 0
+ movq conv_bv(%rip), %rdi
+ .loc 1 97 0
+ movl $0, 8(%rbp)
+ .loc 1 98 0
+ xorl %edx, %edx
+ movl $32, %esi
+ call BitVector_Chunk_Read
+ movq %rax, (%rbp)
+ .loc 1 105 0
+ movq %rbp, %rax
+ movq (%rsp), %rbx
+.LVL13:
+ movq 8(%rsp), %rbp
+.LVL14:
+ movq 16(%rsp), %r12
+.LVL15:
+ addq $24, %rsp
+.LVL16:
+ ret
+.LVL17:
+ .p2align 4,,7
+.L8:
+ .loc 1 101 0
+ movq conv_bv(%rip), %rdi
+ .loc 1 100 0
+ movl $1, 8(%rbp)
+ .loc 1 101 0
+ call BitVector_Clone
+ movq %rax, (%rbp)
+ .loc 1 105 0
+ movq %rbp, %rax
+ movq (%rsp), %rbx
+.LVL18:
+ movq 8(%rsp), %rbp
+.LVL19:
+ movq 16(%rsp), %r12
+.LVL20:
+ addq $24, %rsp
+.LVL21:
+ ret
+.LVL22:
+ .p2align 4,,7
+.L13:
+ .loc 1 94 0
+ movl $.LC19, %edx
+ movq %r12, %rsi
+ xorl %edi, %edi
+ xorl %eax, %eax
+ call yasm__warning
+ jmp .L6
+.LFE27:
+ .size yasm_intnum_create_dec, .-yasm_intnum_create_dec
+ .p2align 4,,15
+.globl yasm_intnum_create_bin
+ .type yasm_intnum_create_bin, @function
+yasm_intnum_create_bin:
+.LFB28:
+ .loc 1 109 0
+.LVL23:
+ movq %rbp, -16(%rsp)
+.LCFI6:
+ movq %rdi, %rbp
+ movq %rbx, -24(%rsp)
+.LCFI7:
+ movq %r12, -8(%rsp)
+.LCFI8:
+ .loc 1 110 0
+ movl $16, %edi
+.LVL24:
+ .loc 1 109 0
+ subq $24, %rsp
+.LCFI9:
+.LVL25:
+ .loc 1 109 0
+ movq %rsi, %r12
+ .loc 1 110 0
+ call *yasm_xmalloc(%rip)
+.LVL26:
+ .loc 1 112 0
+ movq %rbp, %rdi
+ .loc 1 110 0
+ movq %rax, %rbx
+.LVL27:
+ .loc 1 112 0
+ call strlen
+ .loc 1 114 0
+ cmpb $-128, %al
+ .loc 1 112 0
+ movb %al, 12(%rbx)
+ .loc 1 114 0
+ ja .L21
+.L15:
+ .loc 1 118 0
+ movq conv_bv(%rip), %rdi
+ movq %rbp, %rsi
+ call BitVector_from_Bin
+ .loc 1 119 0
+ movq conv_bv(%rip), %rdi
+ call Set_Max
+ cmpq $31, %rax
+ jg .L17
+ .loc 1 121 0
+ movq conv_bv(%rip), %rdi
+ .loc 1 120 0
+ movl $0, 8(%rbx)
+ .loc 1 121 0
+ xorl %edx, %edx
+ movl $32, %esi
+ call BitVector_Chunk_Read
+ movq %rax, (%rbx)
+ .loc 1 128 0
+ movq %rbx, %rax
+ movq 8(%rsp), %rbp
+.LVL28:
+ movq (%rsp), %rbx
+.LVL29:
+ movq 16(%rsp), %r12
+.LVL30:
+ addq $24, %rsp
+.LVL31:
+ ret
+.LVL32:
+ .p2align 4,,7
+.L17:
+ .loc 1 124 0
+ movq conv_bv(%rip), %rdi
+ .loc 1 123 0
+ movl $1, 8(%rbx)
+ .loc 1 124 0
+ call BitVector_Clone
+ movq %rax, (%rbx)
+ .loc 1 128 0
+ movq %rbx, %rax
+ movq 8(%rsp), %rbp
+.LVL33:
+ movq (%rsp), %rbx
+.LVL34:
+ movq 16(%rsp), %r12
+.LVL35:
+ addq $24, %rsp
+.LVL36:
+ ret
+.LVL37:
+ .p2align 4,,7
+.L21:
+ .loc 1 115 0
+ movl $.LC19, %edx
+ movq %r12, %rsi
+ xorl %edi, %edi
+ xorl %eax, %eax
+ call yasm__warning
+ jmp .L15
+.LFE28:
+ .size yasm_intnum_create_bin, .-yasm_intnum_create_bin
+ .p2align 4,,15
+.globl yasm_intnum_create_oct
+ .type yasm_intnum_create_oct, @function
+yasm_intnum_create_oct:
+.LFB29:
+ .loc 1 132 0
+.LVL38:
+ movq %rbp, -16(%rsp)
+.LCFI10:
+ movq %rdi, %rbp
+ movq %rbx, -24(%rsp)
+.LCFI11:
+ movq %r12, -8(%rsp)
+.LCFI12:
+ .loc 1 133 0
+ movl $16, %edi
+.LVL39:
+ .loc 1 132 0
+ subq $24, %rsp
+.LCFI13:
+.LVL40:
+ .loc 1 132 0
+ movq %rsi, %r12
+ .loc 1 133 0
+ call *yasm_xmalloc(%rip)
+.LVL41:
+ .loc 1 135 0
+ movq %rbp, %rdi
+ .loc 1 133 0
+ movq %rax, %rbx
+.LVL42:
+ .loc 1 135 0
+ call strlen
+ leaq (%rax,%rax,2), %rax
+ .loc 1 137 0
+ cmpb $-128, %al
+ .loc 1 135 0
+ movb %al, 12(%rbx)
+ .loc 1 137 0
+ ja .L29
+.L23:
+ .loc 1 141 0
+ movq conv_bv(%rip), %rdi
+ movq %rbp, %rsi
+ call BitVector_from_Oct
+ .loc 1 142 0
+ movq conv_bv(%rip), %rdi
+ call Set_Max
+ cmpq $31, %rax
+ jg .L25
+ .loc 1 144 0
+ movq conv_bv(%rip), %rdi
+ .loc 1 143 0
+ movl $0, 8(%rbx)
+ .loc 1 144 0
+ xorl %edx, %edx
+ movl $32, %esi
+ call BitVector_Chunk_Read
+ movq %rax, (%rbx)
+ .loc 1 151 0
+ movq %rbx, %rax
+ movq 8(%rsp), %rbp
+.LVL43:
+ movq (%rsp), %rbx
+.LVL44:
+ movq 16(%rsp), %r12
+.LVL45:
+ addq $24, %rsp
+.LVL46:
+ ret
+.LVL47:
+ .p2align 4,,7
+.L25:
+ .loc 1 147 0
+ movq conv_bv(%rip), %rdi
+ .loc 1 146 0
+ movl $1, 8(%rbx)
+ .loc 1 147 0
+ call BitVector_Clone
+ movq %rax, (%rbx)
+ .loc 1 151 0
+ movq %rbx, %rax
+ movq 8(%rsp), %rbp
+.LVL48:
+ movq (%rsp), %rbx
+.LVL49:
+ movq 16(%rsp), %r12
+.LVL50:
+ addq $24, %rsp
+.LVL51:
+ ret
+.LVL52:
+ .p2align 4,,7
+.L29:
+ .loc 1 138 0
+ movl $.LC19, %edx
+ movq %r12, %rsi
+ xorl %edi, %edi
+ xorl %eax, %eax
+ call yasm__warning
+ jmp .L23
+.LFE29:
+ .size yasm_intnum_create_oct, .-yasm_intnum_create_oct
+ .p2align 4,,15
+.globl yasm_intnum_create_hex
+ .type yasm_intnum_create_hex, @function
+yasm_intnum_create_hex:
+.LFB30:
+ .loc 1 155 0
+.LVL53:
+ movq %rbp, -16(%rsp)
+.LCFI14:
+ movq %rdi, %rbp
+ movq %rbx, -24(%rsp)
+.LCFI15:
+ movq %r12, -8(%rsp)
+.LCFI16:
+ .loc 1 156 0
+ movl $16, %edi
+.LVL54:
+ .loc 1 155 0
+ subq $24, %rsp
+.LCFI17:
+.LVL55:
+ .loc 1 155 0
+ movq %rsi, %r12
+ .loc 1 156 0
+ call *yasm_xmalloc(%rip)
+.LVL56:
+ .loc 1 158 0
+ movq %rbp, %rdi
+ .loc 1 156 0
+ movq %rax, %rbx
+.LVL57:
+ .loc 1 158 0
+ call strlen
+ salq $2, %rax
+ .loc 1 160 0
+ cmpb $-128, %al
+ .loc 1 158 0
+ movb %al, 12(%rbx)
+ .loc 1 160 0
+ ja .L37
+.L31:
+ .loc 1 164 0
+ movq conv_bv(%rip), %rdi
+ movq %rbp, %rsi
+ call BitVector_from_Hex
+ .loc 1 165 0
+ movq conv_bv(%rip), %rdi
+ call Set_Max
+ cmpq $31, %rax
+ jg .L33
+ .loc 1 167 0
+ movq conv_bv(%rip), %rdi
+ .loc 1 166 0
+ movl $0, 8(%rbx)
+ .loc 1 167 0
+ xorl %edx, %edx
+ movl $32, %esi
+ call BitVector_Chunk_Read
+ movq %rax, (%rbx)
+ .loc 1 174 0
+ movq %rbx, %rax
+ movq 8(%rsp), %rbp
+.LVL58:
+ movq (%rsp), %rbx
+.LVL59:
+ movq 16(%rsp), %r12
+.LVL60:
+ addq $24, %rsp
+.LVL61:
+ ret
+.LVL62:
+ .p2align 4,,7
+.L33:
+ .loc 1 170 0
+ movq conv_bv(%rip), %rdi
+ .loc 1 169 0
+ movl $1, 8(%rbx)
+ .loc 1 170 0
+ call BitVector_Clone
+ movq %rax, (%rbx)
+ .loc 1 174 0
+ movq %rbx, %rax
+ movq 8(%rsp), %rbp
+.LVL63:
+ movq (%rsp), %rbx
+.LVL64:
+ movq 16(%rsp), %r12
+.LVL65:
+ addq $24, %rsp
+.LVL66:
+ ret
+.LVL67:
+ .p2align 4,,7
+.L37:
+ .loc 1 161 0
+ movl $.LC19, %edx
+ movq %r12, %rsi
+ xorl %edi, %edi
+ xorl %eax, %eax
+ call yasm__warning
+ jmp .L31
+.LFE30:
+ .size yasm_intnum_create_hex, .-yasm_intnum_create_hex
+ .section .rodata.str1.8
+ .align 8
+.LC20:
+ .string "Character constant too large for internal format"
+ .text
+ .p2align 4,,15
+.globl yasm_intnum_create_charconst_nasm
+ .type yasm_intnum_create_charconst_nasm, @function
+yasm_intnum_create_charconst_nasm:
+.LFB31:
+ .loc 1 179 0
+.LVL68:
+ movq %rbx, -32(%rsp)
+.LCFI18:
+ movq %rdi, %rbx
+ movq %rbp, -24(%rsp)
+.LCFI19:
+ movq %r12, -16(%rsp)
+.LCFI20:
+ movq %r13, -8(%rsp)
+.LCFI21:
+ movq %rsi, %rbp
+ subq $40, %rsp
+.LCFI22:
+.LVL69:
+ .loc 1 180 0
+ movl $16, %edi
+.LVL70:
+ call *yasm_xmalloc(%rip)
+.LVL71:
+ .loc 1 181 0
+ movq %rbx, %rdi
+ .loc 1 180 0
+ movq %rax, %r13
+.LVL72:
+ .loc 1 181 0
+ call strlen
+ movq %rax, %r12
+ .loc 1 183 0
+ leaq 0(,%rax,8), %rax
+ .loc 1 185 0
+ cmpb $-128, %al
+ .loc 1 183 0
+ movb %al, 12(%r13)
+ .loc 1 185 0
+ ja .L59
+.L39:
+ .loc 1 189 0
+ cmpq $4, %r12
+ ja .L60
+ .loc 1 193 0
+ movq $0, (%r13)
+ .loc 1 194 0
+ movl $0, 8(%r13)
+.L43:
+ .loc 1 197 0
+ cmpl $4, %r12d
+ ja .L44
+ mov %r12d, %eax
+.LVL73:
+ jmp *.L50(,%rax,8)
+ .section .rodata
+ .align 8
+ .align 4
+.L50:
+ .quad .L45
+ .quad .L55
+ .quad .L56
+ .quad .L57
+ .quad .L49
+ .text
+.L49:
+ .loc 1 199 0
+ movsbq 3(%rbx),%rdx
+ orq (%r13), %rdx
+ .loc 1 200 0
+ salq $8, %rdx
+ movq %rdx, (%r13)
+.L48:
+ .loc 1 203 0
+ movsbq 2(%rbx),%rax
+.LVL74:
+ orq %rax, %rdx
+ .loc 1 204 0
+ salq $8, %rdx
+ movq %rdx, (%r13)
+.LVL75:
+.L47:
+ .loc 1 207 0
+ movsbq 1(%rbx),%rax
+.LVL76:
+ orq %rax, %rdx
+ .loc 1 208 0
+ salq $8, %rdx
+ movq %rdx, (%r13)
+.LVL77:
+.L46:
+ .loc 1 211 0
+ movsbq (%rbx),%rax
+.LVL78:
+ orq %rax, %rdx
+ movq %rdx, (%r13)
+.LVL79:
+.L45:
+ .loc 1 225 0
+ movq %r13, %rax
+.LVL80:
+ movq 8(%rsp), %rbx
+.LVL81:
+ movq 16(%rsp), %rbp
+.LVL82:
+ movq 24(%rsp), %r12
+ movq 32(%rsp), %r13
+.LVL83:
+ addq $40, %rsp
+.LVL84:
+ ret
+.LVL85:
+ .p2align 4,,7
+.L44:
+ .loc 1 216 0
+ testq %r12, %r12
+ jne .L61
+ .loc 1 221 0
+ movq conv_bv(%rip), %rdi
+ call BitVector_Clone
+ movq %rax, (%r13)
+ jmp .L45
+ .p2align 4,,7
+.L60:
+ .loc 1 190 0
+ movq conv_bv(%rip), %rdi
+ call BitVector_Empty
+ .loc 1 191 0
+ movl $1, 8(%r13)
+ jmp .L43
+ .p2align 4,,7
+.L59:
+ .loc 1 186 0
+ movl $.LC20, %edx
+ movq %rbp, %rsi
+ xorl %edi, %edi
+ xorl %eax, %eax
+ call yasm__warning
+ jmp .L39
+ .p2align 4,,7
+.L61:
+ .loc 1 179 0
+ leaq (%rbx,%r12), %rbp
+.LVL86:
+ xorl %ebx, %ebx
+.LVL87:
+ .p2align 4,,7
+.L51:
+ .loc 1 217 0
+ movq conv_bv(%rip), %rdi
+ movl $8, %esi
+ .loc 1 218 0
+ incq %rbx
+ .loc 1 217 0
+ call BitVector_Move_Left
+ .loc 1 218 0
+ movsbq -1(%rbp),%rcx
+ movq conv_bv(%rip), %rdi
+ xorl %edx, %edx
+ movl $8, %esi
+ decq %rbp
+ call BitVector_Chunk_Store
+ .loc 1 216 0
+ cmpq %rbx, %r12
+ jne .L51
+ .loc 1 221 0
+ movq conv_bv(%rip), %rdi
+ call BitVector_Clone
+ movq %rax, (%r13)
+ jmp .L45
+.LVL88:
+.L57:
+ movq (%r13), %rdx
+ jmp .L48
+.L56:
+ movq (%r13), %rdx
+ .p2align 4,,5
+ jmp .L47
+.L55:
+ movq (%r13), %rdx
+ .p2align 4,,5
+ jmp .L46
+.LFE31:
+ .size yasm_intnum_create_charconst_nasm, .-yasm_intnum_create_charconst_nasm
+ .p2align 4,,15
+.globl yasm_intnum_create_uint
+ .type yasm_intnum_create_uint, @function
+yasm_intnum_create_uint:
+.LFB32:
+ .loc 1 230 0
+.LVL89:
+ pushq %rbx
+.LCFI23:
+.LVL90:
+ .loc 1 230 0
+ movq %rdi, %rbx
+ .loc 1 231 0
+ movl $16, %edi
+.LVL91:
+ call *yasm_xmalloc(%rip)
+ .loc 1 233 0
+ movq %rbx, (%rax)
+ .loc 1 234 0
+ movl $0, 8(%rax)
+ .loc 1 235 0
+ movb $0, 12(%rax)
+ .loc 1 238 0
+ popq %rbx
+.LVL92:
+ ret
+.LFE32:
+ .size yasm_intnum_create_uint, .-yasm_intnum_create_uint
+ .p2align 4,,15
+.globl yasm_intnum_create_int
+ .type yasm_intnum_create_int, @function
+yasm_intnum_create_int:
+.LFB33:
+ .loc 1 242 0
+.LVL93:
+ .loc 1 246 0
+ testq %rdi, %rdi
+ .loc 1 242 0
+ pushq %rbx
+.LCFI24:
+.LVL94:
+ .loc 1 242 0
+ movq %rdi, %rbx
+ .loc 1 246 0
+ js .L65
+.LVL95:
+ .loc 1 259 0
+ popq %rbx
+.LVL96:
+ .loc 1 247 0
+ jmp yasm_intnum_create_uint
+.LVL97:
+ .p2align 4,,7
+.L65:
+ .loc 1 249 0
+ movq conv_bv(%rip), %rdi
+ .loc 1 250 0
+ negq %rbx
+ .loc 1 249 0
+ call BitVector_Empty
+ .loc 1 250 0
+ movq conv_bv(%rip), %rdi
+ movq %rbx, %rcx
+ xorl %edx, %edx
+ movl $32, %esi
+ call BitVector_Chunk_Store
+ .loc 1 251 0
+ movq conv_bv(%rip), %rdi
+ movq %rdi, %rsi
+ call BitVector_Negate
+ .loc 1 253 0
+ movl $16, %edi
+ call *yasm_xmalloc(%rip)
+ .loc 1 254 0
+ movq conv_bv(%rip), %rdi
+ .loc 1 253 0
+ movq %rax, %rbx
+.LVL98:
+ .loc 1 254 0
+ call BitVector_Clone
+ .loc 1 255 0
+ movl $1, 8(%rbx)
+ .loc 1 254 0
+ movq %rax, (%rbx)
+ .loc 1 259 0
+ movq %rbx, %rax
+ .loc 1 256 0
+ movb $0, 12(%rbx)
+ .loc 1 259 0
+ popq %rbx
+.LVL99:
+ ret
+.LFE33:
+ .size yasm_intnum_create_int, .-yasm_intnum_create_int
+ .p2align 4,,15
+.globl yasm_intnum_copy
+ .type yasm_intnum_copy, @function
+yasm_intnum_copy:
+.LFB34:
+ .loc 1 263 0
+.LVL100:
+ movq %rbp, -8(%rsp)
+.LCFI25:
+ movq %rdi, %rbp
+ movq %rbx, -16(%rsp)
+.LCFI26:
+ .loc 1 264 0
+ movl $16, %edi
+.LVL101:
+ .loc 1 263 0
+ subq $24, %rsp
+.LCFI27:
+.LVL102:
+ .loc 1 264 0
+ call *yasm_xmalloc(%rip)
+ .loc 1 266 0
+ movl 8(%rbp), %edx
+ .loc 1 264 0
+ movq %rax, %rbx
+.LVL103:
+ .loc 1 266 0
+ testl %edx, %edx
+ je .L71
+ cmpl $1, %edx
+ je .L74
+ .loc 1 275 0
+ movzbl 12(%rbp), %eax
+ .loc 1 274 0
+ movl %edx, 8(%rbx)
+ .loc 1 275 0
+ movb %al, 12(%rbx)
+ .loc 1 278 0
+ movq %rbx, %rax
+ movq 16(%rsp), %rbp
+.LVL104:
+ movq 8(%rsp), %rbx
+.LVL105:
+ addq $24, %rsp
+.LVL106:
+ ret
+.LVL107:
+ .p2align 4,,7
+.L71:
+ .loc 1 268 0
+ movq (%rbp), %rax
+ .loc 1 274 0
+ movl %edx, 8(%rbx)
+ .loc 1 268 0
+ movq %rax, (%rbx)
+ .loc 1 275 0
+ movzbl 12(%rbp), %eax
+ movb %al, 12(%rbx)
+ .loc 1 278 0
+ movq %rbx, %rax
+ movq 16(%rsp), %rbp
+.LVL108:
+ movq 8(%rsp), %rbx
+.LVL109:
+ addq $24, %rsp
+.LVL110:
+ ret
+.LVL111:
+ .p2align 4,,7
+.L74:
+ .loc 1 271 0
+ movq (%rbp), %rdi
+ call BitVector_Clone
+ movq %rax, (%rbx)
+ .loc 1 275 0
+ movzbl 12(%rbp), %eax
+ movl 8(%rbp), %edx
+ movb %al, 12(%rbx)
+ .loc 1 274 0
+ movl %edx, 8(%rbx)
+ .loc 1 278 0
+ movq %rbx, %rax
+ movq 16(%rsp), %rbp
+.LVL112:
+ movq 8(%rsp), %rbx
+.LVL113:
+ addq $24, %rsp
+.LVL114:
+ ret
+.LFE34:
+ .size yasm_intnum_copy, .-yasm_intnum_copy
+ .p2align 4,,15
+.globl yasm_intnum_destroy
+ .type yasm_intnum_destroy, @function
+yasm_intnum_destroy:
+.LFB35:
+ .loc 1 282 0
+.LVL115:
+ pushq %rbx
+.LCFI28:
+.LVL116:
+ .loc 1 283 0
+ cmpl $1, 8(%rdi)
+ .loc 1 282 0
+ movq %rdi, %rbx
+ .loc 1 283 0
+ je .L79
+.LVL117:
+ .loc 1 285 0
+ movq %rbx, %rdi
+ movq yasm_xfree(%rip), %r11
+ .loc 1 286 0
+ popq %rbx
+.LVL118:
+ .loc 1 285 0
+ jmp *%r11
+.LVL119:
+.LVL120:
+ .p2align 4,,7
+.L79:
+ .loc 1 284 0
+ movq (%rdi), %rdi
+ call BitVector_Destroy
+ .loc 1 285 0
+ movq %rbx, %rdi
+ movq yasm_xfree(%rip), %r11
+ .loc 1 286 0
+ popq %rbx
+.LVL121:
+ .loc 1 285 0
+ jmp *%r11
+.LVL122:
+.LFE35:
+ .size yasm_intnum_destroy, .-yasm_intnum_destroy
+ .section .rodata.str1.1
+.LC21:
+ .string "Operation needs an operand"
+.LC22:
+ .string "./libyasm/intnum.c"
+.LC23:
+ .string "SEG"
+.LC24:
+ .string "invalid use of '%s'"
+.LC25:
+ .string "WRT"
+.LC26:
+ .string ":"
+ .section .rodata.str1.8
+ .align 8
+.LC27:
+ .string "invalid operation in intnum calculation"
+ .text
+ .p2align 4,,15
+.globl yasm_intnum_calc
+ .type yasm_intnum_calc, @function
+yasm_intnum_calc:
+.LFB36:
+ .loc 1 292 0
+.LVL123:
+ movq %rbx, -48(%rsp)
+.LCFI29:
+ movq %rbp, -40(%rsp)
+.LCFI30:
+ movq %rdx, %rbx
+ movq %r14, -16(%rsp)
+.LCFI31:
+ movq %r15, -8(%rsp)
+.LCFI32:
+ movq %rdi, %r14
+ movq %r12, -32(%rsp)
+.LCFI33:
+ movq %r13, -24(%rsp)
+.LCFI34:
+ subq $72, %rsp
+.LCFI35:
+.LVL124:
+ .loc 1 299 0
+ cmpl $1, 8(%rdi)
+ .loc 1 292 0
+ movl %esi, %ebp
+ movq %rcx, %r15
+ .loc 1 293 0
+ movl $0, 20(%rsp)
+.LVL125:
+ .loc 1 299 0
+ je .L146
+.LVL126:
+ .loc 1 302 0
+ movq op1static(%rip), %r12
+.LVL127:
+ .loc 1 303 0
+ movq %r12, %rdi
+.LVL128:
+ call BitVector_Empty
+ .loc 1 304 0
+ movq (%r14), %rcx
+ xorl %edx, %edx
+ movl $32, %esi
+ movq %r12, %rdi
+ call BitVector_Chunk_Store
+.LVL129:
+.L83:
+ .loc 1 307 0
+ xorl %r13d, %r13d
+.LVL130:
+ testq %rbx, %rbx
+ je .L86
+ .loc 1 308 0
+ cmpl $1, 8(%rbx)
+ je .L147
+ .loc 1 311 0
+ movq op2static(%rip), %r13
+ .loc 1 312 0
+ movq %r13, %rdi
+ call BitVector_Empty
+ .loc 1 313 0
+ movq (%rbx), %rcx
+ xorl %edx, %edx
+ movl $32, %esi
+ movq %r13, %rdi
+ call BitVector_Chunk_Store
+.LVL131:
+.L86:
+ .loc 1 317 0
+ testq %rbx, %rbx
+ sete %dl
+ cmpl $8, %ebp
+ setne %al
+ testb %al, %dl
+ je .L89
+ cmpl $9, %ebp
+ setne %dl
+ cmpl $18, %ebp
+ setne %al
+ testb %al, %dl
+ jne .L148
+.L89:
+ .loc 1 322 0
+ cmpl $28, %ebp
+ ja .L92
+ mov %ebp, %eax
+ jmp *.L121(,%rax,8)
+ .section .rodata
+ .align 8
+ .align 4
+.L121:
+ .quad .L93
+ .quad .L94
+ .quad .L95
+ .quad .L96
+ .quad .L98
+ .quad .L98
+ .quad .L100
+ .quad .L100
+ .quad .L101
+ .quad .L102
+ .quad .L103
+ .quad .L104
+ .quad .L105
+ .quad .L106
+ .quad .L107
+ .quad .L108
+ .quad .L109
+ .quad .L110
+ .quad .L111
+ .quad .L112
+ .quad .L113
+ .quad .L114
+ .quad .L115
+ .quad .L116
+ .quad .L117
+ .quad .L92
+ .quad .L118
+ .quad .L119
+ .quad .L120
+ .text
+ .p2align 4,,7
+.L92:
+ .loc 1 431 0
+ movl $.LC27, %edx
+ movl $431, %esi
+ movl $.LC22, %edi
+ call *yasm_internal_error_(%rip)
+.LVL132:
+.L122:
+ .loc 1 435 0
+ movq result(%rip), %rdi
+ call Set_Max
+ cmpq $31, %rax
+ jg .L136
+ .loc 1 436 0
+ cmpl $1, 8(%r14)
+ je .L149
+.L138:
+ .loc 1 440 0
+ movq result(%rip), %rdi
+ xorl %edx, %edx
+ movl $32, %esi
+ call BitVector_Chunk_Read
+ movq %rax, (%r14)
+.L143:
+ .loc 1 449 0
+ movq 24(%rsp), %rbx
+.LVL133:
+ movq 32(%rsp), %rbp
+.LVL134:
+ movq 40(%rsp), %r12
+.LVL135:
+ movq 48(%rsp), %r13
+.LVL136:
+ movq 56(%rsp), %r14
+.LVL137:
+ movq 64(%rsp), %r15
+.LVL138:
+ addq $72, %rsp
+.LVL139:
+ ret
+.LVL140:
+ .p2align 4,,7
+.L136:
+ .loc 1 442 0
+ cmpl $1, 8(%r14)
+ je .L150
+ .loc 1 446 0
+ movq result(%rip), %rdi
+ .loc 1 445 0
+ movl $1, 8(%r14)
+ .loc 1 446 0
+ call BitVector_Clone
+ movq %rax, (%r14)
+ jmp .L143
+.LVL141:
+ .p2align 4,,7
+.L147:
+ .loc 1 309 0
+ movq (%rbx), %r13
+ jmp .L86
+.LVL142:
+ .p2align 4,,7
+.L146:
+ .loc 1 300 0
+ movq (%rdi), %r12
+.LVL143:
+ .p2align 4,,5
+ jmp .L83
+.LVL144:
+ .p2align 4,,7
+.L148:
+ .loc 1 319 0
+ movl $.LC21, %edx
+ movl $319, %esi
+ movl $.LC22, %edi
+ call *yasm_internal_error_(%rip)
+ jmp .L89
+ .p2align 4,,7
+.L150:
+ .loc 1 443 0
+ movq result(%rip), %rsi
+ movq (%r14), %rdi
+ call BitVector_Copy
+ jmp .L143
+.L149:
+ .loc 1 437 0
+ movq (%r14), %rdi
+ call BitVector_Destroy
+ .loc 1 438 0
+ movl $0, 8(%r14)
+ .p2align 4,,4
+ jmp .L138
+.LVL145:
+.L100:
+ .loc 1 344 0
+ movq result(%rip), %rcx
+ movq spare(%rip), %rdi
+ movq %r13, %rdx
+ movq %r12, %rsi
+ call BitVector_Divide
+.LVL146:
+ jmp .L122
+.LVL147:
+.L98:
+ .loc 1 337 0
+ movq spare(%rip), %rcx
+ movq result(%rip), %rdi
+ movq %r13, %rdx
+ movq %r12, %rsi
+ call BitVector_Divide
+.LVL148:
+ jmp .L122
+.LVL149:
+.L111:
+ .loc 1 390 0
+ movq result(%rip), %rdi
+ call BitVector_Empty
+.LVL150:
+ .loc 1 391 0
+ movq %r12, %rdi
+ call BitVector_is_empty
+ movl %eax, %esi
+.L145:
+ .loc 1 395 0
+ movq result(%rip), %rdi
+ call BitVector_LSB
+ jmp .L122
+.LVL151:
+.L112:
+ .loc 1 398 0
+ movq result(%rip), %rdi
+ call BitVector_Empty
+.LVL152:
+ .loc 1 399 0
+ movq %r13, %rsi
+ movq %r12, %rdi
+ call BitVector_Lexicompare
+ movq result(%rip), %rdi
+ movl %eax, %esi
+ shrl $31, %esi
+ call BitVector_LSB
+ jmp .L122
+.LVL153:
+.L113:
+ .loc 1 402 0
+ movq result(%rip), %rdi
+ call BitVector_Empty
+.LVL154:
+ .loc 1 403 0
+ movq %r13, %rsi
+ movq %r12, %rdi
+ call BitVector_Lexicompare
+ movq result(%rip), %rdi
+ xorl %esi, %esi
+ testl %eax, %eax
+ setg %sil
+ call BitVector_LSB
+ jmp .L122
+.LVL155:
+.L114:
+ .loc 1 394 0
+ movq result(%rip), %rdi
+ call BitVector_Empty
+.LVL156:
+ .loc 1 395 0
+ movq %r13, %rsi
+ movq %r12, %rdi
+ call BitVector_equal
+ movl %eax, %esi
+ jmp .L145
+.LVL157:
+.L119:
+ .loc 1 421 0
+ movl $.LC25, %edx
+ movl $.LC24, %esi
+ movq %r15, %rdi
+ xorl %eax, %eax
+.LVL158:
+ call yasm__error
+ jmp .L122
+.LVL159:
+.L120:
+ .loc 1 424 0
+ movl $.LC26, %edx
+ movl $.LC24, %esi
+ movq %r15, %rdi
+ xorl %eax, %eax
+.LVL160:
+ call yasm__error
+ jmp .L122
+.LVL161:
+.L101:
+ .loc 1 347 0
+ movq result(%rip), %rdi
+ movq %r12, %rsi
+ call BitVector_Negate
+.LVL162:
+ jmp .L122
+.LVL163:
+.L93:
+ .loc 1 427 0
+ movq result(%rip), %rdi
+ testq %rdi, %rdi
+ je .L122
+ .loc 1 428 0
+ movq %r12, %rsi
+ call BitVector_Copy
+.LVL164:
+ jmp .L122
+.LVL165:
+.L110:
+ .loc 1 385 0
+ movq result(%rip), %rdi
+ call BitVector_Empty
+.LVL166:
+ .loc 1 386 0
+ movq %r12, %rdi
+ call BitVector_is_empty
+ testl %eax, %eax
+ je .L151
+ xorl %esi, %esi
+ .p2align 4,,2
+ jmp .L145
+.LVL167:
+.L96:
+ .loc 1 330 0
+ movq result(%rip), %rdi
+ movq %r13, %rdx
+ movq %r12, %rsi
+ call BitVector_Multiply
+.LVL168:
+ jmp .L122
+.LVL169:
+.L94:
+ .loc 1 324 0
+ movq result(%rip), %rdi
+ leaq 20(%rsp), %rcx
+ movq %r13, %rdx
+ movq %r12, %rsi
+ call BitVector_add
+.LVL170:
+ jmp .L122
+.LVL171:
+.L95:
+ .loc 1 327 0
+ movq result(%rip), %rdi
+ leaq 20(%rsp), %rcx
+ movq %r13, %rdx
+ movq %r12, %rsi
+ call BitVector_sub
+.LVL172:
+ jmp .L122
+.LVL173:
+.L103:
+ .loc 1 353 0
+ movq result(%rip), %rdi
+ movq %r13, %rdx
+ movq %r12, %rsi
+ call Set_Union
+.LVL174:
+ jmp .L122
+.LVL175:
+.L104:
+ .loc 1 356 0
+ movq result(%rip), %rdi
+ movq %r13, %rdx
+ movq %r12, %rsi
+ call Set_Intersection
+.LVL176:
+ jmp .L122
+.LVL177:
+.L105:
+ .loc 1 359 0
+ movq result(%rip), %rdi
+ movq %r13, %rdx
+ movq %r12, %rsi
+ call Set_ExclusiveOr
+.LVL178:
+ jmp .L122
+.LVL179:
+.L106:
+ .loc 1 362 0
+ movq result(%rip), %rdi
+ movq %r12, %rsi
+ movq %r13, %rdx
+ call Set_Union
+.LVL180:
+ .loc 1 363 0
+ movq result(%rip), %rdi
+ movq %rdi, %rsi
+ call Set_Complement
+ jmp .L122
+.LVL181:
+.L107:
+ .loc 1 366 0
+ movl 8(%rbx), %edx
+ testl %edx, %edx
+ jne .L125
+ .loc 1 367 0
+ movq result(%rip), %rdi
+ movq %r12, %rsi
+ call BitVector_Copy
+.LVL182:
+ .loc 1 368 0
+ movq (%rbx), %rax
+ movq result(%rip), %rdi
+ movl %eax, %esi
+ call BitVector_Move_Left
+ jmp .L122
+.LVL183:
+.L108:
+ .loc 1 373 0
+ movl 8(%rbx), %eax
+.LVL184:
+ testl %eax, %eax
+ jne .L125
+ .loc 1 374 0
+ movq result(%rip), %rdi
+ movq %r12, %rsi
+ call BitVector_Copy
+ .loc 1 375 0
+ movq (%rbx), %rax
+ movq result(%rip), %rdi
+ movl %eax, %esi
+ call BitVector_Move_Right
+ jmp .L122
+.LVL185:
+.L109:
+ .loc 1 380 0
+ movq result(%rip), %rdi
+ call BitVector_Empty
+.LVL186:
+ .loc 1 381 0
+ movq %r12, %rdi
+ call BitVector_is_empty
+ testl %eax, %eax
+ jne .L152
+ movl $1, %esi
+ .p2align 4,,2
+ jmp .L145
+.LVL187:
+.L115:
+ .loc 1 406 0
+ movq result(%rip), %rdi
+ call BitVector_Empty
+.LVL188:
+ .loc 1 407 0
+ movq %r13, %rsi
+ movq %r12, %rdi
+ call BitVector_Lexicompare
+ movq result(%rip), %rdi
+ xorl %esi, %esi
+ testl %eax, %eax
+ setle %sil
+ call BitVector_LSB
+ jmp .L122
+.LVL189:
+.L116:
+ .loc 1 410 0
+ movq result(%rip), %rdi
+ call BitVector_Empty
+.LVL190:
+ .loc 1 411 0
+ movq %r13, %rsi
+ movq %r12, %rdi
+ call BitVector_Lexicompare
+ movq result(%rip), %rdi
+ movl %eax, %esi
+ notl %esi
+ shrl $31, %esi
+ call BitVector_LSB
+ jmp .L122
+.LVL191:
+.L117:
+ .loc 1 414 0
+ movq result(%rip), %rdi
+ call BitVector_Empty
+.LVL192:
+ .loc 1 415 0
+ movq %r13, %rsi
+ movq %r12, %rdi
+ call BitVector_equal
+ movq result(%rip), %rdi
+ xorl %esi, %esi
+ testl %eax, %eax
+ sete %sil
+ call BitVector_LSB
+ jmp .L122
+.LVL193:
+.L118:
+ .loc 1 418 0
+ movl $.LC23, %edx
+ movl $.LC24, %esi
+ movq %r15, %rdi
+ xorl %eax, %eax
+.LVL194:
+ call yasm__error
+ jmp .L122
+.LVL195:
+.L102:
+ .loc 1 350 0
+ movq result(%rip), %rdi
+ movq %r12, %rsi
+ call Set_Complement
+.LVL196:
+ jmp .L122
+.L152:
+ .loc 1 381 0
+ movq %r13, %rdi
+ call BitVector_is_empty
+ xorl %esi, %esi
+ testl %eax, %eax
+ .p2align 4,,2
+ jne .L145
+ movl $1, %esi
+ jmp .L145
+.L151:
+ .loc 1 386 0
+ movq %r13, %rdi
+ call BitVector_is_empty
+ testl %eax, %eax
+ movl $1, %esi
+ je .L145
+ xorl %esi, %esi
+ jmp .L145
+.LVL197:
+.L125:
+ .loc 1 377 0
+ movq result(%rip), %rdi
+ call BitVector_Empty
+ jmp .L122
+.LFE36:
+ .size yasm_intnum_calc, .-yasm_intnum_calc
+ .p2align 4,,15
+.globl yasm_intnum_zero
+ .type yasm_intnum_zero, @function
+yasm_intnum_zero:
+.LFB37:
+ .loc 1 454 0
+.LVL198:
+ pushq %rbx
+.LCFI36:
+.LVL199:
+ .loc 1 455 0
+ cmpl $1, 8(%rdi)
+ .loc 1 454 0
+ movq %rdi, %rbx
+ .loc 1 455 0
+ je .L157
+.LVL200:
+ .loc 1 459 0
+ movq $0, (%rbx)
+ .loc 1 460 0
+ popq %rbx
+.LVL201:
+ ret
+.LVL202:
+ .p2align 4,,7
+.L157:
+ .loc 1 456 0
+ movq (%rdi), %rdi
+ call BitVector_Destroy
+ .loc 1 457 0
+ movl $0, 8(%rbx)
+ .loc 1 459 0
+ movq $0, (%rbx)
+ .loc 1 460 0
+ popq %rbx
+.LVL203:
+ ret
+.LFE37:
+ .size yasm_intnum_zero, .-yasm_intnum_zero
+ .p2align 4,,15
+.globl yasm_intnum_is_zero
+ .type yasm_intnum_is_zero, @function
+yasm_intnum_is_zero:
+.LFB38:
+ .loc 1 464 0
+.LVL204:
+ .loc 1 465 0
+ movl 8(%rdi), %ecx
+ testl %ecx, %ecx
+ jne .L159
+ cmpq $0, (%rdi)
+ movl $1, %eax
+ jne .L159
+ .loc 1 466 0
+ rep ; ret
+ .p2align 4,,7
+.L159:
+ .loc 1 465 0
+ xorl %eax, %eax
+ .loc 1 466 0
+ ret
+.LFE38:
+ .size yasm_intnum_is_zero, .-yasm_intnum_is_zero
+ .p2align 4,,15
+.globl yasm_intnum_is_pos1
+ .type yasm_intnum_is_pos1, @function
+yasm_intnum_is_pos1:
+.LFB39:
+ .loc 1 470 0
+.LVL205:
+ .loc 1 471 0
+ movl 8(%rdi), %esi
+ testl %esi, %esi
+ jne .L165
+ cmpq $1, (%rdi)
+ movl $1, %eax
+ je .L168
+.L165:
+ xorl %eax, %eax
+.L168:
+ .loc 1 472 0
+ rep ; ret
+.LFE39:
+ .size yasm_intnum_is_pos1, .-yasm_intnum_is_pos1
+ .p2align 4,,15
+.globl yasm_intnum_is_neg1
+ .type yasm_intnum_is_neg1, @function
+yasm_intnum_is_neg1:
+.LFB40:
+ .loc 1 476 0
+.LVL206:
+ subq $8, %rsp
+.LCFI37:
+.LVL207:
+ .loc 1 477 0
+ cmpl $1, 8(%rdi)
+ je .L177
+.L171:
+ xorl %edx, %edx
+ .loc 1 478 0
+ addq $8, %rsp
+.LVL208:
+ movl %edx, %eax
+ ret
+.LVL209:
+ .p2align 4,,7
+.L177:
+ .loc 1 477 0
+ movq (%rdi), %rdi
+.LVL210:
+ call BitVector_is_full
+ testl %eax, %eax
+ movl $1, %edx
+ je .L171
+ .loc 1 478 0
+ movl %edx, %eax
+ addq $8, %rsp
+.LVL211:
+ ret
+.LFE40:
+ .size yasm_intnum_is_neg1, .-yasm_intnum_is_neg1
+ .p2align 4,,15
+.globl yasm_intnum_sign
+ .type yasm_intnum_sign, @function
+yasm_intnum_sign:
+.LFB41:
+ .loc 1 482 0
+.LVL212:
+ .loc 1 483 0
+ movl 8(%rdi), %r8d
+ testl %r8d, %r8d
+ jne .L186
+ .loc 1 484 0
+ xorl %eax, %eax
+ cmpq $0, (%rdi)
+ setne %al
+ .loc 1 490 0
+ ret
+ .p2align 4,,7
+.L186:
+ .loc 1 489 0
+ movq (%rdi), %rdi
+.LVL213:
+ jmp BitVector_Sign
+.LFE41:
+ .size yasm_intnum_sign, .-yasm_intnum_sign
+ .section .rodata.str1.1
+.LC28:
+ .string "unknown intnum type"
+ .text
+ .p2align 4,,15
+.globl yasm_intnum_get_uint
+ .type yasm_intnum_get_uint, @function
+yasm_intnum_get_uint:
+.LFB42:
+ .loc 1 494 0
+.LVL214:
+ subq $8, %rsp
+.LCFI38:
+.LVL215:
+ .loc 1 495 0
+ movl 8(%rdi), %eax
+ testl %eax, %eax
+ je .L189
+ decl %eax
+ je .L194
+ .loc 1 501 0
+ movl $.LC28, %edx
+ movl $501, %esi
+ movl $.LC22, %edi
+.LVL216:
+ call *yasm_internal_error_(%rip)
+ xorl %eax, %eax
+ .loc 1 505 0
+ addq $8, %rsp
+.LVL217:
+ ret
+.LVL218:
+ .p2align 4,,7
+.L189:
+ .loc 1 497 0
+ movq (%rdi), %rax
+ .loc 1 505 0
+ addq $8, %rsp
+.LVL219:
+ ret
+.LVL220:
+ .p2align 4,,7
+.L194:
+ .loc 1 499 0
+ movq (%rdi), %rdi
+.LVL221:
+ xorl %edx, %edx
+ movl $32, %esi
+ .loc 1 505 0
+ addq $8, %rsp
+.LVL222:
+ .loc 1 499 0
+ jmp BitVector_Chunk_Read
+.LFE42:
+ .size yasm_intnum_get_uint, .-yasm_intnum_get_uint
+ .p2align 4,,15
+.globl yasm_intnum_get_int
+ .type yasm_intnum_get_int, @function
+yasm_intnum_get_int:
+.LFB43:
+ .loc 1 509 0
+.LVL223:
+ pushq %rbx
+.LCFI39:
+.LVL224:
+ .loc 1 510 0
+ movl 8(%rdi), %eax
+ .loc 1 509 0
+ movq %rdi, %rbx
+ .loc 1 510 0
+ testl %eax, %eax
+ je .L197
+.LVL225:
+ decl %eax
+ je .L208
+ .loc 1 534 0
+ movl $.LC28, %edx
+ movl $534, %esi
+ movl $.LC22, %edi
+ call *yasm_internal_error_(%rip)
+ xorl %eax, %eax
+.LVL226:
+.L201:
+ .loc 1 538 0
+ popq %rbx
+.LVL227:
+ ret
+.LVL228:
+ .p2align 4,,7
+.L197:
+ .loc 1 513 0
+ movq (%rdi), %rax
+ testl %eax, %eax
+ jns .L201
+.L199:
+ .loc 1 538 0
+ popq %rbx
+.LVL229:
+ .loc 1 536 0
+ movabsq $9223372036854775807, %rax
+ .loc 1 538 0
+ .p2align 4,,2
+ ret
+.LVL230:
+ .p2align 4,,7
+.L208:
+ .loc 1 515 0
+ movq (%rdi), %rdi
+ call BitVector_msb_
+ testl %eax, %eax
+ .p2align 4,,2
+ je .L199
+.LBB2:
+ .loc 1 521 0
+ movq (%rbx), %rsi
+ movq conv_bv(%rip), %rdi
+ call BitVector_Negate
+ .loc 1 522 0
+ movq conv_bv(%rip), %rdi
+ call Set_Max
+ cmpq $31, %rax
+ jle .L209
+.LVL231:
+.L203:
+.LBE2:
+ .loc 1 538 0
+ popq %rbx
+.LVL232:
+ .loc 1 536 0
+ movabsq $-9223372036854775808, %rax
+.LVL233:
+ .loc 1 538 0
+ ret
+.LVL234:
+.L209:
+.LBB3:
+ .loc 1 526 0
+ movq conv_bv(%rip), %rdi
+ xorl %edx, %edx
+ movl $32, %esi
+ call BitVector_Chunk_Read
+.LVL235:
+ .loc 1 528 0
+ testl %eax, %eax
+ js .L203
+.LBE3:
+ .loc 1 538 0
+ popq %rbx
+.LVL236:
+.LBB4:
+ .loc 1 528 0
+ negq %rax
+.LVL237:
+.LBE4:
+ .loc 1 538 0
+ ret
+.LFE43:
+ .size yasm_intnum_get_int, .-yasm_intnum_get_int
+ .p2align 4,,15
+.globl yasm_intnum_check_size
+ .type yasm_intnum_check_size, @function
+yasm_intnum_check_size:
+.LFB45:
+ .loc 1 610 0
+.LVL238:
+ movq %rbx, -48(%rsp)
+.LCFI40:
+ movq %r13, -24(%rsp)
+.LCFI41:
+ movq %rdi, %rbx
+ movq %r14, -16(%rsp)
+.LCFI42:
+ movq %r15, -8(%rsp)
+.LCFI43:
+ movq %rsi, %r14
+ movq %rbp, -40(%rsp)
+.LCFI44:
+ movq %r12, -32(%rsp)
+.LCFI45:
+ subq $56, %rsp
+.LCFI46:
+.LVL239:
+ .loc 1 614 0
+ cmpl $1, 8(%rdi)
+ .loc 1 610 0
+ movq %rdx, %r13
+ movl %ecx, %r15d
+ .loc 1 614 0
+ je .L230
+.LVL240:
+ .loc 1 621 0
+ movq conv_bv(%rip), %rbp
+.LVL241:
+ .loc 1 622 0
+ movq %rbp, %rdi
+.LVL242:
+ call BitVector_Empty
+ .loc 1 623 0
+ movq (%rbx), %rcx
+ xorl %edx, %edx
+ movl $32, %esi
+ movq %rbp, %rdi
+ call BitVector_Chunk_Store
+.LVL243:
+.L215:
+ .loc 1 626 0
+ cmpq $127, %r14
+ movl $1, %eax
+.LVL244:
+ ja .L218
+ .loc 1 629 0
+ testq %r13, %r13
+ jne .L231
+.L219:
+ .loc 1 635 0
+ testl %r15d, %r15d
+ .p2align 4,,3
+ jle .L223
+ .loc 1 636 0
+ movq %rbp, %rdi
+ .p2align 4,,5
+ call BitVector_msb_
+.LVL245:
+ testl %eax, %eax
+ .p2align 4,,2
+ jne .L232
+ .loc 1 648 0
+ xorl %eax, %eax
+ cmpl $1, %r15d
+ sete %al
+ subq %rax, %r14
+.LVL246:
+.L223:
+ .loc 1 650 0
+ movq %rbp, %rdi
+ call Set_Max
+.LVL247:
+ cmpq %r14, %rax
+ setl %al
+ movzbl %al, %eax
+.LVL248:
+.L218:
+ .loc 1 651 0
+ movq 8(%rsp), %rbx
+.LVL249:
+ movq 16(%rsp), %rbp
+.LVL250:
+ movq 24(%rsp), %r12
+ movq 32(%rsp), %r13
+.LVL251:
+ movq 40(%rsp), %r14
+.LVL252:
+ movq 48(%rsp), %r15
+.LVL253:
+ addq $56, %rsp
+.LVL254:
+ ret
+.LVL255:
+ .p2align 4,,7
+.L231:
+.LBB5:
+ .loc 1 630 0
+ movq %rbp, %rdi
+ .loc 1 631 0
+ xorl %ebx, %ebx
+.LVL256:
+ .loc 1 630 0
+ call BitVector_msb_
+.LVL257:
+ movl %eax, %r12d
+ .p2align 4,,7
+.L222:
+ .loc 1 632 0
+ movl %r12d, %esi
+ movq %rbp, %rdi
+ incq %rbx
+ call BitVector_shift_right
+ .loc 1 631 0
+ cmpq %rbx, %r13
+ jne .L222
+ jmp .L219
+.LVL258:
+ .p2align 4,,7
+.L230:
+.LBE5:
+ .loc 1 615 0
+ testq %rdx, %rdx
+ .p2align 4,,7
+ jne .L233
+.LVL259:
+ .loc 1 619 0
+ movq (%rdi), %rbp
+.LVL260:
+ .p2align 4,,7
+ jmp .L215
+.LVL261:
+.L232:
+.LBB6:
+ .loc 1 640 0
+ movq conv_bv(%rip), %rdi
+ movq %rbp, %rsi
+ call BitVector_Negate
+ .loc 1 641 0
+ movq conv_bv(%rip), %rdi
+ movq %rdi, %rsi
+ call BitVector_dec
+ .loc 1 642 0
+ movq conv_bv(%rip), %rdi
+ call Set_Max
+ leaq -1(%r14), %rdx
+ cmpq %rdx, %rax
+ setl %al
+ movzbl %al, %eax
+.LVL262:
+ jmp .L218
+.LVL263:
+.L233:
+.LBE6:
+ .loc 1 616 0
+ movq conv_bv(%rip), %rbp
+.LVL264:
+ .loc 1 617 0
+ movq (%rdi), %rsi
+ movq %rbp, %rdi
+.LVL265:
+ call BitVector_Copy
+.LVL266:
+ jmp .L215
+.LFE45:
+ .size yasm_intnum_check_size, .-yasm_intnum_check_size
+ .section .rodata.str1.1
+.LC29:
+ .string "destination too large"
+ .section .rodata.str1.8
+ .align 8
+.LC30:
+ .string "value does not fit in %d bit field"
+ .section .rodata.str1.1
+.LC31:
+ .string "big endian not implemented"
+ .section .rodata.str1.8
+ .align 8
+.LC32:
+ .string "misaligned value, truncating to boundary"
+ .text
+ .p2align 4,,15
+.globl yasm_intnum_get_sized
+ .type yasm_intnum_get_sized, @function
+yasm_intnum_get_sized:
+.LFB44:
+ .loc 1 544 0
+.LVL267:
+ movq %rbx, -48(%rsp)
+.LCFI47:
+ movq %r12, -32(%rsp)
+.LCFI48:
+ movq %rdi, %rbx
+ movq %r13, -24(%rsp)
+.LCFI49:
+ movq %r14, -16(%rsp)
+.LCFI50:
+ movl %r8d, %r12d
+ movq %r15, -8(%rsp)
+.LCFI51:
+ movq %rbp, -40(%rsp)
+.LCFI52:
+ .loc 1 548 0
+ xorl %r15d, %r15d
+.LVL268:
+ .loc 1 544 0
+ subq $88, %rsp
+.LCFI53:
+.LVL269:
+ .loc 1 548 0
+ testl %r8d, %r8d
+ .loc 1 544 0
+ movq %rdx, %r14
+ movq %rsi, 16(%rsp)
+ movq %rcx, 8(%rsp)
+ movl %r9d, 4(%rsp)
+ .loc 1 545 0
+ movq op1static(%rip), %r13
+.LVL270:
+ .loc 1 548 0
+ js .L263
+.LVL271:
+.L237:
+ .loc 1 552 0
+ leaq 0(,%r14,8), %rax
+ cmpq $128, %rax
+ ja .L264
+.LVL272:
+.L238:
+ .loc 1 556 0
+ movl 96(%rsp), %ebp
+ testl %ebp, %ebp
+ jne .L265
+.L240:
+ .loc 1 561 0
+ movl 4(%rsp), %r11d
+ testl %r11d, %r11d
+ je .L243
+ .loc 1 563 0
+ movl $.LC31, %edx
+ movl $563, %esi
+ movl $.LC22, %edi
+ call *yasm_internal_error_(%rip)
+ .loc 1 568 0
+ cmpl $1, 8(%rbx)
+ je .L266
+.L246:
+ .loc 1 571 0
+ movq op2static(%rip), %rbp
+.LVL273:
+ .loc 1 572 0
+ movq %rbp, %rdi
+ call BitVector_Empty
+ .loc 1 573 0
+ movq (%rbx), %rcx
+ xorl %edx, %edx
+ movl $32, %esi
+ movq %rbp, %rdi
+ call BitVector_Chunk_Store
+ .loc 1 577 0
+ movl 96(%rsp), %r10d
+ testq %r15, %r15
+ setne %bl
+.LVL274:
+ testl %r10d, %r10d
+ setne %al
+ testb %bl, %al
+ jne .L267
+.L249:
+ .loc 1 586 0
+ testb %bl, %bl
+ movl %r12d, %edx
+ jne .L268
+.L254:
+ .loc 1 594 0
+ movl 8(%rsp), %r8d
+ xorl %ecx, %ecx
+ movq %rbp, %rsi
+ movq %r13, %rdi
+ call BitVector_Interval_Copy
+ .loc 1 597 0
+ leaq 36(%rsp), %rsi
+ movq %r13, %rdi
+ call BitVector_Block_Read
+ .loc 1 598 0
+ movl 4(%rsp), %r9d
+ .loc 1 597 0
+ movq %rax, %rbx
+.LVL275:
+ .loc 1 598 0
+ testl %r9d, %r9d
+ je .L258
+.LVL276:
+ .loc 1 600 0
+ movl $.LC31, %edx
+ movl $600, %esi
+ movl $.LC22, %edi
+ call *yasm_internal_error_(%rip)
+.L260:
+ .loc 1 603 0
+ movq %rbx, %rdi
+ call *yasm_xfree(%rip)
+ .loc 1 604 0
+ movq 40(%rsp), %rbx
+.LVL277:
+ movq 48(%rsp), %rbp
+.LVL278:
+ movq 56(%rsp), %r12
+.LVL279:
+ movq 64(%rsp), %r13
+.LVL280:
+ movq 72(%rsp), %r14
+.LVL281:
+ movq 80(%rsp), %r15
+.LVL282:
+ addq $88, %rsp
+.LVL283:
+ ret
+.LVL284:
+ .p2align 4,,7
+.L243:
+ .loc 1 565 0
+ movq 16(%rsp), %rsi
+ movl %r14d, %edx
+ movq %r13, %rdi
+ call BitVector_Block_Store
+ .loc 1 568 0
+ cmpl $1, 8(%rbx)
+ jne .L246
+.L266:
+ .loc 1 577 0
+ movl 96(%rsp), %r10d
+ testq %r15, %r15
+ .loc 1 569 0
+ movq (%rbx), %rbp
+.LVL285:
+ .loc 1 577 0
+ setne %bl
+.LVL286:
+ testl %r10d, %r10d
+ setne %al
+ testb %bl, %al
+ je .L249
+.L267:
+ .loc 1 578 0
+ movq conv_bv(%rip), %rdi
+ movq %rbp, %rsi
+ call BitVector_Copy
+ .loc 1 579 0
+ movq conv_bv(%rip), %rdi
+ movl $128, %esi
+ subl %r15d, %esi
+ call BitVector_Move_Left
+ .loc 1 580 0
+ movq conv_bv(%rip), %rdi
+ call BitVector_is_empty
+ testl %eax, %eax
+ jne .L249
+ .loc 1 581 0
+ movq 104(%rsp), %rsi
+ movl $.LC32, %edx
+ xorl %edi, %edi
+ call yasm__warning
+ jmp .L249
+.LVL287:
+ .p2align 4,,7
+.L258:
+ .loc 1 602 0
+ movq 16(%rsp), %rdi
+ movq %r14, %rdx
+ movq %rax, %rsi
+ call memcpy
+ jmp .L260
+.LVL288:
+ .p2align 4,,7
+.L265:
+ .loc 1 556 0
+ movq 8(%rsp), %rsi
+ movl $2, %ecx
+ movq %r15, %rdx
+ movq %rbx, %rdi
+ call yasm_intnum_check_size
+ testl %eax, %eax
+ jne .L240
+ .loc 1 557 0
+ movq 8(%rsp), %rcx
+ movq 104(%rsp), %rsi
+ movl $.LC30, %edx
+ xorl %edi, %edi
+ call yasm__warning
+ jmp .L240
+.LVL289:
+ .p2align 4,,7
+.L264:
+ .loc 1 553 0
+ movl $.LC29, %edx
+ movl $553, %esi
+ movl $.LC22, %edi
+ call *yasm_internal_error_(%rip)
+.LVL290:
+ jmp .L238
+.LVL291:
+ .p2align 4,,7
+.L268:
+ .loc 1 587 0
+ movq %rbp, %rdi
+ call BitVector_msb_
+ .loc 1 588 0
+ testq %r15, %r15
+ .loc 1 587 0
+ movl %eax, %r12d
+.LVL292:
+ .loc 1 588 0
+ .p2align 4,,2
+ je .L255
+ xorl %ebx, %ebx
+ .p2align 4,,7
+.L257:
+ .loc 1 589 0
+ movl %r12d, %esi
+ movq %rbp, %rdi
+ incq %rbx
+ call BitVector_shift_right
+ .loc 1 588 0
+ cmpq %rbx, %r15
+ jne .L257
+.L255:
+ xorl %edx, %edx
+ jmp .L254
+.LVL293:
+ .p2align 4,,7
+.L263:
+ .loc 1 548 0
+ movl %r8d, %eax
+ negl %eax
+ movslq %eax,%r15
+ jmp .L237
+.LFE44:
+ .size yasm_intnum_get_sized, .-yasm_intnum_get_sized
+ .p2align 4,,15
+.globl yasm_intnum_get_leb128
+ .type yasm_intnum_get_leb128, @function
+yasm_intnum_get_leb128:
+.LFB46:
+ .loc 1 655 0
+.LVL294:
+ movq %rbx, -40(%rsp)
+.LCFI54:
+ movq %rbp, -32(%rsp)
+.LCFI55:
+ movq %rdi, %rbx
+ movq %r13, -16(%rsp)
+.LCFI56:
+ movq %r14, -8(%rsp)
+.LCFI57:
+ movl %edx, %ebp
+ movq %r12, -24(%rsp)
+.LCFI58:
+ subq $40, %rsp
+.LCFI59:
+.LVL295:
+ .loc 1 661 0
+ movl 8(%rdi), %eax
+ .loc 1 655 0
+ movq %rsi, %r14
+ .loc 1 656 0
+ movq op1static(%rip), %r13
+.LVL296:
+ .loc 1 661 0
+ testl %eax, %eax
+ jne .L270
+.LVL297:
+ cmpq $0, (%rdi)
+ je .L290
+.L272:
+ .loc 1 670 0
+ movq %r13, %rdi
+.LVL298:
+ call BitVector_Empty
+ .loc 1 671 0
+ movq (%rbx), %rcx
+ xorl %edx, %edx
+ movl $32, %esi
+ movq %r13, %rdi
+ call BitVector_Chunk_Store
+ .loc 1 674 0
+ testl %ebp, %ebp
+ jne .L291
+.LVL299:
+.L277:
+ .loc 1 686 0
+ movq %r13, %rdi
+ call Set_Max
+ leaq 1(%rax), %r12
+.LVL300:
+.L281:
+ .loc 1 690 0
+ xorl %eax, %eax
+ testq %r12, %r12
+ movq %r14, %rbx
+.LVL301:
+ jne .L292
+.LVL302:
+.L284:
+ .loc 1 695 0
+ andb $127, -1(%rbx)
+.LVL303:
+.L274:
+ .loc 1 697 0
+ movq (%rsp), %rbx
+.LVL304:
+ movq 8(%rsp), %rbp
+.LVL305:
+ movq 16(%rsp), %r12
+.LVL306:
+ movq 24(%rsp), %r13
+.LVL307:
+ movq 32(%rsp), %r14
+.LVL308:
+ addq $40, %rsp
+.LVL309:
+ ret
+.LVL310:
+ .p2align 4,,7
+.L270:
+ .loc 1 667 0
+ decl %eax
+ jne .L272
+ .loc 1 674 0
+ testl %ebp, %ebp
+ .loc 1 668 0
+ movq (%rdi), %r13
+ .loc 1 674 0
+ je .L277
+.LVL311:
+ .p2align 4,,7
+.L291:
+ .loc 1 676 0
+ movq %r13, %rdi
+ call BitVector_msb_
+ testl %eax, %eax
+ jne .L293
+ .loc 1 682 0
+ movq %r13, %rdi
+ .loc 1 690 0
+ movq %r14, %rbx
+.LVL312:
+ .loc 1 682 0
+ call Set_Max
+ leaq 2(%rax), %r12
+.LVL313:
+ .loc 1 690 0
+ xorl %eax, %eax
+ testq %r12, %r12
+ je .L284
+ .p2align 4,,7
+.L292:
+ xorl %ebp, %ebp
+.LVL314:
+ .p2align 4,,7
+.L285:
+ .loc 1 691 0
+ movl %ebp, %edx
+ movl $7, %esi
+ movq %r13, %rdi
+ call BitVector_Chunk_Read
+ .loc 1 690 0
+ addq $7, %rbp
+ .loc 1 692 0
+ orl $-128, %eax
+ movb %al, (%rbx)
+ .loc 1 693 0
+ incq %rbx
+ .loc 1 690 0
+ cmpq %rbp, %r12
+ ja .L285
+ movq %rbx, %rax
+ subq %r14, %rax
+ jmp .L284
+.LVL315:
+ .p2align 4,,7
+.L290:
+ .loc 1 662 0
+ movl $1, %eax
+ movb $0, (%rsi)
+ jmp .L274
+.LVL316:
+.L293:
+ .loc 1 678 0
+ movq conv_bv(%rip), %rdi
+ movq %r13, %rsi
+ call BitVector_Negate
+ .loc 1 679 0
+ movq conv_bv(%rip), %rdi
+ call Set_Max
+ leaq 2(%rax), %r12
+.LVL317:
+ jmp .L281
+.LFE46:
+ .size yasm_intnum_get_leb128, .-yasm_intnum_get_leb128
+ .p2align 4,,15
+.globl yasm_intnum_size_leb128
+ .type yasm_intnum_size_leb128, @function
+yasm_intnum_size_leb128:
+.LFB47:
+ .loc 1 701 0
+.LVL318:
+ movq %rbx, -24(%rsp)
+.LCFI60:
+ movq %rbp, -16(%rsp)
+.LCFI61:
+ movq %rdi, %rbx
+ movq %r12, -8(%rsp)
+.LCFI62:
+ subq $24, %rsp
+.LCFI63:
+.LVL319:
+ .loc 1 705 0
+ movl 8(%rdi), %eax
+ .loc 1 701 0
+ movl %esi, %r12d
+ .loc 1 702 0
+ movq op1static(%rip), %rbp
+.LVL320:
+ .loc 1 705 0
+ testl %eax, %eax
+ jne .L295
+.LVL321:
+ cmpq $0, (%rdi)
+ movl $1, %edx
+ je .L299
+.L297:
+ .loc 1 713 0
+ movq %rbp, %rdi
+.LVL322:
+ call BitVector_Empty
+ .loc 1 714 0
+ movq (%rbx), %rcx
+ xorl %edx, %edx
+ movl $32, %esi
+ movq %rbp, %rdi
+ call BitVector_Chunk_Store
+ .loc 1 717 0
+ testl %r12d, %r12d
+ je .L302
+.LVL323:
+.L308:
+ .loc 1 719 0
+ movq %rbp, %rdi
+ call BitVector_msb_
+ testl %eax, %eax
+ .p2align 4,,2
+ je .L304
+ .loc 1 721 0
+ movq conv_bv(%rip), %rdi
+ movq %rbp, %rsi
+ call BitVector_Negate
+ .loc 1 722 0
+ movq conv_bv(%rip), %rdi
+ call Set_Max
+ leaq 8(%rax), %rcx
+ .p2align 4,,7
+.L307:
+ .loc 1 729 0
+ movq %rcx, %rax
+ movabsq $5270498306774157605, %rdx
+ imulq %rdx
+ movq %rcx, %rax
+ sarq $63, %rax
+ sarq %rdx
+ subq %rax, %rdx
+.LVL324:
+.L299:
+ .loc 1 731 0
+ movq (%rsp), %rbx
+.LVL325:
+ movq 8(%rsp), %rbp
+.LVL326:
+ movq %rdx, %rax
+ movq 16(%rsp), %r12
+.LVL327:
+ addq $24, %rsp
+.LVL328:
+ ret
+.LVL329:
+ .p2align 4,,7
+.L295:
+ .loc 1 710 0
+ decl %eax
+ jne .L297
+ .loc 1 717 0
+ testl %r12d, %r12d
+ .loc 1 711 0
+ movq (%rdi), %rbp
+ .loc 1 717 0
+ jne .L308
+.LVL330:
+ .p2align 4,,7
+.L302:
+ .loc 1 729 0
+ movq %rbp, %rdi
+ call Set_Max
+ leaq 7(%rax), %rcx
+ jmp .L307
+ .p2align 4,,7
+.L304:
+ .loc 1 725 0
+ movq %rbp, %rdi
+ call Set_Max
+ leaq 8(%rax), %rcx
+ .p2align 4,,2
+ jmp .L307
+.LFE47:
+ .size yasm_intnum_size_leb128, .-yasm_intnum_size_leb128
+ .section .rodata.str1.1
+.LC33:
+ .string "0x%lx/%u"
+.LC34:
+ .string "0x%s/%u"
+ .text
+ .p2align 4,,15
+.globl yasm_intnum_print
+ .type yasm_intnum_print, @function
+yasm_intnum_print:
+.LFB48:
+ .loc 1 735 0
+.LVL331:
+ movq %rbp, -16(%rsp)
+.LCFI64:
+ movq %r12, -8(%rsp)
+.LCFI65:
+ movq %rdi, %rbp
+ movq %rbx, -24(%rsp)
+.LCFI66:
+ subq $24, %rsp
+.LCFI67:
+.LVL332:
+ .loc 1 738 0
+ movl 8(%rdi), %eax
+ .loc 1 735 0
+ movq %rsi, %r12
+ .loc 1 738 0
+ testl %eax, %eax
+ je .L311
+.LVL333:
+ decl %eax
+ je .L315
+ .loc 1 748 0
+ movq (%rsp), %rbx
+ movq 8(%rsp), %rbp
+ movq 16(%rsp), %r12
+.LVL334:
+ addq $24, %rsp
+.LVL335:
+ ret
+.LVL336:
+ .p2align 4,,7
+.L311:
+ .loc 1 740 0
+ movzbl 12(%rdi), %ecx
+ movq (%rdi), %rdx
+ movl $.LC33, %esi
+ movq %r12, %rdi
+.LVL337:
+ .loc 1 748 0
+ movq (%rsp), %rbx
+ movq 8(%rsp), %rbp
+.LVL338:
+ movq 16(%rsp), %r12
+.LVL339:
+ .loc 1 740 0
+ xorl %eax, %eax
+ .loc 1 748 0
+ addq $24, %rsp
+.LVL340:
+ .loc 1 740 0
+ jmp fprintf
+.LVL341:
+ .p2align 4,,7
+.L315:
+ .loc 1 743 0
+ movq (%rdi), %rdi
+.LVL342:
+ call BitVector_to_Hex
+ .loc 1 744 0
+ movzbl 12(%rbp), %ecx
+ .loc 1 743 0
+ movq %rax, %rbx
+.LVL343:
+ .loc 1 744 0
+ movq %r12, %rdi
+ movq %rax, %rdx
+ movl $.LC34, %esi
+ xorl %eax, %eax
+ call fprintf
+ .loc 1 745 0
+ movq %rbx, %rdi
+ movq yasm_xfree(%rip), %r11
+ .loc 1 748 0
+ movq (%rsp), %rbx
+.LVL344:
+ movq 8(%rsp), %rbp
+.LVL345:
+ movq 16(%rsp), %r12
+.LVL346:
+ addq $24, %rsp
+.LVL347:
+ .loc 1 745 0
+ jmp *%r11
+.LVL348:
+.LFE48:
+ .size yasm_intnum_print, .-yasm_intnum_print
+ .section .rodata.str1.1
+.LC35:
+ .string "Test leb128_test: "
+.LC36:
+ .string "-"
+.LC37:
+ .string ""
+.LC38:
+ .string "un"
+ .section .rodata.str1.8
+ .align 8
+.LC39:
+ .string "%ssigned %s%s size() bad size: expected %lu, got %lu!"
+ .align 8
+.LC40:
+ .string "%ssigned %s%s get() bad size: expected %lu, got %lu!"
+ .align 8
+.LC41:
+ .string "%ssigned %s%s get() bad output!"
+ .section .rodata.str1.1
+.LC42:
+ .string "%s ** F: %s\n"
+.LC43:
+ .string " +%d-%d/%d %d%%\n%s"
+ .text
+ .p2align 4,,15
+.globl main
+ .type main, @function
+main:
+.LFB50:
+ .file 2 "libyasm/tests/leb128_test.c"
+ .loc 2 134 0
+.LVL349:
+ pushq %r15
+.LCFI68:
+.LVL350:
+ pushq %r14
+.LCFI69:
+.LVL351:
+ pushq %r13
+.LCFI70:
+.LVL352:
+ pushq %r12
+.LCFI71:
+.LVL353:
+ pushq %rbp
+.LCFI72:
+.LVL354:
+ pushq %rbx
+.LCFI73:
+.LVL355:
+ subq $168, %rsp
+.LCFI74:
+.LVL356:
+ .loc 2 139 0
+ call BitVector_Boot
+ testl %eax, %eax
+ movl $1, %edx
+ je .L366
+ .loc 2 159 0
+ addq $168, %rsp
+.LVL357:
+ movl %edx, %eax
+ popq %rbx
+.LVL358:
+ popq %rbp
+.LVL359:
+ popq %r12
+.LVL360:
+ popq %r13
+.LVL361:
+ popq %r14
+.LVL362:
+ popq %r15
+.LVL363:
+ ret
+.LVL364:
+.L366:
+ leaq 48(%rsp), %rbp
+ .loc 2 144 0
+ xorl %r14d, %r14d
+.LVL365:
+ movl $tests+16, %r13d
+ .loc 2 141 0
+ call yasm_intnum_initialize
+ movl $tests, %r15d
+ .loc 2 144 0
+ movl $.LC35, %edi
+ xorl %eax, %eax
+ .loc 2 143 0
+ movb $0, failed(%rip)
+ .loc 2 144 0
+ call printf
+ movl $0, 44(%rsp)
+.LVL366:
+ movq $tests+4, 32(%rsp)
+ movq $tests+8, 24(%rsp)
+ jmp .L320
+.LVL367:
+.L370:
+.LBB7:
+.LBB8:
+.LBB9:
+ .loc 2 98 0
+ movq %r12, %rdi
+ call yasm_intnum_destroy
+ .loc 2 99 0
+ movl -12(%r13), %eax
+ movl $.LC37, %edx
+ movl $.LC36, %ecx
+ movq (%r13), %r9
+ movq -8(%r13), %r8
+ movl $.LC39, %esi
+ testl %eax, %eax
+ movl (%r15), %eax
+ movq %rbx, (%rsp)
+ cmove %rdx, %rcx
+ testl %eax, %eax
+ movl $.LC38, %eax
+ cmove %rax, %rdx
+.LVL368:
+.L365:
+ .loc 2 110 0
+ movl $failmsg, %edi
+ xorl %eax, %eax
+ movl $1, %ebx
+.LVL369:
+ call sprintf
+ movl $70, %edi
+.L331:
+.LBE9:
+.LBE8:
+ .loc 2 147 0
+ call putchar
+ .loc 2 148 0
+ movq stdout(%rip), %rdi
+ call fflush
+ .loc 2 149 0
+ testl %ebx, %ebx
+ jne .L367
+.LBE7:
+ .loc 2 145 0
+ incl %r14d
+.LBB10:
+ .loc 2 151 0
+ addl %ebx, 44(%rsp)
+.LBE10:
+ .loc 2 145 0
+ addq $32, 24(%rsp)
+ addq $32, %r15
+ addq $32, %r13
+ addq $32, 32(%rsp)
+ cmpl $16, %r14d
+ je .L368
+.L320:
+.LBB11:
+.LBB12:
+.LBB13:
+ .loc 2 85 0
+ movq -8(%r13), %rdi
+ call yasm__xstrdup
+ .loc 2 86 0
+ xorl %esi, %esi
+ .loc 2 85 0
+ movq %rax, %rbx
+.LVL370:
+ .loc 2 86 0
+ movq %rax, %rdi
+ call yasm_intnum_create_hex
+ .loc 2 91 0
+ movq %rbx, %rdi
+ .loc 2 86 0
+ movq %rax, %r12
+ .loc 2 91 0
+ call *yasm_xfree(%rip)
+ .loc 2 93 0
+ movl -12(%r13), %edx
+ testl %edx, %edx
+ jne .L369
+.L321:
+ .loc 2 96 0
+ movl -16(%r13), %esi
+ movq %r12, %rdi
+ call yasm_intnum_size_leb128
+.LVL371:
+ .loc 2 97 0
+ cmpq (%r13), %rax
+.LVL372:
+ .loc 2 96 0
+ movq %rax, %rbx
+.LVL373:
+ .loc 2 97 0
+ jne .L370
+ .loc 2 99 0
+ movl $1, %eax
+ .p2align 4,,7
+.L332:
+ .loc 2 106 0
+ movb $-1, -1(%rax,%rbp)
+ incq %rax
+ .loc 2 105 0
+ cmpq $101, %rax
+ jne .L332
+ .loc 2 107 0
+ movl (%r15), %edx
+ movq %rbp, %rsi
+ movq %r12, %rdi
+ call yasm_intnum_get_leb128
+.LVL374:
+ .loc 2 108 0
+ cmpq (%r13), %rax
+.LVL375:
+ .loc 2 107 0
+ movq %rax, %rbx
+.LVL376:
+ .loc 2 108 0
+ je .L334
+ .loc 2 109 0
+ movq %r12, %rdi
+ call yasm_intnum_destroy
+ .loc 2 110 0
+ movq 24(%rsp), %rax
+ movl $.LC37, %edx
+ movq (%r13), %r9
+ movl $.LC36, %ecx
+ movl $.LC40, %esi
+ movq (%rax), %r8
+ movq 32(%rsp), %rax
+ movl (%rax), %eax
+ testl %eax, %eax
+ movl (%r15), %eax
+ movq %rbx, (%rsp)
+ cmove %rdx, %rcx
+ testl %eax, %eax
+ movl $.LC38, %eax
+ cmove %rax, %rdx
+ jmp .L365
+.LVL377:
+.L369:
+ .loc 2 94 0
+ xorl %ecx, %ecx
+ xorl %edx, %edx
+ movl $8, %esi
+ movq %r12, %rdi
+ call yasm_intnum_calc
+ jmp .L321
+.LVL378:
+.L367:
+.LBE13:
+.LBE12:
+ .loc 2 150 0
+ xorl %eax, %eax
+ movl $failmsg, %ecx
+ movl $failed, %edx
+ movl $.LC42, %esi
+ movl $failed, %edi
+.LBE11:
+ .loc 2 145 0
+ incl %r14d
+.LBB14:
+ .loc 2 150 0
+ call sprintf
+.LBE14:
+ .loc 2 145 0
+ addq $32, %r15
+.LBB15:
+ .loc 2 151 0
+ addl %ebx, 44(%rsp)
+.LBE15:
+ .loc 2 145 0
+ addq $32, 24(%rsp)
+ addq $32, %r13
+ addq $32, 32(%rsp)
+ cmpl $16, %r14d
+ jne .L320
+.L368:
+ .loc 2 154 0
+ call yasm_intnum_cleanup
+ .loc 2 156 0
+ movl %r14d, %esi
+ subl 44(%rsp), %esi
+ movl $100, %r12d
+.LVL379:
+ movl 44(%rsp), %edx
+ movl $failed, %r9d
+ movl $16, %ecx
+ movl $.LC43, %edi
+ movl %esi, %r8d
+ imull %r12d, %r8d
+ leal 15(%r8), %eax
+ testl %r8d, %r8d
+ cmovs %eax, %r8d
+ xorl %eax, %eax
+ sarl $4, %r8d
+ call printf
+ .loc 2 158 0
+ xorl %edx, %edx
+ cmpl $0, 44(%rsp)
+ setne %dl
+ .loc 2 159 0
+ addq $168, %rsp
+.LVL380:
+ popq %rbx
+.LVL381:
+ popq %rbp
+.LVL382:
+ popq %r12
+.LVL383:
+ popq %r13
+.LVL384:
+ popq %r14
+.LVL385:
+ popq %r15
+.LVL386:
+ movl %edx, %eax
+ ret
+.LVL387:
+.L334:
+.LBB16:
+.LBB17:
+.LBB18:
+ .loc 2 117 0
+ testq %rax, %rax
+ je .L346
+.LVL388:
+ .loc 2 118 0
+ movq 8(%r13), %rdi
+ xorl %esi, %esi
+.LVL389:
+ movl $1, %ecx
+.L342:
+ movzbl -1(%rdi,%rcx), %eax
+.LVL390:
+ cmpb %al, -1(%rcx,%rbp)
+ movl $1, %eax
+ cmovne %eax, %esi
+ .loc 2 117 0
+ testl %esi, %esi
+ sete %dl
+ cmpq %rcx, %rbx
+ seta %al
+ incq %rcx
+ testb %al, %dl
+ jne .L342
+ .loc 2 121 0
+ testl %esi, %esi
+ je .L346
+ .loc 2 122 0
+ movq %r12, %rdi
+ .loc 2 123 0
+ movl $1, %ebx
+.LVL391:
+ .loc 2 122 0
+ call yasm_intnum_destroy
+.LVL392:
+ .loc 2 123 0
+ movq 32(%rsp), %rax
+ movl $.LC37, %edx
+ movl $.LC36, %ecx
+ movl $failmsg, %edi
+ movl $.LC41, %esi
+ movl (%rax), %eax
+ testl %eax, %eax
+ movl (%r15), %eax
+ cmove %rdx, %rcx
+ testl %eax, %eax
+ movl $.LC38, %eax
+ cmove %rax, %rdx
+ movq 24(%rsp), %rax
+ movq (%rax), %r8
+ xorl %eax, %eax
+ call sprintf
+ movl $70, %edi
+ jmp .L331
+.LVL393:
+.L346:
+ .loc 2 128 0
+ movq %r12, %rdi
+ xorl %ebx, %ebx
+.LVL394:
+ call yasm_intnum_destroy
+.LVL395:
+ movl $46, %edi
+ jmp .L331
+.LBE18:
+.LBE17:
+.LBE16:
+.LFE50:
+ .size main, .-main
+ .local failmsg
+ .comm failmsg,100,32
+ .local failed
+ .comm failed,1000,32
+ .local from_dec_data
+ .comm from_dec_data,8,8
+ .local op2static
+ .comm op2static,8,8
+ .local op1static
+ .comm op1static,8,8
+ .local spare
+ .comm spare,8,8
+ .local result
+ .comm result,8,8
+ .local conv_bv
+ .comm conv_bv,8,8
+ .section .debug_frame,"",@progbits
+.Lframe0:
+ .long .LECIE0-.LSCIE0
+.LSCIE0:
+ .long 0xffffffff
+ .byte 0x1
+ .string ""
+ .uleb128 0x1
+ .sleb128 -8
+ .byte 0x10
+ .byte 0xc
+ .uleb128 0x7
+ .uleb128 0x8
+ .byte 0x90
+ .uleb128 0x1
+ .align 8
+.LECIE0:
+.LSFDE0:
+ .long .LEFDE0-.LASFDE0
+.LASFDE0:
+ .long .Lframe0
+ .quad .LFB25
+ .quad .LFE25-.LFB25
+ .byte 0x4
+ .long .LCFI0-.LFB25
+ .byte 0xe
+ .uleb128 0x10
+ .align 8
+.LEFDE0:
+.LSFDE2:
+ .long .LEFDE2-.LASFDE2
+.LASFDE2:
+ .long .Lframe0
+ .quad .LFB26
+ .quad .LFE26-.LFB26
+ .byte 0x4
+ .long .LCFI1-.LFB26
+ .byte 0xe
+ .uleb128 0x10
+ .align 8
+.LEFDE2:
+.LSFDE4:
+ .long .LEFDE4-.LASFDE4
+.LASFDE4:
+ .long .Lframe0
+ .quad .LFB27
+ .quad .LFE27-.LFB27
+ .byte 0x4
+ .long .LCFI3-.LFB27
+ .byte 0x86
+ .uleb128 0x3
+ .byte 0x83
+ .uleb128 0x4
+ .byte 0x4
+ .long .LCFI5-.LCFI3
+ .byte 0xe
+ .uleb128 0x20
+ .byte 0x8c
+ .uleb128 0x2
+ .align 8
+.LEFDE4:
+.LSFDE6:
+ .long .LEFDE6-.LASFDE6
+.LASFDE6:
+ .long .Lframe0
+ .quad .LFB28
+ .quad .LFE28-.LFB28
+ .byte 0x4
+ .long .LCFI6-.LFB28
+ .byte 0x86
+ .uleb128 0x3
+ .byte 0x4
+ .long .LCFI9-.LCFI6
+ .byte 0xe
+ .uleb128 0x20
+ .byte 0x8c
+ .uleb128 0x2
+ .byte 0x83
+ .uleb128 0x4
+ .align 8
+.LEFDE6:
+.LSFDE8:
+ .long .LEFDE8-.LASFDE8
+.LASFDE8:
+ .long .Lframe0
+ .quad .LFB29
+ .quad .LFE29-.LFB29
+ .byte 0x4
+ .long .LCFI10-.LFB29
+ .byte 0x86
+ .uleb128 0x3
+ .byte 0x4
+ .long .LCFI13-.LCFI10
+ .byte 0xe
+ .uleb128 0x20
+ .byte 0x8c
+ .uleb128 0x2
+ .byte 0x83
+ .uleb128 0x4
+ .align 8
+.LEFDE8:
+.LSFDE10:
+ .long .LEFDE10-.LASFDE10
+.LASFDE10:
+ .long .Lframe0
+ .quad .LFB30
+ .quad .LFE30-.LFB30
+ .byte 0x4
+ .long .LCFI14-.LFB30
+ .byte 0x86
+ .uleb128 0x3
+ .byte 0x4
+ .long .LCFI17-.LCFI14
+ .byte 0xe
+ .uleb128 0x20
+ .byte 0x8c
+ .uleb128 0x2
+ .byte 0x83
+ .uleb128 0x4
+ .align 8
+.LEFDE10:
+.LSFDE12:
+ .long .LEFDE12-.LASFDE12
+.LASFDE12:
+ .long .Lframe0
+ .quad .LFB31
+ .quad .LFE31-.LFB31
+ .byte 0x4
+ .long .LCFI18-.LFB31
+ .byte 0x83
+ .uleb128 0x5
+ .byte 0x4
+ .long .LCFI21-.LCFI18
+ .byte 0x8d
+ .uleb128 0x2
+ .byte 0x8c
+ .uleb128 0x3
+ .byte 0x86
+ .uleb128 0x4
+ .byte 0x4
+ .long .LCFI22-.LCFI21
+ .byte 0xe
+ .uleb128 0x30
+ .align 8
+.LEFDE12:
+.LSFDE14:
+ .long .LEFDE14-.LASFDE14
+.LASFDE14:
+ .long .Lframe0
+ .quad .LFB32
+ .quad .LFE32-.LFB32
+ .byte 0x4
+ .long .LCFI23-.LFB32
+ .byte 0xe
+ .uleb128 0x10
+ .byte 0x83
+ .uleb128 0x2
+ .align 8
+.LEFDE14:
+.LSFDE16:
+ .long .LEFDE16-.LASFDE16
+.LASFDE16:
+ .long .Lframe0
+ .quad .LFB33
+ .quad .LFE33-.LFB33
+ .byte 0x4
+ .long .LCFI24-.LFB33
+ .byte 0xe
+ .uleb128 0x10
+ .byte 0x83
+ .uleb128 0x2
+ .align 8
+.LEFDE16:
+.LSFDE18:
+ .long .LEFDE18-.LASFDE18
+.LASFDE18:
+ .long .Lframe0
+ .quad .LFB34
+ .quad .LFE34-.LFB34
+ .byte 0x4
+ .long .LCFI25-.LFB34
+ .byte 0x86
+ .uleb128 0x2
+ .byte 0x4
+ .long .LCFI27-.LCFI25
+ .byte 0xe
+ .uleb128 0x20
+ .byte 0x83
+ .uleb128 0x3
+ .align 8
+.LEFDE18:
+.LSFDE20:
+ .long .LEFDE20-.LASFDE20
+.LASFDE20:
+ .long .Lframe0
+ .quad .LFB35
+ .quad .LFE35-.LFB35
+ .byte 0x4
+ .long .LCFI28-.LFB35
+ .byte 0xe
+ .uleb128 0x10
+ .byte 0x83
+ .uleb128 0x2
+ .align 8
+.LEFDE20:
+.LSFDE22:
+ .long .LEFDE22-.LASFDE22
+.LASFDE22:
+ .long .Lframe0
+ .quad .LFB36
+ .quad .LFE36-.LFB36
+ .byte 0x4
+ .long .LCFI30-.LFB36
+ .byte 0x86
+ .uleb128 0x6
+ .byte 0x83
+ .uleb128 0x7
+ .byte 0x4
+ .long .LCFI32-.LCFI30
+ .byte 0x8f
+ .uleb128 0x2
+ .byte 0x8e
+ .uleb128 0x3
+ .byte 0x4
+ .long .LCFI35-.LCFI32
+ .byte 0xe
+ .uleb128 0x50
+ .byte 0x8d
+ .uleb128 0x4
+ .byte 0x8c
+ .uleb128 0x5
+ .align 8
+.LEFDE22:
+.LSFDE24:
+ .long .LEFDE24-.LASFDE24
+.LASFDE24:
+ .long .Lframe0
+ .quad .LFB37
+ .quad .LFE37-.LFB37
+ .byte 0x4
+ .long .LCFI36-.LFB37
+ .byte 0xe
+ .uleb128 0x10
+ .byte 0x83
+ .uleb128 0x2
+ .align 8
+.LEFDE24:
+.LSFDE26:
+ .long .LEFDE26-.LASFDE26
+.LASFDE26:
+ .long .Lframe0
+ .quad .LFB38
+ .quad .LFE38-.LFB38
+ .align 8
+.LEFDE26:
+.LSFDE28:
+ .long .LEFDE28-.LASFDE28
+.LASFDE28:
+ .long .Lframe0
+ .quad .LFB39
+ .quad .LFE39-.LFB39
+ .align 8
+.LEFDE28:
+.LSFDE30:
+ .long .LEFDE30-.LASFDE30
+.LASFDE30:
+ .long .Lframe0
+ .quad .LFB40
+ .quad .LFE40-.LFB40
+ .byte 0x4
+ .long .LCFI37-.LFB40
+ .byte 0xe
+ .uleb128 0x10
+ .align 8
+.LEFDE30:
+.LSFDE32:
+ .long .LEFDE32-.LASFDE32
+.LASFDE32:
+ .long .Lframe0
+ .quad .LFB41
+ .quad .LFE41-.LFB41
+ .align 8
+.LEFDE32:
+.LSFDE34:
+ .long .LEFDE34-.LASFDE34
+.LASFDE34:
+ .long .Lframe0
+ .quad .LFB42
+ .quad .LFE42-.LFB42
+ .byte 0x4
+ .long .LCFI38-.LFB42
+ .byte 0xe
+ .uleb128 0x10
+ .align 8
+.LEFDE34:
+.LSFDE36:
+ .long .LEFDE36-.LASFDE36
+.LASFDE36:
+ .long .Lframe0
+ .quad .LFB43
+ .quad .LFE43-.LFB43
+ .byte 0x4
+ .long .LCFI39-.LFB43
+ .byte 0xe
+ .uleb128 0x10
+ .byte 0x83
+ .uleb128 0x2
+ .align 8
+.LEFDE36:
+.LSFDE38:
+ .long .LEFDE38-.LASFDE38
+.LASFDE38:
+ .long .Lframe0
+ .quad .LFB45
+ .quad .LFE45-.LFB45
+ .byte 0x4
+ .long .LCFI41-.LFB45
+ .byte 0x8d
+ .uleb128 0x4
+ .byte 0x83
+ .uleb128 0x7
+ .byte 0x4
+ .long .LCFI43-.LCFI41
+ .byte 0x8f
+ .uleb128 0x2
+ .byte 0x8e
+ .uleb128 0x3
+ .byte 0x4
+ .long .LCFI46-.LCFI43
+ .byte 0xe
+ .uleb128 0x40
+ .byte 0x8c
+ .uleb128 0x5
+ .byte 0x86
+ .uleb128 0x6
+ .align 8
+.LEFDE38:
+.LSFDE40:
+ .long .LEFDE40-.LASFDE40
+.LASFDE40:
+ .long .Lframe0
+ .quad .LFB44
+ .quad .LFE44-.LFB44
+ .byte 0x4
+ .long .LCFI48-.LFB44
+ .byte 0x8c
+ .uleb128 0x5
+ .byte 0x83
+ .uleb128 0x7
+ .byte 0x4
+ .long .LCFI52-.LCFI48
+ .byte 0x86
+ .uleb128 0x6
+ .byte 0x8f
+ .uleb128 0x2
+ .byte 0x8e
+ .uleb128 0x3
+ .byte 0x8d
+ .uleb128 0x4
+ .byte 0x4
+ .long .LCFI53-.LCFI52
+ .byte 0xe
+ .uleb128 0x60
+ .align 8
+.LEFDE40:
+.LSFDE42:
+ .long .LEFDE42-.LASFDE42
+.LASFDE42:
+ .long .Lframe0
+ .quad .LFB46
+ .quad .LFE46-.LFB46
+ .byte 0x4
+ .long .LCFI55-.LFB46
+ .byte 0x86
+ .uleb128 0x5
+ .byte 0x83
+ .uleb128 0x6
+ .byte 0x4
+ .long .LCFI59-.LCFI55
+ .byte 0xe
+ .uleb128 0x30
+ .byte 0x8c
+ .uleb128 0x4
+ .byte 0x8e
+ .uleb128 0x2
+ .byte 0x8d
+ .uleb128 0x3
+ .align 8
+.LEFDE42:
+.LSFDE44:
+ .long .LEFDE44-.LASFDE44
+.LASFDE44:
+ .long .Lframe0
+ .quad .LFB47
+ .quad .LFE47-.LFB47
+ .byte 0x4
+ .long .LCFI61-.LFB47
+ .byte 0x86
+ .uleb128 0x3
+ .byte 0x83
+ .uleb128 0x4
+ .byte 0x4
+ .long .LCFI63-.LCFI61
+ .byte 0xe
+ .uleb128 0x20
+ .byte 0x8c
+ .uleb128 0x2
+ .align 8
+.LEFDE44:
+.LSFDE46:
+ .long .LEFDE46-.LASFDE46
+.LASFDE46:
+ .long .Lframe0
+ .quad .LFB48
+ .quad .LFE48-.LFB48
+ .byte 0x4
+ .long .LCFI65-.LFB48
+ .byte 0x8c
+ .uleb128 0x2
+ .byte 0x86
+ .uleb128 0x3
+ .byte 0x4
+ .long .LCFI67-.LCFI65
+ .byte 0xe
+ .uleb128 0x20
+ .byte 0x83
+ .uleb128 0x4
+ .align 8
+.LEFDE46:
+.LSFDE48:
+ .long .LEFDE48-.LASFDE48
+.LASFDE48:
+ .long .Lframe0
+ .quad .LFB50
+ .quad .LFE50-.LFB50
+ .byte 0x4
+ .long .LCFI68-.LFB50
+ .byte 0xe
+ .uleb128 0x10
+ .byte 0x4
+ .long .LCFI69-.LCFI68
+ .byte 0xe
+ .uleb128 0x18
+ .byte 0x4
+ .long .LCFI70-.LCFI69
+ .byte 0xe
+ .uleb128 0x20
+ .byte 0x4
+ .long .LCFI71-.LCFI70
+ .byte 0xe
+ .uleb128 0x28
+ .byte 0x4
+ .long .LCFI72-.LCFI71
+ .byte 0xe
+ .uleb128 0x30
+ .byte 0x4
+ .long .LCFI73-.LCFI72
+ .byte 0xe
+ .uleb128 0x38
+ .byte 0x4
+ .long .LCFI74-.LCFI73
+ .byte 0xe
+ .uleb128 0xe0
+ .byte 0x83
+ .uleb128 0x7
+ .byte 0x86
+ .uleb128 0x6
+ .byte 0x8c
+ .uleb128 0x5
+ .byte 0x8d
+ .uleb128 0x4
+ .byte 0x8e
+ .uleb128 0x3
+ .byte 0x8f
+ .uleb128 0x2
+ .align 8
+.LEFDE48:
+ .section .eh_frame,"a",@progbits
+.Lframe1:
+ .long .LECIE1-.LSCIE1
+.LSCIE1:
+ .long 0x0
+ .byte 0x1
+ .string ""
+ .uleb128 0x1
+ .sleb128 -8
+ .byte 0x10
+ .byte 0xc
+ .uleb128 0x7
+ .uleb128 0x8
+ .byte 0x90
+ .uleb128 0x1
+ .align 8
+.LECIE1:
+.LSFDE1:
+ .long .LEFDE1-.LASFDE1
+.LASFDE1:
+ .long .LASFDE1-.Lframe1
+ .quad .LFB25
+ .quad .LFE25-.LFB25
+ .byte 0x4
+ .long .LCFI0-.LFB25
+ .byte 0xe
+ .uleb128 0x10
+ .align 8
+.LEFDE1:
+.LSFDE3:
+ .long .LEFDE3-.LASFDE3
+.LASFDE3:
+ .long .LASFDE3-.Lframe1
+ .quad .LFB26
+ .quad .LFE26-.LFB26
+ .byte 0x4
+ .long .LCFI1-.LFB26
+ .byte 0xe
+ .uleb128 0x10
+ .align 8
+.LEFDE3:
+.LSFDE5:
+ .long .LEFDE5-.LASFDE5
+.LASFDE5:
+ .long .LASFDE5-.Lframe1
+ .quad .LFB27
+ .quad .LFE27-.LFB27
+ .byte 0x4
+ .long .LCFI3-.LFB27
+ .byte 0x86
+ .uleb128 0x3
+ .byte 0x83
+ .uleb128 0x4
+ .byte 0x4
+ .long .LCFI5-.LCFI3
+ .byte 0xe
+ .uleb128 0x20
+ .byte 0x8c
+ .uleb128 0x2
+ .align 8
+.LEFDE5:
+.LSFDE7:
+ .long .LEFDE7-.LASFDE7
+.LASFDE7:
+ .long .LASFDE7-.Lframe1
+ .quad .LFB28
+ .quad .LFE28-.LFB28
+ .byte 0x4
+ .long .LCFI6-.LFB28
+ .byte 0x86
+ .uleb128 0x3
+ .byte 0x4
+ .long .LCFI9-.LCFI6
+ .byte 0xe
+ .uleb128 0x20
+ .byte 0x8c
+ .uleb128 0x2
+ .byte 0x83
+ .uleb128 0x4
+ .align 8
+.LEFDE7:
+.LSFDE9:
+ .long .LEFDE9-.LASFDE9
+.LASFDE9:
+ .long .LASFDE9-.Lframe1
+ .quad .LFB29
+ .quad .LFE29-.LFB29
+ .byte 0x4
+ .long .LCFI10-.LFB29
+ .byte 0x86
+ .uleb128 0x3
+ .byte 0x4
+ .long .LCFI13-.LCFI10
+ .byte 0xe
+ .uleb128 0x20
+ .byte 0x8c
+ .uleb128 0x2
+ .byte 0x83
+ .uleb128 0x4
+ .align 8
+.LEFDE9:
+.LSFDE11:
+ .long .LEFDE11-.LASFDE11
+.LASFDE11:
+ .long .LASFDE11-.Lframe1
+ .quad .LFB30
+ .quad .LFE30-.LFB30
+ .byte 0x4
+ .long .LCFI14-.LFB30
+ .byte 0x86
+ .uleb128 0x3
+ .byte 0x4
+ .long .LCFI17-.LCFI14
+ .byte 0xe
+ .uleb128 0x20
+ .byte 0x8c
+ .uleb128 0x2
+ .byte 0x83
+ .uleb128 0x4
+ .align 8
+.LEFDE11:
+.LSFDE13:
+ .long .LEFDE13-.LASFDE13
+.LASFDE13:
+ .long .LASFDE13-.Lframe1
+ .quad .LFB31
+ .quad .LFE31-.LFB31
+ .byte 0x4
+ .long .LCFI18-.LFB31
+ .byte 0x83
+ .uleb128 0x5
+ .byte 0x4
+ .long .LCFI21-.LCFI18
+ .byte 0x8d
+ .uleb128 0x2
+ .byte 0x8c
+ .uleb128 0x3
+ .byte 0x86
+ .uleb128 0x4
+ .byte 0x4
+ .long .LCFI22-.LCFI21
+ .byte 0xe
+ .uleb128 0x30
+ .align 8
+.LEFDE13:
+.LSFDE15:
+ .long .LEFDE15-.LASFDE15
+.LASFDE15:
+ .long .LASFDE15-.Lframe1
+ .quad .LFB32
+ .quad .LFE32-.LFB32
+ .byte 0x4
+ .long .LCFI23-.LFB32
+ .byte 0xe
+ .uleb128 0x10
+ .byte 0x83
+ .uleb128 0x2
+ .align 8
+.LEFDE15:
+.LSFDE17:
+ .long .LEFDE17-.LASFDE17
+.LASFDE17:
+ .long .LASFDE17-.Lframe1
+ .quad .LFB33
+ .quad .LFE33-.LFB33
+ .byte 0x4
+ .long .LCFI24-.LFB33
+ .byte 0xe
+ .uleb128 0x10
+ .byte 0x83
+ .uleb128 0x2
+ .align 8
+.LEFDE17:
+.LSFDE19:
+ .long .LEFDE19-.LASFDE19
+.LASFDE19:
+ .long .LASFDE19-.Lframe1
+ .quad .LFB34
+ .quad .LFE34-.LFB34
+ .byte 0x4
+ .long .LCFI25-.LFB34
+ .byte 0x86
+ .uleb128 0x2
+ .byte 0x4
+ .long .LCFI27-.LCFI25
+ .byte 0xe
+ .uleb128 0x20
+ .byte 0x83
+ .uleb128 0x3
+ .align 8
+.LEFDE19:
+.LSFDE21:
+ .long .LEFDE21-.LASFDE21
+.LASFDE21:
+ .long .LASFDE21-.Lframe1
+ .quad .LFB35
+ .quad .LFE35-.LFB35
+ .byte 0x4
+ .long .LCFI28-.LFB35
+ .byte 0xe
+ .uleb128 0x10
+ .byte 0x83
+ .uleb128 0x2
+ .align 8
+.LEFDE21:
+.LSFDE23:
+ .long .LEFDE23-.LASFDE23
+.LASFDE23:
+ .long .LASFDE23-.Lframe1
+ .quad .LFB36
+ .quad .LFE36-.LFB36
+ .byte 0x4
+ .long .LCFI30-.LFB36
+ .byte 0x86
+ .uleb128 0x6
+ .byte 0x83
+ .uleb128 0x7
+ .byte 0x4
+ .long .LCFI32-.LCFI30
+ .byte 0x8f
+ .uleb128 0x2
+ .byte 0x8e
+ .uleb128 0x3
+ .byte 0x4
+ .long .LCFI35-.LCFI32
+ .byte 0xe
+ .uleb128 0x50
+ .byte 0x8d
+ .uleb128 0x4
+ .byte 0x8c
+ .uleb128 0x5
+ .align 8
+.LEFDE23:
+.LSFDE25:
+ .long .LEFDE25-.LASFDE25
+.LASFDE25:
+ .long .LASFDE25-.Lframe1
+ .quad .LFB37
+ .quad .LFE37-.LFB37
+ .byte 0x4
+ .long .LCFI36-.LFB37
+ .byte 0xe
+ .uleb128 0x10
+ .byte 0x83
+ .uleb128 0x2
+ .align 8
+.LEFDE25:
+.LSFDE27:
+ .long .LEFDE27-.LASFDE27
+.LASFDE27:
+ .long .LASFDE27-.Lframe1
+ .quad .LFB38
+ .quad .LFE38-.LFB38
+ .align 8
+.LEFDE27:
+.LSFDE29:
+ .long .LEFDE29-.LASFDE29
+.LASFDE29:
+ .long .LASFDE29-.Lframe1
+ .quad .LFB39
+ .quad .LFE39-.LFB39
+ .align 8
+.LEFDE29:
+.LSFDE31:
+ .long .LEFDE31-.LASFDE31
+.LASFDE31:
+ .long .LASFDE31-.Lframe1
+ .quad .LFB40
+ .quad .LFE40-.LFB40
+ .byte 0x4
+ .long .LCFI37-.LFB40
+ .byte 0xe
+ .uleb128 0x10
+ .align 8
+.LEFDE31:
+.LSFDE33:
+ .long .LEFDE33-.LASFDE33
+.LASFDE33:
+ .long .LASFDE33-.Lframe1
+ .quad .LFB41
+ .quad .LFE41-.LFB41
+ .align 8
+.LEFDE33:
+.LSFDE35:
+ .long .LEFDE35-.LASFDE35
+.LASFDE35:
+ .long .LASFDE35-.Lframe1
+ .quad .LFB42
+ .quad .LFE42-.LFB42
+ .byte 0x4
+ .long .LCFI38-.LFB42
+ .byte 0xe
+ .uleb128 0x10
+ .align 8
+.LEFDE35:
+.LSFDE37:
+ .long .LEFDE37-.LASFDE37
+.LASFDE37:
+ .long .LASFDE37-.Lframe1
+ .quad .LFB43
+ .quad .LFE43-.LFB43
+ .byte 0x4
+ .long .LCFI39-.LFB43
+ .byte 0xe
+ .uleb128 0x10
+ .byte 0x83
+ .uleb128 0x2
+ .align 8
+.LEFDE37:
+.LSFDE39:
+ .long .LEFDE39-.LASFDE39
+.LASFDE39:
+ .long .LASFDE39-.Lframe1
+ .quad .LFB45
+ .quad .LFE45-.LFB45
+ .byte 0x4
+ .long .LCFI41-.LFB45
+ .byte 0x8d
+ .uleb128 0x4
+ .byte 0x83
+ .uleb128 0x7
+ .byte 0x4
+ .long .LCFI43-.LCFI41
+ .byte 0x8f
+ .uleb128 0x2
+ .byte 0x8e
+ .uleb128 0x3
+ .byte 0x4
+ .long .LCFI46-.LCFI43
+ .byte 0xe
+ .uleb128 0x40
+ .byte 0x8c
+ .uleb128 0x5
+ .byte 0x86
+ .uleb128 0x6
+ .align 8
+.LEFDE39:
+.LSFDE41:
+ .long .LEFDE41-.LASFDE41
+.LASFDE41:
+ .long .LASFDE41-.Lframe1
+ .quad .LFB44
+ .quad .LFE44-.LFB44
+ .byte 0x4
+ .long .LCFI48-.LFB44
+ .byte 0x8c
+ .uleb128 0x5
+ .byte 0x83
+ .uleb128 0x7
+ .byte 0x4
+ .long .LCFI52-.LCFI48
+ .byte 0x86
+ .uleb128 0x6
+ .byte 0x8f
+ .uleb128 0x2
+ .byte 0x8e
+ .uleb128 0x3
+ .byte 0x8d
+ .uleb128 0x4
+ .byte 0x4
+ .long .LCFI53-.LCFI52
+ .byte 0xe
+ .uleb128 0x60
+ .align 8
+.LEFDE41:
+.LSFDE43:
+ .long .LEFDE43-.LASFDE43
+.LASFDE43:
+ .long .LASFDE43-.Lframe1
+ .quad .LFB46
+ .quad .LFE46-.LFB46
+ .byte 0x4
+ .long .LCFI55-.LFB46
+ .byte 0x86
+ .uleb128 0x5
+ .byte 0x83
+ .uleb128 0x6
+ .byte 0x4
+ .long .LCFI59-.LCFI55
+ .byte 0xe
+ .uleb128 0x30
+ .byte 0x8c
+ .uleb128 0x4
+ .byte 0x8e
+ .uleb128 0x2
+ .byte 0x8d
+ .uleb128 0x3
+ .align 8
+.LEFDE43:
+.LSFDE45:
+ .long .LEFDE45-.LASFDE45
+.LASFDE45:
+ .long .LASFDE45-.Lframe1
+ .quad .LFB47
+ .quad .LFE47-.LFB47
+ .byte 0x4
+ .long .LCFI61-.LFB47
+ .byte 0x86
+ .uleb128 0x3
+ .byte 0x83
+ .uleb128 0x4
+ .byte 0x4
+ .long .LCFI63-.LCFI61
+ .byte 0xe
+ .uleb128 0x20
+ .byte 0x8c
+ .uleb128 0x2
+ .align 8
+.LEFDE45:
+.LSFDE47:
+ .long .LEFDE47-.LASFDE47
+.LASFDE47:
+ .long .LASFDE47-.Lframe1
+ .quad .LFB48
+ .quad .LFE48-.LFB48
+ .byte 0x4
+ .long .LCFI65-.LFB48
+ .byte 0x8c
+ .uleb128 0x2
+ .byte 0x86
+ .uleb128 0x3
+ .byte 0x4
+ .long .LCFI67-.LCFI65
+ .byte 0xe
+ .uleb128 0x20
+ .byte 0x83
+ .uleb128 0x4
+ .align 8
+.LEFDE47:
+.LSFDE49:
+ .long .LEFDE49-.LASFDE49
+.LASFDE49:
+ .long .LASFDE49-.Lframe1
+ .quad .LFB50
+ .quad .LFE50-.LFB50
+ .byte 0x4
+ .long .LCFI68-.LFB50
+ .byte 0xe
+ .uleb128 0x10
+ .byte 0x4
+ .long .LCFI69-.LCFI68
+ .byte 0xe
+ .uleb128 0x18
+ .byte 0x4
+ .long .LCFI70-.LCFI69
+ .byte 0xe
+ .uleb128 0x20
+ .byte 0x4
+ .long .LCFI71-.LCFI70
+ .byte 0xe
+ .uleb128 0x28
+ .byte 0x4
+ .long .LCFI72-.LCFI71
+ .byte 0xe
+ .uleb128 0x30
+ .byte 0x4
+ .long .LCFI73-.LCFI72
+ .byte 0xe
+ .uleb128 0x38
+ .byte 0x4
+ .long .LCFI74-.LCFI73
+ .byte 0xe
+ .uleb128 0xe0
+ .byte 0x83
+ .uleb128 0x7
+ .byte 0x86
+ .uleb128 0x6
+ .byte 0x8c
+ .uleb128 0x5
+ .byte 0x8d
+ .uleb128 0x4
+ .byte 0x8e
+ .uleb128 0x3
+ .byte 0x8f
+ .uleb128 0x2
+ .align 8
+.LEFDE49:
+ .file 3 "./libyasm/coretype.h"
+ .file 4 "./libyasm/bitvect.h"
+ .file 5 "/usr/lib/gcc/x86_64-linux-gnu/4.0.2/include/stddef.h"
+ .file 6 "/usr/include/stdio.h"
+ .file 7 "/usr/include/libio.h"
+ .file 8 "/usr/include/bits/types.h"
+ .file 9 "./libyasm/errwarn.h"
+ .text
+.Letext0:
+ .section .debug_loc,"",@progbits
+.Ldebug_loc0:
+.LLST0:
+ .quad .LVL0-.Ltext0
+ .quad .LVL1-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad .LVL1-.Ltext0
+ .quad .LVL2-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL2-.Ltext0
+ .quad .LFE25-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad 0x0
+ .quad 0x0
+.LLST1:
+ .quad .LVL3-.Ltext0
+ .quad .LVL4-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad .LVL4-.Ltext0
+ .quad .LVL5-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL5-.Ltext0
+ .quad .LFE26-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad 0x0
+ .quad 0x0
+.LLST2:
+ .quad .LVL6-.Ltext0
+ .quad .LVL8-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL8-.Ltext0
+ .quad .LVL16-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL16-.Ltext0
+ .quad .LVL17-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL17-.Ltext0
+ .quad .LVL21-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL21-.Ltext0
+ .quad .LVL22-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL22-.Ltext0
+ .quad .LFE27-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad 0x0
+ .quad 0x0
+.LLST3:
+ .quad .LVL6-.Ltext0
+ .quad .LVL7-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL7-.Ltext0
+ .quad .LVL13-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL17-.Ltext0
+ .quad .LVL18-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL22-.Ltext0
+ .quad .LFE27-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad 0x0
+ .quad 0x0
+.LLST4:
+ .quad .LVL6-.Ltext0
+ .quad .LVL9-.Ltext0
+ .value 0x1
+ .byte 0x54
+ .quad .LVL9-.Ltext0
+ .quad .LVL15-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad .LVL17-.Ltext0
+ .quad .LVL20-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad .LVL22-.Ltext0
+ .quad .LFE27-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad 0x0
+ .quad 0x0
+.LLST5:
+ .quad .LVL10-.Ltext0
+ .quad .LVL11-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL12-.Ltext0
+ .quad .LVL14-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL17-.Ltext0
+ .quad .LVL19-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL22-.Ltext0
+ .quad .LFE27-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad 0x0
+ .quad 0x0
+.LLST6:
+ .quad .LVL23-.Ltext0
+ .quad .LVL25-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL25-.Ltext0
+ .quad .LVL31-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL31-.Ltext0
+ .quad .LVL32-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL32-.Ltext0
+ .quad .LVL36-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL36-.Ltext0
+ .quad .LVL37-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL37-.Ltext0
+ .quad .LFE28-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad 0x0
+ .quad 0x0
+.LLST7:
+ .quad .LVL23-.Ltext0
+ .quad .LVL24-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL24-.Ltext0
+ .quad .LVL28-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL32-.Ltext0
+ .quad .LVL33-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL37-.Ltext0
+ .quad .LFE28-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad 0x0
+ .quad 0x0
+.LLST8:
+ .quad .LVL23-.Ltext0
+ .quad .LVL26-.Ltext0
+ .value 0x1
+ .byte 0x54
+ .quad .LVL26-.Ltext0
+ .quad .LVL30-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad .LVL32-.Ltext0
+ .quad .LVL35-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad .LVL37-.Ltext0
+ .quad .LFE28-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad 0x0
+ .quad 0x0
+.LLST9:
+ .quad .LVL27-.Ltext0
+ .quad .LVL29-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL32-.Ltext0
+ .quad .LVL34-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL37-.Ltext0
+ .quad .LFE28-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad 0x0
+ .quad 0x0
+.LLST10:
+ .quad .LVL38-.Ltext0
+ .quad .LVL40-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL40-.Ltext0
+ .quad .LVL46-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL46-.Ltext0
+ .quad .LVL47-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL47-.Ltext0
+ .quad .LVL51-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL51-.Ltext0
+ .quad .LVL52-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL52-.Ltext0
+ .quad .LFE29-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad 0x0
+ .quad 0x0
+.LLST11:
+ .quad .LVL38-.Ltext0
+ .quad .LVL39-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL39-.Ltext0
+ .quad .LVL43-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL47-.Ltext0
+ .quad .LVL48-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL52-.Ltext0
+ .quad .LFE29-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad 0x0
+ .quad 0x0
+.LLST12:
+ .quad .LVL38-.Ltext0
+ .quad .LVL41-.Ltext0
+ .value 0x1
+ .byte 0x54
+ .quad .LVL41-.Ltext0
+ .quad .LVL45-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad .LVL47-.Ltext0
+ .quad .LVL50-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad .LVL52-.Ltext0
+ .quad .LFE29-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad 0x0
+ .quad 0x0
+.LLST13:
+ .quad .LVL42-.Ltext0
+ .quad .LVL44-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL47-.Ltext0
+ .quad .LVL49-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL52-.Ltext0
+ .quad .LFE29-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad 0x0
+ .quad 0x0
+.LLST14:
+ .quad .LVL53-.Ltext0
+ .quad .LVL55-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL55-.Ltext0
+ .quad .LVL61-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL61-.Ltext0
+ .quad .LVL62-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL62-.Ltext0
+ .quad .LVL66-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL66-.Ltext0
+ .quad .LVL67-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL67-.Ltext0
+ .quad .LFE30-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad 0x0
+ .quad 0x0
+.LLST15:
+ .quad .LVL53-.Ltext0
+ .quad .LVL54-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL54-.Ltext0
+ .quad .LVL58-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL62-.Ltext0
+ .quad .LVL63-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL67-.Ltext0
+ .quad .LFE30-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad 0x0
+ .quad 0x0
+.LLST16:
+ .quad .LVL53-.Ltext0
+ .quad .LVL56-.Ltext0
+ .value 0x1
+ .byte 0x54
+ .quad .LVL56-.Ltext0
+ .quad .LVL60-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad .LVL62-.Ltext0
+ .quad .LVL65-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad .LVL67-.Ltext0
+ .quad .LFE30-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad 0x0
+ .quad 0x0
+.LLST17:
+ .quad .LVL57-.Ltext0
+ .quad .LVL59-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL62-.Ltext0
+ .quad .LVL64-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL67-.Ltext0
+ .quad .LFE30-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad 0x0
+ .quad 0x0
+.LLST18:
+ .quad .LVL68-.Ltext0
+ .quad .LVL69-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -40
+ .quad .LVL69-.Ltext0
+ .quad .LVL84-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL84-.Ltext0
+ .quad .LVL85-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -40
+ .quad .LVL85-.Ltext0
+ .quad .LFE31-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad 0x0
+ .quad 0x0
+.LLST19:
+ .quad .LVL68-.Ltext0
+ .quad .LVL70-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL70-.Ltext0
+ .quad .LVL81-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL85-.Ltext0
+ .quad .LVL87-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL88-.Ltext0
+ .quad .LFE31-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad 0x0
+ .quad 0x0
+.LLST20:
+ .quad .LVL68-.Ltext0
+ .quad .LVL71-.Ltext0
+ .value 0x1
+ .byte 0x54
+ .quad .LVL71-.Ltext0
+ .quad .LVL82-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL85-.Ltext0
+ .quad .LVL86-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL88-.Ltext0
+ .quad .LFE31-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad 0x0
+ .quad 0x0
+.LLST21:
+ .quad .LVL72-.Ltext0
+ .quad .LVL83-.Ltext0
+ .value 0x1
+ .byte 0x5d
+ .quad .LVL85-.Ltext0
+ .quad .LFE31-.Ltext0
+ .value 0x1
+ .byte 0x5d
+ .quad 0x0
+ .quad 0x0
+.LLST22:
+ .quad .LVL73-.Ltext0
+ .quad .LVL74-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL75-.Ltext0
+ .quad .LVL76-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL77-.Ltext0
+ .quad .LVL78-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL79-.Ltext0
+ .quad .LVL80-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL88-.Ltext0
+ .quad .LFE31-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad 0x0
+ .quad 0x0
+.LLST23:
+ .quad .LVL89-.Ltext0
+ .quad .LVL90-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad .LVL90-.Ltext0
+ .quad .LVL92-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL92-.Ltext0
+ .quad .LFE32-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad 0x0
+ .quad 0x0
+.LLST24:
+ .quad .LVL89-.Ltext0
+ .quad .LVL91-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL91-.Ltext0
+ .quad .LVL92-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad 0x0
+ .quad 0x0
+.LLST25:
+ .quad .LVL93-.Ltext0
+ .quad .LVL94-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad .LVL94-.Ltext0
+ .quad .LVL96-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL96-.Ltext0
+ .quad .LVL97-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad .LVL97-.Ltext0
+ .quad .LVL99-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL99-.Ltext0
+ .quad .LFE33-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad 0x0
+ .quad 0x0
+.LLST26:
+ .quad .LVL93-.Ltext0
+ .quad .LVL95-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL95-.Ltext0
+ .quad .LVL96-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL96-.Ltext0
+ .quad .LVL97-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL97-.Ltext0
+ .quad .LVL98-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad 0x0
+ .quad 0x0
+.LLST27:
+ .quad .LVL100-.Ltext0
+ .quad .LVL102-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL102-.Ltext0
+ .quad .LVL106-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL106-.Ltext0
+ .quad .LVL107-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL107-.Ltext0
+ .quad .LVL110-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL110-.Ltext0
+ .quad .LVL111-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL111-.Ltext0
+ .quad .LVL114-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL114-.Ltext0
+ .quad .LFE34-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad 0x0
+ .quad 0x0
+.LLST28:
+ .quad .LVL100-.Ltext0
+ .quad .LVL101-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL101-.Ltext0
+ .quad .LVL104-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL107-.Ltext0
+ .quad .LVL108-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL111-.Ltext0
+ .quad .LVL112-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad 0x0
+ .quad 0x0
+.LLST29:
+ .quad .LVL103-.Ltext0
+ .quad .LVL105-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL107-.Ltext0
+ .quad .LVL109-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL111-.Ltext0
+ .quad .LVL113-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad 0x0
+ .quad 0x0
+.LLST30:
+ .quad .LVL115-.Ltext0
+ .quad .LVL116-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad .LVL116-.Ltext0
+ .quad .LVL118-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL118-.Ltext0
+ .quad .LVL120-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad .LVL120-.Ltext0
+ .quad .LVL121-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL121-.Ltext0
+ .quad .LFE35-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad 0x0
+ .quad 0x0
+.LLST31:
+ .quad .LVL115-.Ltext0
+ .quad .LVL117-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL117-.Ltext0
+ .quad .LVL118-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL118-.Ltext0
+ .quad .LVL119-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL120-.Ltext0
+ .quad .LVL121-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL121-.Ltext0
+ .quad .LVL122-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad 0x0
+ .quad 0x0
+.LLST32:
+ .quad .LVL123-.Ltext0
+ .quad .LVL124-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -72
+ .quad .LVL124-.Ltext0
+ .quad .LVL139-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL139-.Ltext0
+ .quad .LVL140-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -72
+ .quad .LVL140-.Ltext0
+ .quad .LFE36-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad 0x0
+ .quad 0x0
+.LLST33:
+ .quad .LVL123-.Ltext0
+ .quad .LVL128-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL128-.Ltext0
+ .quad .LVL137-.Ltext0
+ .value 0x1
+ .byte 0x5e
+ .quad .LVL140-.Ltext0
+ .quad .LVL142-.Ltext0
+ .value 0x1
+ .byte 0x5e
+ .quad .LVL142-.Ltext0
+ .quad .LVL144-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL144-.Ltext0
+ .quad .LFE36-.Ltext0
+ .value 0x1
+ .byte 0x5e
+ .quad 0x0
+ .quad 0x0
+.LLST34:
+ .quad .LVL123-.Ltext0
+ .quad .LVL126-.Ltext0
+ .value 0x1
+ .byte 0x54
+ .quad .LVL126-.Ltext0
+ .quad .LVL134-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL140-.Ltext0
+ .quad .LVL145-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL145-.Ltext0
+ .quad .LVL146-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL146-.Ltext0
+ .quad .LVL147-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL147-.Ltext0
+ .quad .LVL148-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL148-.Ltext0
+ .quad .LVL149-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL149-.Ltext0
+ .quad .LVL150-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL150-.Ltext0
+ .quad .LVL151-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL151-.Ltext0
+ .quad .LVL152-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL152-.Ltext0
+ .quad .LVL153-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL153-.Ltext0
+ .quad .LVL154-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL154-.Ltext0
+ .quad .LVL155-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL155-.Ltext0
+ .quad .LVL156-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL156-.Ltext0
+ .quad .LVL157-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL157-.Ltext0
+ .quad .LVL158-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL158-.Ltext0
+ .quad .LVL159-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL159-.Ltext0
+ .quad .LVL160-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL160-.Ltext0
+ .quad .LVL161-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL161-.Ltext0
+ .quad .LVL162-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL162-.Ltext0
+ .quad .LVL163-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL163-.Ltext0
+ .quad .LVL164-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL164-.Ltext0
+ .quad .LVL165-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL165-.Ltext0
+ .quad .LVL166-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL166-.Ltext0
+ .quad .LVL167-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL167-.Ltext0
+ .quad .LVL168-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL168-.Ltext0
+ .quad .LVL169-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL169-.Ltext0
+ .quad .LVL170-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL170-.Ltext0
+ .quad .LVL171-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL171-.Ltext0
+ .quad .LVL172-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL172-.Ltext0
+ .quad .LVL173-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL173-.Ltext0
+ .quad .LVL174-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL174-.Ltext0
+ .quad .LVL175-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL175-.Ltext0
+ .quad .LVL176-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL176-.Ltext0
+ .quad .LVL177-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL177-.Ltext0
+ .quad .LVL178-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL178-.Ltext0
+ .quad .LVL179-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL179-.Ltext0
+ .quad .LVL180-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL180-.Ltext0
+ .quad .LVL181-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL181-.Ltext0
+ .quad .LVL182-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL182-.Ltext0
+ .quad .LVL183-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL183-.Ltext0
+ .quad .LVL184-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL184-.Ltext0
+ .quad .LVL185-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL185-.Ltext0
+ .quad .LVL186-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL186-.Ltext0
+ .quad .LVL187-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL187-.Ltext0
+ .quad .LVL188-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL188-.Ltext0
+ .quad .LVL189-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL189-.Ltext0
+ .quad .LVL190-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL190-.Ltext0
+ .quad .LVL191-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL191-.Ltext0
+ .quad .LVL192-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL192-.Ltext0
+ .quad .LVL193-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL193-.Ltext0
+ .quad .LVL194-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL194-.Ltext0
+ .quad .LVL195-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL195-.Ltext0
+ .quad .LVL196-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL196-.Ltext0
+ .quad .LFE36-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad 0x0
+ .quad 0x0
+.LLST35:
+ .quad .LVL123-.Ltext0
+ .quad .LVL126-.Ltext0
+ .value 0x1
+ .byte 0x51
+ .quad .LVL126-.Ltext0
+ .quad .LVL133-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL140-.Ltext0
+ .quad .LFE36-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad 0x0
+ .quad 0x0
+.LLST36:
+ .quad .LVL123-.Ltext0
+ .quad .LVL126-.Ltext0
+ .value 0x1
+ .byte 0x52
+ .quad .LVL126-.Ltext0
+ .quad .LVL138-.Ltext0
+ .value 0x1
+ .byte 0x5f
+ .quad .LVL140-.Ltext0
+ .quad .LFE36-.Ltext0
+ .value 0x1
+ .byte 0x5f
+ .quad 0x0
+ .quad 0x0
+.LLST37:
+ .quad .LVL127-.Ltext0
+ .quad .LVL135-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad .LVL140-.Ltext0
+ .quad .LVL142-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad .LVL143-.Ltext0
+ .quad .LFE36-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad 0x0
+ .quad 0x0
+.LLST38:
+ .quad .LVL130-.Ltext0
+ .quad .LVL136-.Ltext0
+ .value 0x1
+ .byte 0x5d
+ .quad .LVL140-.Ltext0
+ .quad .LVL142-.Ltext0
+ .value 0x1
+ .byte 0x5d
+ .quad .LVL144-.Ltext0
+ .quad .LFE36-.Ltext0
+ .value 0x1
+ .byte 0x5d
+ .quad 0x0
+ .quad 0x0
+.LLST39:
+ .quad .LVL198-.Ltext0
+ .quad .LVL199-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad .LVL199-.Ltext0
+ .quad .LVL201-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL201-.Ltext0
+ .quad .LVL202-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad .LVL202-.Ltext0
+ .quad .LVL203-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL203-.Ltext0
+ .quad .LFE37-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad 0x0
+ .quad 0x0
+.LLST40:
+ .quad .LVL198-.Ltext0
+ .quad .LVL200-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL200-.Ltext0
+ .quad .LVL201-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL201-.Ltext0
+ .quad .LVL202-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL202-.Ltext0
+ .quad .LVL203-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad 0x0
+ .quad 0x0
+.LLST41:
+ .quad .LVL206-.Ltext0
+ .quad .LVL207-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad .LVL207-.Ltext0
+ .quad .LVL208-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL208-.Ltext0
+ .quad .LVL209-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad .LVL209-.Ltext0
+ .quad .LVL211-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL211-.Ltext0
+ .quad .LFE40-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad 0x0
+ .quad 0x0
+.LLST42:
+ .quad .LVL206-.Ltext0
+ .quad .LVL210-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad 0x0
+ .quad 0x0
+.LLST43:
+ .quad .LVL212-.Ltext0
+ .quad .LVL213-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad 0x0
+ .quad 0x0
+.LLST44:
+ .quad .LVL214-.Ltext0
+ .quad .LVL215-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad .LVL215-.Ltext0
+ .quad .LVL217-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL217-.Ltext0
+ .quad .LVL218-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad .LVL218-.Ltext0
+ .quad .LVL219-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL219-.Ltext0
+ .quad .LVL220-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad .LVL220-.Ltext0
+ .quad .LVL222-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL222-.Ltext0
+ .quad .LFE42-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad 0x0
+ .quad 0x0
+.LLST45:
+ .quad .LVL214-.Ltext0
+ .quad .LVL216-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL218-.Ltext0
+ .quad .LVL221-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad 0x0
+ .quad 0x0
+.LLST46:
+ .quad .LVL223-.Ltext0
+ .quad .LVL224-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad .LVL224-.Ltext0
+ .quad .LVL227-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL227-.Ltext0
+ .quad .LVL228-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad .LVL228-.Ltext0
+ .quad .LVL229-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL229-.Ltext0
+ .quad .LVL230-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad .LVL230-.Ltext0
+ .quad .LVL232-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL232-.Ltext0
+ .quad .LVL234-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad .LVL234-.Ltext0
+ .quad .LVL236-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL236-.Ltext0
+ .quad .LFE43-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -8
+ .quad 0x0
+ .quad 0x0
+.LLST47:
+ .quad .LVL223-.Ltext0
+ .quad .LVL225-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL225-.Ltext0
+ .quad .LVL227-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL227-.Ltext0
+ .quad .LVL228-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL228-.Ltext0
+ .quad .LVL229-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL229-.Ltext0
+ .quad .LVL230-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL230-.Ltext0
+ .quad .LVL232-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL234-.Ltext0
+ .quad .LVL236-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad 0x0
+ .quad 0x0
+.LLST48:
+ .quad .LVL238-.Ltext0
+ .quad .LVL239-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -56
+ .quad .LVL239-.Ltext0
+ .quad .LVL254-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL254-.Ltext0
+ .quad .LVL255-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -56
+ .quad .LVL255-.Ltext0
+ .quad .LFE45-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad 0x0
+ .quad 0x0
+.LLST49:
+ .quad .LVL238-.Ltext0
+ .quad .LVL242-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL242-.Ltext0
+ .quad .LVL249-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL249-.Ltext0
+ .quad .LVL255-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL255-.Ltext0
+ .quad .LVL256-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL258-.Ltext0
+ .quad .LVL261-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL261-.Ltext0
+ .quad .LVL263-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL263-.Ltext0
+ .quad .LVL265-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL265-.Ltext0
+ .quad .LFE45-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad 0x0
+ .quad 0x0
+.LLST50:
+ .quad .LVL238-.Ltext0
+ .quad .LVL240-.Ltext0
+ .value 0x1
+ .byte 0x54
+ .quad .LVL240-.Ltext0
+ .quad .LVL252-.Ltext0
+ .value 0x1
+ .byte 0x5e
+ .quad .LVL252-.Ltext0
+ .quad .LVL255-.Ltext0
+ .value 0x1
+ .byte 0x54
+ .quad .LVL255-.Ltext0
+ .quad .LFE45-.Ltext0
+ .value 0x1
+ .byte 0x5e
+ .quad 0x0
+ .quad 0x0
+.LLST51:
+ .quad .LVL238-.Ltext0
+ .quad .LVL240-.Ltext0
+ .value 0x1
+ .byte 0x51
+ .quad .LVL240-.Ltext0
+ .quad .LVL251-.Ltext0
+ .value 0x1
+ .byte 0x5d
+ .quad .LVL251-.Ltext0
+ .quad .LVL255-.Ltext0
+ .value 0x1
+ .byte 0x51
+ .quad .LVL255-.Ltext0
+ .quad .LVL259-.Ltext0
+ .value 0x1
+ .byte 0x5d
+ .quad .LVL259-.Ltext0
+ .quad .LVL261-.Ltext0
+ .value 0x1
+ .byte 0x51
+ .quad .LVL261-.Ltext0
+ .quad .LVL263-.Ltext0
+ .value 0x1
+ .byte 0x5d
+ .quad .LVL263-.Ltext0
+ .quad .LVL266-.Ltext0
+ .value 0x1
+ .byte 0x51
+ .quad .LVL266-.Ltext0
+ .quad .LFE45-.Ltext0
+ .value 0x1
+ .byte 0x5d
+ .quad 0x0
+ .quad 0x0
+.LLST52:
+ .quad .LVL238-.Ltext0
+ .quad .LVL240-.Ltext0
+ .value 0x1
+ .byte 0x52
+ .quad .LVL240-.Ltext0
+ .quad .LVL253-.Ltext0
+ .value 0x1
+ .byte 0x5f
+ .quad .LVL253-.Ltext0
+ .quad .LVL255-.Ltext0
+ .value 0x1
+ .byte 0x52
+ .quad .LVL255-.Ltext0
+ .quad .LFE45-.Ltext0
+ .value 0x1
+ .byte 0x5f
+ .quad 0x0
+ .quad 0x0
+.LLST53:
+ .quad .LVL241-.Ltext0
+ .quad .LVL250-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL255-.Ltext0
+ .quad .LVL258-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL260-.Ltext0
+ .quad .LVL263-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL264-.Ltext0
+ .quad .LFE45-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad 0x0
+ .quad 0x0
+.LLST54:
+ .quad .LVL244-.Ltext0
+ .quad .LVL245-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL246-.Ltext0
+ .quad .LVL247-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL248-.Ltext0
+ .quad .LVL250-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL255-.Ltext0
+ .quad .LVL257-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL262-.Ltext0
+ .quad .LVL263-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad 0x0
+ .quad 0x0
+.LLST55:
+ .quad .LVL267-.Ltext0
+ .quad .LVL269-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -88
+ .quad .LVL269-.Ltext0
+ .quad .LVL283-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL283-.Ltext0
+ .quad .LVL284-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -88
+ .quad .LVL284-.Ltext0
+ .quad .LFE44-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad 0x0
+ .quad 0x0
+.LLST56:
+ .quad .LVL267-.Ltext0
+ .quad .LVL271-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL271-.Ltext0
+ .quad .LVL274-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL284-.Ltext0
+ .quad .LVL286-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL288-.Ltext0
+ .quad .LVL291-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL293-.Ltext0
+ .quad .LFE44-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad 0x0
+ .quad 0x0
+.LLST57:
+ .quad .LVL267-.Ltext0
+ .quad .LVL271-.Ltext0
+ .value 0x1
+ .byte 0x54
+ .quad .LVL271-.Ltext0
+ .quad .LFE44-.Ltext0
+ .value 0x2
+ .byte 0x91
+ .sleb128 16
+ .quad 0x0
+ .quad 0x0
+.LLST58:
+ .quad .LVL267-.Ltext0
+ .quad .LVL271-.Ltext0
+ .value 0x1
+ .byte 0x51
+ .quad .LVL271-.Ltext0
+ .quad .LVL281-.Ltext0
+ .value 0x1
+ .byte 0x5e
+ .quad .LVL284-.Ltext0
+ .quad .LFE44-.Ltext0
+ .value 0x1
+ .byte 0x5e
+ .quad 0x0
+ .quad 0x0
+.LLST59:
+ .quad .LVL267-.Ltext0
+ .quad .LVL271-.Ltext0
+ .value 0x1
+ .byte 0x52
+ .quad .LVL271-.Ltext0
+ .quad .LVL276-.Ltext0
+ .value 0x2
+ .byte 0x91
+ .sleb128 8
+ .quad .LVL284-.Ltext0
+ .quad .LVL287-.Ltext0
+ .value 0x2
+ .byte 0x91
+ .sleb128 8
+ .quad .LVL288-.Ltext0
+ .quad .LFE44-.Ltext0
+ .value 0x2
+ .byte 0x91
+ .sleb128 8
+ .quad 0x0
+ .quad 0x0
+.LLST60:
+ .quad .LVL267-.Ltext0
+ .quad .LVL272-.Ltext0
+ .value 0x1
+ .byte 0x58
+ .quad .LVL272-.Ltext0
+ .quad .LVL279-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad .LVL284-.Ltext0
+ .quad .LVL289-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad .LVL289-.Ltext0
+ .quad .LVL290-.Ltext0
+ .value 0x1
+ .byte 0x58
+ .quad .LVL290-.Ltext0
+ .quad .LVL292-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad .LVL293-.Ltext0
+ .quad .LFE44-.Ltext0
+ .value 0x1
+ .byte 0x58
+ .quad 0x0
+ .quad 0x0
+.LLST61:
+ .quad .LVL267-.Ltext0
+ .quad .LVL271-.Ltext0
+ .value 0x1
+ .byte 0x59
+ .quad .LVL271-.Ltext0
+ .quad .LFE44-.Ltext0
+ .value 0x2
+ .byte 0x91
+ .sleb128 4
+ .quad 0x0
+ .quad 0x0
+.LLST62:
+ .quad .LVL270-.Ltext0
+ .quad .LVL280-.Ltext0
+ .value 0x1
+ .byte 0x5d
+ .quad .LVL284-.Ltext0
+ .quad .LFE44-.Ltext0
+ .value 0x1
+ .byte 0x5d
+ .quad 0x0
+ .quad 0x0
+.LLST63:
+ .quad .LVL273-.Ltext0
+ .quad .LVL278-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL285-.Ltext0
+ .quad .LVL288-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL291-.Ltext0
+ .quad .LVL293-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad 0x0
+ .quad 0x0
+.LLST64:
+ .quad .LVL275-.Ltext0
+ .quad .LVL277-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL287-.Ltext0
+ .quad .LVL288-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad 0x0
+ .quad 0x0
+.LLST65:
+ .quad .LVL268-.Ltext0
+ .quad .LVL282-.Ltext0
+ .value 0x1
+ .byte 0x5f
+ .quad .LVL284-.Ltext0
+ .quad .LFE44-.Ltext0
+ .value 0x1
+ .byte 0x5f
+ .quad 0x0
+ .quad 0x0
+.LLST66:
+ .quad .LVL294-.Ltext0
+ .quad .LVL295-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -40
+ .quad .LVL295-.Ltext0
+ .quad .LVL309-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL309-.Ltext0
+ .quad .LVL310-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -40
+ .quad .LVL310-.Ltext0
+ .quad .LFE46-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad 0x0
+ .quad 0x0
+.LLST67:
+ .quad .LVL294-.Ltext0
+ .quad .LVL298-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL298-.Ltext0
+ .quad .LVL301-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL303-.Ltext0
+ .quad .LVL311-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL311-.Ltext0
+ .quad .LVL312-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL315-.Ltext0
+ .quad .LVL316-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL316-.Ltext0
+ .quad .LFE46-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad 0x0
+ .quad 0x0
+.LLST68:
+ .quad .LVL294-.Ltext0
+ .quad .LVL297-.Ltext0
+ .value 0x1
+ .byte 0x54
+ .quad .LVL297-.Ltext0
+ .quad .LVL301-.Ltext0
+ .value 0x1
+ .byte 0x5e
+ .quad .LVL301-.Ltext0
+ .quad .LVL303-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL303-.Ltext0
+ .quad .LVL304-.Ltext0
+ .value 0x1
+ .byte 0x5e
+ .quad .LVL308-.Ltext0
+ .quad .LVL310-.Ltext0
+ .value 0x1
+ .byte 0x54
+ .quad .LVL310-.Ltext0
+ .quad .LVL312-.Ltext0
+ .value 0x1
+ .byte 0x5e
+ .quad .LVL312-.Ltext0
+ .quad .LVL315-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL315-.Ltext0
+ .quad .LVL315-.Ltext0
+ .value 0x1
+ .byte 0x5e
+ .quad .LVL316-.Ltext0
+ .quad .LFE46-.Ltext0
+ .value 0x1
+ .byte 0x5e
+ .quad 0x0
+ .quad 0x0
+.LLST69:
+ .quad .LVL294-.Ltext0
+ .quad .LVL297-.Ltext0
+ .value 0x1
+ .byte 0x51
+ .quad .LVL297-.Ltext0
+ .quad .LVL305-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL305-.Ltext0
+ .quad .LVL310-.Ltext0
+ .value 0x1
+ .byte 0x51
+ .quad .LVL310-.Ltext0
+ .quad .LVL314-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL315-.Ltext0
+ .quad .LFE46-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad 0x0
+ .quad 0x0
+.LLST70:
+ .quad .LVL296-.Ltext0
+ .quad .LVL307-.Ltext0
+ .value 0x1
+ .byte 0x5d
+ .quad .LVL310-.Ltext0
+ .quad .LFE46-.Ltext0
+ .value 0x1
+ .byte 0x5d
+ .quad 0x0
+ .quad 0x0
+.LLST71:
+ .quad .LVL302-.Ltext0
+ .quad .LVL305-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL314-.Ltext0
+ .quad .LVL315-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad 0x0
+ .quad 0x0
+.LLST72:
+ .quad .LVL300-.Ltext0
+ .quad .LVL306-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad .LVL313-.Ltext0
+ .quad .LVL315-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad .LVL317-.Ltext0
+ .quad .LFE46-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad 0x0
+ .quad 0x0
+.LLST73:
+ .quad .LVL318-.Ltext0
+ .quad .LVL319-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL319-.Ltext0
+ .quad .LVL328-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL328-.Ltext0
+ .quad .LVL329-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL329-.Ltext0
+ .quad .LFE47-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad 0x0
+ .quad 0x0
+.LLST74:
+ .quad .LVL318-.Ltext0
+ .quad .LVL322-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL322-.Ltext0
+ .quad .LVL325-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL325-.Ltext0
+ .quad .LVL330-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL330-.Ltext0
+ .quad .LFE47-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad 0x0
+ .quad 0x0
+.LLST75:
+ .quad .LVL318-.Ltext0
+ .quad .LVL321-.Ltext0
+ .value 0x1
+ .byte 0x54
+ .quad .LVL321-.Ltext0
+ .quad .LVL327-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad .LVL327-.Ltext0
+ .quad .LVL329-.Ltext0
+ .value 0x1
+ .byte 0x54
+ .quad .LVL329-.Ltext0
+ .quad .LFE47-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad 0x0
+ .quad 0x0
+.LLST76:
+ .quad .LVL320-.Ltext0
+ .quad .LVL326-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL329-.Ltext0
+ .quad .LFE47-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad 0x0
+ .quad 0x0
+.LLST77:
+ .quad .LVL331-.Ltext0
+ .quad .LVL332-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL332-.Ltext0
+ .quad .LVL335-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL335-.Ltext0
+ .quad .LVL336-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL336-.Ltext0
+ .quad .LVL340-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL340-.Ltext0
+ .quad .LVL341-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL341-.Ltext0
+ .quad .LVL347-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL347-.Ltext0
+ .quad .LFE48-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad 0x0
+ .quad 0x0
+.LLST78:
+ .quad .LVL331-.Ltext0
+ .quad .LVL337-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL337-.Ltext0
+ .quad .LVL338-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL341-.Ltext0
+ .quad .LVL342-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL342-.Ltext0
+ .quad .LVL345-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad 0x0
+ .quad 0x0
+.LLST79:
+ .quad .LVL331-.Ltext0
+ .quad .LVL333-.Ltext0
+ .value 0x1
+ .byte 0x54
+ .quad .LVL333-.Ltext0
+ .quad .LVL334-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad .LVL334-.Ltext0
+ .quad .LVL336-.Ltext0
+ .value 0x1
+ .byte 0x54
+ .quad .LVL336-.Ltext0
+ .quad .LVL339-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad .LVL339-.Ltext0
+ .quad .LVL341-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL341-.Ltext0
+ .quad .LVL346-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad 0x0
+ .quad 0x0
+.LLST80:
+ .quad .LVL343-.Ltext0
+ .quad .LVL344-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL344-.Ltext0
+ .quad .LVL348-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad 0x0
+ .quad 0x0
+.LLST81:
+ .quad .LVL349-.Ltext0
+ .quad .LVL350-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -216
+ .quad .LVL350-.Ltext0
+ .quad .LVL351-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -208
+ .quad .LVL351-.Ltext0
+ .quad .LVL352-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -200
+ .quad .LVL352-.Ltext0
+ .quad .LVL353-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -192
+ .quad .LVL353-.Ltext0
+ .quad .LVL354-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -184
+ .quad .LVL354-.Ltext0
+ .quad .LVL355-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -176
+ .quad .LVL355-.Ltext0
+ .quad .LVL356-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -168
+ .quad .LVL356-.Ltext0
+ .quad .LVL357-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL357-.Ltext0
+ .quad .LVL358-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -168
+ .quad .LVL358-.Ltext0
+ .quad .LVL359-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -176
+ .quad .LVL359-.Ltext0
+ .quad .LVL360-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -184
+ .quad .LVL360-.Ltext0
+ .quad .LVL361-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -192
+ .quad .LVL361-.Ltext0
+ .quad .LVL362-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -200
+ .quad .LVL362-.Ltext0
+ .quad .LVL363-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -208
+ .quad .LVL363-.Ltext0
+ .quad .LVL364-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -216
+ .quad .LVL364-.Ltext0
+ .quad .LVL380-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL380-.Ltext0
+ .quad .LVL381-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -168
+ .quad .LVL381-.Ltext0
+ .quad .LVL382-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -176
+ .quad .LVL382-.Ltext0
+ .quad .LVL383-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -184
+ .quad .LVL383-.Ltext0
+ .quad .LVL384-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -192
+ .quad .LVL384-.Ltext0
+ .quad .LVL385-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -200
+ .quad .LVL385-.Ltext0
+ .quad .LVL386-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -208
+ .quad .LVL386-.Ltext0
+ .quad .LVL387-.Ltext0
+ .value 0x3
+ .byte 0x77
+ .sleb128 -216
+ .quad .LVL387-.Ltext0
+ .quad .LFE50-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad 0x0
+ .quad 0x0
+.LLST82:
+ .quad .LVL365-.Ltext0
+ .quad .LVL385-.Ltext0
+ .value 0x1
+ .byte 0x5e
+ .quad .LVL387-.Ltext0
+ .quad .LFE50-.Ltext0
+ .value 0x1
+ .byte 0x5e
+ .quad 0x0
+ .quad 0x0
+.LLST83:
+ .quad .LVL369-.Ltext0
+ .quad .LVL370-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL378-.Ltext0
+ .quad .LVL381-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL391-.Ltext0
+ .quad .LVL393-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL394-.Ltext0
+ .quad .LFE50-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad 0x0
+ .quad 0x0
+.LLST84:
+ .quad .LVL370-.Ltext0
+ .quad .LVL373-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL377-.Ltext0
+ .quad .LVL378-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad 0x0
+ .quad 0x0
+.LLST85:
+ .quad .LVL367-.Ltext0
+ .quad .LVL379-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad .LVL387-.Ltext0
+ .quad .LFE50-.Ltext0
+ .value 0x1
+ .byte 0x5c
+ .quad 0x0
+ .quad 0x0
+.LLST86:
+ .quad .LVL367-.Ltext0
+ .quad .LVL369-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL371-.Ltext0
+ .quad .LVL372-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL373-.Ltext0
+ .quad .LVL374-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL374-.Ltext0
+ .quad .LVL375-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL376-.Ltext0
+ .quad .LVL376-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL387-.Ltext0
+ .quad .LVL388-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL388-.Ltext0
+ .quad .LVL390-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL390-.Ltext0
+ .quad .LVL391-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL393-.Ltext0
+ .quad .LVL394-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL394-.Ltext0
+ .quad .LVL395-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad 0x0
+ .quad 0x0
+.LLST87:
+ .quad .LVL389-.Ltext0
+ .quad .LVL392-.Ltext0
+ .value 0x1
+ .byte 0x54
+ .quad .LVL393-.Ltext0
+ .quad .LVL395-.Ltext0
+ .value 0x1
+ .byte 0x54
+ .quad 0x0
+ .quad 0x0
+ .section .debug_info
+ .long 0xf4e
+ .value 0x2
+ .long .Ldebug_abbrev0
+ .byte 0x8
+ .uleb128 0x1
+ .long .Ldebug_line0
+ .quad .Letext0
+ .quad .Ltext0
+ .long .LASF148
+ .byte 0x1
+ .long .LASF149
+ .long .LASF150
+ .uleb128 0x2
+ .long .LASF7
+ .byte 0x5
+ .byte 0xd6
+ .long 0x38
+ .uleb128 0x3
+ .long .LASF0
+ .byte 0x8
+ .byte 0x7
+ .uleb128 0x4
+ .string "int"
+ .byte 0x4
+ .byte 0x5
+ .uleb128 0x3
+ .long .LASF1
+ .byte 0x8
+ .byte 0x5
+ .uleb128 0x3
+ .long .LASF2
+ .byte 0x1
+ .byte 0x8
+ .uleb128 0x3
+ .long .LASF3
+ .byte 0x2
+ .byte 0x7
+ .uleb128 0x3
+ .long .LASF4
+ .byte 0x4
+ .byte 0x7
+ .uleb128 0x3
+ .long .LASF5
+ .byte 0x1
+ .byte 0x6
+ .uleb128 0x3
+ .long .LASF6
+ .byte 0x2
+ .byte 0x5
+ .uleb128 0x2
+ .long .LASF8
+ .byte 0x8
+ .byte 0x8f
+ .long 0x46
+ .uleb128 0x2
+ .long .LASF9
+ .byte 0x8
+ .byte 0x90
+ .long 0x46
+ .uleb128 0x3
+ .long .LASF0
+ .byte 0x8
+ .byte 0x7
+ .uleb128 0x5
+ .byte 0x8
+ .uleb128 0x6
+ .byte 0x8
+ .long 0x95
+ .uleb128 0x3
+ .long .LASF10
+ .byte 0x1
+ .byte 0x6
+ .uleb128 0x2
+ .long .LASF11
+ .byte 0x6
+ .byte 0x2e
+ .long 0xa7
+ .uleb128 0x7
+ .long 0x243
+ .long .LASF39
+ .byte 0xd8
+ .byte 0x6
+ .byte 0x2e
+ .uleb128 0x8
+ .long .LASF12
+ .byte 0x7
+ .value 0x10c
+ .long 0x3f
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .uleb128 0x8
+ .long .LASF13
+ .byte 0x7
+ .value 0x111
+ .long 0x8f
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x8
+ .uleb128 0x8
+ .long .LASF14
+ .byte 0x7
+ .value 0x112
+ .long 0x8f
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x10
+ .uleb128 0x8
+ .long .LASF15
+ .byte 0x7
+ .value 0x113
+ .long 0x8f
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x18
+ .uleb128 0x8
+ .long .LASF16
+ .byte 0x7
+ .value 0x114
+ .long 0x8f
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x20
+ .uleb128 0x8
+ .long .LASF17
+ .byte 0x7
+ .value 0x115
+ .long 0x8f
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x28
+ .uleb128 0x8
+ .long .LASF18
+ .byte 0x7
+ .value 0x116
+ .long 0x8f
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x30
+ .uleb128 0x8
+ .long .LASF19
+ .byte 0x7
+ .value 0x117
+ .long 0x8f
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x38
+ .uleb128 0x8
+ .long .LASF20
+ .byte 0x7
+ .value 0x118
+ .long 0x8f
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x40
+ .uleb128 0x8
+ .long .LASF21
+ .byte 0x7
+ .value 0x11a
+ .long 0x8f
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x48
+ .uleb128 0x8
+ .long .LASF22
+ .byte 0x7
+ .value 0x11b
+ .long 0x8f
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x50
+ .uleb128 0x8
+ .long .LASF23
+ .byte 0x7
+ .value 0x11c
+ .long 0x8f
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x58
+ .uleb128 0x8
+ .long .LASF24
+ .byte 0x7
+ .value 0x11e
+ .long 0x2af
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x60
+ .uleb128 0x8
+ .long .LASF25
+ .byte 0x7
+ .value 0x120
+ .long 0x2b5
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x68
+ .uleb128 0x8
+ .long .LASF26
+ .byte 0x7
+ .value 0x122
+ .long 0x3f
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x70
+ .uleb128 0x8
+ .long .LASF27
+ .byte 0x7
+ .value 0x126
+ .long 0x3f
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x74
+ .uleb128 0x8
+ .long .LASF28
+ .byte 0x7
+ .value 0x128
+ .long 0x70
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x78
+ .uleb128 0x8
+ .long .LASF29
+ .byte 0x7
+ .value 0x12c
+ .long 0x54
+ .byte 0x3
+ .byte 0x23
+ .uleb128 0x80
+ .uleb128 0x8
+ .long .LASF30
+ .byte 0x7
+ .value 0x12d
+ .long 0x62
+ .byte 0x3
+ .byte 0x23
+ .uleb128 0x82
+ .uleb128 0x8
+ .long .LASF31
+ .byte 0x7
+ .value 0x12e
+ .long 0x2bb
+ .byte 0x3
+ .byte 0x23
+ .uleb128 0x83
+ .uleb128 0x8
+ .long .LASF32
+ .byte 0x7
+ .value 0x132
+ .long 0x2cb
+ .byte 0x3
+ .byte 0x23
+ .uleb128 0x88
+ .uleb128 0x8
+ .long .LASF33
+ .byte 0x7
+ .value 0x13b
+ .long 0x7b
+ .byte 0x3
+ .byte 0x23
+ .uleb128 0x90
+ .uleb128 0x8
+ .long .LASF34
+ .byte 0x7
+ .value 0x141
+ .long 0x8d
+ .byte 0x3
+ .byte 0x23
+ .uleb128 0x98
+ .uleb128 0x8
+ .long .LASF35
+ .byte 0x7
+ .value 0x142
+ .long 0x8d
+ .byte 0x3
+ .byte 0x23
+ .uleb128 0xa0
+ .uleb128 0x8
+ .long .LASF36
+ .byte 0x7
+ .value 0x144
+ .long 0x3f
+ .byte 0x3
+ .byte 0x23
+ .uleb128 0xa8
+ .uleb128 0x8
+ .long .LASF37
+ .byte 0x7
+ .value 0x146
+ .long 0x2d1
+ .byte 0x3
+ .byte 0x23
+ .uleb128 0xac
+ .byte 0x0
+ .uleb128 0x6
+ .byte 0x8
+ .long 0x249
+ .uleb128 0x9
+ .long 0x4d
+ .uleb128 0x6
+ .byte 0x8
+ .long 0x4d
+ .uleb128 0x6
+ .byte 0x8
+ .long 0x25a
+ .uleb128 0x9
+ .long 0x95
+ .uleb128 0x6
+ .byte 0x8
+ .long 0x265
+ .uleb128 0xa
+ .long 0x271
+ .byte 0x1
+ .uleb128 0xb
+ .long 0x8d
+ .byte 0x0
+ .uleb128 0xc
+ .long .LASF38
+ .byte 0x7
+ .byte 0xb0
+ .uleb128 0x7
+ .long 0x2af
+ .long .LASF40
+ .byte 0x18
+ .byte 0x7
+ .byte 0xb6
+ .uleb128 0xd
+ .long .LASF41
+ .byte 0x7
+ .byte 0xb7
+ .long 0x2af
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .uleb128 0xd
+ .long .LASF42
+ .byte 0x7
+ .byte 0xb8
+ .long 0x2b5
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x8
+ .uleb128 0xd
+ .long .LASF43
+ .byte 0x7
+ .byte 0xbc
+ .long 0x3f
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x10
+ .byte 0x0
+ .uleb128 0x6
+ .byte 0x8
+ .long 0x278
+ .uleb128 0x6
+ .byte 0x8
+ .long 0xa7
+ .uleb128 0xe
+ .long 0x2cb
+ .long 0x95
+ .uleb128 0xf
+ .long 0x86
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x6
+ .byte 0x8
+ .long 0x271
+ .uleb128 0xe
+ .long 0x2e1
+ .long 0x95
+ .uleb128 0xf
+ .long 0x86
+ .byte 0x2b
+ .byte 0x0
+ .uleb128 0x6
+ .byte 0x8
+ .long 0x9c
+ .uleb128 0x2
+ .long .LASF44
+ .byte 0x3
+ .byte 0x5d
+ .long 0x2f2
+ .uleb128 0x7
+ .long 0x329
+ .long .LASF44
+ .byte 0x10
+ .byte 0x3
+ .byte 0x5d
+ .uleb128 0x10
+ .string "val"
+ .byte 0x1
+ .byte 0x31
+ .long 0x43e
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .uleb128 0xd
+ .long .LASF45
+ .byte 0x1
+ .byte 0x32
+ .long 0x45f
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x8
+ .uleb128 0xd
+ .long .LASF46
+ .byte 0x1
+ .byte 0x33
+ .long 0x4d
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0xc
+ .byte 0x0
+ .uleb128 0x11
+ .long 0x3e0
+ .byte 0x4
+ .byte 0x3
+ .byte 0x78
+ .uleb128 0x12
+ .long .LASF47
+ .sleb128 0
+ .uleb128 0x12
+ .long .LASF48
+ .sleb128 1
+ .uleb128 0x12
+ .long .LASF49
+ .sleb128 2
+ .uleb128 0x12
+ .long .LASF50
+ .sleb128 3
+ .uleb128 0x12
+ .long .LASF51
+ .sleb128 4
+ .uleb128 0x12
+ .long .LASF52
+ .sleb128 5
+ .uleb128 0x12
+ .long .LASF53
+ .sleb128 6
+ .uleb128 0x12
+ .long .LASF54
+ .sleb128 7
+ .uleb128 0x12
+ .long .LASF55
+ .sleb128 8
+ .uleb128 0x12
+ .long .LASF56
+ .sleb128 9
+ .uleb128 0x12
+ .long .LASF57
+ .sleb128 10
+ .uleb128 0x12
+ .long .LASF58
+ .sleb128 11
+ .uleb128 0x12
+ .long .LASF59
+ .sleb128 12
+ .uleb128 0x12
+ .long .LASF60
+ .sleb128 13
+ .uleb128 0x12
+ .long .LASF61
+ .sleb128 14
+ .uleb128 0x12
+ .long .LASF62
+ .sleb128 15
+ .uleb128 0x12
+ .long .LASF63
+ .sleb128 16
+ .uleb128 0x12
+ .long .LASF64
+ .sleb128 17
+ .uleb128 0x12
+ .long .LASF65
+ .sleb128 18
+ .uleb128 0x12
+ .long .LASF66
+ .sleb128 19
+ .uleb128 0x12
+ .long .LASF67
+ .sleb128 20
+ .uleb128 0x12
+ .long .LASF68
+ .sleb128 21
+ .uleb128 0x12
+ .long .LASF69
+ .sleb128 22
+ .uleb128 0x12
+ .long .LASF70
+ .sleb128 23
+ .uleb128 0x12
+ .long .LASF71
+ .sleb128 24
+ .uleb128 0x12
+ .long .LASF72
+ .sleb128 25
+ .uleb128 0x12
+ .long .LASF73
+ .sleb128 26
+ .uleb128 0x12
+ .long .LASF74
+ .sleb128 27
+ .uleb128 0x12
+ .long .LASF75
+ .sleb128 28
+ .byte 0x0
+ .uleb128 0x2
+ .long .LASF76
+ .byte 0x3
+ .byte 0x97
+ .long 0x329
+ .uleb128 0x6
+ .byte 0x8
+ .long 0x2e7
+ .uleb128 0x2
+ .long .LASF77
+ .byte 0x4
+ .byte 0x18
+ .long 0x5b
+ .uleb128 0x2
+ .long .LASF78
+ .byte 0x4
+ .byte 0x31
+ .long 0x407
+ .uleb128 0x6
+ .byte 0x8
+ .long 0x3f1
+ .uleb128 0x11
+ .long 0x422
+ .byte 0x4
+ .byte 0x4
+ .byte 0x55
+ .uleb128 0x12
+ .long .LASF79
+ .sleb128 0
+ .uleb128 0x12
+ .long .LASF80
+ .sleb128 1
+ .byte 0x0
+ .uleb128 0x2
+ .long .LASF81
+ .byte 0x4
+ .byte 0x55
+ .long 0x40d
+ .uleb128 0x2
+ .long .LASF82
+ .byte 0x4
+ .byte 0xd4
+ .long 0x438
+ .uleb128 0x13
+ .long .LASF82
+ .byte 0x1
+ .uleb128 0x14
+ .long 0x45f
+ .string "val"
+ .byte 0x8
+ .byte 0x1
+ .byte 0x2e
+ .uleb128 0x15
+ .string "ul"
+ .byte 0x1
+ .byte 0x2f
+ .long 0x38
+ .uleb128 0x15
+ .string "bv"
+ .byte 0x1
+ .byte 0x30
+ .long 0x3fc
+ .byte 0x0
+ .uleb128 0x11
+ .long 0x474
+ .byte 0x4
+ .byte 0x1
+ .byte 0x32
+ .uleb128 0x12
+ .long .LASF83
+ .sleb128 0
+ .uleb128 0x12
+ .long .LASF84
+ .sleb128 1
+ .byte 0x0
+ .uleb128 0x7
+ .long 0x4c7
+ .long .LASF85
+ .byte 0x20
+ .byte 0x2
+ .byte 0x27
+ .uleb128 0xd
+ .long .LASF86
+ .byte 0x2
+ .byte 0x29
+ .long 0x3f
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .uleb128 0xd
+ .long .LASF87
+ .byte 0x2
+ .byte 0x2c
+ .long 0x3f
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x4
+ .uleb128 0xd
+ .long .LASF88
+ .byte 0x2
+ .byte 0x2f
+ .long 0x254
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x8
+ .uleb128 0xd
+ .long .LASF89
+ .byte 0x2
+ .byte 0x32
+ .long 0x38
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x10
+ .uleb128 0xd
+ .long .LASF90
+ .byte 0x2
+ .byte 0x35
+ .long 0x243
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x18
+ .byte 0x0
+ .uleb128 0x2
+ .long .LASF85
+ .byte 0x2
+ .byte 0x36
+ .long 0x474
+ .uleb128 0x16
+ .byte 0x1
+ .long .LASF91
+ .byte 0x1
+ .byte 0x41
+ .byte 0x1
+ .quad .LFB25
+ .quad .LFE25
+ .long .LLST0
+ .uleb128 0x16
+ .byte 0x1
+ .long .LASF92
+ .byte 0x1
+ .byte 0x4c
+ .byte 0x1
+ .quad .LFB26
+ .quad .LFE26
+ .long .LLST1
+ .uleb128 0x17
+ .long 0x55f
+ .byte 0x1
+ .long .LASF94
+ .byte 0x1
+ .byte 0x57
+ .byte 0x1
+ .long 0x3eb
+ .quad .LFB27
+ .quad .LFE27
+ .long .LLST2
+ .uleb128 0x18
+ .string "str"
+ .byte 0x1
+ .byte 0x56
+ .long 0x8f
+ .long .LLST3
+ .uleb128 0x19
+ .long .LASF93
+ .byte 0x1
+ .byte 0x56
+ .long 0x38
+ .long .LLST4
+ .uleb128 0x1a
+ .long .LASF96
+ .byte 0x1
+ .byte 0x58
+ .long 0x3eb
+ .long .LLST5
+ .byte 0x0
+ .uleb128 0x17
+ .long 0x5b2
+ .byte 0x1
+ .long .LASF95
+ .byte 0x1
+ .byte 0x6d
+ .byte 0x1
+ .long 0x3eb
+ .quad .LFB28
+ .quad .LFE28
+ .long .LLST6
+ .uleb128 0x18
+ .string "str"
+ .byte 0x1
+ .byte 0x6c
+ .long 0x8f
+ .long .LLST7
+ .uleb128 0x19
+ .long .LASF93
+ .byte 0x1
+ .byte 0x6c
+ .long 0x38
+ .long .LLST8
+ .uleb128 0x1a
+ .long .LASF96
+ .byte 0x1
+ .byte 0x6e
+ .long 0x3eb
+ .long .LLST9
+ .byte 0x0
+ .uleb128 0x17
+ .long 0x605
+ .byte 0x1
+ .long .LASF97
+ .byte 0x1
+ .byte 0x84
+ .byte 0x1
+ .long 0x3eb
+ .quad .LFB29
+ .quad .LFE29
+ .long .LLST10
+ .uleb128 0x18
+ .string "str"
+ .byte 0x1
+ .byte 0x83
+ .long 0x8f
+ .long .LLST11
+ .uleb128 0x19
+ .long .LASF93
+ .byte 0x1
+ .byte 0x83
+ .long 0x38
+ .long .LLST12
+ .uleb128 0x1a
+ .long .LASF96
+ .byte 0x1
+ .byte 0x85
+ .long 0x3eb
+ .long .LLST13
+ .byte 0x0
+ .uleb128 0x17
+ .long 0x658
+ .byte 0x1
+ .long .LASF98
+ .byte 0x1
+ .byte 0x9b
+ .byte 0x1
+ .long 0x3eb
+ .quad .LFB30
+ .quad .LFE30
+ .long .LLST14
+ .uleb128 0x18
+ .string "str"
+ .byte 0x1
+ .byte 0x9a
+ .long 0x8f
+ .long .LLST15
+ .uleb128 0x19
+ .long .LASF93
+ .byte 0x1
+ .byte 0x9a
+ .long 0x38
+ .long .LLST16
+ .uleb128 0x1a
+ .long .LASF96
+ .byte 0x1
+ .byte 0x9c
+ .long 0x3eb
+ .long .LLST17
+ .byte 0x0
+ .uleb128 0x17
+ .long 0x6ba
+ .byte 0x1
+ .long .LASF99
+ .byte 0x1
+ .byte 0xb3
+ .byte 0x1
+ .long 0x3eb
+ .quad .LFB31
+ .quad .LFE31
+ .long .LLST18
+ .uleb128 0x18
+ .string "str"
+ .byte 0x1
+ .byte 0xb2
+ .long 0x254
+ .long .LLST19
+ .uleb128 0x19
+ .long .LASF93
+ .byte 0x1
+ .byte 0xb2
+ .long 0x38
+ .long .LLST20
+ .uleb128 0x1a
+ .long .LASF96
+ .byte 0x1
+ .byte 0xb4
+ .long 0x3eb
+ .long .LLST21
+ .uleb128 0x1b
+ .string "len"
+ .byte 0x1
+ .byte 0xb5
+ .long 0x2d
+ .long .LLST22
+ .byte 0x0
+ .uleb128 0x17
+ .long 0x6f8
+ .byte 0x1
+ .long .LASF100
+ .byte 0x1
+ .byte 0xe6
+ .byte 0x1
+ .long 0x3eb
+ .quad .LFB32
+ .quad .LFE32
+ .long .LLST23
+ .uleb128 0x18
+ .string "i"
+ .byte 0x1
+ .byte 0xe5
+ .long 0x38
+ .long .LLST24
+ .uleb128 0x1c
+ .long .LASF96
+ .byte 0x1
+ .byte 0xe7
+ .long 0x3eb
+ .byte 0x0
+ .uleb128 0x17
+ .long 0x736
+ .byte 0x1
+ .long .LASF101
+ .byte 0x1
+ .byte 0xf2
+ .byte 0x1
+ .long 0x3eb
+ .quad .LFB33
+ .quad .LFE33
+ .long .LLST25
+ .uleb128 0x18
+ .string "i"
+ .byte 0x1
+ .byte 0xf1
+ .long 0x46
+ .long .LLST26
+ .uleb128 0x1c
+ .long .LASF96
+ .byte 0x1
+ .byte 0xf3
+ .long 0x3eb
+ .byte 0x0
+ .uleb128 0x1d
+ .long 0x77b
+ .byte 0x1
+ .long .LASF102
+ .byte 0x1
+ .value 0x107
+ .byte 0x1
+ .long 0x3eb
+ .quad .LFB34
+ .quad .LFE34
+ .long .LLST27
+ .uleb128 0x1e
+ .long .LASF96
+ .byte 0x1
+ .value 0x106
+ .long 0x77b
+ .long .LLST28
+ .uleb128 0x1f
+ .string "n"
+ .byte 0x1
+ .value 0x108
+ .long 0x3eb
+ .long .LLST29
+ .byte 0x0
+ .uleb128 0x6
+ .byte 0x8
+ .long 0x781
+ .uleb128 0x9
+ .long 0x2e7
+ .uleb128 0x20
+ .long 0x7b9
+ .byte 0x1
+ .long .LASF103
+ .byte 0x1
+ .value 0x11a
+ .byte 0x1
+ .quad .LFB35
+ .quad .LFE35
+ .long .LLST30
+ .uleb128 0x1e
+ .long .LASF96
+ .byte 0x1
+ .value 0x119
+ .long 0x3eb
+ .long .LLST31
+ .byte 0x0
+ .uleb128 0x20
+ .long 0x84a
+ .byte 0x1
+ .long .LASF104
+ .byte 0x1
+ .value 0x124
+ .byte 0x1
+ .quad .LFB36
+ .quad .LFE36
+ .long .LLST32
+ .uleb128 0x21
+ .string "acc"
+ .byte 0x1
+ .value 0x122
+ .long 0x3eb
+ .long .LLST33
+ .uleb128 0x21
+ .string "op"
+ .byte 0x1
+ .value 0x122
+ .long 0x3e0
+ .long .LLST34
+ .uleb128 0x1e
+ .long .LASF105
+ .byte 0x1
+ .value 0x122
+ .long 0x3eb
+ .long .LLST35
+ .uleb128 0x1e
+ .long .LASF93
+ .byte 0x1
+ .value 0x123
+ .long 0x38
+ .long .LLST36
+ .uleb128 0x22
+ .long .LASF106
+ .byte 0x1
+ .value 0x125
+ .long 0x422
+ .byte 0x2
+ .byte 0x77
+ .sleb128 20
+ .uleb128 0x1f
+ .string "op1"
+ .byte 0x1
+ .value 0x126
+ .long 0x3fc
+ .long .LLST37
+ .uleb128 0x1f
+ .string "op2"
+ .byte 0x1
+ .value 0x126
+ .long 0x3fc
+ .long .LLST38
+ .byte 0x0
+ .uleb128 0x20
+ .long 0x87d
+ .byte 0x1
+ .long .LASF107
+ .byte 0x1
+ .value 0x1c6
+ .byte 0x1
+ .quad .LFB37
+ .quad .LFE37
+ .long .LLST39
+ .uleb128 0x1e
+ .long .LASF96
+ .byte 0x1
+ .value 0x1c5
+ .long 0x3eb
+ .long .LLST40
+ .byte 0x0
+ .uleb128 0x23
+ .long 0x8b1
+ .byte 0x1
+ .long .LASF108
+ .byte 0x1
+ .value 0x1d0
+ .byte 0x1
+ .long 0x3f
+ .quad .LFB38
+ .quad .LFE38
+ .byte 0x2
+ .byte 0x77
+ .sleb128 0
+ .uleb128 0x24
+ .long .LASF96
+ .byte 0x1
+ .value 0x1cf
+ .long 0x77b
+ .byte 0x1
+ .byte 0x55
+ .byte 0x0
+ .uleb128 0x23
+ .long 0x8e5
+ .byte 0x1
+ .long .LASF109
+ .byte 0x1
+ .value 0x1d6
+ .byte 0x1
+ .long 0x3f
+ .quad .LFB39
+ .quad .LFE39
+ .byte 0x2
+ .byte 0x77
+ .sleb128 0
+ .uleb128 0x24
+ .long .LASF96
+ .byte 0x1
+ .value 0x1d5
+ .long 0x77b
+ .byte 0x1
+ .byte 0x55
+ .byte 0x0
+ .uleb128 0x1d
+ .long 0x91c
+ .byte 0x1
+ .long .LASF110
+ .byte 0x1
+ .value 0x1dc
+ .byte 0x1
+ .long 0x3f
+ .quad .LFB40
+ .quad .LFE40
+ .long .LLST41
+ .uleb128 0x1e
+ .long .LASF96
+ .byte 0x1
+ .value 0x1db
+ .long 0x77b
+ .long .LLST42
+ .byte 0x0
+ .uleb128 0x23
+ .long 0x952
+ .byte 0x1
+ .long .LASF111
+ .byte 0x1
+ .value 0x1e2
+ .byte 0x1
+ .long 0x3f
+ .quad .LFB41
+ .quad .LFE41
+ .byte 0x2
+ .byte 0x77
+ .sleb128 0
+ .uleb128 0x1e
+ .long .LASF96
+ .byte 0x1
+ .value 0x1e1
+ .long 0x77b
+ .long .LLST43
+ .byte 0x0
+ .uleb128 0x1d
+ .long 0x989
+ .byte 0x1
+ .long .LASF112
+ .byte 0x1
+ .value 0x1ee
+ .byte 0x1
+ .long 0x38
+ .quad .LFB42
+ .quad .LFE42
+ .long .LLST44
+ .uleb128 0x1e
+ .long .LASF96
+ .byte 0x1
+ .value 0x1ed
+ .long 0x77b
+ .long .LLST45
+ .byte 0x0
+ .uleb128 0x1d
+ .long 0x9d3
+ .byte 0x1
+ .long .LASF113
+ .byte 0x1
+ .value 0x1fd
+ .byte 0x1
+ .long 0x46
+ .quad .LFB43
+ .quad .LFE43
+ .long .LLST46
+ .uleb128 0x1e
+ .long .LASF96
+ .byte 0x1
+ .value 0x1fc
+ .long 0x77b
+ .long .LLST47
+ .uleb128 0x25
+ .long .Ldebug_ranges0+0x0
+ .uleb128 0x26
+ .string "ul"
+ .byte 0x1
+ .value 0x207
+ .long 0x38
+ .byte 0x1
+ .byte 0x50
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x1d
+ .long 0xa8e
+ .byte 0x1
+ .long .LASF114
+ .byte 0x1
+ .value 0x262
+ .byte 0x1
+ .long 0x3f
+ .quad .LFB45
+ .quad .LFE45
+ .long .LLST48
+ .uleb128 0x1e
+ .long .LASF96
+ .byte 0x1
+ .value 0x260
+ .long 0x77b
+ .long .LLST49
+ .uleb128 0x1e
+ .long .LASF115
+ .byte 0x1
+ .value 0x260
+ .long 0x2d
+ .long .LLST50
+ .uleb128 0x1e
+ .long .LASF116
+ .byte 0x1
+ .value 0x260
+ .long 0x2d
+ .long .LLST51
+ .uleb128 0x1e
+ .long .LASF117
+ .byte 0x1
+ .value 0x261
+ .long 0x3f
+ .long .LLST52
+ .uleb128 0x1f
+ .string "val"
+ .byte 0x1
+ .value 0x263
+ .long 0x3fc
+ .long .LLST53
+ .uleb128 0x27
+ .long 0xa6b
+ .quad .LBB5
+ .quad .LBE5
+ .uleb128 0x28
+ .long .LASF118
+ .byte 0x1
+ .value 0x276
+ .long 0x3f
+ .byte 0x0
+ .uleb128 0x29
+ .quad .LBB6
+ .quad .LBE6
+ .uleb128 0x2a
+ .long .LASF119
+ .byte 0x1
+ .value 0x27e
+ .long 0x3f
+ .long .LLST54
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x20
+ .long 0xb8c
+ .byte 0x1
+ .long .LASF120
+ .byte 0x1
+ .value 0x220
+ .byte 0x1
+ .quad .LFB44
+ .quad .LFE44
+ .long .LLST55
+ .uleb128 0x1e
+ .long .LASF96
+ .byte 0x1
+ .value 0x21d
+ .long 0x77b
+ .long .LLST56
+ .uleb128 0x21
+ .string "ptr"
+ .byte 0x1
+ .value 0x21d
+ .long 0x24e
+ .long .LLST57
+ .uleb128 0x1e
+ .long .LASF121
+ .byte 0x1
+ .value 0x21e
+ .long 0x2d
+ .long .LLST58
+ .uleb128 0x1e
+ .long .LASF122
+ .byte 0x1
+ .value 0x21e
+ .long 0x2d
+ .long .LLST59
+ .uleb128 0x1e
+ .long .LASF123
+ .byte 0x1
+ .value 0x21e
+ .long 0x3f
+ .long .LLST60
+ .uleb128 0x1e
+ .long .LASF124
+ .byte 0x1
+ .value 0x21f
+ .long 0x3f
+ .long .LLST61
+ .uleb128 0x24
+ .long .LASF125
+ .byte 0x1
+ .value 0x21f
+ .long 0x3f
+ .byte 0x3
+ .byte 0x77
+ .sleb128 96
+ .uleb128 0x24
+ .long .LASF93
+ .byte 0x1
+ .value 0x21f
+ .long 0x38
+ .byte 0x3
+ .byte 0x77
+ .sleb128 104
+ .uleb128 0x1f
+ .string "op1"
+ .byte 0x1
+ .value 0x221
+ .long 0x3fc
+ .long .LLST62
+ .uleb128 0x1f
+ .string "op2"
+ .byte 0x1
+ .value 0x221
+ .long 0x3fc
+ .long .LLST63
+ .uleb128 0x1f
+ .string "buf"
+ .byte 0x1
+ .value 0x222
+ .long 0x24e
+ .long .LLST64
+ .uleb128 0x26
+ .string "len"
+ .byte 0x1
+ .value 0x223
+ .long 0x5b
+ .byte 0x2
+ .byte 0x77
+ .sleb128 36
+ .uleb128 0x2a
+ .long .LASF116
+ .byte 0x1
+ .value 0x224
+ .long 0x2d
+ .long .LLST65
+ .uleb128 0x28
+ .long .LASF118
+ .byte 0x1
+ .value 0x225
+ .long 0x3f
+ .byte 0x0
+ .uleb128 0x1d
+ .long 0xc1d
+ .byte 0x1
+ .long .LASF126
+ .byte 0x1
+ .value 0x28f
+ .byte 0x1
+ .long 0x38
+ .quad .LFB46
+ .quad .LFE46
+ .long .LLST66
+ .uleb128 0x1e
+ .long .LASF96
+ .byte 0x1
+ .value 0x28e
+ .long 0x77b
+ .long .LLST67
+ .uleb128 0x21
+ .string "ptr"
+ .byte 0x1
+ .value 0x28e
+ .long 0x24e
+ .long .LLST68
+ .uleb128 0x1e
+ .long .LASF86
+ .byte 0x1
+ .value 0x28e
+ .long 0x3f
+ .long .LLST69
+ .uleb128 0x1f
+ .string "val"
+ .byte 0x1
+ .value 0x290
+ .long 0x3fc
+ .long .LLST70
+ .uleb128 0x1f
+ .string "i"
+ .byte 0x1
+ .value 0x291
+ .long 0x38
+ .long .LLST71
+ .uleb128 0x2a
+ .long .LASF115
+ .byte 0x1
+ .value 0x291
+ .long 0x38
+ .long .LLST72
+ .uleb128 0x28
+ .long .LASF127
+ .byte 0x1
+ .value 0x292
+ .long 0x24e
+ .byte 0x0
+ .uleb128 0x1d
+ .long 0xc74
+ .byte 0x1
+ .long .LASF128
+ .byte 0x1
+ .value 0x2bd
+ .byte 0x1
+ .long 0x38
+ .quad .LFB47
+ .quad .LFE47
+ .long .LLST73
+ .uleb128 0x1e
+ .long .LASF96
+ .byte 0x1
+ .value 0x2bc
+ .long 0x77b
+ .long .LLST74
+ .uleb128 0x1e
+ .long .LASF86
+ .byte 0x1
+ .value 0x2bc
+ .long 0x3f
+ .long .LLST75
+ .uleb128 0x1f
+ .string "val"
+ .byte 0x1
+ .value 0x2be
+ .long 0x3fc
+ .long .LLST76
+ .byte 0x0
+ .uleb128 0x20
+ .long 0xcc3
+ .byte 0x1
+ .long .LASF129
+ .byte 0x1
+ .value 0x2df
+ .byte 0x1
+ .quad .LFB48
+ .quad .LFE48
+ .long .LLST77
+ .uleb128 0x1e
+ .long .LASF96
+ .byte 0x1
+ .value 0x2de
+ .long 0x77b
+ .long .LLST78
+ .uleb128 0x21
+ .string "f"
+ .byte 0x1
+ .value 0x2de
+ .long 0x2e1
+ .long .LLST79
+ .uleb128 0x1f
+ .string "s"
+ .byte 0x1
+ .value 0x2e0
+ .long 0x24e
+ .long .LLST80
+ .byte 0x0
+ .uleb128 0x2b
+ .long 0xd20
+ .long .LASF151
+ .byte 0x2
+ .byte 0x54
+ .byte 0x1
+ .long 0x3f
+ .byte 0x1
+ .uleb128 0x2c
+ .long .LASF130
+ .byte 0x2
+ .byte 0x53
+ .long 0xd20
+ .uleb128 0x1c
+ .long .LASF131
+ .byte 0x2
+ .byte 0x55
+ .long 0x8f
+ .uleb128 0x1c
+ .long .LASF96
+ .byte 0x2
+ .byte 0x56
+ .long 0x3eb
+ .uleb128 0x1c
+ .long .LASF115
+ .byte 0x2
+ .byte 0x57
+ .long 0x38
+ .uleb128 0x2d
+ .string "i"
+ .byte 0x2
+ .byte 0x57
+ .long 0x38
+ .uleb128 0x2d
+ .string "out"
+ .byte 0x2
+ .byte 0x58
+ .long 0xd26
+ .uleb128 0x2d
+ .string "bad"
+ .byte 0x2
+ .byte 0x59
+ .long 0x3f
+ .byte 0x0
+ .uleb128 0x6
+ .byte 0x8
+ .long 0x4c7
+ .uleb128 0xe
+ .long 0xd36
+ .long 0x4d
+ .uleb128 0xf
+ .long 0x86
+ .byte 0x63
+ .byte 0x0
+ .uleb128 0x17
+ .long 0xde8
+ .byte 0x1
+ .long .LASF132
+ .byte 0x2
+ .byte 0x86
+ .byte 0x1
+ .long 0x3f
+ .quad .LFB50
+ .quad .LFE50
+ .long .LLST81
+ .uleb128 0x2e
+ .string "nf"
+ .byte 0x2
+ .byte 0x87
+ .long 0x3f
+ .byte 0x2
+ .byte 0x77
+ .sleb128 44
+ .uleb128 0x1c
+ .long .LASF133
+ .byte 0x2
+ .byte 0x88
+ .long 0x3f
+ .uleb128 0x1b
+ .string "i"
+ .byte 0x2
+ .byte 0x89
+ .long 0x3f
+ .long .LLST82
+ .uleb128 0x25
+ .long .Ldebug_ranges0+0x40
+ .uleb128 0x1a
+ .long .LASF134
+ .byte 0x2
+ .byte 0x92
+ .long 0x3f
+ .long .LLST83
+ .uleb128 0x2f
+ .long 0xcc3
+ .quad .LBB8
+ .quad .LBE8
+ .uleb128 0x30
+ .long 0xcd4
+ .uleb128 0x25
+ .long .Ldebug_ranges0+0xb0
+ .uleb128 0x31
+ .long 0xcdf
+ .long .LLST84
+ .uleb128 0x31
+ .long 0xcea
+ .long .LLST85
+ .uleb128 0x31
+ .long 0xcf5
+ .long .LLST86
+ .uleb128 0x32
+ .long 0xd00
+ .uleb128 0x33
+ .long 0xd09
+ .byte 0x2
+ .byte 0x77
+ .sleb128 48
+ .uleb128 0x31
+ .long 0xd14
+ .long .LLST87
+ .byte 0x0
+ .byte 0x0
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x34
+ .long .LASF135
+ .byte 0x1
+ .byte 0x37
+ .long 0x3fc
+ .byte 0x9
+ .byte 0x3
+ .quad conv_bv
+ .uleb128 0x34
+ .long .LASF90
+ .byte 0x1
+ .byte 0x3a
+ .long 0x3fc
+ .byte 0x9
+ .byte 0x3
+ .quad result
+ .uleb128 0x34
+ .long .LASF136
+ .byte 0x1
+ .byte 0x3a
+ .long 0x3fc
+ .byte 0x9
+ .byte 0x3
+ .quad spare
+ .uleb128 0x34
+ .long .LASF137
+ .byte 0x1
+ .byte 0x3a
+ .long 0x3fc
+ .byte 0x9
+ .byte 0x3
+ .quad op1static
+ .uleb128 0x34
+ .long .LASF138
+ .byte 0x1
+ .byte 0x3a
+ .long 0x3fc
+ .byte 0x9
+ .byte 0x3
+ .quad op2static
+ .uleb128 0x34
+ .long .LASF139
+ .byte 0x1
+ .byte 0x3c
+ .long 0xe66
+ .byte 0x9
+ .byte 0x3
+ .quad from_dec_data
+ .uleb128 0x6
+ .byte 0x8
+ .long 0x42d
+ .uleb128 0xe
+ .long 0xe7c
+ .long 0x4c7
+ .uleb128 0xf
+ .long 0x86
+ .byte 0xf
+ .byte 0x0
+ .uleb128 0x34
+ .long .LASF140
+ .byte 0x2
+ .byte 0x38
+ .long 0xe6c
+ .byte 0x9
+ .byte 0x3
+ .quad tests
+ .uleb128 0xe
+ .long 0xea2
+ .long 0x95
+ .uleb128 0x35
+ .long 0x86
+ .value 0x3e7
+ .byte 0x0
+ .uleb128 0x34
+ .long .LASF141
+ .byte 0x2
+ .byte 0x4f
+ .long 0xe91
+ .byte 0x9
+ .byte 0x3
+ .quad failed
+ .uleb128 0xe
+ .long 0xec7
+ .long 0x95
+ .uleb128 0xf
+ .long 0x86
+ .byte 0x63
+ .byte 0x0
+ .uleb128 0x34
+ .long .LASF142
+ .byte 0x2
+ .byte 0x50
+ .long 0xeb7
+ .byte 0x9
+ .byte 0x3
+ .quad failmsg
+ .uleb128 0x36
+ .long .LASF143
+ .byte 0x6
+ .byte 0x8e
+ .long 0x2b5
+ .byte 0x1
+ .byte 0x1
+ .uleb128 0x36
+ .long .LASF144
+ .byte 0x6
+ .byte 0x8f
+ .long 0x2b5
+ .byte 0x1
+ .byte 0x1
+ .uleb128 0x37
+ .long 0xf06
+ .byte 0x1
+ .long 0x8d
+ .uleb128 0xb
+ .long 0x2d
+ .byte 0x0
+ .uleb128 0x38
+ .long .LASF145
+ .byte 0x3
+ .value 0x117
+ .long 0xf14
+ .byte 0x1
+ .byte 0x1
+ .uleb128 0x6
+ .byte 0x8
+ .long 0xef6
+ .uleb128 0x38
+ .long .LASF146
+ .byte 0x3
+ .value 0x132
+ .long 0x25f
+ .byte 0x1
+ .byte 0x1
+ .uleb128 0xa
+ .long 0xf3e
+ .byte 0x1
+ .uleb128 0xb
+ .long 0x254
+ .uleb128 0xb
+ .long 0x5b
+ .uleb128 0xb
+ .long 0x254
+ .byte 0x0
+ .uleb128 0x36
+ .long .LASF147
+ .byte 0x9
+ .byte 0x3f
+ .long 0xf4b
+ .byte 0x1
+ .byte 0x1
+ .uleb128 0x6
+ .byte 0x8
+ .long 0xf28
+ .byte 0x0
+ .section .debug_abbrev
+ .uleb128 0x1
+ .uleb128 0x11
+ .byte 0x1
+ .uleb128 0x10
+ .uleb128 0x6
+ .uleb128 0x12
+ .uleb128 0x1
+ .uleb128 0x11
+ .uleb128 0x1
+ .uleb128 0x25
+ .uleb128 0xe
+ .uleb128 0x13
+ .uleb128 0xb
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x1b
+ .uleb128 0xe
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x2
+ .uleb128 0x16
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x24
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3e
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x4
+ .uleb128 0x24
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3e
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x5
+ .uleb128 0xf
+ .byte 0x0
+ .uleb128 0xb
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x6
+ .uleb128 0xf
+ .byte 0x0
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x7
+ .uleb128 0x13
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x8
+ .uleb128 0xd
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0x5
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x38
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x9
+ .uleb128 0x26
+ .byte 0x0
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xa
+ .uleb128 0x15
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0x27
+ .uleb128 0xc
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xb
+ .uleb128 0x5
+ .byte 0x0
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xc
+ .uleb128 0x16
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xd
+ .uleb128 0xd
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x38
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xe
+ .uleb128 0x1
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xf
+ .uleb128 0x21
+ .byte 0x0
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2f
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x10
+ .uleb128 0xd
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x38
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x11
+ .uleb128 0x4
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x12
+ .uleb128 0x28
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x1c
+ .uleb128 0xd
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x13
+ .uleb128 0x13
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3c
+ .uleb128 0xc
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x14
+ .uleb128 0x17
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x15
+ .uleb128 0xd
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x16
+ .uleb128 0x2e
+ .byte 0x0
+ .uleb128 0x3f
+ .uleb128 0xc
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x27
+ .uleb128 0xc
+ .uleb128 0x11
+ .uleb128 0x1
+ .uleb128 0x12
+ .uleb128 0x1
+ .uleb128 0x40
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x17
+ .uleb128 0x2e
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0x3f
+ .uleb128 0xc
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x27
+ .uleb128 0xc
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x11
+ .uleb128 0x1
+ .uleb128 0x12
+ .uleb128 0x1
+ .uleb128 0x40
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x18
+ .uleb128 0x5
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x19
+ .uleb128 0x5
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x1a
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x1b
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x1c
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x1d
+ .uleb128 0x2e
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0x3f
+ .uleb128 0xc
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0x5
+ .uleb128 0x27
+ .uleb128 0xc
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x11
+ .uleb128 0x1
+ .uleb128 0x12
+ .uleb128 0x1
+ .uleb128 0x40
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x1e
+ .uleb128 0x5
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0x5
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x1f
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0x5
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x20
+ .uleb128 0x2e
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0x3f
+ .uleb128 0xc
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0x5
+ .uleb128 0x27
+ .uleb128 0xc
+ .uleb128 0x11
+ .uleb128 0x1
+ .uleb128 0x12
+ .uleb128 0x1
+ .uleb128 0x40
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x21
+ .uleb128 0x5
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0x5
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x22
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0x5
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x23
+ .uleb128 0x2e
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0x3f
+ .uleb128 0xc
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0x5
+ .uleb128 0x27
+ .uleb128 0xc
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x11
+ .uleb128 0x1
+ .uleb128 0x12
+ .uleb128 0x1
+ .uleb128 0x40
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x24
+ .uleb128 0x5
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0x5
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x25
+ .uleb128 0xb
+ .byte 0x1
+ .uleb128 0x55
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x26
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0x5
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x27
+ .uleb128 0xb
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0x11
+ .uleb128 0x1
+ .uleb128 0x12
+ .uleb128 0x1
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x28
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0x5
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x29
+ .uleb128 0xb
+ .byte 0x1
+ .uleb128 0x11
+ .uleb128 0x1
+ .uleb128 0x12
+ .uleb128 0x1
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x2a
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0x5
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x2b
+ .uleb128 0x2e
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x27
+ .uleb128 0xc
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x20
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x2c
+ .uleb128 0x5
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x2d
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x2e
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x2f
+ .uleb128 0x1d
+ .byte 0x1
+ .uleb128 0x31
+ .uleb128 0x13
+ .uleb128 0x11
+ .uleb128 0x1
+ .uleb128 0x12
+ .uleb128 0x1
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x30
+ .uleb128 0x5
+ .byte 0x0
+ .uleb128 0x31
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x31
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x31
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x32
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x31
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x33
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x31
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x34
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x35
+ .uleb128 0x21
+ .byte 0x0
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2f
+ .uleb128 0x5
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x36
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x3f
+ .uleb128 0xc
+ .uleb128 0x3c
+ .uleb128 0xc
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x37
+ .uleb128 0x15
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0x27
+ .uleb128 0xc
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x38
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0x5
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x3f
+ .uleb128 0xc
+ .uleb128 0x3c
+ .uleb128 0xc
+ .byte 0x0
+ .byte 0x0
+ .byte 0x0
+ .section .debug_pubnames,"",@progbits
+ .long 0x27a
+ .value 0x2
+ .long .Ldebug_info0
+ .long 0xf52
+ .long 0x4d2
+ .string "yasm_intnum_initialize"
+ .long 0x4ef
+ .string "yasm_intnum_cleanup"
+ .long 0x50c
+ .string "yasm_intnum_create_dec"
+ .long 0x55f
+ .string "yasm_intnum_create_bin"
+ .long 0x5b2
+ .string "yasm_intnum_create_oct"
+ .long 0x605
+ .string "yasm_intnum_create_hex"
+ .long 0x658
+ .string "yasm_intnum_create_charconst_nasm"
+ .long 0x6ba
+ .string "yasm_intnum_create_uint"
+ .long 0x6f8
+ .string "yasm_intnum_create_int"
+ .long 0x736
+ .string "yasm_intnum_copy"
+ .long 0x786
+ .string "yasm_intnum_destroy"
+ .long 0x7b9
+ .string "yasm_intnum_calc"
+ .long 0x84a
+ .string "yasm_intnum_zero"
+ .long 0x87d
+ .string "yasm_intnum_is_zero"
+ .long 0x8b1
+ .string "yasm_intnum_is_pos1"
+ .long 0x8e5
+ .string "yasm_intnum_is_neg1"
+ .long 0x91c
+ .string "yasm_intnum_sign"
+ .long 0x952
+ .string "yasm_intnum_get_uint"
+ .long 0x989
+ .string "yasm_intnum_get_int"
+ .long 0x9d3
+ .string "yasm_intnum_check_size"
+ .long 0xa8e
+ .string "yasm_intnum_get_sized"
+ .long 0xb8c
+ .string "yasm_intnum_get_leb128"
+ .long 0xc1d
+ .string "yasm_intnum_size_leb128"
+ .long 0xc74
+ .string "yasm_intnum_print"
+ .long 0xd36
+ .string "main"
+ .long 0x0
+ .section .debug_aranges,"",@progbits
+ .long 0x2c
+ .value 0x2
+ .long .Ldebug_info0
+ .byte 0x8
+ .byte 0x0
+ .value 0x0
+ .value 0x0
+ .quad .Ltext0
+ .quad .Letext0-.Ltext0
+ .quad 0x0
+ .quad 0x0
+ .section .debug_ranges,"",@progbits
+.Ldebug_ranges0:
+ .quad .LBB2-.Ltext0
+ .quad .LBE2-.Ltext0
+ .quad .LBB4-.Ltext0
+ .quad .LBE4-.Ltext0
+ .quad .LBB3-.Ltext0
+ .quad .LBE3-.Ltext0
+ .quad 0x0
+ .quad 0x0
+ .quad .LBB7-.Ltext0
+ .quad .LBE7-.Ltext0
+ .quad .LBB16-.Ltext0
+ .quad .LBE16-.Ltext0
+ .quad .LBB15-.Ltext0
+ .quad .LBE15-.Ltext0
+ .quad .LBB14-.Ltext0
+ .quad .LBE14-.Ltext0
+ .quad .LBB11-.Ltext0
+ .quad .LBE11-.Ltext0
+ .quad .LBB10-.Ltext0
+ .quad .LBE10-.Ltext0
+ .quad 0x0
+ .quad 0x0
+ .quad .LBB9-.Ltext0
+ .quad .LBE9-.Ltext0
+ .quad .LBB18-.Ltext0
+ .quad .LBE18-.Ltext0
+ .quad .LBB13-.Ltext0
+ .quad .LBE13-.Ltext0
+ .quad 0x0
+ .quad 0x0
+ .section .debug_str,"MS",@progbits,1
+.LASF150:
+ .string "/home/pete/yasm"
+.LASF139:
+ .string "from_dec_data"
+.LASF31:
+ .string "_shortbuf"
+.LASF137:
+ .string "op1static"
+.LASF97:
+ .string "yasm_intnum_create_oct"
+.LASF140:
+ .string "tests"
+.LASF38:
+ .string "_IO_lock_t"
+.LASF20:
+ .string "_IO_buf_end"
+.LASF51:
+ .string "YASM_EXPR_DIV"
+.LASF128:
+ .string "yasm_intnum_size_leb128"
+.LASF46:
+ .string "origsize"
+.LASF127:
+ .string "ptr_orig"
+.LASF18:
+ .string "_IO_write_end"
+.LASF4:
+ .string "unsigned int"
+.LASF70:
+ .string "YASM_EXPR_GE"
+.LASF12:
+ .string "_flags"
+.LASF122:
+ .string "valsize"
+.LASF67:
+ .string "YASM_EXPR_GT"
+.LASF147:
+ .string "yasm_internal_error_"
+.LASF24:
+ .string "_markers"
+.LASF75:
+ .string "YASM_EXPR_SEGOFF"
+.LASF6:
+ .string "short int"
+.LASF73:
+ .string "YASM_EXPR_SEG"
+.LASF95:
+ .string "yasm_intnum_create_bin"
+.LASF72:
+ .string "YASM_EXPR_NONNUM"
+.LASF78:
+ .string "wordptr"
+.LASF74:
+ .string "YASM_EXPR_WRT"
+.LASF102:
+ .string "yasm_intnum_copy"
+.LASF125:
+ .string "warn"
+.LASF120:
+ .string "yasm_intnum_get_sized"
+.LASF43:
+ .string "_pos"
+.LASF151:
+ .string "run_test"
+.LASF144:
+ .string "stdout"
+.LASF115:
+ .string "size"
+.LASF100:
+ .string "yasm_intnum_create_uint"
+.LASF123:
+ .string "shift"
+.LASF65:
+ .string "YASM_EXPR_LNOT"
+.LASF106:
+ .string "carry"
+.LASF92:
+ .string "yasm_intnum_cleanup"
+.LASF90:
+ .string "result"
+.LASF71:
+ .string "YASM_EXPR_NE"
+.LASF101:
+ .string "yasm_intnum_create_int"
+.LASF112:
+ .string "yasm_intnum_get_uint"
+.LASF149:
+ .string "libyasm/tests/leb128_test.c"
+.LASF98:
+ .string "yasm_intnum_create_hex"
+.LASF105:
+ .string "operand"
+.LASF22:
+ .string "_IO_backup_base"
+.LASF118:
+ .string "carry_in"
+.LASF33:
+ .string "_offset"
+.LASF119:
+ .string "retval"
+.LASF26:
+ .string "_fileno"
+.LASF7:
+ .string "size_t"
+.LASF86:
+ .string "sign"
+.LASF84:
+ .string "INTNUM_BV"
+.LASF15:
+ .string "_IO_read_base"
+.LASF124:
+ .string "bigendian"
+.LASF23:
+ .string "_IO_save_end"
+.LASF41:
+ .string "_next"
+.LASF121:
+ .string "destsize"
+.LASF47:
+ .string "YASM_EXPR_IDENT"
+.LASF99:
+ .string "yasm_intnum_create_charconst_nasm"
+.LASF135:
+ .string "conv_bv"
+.LASF16:
+ .string "_IO_write_base"
+.LASF50:
+ .string "YASM_EXPR_MUL"
+.LASF56:
+ .string "YASM_EXPR_NOT"
+.LASF54:
+ .string "YASM_EXPR_SIGNMOD"
+.LASF36:
+ .string "_mode"
+.LASF69:
+ .string "YASM_EXPR_LE"
+.LASF111:
+ .string "yasm_intnum_sign"
+.LASF94:
+ .string "yasm_intnum_create_dec"
+.LASF66:
+ .string "YASM_EXPR_LT"
+.LASF13:
+ .string "_IO_read_ptr"
+.LASF126:
+ .string "yasm_intnum_get_leb128"
+.LASF60:
+ .string "YASM_EXPR_NOR"
+.LASF145:
+ .string "yasm_xmalloc"
+.LASF52:
+ .string "YASM_EXPR_SIGNDIV"
+.LASF59:
+ .string "YASM_EXPR_XOR"
+.LASF104:
+ .string "yasm_intnum_calc"
+.LASF40:
+ .string "_IO_marker"
+.LASF138:
+ .string "op2static"
+.LASF80:
+ .string "true"
+.LASF21:
+ .string "_IO_save_base"
+.LASF91:
+ .string "yasm_intnum_initialize"
+.LASF62:
+ .string "YASM_EXPR_SHR"
+.LASF87:
+ .string "negate"
+.LASF83:
+ .string "INTNUM_UL"
+.LASF133:
+ .string "numtests"
+.LASF34:
+ .string "__pad1"
+.LASF35:
+ .string "__pad2"
+.LASF0:
+ .string "long unsigned int"
+.LASF85:
+ .string "Test_Entry"
+.LASF88:
+ .string "input"
+.LASF107:
+ .string "yasm_intnum_zero"
+.LASF30:
+ .string "_vtable_offset"
+.LASF63:
+ .string "YASM_EXPR_LOR"
+.LASF108:
+ .string "yasm_intnum_is_zero"
+.LASF57:
+ .string "YASM_EXPR_OR"
+.LASF76:
+ .string "yasm_expr_op"
+.LASF141:
+ .string "failed"
+.LASF48:
+ .string "YASM_EXPR_ADD"
+.LASF142:
+ .string "failmsg"
+.LASF10:
+ .string "char"
+.LASF14:
+ .string "_IO_read_end"
+.LASF114:
+ .string "yasm_intnum_check_size"
+.LASF77:
+ .string "N_word"
+.LASF143:
+ .string "stdin"
+.LASF1:
+ .string "long int"
+.LASF96:
+ .string "intn"
+.LASF55:
+ .string "YASM_EXPR_NEG"
+.LASF129:
+ .string "yasm_intnum_print"
+.LASF49:
+ .string "YASM_EXPR_SUB"
+.LASF131:
+ .string "valstr"
+.LASF146:
+ .string "yasm_xfree"
+.LASF32:
+ .string "_lock"
+.LASF28:
+ .string "_old_offset"
+.LASF39:
+ .string "_IO_FILE"
+.LASF42:
+ .string "_sbuf"
+.LASF136:
+ .string "spare"
+.LASF103:
+ .string "yasm_intnum_destroy"
+.LASF45:
+ .string "type"
+.LASF109:
+ .string "yasm_intnum_is_pos1"
+.LASF2:
+ .string "unsigned char"
+.LASF89:
+ .string "outsize"
+.LASF93:
+ .string "line"
+.LASF130:
+ .string "test"
+.LASF17:
+ .string "_IO_write_ptr"
+.LASF79:
+ .string "false"
+.LASF117:
+ .string "rangetype"
+.LASF116:
+ .string "rshift"
+.LASF58:
+ .string "YASM_EXPR_AND"
+.LASF134:
+ .string "fail"
+.LASF8:
+ .string "__off_t"
+.LASF82:
+ .string "BitVector_from_Dec_static_data"
+.LASF5:
+ .string "signed char"
+.LASF3:
+ .string "short unsigned int"
+.LASF110:
+ .string "yasm_intnum_is_neg1"
+.LASF61:
+ .string "YASM_EXPR_SHL"
+.LASF132:
+ .string "main"
+.LASF25:
+ .string "_chain"
+.LASF113:
+ .string "yasm_intnum_get_int"
+.LASF11:
+ .string "FILE"
+.LASF27:
+ .string "_flags2"
+.LASF148:
+ .string "GNU C 4.0.2 (Debian 4.0.2-2)"
+.LASF68:
+ .string "YASM_EXPR_EQ"
+.LASF29:
+ .string "_cur_column"
+.LASF64:
+ .string "YASM_EXPR_LAND"
+.LASF9:
+ .string "__off64_t"
+.LASF37:
+ .string "_unused2"
+.LASF19:
+ .string "_IO_buf_base"
+.LASF53:
+ .string "YASM_EXPR_MOD"
+.LASF81:
+ .string "boolean"
+.LASF44:
+ .string "yasm_intnum"
+ .ident "GCC: (GNU) 4.0.2 (Debian 4.0.2-2)"
+ .section .note.GNU-stack,"",@progbits
diff --git a/modules/dbgfmts/dwarf2/tests/pass64/dwarf64_leb128.errwarn b/modules/dbgfmts/dwarf2/tests/pass64/dwarf64_leb128.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/tests/pass64/dwarf64_leb128.errwarn
diff --git a/modules/dbgfmts/dwarf2/tests/pass64/dwarf64_leb128.hex b/modules/dbgfmts/dwarf2/tests/pass64/dwarf64_leb128.hex
new file mode 100644
index 00000000..7a0fbd86
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/tests/pass64/dwarf64_leb128.hex
@@ -0,0 +1,91312 @@
+7f
+45
+4c
+46
+02
+01
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+3e
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f0
+5c
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+00
+00
+40
+00
+1f
+00
+01
+00
+48
+83
+ec
+08
+31
+f6
+bf
+80
+00
+00
+00
+e8
+00
+00
+00
+00
+31
+f6
+bf
+80
+00
+00
+00
+48
+89
+05
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+31
+f6
+bf
+80
+00
+00
+00
+48
+89
+05
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+31
+f6
+bf
+80
+00
+00
+00
+48
+89
+05
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+31
+f6
+bf
+80
+00
+00
+00
+48
+89
+05
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+bf
+80
+00
+00
+00
+48
+89
+05
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+89
+05
+00
+00
+00
+00
+48
+83
+c4
+08
+c3
+66
+66
+66
+90
+66
+66
+90
+48
+83
+ec
+08
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+48
+83
+c4
+08
+e9
+00
+00
+00
+00
+48
+89
+5c
+24
+e8
+48
+89
+6c
+24
+f0
+48
+89
+fb
+4c
+89
+64
+24
+f8
+bf
+10
+00
+00
+00
+48
+83
+ec
+18
+49
+89
+f4
+ff
+15
+00
+00
+00
+00
+c6
+40
+0c
+00
+48
+8b
+35
+00
+00
+00
+00
+48
+89
+da
+48
+8b
+3d
+00
+00
+00
+00
+48
+89
+c5
+e8
+00
+00
+00
+00
+83
+f8
+0c
+74
+7a
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+83
+f8
+1f
+7f
+38
+48
+8b
+3d
+00
+00
+00
+00
+c7
+45
+08
+00
+00
+00
+00
+31
+d2
+be
+20
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+89
+45
+00
+48
+89
+e8
+48
+8b
+1c
+24
+48
+8b
+6c
+24
+08
+4c
+8b
+64
+24
+10
+48
+83
+c4
+18
+c3
+66
+66
+66
+90
+48
+8b
+3d
+00
+00
+00
+00
+c7
+45
+08
+01
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+89
+45
+00
+48
+89
+e8
+48
+8b
+1c
+24
+48
+8b
+6c
+24
+08
+4c
+8b
+64
+24
+10
+48
+83
+c4
+18
+c3
+66
+66
+90
+ba
+00
+00
+00
+00
+4c
+89
+e6
+31
+ff
+31
+c0
+e8
+00
+00
+00
+00
+e9
+70
+ff
+ff
+ff
+66
+66
+66
+90
+66
+66
+90
+66
+66
+90
+48
+89
+6c
+24
+f0
+48
+89
+fd
+48
+89
+5c
+24
+e8
+4c
+89
+64
+24
+f8
+bf
+10
+00
+00
+00
+48
+83
+ec
+18
+49
+89
+f4
+ff
+15
+00
+00
+00
+00
+48
+89
+ef
+48
+89
+c3
+e8
+00
+00
+00
+00
+3c
+80
+88
+43
+0c
+0f
+87
+86
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+48
+89
+ee
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+83
+f8
+1f
+7f
+35
+48
+8b
+3d
+00
+00
+00
+00
+c7
+43
+08
+00
+00
+00
+00
+31
+d2
+be
+20
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+89
+03
+48
+89
+d8
+48
+8b
+6c
+24
+08
+48
+8b
+1c
+24
+4c
+8b
+64
+24
+10
+48
+83
+c4
+18
+c3
+66
+90
+48
+8b
+3d
+00
+00
+00
+00
+c7
+43
+08
+01
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+89
+03
+48
+89
+d8
+48
+8b
+6c
+24
+08
+48
+8b
+1c
+24
+4c
+8b
+64
+24
+10
+48
+83
+c4
+18
+c3
+66
+66
+66
+90
+ba
+00
+00
+00
+00
+4c
+89
+e6
+31
+ff
+31
+c0
+e8
+00
+00
+00
+00
+e9
+64
+ff
+ff
+ff
+66
+66
+66
+90
+66
+66
+90
+66
+66
+90
+48
+89
+6c
+24
+f0
+48
+89
+fd
+48
+89
+5c
+24
+e8
+4c
+89
+64
+24
+f8
+bf
+10
+00
+00
+00
+48
+83
+ec
+18
+49
+89
+f4
+ff
+15
+00
+00
+00
+00
+48
+89
+ef
+48
+89
+c3
+e8
+00
+00
+00
+00
+48
+8d
+04
+40
+3c
+80
+88
+43
+0c
+0f
+87
+82
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+48
+89
+ee
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+83
+f8
+1f
+7f
+33
+48
+8b
+3d
+00
+00
+00
+00
+c7
+43
+08
+00
+00
+00
+00
+31
+d2
+be
+20
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+89
+03
+48
+89
+d8
+48
+8b
+6c
+24
+08
+48
+8b
+1c
+24
+4c
+8b
+64
+24
+10
+48
+83
+c4
+18
+c3
+48
+8b
+3d
+00
+00
+00
+00
+c7
+43
+08
+01
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+89
+03
+48
+89
+d8
+48
+8b
+6c
+24
+08
+48
+8b
+1c
+24
+4c
+8b
+64
+24
+10
+48
+83
+c4
+18
+c3
+66
+90
+ba
+00
+00
+00
+00
+4c
+89
+e6
+31
+ff
+31
+c0
+e8
+00
+00
+00
+00
+e9
+68
+ff
+ff
+ff
+66
+66
+66
+90
+66
+66
+90
+66
+66
+90
+48
+89
+6c
+24
+f0
+48
+89
+fd
+48
+89
+5c
+24
+e8
+4c
+89
+64
+24
+f8
+bf
+10
+00
+00
+00
+48
+83
+ec
+18
+49
+89
+f4
+ff
+15
+00
+00
+00
+00
+48
+89
+ef
+48
+89
+c3
+e8
+00
+00
+00
+00
+48
+c1
+e0
+02
+3c
+80
+88
+43
+0c
+0f
+87
+82
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+48
+89
+ee
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+83
+f8
+1f
+7f
+33
+48
+8b
+3d
+00
+00
+00
+00
+c7
+43
+08
+00
+00
+00
+00
+31
+d2
+be
+20
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+89
+03
+48
+89
+d8
+48
+8b
+6c
+24
+08
+48
+8b
+1c
+24
+4c
+8b
+64
+24
+10
+48
+83
+c4
+18
+c3
+48
+8b
+3d
+00
+00
+00
+00
+c7
+43
+08
+01
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+89
+03
+48
+89
+d8
+48
+8b
+6c
+24
+08
+48
+8b
+1c
+24
+4c
+8b
+64
+24
+10
+48
+83
+c4
+18
+c3
+66
+90
+ba
+00
+00
+00
+00
+4c
+89
+e6
+31
+ff
+31
+c0
+e8
+00
+00
+00
+00
+e9
+68
+ff
+ff
+ff
+66
+66
+66
+90
+66
+66
+90
+66
+66
+90
+48
+89
+5c
+24
+e0
+48
+89
+fb
+48
+89
+6c
+24
+e8
+4c
+89
+64
+24
+f0
+4c
+89
+6c
+24
+f8
+48
+89
+f5
+48
+83
+ec
+28
+bf
+10
+00
+00
+00
+ff
+15
+00
+00
+00
+00
+48
+89
+df
+49
+89
+c5
+e8
+00
+00
+00
+00
+49
+89
+c4
+48
+8d
+04
+c5
+00
+00
+00
+00
+3c
+80
+41
+88
+45
+0c
+0f
+87
+b5
+00
+00
+00
+49
+83
+fc
+04
+0f
+87
+92
+00
+00
+00
+49
+c7
+45
+00
+00
+00
+00
+00
+41
+c7
+45
+08
+00
+00
+00
+00
+41
+83
+fc
+04
+77
+65
+44
+89
+e0
+ff
+24
+c5
+00
+00
+00
+00
+48
+0f
+be
+53
+03
+49
+0b
+55
+00
+48
+c1
+e2
+08
+49
+89
+55
+00
+48
+0f
+be
+43
+02
+48
+09
+c2
+48
+c1
+e2
+08
+49
+89
+55
+00
+48
+0f
+be
+43
+01
+48
+09
+c2
+48
+c1
+e2
+08
+49
+89
+55
+00
+48
+0f
+be
+03
+48
+09
+c2
+49
+89
+55
+00
+4c
+89
+e8
+48
+8b
+5c
+24
+08
+48
+8b
+6c
+24
+10
+4c
+8b
+64
+24
+18
+4c
+8b
+6c
+24
+20
+48
+83
+c4
+28
+c3
+66
+66
+90
+4d
+85
+e4
+75
+41
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+49
+89
+45
+00
+eb
+ca
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+41
+c7
+45
+08
+01
+00
+00
+00
+e9
+65
+ff
+ff
+ff
+ba
+00
+00
+00
+00
+48
+89
+ee
+31
+ff
+31
+c0
+e8
+00
+00
+00
+00
+e9
+35
+ff
+ff
+ff
+4a
+8d
+2c
+23
+31
+db
+66
+66
+66
+90
+48
+8b
+3d
+00
+00
+00
+00
+be
+08
+00
+00
+00
+48
+ff
+c3
+e8
+00
+00
+00
+00
+48
+0f
+be
+4d
+ff
+48
+8b
+3d
+00
+00
+00
+00
+31
+d2
+be
+08
+00
+00
+00
+48
+ff
+cd
+e8
+00
+00
+00
+00
+49
+39
+dc
+75
+cc
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+49
+89
+45
+00
+e9
+48
+ff
+ff
+ff
+49
+8b
+55
+00
+e9
+14
+ff
+ff
+ff
+49
+8b
+55
+00
+e9
+1b
+ff
+ff
+ff
+49
+8b
+55
+00
+90
+e9
+21
+ff
+ff
+ff
+66
+66
+66
+90
+66
+66
+66
+90
+66
+66
+90
+53
+48
+89
+fb
+bf
+10
+00
+00
+00
+ff
+15
+00
+00
+00
+00
+48
+89
+18
+c7
+40
+08
+00
+00
+00
+00
+c6
+40
+0c
+00
+5b
+c3
+90
+48
+85
+ff
+53
+48
+89
+fb
+78
+07
+5b
+eb
+d4
+66
+66
+66
+90
+48
+8b
+3d
+00
+00
+00
+00
+48
+f7
+db
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+48
+89
+d9
+31
+d2
+be
+20
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+48
+89
+fe
+e8
+00
+00
+00
+00
+bf
+10
+00
+00
+00
+ff
+15
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+48
+89
+c3
+e8
+00
+00
+00
+00
+c7
+43
+08
+01
+00
+00
+00
+48
+89
+03
+48
+89
+d8
+c6
+43
+0c
+00
+5b
+c3
+66
+66
+66
+90
+66
+66
+66
+90
+66
+66
+66
+90
+66
+66
+90
+48
+89
+6c
+24
+f8
+48
+89
+fd
+48
+89
+5c
+24
+f0
+bf
+10
+00
+00
+00
+48
+83
+ec
+18
+ff
+15
+00
+00
+00
+00
+8b
+55
+08
+48
+89
+c3
+85
+d2
+74
+21
+83
+fa
+01
+74
+45
+0f
+b6
+45
+0c
+89
+53
+08
+88
+43
+0c
+48
+89
+d8
+48
+8b
+6c
+24
+10
+48
+8b
+5c
+24
+08
+48
+83
+c4
+18
+c3
+48
+8b
+45
+00
+89
+53
+08
+48
+89
+03
+0f
+b6
+45
+0c
+88
+43
+0c
+48
+89
+d8
+48
+8b
+6c
+24
+10
+48
+8b
+5c
+24
+08
+48
+83
+c4
+18
+c3
+66
+66
+90
+66
+66
+90
+48
+8b
+7d
+00
+e8
+00
+00
+00
+00
+48
+89
+03
+0f
+b6
+45
+0c
+8b
+55
+08
+88
+43
+0c
+89
+53
+08
+48
+89
+d8
+48
+8b
+6c
+24
+10
+48
+8b
+5c
+24
+08
+48
+83
+c4
+18
+c3
+66
+66
+90
+66
+90
+53
+83
+7f
+08
+01
+48
+89
+fb
+74
+0e
+48
+89
+df
+4c
+8b
+1d
+00
+00
+00
+00
+5b
+41
+ff
+e3
+48
+8b
+3f
+e8
+00
+00
+00
+00
+48
+89
+df
+4c
+8b
+1d
+00
+00
+00
+00
+5b
+41
+ff
+e3
+66
+90
+48
+89
+5c
+24
+d0
+48
+89
+6c
+24
+d8
+48
+89
+d3
+4c
+89
+74
+24
+f0
+4c
+89
+7c
+24
+f8
+49
+89
+fe
+4c
+89
+64
+24
+e0
+4c
+89
+6c
+24
+e8
+48
+83
+ec
+48
+83
+7f
+08
+01
+89
+f5
+49
+89
+cf
+c7
+44
+24
+14
+00
+00
+00
+00
+0f
+84
+19
+01
+00
+00
+4c
+8b
+25
+00
+00
+00
+00
+4c
+89
+e7
+e8
+00
+00
+00
+00
+49
+8b
+0e
+31
+d2
+be
+20
+00
+00
+00
+4c
+89
+e7
+e8
+00
+00
+00
+00
+45
+31
+ed
+48
+85
+db
+74
+2b
+83
+7b
+08
+01
+0f
+84
+de
+00
+00
+00
+4c
+8b
+2d
+00
+00
+00
+00
+4c
+89
+ef
+e8
+00
+00
+00
+00
+48
+8b
+0b
+31
+d2
+be
+20
+00
+00
+00
+4c
+89
+ef
+e8
+00
+00
+00
+00
+48
+85
+db
+0f
+94
+d2
+83
+fd
+08
+0f
+95
+d0
+84
+c2
+74
+14
+83
+fd
+09
+0f
+95
+d2
+83
+fd
+12
+0f
+95
+d0
+84
+c2
+0f
+85
+ae
+00
+00
+00
+83
+fd
+1c
+77
+09
+89
+e8
+ff
+24
+c5
+00
+00
+00
+00
+ba
+00
+00
+00
+00
+be
+af
+01
+00
+00
+bf
+00
+00
+00
+00
+ff
+15
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+83
+f8
+1f
+7f
+44
+41
+83
+7e
+08
+01
+0f
+84
+9d
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+31
+d2
+be
+20
+00
+00
+00
+e8
+00
+00
+00
+00
+49
+89
+06
+48
+8b
+5c
+24
+18
+48
+8b
+6c
+24
+20
+4c
+8b
+64
+24
+28
+4c
+8b
+6c
+24
+30
+4c
+8b
+74
+24
+38
+4c
+8b
+7c
+24
+40
+48
+83
+c4
+48
+c3
+41
+83
+7e
+08
+01
+74
+49
+48
+8b
+3d
+00
+00
+00
+00
+41
+c7
+46
+08
+01
+00
+00
+00
+e8
+00
+00
+00
+00
+49
+89
+06
+eb
+bd
+4c
+8b
+2b
+e9
+3b
+ff
+ff
+ff
+4c
+8b
+27
+66
+66
+90
+66
+90
+e9
+fb
+fe
+ff
+ff
+ba
+00
+00
+00
+00
+be
+3f
+01
+00
+00
+bf
+00
+00
+00
+00
+ff
+15
+00
+00
+00
+00
+e9
+38
+ff
+ff
+ff
+90
+48
+8b
+35
+00
+00
+00
+00
+49
+8b
+3e
+e8
+00
+00
+00
+00
+e9
+79
+ff
+ff
+ff
+49
+8b
+3e
+e8
+00
+00
+00
+00
+41
+c7
+46
+08
+00
+00
+00
+00
+e9
+4e
+ff
+ff
+ff
+48
+8b
+0d
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+4c
+89
+ea
+4c
+89
+e6
+e8
+00
+00
+00
+00
+e9
+13
+ff
+ff
+ff
+48
+8b
+0d
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+4c
+89
+ea
+4c
+89
+e6
+e8
+00
+00
+00
+00
+e9
+f5
+fe
+ff
+ff
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+4c
+89
+e7
+e8
+00
+00
+00
+00
+89
+c6
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+e9
+ce
+fe
+ff
+ff
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+4c
+89
+ee
+4c
+89
+e7
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+89
+c6
+c1
+ee
+1f
+e8
+00
+00
+00
+00
+e9
+a1
+fe
+ff
+ff
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+4c
+89
+ee
+4c
+89
+e7
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+31
+f6
+85
+c0
+40
+0f
+9f
+d6
+e8
+00
+00
+00
+00
+e9
+71
+fe
+ff
+ff
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+4c
+89
+ee
+4c
+89
+e7
+e8
+00
+00
+00
+00
+89
+c6
+e9
+74
+ff
+ff
+ff
+ba
+00
+00
+00
+00
+be
+00
+00
+00
+00
+4c
+89
+ff
+31
+c0
+e8
+00
+00
+00
+00
+e9
+3a
+fe
+ff
+ff
+ba
+00
+00
+00
+00
+be
+00
+00
+00
+00
+4c
+89
+ff
+31
+c0
+e8
+00
+00
+00
+00
+e9
+21
+fe
+ff
+ff
+48
+8b
+3d
+00
+00
+00
+00
+4c
+89
+e6
+e8
+00
+00
+00
+00
+e9
+0d
+fe
+ff
+ff
+48
+8b
+3d
+00
+00
+00
+00
+48
+85
+ff
+0f
+84
+fd
+fd
+ff
+ff
+4c
+89
+e6
+e8
+00
+00
+00
+00
+e9
+f0
+fd
+ff
+ff
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+4c
+89
+e7
+e8
+00
+00
+00
+00
+85
+c0
+0f
+84
+1f
+02
+00
+00
+31
+f6
+e9
+ee
+fe
+ff
+ff
+48
+8b
+3d
+00
+00
+00
+00
+4c
+89
+ea
+4c
+89
+e6
+e8
+00
+00
+00
+00
+e9
+b6
+fd
+ff
+ff
+48
+8b
+3d
+00
+00
+00
+00
+48
+8d
+4c
+24
+14
+4c
+89
+ea
+4c
+89
+e6
+e8
+00
+00
+00
+00
+e9
+9a
+fd
+ff
+ff
+48
+8b
+3d
+00
+00
+00
+00
+48
+8d
+4c
+24
+14
+4c
+89
+ea
+4c
+89
+e6
+e8
+00
+00
+00
+00
+e9
+7e
+fd
+ff
+ff
+48
+8b
+3d
+00
+00
+00
+00
+4c
+89
+ea
+4c
+89
+e6
+e8
+00
+00
+00
+00
+e9
+67
+fd
+ff
+ff
+48
+8b
+3d
+00
+00
+00
+00
+4c
+89
+ea
+4c
+89
+e6
+e8
+00
+00
+00
+00
+e9
+50
+fd
+ff
+ff
+48
+8b
+3d
+00
+00
+00
+00
+4c
+89
+ea
+4c
+89
+e6
+e8
+00
+00
+00
+00
+e9
+39
+fd
+ff
+ff
+48
+8b
+3d
+00
+00
+00
+00
+4c
+89
+e6
+4c
+89
+ea
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+48
+89
+fe
+e8
+00
+00
+00
+00
+e9
+13
+fd
+ff
+ff
+8b
+53
+08
+85
+d2
+0f
+85
+6f
+01
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+4c
+89
+e6
+e8
+00
+00
+00
+00
+48
+8b
+03
+48
+8b
+3d
+00
+00
+00
+00
+89
+c6
+e8
+00
+00
+00
+00
+e9
+e3
+fc
+ff
+ff
+8b
+43
+08
+85
+c0
+0f
+85
+3f
+01
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+4c
+89
+e6
+e8
+00
+00
+00
+00
+48
+8b
+03
+48
+8b
+3d
+00
+00
+00
+00
+89
+c6
+e8
+00
+00
+00
+00
+e9
+b3
+fc
+ff
+ff
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+4c
+89
+e7
+e8
+00
+00
+00
+00
+85
+c0
+0f
+85
+c6
+00
+00
+00
+be
+01
+00
+00
+00
+e9
+ae
+fd
+ff
+ff
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+4c
+89
+ee
+4c
+89
+e7
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+31
+f6
+85
+c0
+40
+0f
+9e
+d6
+e8
+00
+00
+00
+00
+e9
+5d
+fc
+ff
+ff
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+4c
+89
+ee
+4c
+89
+e7
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+89
+c6
+f7
+d6
+c1
+ee
+1f
+e8
+00
+00
+00
+00
+e9
+2e
+fc
+ff
+ff
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+4c
+89
+ee
+4c
+89
+e7
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+31
+f6
+85
+c0
+40
+0f
+94
+d6
+e8
+00
+00
+00
+00
+e9
+fe
+fb
+ff
+ff
+ba
+00
+00
+00
+00
+be
+00
+00
+00
+00
+4c
+89
+ff
+31
+c0
+e8
+00
+00
+00
+00
+e9
+e5
+fb
+ff
+ff
+48
+8b
+3d
+00
+00
+00
+00
+4c
+89
+e6
+e8
+00
+00
+00
+00
+e9
+d1
+fb
+ff
+ff
+4c
+89
+ef
+e8
+00
+00
+00
+00
+31
+f6
+85
+c0
+0f
+85
+e0
+fc
+ff
+ff
+be
+01
+00
+00
+00
+e9
+d6
+fc
+ff
+ff
+4c
+89
+ef
+e8
+00
+00
+00
+00
+85
+c0
+be
+01
+00
+00
+00
+0f
+84
+c1
+fc
+ff
+ff
+31
+f6
+e9
+ba
+fc
+ff
+ff
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+e9
+88
+fb
+ff
+ff
+66
+66
+66
+90
+66
+66
+66
+90
+66
+66
+90
+66
+66
+90
+53
+83
+7f
+08
+01
+48
+89
+fb
+74
+09
+48
+c7
+03
+00
+00
+00
+00
+5b
+c3
+48
+8b
+3f
+e8
+00
+00
+00
+00
+c7
+43
+08
+00
+00
+00
+00
+48
+c7
+03
+00
+00
+00
+00
+5b
+c3
+66
+66
+90
+66
+90
+8b
+4f
+08
+85
+c9
+75
+0d
+48
+83
+3f
+00
+b8
+01
+00
+00
+00
+75
+02
+f3
+c3
+31
+c0
+c3
+66
+66
+90
+66
+66
+90
+66
+66
+90
+8b
+77
+08
+85
+f6
+75
+0b
+48
+83
+3f
+01
+b8
+01
+00
+00
+00
+74
+02
+31
+c0
+f3
+c3
+66
+66
+66
+90
+66
+66
+90
+66
+66
+90
+48
+83
+ec
+08
+83
+7f
+08
+01
+74
+09
+31
+d2
+48
+83
+c4
+08
+89
+d0
+c3
+48
+8b
+3f
+e8
+00
+00
+00
+00
+85
+c0
+ba
+01
+00
+00
+00
+74
+e6
+89
+d0
+48
+83
+c4
+08
+c3
+66
+66
+90
+66
+90
+44
+8b
+47
+08
+45
+85
+c0
+75
+0a
+31
+c0
+48
+83
+3f
+00
+0f
+95
+d0
+c3
+48
+8b
+3f
+e9
+00
+00
+00
+00
+66
+66
+90
+66
+90
+48
+83
+ec
+08
+8b
+47
+08
+85
+c0
+74
+25
+ff
+c8
+74
+29
+ba
+00
+00
+00
+00
+be
+f5
+01
+00
+00
+bf
+00
+00
+00
+00
+ff
+15
+00
+00
+00
+00
+31
+c0
+48
+83
+c4
+08
+c3
+66
+66
+90
+66
+90
+48
+8b
+07
+48
+83
+c4
+08
+c3
+48
+8b
+3f
+31
+d2
+be
+20
+00
+00
+00
+48
+83
+c4
+08
+e9
+00
+00
+00
+00
+66
+66
+90
+66
+90
+53
+8b
+47
+08
+48
+89
+fb
+85
+c0
+74
+25
+ff
+c8
+0f
+84
+30
+00
+00
+00
+ba
+00
+00
+00
+00
+be
+16
+02
+00
+00
+bf
+00
+00
+00
+00
+ff
+15
+00
+00
+00
+00
+31
+c0
+5b
+c3
+66
+66
+66
+90
+48
+8b
+07
+85
+c0
+79
+f3
+5b
+48
+b8
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+7f
+c3
+48
+8b
+3f
+e8
+00
+00
+00
+00
+85
+c0
+74
+e8
+48
+8b
+33
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+83
+f8
+1f
+7e
+0c
+5b
+48
+b8
+00
+00
+00
+00
+00
+00
+00
+80
+c3
+48
+8b
+3d
+00
+00
+00
+00
+31
+d2
+be
+20
+00
+00
+00
+e8
+00
+00
+00
+00
+85
+c0
+78
+dd
+5b
+48
+f7
+d8
+c3
+66
+66
+66
+90
+66
+66
+66
+90
+48
+89
+5c
+24
+d0
+4c
+89
+6c
+24
+e8
+48
+89
+fb
+4c
+89
+74
+24
+f0
+4c
+89
+7c
+24
+f8
+49
+89
+f6
+48
+89
+6c
+24
+d8
+4c
+89
+64
+24
+e0
+48
+83
+ec
+38
+83
+7f
+08
+01
+49
+89
+d5
+41
+89
+cf
+0f
+84
+b0
+00
+00
+00
+48
+8b
+2d
+00
+00
+00
+00
+48
+89
+ef
+e8
+00
+00
+00
+00
+48
+8b
+0b
+31
+d2
+be
+20
+00
+00
+00
+48
+89
+ef
+e8
+00
+00
+00
+00
+49
+83
+fe
+7f
+b8
+01
+00
+00
+00
+0f
+87
+3b
+00
+00
+00
+4d
+85
+ed
+0f
+85
+55
+00
+00
+00
+45
+85
+ff
+7e
+1c
+48
+89
+ef
+e8
+00
+00
+00
+00
+85
+c0
+0f
+85
+7f
+00
+00
+00
+31
+c0
+41
+83
+ff
+01
+0f
+94
+d0
+49
+29
+c6
+48
+89
+ef
+e8
+00
+00
+00
+00
+4c
+39
+f0
+0f
+9c
+d0
+0f
+b6
+c0
+48
+8b
+5c
+24
+08
+48
+8b
+6c
+24
+10
+4c
+8b
+64
+24
+18
+4c
+8b
+6c
+24
+20
+4c
+8b
+74
+24
+28
+4c
+8b
+7c
+24
+30
+48
+83
+c4
+38
+c3
+48
+89
+ef
+31
+db
+e8
+00
+00
+00
+00
+41
+89
+c4
+44
+89
+e6
+48
+89
+ef
+48
+ff
+c3
+e8
+00
+00
+00
+00
+49
+39
+dd
+75
+ed
+eb
+89
+48
+85
+d2
+66
+66
+90
+66
+90
+0f
+85
+4b
+00
+00
+00
+48
+8b
+2f
+66
+66
+66
+90
+66
+66
+90
+e9
+54
+ff
+ff
+ff
+48
+8b
+3d
+00
+00
+00
+00
+48
+89
+ee
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+48
+89
+fe
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+49
+8d
+56
+ff
+48
+39
+d0
+0f
+9c
+d0
+0f
+b6
+c0
+e9
+62
+ff
+ff
+ff
+48
+8b
+2d
+00
+00
+00
+00
+48
+8b
+37
+48
+89
+ef
+e8
+00
+00
+00
+00
+e9
+01
+ff
+ff
+ff
+66
+66
+66
+90
+66
+66
+66
+90
+48
+89
+5c
+24
+d0
+4c
+89
+64
+24
+e0
+48
+89
+fb
+4c
+89
+6c
+24
+e8
+4c
+89
+74
+24
+f0
+45
+89
+c4
+4c
+89
+7c
+24
+f8
+48
+89
+6c
+24
+d8
+45
+31
+ff
+48
+83
+ec
+58
+45
+85
+c0
+49
+89
+d6
+48
+89
+74
+24
+10
+48
+89
+4c
+24
+08
+44
+89
+4c
+24
+04
+4c
+8b
+2d
+00
+00
+00
+00
+0f
+88
+23
+02
+00
+00
+4a
+8d
+04
+f5
+00
+00
+00
+00
+48
+3d
+80
+00
+00
+00
+0f
+87
+bf
+01
+00
+00
+8b
+6c
+24
+60
+85
+ed
+0f
+85
+7b
+01
+00
+00
+44
+8b
+5c
+24
+04
+45
+85
+db
+0f
+84
+d5
+00
+00
+00
+ba
+00
+00
+00
+00
+be
+33
+02
+00
+00
+bf
+00
+00
+00
+00
+ff
+15
+00
+00
+00
+00
+83
+7b
+08
+01
+0f
+84
+d0
+00
+00
+00
+48
+8b
+2d
+00
+00
+00
+00
+48
+89
+ef
+e8
+00
+00
+00
+00
+48
+8b
+0b
+31
+d2
+be
+20
+00
+00
+00
+48
+89
+ef
+e8
+00
+00
+00
+00
+44
+8b
+54
+24
+60
+4d
+85
+ff
+0f
+95
+d3
+45
+85
+d2
+0f
+95
+d0
+84
+d8
+0f
+85
+b2
+00
+00
+00
+84
+db
+44
+89
+e2
+0f
+85
+61
+01
+00
+00
+44
+8b
+44
+24
+08
+31
+c9
+48
+89
+ee
+4c
+89
+ef
+e8
+00
+00
+00
+00
+48
+8d
+74
+24
+24
+4c
+89
+ef
+e8
+00
+00
+00
+00
+44
+8b
+4c
+24
+04
+48
+89
+c3
+45
+85
+c9
+0f
+84
+c4
+00
+00
+00
+ba
+00
+00
+00
+00
+be
+58
+02
+00
+00
+bf
+00
+00
+00
+00
+ff
+15
+00
+00
+00
+00
+48
+89
+df
+ff
+15
+00
+00
+00
+00
+48
+8b
+5c
+24
+28
+48
+8b
+6c
+24
+30
+4c
+8b
+64
+24
+38
+4c
+8b
+6c
+24
+40
+4c
+8b
+74
+24
+48
+4c
+8b
+7c
+24
+50
+48
+83
+c4
+58
+c3
+48
+8b
+74
+24
+10
+44
+89
+f2
+4c
+89
+ef
+e8
+00
+00
+00
+00
+83
+7b
+08
+01
+0f
+85
+30
+ff
+ff
+ff
+44
+8b
+54
+24
+60
+4d
+85
+ff
+48
+8b
+2b
+0f
+95
+d3
+45
+85
+d2
+0f
+95
+d0
+84
+d8
+0f
+84
+4e
+ff
+ff
+ff
+48
+8b
+3d
+00
+00
+00
+00
+48
+89
+ee
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+be
+80
+00
+00
+00
+44
+29
+fe
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+85
+c0
+0f
+85
+17
+ff
+ff
+ff
+48
+8b
+74
+24
+68
+ba
+00
+00
+00
+00
+31
+ff
+e8
+00
+00
+00
+00
+e9
+01
+ff
+ff
+ff
+48
+8b
+7c
+24
+10
+4c
+89
+f2
+48
+89
+c6
+e8
+00
+00
+00
+00
+e9
+3c
+ff
+ff
+ff
+48
+8b
+74
+24
+08
+b9
+02
+00
+00
+00
+4c
+89
+fa
+48
+89
+df
+e8
+a3
+fc
+ff
+ff
+85
+c0
+0f
+85
+68
+fe
+ff
+ff
+48
+8b
+4c
+24
+08
+48
+8b
+74
+24
+68
+ba
+00
+00
+00
+00
+31
+ff
+e8
+00
+00
+00
+00
+e9
+4d
+fe
+ff
+ff
+ba
+00
+00
+00
+00
+be
+29
+02
+00
+00
+bf
+00
+00
+00
+00
+ff
+15
+00
+00
+00
+00
+e9
+27
+fe
+ff
+ff
+66
+66
+90
+66
+66
+90
+48
+89
+ef
+e8
+00
+00
+00
+00
+4d
+85
+ff
+41
+89
+c4
+66
+90
+74
+15
+31
+db
+44
+89
+e6
+48
+89
+ef
+48
+ff
+c3
+e8
+00
+00
+00
+00
+49
+39
+df
+75
+ed
+31
+d2
+e9
+71
+fe
+ff
+ff
+66
+90
+44
+89
+c0
+f7
+d8
+4c
+63
+f8
+e9
+d0
+fd
+ff
+ff
+66
+66
+90
+48
+89
+5c
+24
+d8
+48
+89
+6c
+24
+e0
+48
+89
+fb
+4c
+89
+6c
+24
+f0
+4c
+89
+74
+24
+f8
+89
+d5
+4c
+89
+64
+24
+e8
+48
+83
+ec
+28
+8b
+47
+08
+49
+89
+f6
+4c
+8b
+2d
+00
+00
+00
+00
+85
+c0
+0f
+85
+69
+00
+00
+00
+48
+83
+3f
+00
+0f
+84
+c2
+00
+00
+00
+4c
+89
+ef
+e8
+00
+00
+00
+00
+48
+8b
+0b
+31
+d2
+be
+20
+00
+00
+00
+4c
+89
+ef
+e8
+00
+00
+00
+00
+85
+ed
+0f
+85
+4d
+00
+00
+00
+4c
+89
+ef
+e8
+00
+00
+00
+00
+4c
+8d
+60
+01
+31
+c0
+4d
+85
+e4
+4c
+89
+f3
+0f
+85
+59
+00
+00
+00
+80
+63
+ff
+7f
+48
+8b
+1c
+24
+48
+8b
+6c
+24
+08
+4c
+8b
+64
+24
+10
+4c
+8b
+6c
+24
+18
+4c
+8b
+74
+24
+20
+48
+83
+c4
+28
+c3
+66
+90
+ff
+c8
+75
+9d
+85
+ed
+4c
+8b
+2f
+74
+b8
+66
+66
+90
+66
+90
+4c
+89
+ef
+e8
+00
+00
+00
+00
+85
+c0
+0f
+85
+50
+00
+00
+00
+4c
+89
+ef
+4c
+89
+f3
+e8
+00
+00
+00
+00
+4c
+8d
+60
+02
+31
+c0
+4d
+85
+e4
+74
+a7
+31
+ed
+89
+ea
+be
+07
+00
+00
+00
+4c
+89
+ef
+e8
+00
+00
+00
+00
+48
+83
+c5
+07
+83
+c8
+80
+88
+03
+48
+ff
+c3
+49
+39
+ec
+77
+e0
+48
+89
+d8
+4c
+29
+f0
+e9
+7a
+ff
+ff
+ff
+b8
+01
+00
+00
+00
+c6
+06
+00
+e9
+71
+ff
+ff
+ff
+48
+8b
+3d
+00
+00
+00
+00
+4c
+89
+ee
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+4c
+8d
+60
+02
+e9
+3b
+ff
+ff
+ff
+66
+66
+66
+90
+66
+66
+66
+90
+66
+66
+66
+90
+48
+89
+5c
+24
+e8
+48
+89
+6c
+24
+f0
+48
+89
+fb
+4c
+89
+64
+24
+f8
+48
+83
+ec
+18
+8b
+47
+08
+41
+89
+f4
+48
+8b
+2d
+00
+00
+00
+00
+85
+c0
+0f
+85
+98
+00
+00
+00
+48
+83
+3f
+00
+ba
+01
+00
+00
+00
+0f
+84
+73
+00
+00
+00
+48
+89
+ef
+e8
+00
+00
+00
+00
+48
+8b
+0b
+31
+d2
+be
+20
+00
+00
+00
+48
+89
+ef
+e8
+00
+00
+00
+00
+45
+85
+e4
+0f
+84
+76
+00
+00
+00
+48
+89
+ef
+e8
+00
+00
+00
+00
+85
+c0
+0f
+84
+74
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+48
+89
+ee
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+8d
+48
+08
+66
+66
+66
+90
+48
+89
+c8
+48
+ba
+25
+49
+92
+24
+49
+92
+24
+49
+48
+f7
+ea
+48
+89
+c8
+48
+c1
+f8
+3f
+48
+d1
+fa
+48
+29
+c2
+48
+8b
+1c
+24
+48
+8b
+6c
+24
+08
+48
+89
+d0
+4c
+8b
+64
+24
+10
+48
+83
+c4
+18
+c3
+ff
+c8
+0f
+85
+6f
+ff
+ff
+ff
+45
+85
+e4
+48
+8b
+2f
+75
+8a
+48
+89
+ef
+e8
+00
+00
+00
+00
+48
+8d
+48
+07
+eb
+af
+48
+89
+ef
+e8
+00
+00
+00
+00
+48
+8d
+48
+08
+eb
+a1
+90
+48
+89
+6c
+24
+f0
+4c
+89
+64
+24
+f8
+48
+89
+fd
+48
+89
+5c
+24
+e8
+48
+83
+ec
+18
+8b
+47
+08
+49
+89
+f4
+85
+c0
+0f
+84
+1c
+00
+00
+00
+ff
+c8
+0f
+84
+3c
+00
+00
+00
+48
+8b
+1c
+24
+48
+8b
+6c
+24
+08
+4c
+8b
+64
+24
+10
+48
+83
+c4
+18
+c3
+90
+0f
+b6
+4f
+0c
+48
+8b
+17
+be
+00
+00
+00
+00
+4c
+89
+e7
+48
+8b
+1c
+24
+48
+8b
+6c
+24
+08
+4c
+8b
+64
+24
+10
+31
+c0
+48
+83
+c4
+18
+e9
+00
+00
+00
+00
+48
+8b
+3f
+e8
+00
+00
+00
+00
+0f
+b6
+4d
+0c
+48
+89
+c3
+4c
+89
+e7
+48
+89
+c2
+be
+00
+00
+00
+00
+31
+c0
+e8
+00
+00
+00
+00
+48
+89
+df
+4c
+8b
+1d
+00
+00
+00
+00
+48
+8b
+1c
+24
+48
+8b
+6c
+24
+08
+4c
+8b
+64
+24
+10
+48
+83
+c4
+18
+41
+ff
+e3
+66
+66
+66
+90
+66
+66
+66
+90
+41
+57
+41
+56
+41
+55
+41
+54
+55
+53
+48
+81
+ec
+a8
+00
+00
+00
+e8
+00
+00
+00
+00
+85
+c0
+ba
+01
+00
+00
+00
+74
+14
+48
+81
+c4
+a8
+00
+00
+00
+89
+d0
+5b
+5d
+41
+5c
+41
+5d
+41
+5e
+41
+5f
+c3
+48
+8d
+6c
+24
+30
+45
+31
+f6
+41
+bd
+00
+00
+00
+00
+e8
+9a
+ea
+ff
+ff
+41
+bf
+00
+00
+00
+00
+bf
+00
+00
+00
+00
+31
+c0
+c6
+05
+00
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+c7
+44
+24
+2c
+00
+00
+00
+00
+48
+c7
+44
+24
+20
+00
+00
+00
+00
+48
+c7
+44
+24
+18
+00
+00
+00
+00
+e9
+8f
+00
+00
+00
+4c
+89
+e7
+e8
+7a
+f1
+ff
+ff
+41
+8b
+45
+f4
+ba
+00
+00
+00
+00
+b9
+00
+00
+00
+00
+4d
+8b
+4d
+00
+4d
+8b
+45
+f8
+be
+00
+00
+00
+00
+85
+c0
+41
+8b
+07
+48
+89
+1c
+24
+48
+0f
+44
+ca
+85
+c0
+b8
+00
+00
+00
+00
+48
+0f
+44
+d0
+bf
+00
+00
+00
+00
+31
+c0
+bb
+01
+00
+00
+00
+e8
+00
+00
+00
+00
+bf
+46
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+8b
+3d
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+85
+db
+0f
+85
+fe
+00
+00
+00
+41
+ff
+c6
+01
+5c
+24
+2c
+48
+83
+44
+24
+18
+20
+49
+83
+c7
+20
+49
+83
+c5
+20
+48
+83
+44
+24
+20
+20
+41
+83
+fe
+10
+0f
+84
+19
+01
+00
+00
+49
+8b
+7d
+f8
+e8
+00
+00
+00
+00
+31
+f6
+48
+89
+c3
+48
+89
+c7
+e8
+2d
+ed
+ff
+ff
+48
+89
+df
+49
+89
+c4
+ff
+15
+00
+00
+00
+00
+41
+8b
+55
+f4
+85
+d2
+0f
+85
+95
+00
+00
+00
+41
+8b
+75
+f0
+4c
+89
+e7
+e8
+19
+fd
+ff
+ff
+49
+3b
+45
+00
+48
+89
+c3
+0f
+85
+2a
+ff
+ff
+ff
+b8
+01
+00
+00
+00
+66
+66
+66
+90
+66
+66
+90
+c6
+44
+28
+ff
+ff
+48
+ff
+c0
+48
+83
+f8
+65
+75
+f2
+41
+8b
+17
+48
+89
+ee
+4c
+89
+e7
+e8
+a4
+fb
+ff
+ff
+49
+3b
+45
+00
+48
+89
+c3
+0f
+84
+fe
+00
+00
+00
+4c
+89
+e7
+e8
+6f
+f0
+ff
+ff
+48
+8b
+44
+24
+18
+ba
+00
+00
+00
+00
+4d
+8b
+4d
+00
+b9
+00
+00
+00
+00
+be
+00
+00
+00
+00
+4c
+8b
+00
+48
+8b
+44
+24
+20
+8b
+00
+85
+c0
+41
+8b
+07
+48
+89
+1c
+24
+48
+0f
+44
+ca
+85
+c0
+b8
+00
+00
+00
+00
+48
+0f
+44
+d0
+e9
+e9
+fe
+ff
+ff
+31
+c9
+31
+d2
+be
+08
+00
+00
+00
+4c
+89
+e7
+e8
+4f
+f0
+ff
+ff
+e9
+55
+ff
+ff
+ff
+31
+c0
+b9
+00
+00
+00
+00
+ba
+00
+00
+00
+00
+be
+00
+00
+00
+00
+bf
+00
+00
+00
+00
+41
+ff
+c6
+e8
+00
+00
+00
+00
+49
+83
+c7
+20
+01
+5c
+24
+2c
+48
+83
+44
+24
+18
+20
+49
+83
+c5
+20
+48
+83
+44
+24
+20
+20
+41
+83
+fe
+10
+0f
+85
+e7
+fe
+ff
+ff
+e8
+35
+e9
+ff
+ff
+44
+89
+f6
+2b
+74
+24
+2c
+41
+bc
+64
+00
+00
+00
+8b
+54
+24
+2c
+41
+b9
+00
+00
+00
+00
+b9
+10
+00
+00
+00
+bf
+00
+00
+00
+00
+41
+89
+f0
+45
+0f
+af
+c4
+41
+8d
+40
+0f
+45
+85
+c0
+44
+0f
+48
+c0
+31
+c0
+41
+c1
+f8
+04
+e8
+00
+00
+00
+00
+31
+d2
+83
+7c
+24
+2c
+00
+0f
+95
+d2
+48
+81
+c4
+a8
+00
+00
+00
+5b
+5d
+41
+5c
+41
+5d
+41
+5e
+41
+5f
+89
+d0
+c3
+48
+85
+c0
+0f
+84
+8b
+00
+00
+00
+49
+8b
+7d
+08
+31
+f6
+b9
+01
+00
+00
+00
+0f
+b6
+44
+0f
+ff
+38
+44
+29
+ff
+b8
+01
+00
+00
+00
+0f
+45
+f0
+85
+f6
+0f
+94
+d2
+48
+39
+cb
+0f
+97
+d0
+48
+ff
+c1
+84
+c2
+75
+dd
+85
+f6
+0f
+84
+55
+00
+00
+00
+4c
+89
+e7
+bb
+01
+00
+00
+00
+e8
+2d
+ef
+ff
+ff
+48
+8b
+44
+24
+20
+ba
+00
+00
+00
+00
+b9
+00
+00
+00
+00
+bf
+00
+00
+00
+00
+be
+00
+00
+00
+00
+8b
+00
+85
+c0
+41
+8b
+07
+48
+0f
+44
+ca
+85
+c0
+b8
+00
+00
+00
+00
+48
+0f
+44
+d0
+48
+8b
+44
+24
+18
+4c
+8b
+00
+31
+c0
+e8
+00
+00
+00
+00
+bf
+46
+00
+00
+00
+e9
+b4
+fd
+ff
+ff
+4c
+89
+e7
+31
+db
+e8
+db
+ee
+ff
+ff
+bf
+2e
+00
+00
+00
+e9
+a0
+fd
+ff
+ff
+00
+0c
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+b6
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+1a
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+1f
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+b6
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+2d
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+32
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+b6
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+40
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+76
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+45
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+b6
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+53
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+75
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+58
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+b6
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+64
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+74
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+69
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+b7
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+70
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+73
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+87
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+73
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+8c
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+b8
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+93
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+74
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+98
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+b9
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+9f
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+75
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+a4
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+b9
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ab
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+76
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+b0
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+b9
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+b7
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+bc
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+b9
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+c3
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+cc
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+b9
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+f0
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+ba
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+fb
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+05
+01
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+73
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+0d
+01
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bb
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+19
+01
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+1e
+01
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bc
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+2b
+01
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+3e
+01
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bd
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+63
+01
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+6f
+01
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+be
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+91
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+6a
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9d
+01
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bf
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+d0
+01
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+ba
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+db
+01
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c0
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ed
+01
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+f5
+01
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c1
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+fc
+01
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+01
+02
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bc
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+0e
+02
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+21
+02
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bd
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+43
+02
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+4f
+02
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+be
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+71
+02
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+6a
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7d
+02
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bf
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+b0
+02
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+ba
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+bb
+02
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c0
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+d1
+02
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+d9
+02
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c2
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+e0
+02
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+e5
+02
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bc
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+f2
+02
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+05
+03
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bd
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+25
+03
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+31
+03
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+be
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+51
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+6a
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5d
+03
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bf
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+90
+03
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+ba
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+9b
+03
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c0
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+b1
+03
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+b9
+03
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c3
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+c0
+03
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+c5
+03
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bc
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+d2
+03
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+e5
+03
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bd
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+05
+04
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+11
+04
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+be
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+31
+04
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+6a
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3d
+04
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bf
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+75
+04
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+ba
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+80
+04
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c0
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+c1
+04
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+91
+04
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+28
+05
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+2d
+05
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+be
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+3a
+05
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+3f
+05
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c4
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+51
+05
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+6a
+04
+00
+00
+30
+00
+00
+00
+00
+00
+00
+00
+5d
+05
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bf
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+73
+05
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+80
+05
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c5
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+8c
+05
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+9b
+05
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c6
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+a7
+05
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ac
+05
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+be
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+eb
+05
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+ba
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+13
+06
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+1b
+06
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c4
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+22
+06
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+31
+06
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c6
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+38
+06
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+40
+06
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c7
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+4b
+06
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+ba
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+52
+06
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+5a
+06
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+be
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+98
+06
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+ba
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+f5
+06
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+be
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+30
+07
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c8
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+3c
+07
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+b9
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+46
+07
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c8
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+92
+07
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+75
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+9a
+07
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c4
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ac
+07
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c6
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+c5
+07
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+74
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+cd
+07
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c4
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+df
+07
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c6
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+11
+08
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+91
+04
+00
+00
+30
+00
+00
+00
+00
+00
+00
+00
+16
+08
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+6a
+04
+00
+00
+68
+00
+00
+00
+00
+00
+00
+00
+20
+08
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+4b
+00
+00
+00
+00
+00
+00
+00
+26
+08
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c9
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+2d
+08
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+32
+08
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bc
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+4a
+08
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+56
+08
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bd
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+8a
+08
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+97
+08
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+be
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+b6
+08
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+30
+00
+00
+00
+00
+00
+00
+00
+c0
+08
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+4b
+00
+00
+00
+00
+00
+00
+00
+c6
+08
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c9
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+d3
+08
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+db
+08
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+ca
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+e8
+08
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+b9
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+fc
+08
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+03
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+76
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+0e
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+cb
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+1a
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+76
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+21
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+2c
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+cb
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+38
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+3d
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c4
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+45
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+cc
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+4e
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+53
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+cd
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+5f
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+64
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c4
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+6f
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+ce
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+76
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+80
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+cd
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+8c
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+91
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c4
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+9c
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+ce
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+a3
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+b0
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+cd
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+bc
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+c1
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c4
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+cc
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+cf
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+d8
+09
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+76
+00
+00
+00
+00
+00
+00
+00
+dd
+09
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+62
+00
+00
+00
+00
+00
+00
+00
+e7
+09
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+d0
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+f1
+09
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+7a
+00
+00
+00
+00
+00
+00
+00
+f6
+09
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+62
+00
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+d0
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+0c
+0a
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+14
+0a
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c7
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+20
+0a
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+31
+0a
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+ca
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+3d
+0a
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+42
+0a
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c4
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+4a
+0a
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+cc
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+60
+0a
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+6b
+0a
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+d1
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+77
+0a
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+87
+0a
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+d2
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+93
+0a
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+a3
+0a
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+d3
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+af
+0a
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ba
+0a
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+d4
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+c6
+0a
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+d1
+0a
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+d5
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+dd
+0a
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+e8
+0a
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+d6
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+f4
+0a
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+0a
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+d4
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+06
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+0e
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+d7
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+25
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+2d
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+ca
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+37
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+3e
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c5
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+55
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+5d
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+ca
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+67
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+6e
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+d8
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+7a
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+7f
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c4
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+87
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+cc
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+a0
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+a5
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c4
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+b0
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+ce
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+b7
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+c4
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+cd
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+d0
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+d5
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c4
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+e0
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+ce
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+e7
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+f3
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+cd
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+04
+0c
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c4
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+0f
+0c
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+cf
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+16
+0c
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+23
+0c
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+cd
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+2d
+0c
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+5e
+00
+00
+00
+00
+00
+00
+00
+32
+0c
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+62
+00
+00
+00
+00
+00
+00
+00
+3c
+0c
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+d0
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+48
+0c
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+50
+0c
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+d7
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+5d
+0c
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+cc
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+79
+0c
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+cc
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+94
+0c
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+77
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+99
+0c
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c4
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+c7
+0c
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+b9
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+37
+0d
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+d9
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+67
+0d
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+da
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+80
+0d
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+7c
+00
+00
+00
+00
+00
+00
+00
+8a
+0d
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+4b
+00
+00
+00
+00
+00
+00
+00
+90
+0d
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c9
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+b7
+0d
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bd
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+d4
+0d
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+7c
+00
+00
+00
+00
+00
+00
+00
+de
+0d
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+4b
+00
+00
+00
+00
+00
+00
+00
+e4
+0d
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c9
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+07
+0e
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+db
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+15
+0e
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+1a
+0e
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c7
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+21
+0e
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+26
+0e
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bc
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+3f
+0e
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+4b
+0e
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bd
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+9b
+0e
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+a3
+0e
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c4
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+b5
+0e
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c6
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+da
+0e
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+db
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+f6
+0e
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bc
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+2c
+0f
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+db
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+3d
+0f
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+dc
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+68
+0f
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+70
+0f
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c7
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+77
+0f
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+7f
+0f
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+dd
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+86
+0f
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+8b
+0f
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bc
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+a4
+0f
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+af
+0f
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+ca
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+03
+10
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+75
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+3c
+10
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+a6
+00
+00
+00
+00
+00
+00
+00
+46
+10
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+4b
+00
+00
+00
+00
+00
+00
+00
+4c
+10
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c9
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+5d
+10
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+74
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+65
+10
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c4
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+77
+10
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c6
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ad
+10
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+de
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ba
+10
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+df
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+d0
+10
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+a6
+00
+00
+00
+00
+00
+00
+00
+da
+10
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+4b
+00
+00
+00
+00
+00
+00
+00
+e0
+10
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c9
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+e9
+10
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c8
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+1c
+11
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+e0
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+49
+11
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+51
+11
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+ca
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+58
+11
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+65
+11
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c5
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+6c
+11
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+71
+11
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+cc
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+83
+11
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+6a
+04
+00
+00
+b8
+00
+00
+00
+00
+00
+00
+00
+8a
+11
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bf
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+9f
+11
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+e1
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+d0
+11
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+6a
+04
+00
+00
+90
+00
+00
+00
+00
+00
+00
+00
+d7
+11
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bf
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+e1
+11
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+90
+00
+00
+00
+00
+00
+00
+00
+eb
+11
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+4b
+00
+00
+00
+00
+00
+00
+00
+f1
+11
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c9
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+04
+12
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+db
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+1e
+12
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+dc
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+6b
+12
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+75
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+85
+12
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c4
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+97
+12
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c6
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+a7
+12
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bc
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+f4
+12
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+db
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+07
+13
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bc
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+23
+13
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bd
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+53
+13
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+5b
+13
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c7
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+62
+13
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+67
+13
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bc
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+9f
+13
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+75
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+be
+13
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c4
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+d0
+13
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c6
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+e1
+13
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+db
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+f0
+13
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+f8
+13
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c7
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+13
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+78
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+04
+14
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bc
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+57
+14
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bc
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+65
+14
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+bc
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+b8
+14
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+c1
+00
+00
+00
+00
+00
+00
+00
+d4
+14
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+e2
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+dc
+14
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+e3
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ee
+14
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+ca
+00
+00
+00
+00
+00
+00
+00
+f5
+14
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+e2
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+14
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c8
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+32
+15
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+e4
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+5d
+15
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+7e
+04
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+68
+15
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+7e
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6d
+15
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+d2
+00
+00
+00
+00
+00
+00
+00
+75
+15
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+de
+01
+00
+00
+fb
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+7b
+15
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+e5
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+8c
+15
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+7e
+04
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+95
+15
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+7e
+04
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+ab
+15
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+e7
+00
+00
+00
+00
+00
+00
+00
+b0
+15
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+e5
+00
+00
+00
+00
+00
+00
+00
+bd
+15
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+6a
+04
+00
+00
+e8
+00
+00
+00
+00
+00
+00
+00
+d1
+15
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+e8
+00
+00
+00
+00
+00
+00
+00
+da
+15
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+d4
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e6
+15
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+e6
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+f0
+15
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+e7
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+f7
+15
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+e8
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+fc
+15
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+e9
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+32
+16
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+ea
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+4b
+16
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+c8
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+b7
+16
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+e7
+00
+00
+00
+00
+00
+00
+00
+c0
+16
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+e5
+00
+00
+00
+00
+00
+00
+00
+c5
+16
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+6a
+04
+00
+00
+20
+01
+00
+00
+00
+00
+00
+00
+e3
+16
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+e8
+00
+00
+00
+00
+00
+00
+00
+09
+17
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+d4
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0e
+17
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+de
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+13
+17
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+eb
+00
+00
+00
+00
+00
+00
+00
+18
+17
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+de
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+17
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+e6
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+5e
+17
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+de
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+68
+17
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+f8
+00
+00
+00
+00
+00
+00
+00
+85
+17
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+e5
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+f9
+17
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+e7
+00
+00
+00
+00
+00
+00
+00
+fe
+17
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+e5
+00
+00
+00
+00
+00
+00
+00
+03
+18
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+d4
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+08
+18
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+6a
+04
+00
+00
+58
+01
+00
+00
+00
+00
+00
+00
+1a
+18
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+93
+04
+00
+00
+e8
+00
+00
+00
+00
+00
+00
+00
+2d
+18
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+e6
+04
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+01
+11
+01
+10
+06
+12
+01
+11
+01
+25
+0e
+13
+0b
+03
+0e
+1b
+0e
+00
+00
+02
+16
+00
+03
+0e
+3a
+0b
+3b
+0b
+49
+13
+00
+00
+03
+24
+00
+03
+0e
+0b
+0b
+3e
+0b
+00
+00
+04
+24
+00
+03
+08
+0b
+0b
+3e
+0b
+00
+00
+05
+0f
+00
+0b
+0b
+00
+00
+06
+0f
+00
+0b
+0b
+49
+13
+00
+00
+07
+13
+01
+01
+13
+03
+0e
+0b
+0b
+3a
+0b
+3b
+0b
+00
+00
+08
+0d
+00
+03
+0e
+3a
+0b
+3b
+05
+49
+13
+38
+0a
+00
+00
+09
+26
+00
+49
+13
+00
+00
+0a
+15
+01
+01
+13
+27
+0c
+00
+00
+0b
+05
+00
+49
+13
+00
+00
+0c
+16
+00
+03
+0e
+3a
+0b
+3b
+0b
+00
+00
+0d
+0d
+00
+03
+0e
+3a
+0b
+3b
+0b
+49
+13
+38
+0a
+00
+00
+0e
+01
+01
+01
+13
+49
+13
+00
+00
+0f
+21
+00
+49
+13
+2f
+0b
+00
+00
+10
+0d
+00
+03
+08
+3a
+0b
+3b
+0b
+49
+13
+38
+0a
+00
+00
+11
+04
+01
+01
+13
+0b
+0b
+3a
+0b
+3b
+0b
+00
+00
+12
+28
+00
+03
+0e
+1c
+0d
+00
+00
+13
+13
+00
+03
+0e
+3c
+0c
+00
+00
+14
+17
+01
+01
+13
+03
+08
+0b
+0b
+3a
+0b
+3b
+0b
+00
+00
+15
+0d
+00
+03
+08
+3a
+0b
+3b
+0b
+49
+13
+00
+00
+16
+2e
+00
+3f
+0c
+03
+0e
+3a
+0b
+3b
+0b
+27
+0c
+11
+01
+12
+01
+40
+06
+00
+00
+17
+2e
+01
+01
+13
+3f
+0c
+03
+0e
+3a
+0b
+3b
+0b
+27
+0c
+49
+13
+11
+01
+12
+01
+40
+06
+00
+00
+18
+05
+00
+03
+08
+3a
+0b
+3b
+0b
+49
+13
+02
+06
+00
+00
+19
+05
+00
+03
+0e
+3a
+0b
+3b
+0b
+49
+13
+02
+06
+00
+00
+1a
+34
+00
+03
+0e
+3a
+0b
+3b
+0b
+49
+13
+02
+06
+00
+00
+1b
+34
+00
+03
+08
+3a
+0b
+3b
+0b
+49
+13
+02
+06
+00
+00
+1c
+34
+00
+03
+0e
+3a
+0b
+3b
+0b
+49
+13
+00
+00
+1d
+2e
+01
+01
+13
+3f
+0c
+03
+0e
+3a
+0b
+3b
+05
+27
+0c
+49
+13
+11
+01
+12
+01
+40
+06
+00
+00
+1e
+05
+00
+03
+0e
+3a
+0b
+3b
+05
+49
+13
+02
+06
+00
+00
+1f
+34
+00
+03
+08
+3a
+0b
+3b
+05
+49
+13
+02
+06
+00
+00
+20
+2e
+01
+01
+13
+3f
+0c
+03
+0e
+3a
+0b
+3b
+05
+27
+0c
+11
+01
+12
+01
+40
+06
+00
+00
+21
+05
+00
+03
+08
+3a
+0b
+3b
+05
+49
+13
+02
+06
+00
+00
+22
+34
+00
+03
+0e
+3a
+0b
+3b
+05
+49
+13
+02
+0a
+00
+00
+23
+2e
+01
+01
+13
+3f
+0c
+03
+0e
+3a
+0b
+3b
+05
+27
+0c
+49
+13
+11
+01
+12
+01
+40
+0a
+00
+00
+24
+05
+00
+03
+0e
+3a
+0b
+3b
+05
+49
+13
+02
+0a
+00
+00
+25
+0b
+01
+55
+06
+00
+00
+26
+34
+00
+03
+08
+3a
+0b
+3b
+05
+49
+13
+02
+0a
+00
+00
+27
+0b
+01
+01
+13
+11
+01
+12
+01
+00
+00
+28
+34
+00
+03
+0e
+3a
+0b
+3b
+05
+49
+13
+00
+00
+29
+0b
+01
+11
+01
+12
+01
+00
+00
+2a
+34
+00
+03
+0e
+3a
+0b
+3b
+05
+49
+13
+02
+06
+00
+00
+2b
+2e
+01
+01
+13
+03
+0e
+3a
+0b
+3b
+0b
+27
+0c
+49
+13
+20
+0b
+00
+00
+2c
+05
+00
+03
+0e
+3a
+0b
+3b
+0b
+49
+13
+00
+00
+2d
+34
+00
+03
+08
+3a
+0b
+3b
+0b
+49
+13
+00
+00
+2e
+34
+00
+03
+08
+3a
+0b
+3b
+0b
+49
+13
+02
+0a
+00
+00
+2f
+1d
+01
+31
+13
+11
+01
+12
+01
+00
+00
+30
+05
+00
+31
+13
+00
+00
+31
+34
+00
+31
+13
+02
+06
+00
+00
+32
+34
+00
+31
+13
+00
+00
+33
+34
+00
+31
+13
+02
+0a
+00
+00
+34
+34
+00
+03
+0e
+3a
+0b
+3b
+0b
+49
+13
+02
+0a
+00
+00
+35
+21
+00
+49
+13
+2f
+05
+00
+00
+36
+34
+00
+03
+0e
+3a
+0b
+3b
+0b
+49
+13
+3f
+0c
+3c
+0c
+00
+00
+37
+15
+01
+01
+13
+27
+0c
+49
+13
+00
+00
+38
+34
+00
+03
+0e
+3a
+0b
+3b
+05
+49
+13
+3f
+0c
+3c
+0c
+00
+00
+00
+4e
+0f
+00
+00
+02
+00
+00
+00
+00
+00
+08
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+00
+05
+d6
+38
+00
+00
+00
+03
+00
+00
+00
+00
+08
+07
+04
+69
+6e
+74
+00
+04
+05
+03
+00
+00
+00
+00
+08
+05
+03
+00
+00
+00
+00
+01
+08
+03
+00
+00
+00
+00
+02
+07
+03
+00
+00
+00
+00
+04
+07
+03
+00
+00
+00
+00
+01
+06
+03
+00
+00
+00
+00
+02
+05
+02
+00
+00
+00
+00
+08
+8f
+46
+00
+00
+00
+02
+00
+00
+00
+00
+08
+90
+46
+00
+00
+00
+03
+00
+00
+00
+00
+08
+07
+05
+08
+06
+08
+95
+00
+00
+00
+03
+00
+00
+00
+00
+01
+06
+02
+00
+00
+00
+00
+06
+2e
+a7
+00
+00
+00
+07
+43
+02
+00
+00
+00
+00
+00
+00
+d8
+06
+2e
+08
+00
+00
+00
+00
+07
+0c
+01
+3f
+00
+00
+00
+02
+23
+00
+08
+00
+00
+00
+00
+07
+11
+01
+8f
+00
+00
+00
+02
+23
+08
+08
+00
+00
+00
+00
+07
+12
+01
+8f
+00
+00
+00
+02
+23
+10
+08
+00
+00
+00
+00
+07
+13
+01
+8f
+00
+00
+00
+02
+23
+18
+08
+00
+00
+00
+00
+07
+14
+01
+8f
+00
+00
+00
+02
+23
+20
+08
+00
+00
+00
+00
+07
+15
+01
+8f
+00
+00
+00
+02
+23
+28
+08
+00
+00
+00
+00
+07
+16
+01
+8f
+00
+00
+00
+02
+23
+30
+08
+00
+00
+00
+00
+07
+17
+01
+8f
+00
+00
+00
+02
+23
+38
+08
+00
+00
+00
+00
+07
+18
+01
+8f
+00
+00
+00
+02
+23
+40
+08
+00
+00
+00
+00
+07
+1a
+01
+8f
+00
+00
+00
+02
+23
+48
+08
+00
+00
+00
+00
+07
+1b
+01
+8f
+00
+00
+00
+02
+23
+50
+08
+00
+00
+00
+00
+07
+1c
+01
+8f
+00
+00
+00
+02
+23
+58
+08
+00
+00
+00
+00
+07
+1e
+01
+af
+02
+00
+00
+02
+23
+60
+08
+00
+00
+00
+00
+07
+20
+01
+b5
+02
+00
+00
+02
+23
+68
+08
+00
+00
+00
+00
+07
+22
+01
+3f
+00
+00
+00
+02
+23
+70
+08
+00
+00
+00
+00
+07
+26
+01
+3f
+00
+00
+00
+02
+23
+74
+08
+00
+00
+00
+00
+07
+28
+01
+70
+00
+00
+00
+02
+23
+78
+08
+00
+00
+00
+00
+07
+2c
+01
+54
+00
+00
+00
+03
+23
+80
+01
+08
+00
+00
+00
+00
+07
+2d
+01
+62
+00
+00
+00
+03
+23
+82
+01
+08
+00
+00
+00
+00
+07
+2e
+01
+bb
+02
+00
+00
+03
+23
+83
+01
+08
+00
+00
+00
+00
+07
+32
+01
+cb
+02
+00
+00
+03
+23
+88
+01
+08
+00
+00
+00
+00
+07
+3b
+01
+7b
+00
+00
+00
+03
+23
+90
+01
+08
+00
+00
+00
+00
+07
+41
+01
+8d
+00
+00
+00
+03
+23
+98
+01
+08
+00
+00
+00
+00
+07
+42
+01
+8d
+00
+00
+00
+03
+23
+a0
+01
+08
+00
+00
+00
+00
+07
+44
+01
+3f
+00
+00
+00
+03
+23
+a8
+01
+08
+00
+00
+00
+00
+07
+46
+01
+d1
+02
+00
+00
+03
+23
+ac
+01
+00
+06
+08
+49
+02
+00
+00
+09
+4d
+00
+00
+00
+06
+08
+4d
+00
+00
+00
+06
+08
+5a
+02
+00
+00
+09
+95
+00
+00
+00
+06
+08
+65
+02
+00
+00
+0a
+71
+02
+00
+00
+01
+0b
+8d
+00
+00
+00
+00
+0c
+00
+00
+00
+00
+07
+b0
+07
+af
+02
+00
+00
+00
+00
+00
+00
+18
+07
+b6
+0d
+00
+00
+00
+00
+07
+b7
+af
+02
+00
+00
+02
+23
+00
+0d
+00
+00
+00
+00
+07
+b8
+b5
+02
+00
+00
+02
+23
+08
+0d
+00
+00
+00
+00
+07
+bc
+3f
+00
+00
+00
+02
+23
+10
+00
+06
+08
+78
+02
+00
+00
+06
+08
+a7
+00
+00
+00
+0e
+cb
+02
+00
+00
+95
+00
+00
+00
+0f
+86
+00
+00
+00
+00
+00
+06
+08
+71
+02
+00
+00
+0e
+e1
+02
+00
+00
+95
+00
+00
+00
+0f
+86
+00
+00
+00
+2b
+00
+06
+08
+9c
+00
+00
+00
+02
+00
+00
+00
+00
+03
+5d
+f2
+02
+00
+00
+07
+29
+03
+00
+00
+00
+00
+00
+00
+10
+03
+5d
+10
+76
+61
+6c
+00
+01
+31
+3e
+04
+00
+00
+02
+23
+00
+0d
+00
+00
+00
+00
+01
+32
+5f
+04
+00
+00
+02
+23
+08
+0d
+00
+00
+00
+00
+01
+33
+4d
+00
+00
+00
+02
+23
+0c
+00
+11
+e0
+03
+00
+00
+04
+03
+78
+12
+00
+00
+00
+00
+00
+12
+00
+00
+00
+00
+01
+12
+00
+00
+00
+00
+02
+12
+00
+00
+00
+00
+03
+12
+00
+00
+00
+00
+04
+12
+00
+00
+00
+00
+05
+12
+00
+00
+00
+00
+06
+12
+00
+00
+00
+00
+07
+12
+00
+00
+00
+00
+08
+12
+00
+00
+00
+00
+09
+12
+00
+00
+00
+00
+0a
+12
+00
+00
+00
+00
+0b
+12
+00
+00
+00
+00
+0c
+12
+00
+00
+00
+00
+0d
+12
+00
+00
+00
+00
+0e
+12
+00
+00
+00
+00
+0f
+12
+00
+00
+00
+00
+10
+12
+00
+00
+00
+00
+11
+12
+00
+00
+00
+00
+12
+12
+00
+00
+00
+00
+13
+12
+00
+00
+00
+00
+14
+12
+00
+00
+00
+00
+15
+12
+00
+00
+00
+00
+16
+12
+00
+00
+00
+00
+17
+12
+00
+00
+00
+00
+18
+12
+00
+00
+00
+00
+19
+12
+00
+00
+00
+00
+1a
+12
+00
+00
+00
+00
+1b
+12
+00
+00
+00
+00
+1c
+00
+02
+00
+00
+00
+00
+03
+97
+29
+03
+00
+00
+06
+08
+e7
+02
+00
+00
+02
+00
+00
+00
+00
+04
+18
+5b
+00
+00
+00
+02
+00
+00
+00
+00
+04
+31
+07
+04
+00
+00
+06
+08
+f1
+03
+00
+00
+11
+22
+04
+00
+00
+04
+04
+55
+12
+00
+00
+00
+00
+00
+12
+00
+00
+00
+00
+01
+00
+02
+00
+00
+00
+00
+04
+55
+0d
+04
+00
+00
+02
+00
+00
+00
+00
+04
+d4
+38
+04
+00
+00
+13
+00
+00
+00
+00
+01
+14
+5f
+04
+00
+00
+76
+61
+6c
+00
+08
+01
+2e
+15
+75
+6c
+00
+01
+2f
+38
+00
+00
+00
+15
+62
+76
+00
+01
+30
+fc
+03
+00
+00
+00
+11
+74
+04
+00
+00
+04
+01
+32
+12
+00
+00
+00
+00
+00
+12
+00
+00
+00
+00
+01
+00
+07
+c7
+04
+00
+00
+00
+00
+00
+00
+20
+02
+27
+0d
+00
+00
+00
+00
+02
+29
+3f
+00
+00
+00
+02
+23
+00
+0d
+00
+00
+00
+00
+02
+2c
+3f
+00
+00
+00
+02
+23
+04
+0d
+00
+00
+00
+00
+02
+2f
+54
+02
+00
+00
+02
+23
+08
+0d
+00
+00
+00
+00
+02
+32
+38
+00
+00
+00
+02
+23
+10
+0d
+00
+00
+00
+00
+02
+35
+43
+02
+00
+00
+02
+23
+18
+00
+02
+00
+00
+00
+00
+02
+36
+74
+04
+00
+00
+16
+01
+00
+00
+00
+00
+01
+41
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+16
+01
+00
+00
+00
+00
+01
+4c
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+17
+5f
+05
+00
+00
+01
+00
+00
+00
+00
+01
+57
+01
+eb
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+18
+73
+74
+72
+00
+01
+56
+8f
+00
+00
+00
+00
+00
+00
+00
+19
+00
+00
+00
+00
+01
+56
+38
+00
+00
+00
+00
+00
+00
+00
+1a
+00
+00
+00
+00
+01
+58
+eb
+03
+00
+00
+00
+00
+00
+00
+00
+17
+b2
+05
+00
+00
+01
+00
+00
+00
+00
+01
+6d
+01
+eb
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+18
+73
+74
+72
+00
+01
+6c
+8f
+00
+00
+00
+00
+00
+00
+00
+19
+00
+00
+00
+00
+01
+6c
+38
+00
+00
+00
+00
+00
+00
+00
+1a
+00
+00
+00
+00
+01
+6e
+eb
+03
+00
+00
+00
+00
+00
+00
+00
+17
+05
+06
+00
+00
+01
+00
+00
+00
+00
+01
+84
+01
+eb
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+18
+73
+74
+72
+00
+01
+83
+8f
+00
+00
+00
+00
+00
+00
+00
+19
+00
+00
+00
+00
+01
+83
+38
+00
+00
+00
+00
+00
+00
+00
+1a
+00
+00
+00
+00
+01
+85
+eb
+03
+00
+00
+00
+00
+00
+00
+00
+17
+58
+06
+00
+00
+01
+00
+00
+00
+00
+01
+9b
+01
+eb
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+18
+73
+74
+72
+00
+01
+9a
+8f
+00
+00
+00
+00
+00
+00
+00
+19
+00
+00
+00
+00
+01
+9a
+38
+00
+00
+00
+00
+00
+00
+00
+1a
+00
+00
+00
+00
+01
+9c
+eb
+03
+00
+00
+00
+00
+00
+00
+00
+17
+ba
+06
+00
+00
+01
+00
+00
+00
+00
+01
+b3
+01
+eb
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+18
+73
+74
+72
+00
+01
+b2
+54
+02
+00
+00
+00
+00
+00
+00
+19
+00
+00
+00
+00
+01
+b2
+38
+00
+00
+00
+00
+00
+00
+00
+1a
+00
+00
+00
+00
+01
+b4
+eb
+03
+00
+00
+00
+00
+00
+00
+1b
+6c
+65
+6e
+00
+01
+b5
+2d
+00
+00
+00
+00
+00
+00
+00
+00
+17
+f8
+06
+00
+00
+01
+00
+00
+00
+00
+01
+e6
+01
+eb
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+18
+69
+00
+01
+e5
+38
+00
+00
+00
+00
+00
+00
+00
+1c
+00
+00
+00
+00
+01
+e7
+eb
+03
+00
+00
+00
+17
+36
+07
+00
+00
+01
+00
+00
+00
+00
+01
+f2
+01
+eb
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+18
+69
+00
+01
+f1
+46
+00
+00
+00
+00
+00
+00
+00
+1c
+00
+00
+00
+00
+01
+f3
+eb
+03
+00
+00
+00
+1d
+7b
+07
+00
+00
+01
+00
+00
+00
+00
+01
+07
+01
+01
+eb
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1e
+00
+00
+00
+00
+01
+06
+01
+7b
+07
+00
+00
+00
+00
+00
+00
+1f
+6e
+00
+01
+08
+01
+eb
+03
+00
+00
+00
+00
+00
+00
+00
+06
+08
+81
+07
+00
+00
+09
+e7
+02
+00
+00
+20
+b9
+07
+00
+00
+01
+00
+00
+00
+00
+01
+1a
+01
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1e
+00
+00
+00
+00
+01
+19
+01
+eb
+03
+00
+00
+00
+00
+00
+00
+00
+20
+4a
+08
+00
+00
+01
+00
+00
+00
+00
+01
+24
+01
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+21
+61
+63
+63
+00
+01
+22
+01
+eb
+03
+00
+00
+00
+00
+00
+00
+21
+6f
+70
+00
+01
+22
+01
+e0
+03
+00
+00
+00
+00
+00
+00
+1e
+00
+00
+00
+00
+01
+22
+01
+eb
+03
+00
+00
+00
+00
+00
+00
+1e
+00
+00
+00
+00
+01
+23
+01
+38
+00
+00
+00
+00
+00
+00
+00
+22
+00
+00
+00
+00
+01
+25
+01
+22
+04
+00
+00
+02
+77
+14
+1f
+6f
+70
+31
+00
+01
+26
+01
+fc
+03
+00
+00
+00
+00
+00
+00
+1f
+6f
+70
+32
+00
+01
+26
+01
+fc
+03
+00
+00
+00
+00
+00
+00
+00
+20
+7d
+08
+00
+00
+01
+00
+00
+00
+00
+01
+c6
+01
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1e
+00
+00
+00
+00
+01
+c5
+01
+eb
+03
+00
+00
+00
+00
+00
+00
+00
+23
+b1
+08
+00
+00
+01
+00
+00
+00
+00
+01
+d0
+01
+01
+3f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+77
+00
+24
+00
+00
+00
+00
+01
+cf
+01
+7b
+07
+00
+00
+01
+55
+00
+23
+e5
+08
+00
+00
+01
+00
+00
+00
+00
+01
+d6
+01
+01
+3f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+77
+00
+24
+00
+00
+00
+00
+01
+d5
+01
+7b
+07
+00
+00
+01
+55
+00
+1d
+1c
+09
+00
+00
+01
+00
+00
+00
+00
+01
+dc
+01
+01
+3f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1e
+00
+00
+00
+00
+01
+db
+01
+7b
+07
+00
+00
+00
+00
+00
+00
+00
+23
+52
+09
+00
+00
+01
+00
+00
+00
+00
+01
+e2
+01
+01
+3f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+77
+00
+1e
+00
+00
+00
+00
+01
+e1
+01
+7b
+07
+00
+00
+00
+00
+00
+00
+00
+1d
+89
+09
+00
+00
+01
+00
+00
+00
+00
+01
+ee
+01
+01
+38
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1e
+00
+00
+00
+00
+01
+ed
+01
+7b
+07
+00
+00
+00
+00
+00
+00
+00
+1d
+d3
+09
+00
+00
+01
+00
+00
+00
+00
+01
+fd
+01
+01
+46
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1e
+00
+00
+00
+00
+01
+fc
+01
+7b
+07
+00
+00
+00
+00
+00
+00
+25
+00
+00
+00
+00
+26
+75
+6c
+00
+01
+07
+02
+38
+00
+00
+00
+01
+50
+00
+00
+1d
+8e
+0a
+00
+00
+01
+00
+00
+00
+00
+01
+62
+02
+01
+3f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1e
+00
+00
+00
+00
+01
+60
+02
+7b
+07
+00
+00
+00
+00
+00
+00
+1e
+00
+00
+00
+00
+01
+60
+02
+2d
+00
+00
+00
+00
+00
+00
+00
+1e
+00
+00
+00
+00
+01
+60
+02
+2d
+00
+00
+00
+00
+00
+00
+00
+1e
+00
+00
+00
+00
+01
+61
+02
+3f
+00
+00
+00
+00
+00
+00
+00
+1f
+76
+61
+6c
+00
+01
+63
+02
+fc
+03
+00
+00
+00
+00
+00
+00
+27
+6b
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+28
+00
+00
+00
+00
+01
+76
+02
+3f
+00
+00
+00
+00
+29
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2a
+00
+00
+00
+00
+01
+7e
+02
+3f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+8c
+0b
+00
+00
+01
+00
+00
+00
+00
+01
+20
+02
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1e
+00
+00
+00
+00
+01
+1d
+02
+7b
+07
+00
+00
+00
+00
+00
+00
+21
+70
+74
+72
+00
+01
+1d
+02
+4e
+02
+00
+00
+00
+00
+00
+00
+1e
+00
+00
+00
+00
+01
+1e
+02
+2d
+00
+00
+00
+00
+00
+00
+00
+1e
+00
+00
+00
+00
+01
+1e
+02
+2d
+00
+00
+00
+00
+00
+00
+00
+1e
+00
+00
+00
+00
+01
+1e
+02
+3f
+00
+00
+00
+00
+00
+00
+00
+1e
+00
+00
+00
+00
+01
+1f
+02
+3f
+00
+00
+00
+00
+00
+00
+00
+24
+00
+00
+00
+00
+01
+1f
+02
+3f
+00
+00
+00
+03
+77
+e0
+00
+24
+00
+00
+00
+00
+01
+1f
+02
+38
+00
+00
+00
+03
+77
+e8
+00
+1f
+6f
+70
+31
+00
+01
+21
+02
+fc
+03
+00
+00
+00
+00
+00
+00
+1f
+6f
+70
+32
+00
+01
+21
+02
+fc
+03
+00
+00
+00
+00
+00
+00
+1f
+62
+75
+66
+00
+01
+22
+02
+4e
+02
+00
+00
+00
+00
+00
+00
+26
+6c
+65
+6e
+00
+01
+23
+02
+5b
+00
+00
+00
+02
+77
+24
+2a
+00
+00
+00
+00
+01
+24
+02
+2d
+00
+00
+00
+00
+00
+00
+00
+28
+00
+00
+00
+00
+01
+25
+02
+3f
+00
+00
+00
+00
+1d
+1d
+0c
+00
+00
+01
+00
+00
+00
+00
+01
+8f
+02
+01
+38
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1e
+00
+00
+00
+00
+01
+8e
+02
+7b
+07
+00
+00
+00
+00
+00
+00
+21
+70
+74
+72
+00
+01
+8e
+02
+4e
+02
+00
+00
+00
+00
+00
+00
+1e
+00
+00
+00
+00
+01
+8e
+02
+3f
+00
+00
+00
+00
+00
+00
+00
+1f
+76
+61
+6c
+00
+01
+90
+02
+fc
+03
+00
+00
+00
+00
+00
+00
+1f
+69
+00
+01
+91
+02
+38
+00
+00
+00
+00
+00
+00
+00
+2a
+00
+00
+00
+00
+01
+91
+02
+38
+00
+00
+00
+00
+00
+00
+00
+28
+00
+00
+00
+00
+01
+92
+02
+4e
+02
+00
+00
+00
+1d
+74
+0c
+00
+00
+01
+00
+00
+00
+00
+01
+bd
+02
+01
+38
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1e
+00
+00
+00
+00
+01
+bc
+02
+7b
+07
+00
+00
+00
+00
+00
+00
+1e
+00
+00
+00
+00
+01
+bc
+02
+3f
+00
+00
+00
+00
+00
+00
+00
+1f
+76
+61
+6c
+00
+01
+be
+02
+fc
+03
+00
+00
+00
+00
+00
+00
+00
+20
+c3
+0c
+00
+00
+01
+00
+00
+00
+00
+01
+df
+02
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1e
+00
+00
+00
+00
+01
+de
+02
+7b
+07
+00
+00
+00
+00
+00
+00
+21
+66
+00
+01
+de
+02
+e1
+02
+00
+00
+00
+00
+00
+00
+1f
+73
+00
+01
+e0
+02
+4e
+02
+00
+00
+00
+00
+00
+00
+00
+2b
+20
+0d
+00
+00
+00
+00
+00
+00
+02
+54
+01
+3f
+00
+00
+00
+01
+2c
+00
+00
+00
+00
+02
+53
+20
+0d
+00
+00
+1c
+00
+00
+00
+00
+02
+55
+8f
+00
+00
+00
+1c
+00
+00
+00
+00
+02
+56
+eb
+03
+00
+00
+1c
+00
+00
+00
+00
+02
+57
+38
+00
+00
+00
+2d
+69
+00
+02
+57
+38
+00
+00
+00
+2d
+6f
+75
+74
+00
+02
+58
+26
+0d
+00
+00
+2d
+62
+61
+64
+00
+02
+59
+3f
+00
+00
+00
+00
+06
+08
+c7
+04
+00
+00
+0e
+36
+0d
+00
+00
+4d
+00
+00
+00
+0f
+86
+00
+00
+00
+63
+00
+17
+e8
+0d
+00
+00
+01
+00
+00
+00
+00
+02
+86
+01
+3f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+6e
+66
+00
+02
+87
+3f
+00
+00
+00
+02
+77
+2c
+1c
+00
+00
+00
+00
+02
+88
+3f
+00
+00
+00
+1b
+69
+00
+02
+89
+3f
+00
+00
+00
+00
+00
+00
+00
+25
+00
+00
+00
+00
+1a
+00
+00
+00
+00
+02
+92
+3f
+00
+00
+00
+00
+00
+00
+00
+2f
+c3
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+30
+d4
+0c
+00
+00
+25
+00
+00
+00
+00
+31
+df
+0c
+00
+00
+00
+00
+00
+00
+31
+ea
+0c
+00
+00
+00
+00
+00
+00
+31
+f5
+0c
+00
+00
+00
+00
+00
+00
+32
+00
+0d
+00
+00
+33
+09
+0d
+00
+00
+02
+77
+30
+31
+14
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+34
+00
+00
+00
+00
+01
+37
+fc
+03
+00
+00
+09
+03
+00
+00
+00
+00
+00
+00
+00
+00
+34
+00
+00
+00
+00
+01
+3a
+fc
+03
+00
+00
+09
+03
+00
+00
+00
+00
+00
+00
+00
+00
+34
+00
+00
+00
+00
+01
+3a
+fc
+03
+00
+00
+09
+03
+00
+00
+00
+00
+00
+00
+00
+00
+34
+00
+00
+00
+00
+01
+3a
+fc
+03
+00
+00
+09
+03
+00
+00
+00
+00
+00
+00
+00
+00
+34
+00
+00
+00
+00
+01
+3a
+fc
+03
+00
+00
+09
+03
+00
+00
+00
+00
+00
+00
+00
+00
+34
+00
+00
+00
+00
+01
+3c
+66
+0e
+00
+00
+09
+03
+00
+00
+00
+00
+00
+00
+00
+00
+06
+08
+2d
+04
+00
+00
+0e
+7c
+0e
+00
+00
+c7
+04
+00
+00
+0f
+86
+00
+00
+00
+0f
+00
+34
+00
+00
+00
+00
+02
+38
+6c
+0e
+00
+00
+09
+03
+00
+00
+00
+00
+00
+00
+00
+00
+0e
+a2
+0e
+00
+00
+95
+00
+00
+00
+35
+86
+00
+00
+00
+e7
+03
+00
+34
+00
+00
+00
+00
+02
+4f
+91
+0e
+00
+00
+09
+03
+00
+00
+00
+00
+00
+00
+00
+00
+0e
+c7
+0e
+00
+00
+95
+00
+00
+00
+0f
+86
+00
+00
+00
+63
+00
+34
+00
+00
+00
+00
+02
+50
+b7
+0e
+00
+00
+09
+03
+00
+00
+00
+00
+00
+00
+00
+00
+36
+00
+00
+00
+00
+06
+8e
+b5
+02
+00
+00
+01
+01
+36
+00
+00
+00
+00
+06
+8f
+b5
+02
+00
+00
+01
+01
+37
+06
+0f
+00
+00
+01
+8d
+00
+00
+00
+0b
+2d
+00
+00
+00
+00
+38
+00
+00
+00
+00
+03
+17
+01
+14
+0f
+00
+00
+01
+01
+06
+08
+f6
+0e
+00
+00
+38
+00
+00
+00
+00
+03
+32
+01
+5f
+02
+00
+00
+01
+01
+0a
+3e
+0f
+00
+00
+01
+0b
+54
+02
+00
+00
+0b
+5b
+00
+00
+00
+0b
+54
+02
+00
+00
+00
+36
+00
+00
+00
+00
+09
+3f
+4b
+0f
+00
+00
+01
+01
+06
+08
+28
+0f
+00
+00
+00
+00
+00
+00
+06
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+9b
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0c
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+97
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+4f
+18
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+ee
+06
+00
+00
+00
+00
+00
+00
+25
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+34
+02
+00
+00
+00
+00
+00
+00
+29
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+9f
+02
+00
+00
+00
+00
+00
+00
+39
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+8d
+04
+00
+00
+00
+00
+00
+00
+47
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+5f
+05
+00
+00
+00
+00
+00
+00
+4e
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+01
+06
+00
+00
+00
+00
+00
+00
+55
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+8c
+06
+00
+00
+00
+00
+00
+00
+5c
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+ac
+00
+00
+00
+00
+00
+00
+00
+63
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+80
+06
+00
+00
+00
+00
+00
+00
+6a
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+11
+01
+00
+00
+00
+00
+00
+00
+71
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+59
+06
+00
+00
+00
+00
+00
+00
+7c
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+33
+07
+00
+00
+00
+00
+00
+00
+87
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+8d
+04
+00
+00
+00
+00
+00
+00
+96
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+29
+05
+00
+00
+00
+00
+00
+00
+9d
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+e1
+06
+00
+00
+00
+00
+00
+00
+ac
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+bf
+05
+00
+00
+00
+00
+00
+00
+b4
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+c6
+00
+00
+00
+00
+00
+00
+00
+c3
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+a8
+03
+00
+00
+00
+00
+00
+00
+d2
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+2e
+05
+00
+00
+00
+00
+00
+00
+e1
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+b5
+02
+00
+00
+00
+00
+00
+00
+f0
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+23
+03
+00
+00
+00
+00
+00
+00
+ff
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+21
+06
+00
+00
+00
+00
+00
+00
+0e
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+9e
+00
+00
+00
+00
+00
+00
+00
+1d
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+46
+07
+00
+00
+00
+00
+00
+00
+2c
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+5a
+00
+00
+00
+00
+00
+00
+00
+3b
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+32
+04
+00
+00
+00
+00
+00
+00
+4a
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+6f
+02
+00
+00
+00
+00
+00
+00
+59
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+cd
+02
+00
+00
+00
+00
+00
+00
+68
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+f7
+00
+00
+00
+00
+00
+00
+00
+77
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+c6
+06
+00
+00
+00
+00
+00
+00
+86
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+97
+02
+00
+00
+00
+00
+00
+00
+95
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+e6
+06
+00
+00
+00
+00
+00
+00
+a4
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+b3
+05
+00
+00
+00
+00
+00
+00
+b3
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+18
+07
+00
+00
+00
+00
+00
+00
+c3
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+c1
+04
+00
+00
+00
+00
+00
+00
+d3
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+1e
+00
+00
+00
+00
+00
+00
+00
+e3
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+ad
+05
+00
+00
+00
+00
+00
+00
+f3
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+88
+02
+00
+00
+00
+00
+00
+00
+03
+02
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+7f
+04
+00
+00
+00
+00
+00
+00
+13
+02
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+86
+04
+00
+00
+00
+00
+00
+00
+23
+02
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+60
+03
+00
+00
+00
+00
+00
+00
+33
+02
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+3d
+07
+00
+00
+00
+00
+00
+00
+72
+02
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+4f
+00
+00
+00
+00
+00
+00
+00
+7d
+02
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+18
+04
+00
+00
+00
+00
+00
+00
+85
+02
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+da
+02
+00
+00
+00
+00
+00
+00
+93
+02
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+c8
+05
+00
+00
+00
+00
+00
+00
+a1
+02
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+93
+01
+00
+00
+00
+00
+00
+00
+e8
+02
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+69
+07
+00
+00
+00
+00
+00
+00
+f7
+02
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+69
+07
+00
+00
+00
+00
+00
+00
+0d
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+e8
+05
+00
+00
+00
+00
+00
+00
+1b
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+8c
+00
+00
+00
+00
+00
+00
+00
+32
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+e9
+02
+00
+00
+00
+00
+00
+00
+38
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+13
+05
+00
+00
+00
+00
+00
+00
+3e
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+8d
+05
+00
+00
+00
+00
+00
+00
+44
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+32
+03
+00
+00
+00
+00
+00
+00
+4a
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+66
+00
+00
+00
+00
+00
+00
+00
+50
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+e7
+03
+00
+00
+00
+00
+00
+00
+56
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+53
+07
+00
+00
+00
+00
+00
+00
+5c
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+4e
+03
+00
+00
+00
+00
+00
+00
+62
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+6d
+05
+00
+00
+00
+00
+00
+00
+68
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+40
+03
+00
+00
+00
+00
+00
+00
+6e
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+f2
+04
+00
+00
+00
+00
+00
+00
+74
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+46
+06
+00
+00
+00
+00
+00
+00
+7a
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+f9
+03
+00
+00
+00
+00
+00
+00
+80
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+cc
+03
+00
+00
+00
+00
+00
+00
+86
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+b3
+06
+00
+00
+00
+00
+00
+00
+8c
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+57
+04
+00
+00
+00
+00
+00
+00
+92
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+d0
+04
+00
+00
+00
+00
+00
+00
+98
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+24
+07
+00
+00
+00
+00
+00
+00
+9e
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+cb
+01
+00
+00
+00
+00
+00
+00
+a4
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+9b
+03
+00
+00
+00
+00
+00
+00
+aa
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+d5
+00
+00
+00
+00
+00
+00
+00
+b0
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+0b
+07
+00
+00
+00
+00
+00
+00
+b6
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+66
+03
+00
+00
+00
+00
+00
+00
+bc
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+b9
+00
+00
+00
+00
+00
+00
+00
+c2
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+fb
+01
+00
+00
+00
+00
+00
+00
+c8
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+40
+01
+00
+00
+00
+00
+00
+00
+ce
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+1b
+01
+00
+00
+00
+00
+00
+00
+d4
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+59
+01
+00
+00
+00
+00
+00
+00
+da
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+e1
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+ff
+04
+00
+00
+00
+00
+00
+00
+f2
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+52
+05
+00
+00
+00
+00
+00
+00
+fd
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+51
+01
+00
+00
+00
+00
+00
+00
+16
+04
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+2f
+06
+00
+00
+00
+00
+00
+00
+1c
+04
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+2d
+04
+00
+00
+00
+00
+00
+00
+23
+04
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+61
+07
+00
+00
+00
+00
+00
+00
+2e
+04
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+61
+06
+00
+00
+00
+00
+00
+00
+39
+04
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+61
+06
+00
+00
+00
+00
+00
+00
+68
+04
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+6c
+04
+00
+00
+00
+00
+00
+00
+6e
+04
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+ab
+02
+00
+00
+00
+00
+00
+00
+79
+04
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+9f
+04
+00
+00
+00
+00
+00
+00
+81
+04
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+a6
+02
+00
+00
+00
+00
+00
+00
+8f
+04
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+65
+04
+00
+00
+00
+00
+00
+00
+9d
+04
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+aa
+04
+00
+00
+00
+00
+00
+00
+ab
+04
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+0f
+06
+00
+00
+00
+00
+00
+00
+b9
+04
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+f4
+01
+00
+00
+00
+00
+00
+00
+c8
+04
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+9f
+04
+00
+00
+00
+00
+00
+00
+d4
+04
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+40
+04
+00
+00
+00
+00
+00
+00
+db
+04
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e3
+04
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+79
+00
+00
+00
+00
+00
+00
+00
+eb
+04
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f1
+04
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+e0
+01
+00
+00
+00
+00
+00
+00
+f8
+04
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+80
+00
+00
+00
+00
+00
+00
+00
+00
+05
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+d0
+00
+00
+00
+00
+00
+00
+00
+08
+05
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+4c
+00
+00
+00
+00
+00
+00
+00
+12
+05
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+84
+03
+00
+00
+00
+00
+00
+00
+1d
+05
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+d0
+00
+00
+00
+00
+00
+00
+00
+25
+05
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+a6
+01
+00
+00
+00
+00
+00
+00
+2d
+05
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+98
+00
+00
+00
+00
+00
+00
+00
+3c
+05
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+20
+01
+00
+00
+00
+00
+00
+00
+41
+05
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+17
+06
+00
+00
+00
+00
+00
+00
+4b
+05
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+7c
+01
+00
+00
+00
+00
+00
+00
+50
+05
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+68
+05
+00
+00
+00
+00
+00
+00
+5a
+05
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+d8
+01
+00
+00
+00
+00
+00
+00
+65
+05
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+29
+01
+00
+00
+00
+00
+00
+00
+70
+05
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+b0
+01
+00
+00
+00
+00
+00
+00
+78
+05
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+86
+02
+00
+00
+00
+00
+00
+00
+80
+05
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+34
+02
+00
+00
+00
+00
+00
+00
+8f
+05
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+bc
+02
+00
+00
+00
+00
+00
+00
+94
+05
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+17
+06
+00
+00
+00
+00
+00
+00
+9e
+05
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+18
+03
+00
+00
+00
+00
+00
+00
+a3
+05
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+68
+05
+00
+00
+00
+00
+00
+00
+ad
+05
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+74
+03
+00
+00
+00
+00
+00
+00
+b8
+05
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+32
+00
+00
+00
+00
+00
+00
+00
+c3
+05
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+90
+02
+00
+00
+00
+00
+00
+00
+cb
+05
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+66
+03
+00
+00
+00
+00
+00
+00
+d3
+05
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+bd
+03
+00
+00
+00
+00
+00
+00
+e2
+05
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+45
+04
+00
+00
+00
+00
+00
+00
+e7
+05
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+17
+06
+00
+00
+00
+00
+00
+00
+f1
+05
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+a1
+04
+00
+00
+00
+00
+00
+00
+f6
+05
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+68
+05
+00
+00
+00
+00
+00
+00
+00
+06
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+fd
+04
+00
+00
+00
+00
+00
+00
+0b
+06
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+50
+02
+00
+00
+00
+00
+00
+00
+16
+06
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+70
+03
+00
+00
+00
+00
+00
+00
+1e
+06
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+46
+04
+00
+00
+00
+00
+00
+00
+26
+06
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+46
+05
+00
+00
+00
+00
+00
+00
+35
+06
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+ce
+05
+00
+00
+00
+00
+00
+00
+3a
+06
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+17
+06
+00
+00
+00
+00
+00
+00
+44
+06
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+2a
+06
+00
+00
+00
+00
+00
+00
+49
+06
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+68
+05
+00
+00
+00
+00
+00
+00
+53
+06
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+86
+06
+00
+00
+00
+00
+00
+00
+5e
+06
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+f9
+02
+00
+00
+00
+00
+00
+00
+69
+06
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+50
+04
+00
+00
+00
+00
+00
+00
+71
+06
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+d5
+05
+00
+00
+00
+00
+00
+00
+79
+06
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+cf
+06
+00
+00
+00
+00
+00
+00
+88
+06
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+2f
+07
+00
+00
+00
+00
+00
+00
+8d
+06
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+17
+06
+00
+00
+00
+00
+00
+00
+97
+06
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+8b
+07
+00
+00
+00
+00
+00
+00
+9c
+06
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+68
+05
+00
+00
+00
+00
+00
+00
+a6
+06
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+e7
+07
+00
+00
+00
+00
+00
+00
+b5
+06
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+1d
+08
+00
+00
+00
+00
+00
+00
+c0
+06
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+ad
+01
+00
+00
+00
+00
+00
+00
+cb
+06
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+e0
+05
+00
+00
+00
+00
+00
+00
+d3
+06
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+ff
+05
+00
+00
+00
+00
+00
+00
+db
+06
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+8c
+08
+00
+00
+00
+00
+00
+00
+e8
+06
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+d8
+08
+00
+00
+00
+00
+00
+00
+ed
+06
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+68
+05
+00
+00
+00
+00
+00
+00
+fe
+06
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+08
+02
+00
+00
+00
+00
+00
+00
+09
+07
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+00
+06
+00
+00
+00
+00
+00
+00
+11
+07
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+71
+06
+00
+00
+00
+00
+00
+00
+19
+07
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+0e
+09
+00
+00
+00
+00
+00
+00
+26
+07
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+82
+09
+00
+00
+00
+00
+00
+00
+2b
+07
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+68
+05
+00
+00
+00
+00
+00
+00
+3c
+07
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+67
+01
+00
+00
+00
+00
+00
+00
+48
+07
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+80
+06
+00
+00
+00
+00
+00
+00
+50
+07
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+1b
+07
+00
+00
+00
+00
+00
+00
+58
+07
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+de
+09
+00
+00
+00
+00
+00
+00
+5d
+07
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+68
+05
+00
+00
+00
+00
+00
+00
+68
+07
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+7a
+0a
+00
+00
+00
+00
+00
+00
+76
+07
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+d6
+0a
+00
+00
+00
+00
+00
+00
+8c
+07
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+d4
+05
+00
+00
+00
+00
+00
+00
+94
+07
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+20
+07
+00
+00
+00
+00
+00
+00
+9c
+07
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+4e
+07
+00
+00
+00
+00
+00
+00
+a4
+07
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+1f
+0b
+00
+00
+00
+00
+00
+00
+a9
+07
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+68
+05
+00
+00
+00
+00
+00
+00
+b4
+07
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+93
+0b
+00
+00
+00
+00
+00
+00
+bf
+07
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+07
+04
+00
+00
+00
+00
+00
+00
+c7
+07
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+50
+07
+00
+00
+00
+00
+00
+00
+cf
+07
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+a2
+0c
+00
+00
+00
+00
+00
+00
+d7
+07
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+02
+0c
+00
+00
+00
+00
+00
+00
+e7
+07
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+64
+0c
+00
+00
+00
+00
+00
+00
+f6
+07
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+d3
+0c
+00
+00
+00
+00
+00
+00
+fb
+07
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+67
+02
+00
+00
+00
+00
+00
+00
+06
+08
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+f8
+10
+00
+00
+00
+00
+00
+00
+0b
+08
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+17
+06
+00
+00
+00
+00
+00
+00
+16
+08
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+41
+11
+00
+00
+00
+00
+00
+00
+1b
+08
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+da
+01
+00
+00
+00
+00
+00
+00
+35
+08
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+8a
+11
+00
+00
+00
+00
+00
+00
+45
+08
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+d3
+11
+00
+00
+00
+00
+00
+00
+50
+08
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+b0
+04
+00
+00
+00
+00
+00
+00
+58
+08
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+b0
+0c
+00
+00
+00
+00
+00
+00
+60
+08
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+db
+0c
+00
+00
+00
+00
+00
+00
+68
+08
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+1c
+12
+00
+00
+00
+00
+00
+00
+6d
+08
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+68
+05
+00
+00
+00
+00
+00
+00
+78
+08
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+90
+12
+00
+00
+00
+00
+00
+00
+83
+08
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+de
+04
+00
+00
+00
+00
+00
+00
+8f
+08
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+e0
+0c
+00
+00
+00
+00
+00
+00
+97
+08
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+f7
+0c
+00
+00
+00
+00
+00
+00
+a3
+08
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+68
+05
+00
+00
+00
+00
+00
+00
+b7
+08
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+ed
+05
+00
+00
+00
+00
+00
+00
+c3
+08
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+00
+0d
+00
+00
+00
+00
+00
+00
+cb
+08
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+16
+0d
+00
+00
+00
+00
+00
+00
+d7
+08
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+68
+05
+00
+00
+00
+00
+00
+00
+eb
+08
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+9f
+06
+00
+00
+00
+00
+00
+00
+f7
+08
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+20
+0d
+00
+00
+00
+00
+00
+00
+ff
+08
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+4b
+0d
+00
+00
+00
+00
+00
+00
+07
+09
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+ec
+12
+00
+00
+00
+00
+00
+00
+0c
+09
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+68
+05
+00
+00
+00
+00
+00
+00
+17
+09
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+60
+13
+00
+00
+00
+00
+00
+00
+22
+09
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+73
+03
+00
+00
+00
+00
+00
+00
+2e
+09
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+50
+0d
+00
+00
+00
+00
+00
+00
+36
+09
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+6b
+0d
+00
+00
+00
+00
+00
+00
+42
+09
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+68
+05
+00
+00
+00
+00
+00
+00
+4d
+09
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+83
+13
+00
+00
+00
+00
+00
+00
+58
+09
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+1f
+02
+00
+00
+00
+00
+00
+00
+64
+09
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+70
+0d
+00
+00
+00
+00
+00
+00
+6c
+09
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+bb
+0d
+00
+00
+00
+00
+00
+00
+74
+09
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+a6
+13
+00
+00
+00
+00
+00
+00
+79
+09
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+68
+05
+00
+00
+00
+00
+00
+00
+84
+09
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+42
+14
+00
+00
+00
+00
+00
+00
+8f
+09
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+cd
+06
+00
+00
+00
+00
+00
+00
+9b
+09
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+c0
+0d
+00
+00
+00
+00
+00
+00
+a3
+09
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+58
+0e
+00
+00
+00
+00
+00
+00
+ab
+09
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+78
+14
+00
+00
+00
+00
+00
+00
+b0
+09
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+68
+05
+00
+00
+00
+00
+00
+00
+bb
+09
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+3c
+15
+00
+00
+00
+00
+00
+00
+c0
+09
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d9
+09
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+3b
+05
+00
+00
+00
+00
+00
+00
+e5
+09
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+60
+0e
+00
+00
+00
+00
+00
+00
+ed
+09
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+b8
+0f
+00
+00
+00
+00
+00
+00
+f5
+09
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+d1
+15
+00
+00
+00
+00
+00
+00
+fa
+09
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+68
+05
+00
+00
+00
+00
+00
+00
+05
+0a
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+31
+16
+00
+00
+00
+00
+00
+00
+0a
+0a
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+a8
+01
+00
+00
+00
+00
+00
+00
+15
+0a
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+d9
+16
+00
+00
+00
+00
+00
+00
+1a
+0a
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+3f
+06
+00
+00
+00
+00
+00
+00
+25
+0a
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+35
+17
+00
+00
+00
+00
+00
+00
+2a
+0a
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+35
+06
+00
+00
+00
+00
+00
+00
+35
+0a
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+dd
+17
+00
+00
+00
+00
+00
+00
+45
+0a
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+39
+18
+00
+00
+00
+00
+00
+00
+4e
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+26
+0f
+00
+00
+00
+00
+00
+00
+56
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+48
+0f
+00
+00
+00
+00
+00
+00
+5f
+0a
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+7f
+02
+00
+00
+00
+00
+00
+00
+6c
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+65
+0f
+00
+00
+00
+00
+00
+00
+74
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+a1
+0f
+00
+00
+00
+00
+00
+00
+7d
+0a
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+90
+02
+00
+00
+00
+00
+00
+00
+88
+0a
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+95
+18
+00
+00
+00
+00
+00
+00
+94
+0a
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+7d
+01
+00
+00
+00
+00
+00
+00
+9c
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+c0
+0f
+00
+00
+00
+00
+00
+00
+a4
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+3d
+12
+00
+00
+00
+00
+00
+00
+ac
+0a
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+04
+19
+00
+00
+00
+00
+00
+00
+b1
+0a
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+68
+05
+00
+00
+00
+00
+00
+00
+bc
+0a
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+66
+19
+00
+00
+00
+00
+00
+00
+cc
+0a
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+d5
+19
+00
+00
+00
+00
+00
+00
+d1
+0a
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+e0
+02
+00
+00
+00
+00
+00
+00
+dc
+0a
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+0c
+1a
+00
+00
+00
+00
+00
+00
+e1
+0a
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+cd
+00
+00
+00
+00
+00
+00
+00
+ec
+0a
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+55
+1a
+00
+00
+00
+00
+00
+00
+f1
+0a
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+c5
+01
+00
+00
+00
+00
+00
+00
+fc
+0a
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+b4
+1a
+00
+00
+00
+00
+00
+00
+01
+0b
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+c3
+02
+00
+00
+00
+00
+00
+00
+0c
+0b
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+36
+1b
+00
+00
+00
+00
+00
+00
+11
+0b
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+78
+01
+00
+00
+00
+00
+00
+00
+21
+0b
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+17
+06
+00
+00
+00
+00
+00
+00
+3c
+0b
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+6d
+1b
+00
+00
+00
+00
+00
+00
+4c
+0b
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+a3
+1b
+00
+00
+00
+00
+00
+00
+5c
+0b
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+ec
+1b
+00
+00
+00
+00
+00
+00
+70
+0b
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+3f
+06
+00
+00
+00
+00
+00
+00
+7b
+0b
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+22
+1c
+00
+00
+00
+00
+00
+00
+80
+0b
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+7f
+02
+00
+00
+00
+00
+00
+00
+92
+0b
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+b5
+03
+00
+00
+00
+00
+00
+00
+9e
+0b
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+40
+12
+00
+00
+00
+00
+00
+00
+a6
+0b
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+74
+13
+00
+00
+00
+00
+00
+00
+ae
+0b
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+58
+1c
+00
+00
+00
+00
+00
+00
+b3
+0b
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+68
+05
+00
+00
+00
+00
+00
+00
+be
+0b
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+b8
+1c
+00
+00
+00
+00
+00
+00
+ce
+0b
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+3a
+1d
+00
+00
+00
+00
+00
+00
+d3
+0b
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+a6
+02
+00
+00
+00
+00
+00
+00
+de
+0b
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+f5
+1d
+00
+00
+00
+00
+00
+00
+ee
+0b
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+64
+1e
+00
+00
+00
+00
+00
+00
+fc
+0b
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+9a
+1e
+00
+00
+00
+00
+00
+00
+01
+0c
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+a8
+01
+00
+00
+00
+00
+00
+00
+0c
+0c
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+d0
+1e
+00
+00
+00
+00
+00
+00
+11
+0c
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+95
+00
+00
+00
+00
+00
+00
+00
+23
+0c
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+74
+00
+00
+00
+00
+00
+00
+00
+2f
+0c
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+80
+13
+00
+00
+00
+00
+00
+00
+37
+0c
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+6f
+14
+00
+00
+00
+00
+00
+00
+3f
+0c
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+19
+1f
+00
+00
+00
+00
+00
+00
+44
+0c
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+68
+05
+00
+00
+00
+00
+00
+00
+4f
+0c
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+79
+1f
+00
+00
+00
+00
+00
+00
+54
+0c
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+a6
+02
+00
+00
+00
+00
+00
+00
+5f
+0c
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+d5
+1f
+00
+00
+00
+00
+00
+00
+6f
+0c
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+31
+20
+00
+00
+00
+00
+00
+00
+7a
+0c
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+7b
+05
+00
+00
+00
+00
+00
+00
+82
+0c
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+70
+14
+00
+00
+00
+00
+00
+00
+8a
+0c
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+18
+15
+00
+00
+00
+00
+00
+00
+92
+0c
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+67
+20
+00
+00
+00
+00
+00
+00
+97
+0c
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+68
+05
+00
+00
+00
+00
+00
+00
+a2
+0c
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+03
+21
+00
+00
+00
+00
+00
+00
+b0
+0c
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+5f
+21
+00
+00
+00
+00
+00
+00
+be
+0c
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+e1
+21
+00
+00
+00
+00
+00
+00
+c8
+0c
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+d5
+0c
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+1c
+06
+00
+00
+00
+00
+00
+00
+e0
+0c
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+9b
+05
+00
+00
+00
+00
+00
+00
+eb
+0c
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+68
+05
+00
+00
+00
+00
+00
+00
+f6
+0c
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+a8
+01
+00
+00
+00
+00
+00
+00
+3c
+0d
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+c1
+06
+00
+00
+00
+00
+00
+00
+47
+0d
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+20
+15
+00
+00
+00
+00
+00
+00
+4f
+0d
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+4f
+18
+00
+00
+00
+00
+00
+00
+57
+0d
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+17
+22
+00
+00
+00
+00
+00
+00
+69
+0d
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+76
+04
+00
+00
+00
+00
+00
+00
+7c
+0d
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+1c
+24
+00
+00
+00
+00
+00
+00
+81
+0d
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+04
+00
+00
+00
+40
+00
+00
+00
+00
+00
+00
+00
+86
+0d
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+54
+06
+00
+00
+00
+00
+00
+00
+90
+0d
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+52
+24
+00
+00
+00
+00
+00
+00
+99
+0d
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+9e
+15
+00
+00
+00
+00
+00
+00
+a1
+0d
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+ef
+15
+00
+00
+00
+00
+00
+00
+af
+0d
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+04
+00
+00
+00
+b0
+00
+00
+00
+00
+00
+00
+00
+b8
+0d
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+ae
+24
+00
+00
+00
+00
+00
+00
+c1
+0d
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+e4
+24
+00
+00
+00
+00
+00
+00
+ca
+0d
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+1a
+25
+00
+00
+00
+00
+00
+00
+e0
+0d
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+f9
+00
+00
+00
+e8
+25
+00
+00
+00
+00
+00
+00
+e9
+0d
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+1b
+03
+00
+00
+00
+00
+00
+00
+f5
+0d
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+78
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fe
+0d
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+f4
+01
+00
+00
+00
+00
+00
+00
+0a
+0e
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+77
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+13
+0e
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+ce
+05
+00
+00
+00
+00
+00
+00
+1f
+0e
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+76
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+28
+0e
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+28
+00
+00
+00
+00
+00
+00
+00
+34
+0e
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+75
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3d
+0e
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+23
+04
+00
+00
+00
+00
+00
+00
+49
+0e
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+74
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+52
+0e
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+5e
+0e
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+73
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7d
+0e
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+49
+00
+00
+00
+00
+00
+00
+00
+89
+0e
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+7e
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a3
+0e
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+0c
+05
+00
+00
+00
+00
+00
+00
+af
+0e
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+de
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c8
+0e
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+21
+05
+00
+00
+00
+00
+00
+00
+d4
+0e
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+d4
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+dd
+0e
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+59
+05
+00
+00
+00
+00
+00
+00
+ea
+0e
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+a1
+01
+00
+00
+00
+00
+00
+00
+07
+0f
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+da
+03
+00
+00
+00
+00
+00
+00
+1b
+0f
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+a2
+05
+00
+00
+00
+00
+00
+00
+3f
+0f
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+00
+00
+00
+e2
+00
+00
+00
+00
+00
+00
+00
+82
+04
+00
+00
+02
+00
+e8
+00
+00
+00
+01
+01
+fb
+0e
+0d
+00
+01
+01
+01
+01
+00
+00
+00
+01
+00
+00
+01
+2e
+2f
+6c
+69
+62
+79
+61
+73
+6d
+00
+6c
+69
+62
+79
+61
+73
+6d
+2f
+74
+65
+73
+74
+73
+00
+2f
+75
+73
+72
+2f
+6c
+69
+62
+2f
+67
+63
+63
+2f
+78
+38
+36
+5f
+36
+34
+2d
+6c
+69
+6e
+75
+78
+2d
+67
+6e
+75
+2f
+34
+2e
+30
+2e
+32
+2f
+69
+6e
+63
+6c
+75
+64
+65
+00
+2f
+75
+73
+72
+2f
+69
+6e
+63
+6c
+75
+64
+65
+00
+2f
+75
+73
+72
+2f
+69
+6e
+63
+6c
+75
+64
+65
+2f
+62
+69
+74
+73
+00
+00
+69
+6e
+74
+6e
+75
+6d
+2e
+63
+00
+01
+00
+00
+6c
+65
+62
+31
+32
+38
+5f
+74
+65
+73
+74
+2e
+63
+00
+02
+00
+00
+63
+6f
+72
+65
+74
+79
+70
+65
+2e
+68
+00
+01
+00
+00
+62
+69
+74
+76
+65
+63
+74
+2e
+68
+00
+01
+00
+00
+73
+74
+64
+64
+65
+66
+2e
+68
+00
+03
+00
+00
+73
+74
+64
+69
+6f
+2e
+68
+00
+04
+00
+00
+6c
+69
+62
+69
+6f
+2e
+68
+00
+04
+00
+00
+74
+79
+70
+65
+73
+2e
+68
+00
+05
+00
+00
+65
+72
+72
+77
+61
+72
+6e
+2e
+68
+00
+01
+00
+00
+00
+00
+09
+02
+00
+00
+00
+00
+00
+00
+00
+00
+03
+c0
+00
+01
+4b
+bb
+73
+75
+59
+73
+75
+59
+73
+75
+59
+73
+75
+59
+57
+75
+bb
+be
+4b
+bb
+bb
+bb
+bb
+bb
+75
+49
+5d
+08
+21
+57
+4a
+3d
+68
+4c
+fc
+40
+a2
+08
+22
+73
+75
+f9
+08
+8c
+73
+75
+94
+03
+75
+08
+82
+03
+0f
+08
+e4
+08
+21
+57
+4a
+3d
+68
+3a
+3e
+5a
+2c
+3e
+6a
+e5
+08
+22
+73
+75
+eb
+08
+70
+73
+75
+86
+03
+73
+08
+90
+03
+11
+08
+e4
+08
+21
+57
+4a
+3d
+68
+3a
+3e
+92
+2c
+3e
+6a
+e5
+08
+22
+73
+75
+eb
+08
+54
+73
+75
+86
+03
+73
+08
+74
+03
+11
+08
+e4
+08
+21
+57
+4a
+3d
+68
+3a
+3e
+92
+2c
+3e
+6a
+e5
+08
+22
+73
+75
+eb
+08
+54
+73
+75
+86
+03
+73
+08
+74
+03
+12
+08
+e4
+08
+c9
+ad
+3b
+3d
+84
+84
+2c
+4c
+6a
+a2
+83
+85
+f4
+91
+85
+83
+85
+83
+85
+03
+0e
+ac
+03
+77
+08
+d6
+5d
+03
+61
+08
+20
+bb
+c3
+03
+79
+08
+58
+03
+26
+9e
+bb
+3b
+59
+08
+9c
+5d
+03
+09
+02
+3c
+01
+20
+3d
+ae
+3d
+75
+4d
+44
+38
+20
+40
+03
+0d
+2e
+03
+74
+20
+68
+75
+3b
+59
+08
+59
+e6
+ad
+73
+3d
+59
+73
+41
+39
+4d
+08
+16
+c9
+57
+4b
+68
+3a
+3e
+03
+09
+90
+49
+3d
+3f
+03
+76
+08
+20
+50
+03
+7a
+3c
+43
+77
+03
+79
+08
+74
+be
+9d
+40
+08
+6a
+21
+49
+3d
+30
+9f
+1f
+3b
+83
+9f
+1f
+5f
+02
+28
+19
+03
+79
+4a
+59
+88
+69
+75
+83
+08
+23
+83
+a1
+75
+83
+08
+24
+02
+24
+17
+03
+ed
+00
+d6
+08
+4e
+08
+21
+b0
+03
+09
+08
+58
+03
+79
+02
+23
+01
+78
+73
+83
+03
+f7
+7e
+9e
+03
+77
+82
+03
+13
+c8
+03
+fc
+00
+08
+9e
+03
+7a
+08
+3c
+83
+03
+a2
+7f
+c8
+03
+79
+08
+c8
+03
+35
+08
+c8
+bb
+a2
+08
+15
+bb
+08
+f5
+bb
+03
+77
+02
+24
+01
+bb
+03
+1a
+08
+20
+08
+85
+03
+b3
+7f
+08
+82
+03
+d0
+00
+08
+3c
+f3
+03
+55
+c8
+bb
+03
+48
+08
+66
+03
+7a
+08
+66
+08
+af
+03
+1a
+08
+ac
+08
+69
+08
+69
+08
+69
+08
+21
+08
+3f
+ad
+e5
+08
+5d
+ad
+e5
+08
+5d
+bb
+03
+19
+08
+90
+bb
+02
+24
+15
+bb
+02
+23
+15
+bb
+02
+24
+15
+03
+bc
+7f
+08
+82
+03
+1f
+08
+3c
+08
+b1
+03
+77
+08
+ac
+03
+cd
+00
+08
+d6
+21
+49
+3d
+32
+75
+2a
+83
+76
+75
+79
+08
+21
+2d
+2f
+a3
+08
+3d
+be
+4b
+83
+73
+08
+13
+bf
+91
+96
+1f
+cd
+4b
+b2
+08
+6a
+03
+78
+9e
+44
+03
+7a
+58
+a4
+03
+7a
+4a
+03
+0a
+9e
+21
+3b
+3d
+03
+18
+ba
+08
+6a
+03
+67
+66
+03
+19
+74
+1e
+a0
+03
+69
+20
+c0
+e5
+03
+10
+08
+20
+1e
+a0
+03
+74
+20
+08
+30
+03
+0a
+4a
+03
+76
+20
+03
+0a
+3c
+03
+c8
+00
+90
+02
+28
+16
+46
+6a
+6d
+75
+83
+08
+23
+e7
+96
+59
+03
+0c
+f2
+bc
+08
+13
+03
+6b
+02
+23
+01
+3d
+2d
+84
+d5
+03
+70
+74
+da
+03
+15
+e4
+e5
+e5
+03
+66
+08
+c8
+75
+03
+b7
+7f
+08
+74
+02
+24
+16
+38
+4e
+38
+08
+21
+77
+6a
+08
+40
+bf
+d8
+08
+4f
+a1
+75
+83
+08
+24
+03
+09
+08
+82
+b4
+08
+23
+c9
+57
+3d
+92
+08
+4d
+91
+03
+59
+02
+23
+01
+f5
+03
+09
+9e
+03
+78
+82
+44
+08
+13
+e5
+08
+3d
+08
+3d
+03
+15
+08
+58
+03
+52
+08
+4a
+08
+bb
+08
+9a
+03
+22
+08
+e4
+83
+3b
+3d
+67
+d5
+03
+58
+d6
+03
+eb
+00
+f2
+02
+22
+18
+03
+7a
+3c
+3d
+79
+03
+09
+08
+20
+83
+08
+23
+03
+0c
+82
+be
+db
+4c
+03
+62
+08
+d6
+51
+03
+7a
+2e
+42
+76
+f8
+44
+03
+78
+3c
+98
+91
+e3
+4c
+59
+39
+03
+64
+f2
+03
+10
+c8
+e5
+03
+16
+08
+f2
+08
+5c
+38
+3d
+77
+08
+6e
+83
+08
+23
+92
+f4
+e5
+08
+43
+08
+bc
+03
+6b
+08
+58
+89
+03
+7a
+3c
+42
+03
+0c
+2e
+d2
+03
+0a
+e4
+08
+5b
+39
+3f
+03
+0a
+f2
+03
+78
+08
+3c
+ec
+03
+78
+d6
+36
+03
+78
+4a
+5b
+83
+49
+3d
+08
+21
+a1
+08
+1d
+04
+02
+03
+9d
+7b
+ac
+08
+17
+03
+14
+d6
+03
+71
+08
+82
+8d
+af
+73
+75
+03
+52
+02
+24
+01
+83
+03
+0b
+02
+33
+01
+03
+25
+08
+58
+59
+bb
+7e
+42
+03
+7a
+4a
+03
+44
+08
+c8
+91
+2d
+3d
+87
+37
+41
+68
+bd
+bb
+49
+3d
+68
+c1
+81
+68
+d7
+49
+3d
+67
+83
+03
+70
+02
+3f
+01
+03
+38
+08
+58
+08
+53
+41
+53
+50
+03
+7a
+4a
+03
+09
+08
+90
+5a
+02
+3e
+14
+9f
+03
+56
+08
+3c
+91
+08
+ab
+08
+24
+83
+3d
+57
+59
+02
+48
+17
+02
+14
+00
+01
+01
+00
+00
+f5
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+24
+49
+64
+3a
+20
+69
+6e
+74
+6e
+75
+6d
+2e
+63
+20
+31
+32
+39
+35
+20
+32
+30
+30
+35
+2d
+31
+30
+2d
+33
+30
+20
+30
+36
+3a
+31
+33
+3a
+32
+34
+5a
+20
+70
+65
+74
+65
+72
+20
+24
+00
+47
+43
+43
+3a
+20
+28
+47
+4e
+55
+29
+20
+34
+2e
+30
+2e
+32
+20
+28
+44
+65
+62
+69
+61
+6e
+20
+34
+2e
+30
+2e
+32
+2d
+32
+29
+00
+30
+00
+32
+00
+02
+00
+37
+46
+00
+7f
+00
+38
+30
+00
+80
+01
+00
+38
+31
+00
+81
+01
+00
+38
+32
+00
+82
+01
+00
+33
+32
+33
+39
+00
+b9
+64
+00
+7e
+00
+81
+7f
+00
+80
+7f
+00
+ff
+7e
+00
+4f
+70
+65
+72
+61
+74
+69
+6f
+6e
+20
+6e
+65
+65
+64
+73
+20
+61
+6e
+20
+6f
+70
+65
+72
+61
+6e
+64
+00
+2e
+2f
+6c
+69
+62
+79
+61
+73
+6d
+2f
+69
+6e
+74
+6e
+75
+6d
+2e
+63
+00
+53
+45
+47
+00
+69
+6e
+76
+61
+6c
+69
+64
+20
+75
+73
+65
+20
+6f
+66
+20
+27
+25
+73
+27
+00
+57
+52
+54
+00
+3a
+00
+75
+6e
+6b
+6e
+6f
+77
+6e
+20
+69
+6e
+74
+6e
+75
+6d
+20
+74
+79
+70
+65
+00
+64
+65
+73
+74
+69
+6e
+61
+74
+69
+6f
+6e
+20
+74
+6f
+6f
+20
+6c
+61
+72
+67
+65
+00
+62
+69
+67
+20
+65
+6e
+64
+69
+61
+6e
+20
+6e
+6f
+74
+20
+69
+6d
+70
+6c
+65
+6d
+65
+6e
+74
+65
+64
+00
+30
+78
+25
+6c
+78
+2f
+25
+75
+00
+30
+78
+25
+73
+2f
+25
+75
+00
+54
+65
+73
+74
+20
+6c
+65
+62
+31
+32
+38
+5f
+74
+65
+73
+74
+3a
+20
+00
+2d
+00
+00
+75
+6e
+00
+25
+73
+20
+2a
+2a
+20
+46
+3a
+20
+25
+73
+0a
+00
+20
+2b
+25
+64
+2d
+25
+64
+2f
+25
+64
+20
+25
+64
+25
+25
+0a
+25
+73
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ff
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+01
+05
+00
+00
+00
+00
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+cb
+05
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+c2
+05
+00
+00
+00
+00
+00
+00
+20
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+b9
+05
+00
+00
+00
+00
+00
+00
+28
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+c5
+04
+00
+00
+00
+00
+00
+00
+30
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+1d
+0a
+00
+00
+00
+00
+00
+00
+38
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+74
+0a
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+90
+0a
+00
+00
+00
+00
+00
+00
+48
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+5d
+0a
+00
+00
+00
+00
+00
+00
+50
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+17
+09
+00
+00
+00
+00
+00
+00
+58
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+17
+09
+00
+00
+00
+00
+00
+00
+60
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+f9
+08
+00
+00
+00
+00
+00
+00
+68
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+f9
+08
+00
+00
+00
+00
+00
+00
+70
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+09
+0a
+00
+00
+00
+00
+00
+00
+78
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+45
+0c
+00
+00
+00
+00
+00
+00
+80
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+ac
+0a
+00
+00
+00
+00
+00
+00
+88
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+c3
+0a
+00
+00
+00
+00
+00
+00
+90
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+da
+0a
+00
+00
+00
+00
+00
+00
+98
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+f1
+0a
+00
+00
+00
+00
+00
+00
+a0
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+17
+0b
+00
+00
+00
+00
+00
+00
+a8
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+47
+0b
+00
+00
+00
+00
+00
+00
+b0
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+77
+0b
+00
+00
+00
+00
+00
+00
+b8
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+3a
+0a
+00
+00
+00
+00
+00
+00
+c0
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+35
+09
+00
+00
+00
+00
+00
+00
+c8
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+5c
+09
+00
+00
+00
+00
+00
+00
+d0
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+89
+09
+00
+00
+00
+00
+00
+00
+d8
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+b9
+09
+00
+00
+00
+00
+00
+00
+e0
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+9d
+0b
+00
+00
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+cd
+0b
+00
+00
+00
+00
+00
+00
+f0
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+fc
+0b
+00
+00
+00
+00
+00
+00
+f8
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+15
+08
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+2c
+0c
+00
+00
+00
+00
+00
+00
+08
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+d7
+09
+00
+00
+00
+00
+00
+00
+10
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+f0
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+91
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+28
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+38
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+48
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+06
+00
+00
+00
+00
+00
+00
+00
+58
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+09
+00
+00
+00
+00
+00
+00
+00
+68
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+0b
+00
+00
+00
+00
+00
+00
+00
+78
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+0e
+00
+00
+00
+00
+00
+00
+00
+88
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+11
+00
+00
+00
+00
+00
+00
+00
+98
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+14
+00
+00
+00
+00
+00
+00
+00
+a8
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+17
+00
+00
+00
+00
+00
+00
+00
+b8
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+1a
+00
+00
+00
+00
+00
+00
+00
+c8
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+1d
+00
+00
+00
+00
+00
+00
+00
+d8
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+22
+00
+00
+00
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f8
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+91
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+08
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+18
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+28
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+06
+00
+00
+00
+00
+00
+00
+00
+38
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+91
+04
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+48
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+0b
+00
+00
+00
+00
+00
+00
+00
+58
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+0e
+00
+00
+00
+00
+00
+00
+00
+68
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+11
+00
+00
+00
+00
+00
+00
+00
+78
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+14
+00
+00
+00
+00
+00
+00
+00
+88
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+25
+00
+00
+00
+00
+00
+00
+00
+a8
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+06
+00
+00
+00
+00
+00
+00
+00
+b8
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+27
+00
+00
+00
+00
+00
+00
+00
+c8
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+0b
+00
+00
+00
+00
+00
+00
+00
+d8
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+2a
+00
+00
+00
+00
+00
+00
+00
+e8
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+11
+00
+00
+00
+00
+00
+00
+00
+f8
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+93
+04
+00
+00
+2d
+00
+00
+00
+00
+00
+00
+00
+4e
+75
+6d
+65
+72
+69
+63
+20
+63
+6f
+6e
+73
+74
+61
+6e
+74
+20
+74
+6f
+6f
+20
+6c
+61
+72
+67
+65
+20
+66
+6f
+72
+20
+69
+6e
+74
+65
+72
+6e
+61
+6c
+20
+66
+6f
+72
+6d
+61
+74
+00
+00
+43
+68
+61
+72
+61
+63
+74
+65
+72
+20
+63
+6f
+6e
+73
+74
+61
+6e
+74
+20
+74
+6f
+6f
+20
+6c
+61
+72
+67
+65
+20
+66
+6f
+72
+20
+69
+6e
+74
+65
+72
+6e
+61
+6c
+20
+66
+6f
+72
+6d
+61
+74
+00
+00
+00
+00
+00
+00
+00
+00
+69
+6e
+76
+61
+6c
+69
+64
+20
+6f
+70
+65
+72
+61
+74
+69
+6f
+6e
+20
+69
+6e
+20
+69
+6e
+74
+6e
+75
+6d
+20
+63
+61
+6c
+63
+75
+6c
+61
+74
+69
+6f
+6e
+00
+76
+61
+6c
+75
+65
+20
+64
+6f
+65
+73
+20
+6e
+6f
+74
+20
+66
+69
+74
+20
+69
+6e
+20
+25
+64
+20
+62
+69
+74
+20
+66
+69
+65
+6c
+64
+00
+00
+00
+00
+00
+00
+6d
+69
+73
+61
+6c
+69
+67
+6e
+65
+64
+20
+76
+61
+6c
+75
+65
+2c
+20
+74
+72
+75
+6e
+63
+61
+74
+69
+6e
+67
+20
+74
+6f
+20
+62
+6f
+75
+6e
+64
+61
+72
+79
+00
+00
+00
+00
+00
+00
+00
+00
+25
+73
+73
+69
+67
+6e
+65
+64
+20
+25
+73
+25
+73
+20
+73
+69
+7a
+65
+28
+29
+20
+62
+61
+64
+20
+73
+69
+7a
+65
+3a
+20
+65
+78
+70
+65
+63
+74
+65
+64
+20
+25
+6c
+75
+2c
+20
+67
+6f
+74
+20
+25
+6c
+75
+21
+00
+00
+00
+25
+73
+73
+69
+67
+6e
+65
+64
+20
+25
+73
+25
+73
+20
+67
+65
+74
+28
+29
+20
+62
+61
+64
+20
+73
+69
+7a
+65
+3a
+20
+65
+78
+70
+65
+63
+74
+65
+64
+20
+25
+6c
+75
+2c
+20
+67
+6f
+74
+20
+25
+6c
+75
+21
+00
+00
+00
+00
+25
+73
+73
+69
+67
+6e
+65
+64
+20
+25
+73
+25
+73
+20
+67
+65
+74
+28
+29
+20
+62
+61
+64
+20
+6f
+75
+74
+70
+75
+74
+21
+00
+14
+00
+00
+00
+ff
+ff
+ff
+ff
+01
+00
+01
+78
+10
+0c
+07
+08
+90
+01
+00
+00
+00
+00
+00
+00
+1c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+79
+00
+00
+00
+00
+00
+00
+00
+04
+04
+00
+00
+00
+0e
+10
+00
+1c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+50
+00
+00
+00
+00
+00
+00
+00
+04
+04
+00
+00
+00
+0e
+10
+00
+2c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d6
+00
+00
+00
+00
+00
+00
+00
+04
+0a
+00
+00
+00
+86
+03
+83
+04
+04
+11
+00
+00
+00
+0e
+20
+8c
+02
+00
+00
+00
+00
+00
+00
+2c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d6
+00
+00
+00
+00
+00
+00
+00
+04
+05
+00
+00
+00
+86
+03
+04
+16
+00
+00
+00
+0e
+20
+8c
+02
+83
+04
+00
+00
+00
+00
+00
+00
+2c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d6
+00
+00
+00
+00
+00
+00
+00
+04
+05
+00
+00
+00
+86
+03
+04
+16
+00
+00
+00
+0e
+20
+8c
+02
+83
+04
+00
+00
+00
+00
+00
+00
+2c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d6
+00
+00
+00
+00
+00
+00
+00
+04
+05
+00
+00
+00
+86
+03
+04
+16
+00
+00
+00
+0e
+20
+8c
+02
+83
+04
+00
+00
+00
+00
+00
+00
+34
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+85
+01
+00
+00
+00
+00
+00
+00
+04
+05
+00
+00
+00
+83
+05
+04
+12
+00
+00
+00
+8d
+02
+8c
+03
+86
+04
+04
+07
+00
+00
+00
+0e
+30
+00
+00
+00
+00
+00
+00
+00
+24
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1f
+00
+00
+00
+00
+00
+00
+00
+04
+01
+00
+00
+00
+0e
+10
+83
+02
+00
+00
+00
+00
+00
+00
+00
+24
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+71
+00
+00
+00
+00
+00
+00
+00
+04
+04
+00
+00
+00
+0e
+10
+83
+02
+00
+00
+00
+00
+00
+00
+00
+24
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9b
+00
+00
+00
+00
+00
+00
+00
+04
+05
+00
+00
+00
+86
+02
+04
+11
+00
+00
+00
+0e
+20
+83
+03
+24
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+00
+00
+00
+00
+00
+00
+00
+04
+01
+00
+00
+00
+0e
+10
+83
+02
+00
+00
+00
+00
+00
+00
+00
+34
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+52
+05
+00
+00
+00
+00
+00
+00
+04
+0a
+00
+00
+00
+86
+06
+83
+07
+04
+0d
+00
+00
+00
+8f
+02
+8e
+03
+04
+11
+00
+00
+00
+0e
+50
+8d
+04
+8c
+05
+00
+00
+00
+24
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2b
+00
+00
+00
+00
+00
+00
+00
+04
+01
+00
+00
+00
+0e
+10
+83
+02
+00
+00
+00
+00
+00
+00
+00
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+17
+00
+00
+00
+00
+00
+00
+00
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+16
+00
+00
+00
+00
+00
+00
+00
+1c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2b
+00
+00
+00
+00
+00
+00
+00
+04
+04
+00
+00
+00
+0e
+10
+00
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1b
+00
+00
+00
+00
+00
+00
+00
+1c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4b
+00
+00
+00
+00
+00
+00
+00
+04
+04
+00
+00
+00
+0e
+10
+00
+24
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+98
+00
+00
+00
+00
+00
+00
+00
+04
+01
+00
+00
+00
+0e
+10
+83
+02
+00
+00
+00
+00
+00
+00
+00
+34
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+58
+01
+00
+00
+00
+00
+00
+00
+04
+0a
+00
+00
+00
+8d
+04
+83
+07
+04
+0d
+00
+00
+00
+8f
+02
+8e
+03
+04
+11
+00
+00
+00
+0e
+40
+8c
+05
+86
+06
+00
+00
+00
+34
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7d
+02
+00
+00
+00
+00
+00
+00
+04
+0a
+00
+00
+00
+8c
+05
+83
+07
+04
+1a
+00
+00
+00
+86
+06
+8f
+02
+8e
+03
+8d
+04
+04
+07
+00
+00
+00
+0e
+60
+00
+00
+00
+2c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+34
+01
+00
+00
+00
+00
+00
+00
+04
+0a
+00
+00
+00
+86
+05
+83
+06
+04
+18
+00
+00
+00
+0e
+30
+8c
+04
+8e
+02
+8d
+03
+00
+00
+2c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ef
+00
+00
+00
+00
+00
+00
+00
+04
+0a
+00
+00
+00
+86
+03
+83
+04
+04
+0c
+00
+00
+00
+0e
+20
+8c
+02
+00
+00
+00
+00
+00
+00
+2c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a8
+00
+00
+00
+00
+00
+00
+00
+04
+0a
+00
+00
+00
+8c
+02
+86
+03
+04
+0c
+00
+00
+00
+0e
+20
+83
+04
+00
+00
+00
+00
+00
+00
+54
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2f
+03
+00
+00
+00
+00
+00
+00
+04
+02
+00
+00
+00
+0e
+10
+04
+02
+00
+00
+00
+0e
+18
+04
+02
+00
+00
+00
+0e
+20
+04
+02
+00
+00
+00
+0e
+28
+04
+01
+00
+00
+00
+0e
+30
+04
+01
+00
+00
+00
+0e
+38
+04
+07
+00
+00
+00
+0e
+e0
+01
+83
+07
+86
+06
+8c
+05
+8d
+04
+8e
+03
+8f
+02
+00
+00
+1c
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3c
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+80
+00
+00
+00
+00
+00
+00
+00
+5c
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+60
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+d0
+00
+00
+00
+00
+00
+00
+00
+8c
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+90
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+b0
+01
+00
+00
+00
+00
+00
+00
+bc
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c0
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+90
+02
+00
+00
+00
+00
+00
+00
+ec
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f0
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+70
+03
+00
+00
+00
+00
+00
+00
+1c
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+50
+04
+00
+00
+00
+00
+00
+00
+54
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+58
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+e0
+05
+00
+00
+00
+00
+00
+00
+7c
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+80
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+00
+06
+00
+00
+00
+00
+00
+00
+a4
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a8
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+80
+06
+00
+00
+00
+00
+00
+00
+cc
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d0
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+20
+07
+00
+00
+00
+00
+00
+00
+f4
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f8
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+50
+07
+00
+00
+00
+00
+00
+00
+2c
+02
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+30
+02
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+b0
+0c
+00
+00
+00
+00
+00
+00
+54
+02
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+58
+02
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+e0
+0c
+00
+00
+00
+00
+00
+00
+6c
+02
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+70
+02
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+00
+0d
+00
+00
+00
+00
+00
+00
+84
+02
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+88
+02
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+20
+0d
+00
+00
+00
+00
+00
+00
+a4
+02
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a8
+02
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+50
+0d
+00
+00
+00
+00
+00
+00
+bc
+02
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c0
+02
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+70
+0d
+00
+00
+00
+00
+00
+00
+dc
+02
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e0
+02
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+c0
+0d
+00
+00
+00
+00
+00
+00
+04
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+08
+03
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+60
+0e
+00
+00
+00
+00
+00
+00
+3c
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+03
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+c0
+0f
+00
+00
+00
+00
+00
+00
+74
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+78
+03
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+40
+12
+00
+00
+00
+00
+00
+00
+a4
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a8
+03
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+80
+13
+00
+00
+00
+00
+00
+00
+d4
+03
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d8
+03
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+70
+14
+00
+00
+00
+00
+00
+00
+04
+04
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+08
+04
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+20
+15
+00
+00
+00
+00
+00
+00
+14
+00
+00
+00
+00
+00
+00
+00
+01
+00
+01
+78
+10
+0c
+07
+08
+90
+01
+00
+00
+00
+00
+00
+00
+1c
+00
+00
+00
+1c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+79
+00
+00
+00
+00
+00
+00
+00
+04
+04
+00
+00
+00
+0e
+10
+00
+1c
+00
+00
+00
+3c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+50
+00
+00
+00
+00
+00
+00
+00
+04
+04
+00
+00
+00
+0e
+10
+00
+2c
+00
+00
+00
+5c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d6
+00
+00
+00
+00
+00
+00
+00
+04
+0a
+00
+00
+00
+86
+03
+83
+04
+04
+11
+00
+00
+00
+0e
+20
+8c
+02
+00
+00
+00
+00
+00
+00
+2c
+00
+00
+00
+8c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d6
+00
+00
+00
+00
+00
+00
+00
+04
+05
+00
+00
+00
+86
+03
+04
+16
+00
+00
+00
+0e
+20
+8c
+02
+83
+04
+00
+00
+00
+00
+00
+00
+2c
+00
+00
+00
+bc
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d6
+00
+00
+00
+00
+00
+00
+00
+04
+05
+00
+00
+00
+86
+03
+04
+16
+00
+00
+00
+0e
+20
+8c
+02
+83
+04
+00
+00
+00
+00
+00
+00
+2c
+00
+00
+00
+ec
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d6
+00
+00
+00
+00
+00
+00
+00
+04
+05
+00
+00
+00
+86
+03
+04
+16
+00
+00
+00
+0e
+20
+8c
+02
+83
+04
+00
+00
+00
+00
+00
+00
+34
+00
+00
+00
+1c
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+85
+01
+00
+00
+00
+00
+00
+00
+04
+05
+00
+00
+00
+83
+05
+04
+12
+00
+00
+00
+8d
+02
+8c
+03
+86
+04
+04
+07
+00
+00
+00
+0e
+30
+00
+00
+00
+00
+00
+00
+00
+24
+00
+00
+00
+54
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1f
+00
+00
+00
+00
+00
+00
+00
+04
+01
+00
+00
+00
+0e
+10
+83
+02
+00
+00
+00
+00
+00
+00
+00
+24
+00
+00
+00
+7c
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+71
+00
+00
+00
+00
+00
+00
+00
+04
+04
+00
+00
+00
+0e
+10
+83
+02
+00
+00
+00
+00
+00
+00
+00
+24
+00
+00
+00
+a4
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9b
+00
+00
+00
+00
+00
+00
+00
+04
+05
+00
+00
+00
+86
+02
+04
+11
+00
+00
+00
+0e
+20
+83
+03
+24
+00
+00
+00
+cc
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+00
+00
+00
+00
+00
+00
+00
+04
+01
+00
+00
+00
+0e
+10
+83
+02
+00
+00
+00
+00
+00
+00
+00
+34
+00
+00
+00
+f4
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+52
+05
+00
+00
+00
+00
+00
+00
+04
+0a
+00
+00
+00
+86
+06
+83
+07
+04
+0d
+00
+00
+00
+8f
+02
+8e
+03
+04
+11
+00
+00
+00
+0e
+50
+8d
+04
+8c
+05
+00
+00
+00
+24
+00
+00
+00
+2c
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2b
+00
+00
+00
+00
+00
+00
+00
+04
+01
+00
+00
+00
+0e
+10
+83
+02
+00
+00
+00
+00
+00
+00
+00
+14
+00
+00
+00
+54
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+17
+00
+00
+00
+00
+00
+00
+00
+14
+00
+00
+00
+6c
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+16
+00
+00
+00
+00
+00
+00
+00
+1c
+00
+00
+00
+84
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2b
+00
+00
+00
+00
+00
+00
+00
+04
+04
+00
+00
+00
+0e
+10
+00
+14
+00
+00
+00
+a4
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1b
+00
+00
+00
+00
+00
+00
+00
+1c
+00
+00
+00
+bc
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4b
+00
+00
+00
+00
+00
+00
+00
+04
+04
+00
+00
+00
+0e
+10
+00
+24
+00
+00
+00
+dc
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+98
+00
+00
+00
+00
+00
+00
+00
+04
+01
+00
+00
+00
+0e
+10
+83
+02
+00
+00
+00
+00
+00
+00
+00
+34
+00
+00
+00
+04
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+58
+01
+00
+00
+00
+00
+00
+00
+04
+0a
+00
+00
+00
+8d
+04
+83
+07
+04
+0d
+00
+00
+00
+8f
+02
+8e
+03
+04
+11
+00
+00
+00
+0e
+40
+8c
+05
+86
+06
+00
+00
+00
+34
+00
+00
+00
+3c
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7d
+02
+00
+00
+00
+00
+00
+00
+04
+0a
+00
+00
+00
+8c
+05
+83
+07
+04
+1a
+00
+00
+00
+86
+06
+8f
+02
+8e
+03
+8d
+04
+04
+07
+00
+00
+00
+0e
+60
+00
+00
+00
+2c
+00
+00
+00
+74
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+34
+01
+00
+00
+00
+00
+00
+00
+04
+0a
+00
+00
+00
+86
+05
+83
+06
+04
+18
+00
+00
+00
+0e
+30
+8c
+04
+8e
+02
+8d
+03
+00
+00
+2c
+00
+00
+00
+a4
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ef
+00
+00
+00
+00
+00
+00
+00
+04
+0a
+00
+00
+00
+86
+03
+83
+04
+04
+0c
+00
+00
+00
+0e
+20
+8c
+02
+00
+00
+00
+00
+00
+00
+2c
+00
+00
+00
+d4
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a8
+00
+00
+00
+00
+00
+00
+00
+04
+0a
+00
+00
+00
+8c
+02
+86
+03
+04
+0c
+00
+00
+00
+0e
+20
+83
+04
+00
+00
+00
+00
+00
+00
+54
+00
+00
+00
+04
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2f
+03
+00
+00
+00
+00
+00
+00
+04
+02
+00
+00
+00
+0e
+10
+04
+02
+00
+00
+00
+0e
+18
+04
+02
+00
+00
+00
+0e
+20
+04
+02
+00
+00
+00
+0e
+28
+04
+01
+00
+00
+00
+0e
+30
+04
+01
+00
+00
+00
+0e
+38
+04
+07
+00
+00
+00
+0e
+e0
+01
+83
+07
+86
+06
+8c
+05
+8d
+04
+8e
+03
+8f
+02
+00
+00
+20
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+80
+00
+00
+00
+00
+00
+00
+00
+60
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+d0
+00
+00
+00
+00
+00
+00
+00
+90
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+b0
+01
+00
+00
+00
+00
+00
+00
+c0
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+90
+02
+00
+00
+00
+00
+00
+00
+f0
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+70
+03
+00
+00
+00
+00
+00
+00
+20
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+50
+04
+00
+00
+00
+00
+00
+00
+58
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+e0
+05
+00
+00
+00
+00
+00
+00
+80
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+00
+06
+00
+00
+00
+00
+00
+00
+a8
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+80
+06
+00
+00
+00
+00
+00
+00
+d0
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+20
+07
+00
+00
+00
+00
+00
+00
+f8
+01
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+50
+07
+00
+00
+00
+00
+00
+00
+30
+02
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+b0
+0c
+00
+00
+00
+00
+00
+00
+58
+02
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+e0
+0c
+00
+00
+00
+00
+00
+00
+70
+02
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+00
+0d
+00
+00
+00
+00
+00
+00
+88
+02
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+20
+0d
+00
+00
+00
+00
+00
+00
+a8
+02
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+50
+0d
+00
+00
+00
+00
+00
+00
+c0
+02
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+70
+0d
+00
+00
+00
+00
+00
+00
+e0
+02
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+c0
+0d
+00
+00
+00
+00
+00
+00
+08
+03
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+60
+0e
+00
+00
+00
+00
+00
+00
+40
+03
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+c0
+0f
+00
+00
+00
+00
+00
+00
+78
+03
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+40
+12
+00
+00
+00
+00
+00
+00
+a8
+03
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+80
+13
+00
+00
+00
+00
+00
+00
+d8
+03
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+70
+14
+00
+00
+00
+00
+00
+00
+08
+04
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+20
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+04
+00
+00
+00
+00
+00
+00
+00
+78
+00
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+78
+00
+00
+00
+00
+00
+00
+00
+79
+00
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+80
+00
+00
+00
+00
+00
+00
+00
+84
+00
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+84
+00
+00
+00
+00
+00
+00
+00
+cb
+00
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+cb
+00
+00
+00
+00
+00
+00
+00
+d0
+00
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d0
+00
+00
+00
+00
+00
+00
+00
+eb
+00
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+eb
+00
+00
+00
+00
+00
+00
+00
+5b
+01
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+5b
+01
+00
+00
+00
+00
+00
+00
+5c
+01
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+5c
+01
+00
+00
+00
+00
+00
+00
+8c
+01
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+8c
+01
+00
+00
+00
+00
+00
+00
+8d
+01
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+8d
+01
+00
+00
+00
+00
+00
+00
+a6
+01
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d0
+00
+00
+00
+00
+00
+00
+00
+e7
+00
+00
+00
+00
+00
+00
+00
+01
+00
+55
+e7
+00
+00
+00
+00
+00
+00
+00
+4d
+01
+00
+00
+00
+00
+00
+00
+01
+00
+53
+5c
+01
+00
+00
+00
+00
+00
+00
+7e
+01
+00
+00
+00
+00
+00
+00
+01
+00
+53
+8d
+01
+00
+00
+00
+00
+00
+00
+a6
+01
+00
+00
+00
+00
+00
+00
+01
+00
+53
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d0
+00
+00
+00
+00
+00
+00
+00
+f4
+00
+00
+00
+00
+00
+00
+00
+01
+00
+54
+f4
+00
+00
+00
+00
+00
+00
+00
+57
+01
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+5c
+01
+00
+00
+00
+00
+00
+00
+88
+01
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+8d
+01
+00
+00
+00
+00
+00
+00
+a6
+01
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f4
+00
+00
+00
+00
+00
+00
+00
+09
+01
+00
+00
+00
+00
+00
+00
+01
+00
+50
+0c
+01
+00
+00
+00
+00
+00
+00
+52
+01
+00
+00
+00
+00
+00
+00
+01
+00
+56
+5c
+01
+00
+00
+00
+00
+00
+00
+83
+01
+00
+00
+00
+00
+00
+00
+01
+00
+56
+8d
+01
+00
+00
+00
+00
+00
+00
+a6
+01
+00
+00
+00
+00
+00
+00
+01
+00
+56
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b0
+01
+00
+00
+00
+00
+00
+00
+cb
+01
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+cb
+01
+00
+00
+00
+00
+00
+00
+3d
+02
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+3d
+02
+00
+00
+00
+00
+00
+00
+3e
+02
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+3e
+02
+00
+00
+00
+00
+00
+00
+6b
+02
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+6b
+02
+00
+00
+00
+00
+00
+00
+6c
+02
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+6c
+02
+00
+00
+00
+00
+00
+00
+86
+02
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b0
+01
+00
+00
+00
+00
+00
+00
+c7
+01
+00
+00
+00
+00
+00
+00
+01
+00
+55
+c7
+01
+00
+00
+00
+00
+00
+00
+30
+02
+00
+00
+00
+00
+00
+00
+01
+00
+56
+3e
+02
+00
+00
+00
+00
+00
+00
+5e
+02
+00
+00
+00
+00
+00
+00
+01
+00
+56
+6c
+02
+00
+00
+00
+00
+00
+00
+86
+02
+00
+00
+00
+00
+00
+00
+01
+00
+56
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b0
+01
+00
+00
+00
+00
+00
+00
+d4
+01
+00
+00
+00
+00
+00
+00
+01
+00
+54
+d4
+01
+00
+00
+00
+00
+00
+00
+39
+02
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+3e
+02
+00
+00
+00
+00
+00
+00
+67
+02
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+6c
+02
+00
+00
+00
+00
+00
+00
+86
+02
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+da
+01
+00
+00
+00
+00
+00
+00
+34
+02
+00
+00
+00
+00
+00
+00
+01
+00
+53
+3e
+02
+00
+00
+00
+00
+00
+00
+62
+02
+00
+00
+00
+00
+00
+00
+01
+00
+53
+6c
+02
+00
+00
+00
+00
+00
+00
+86
+02
+00
+00
+00
+00
+00
+00
+01
+00
+53
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+90
+02
+00
+00
+00
+00
+00
+00
+ab
+02
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+ab
+02
+00
+00
+00
+00
+00
+00
+21
+03
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+21
+03
+00
+00
+00
+00
+00
+00
+22
+03
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+22
+03
+00
+00
+00
+00
+00
+00
+4d
+03
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+4d
+03
+00
+00
+00
+00
+00
+00
+4e
+03
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+4e
+03
+00
+00
+00
+00
+00
+00
+66
+03
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+90
+02
+00
+00
+00
+00
+00
+00
+a7
+02
+00
+00
+00
+00
+00
+00
+01
+00
+55
+a7
+02
+00
+00
+00
+00
+00
+00
+14
+03
+00
+00
+00
+00
+00
+00
+01
+00
+56
+22
+03
+00
+00
+00
+00
+00
+00
+40
+03
+00
+00
+00
+00
+00
+00
+01
+00
+56
+4e
+03
+00
+00
+00
+00
+00
+00
+66
+03
+00
+00
+00
+00
+00
+00
+01
+00
+56
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+90
+02
+00
+00
+00
+00
+00
+00
+b4
+02
+00
+00
+00
+00
+00
+00
+01
+00
+54
+b4
+02
+00
+00
+00
+00
+00
+00
+1d
+03
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+22
+03
+00
+00
+00
+00
+00
+00
+49
+03
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+4e
+03
+00
+00
+00
+00
+00
+00
+66
+03
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ba
+02
+00
+00
+00
+00
+00
+00
+18
+03
+00
+00
+00
+00
+00
+00
+01
+00
+53
+22
+03
+00
+00
+00
+00
+00
+00
+44
+03
+00
+00
+00
+00
+00
+00
+01
+00
+53
+4e
+03
+00
+00
+00
+00
+00
+00
+66
+03
+00
+00
+00
+00
+00
+00
+01
+00
+53
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+70
+03
+00
+00
+00
+00
+00
+00
+8b
+03
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+8b
+03
+00
+00
+00
+00
+00
+00
+01
+04
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+01
+04
+00
+00
+00
+00
+00
+00
+02
+04
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+02
+04
+00
+00
+00
+00
+00
+00
+2d
+04
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+2d
+04
+00
+00
+00
+00
+00
+00
+2e
+04
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+2e
+04
+00
+00
+00
+00
+00
+00
+46
+04
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+70
+03
+00
+00
+00
+00
+00
+00
+87
+03
+00
+00
+00
+00
+00
+00
+01
+00
+55
+87
+03
+00
+00
+00
+00
+00
+00
+f4
+03
+00
+00
+00
+00
+00
+00
+01
+00
+56
+02
+04
+00
+00
+00
+00
+00
+00
+20
+04
+00
+00
+00
+00
+00
+00
+01
+00
+56
+2e
+04
+00
+00
+00
+00
+00
+00
+46
+04
+00
+00
+00
+00
+00
+00
+01
+00
+56
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+70
+03
+00
+00
+00
+00
+00
+00
+94
+03
+00
+00
+00
+00
+00
+00
+01
+00
+54
+94
+03
+00
+00
+00
+00
+00
+00
+fd
+03
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+02
+04
+00
+00
+00
+00
+00
+00
+29
+04
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+2e
+04
+00
+00
+00
+00
+00
+00
+46
+04
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9a
+03
+00
+00
+00
+00
+00
+00
+f8
+03
+00
+00
+00
+00
+00
+00
+01
+00
+53
+02
+04
+00
+00
+00
+00
+00
+00
+24
+04
+00
+00
+00
+00
+00
+00
+01
+00
+53
+2e
+04
+00
+00
+00
+00
+00
+00
+46
+04
+00
+00
+00
+00
+00
+00
+01
+00
+53
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+50
+04
+00
+00
+00
+00
+00
+00
+6e
+04
+00
+00
+00
+00
+00
+00
+02
+00
+77
+58
+6e
+04
+00
+00
+00
+00
+00
+00
+1c
+05
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+1c
+05
+00
+00
+00
+00
+00
+00
+1d
+05
+00
+00
+00
+00
+00
+00
+02
+00
+77
+58
+1d
+05
+00
+00
+00
+00
+00
+00
+d5
+05
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+50
+04
+00
+00
+00
+00
+00
+00
+73
+04
+00
+00
+00
+00
+00
+00
+01
+00
+55
+73
+04
+00
+00
+00
+00
+00
+00
+09
+05
+00
+00
+00
+00
+00
+00
+01
+00
+53
+1d
+05
+00
+00
+00
+00
+00
+00
+6c
+05
+00
+00
+00
+00
+00
+00
+01
+00
+53
+b9
+05
+00
+00
+00
+00
+00
+00
+d5
+05
+00
+00
+00
+00
+00
+00
+01
+00
+53
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+50
+04
+00
+00
+00
+00
+00
+00
+79
+04
+00
+00
+00
+00
+00
+00
+01
+00
+54
+79
+04
+00
+00
+00
+00
+00
+00
+0e
+05
+00
+00
+00
+00
+00
+00
+01
+00
+56
+1d
+05
+00
+00
+00
+00
+00
+00
+6a
+05
+00
+00
+00
+00
+00
+00
+01
+00
+56
+b9
+05
+00
+00
+00
+00
+00
+00
+d5
+05
+00
+00
+00
+00
+00
+00
+01
+00
+56
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7f
+04
+00
+00
+00
+00
+00
+00
+18
+05
+00
+00
+00
+00
+00
+00
+01
+00
+5d
+1d
+05
+00
+00
+00
+00
+00
+00
+d5
+05
+00
+00
+00
+00
+00
+00
+01
+00
+5d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+be
+04
+00
+00
+00
+00
+00
+00
+db
+04
+00
+00
+00
+00
+00
+00
+01
+00
+50
+e6
+04
+00
+00
+00
+00
+00
+00
+eb
+04
+00
+00
+00
+00
+00
+00
+01
+00
+50
+f6
+04
+00
+00
+00
+00
+00
+00
+fa
+04
+00
+00
+00
+00
+00
+00
+01
+00
+50
+01
+05
+00
+00
+00
+00
+00
+00
+04
+05
+00
+00
+00
+00
+00
+00
+01
+00
+50
+b9
+05
+00
+00
+00
+00
+00
+00
+d5
+05
+00
+00
+00
+00
+00
+00
+01
+00
+50
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e0
+05
+00
+00
+00
+00
+00
+00
+e1
+05
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+e1
+05
+00
+00
+00
+00
+00
+00
+fe
+05
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+fe
+05
+00
+00
+00
+00
+00
+00
+ff
+05
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e0
+05
+00
+00
+00
+00
+00
+00
+e9
+05
+00
+00
+00
+00
+00
+00
+01
+00
+55
+e9
+05
+00
+00
+00
+00
+00
+00
+fe
+05
+00
+00
+00
+00
+00
+00
+01
+00
+53
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+06
+00
+00
+00
+00
+00
+00
+04
+06
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+04
+06
+00
+00
+00
+00
+00
+00
+0a
+06
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+0a
+06
+00
+00
+00
+00
+00
+00
+0c
+06
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+0c
+06
+00
+00
+00
+00
+00
+00
+70
+06
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+70
+06
+00
+00
+00
+00
+00
+00
+71
+06
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+06
+00
+00
+00
+00
+00
+00
+09
+06
+00
+00
+00
+00
+00
+00
+01
+00
+55
+09
+06
+00
+00
+00
+00
+00
+00
+0a
+06
+00
+00
+00
+00
+00
+00
+01
+00
+53
+0a
+06
+00
+00
+00
+00
+00
+00
+0c
+06
+00
+00
+00
+00
+00
+00
+01
+00
+55
+0c
+06
+00
+00
+00
+00
+00
+00
+59
+06
+00
+00
+00
+00
+00
+00
+01
+00
+53
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+80
+06
+00
+00
+00
+00
+00
+00
+96
+06
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+96
+06
+00
+00
+00
+00
+00
+00
+c6
+06
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+c6
+06
+00
+00
+00
+00
+00
+00
+c7
+06
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+c7
+06
+00
+00
+00
+00
+00
+00
+e9
+06
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+e9
+06
+00
+00
+00
+00
+00
+00
+ea
+06
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+ea
+06
+00
+00
+00
+00
+00
+00
+1a
+07
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+1a
+07
+00
+00
+00
+00
+00
+00
+1b
+07
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+80
+06
+00
+00
+00
+00
+00
+00
+92
+06
+00
+00
+00
+00
+00
+00
+01
+00
+55
+92
+06
+00
+00
+00
+00
+00
+00
+bd
+06
+00
+00
+00
+00
+00
+00
+01
+00
+56
+c7
+06
+00
+00
+00
+00
+00
+00
+e0
+06
+00
+00
+00
+00
+00
+00
+01
+00
+56
+ea
+06
+00
+00
+00
+00
+00
+00
+11
+07
+00
+00
+00
+00
+00
+00
+01
+00
+56
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a2
+06
+00
+00
+00
+00
+00
+00
+c2
+06
+00
+00
+00
+00
+00
+00
+01
+00
+53
+c7
+06
+00
+00
+00
+00
+00
+00
+e5
+06
+00
+00
+00
+00
+00
+00
+01
+00
+53
+ea
+06
+00
+00
+00
+00
+00
+00
+16
+07
+00
+00
+00
+00
+00
+00
+01
+00
+53
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+07
+00
+00
+00
+00
+00
+00
+21
+07
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+21
+07
+00
+00
+00
+00
+00
+00
+35
+07
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+35
+07
+00
+00
+00
+00
+00
+00
+38
+07
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+38
+07
+00
+00
+00
+00
+00
+00
+4b
+07
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+4b
+07
+00
+00
+00
+00
+00
+00
+4e
+07
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+07
+00
+00
+00
+00
+00
+00
+2a
+07
+00
+00
+00
+00
+00
+00
+01
+00
+55
+2a
+07
+00
+00
+00
+00
+00
+00
+35
+07
+00
+00
+00
+00
+00
+00
+01
+00
+53
+35
+07
+00
+00
+00
+00
+00
+00
+38
+07
+00
+00
+00
+00
+00
+00
+01
+00
+55
+38
+07
+00
+00
+00
+00
+00
+00
+4b
+07
+00
+00
+00
+00
+00
+00
+01
+00
+53
+4b
+07
+00
+00
+00
+00
+00
+00
+4e
+07
+00
+00
+00
+00
+00
+00
+01
+00
+55
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+50
+07
+00
+00
+00
+00
+00
+00
+78
+07
+00
+00
+00
+00
+00
+00
+03
+00
+77
+b8
+7f
+78
+07
+00
+00
+00
+00
+00
+00
+7f
+08
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+7f
+08
+00
+00
+00
+00
+00
+00
+80
+08
+00
+00
+00
+00
+00
+00
+03
+00
+77
+b8
+7f
+80
+08
+00
+00
+00
+00
+00
+00
+a2
+0c
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+50
+07
+00
+00
+00
+00
+00
+00
+99
+07
+00
+00
+00
+00
+00
+00
+01
+00
+55
+99
+07
+00
+00
+00
+00
+00
+00
+76
+08
+00
+00
+00
+00
+00
+00
+01
+00
+5e
+80
+08
+00
+00
+00
+00
+00
+00
+a8
+08
+00
+00
+00
+00
+00
+00
+01
+00
+5e
+a8
+08
+00
+00
+00
+00
+00
+00
+b5
+08
+00
+00
+00
+00
+00
+00
+01
+00
+55
+b5
+08
+00
+00
+00
+00
+00
+00
+a2
+0c
+00
+00
+00
+00
+00
+00
+01
+00
+5e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+50
+07
+00
+00
+00
+00
+00
+00
+8f
+07
+00
+00
+00
+00
+00
+00
+01
+00
+54
+8f
+07
+00
+00
+00
+00
+00
+00
+67
+08
+00
+00
+00
+00
+00
+00
+01
+00
+56
+80
+08
+00
+00
+00
+00
+00
+00
+f9
+08
+00
+00
+00
+00
+00
+00
+01
+00
+56
+f9
+08
+00
+00
+00
+00
+00
+00
+12
+09
+00
+00
+00
+00
+00
+00
+01
+00
+50
+12
+09
+00
+00
+00
+00
+00
+00
+17
+09
+00
+00
+00
+00
+00
+00
+01
+00
+56
+17
+09
+00
+00
+00
+00
+00
+00
+30
+09
+00
+00
+00
+00
+00
+00
+01
+00
+50
+30
+09
+00
+00
+00
+00
+00
+00
+35
+09
+00
+00
+00
+00
+00
+00
+01
+00
+56
+35
+09
+00
+00
+00
+00
+00
+00
+41
+09
+00
+00
+00
+00
+00
+00
+01
+00
+50
+41
+09
+00
+00
+00
+00
+00
+00
+5c
+09
+00
+00
+00
+00
+00
+00
+01
+00
+56
+5c
+09
+00
+00
+00
+00
+00
+00
+68
+09
+00
+00
+00
+00
+00
+00
+01
+00
+50
+68
+09
+00
+00
+00
+00
+00
+00
+89
+09
+00
+00
+00
+00
+00
+00
+01
+00
+56
+89
+09
+00
+00
+00
+00
+00
+00
+95
+09
+00
+00
+00
+00
+00
+00
+01
+00
+50
+95
+09
+00
+00
+00
+00
+00
+00
+b9
+09
+00
+00
+00
+00
+00
+00
+01
+00
+56
+b9
+09
+00
+00
+00
+00
+00
+00
+c5
+09
+00
+00
+00
+00
+00
+00
+01
+00
+50
+c5
+09
+00
+00
+00
+00
+00
+00
+d7
+09
+00
+00
+00
+00
+00
+00
+01
+00
+56
+d7
+09
+00
+00
+00
+00
+00
+00
+e6
+09
+00
+00
+00
+00
+00
+00
+01
+00
+50
+e6
+09
+00
+00
+00
+00
+00
+00
+f0
+09
+00
+00
+00
+00
+00
+00
+01
+00
+56
+f0
+09
+00
+00
+00
+00
+00
+00
+ff
+09
+00
+00
+00
+00
+00
+00
+01
+00
+50
+ff
+09
+00
+00
+00
+00
+00
+00
+09
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+56
+09
+0a
+00
+00
+00
+00
+00
+00
+18
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+50
+18
+0a
+00
+00
+00
+00
+00
+00
+1d
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+56
+1d
+0a
+00
+00
+00
+00
+00
+00
+35
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+50
+35
+0a
+00
+00
+00
+00
+00
+00
+3a
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+56
+3a
+0a
+00
+00
+00
+00
+00
+00
+46
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+50
+46
+0a
+00
+00
+00
+00
+00
+00
+5d
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+56
+5d
+0a
+00
+00
+00
+00
+00
+00
+6f
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+50
+6f
+0a
+00
+00
+00
+00
+00
+00
+74
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+56
+74
+0a
+00
+00
+00
+00
+00
+00
+8b
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+50
+8b
+0a
+00
+00
+00
+00
+00
+00
+90
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+56
+90
+0a
+00
+00
+00
+00
+00
+00
+a7
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+50
+a7
+0a
+00
+00
+00
+00
+00
+00
+ac
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+56
+ac
+0a
+00
+00
+00
+00
+00
+00
+be
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+50
+be
+0a
+00
+00
+00
+00
+00
+00
+c3
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+56
+c3
+0a
+00
+00
+00
+00
+00
+00
+d5
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+50
+d5
+0a
+00
+00
+00
+00
+00
+00
+da
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+56
+da
+0a
+00
+00
+00
+00
+00
+00
+ec
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+50
+ec
+0a
+00
+00
+00
+00
+00
+00
+f1
+0a
+00
+00
+00
+00
+00
+00
+01
+00
+56
+f1
+0a
+00
+00
+00
+00
+00
+00
+03
+0b
+00
+00
+00
+00
+00
+00
+01
+00
+50
+03
+0b
+00
+00
+00
+00
+00
+00
+17
+0b
+00
+00
+00
+00
+00
+00
+01
+00
+56
+17
+0b
+00
+00
+00
+00
+00
+00
+31
+0b
+00
+00
+00
+00
+00
+00
+01
+00
+50
+31
+0b
+00
+00
+00
+00
+00
+00
+47
+0b
+00
+00
+00
+00
+00
+00
+01
+00
+56
+47
+0b
+00
+00
+00
+00
+00
+00
+4a
+0b
+00
+00
+00
+00
+00
+00
+01
+00
+50
+4a
+0b
+00
+00
+00
+00
+00
+00
+77
+0b
+00
+00
+00
+00
+00
+00
+01
+00
+56
+77
+0b
+00
+00
+00
+00
+00
+00
+83
+0b
+00
+00
+00
+00
+00
+00
+01
+00
+50
+83
+0b
+00
+00
+00
+00
+00
+00
+9d
+0b
+00
+00
+00
+00
+00
+00
+01
+00
+56
+9d
+0b
+00
+00
+00
+00
+00
+00
+a9
+0b
+00
+00
+00
+00
+00
+00
+01
+00
+50
+a9
+0b
+00
+00
+00
+00
+00
+00
+cd
+0b
+00
+00
+00
+00
+00
+00
+01
+00
+56
+cd
+0b
+00
+00
+00
+00
+00
+00
+d9
+0b
+00
+00
+00
+00
+00
+00
+01
+00
+50
+d9
+0b
+00
+00
+00
+00
+00
+00
+fc
+0b
+00
+00
+00
+00
+00
+00
+01
+00
+56
+fc
+0b
+00
+00
+00
+00
+00
+00
+08
+0c
+00
+00
+00
+00
+00
+00
+01
+00
+50
+08
+0c
+00
+00
+00
+00
+00
+00
+2c
+0c
+00
+00
+00
+00
+00
+00
+01
+00
+56
+2c
+0c
+00
+00
+00
+00
+00
+00
+3b
+0c
+00
+00
+00
+00
+00
+00
+01
+00
+50
+3b
+0c
+00
+00
+00
+00
+00
+00
+45
+0c
+00
+00
+00
+00
+00
+00
+01
+00
+56
+45
+0c
+00
+00
+00
+00
+00
+00
+54
+0c
+00
+00
+00
+00
+00
+00
+01
+00
+50
+54
+0c
+00
+00
+00
+00
+00
+00
+a2
+0c
+00
+00
+00
+00
+00
+00
+01
+00
+56
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+50
+07
+00
+00
+00
+00
+00
+00
+8f
+07
+00
+00
+00
+00
+00
+00
+01
+00
+51
+8f
+07
+00
+00
+00
+00
+00
+00
+62
+08
+00
+00
+00
+00
+00
+00
+01
+00
+53
+80
+08
+00
+00
+00
+00
+00
+00
+a2
+0c
+00
+00
+00
+00
+00
+00
+01
+00
+53
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+50
+07
+00
+00
+00
+00
+00
+00
+8f
+07
+00
+00
+00
+00
+00
+00
+01
+00
+52
+8f
+07
+00
+00
+00
+00
+00
+00
+7b
+08
+00
+00
+00
+00
+00
+00
+01
+00
+5f
+80
+08
+00
+00
+00
+00
+00
+00
+a2
+0c
+00
+00
+00
+00
+00
+00
+01
+00
+5f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+96
+07
+00
+00
+00
+00
+00
+00
+6c
+08
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+80
+08
+00
+00
+00
+00
+00
+00
+a8
+08
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+ab
+08
+00
+00
+00
+00
+00
+00
+a2
+0c
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b3
+07
+00
+00
+00
+00
+00
+00
+71
+08
+00
+00
+00
+00
+00
+00
+01
+00
+5d
+80
+08
+00
+00
+00
+00
+00
+00
+a8
+08
+00
+00
+00
+00
+00
+00
+01
+00
+5d
+b5
+08
+00
+00
+00
+00
+00
+00
+a2
+0c
+00
+00
+00
+00
+00
+00
+01
+00
+5d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b0
+0c
+00
+00
+00
+00
+00
+00
+b1
+0c
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+b1
+0c
+00
+00
+00
+00
+00
+00
+c2
+0c
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+c2
+0c
+00
+00
+00
+00
+00
+00
+c3
+0c
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+c3
+0c
+00
+00
+00
+00
+00
+00
+da
+0c
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+da
+0c
+00
+00
+00
+00
+00
+00
+db
+0c
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b0
+0c
+00
+00
+00
+00
+00
+00
+ba
+0c
+00
+00
+00
+00
+00
+00
+01
+00
+55
+ba
+0c
+00
+00
+00
+00
+00
+00
+c2
+0c
+00
+00
+00
+00
+00
+00
+01
+00
+53
+c2
+0c
+00
+00
+00
+00
+00
+00
+c3
+0c
+00
+00
+00
+00
+00
+00
+01
+00
+55
+c3
+0c
+00
+00
+00
+00
+00
+00
+da
+0c
+00
+00
+00
+00
+00
+00
+01
+00
+53
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+0d
+00
+00
+00
+00
+00
+00
+24
+0d
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+24
+0d
+00
+00
+00
+00
+00
+00
+30
+0d
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+30
+0d
+00
+00
+00
+00
+00
+00
+33
+0d
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+33
+0d
+00
+00
+00
+00
+00
+00
+4a
+0d
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+4a
+0d
+00
+00
+00
+00
+00
+00
+4b
+0d
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+0d
+00
+00
+00
+00
+00
+00
+36
+0d
+00
+00
+00
+00
+00
+00
+01
+00
+55
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+50
+0d
+00
+00
+00
+00
+00
+00
+66
+0d
+00
+00
+00
+00
+00
+00
+01
+00
+55
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+70
+0d
+00
+00
+00
+00
+00
+00
+74
+0d
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+74
+0d
+00
+00
+00
+00
+00
+00
+9a
+0d
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+9a
+0d
+00
+00
+00
+00
+00
+00
+9b
+0d
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+9b
+0d
+00
+00
+00
+00
+00
+00
+a7
+0d
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+a7
+0d
+00
+00
+00
+00
+00
+00
+a8
+0d
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+a8
+0d
+00
+00
+00
+00
+00
+00
+b6
+0d
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+b6
+0d
+00
+00
+00
+00
+00
+00
+bb
+0d
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+70
+0d
+00
+00
+00
+00
+00
+00
+8e
+0d
+00
+00
+00
+00
+00
+00
+01
+00
+55
+9b
+0d
+00
+00
+00
+00
+00
+00
+ab
+0d
+00
+00
+00
+00
+00
+00
+01
+00
+55
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c0
+0d
+00
+00
+00
+00
+00
+00
+c1
+0d
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+c1
+0d
+00
+00
+00
+00
+00
+00
+eb
+0d
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+eb
+0d
+00
+00
+00
+00
+00
+00
+ec
+0d
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+ec
+0d
+00
+00
+00
+00
+00
+00
+f8
+0d
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+f8
+0d
+00
+00
+00
+00
+00
+00
+03
+0e
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+03
+0e
+00
+00
+00
+00
+00
+00
+31
+0e
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+31
+0e
+00
+00
+00
+00
+00
+00
+3c
+0e
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+3c
+0e
+00
+00
+00
+00
+00
+00
+54
+0e
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+54
+0e
+00
+00
+00
+00
+00
+00
+58
+0e
+00
+00
+00
+00
+00
+00
+02
+00
+77
+78
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c0
+0d
+00
+00
+00
+00
+00
+00
+cb
+0d
+00
+00
+00
+00
+00
+00
+01
+00
+55
+cb
+0d
+00
+00
+00
+00
+00
+00
+eb
+0d
+00
+00
+00
+00
+00
+00
+01
+00
+53
+eb
+0d
+00
+00
+00
+00
+00
+00
+ec
+0d
+00
+00
+00
+00
+00
+00
+01
+00
+55
+ec
+0d
+00
+00
+00
+00
+00
+00
+f8
+0d
+00
+00
+00
+00
+00
+00
+01
+00
+53
+f8
+0d
+00
+00
+00
+00
+00
+00
+03
+0e
+00
+00
+00
+00
+00
+00
+01
+00
+55
+03
+0e
+00
+00
+00
+00
+00
+00
+31
+0e
+00
+00
+00
+00
+00
+00
+01
+00
+53
+3c
+0e
+00
+00
+00
+00
+00
+00
+54
+0e
+00
+00
+00
+00
+00
+00
+01
+00
+53
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+60
+0e
+00
+00
+00
+00
+00
+00
+88
+0e
+00
+00
+00
+00
+00
+00
+02
+00
+77
+48
+88
+0e
+00
+00
+00
+00
+00
+00
+25
+0f
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+25
+0f
+00
+00
+00
+00
+00
+00
+26
+0f
+00
+00
+00
+00
+00
+00
+02
+00
+77
+48
+26
+0f
+00
+00
+00
+00
+00
+00
+b8
+0f
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+60
+0e
+00
+00
+00
+00
+00
+00
+a2
+0e
+00
+00
+00
+00
+00
+00
+01
+00
+55
+a2
+0e
+00
+00
+00
+00
+00
+00
+08
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+53
+08
+0f
+00
+00
+00
+00
+00
+00
+26
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+55
+26
+0f
+00
+00
+00
+00
+00
+00
+2b
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+53
+48
+0f
+00
+00
+00
+00
+00
+00
+65
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+55
+65
+0f
+00
+00
+00
+00
+00
+00
+a1
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+53
+a1
+0f
+00
+00
+00
+00
+00
+00
+ae
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+55
+ae
+0f
+00
+00
+00
+00
+00
+00
+b8
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+53
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+60
+0e
+00
+00
+00
+00
+00
+00
+98
+0e
+00
+00
+00
+00
+00
+00
+01
+00
+54
+98
+0e
+00
+00
+00
+00
+00
+00
+1c
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+5e
+1c
+0f
+00
+00
+00
+00
+00
+00
+26
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+54
+26
+0f
+00
+00
+00
+00
+00
+00
+b8
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+5e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+60
+0e
+00
+00
+00
+00
+00
+00
+98
+0e
+00
+00
+00
+00
+00
+00
+01
+00
+51
+98
+0e
+00
+00
+00
+00
+00
+00
+17
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+5d
+17
+0f
+00
+00
+00
+00
+00
+00
+26
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+51
+26
+0f
+00
+00
+00
+00
+00
+00
+56
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+5d
+56
+0f
+00
+00
+00
+00
+00
+00
+65
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+51
+65
+0f
+00
+00
+00
+00
+00
+00
+a1
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+5d
+a1
+0f
+00
+00
+00
+00
+00
+00
+b3
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+51
+b3
+0f
+00
+00
+00
+00
+00
+00
+b8
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+5d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+60
+0e
+00
+00
+00
+00
+00
+00
+98
+0e
+00
+00
+00
+00
+00
+00
+01
+00
+52
+98
+0e
+00
+00
+00
+00
+00
+00
+21
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+5f
+21
+0f
+00
+00
+00
+00
+00
+00
+26
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+52
+26
+0f
+00
+00
+00
+00
+00
+00
+b8
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+5f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9f
+0e
+00
+00
+00
+00
+00
+00
+0d
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+56
+26
+0f
+00
+00
+00
+00
+00
+00
+48
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+56
+59
+0f
+00
+00
+00
+00
+00
+00
+a1
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+56
+a8
+0f
+00
+00
+00
+00
+00
+00
+b8
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+56
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c2
+0e
+00
+00
+00
+00
+00
+00
+de
+0e
+00
+00
+00
+00
+00
+00
+01
+00
+50
+f2
+0e
+00
+00
+00
+00
+00
+00
+fa
+0e
+00
+00
+00
+00
+00
+00
+01
+00
+50
+03
+0f
+00
+00
+00
+00
+00
+00
+0d
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+50
+26
+0f
+00
+00
+00
+00
+00
+00
+30
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+50
+9c
+0f
+00
+00
+00
+00
+00
+00
+a1
+0f
+00
+00
+00
+00
+00
+00
+01
+00
+50
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c0
+0f
+00
+00
+00
+00
+00
+00
+eb
+0f
+00
+00
+00
+00
+00
+00
+03
+00
+77
+a8
+7f
+eb
+0f
+00
+00
+00
+00
+00
+00
+0f
+11
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+0f
+11
+00
+00
+00
+00
+00
+00
+10
+11
+00
+00
+00
+00
+00
+00
+03
+00
+77
+a8
+7f
+10
+11
+00
+00
+00
+00
+00
+00
+3d
+12
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c0
+0f
+00
+00
+00
+00
+00
+00
+0d
+10
+00
+00
+00
+00
+00
+00
+01
+00
+55
+0d
+10
+00
+00
+00
+00
+00
+00
+86
+10
+00
+00
+00
+00
+00
+00
+01
+00
+53
+10
+11
+00
+00
+00
+00
+00
+00
+38
+11
+00
+00
+00
+00
+00
+00
+01
+00
+53
+a8
+11
+00
+00
+00
+00
+00
+00
+fa
+11
+00
+00
+00
+00
+00
+00
+01
+00
+53
+2e
+12
+00
+00
+00
+00
+00
+00
+3d
+12
+00
+00
+00
+00
+00
+00
+01
+00
+53
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c0
+0f
+00
+00
+00
+00
+00
+00
+0d
+10
+00
+00
+00
+00
+00
+00
+01
+00
+54
+0d
+10
+00
+00
+00
+00
+00
+00
+3d
+12
+00
+00
+00
+00
+00
+00
+02
+00
+91
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c0
+0f
+00
+00
+00
+00
+00
+00
+0d
+10
+00
+00
+00
+00
+00
+00
+01
+00
+51
+0d
+10
+00
+00
+00
+00
+00
+00
+06
+11
+00
+00
+00
+00
+00
+00
+01
+00
+5e
+10
+11
+00
+00
+00
+00
+00
+00
+3d
+12
+00
+00
+00
+00
+00
+00
+01
+00
+5e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c0
+0f
+00
+00
+00
+00
+00
+00
+0d
+10
+00
+00
+00
+00
+00
+00
+01
+00
+52
+0d
+10
+00
+00
+00
+00
+00
+00
+cf
+10
+00
+00
+00
+00
+00
+00
+02
+00
+91
+08
+10
+11
+00
+00
+00
+00
+00
+00
+93
+11
+00
+00
+00
+00
+00
+00
+02
+00
+91
+08
+a8
+11
+00
+00
+00
+00
+00
+00
+3d
+12
+00
+00
+00
+00
+00
+00
+02
+00
+91
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c0
+0f
+00
+00
+00
+00
+00
+00
+21
+10
+00
+00
+00
+00
+00
+00
+01
+00
+58
+21
+10
+00
+00
+00
+00
+00
+00
+fc
+10
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+10
+11
+00
+00
+00
+00
+00
+00
+e0
+11
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+e0
+11
+00
+00
+00
+00
+00
+00
+f5
+11
+00
+00
+00
+00
+00
+00
+01
+00
+58
+f5
+11
+00
+00
+00
+00
+00
+00
+0e
+12
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+2e
+12
+00
+00
+00
+00
+00
+00
+3d
+12
+00
+00
+00
+00
+00
+00
+01
+00
+58
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c0
+0f
+00
+00
+00
+00
+00
+00
+0d
+10
+00
+00
+00
+00
+00
+00
+01
+00
+59
+0d
+10
+00
+00
+00
+00
+00
+00
+3d
+12
+00
+00
+00
+00
+00
+00
+02
+00
+91
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+07
+10
+00
+00
+00
+00
+00
+00
+01
+11
+00
+00
+00
+00
+00
+00
+01
+00
+5d
+10
+11
+00
+00
+00
+00
+00
+00
+3d
+12
+00
+00
+00
+00
+00
+00
+01
+00
+5d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+61
+10
+00
+00
+00
+00
+00
+00
+f7
+10
+00
+00
+00
+00
+00
+00
+01
+00
+56
+35
+11
+00
+00
+00
+00
+00
+00
+a8
+11
+00
+00
+00
+00
+00
+00
+01
+00
+56
+fa
+11
+00
+00
+00
+00
+00
+00
+2e
+12
+00
+00
+00
+00
+00
+00
+01
+00
+56
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c6
+10
+00
+00
+00
+00
+00
+00
+f2
+10
+00
+00
+00
+00
+00
+00
+01
+00
+53
+93
+11
+00
+00
+00
+00
+00
+00
+a8
+11
+00
+00
+00
+00
+00
+00
+01
+00
+53
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e7
+0f
+00
+00
+00
+00
+00
+00
+0b
+11
+00
+00
+00
+00
+00
+00
+01
+00
+5f
+10
+11
+00
+00
+00
+00
+00
+00
+3d
+12
+00
+00
+00
+00
+00
+00
+01
+00
+5f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+12
+00
+00
+00
+00
+00
+00
+62
+12
+00
+00
+00
+00
+00
+00
+02
+00
+77
+58
+62
+12
+00
+00
+00
+00
+00
+00
+dd
+12
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+dd
+12
+00
+00
+00
+00
+00
+00
+de
+12
+00
+00
+00
+00
+00
+00
+02
+00
+77
+58
+de
+12
+00
+00
+00
+00
+00
+00
+74
+13
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+12
+00
+00
+00
+00
+00
+00
+84
+12
+00
+00
+00
+00
+00
+00
+01
+00
+55
+84
+12
+00
+00
+00
+00
+00
+00
+b7
+12
+00
+00
+00
+00
+00
+00
+01
+00
+53
+c1
+12
+00
+00
+00
+00
+00
+00
+eb
+12
+00
+00
+00
+00
+00
+00
+01
+00
+55
+eb
+12
+00
+00
+00
+00
+00
+00
+06
+13
+00
+00
+00
+00
+00
+00
+01
+00
+53
+43
+13
+00
+00
+00
+00
+00
+00
+50
+13
+00
+00
+00
+00
+00
+00
+01
+00
+55
+50
+13
+00
+00
+00
+00
+00
+00
+74
+13
+00
+00
+00
+00
+00
+00
+01
+00
+53
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+12
+00
+00
+00
+00
+00
+00
+77
+12
+00
+00
+00
+00
+00
+00
+01
+00
+54
+77
+12
+00
+00
+00
+00
+00
+00
+b7
+12
+00
+00
+00
+00
+00
+00
+01
+00
+5e
+b7
+12
+00
+00
+00
+00
+00
+00
+c1
+12
+00
+00
+00
+00
+00
+00
+01
+00
+53
+c1
+12
+00
+00
+00
+00
+00
+00
+c5
+12
+00
+00
+00
+00
+00
+00
+01
+00
+5e
+d9
+12
+00
+00
+00
+00
+00
+00
+de
+12
+00
+00
+00
+00
+00
+00
+01
+00
+54
+de
+12
+00
+00
+00
+00
+00
+00
+06
+13
+00
+00
+00
+00
+00
+00
+01
+00
+5e
+06
+13
+00
+00
+00
+00
+00
+00
+43
+13
+00
+00
+00
+00
+00
+00
+01
+00
+53
+43
+13
+00
+00
+00
+00
+00
+00
+43
+13
+00
+00
+00
+00
+00
+00
+01
+00
+5e
+50
+13
+00
+00
+00
+00
+00
+00
+74
+13
+00
+00
+00
+00
+00
+00
+01
+00
+5e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+12
+00
+00
+00
+00
+00
+00
+77
+12
+00
+00
+00
+00
+00
+00
+01
+00
+51
+77
+12
+00
+00
+00
+00
+00
+00
+ca
+12
+00
+00
+00
+00
+00
+00
+01
+00
+56
+ca
+12
+00
+00
+00
+00
+00
+00
+de
+12
+00
+00
+00
+00
+00
+00
+01
+00
+51
+de
+12
+00
+00
+00
+00
+00
+00
+18
+13
+00
+00
+00
+00
+00
+00
+01
+00
+56
+43
+13
+00
+00
+00
+00
+00
+00
+74
+13
+00
+00
+00
+00
+00
+00
+01
+00
+56
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6f
+12
+00
+00
+00
+00
+00
+00
+d4
+12
+00
+00
+00
+00
+00
+00
+01
+00
+5d
+de
+12
+00
+00
+00
+00
+00
+00
+74
+13
+00
+00
+00
+00
+00
+00
+01
+00
+5d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+bd
+12
+00
+00
+00
+00
+00
+00
+ca
+12
+00
+00
+00
+00
+00
+00
+01
+00
+56
+18
+13
+00
+00
+00
+00
+00
+00
+43
+13
+00
+00
+00
+00
+00
+00
+01
+00
+56
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+af
+12
+00
+00
+00
+00
+00
+00
+cf
+12
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+0f
+13
+00
+00
+00
+00
+00
+00
+43
+13
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+6f
+13
+00
+00
+00
+00
+00
+00
+74
+13
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+80
+13
+00
+00
+00
+00
+00
+00
+96
+13
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+96
+13
+00
+00
+00
+00
+00
+00
+42
+14
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+42
+14
+00
+00
+00
+00
+00
+00
+43
+14
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+43
+14
+00
+00
+00
+00
+00
+00
+6f
+14
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+80
+13
+00
+00
+00
+00
+00
+00
+bd
+13
+00
+00
+00
+00
+00
+00
+01
+00
+55
+bd
+13
+00
+00
+00
+00
+00
+00
+31
+14
+00
+00
+00
+00
+00
+00
+01
+00
+53
+31
+14
+00
+00
+00
+00
+00
+00
+53
+14
+00
+00
+00
+00
+00
+00
+01
+00
+55
+53
+14
+00
+00
+00
+00
+00
+00
+6f
+14
+00
+00
+00
+00
+00
+00
+01
+00
+53
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+80
+13
+00
+00
+00
+00
+00
+00
+ab
+13
+00
+00
+00
+00
+00
+00
+01
+00
+54
+ab
+13
+00
+00
+00
+00
+00
+00
+3e
+14
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+3e
+14
+00
+00
+00
+00
+00
+00
+43
+14
+00
+00
+00
+00
+00
+00
+01
+00
+54
+43
+14
+00
+00
+00
+00
+00
+00
+6f
+14
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a3
+13
+00
+00
+00
+00
+00
+00
+36
+14
+00
+00
+00
+00
+00
+00
+01
+00
+56
+43
+14
+00
+00
+00
+00
+00
+00
+6f
+14
+00
+00
+00
+00
+00
+00
+01
+00
+56
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+70
+14
+00
+00
+00
+00
+00
+00
+86
+14
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+86
+14
+00
+00
+00
+00
+00
+00
+ae
+14
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+ae
+14
+00
+00
+00
+00
+00
+00
+af
+14
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+af
+14
+00
+00
+00
+00
+00
+00
+d3
+14
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+d3
+14
+00
+00
+00
+00
+00
+00
+d8
+14
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+d8
+14
+00
+00
+00
+00
+00
+00
+15
+15
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+15
+15
+00
+00
+00
+00
+00
+00
+18
+15
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+70
+14
+00
+00
+00
+00
+00
+00
+bf
+14
+00
+00
+00
+00
+00
+00
+01
+00
+55
+bf
+14
+00
+00
+00
+00
+00
+00
+c8
+14
+00
+00
+00
+00
+00
+00
+01
+00
+56
+d8
+14
+00
+00
+00
+00
+00
+00
+db
+14
+00
+00
+00
+00
+00
+00
+01
+00
+55
+db
+14
+00
+00
+00
+00
+00
+00
+0c
+15
+00
+00
+00
+00
+00
+00
+01
+00
+56
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+70
+14
+00
+00
+00
+00
+00
+00
+94
+14
+00
+00
+00
+00
+00
+00
+01
+00
+54
+94
+14
+00
+00
+00
+00
+00
+00
+aa
+14
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+aa
+14
+00
+00
+00
+00
+00
+00
+af
+14
+00
+00
+00
+00
+00
+00
+01
+00
+54
+af
+14
+00
+00
+00
+00
+00
+00
+cd
+14
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+cd
+14
+00
+00
+00
+00
+00
+00
+d8
+14
+00
+00
+00
+00
+00
+00
+01
+00
+55
+d8
+14
+00
+00
+00
+00
+00
+00
+11
+15
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e7
+14
+00
+00
+00
+00
+00
+00
+07
+15
+00
+00
+00
+00
+00
+00
+01
+00
+53
+07
+15
+00
+00
+00
+00
+00
+00
+18
+15
+00
+00
+00
+00
+00
+00
+01
+00
+55
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+15
+00
+00
+00
+00
+00
+00
+22
+15
+00
+00
+00
+00
+00
+00
+03
+00
+77
+a8
+7e
+22
+15
+00
+00
+00
+00
+00
+00
+24
+15
+00
+00
+00
+00
+00
+00
+03
+00
+77
+b0
+7e
+24
+15
+00
+00
+00
+00
+00
+00
+26
+15
+00
+00
+00
+00
+00
+00
+03
+00
+77
+b8
+7e
+26
+15
+00
+00
+00
+00
+00
+00
+28
+15
+00
+00
+00
+00
+00
+00
+03
+00
+77
+c0
+7e
+28
+15
+00
+00
+00
+00
+00
+00
+29
+15
+00
+00
+00
+00
+00
+00
+03
+00
+77
+c8
+7e
+29
+15
+00
+00
+00
+00
+00
+00
+2a
+15
+00
+00
+00
+00
+00
+00
+03
+00
+77
+d0
+7e
+2a
+15
+00
+00
+00
+00
+00
+00
+31
+15
+00
+00
+00
+00
+00
+00
+03
+00
+77
+d8
+7e
+31
+15
+00
+00
+00
+00
+00
+00
+46
+15
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+46
+15
+00
+00
+00
+00
+00
+00
+49
+15
+00
+00
+00
+00
+00
+00
+03
+00
+77
+d8
+7e
+49
+15
+00
+00
+00
+00
+00
+00
+4a
+15
+00
+00
+00
+00
+00
+00
+03
+00
+77
+d0
+7e
+4a
+15
+00
+00
+00
+00
+00
+00
+4c
+15
+00
+00
+00
+00
+00
+00
+03
+00
+77
+c8
+7e
+4c
+15
+00
+00
+00
+00
+00
+00
+4e
+15
+00
+00
+00
+00
+00
+00
+03
+00
+77
+c0
+7e
+4e
+15
+00
+00
+00
+00
+00
+00
+50
+15
+00
+00
+00
+00
+00
+00
+03
+00
+77
+b8
+7e
+50
+15
+00
+00
+00
+00
+00
+00
+52
+15
+00
+00
+00
+00
+00
+00
+03
+00
+77
+b0
+7e
+52
+15
+00
+00
+00
+00
+00
+00
+53
+15
+00
+00
+00
+00
+00
+00
+03
+00
+77
+a8
+7e
+53
+15
+00
+00
+00
+00
+00
+00
+9a
+17
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+9a
+17
+00
+00
+00
+00
+00
+00
+9b
+17
+00
+00
+00
+00
+00
+00
+03
+00
+77
+d8
+7e
+9b
+17
+00
+00
+00
+00
+00
+00
+9c
+17
+00
+00
+00
+00
+00
+00
+03
+00
+77
+d0
+7e
+9c
+17
+00
+00
+00
+00
+00
+00
+9e
+17
+00
+00
+00
+00
+00
+00
+03
+00
+77
+c8
+7e
+9e
+17
+00
+00
+00
+00
+00
+00
+a0
+17
+00
+00
+00
+00
+00
+00
+03
+00
+77
+c0
+7e
+a0
+17
+00
+00
+00
+00
+00
+00
+a2
+17
+00
+00
+00
+00
+00
+00
+03
+00
+77
+b8
+7e
+a2
+17
+00
+00
+00
+00
+00
+00
+a4
+17
+00
+00
+00
+00
+00
+00
+03
+00
+77
+b0
+7e
+a4
+17
+00
+00
+00
+00
+00
+00
+a7
+17
+00
+00
+00
+00
+00
+00
+03
+00
+77
+a8
+7e
+a7
+17
+00
+00
+00
+00
+00
+00
+4f
+18
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5b
+15
+00
+00
+00
+00
+00
+00
+a2
+17
+00
+00
+00
+00
+00
+00
+01
+00
+5e
+a7
+17
+00
+00
+00
+00
+00
+00
+4f
+18
+00
+00
+00
+00
+00
+00
+01
+00
+5e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e5
+15
+00
+00
+00
+00
+00
+00
+3b
+16
+00
+00
+00
+00
+00
+00
+01
+00
+53
+06
+17
+00
+00
+00
+00
+00
+00
+9b
+17
+00
+00
+00
+00
+00
+00
+01
+00
+53
+ee
+17
+00
+00
+00
+00
+00
+00
+3b
+18
+00
+00
+00
+00
+00
+00
+01
+00
+53
+40
+18
+00
+00
+00
+00
+00
+00
+4f
+18
+00
+00
+00
+00
+00
+00
+01
+00
+53
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3b
+16
+00
+00
+00
+00
+00
+00
+6e
+16
+00
+00
+00
+00
+00
+00
+01
+00
+53
+f0
+16
+00
+00
+00
+00
+00
+00
+06
+17
+00
+00
+00
+00
+00
+00
+01
+00
+53
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9e
+15
+00
+00
+00
+00
+00
+00
+58
+17
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+a7
+17
+00
+00
+00
+00
+00
+00
+4f
+18
+00
+00
+00
+00
+00
+00
+01
+00
+5c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9e
+15
+00
+00
+00
+00
+00
+00
+e5
+15
+00
+00
+00
+00
+00
+00
+01
+00
+53
+67
+16
+00
+00
+00
+00
+00
+00
+6b
+16
+00
+00
+00
+00
+00
+00
+01
+00
+50
+6e
+16
+00
+00
+00
+00
+00
+00
+9c
+16
+00
+00
+00
+00
+00
+00
+01
+00
+53
+9c
+16
+00
+00
+00
+00
+00
+00
+a0
+16
+00
+00
+00
+00
+00
+00
+01
+00
+50
+a3
+16
+00
+00
+00
+00
+00
+00
+a3
+16
+00
+00
+00
+00
+00
+00
+01
+00
+53
+a7
+17
+00
+00
+00
+00
+00
+00
+b0
+17
+00
+00
+00
+00
+00
+00
+01
+00
+53
+b0
+17
+00
+00
+00
+00
+00
+00
+c0
+17
+00
+00
+00
+00
+00
+00
+01
+00
+50
+c0
+17
+00
+00
+00
+00
+00
+00
+ee
+17
+00
+00
+00
+00
+00
+00
+01
+00
+53
+3b
+18
+00
+00
+00
+00
+00
+00
+40
+18
+00
+00
+00
+00
+00
+00
+01
+00
+53
+40
+18
+00
+00
+00
+00
+00
+00
+45
+18
+00
+00
+00
+00
+00
+00
+01
+00
+50
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b6
+17
+00
+00
+00
+00
+00
+00
+f3
+17
+00
+00
+00
+00
+00
+00
+01
+00
+54
+3b
+18
+00
+00
+00
+00
+00
+00
+45
+18
+00
+00
+00
+00
+00
+00
+01
+00
+54
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7a
+02
+00
+00
+02
+00
+00
+00
+00
+00
+52
+0f
+00
+00
+d2
+04
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+69
+6e
+69
+74
+69
+61
+6c
+69
+7a
+65
+00
+ef
+04
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+6c
+65
+61
+6e
+75
+70
+00
+0c
+05
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+72
+65
+61
+74
+65
+5f
+64
+65
+63
+00
+5f
+05
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+72
+65
+61
+74
+65
+5f
+62
+69
+6e
+00
+b2
+05
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+72
+65
+61
+74
+65
+5f
+6f
+63
+74
+00
+05
+06
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+72
+65
+61
+74
+65
+5f
+68
+65
+78
+00
+58
+06
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+72
+65
+61
+74
+65
+5f
+63
+68
+61
+72
+63
+6f
+6e
+73
+74
+5f
+6e
+61
+73
+6d
+00
+ba
+06
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+72
+65
+61
+74
+65
+5f
+75
+69
+6e
+74
+00
+f8
+06
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+72
+65
+61
+74
+65
+5f
+69
+6e
+74
+00
+36
+07
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+6f
+70
+79
+00
+86
+07
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+64
+65
+73
+74
+72
+6f
+79
+00
+b9
+07
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+61
+6c
+63
+00
+4a
+08
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+7a
+65
+72
+6f
+00
+7d
+08
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+69
+73
+5f
+7a
+65
+72
+6f
+00
+b1
+08
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+69
+73
+5f
+70
+6f
+73
+31
+00
+e5
+08
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+69
+73
+5f
+6e
+65
+67
+31
+00
+1c
+09
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+73
+69
+67
+6e
+00
+52
+09
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+67
+65
+74
+5f
+75
+69
+6e
+74
+00
+89
+09
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+67
+65
+74
+5f
+69
+6e
+74
+00
+d3
+09
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+68
+65
+63
+6b
+5f
+73
+69
+7a
+65
+00
+8e
+0a
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+67
+65
+74
+5f
+73
+69
+7a
+65
+64
+00
+8c
+0b
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+67
+65
+74
+5f
+6c
+65
+62
+31
+32
+38
+00
+1d
+0c
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+73
+69
+7a
+65
+5f
+6c
+65
+62
+31
+32
+38
+00
+74
+0c
+00
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+70
+72
+69
+6e
+74
+00
+36
+0d
+00
+00
+6d
+61
+69
+6e
+00
+00
+00
+00
+00
+06
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+99
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2c
+00
+00
+00
+02
+00
+00
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4f
+18
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+06
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+99
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+9c
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0f
+0e
+00
+00
+00
+00
+00
+00
+30
+0e
+00
+00
+00
+00
+00
+00
+54
+0e
+00
+00
+00
+00
+00
+00
+57
+0e
+00
+00
+00
+00
+00
+00
+3c
+0e
+00
+00
+00
+00
+00
+00
+53
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9e
+15
+00
+00
+00
+00
+00
+00
+08
+16
+00
+00
+00
+00
+00
+00
+a7
+17
+00
+00
+00
+00
+00
+00
+4f
+18
+00
+00
+00
+00
+00
+00
+28
+17
+00
+00
+00
+00
+00
+00
+2c
+17
+00
+00
+00
+00
+00
+00
+1f
+17
+00
+00
+00
+00
+00
+00
+24
+17
+00
+00
+00
+00
+00
+00
+2d
+16
+00
+00
+00
+00
+00
+00
+1c
+17
+00
+00
+00
+00
+00
+00
+0b
+16
+00
+00
+00
+00
+00
+00
+0f
+16
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9e
+15
+00
+00
+00
+00
+00
+00
+ef
+15
+00
+00
+00
+00
+00
+00
+a7
+17
+00
+00
+00
+00
+00
+00
+4f
+18
+00
+00
+00
+00
+00
+00
+2d
+16
+00
+00
+00
+00
+00
+00
+06
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2f
+68
+6f
+6d
+65
+2f
+70
+65
+74
+65
+2f
+79
+61
+73
+6d
+00
+66
+72
+6f
+6d
+5f
+64
+65
+63
+5f
+64
+61
+74
+61
+00
+5f
+73
+68
+6f
+72
+74
+62
+75
+66
+00
+6f
+70
+31
+73
+74
+61
+74
+69
+63
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+72
+65
+61
+74
+65
+5f
+6f
+63
+74
+00
+74
+65
+73
+74
+73
+00
+5f
+49
+4f
+5f
+6c
+6f
+63
+6b
+5f
+74
+00
+5f
+49
+4f
+5f
+62
+75
+66
+5f
+65
+6e
+64
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+44
+49
+56
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+73
+69
+7a
+65
+5f
+6c
+65
+62
+31
+32
+38
+00
+6f
+72
+69
+67
+73
+69
+7a
+65
+00
+70
+74
+72
+5f
+6f
+72
+69
+67
+00
+5f
+49
+4f
+5f
+77
+72
+69
+74
+65
+5f
+65
+6e
+64
+00
+75
+6e
+73
+69
+67
+6e
+65
+64
+20
+69
+6e
+74
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+47
+45
+00
+5f
+66
+6c
+61
+67
+73
+00
+76
+61
+6c
+73
+69
+7a
+65
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+47
+54
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+65
+72
+6e
+61
+6c
+5f
+65
+72
+72
+6f
+72
+5f
+00
+5f
+6d
+61
+72
+6b
+65
+72
+73
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+53
+45
+47
+4f
+46
+46
+00
+73
+68
+6f
+72
+74
+20
+69
+6e
+74
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+53
+45
+47
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+72
+65
+61
+74
+65
+5f
+62
+69
+6e
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+4e
+4f
+4e
+4e
+55
+4d
+00
+77
+6f
+72
+64
+70
+74
+72
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+57
+52
+54
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+6f
+70
+79
+00
+77
+61
+72
+6e
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+67
+65
+74
+5f
+73
+69
+7a
+65
+64
+00
+5f
+70
+6f
+73
+00
+72
+75
+6e
+5f
+74
+65
+73
+74
+00
+73
+74
+64
+6f
+75
+74
+00
+73
+69
+7a
+65
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+72
+65
+61
+74
+65
+5f
+75
+69
+6e
+74
+00
+73
+68
+69
+66
+74
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+4c
+4e
+4f
+54
+00
+63
+61
+72
+72
+79
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+6c
+65
+61
+6e
+75
+70
+00
+72
+65
+73
+75
+6c
+74
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+4e
+45
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+72
+65
+61
+74
+65
+5f
+69
+6e
+74
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+67
+65
+74
+5f
+75
+69
+6e
+74
+00
+6c
+69
+62
+79
+61
+73
+6d
+2f
+74
+65
+73
+74
+73
+2f
+6c
+65
+62
+31
+32
+38
+5f
+74
+65
+73
+74
+2e
+63
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+72
+65
+61
+74
+65
+5f
+68
+65
+78
+00
+6f
+70
+65
+72
+61
+6e
+64
+00
+5f
+49
+4f
+5f
+62
+61
+63
+6b
+75
+70
+5f
+62
+61
+73
+65
+00
+63
+61
+72
+72
+79
+5f
+69
+6e
+00
+5f
+6f
+66
+66
+73
+65
+74
+00
+72
+65
+74
+76
+61
+6c
+00
+5f
+66
+69
+6c
+65
+6e
+6f
+00
+73
+69
+7a
+65
+5f
+74
+00
+73
+69
+67
+6e
+00
+49
+4e
+54
+4e
+55
+4d
+5f
+42
+56
+00
+5f
+49
+4f
+5f
+72
+65
+61
+64
+5f
+62
+61
+73
+65
+00
+62
+69
+67
+65
+6e
+64
+69
+61
+6e
+00
+5f
+49
+4f
+5f
+73
+61
+76
+65
+5f
+65
+6e
+64
+00
+5f
+6e
+65
+78
+74
+00
+64
+65
+73
+74
+73
+69
+7a
+65
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+49
+44
+45
+4e
+54
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+72
+65
+61
+74
+65
+5f
+63
+68
+61
+72
+63
+6f
+6e
+73
+74
+5f
+6e
+61
+73
+6d
+00
+63
+6f
+6e
+76
+5f
+62
+76
+00
+5f
+49
+4f
+5f
+77
+72
+69
+74
+65
+5f
+62
+61
+73
+65
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+4d
+55
+4c
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+4e
+4f
+54
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+53
+49
+47
+4e
+4d
+4f
+44
+00
+5f
+6d
+6f
+64
+65
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+4c
+45
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+73
+69
+67
+6e
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+72
+65
+61
+74
+65
+5f
+64
+65
+63
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+4c
+54
+00
+5f
+49
+4f
+5f
+72
+65
+61
+64
+5f
+70
+74
+72
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+67
+65
+74
+5f
+6c
+65
+62
+31
+32
+38
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+4e
+4f
+52
+00
+79
+61
+73
+6d
+5f
+78
+6d
+61
+6c
+6c
+6f
+63
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+53
+49
+47
+4e
+44
+49
+56
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+58
+4f
+52
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+61
+6c
+63
+00
+5f
+49
+4f
+5f
+6d
+61
+72
+6b
+65
+72
+00
+6f
+70
+32
+73
+74
+61
+74
+69
+63
+00
+74
+72
+75
+65
+00
+5f
+49
+4f
+5f
+73
+61
+76
+65
+5f
+62
+61
+73
+65
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+69
+6e
+69
+74
+69
+61
+6c
+69
+7a
+65
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+53
+48
+52
+00
+6e
+65
+67
+61
+74
+65
+00
+49
+4e
+54
+4e
+55
+4d
+5f
+55
+4c
+00
+6e
+75
+6d
+74
+65
+73
+74
+73
+00
+5f
+5f
+70
+61
+64
+31
+00
+5f
+5f
+70
+61
+64
+32
+00
+6c
+6f
+6e
+67
+20
+75
+6e
+73
+69
+67
+6e
+65
+64
+20
+69
+6e
+74
+00
+54
+65
+73
+74
+5f
+45
+6e
+74
+72
+79
+00
+69
+6e
+70
+75
+74
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+7a
+65
+72
+6f
+00
+5f
+76
+74
+61
+62
+6c
+65
+5f
+6f
+66
+66
+73
+65
+74
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+4c
+4f
+52
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+69
+73
+5f
+7a
+65
+72
+6f
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+4f
+52
+00
+79
+61
+73
+6d
+5f
+65
+78
+70
+72
+5f
+6f
+70
+00
+66
+61
+69
+6c
+65
+64
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+41
+44
+44
+00
+66
+61
+69
+6c
+6d
+73
+67
+00
+63
+68
+61
+72
+00
+5f
+49
+4f
+5f
+72
+65
+61
+64
+5f
+65
+6e
+64
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+68
+65
+63
+6b
+5f
+73
+69
+7a
+65
+00
+4e
+5f
+77
+6f
+72
+64
+00
+73
+74
+64
+69
+6e
+00
+6c
+6f
+6e
+67
+20
+69
+6e
+74
+00
+69
+6e
+74
+6e
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+4e
+45
+47
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+70
+72
+69
+6e
+74
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+53
+55
+42
+00
+76
+61
+6c
+73
+74
+72
+00
+79
+61
+73
+6d
+5f
+78
+66
+72
+65
+65
+00
+5f
+6c
+6f
+63
+6b
+00
+5f
+6f
+6c
+64
+5f
+6f
+66
+66
+73
+65
+74
+00
+5f
+49
+4f
+5f
+46
+49
+4c
+45
+00
+5f
+73
+62
+75
+66
+00
+73
+70
+61
+72
+65
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+64
+65
+73
+74
+72
+6f
+79
+00
+74
+79
+70
+65
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+69
+73
+5f
+70
+6f
+73
+31
+00
+75
+6e
+73
+69
+67
+6e
+65
+64
+20
+63
+68
+61
+72
+00
+6f
+75
+74
+73
+69
+7a
+65
+00
+6c
+69
+6e
+65
+00
+74
+65
+73
+74
+00
+5f
+49
+4f
+5f
+77
+72
+69
+74
+65
+5f
+70
+74
+72
+00
+66
+61
+6c
+73
+65
+00
+72
+61
+6e
+67
+65
+74
+79
+70
+65
+00
+72
+73
+68
+69
+66
+74
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+41
+4e
+44
+00
+66
+61
+69
+6c
+00
+5f
+5f
+6f
+66
+66
+5f
+74
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+66
+72
+6f
+6d
+5f
+44
+65
+63
+5f
+73
+74
+61
+74
+69
+63
+5f
+64
+61
+74
+61
+00
+73
+69
+67
+6e
+65
+64
+20
+63
+68
+61
+72
+00
+73
+68
+6f
+72
+74
+20
+75
+6e
+73
+69
+67
+6e
+65
+64
+20
+69
+6e
+74
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+69
+73
+5f
+6e
+65
+67
+31
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+53
+48
+4c
+00
+6d
+61
+69
+6e
+00
+5f
+63
+68
+61
+69
+6e
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+67
+65
+74
+5f
+69
+6e
+74
+00
+46
+49
+4c
+45
+00
+5f
+66
+6c
+61
+67
+73
+32
+00
+47
+4e
+55
+20
+43
+20
+34
+2e
+30
+2e
+32
+20
+28
+44
+65
+62
+69
+61
+6e
+20
+34
+2e
+30
+2e
+32
+2d
+32
+29
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+45
+51
+00
+5f
+63
+75
+72
+5f
+63
+6f
+6c
+75
+6d
+6e
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+4c
+41
+4e
+44
+00
+5f
+5f
+6f
+66
+66
+36
+34
+5f
+74
+00
+5f
+75
+6e
+75
+73
+65
+64
+32
+00
+5f
+49
+4f
+5f
+62
+75
+66
+5f
+62
+61
+73
+65
+00
+59
+41
+53
+4d
+5f
+45
+58
+50
+52
+5f
+4d
+4f
+44
+00
+62
+6f
+6f
+6c
+65
+61
+6e
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+00
+00
+00
+00
+00
+2e
+74
+65
+78
+74
+00
+2e
+64
+65
+62
+75
+67
+5f
+61
+62
+62
+72
+65
+76
+00
+2e
+64
+65
+62
+75
+67
+5f
+69
+6e
+66
+6f
+00
+2e
+64
+65
+62
+75
+67
+5f
+6c
+69
+6e
+65
+00
+2e
+63
+6f
+6d
+6d
+65
+6e
+74
+00
+2e
+72
+6f
+64
+61
+74
+61
+2e
+73
+74
+72
+31
+2e
+31
+00
+2e
+72
+6f
+64
+61
+74
+61
+00
+2e
+64
+61
+74
+61
+00
+2e
+72
+6f
+64
+61
+74
+61
+2e
+73
+74
+72
+31
+2e
+38
+00
+2e
+62
+73
+73
+00
+2e
+64
+65
+62
+75
+67
+5f
+66
+72
+61
+6d
+65
+00
+2e
+65
+68
+5f
+66
+72
+61
+6d
+65
+00
+2e
+64
+65
+62
+75
+67
+5f
+6c
+6f
+63
+00
+2e
+64
+65
+62
+75
+67
+5f
+70
+75
+62
+6e
+61
+6d
+65
+73
+00
+2e
+64
+65
+62
+75
+67
+5f
+61
+72
+61
+6e
+67
+65
+73
+00
+2e
+64
+65
+62
+75
+67
+5f
+72
+61
+6e
+67
+65
+73
+00
+2e
+64
+65
+62
+75
+67
+5f
+73
+74
+72
+00
+2e
+6e
+6f
+74
+65
+2e
+47
+4e
+55
+2d
+73
+74
+61
+63
+6b
+00
+2e
+72
+65
+6c
+61
+2e
+74
+65
+78
+74
+00
+2e
+72
+65
+6c
+61
+2e
+64
+65
+62
+75
+67
+5f
+69
+6e
+66
+6f
+00
+2e
+72
+65
+6c
+61
+2e
+64
+65
+62
+75
+67
+5f
+6c
+69
+6e
+65
+00
+2e
+72
+65
+6c
+61
+2e
+72
+6f
+64
+61
+74
+61
+00
+2e
+72
+65
+6c
+61
+2e
+64
+61
+74
+61
+00
+2e
+72
+65
+6c
+61
+2e
+64
+65
+62
+75
+67
+5f
+66
+72
+61
+6d
+65
+00
+2e
+72
+65
+6c
+61
+2e
+65
+68
+5f
+66
+72
+61
+6d
+65
+00
+2e
+72
+65
+6c
+61
+2e
+64
+65
+62
+75
+67
+5f
+70
+75
+62
+6e
+61
+6d
+65
+73
+00
+2e
+72
+65
+6c
+61
+2e
+64
+65
+62
+75
+67
+5f
+61
+72
+61
+6e
+67
+65
+73
+00
+2e
+73
+74
+72
+74
+61
+62
+00
+2e
+73
+79
+6d
+74
+61
+62
+00
+2e
+73
+68
+73
+74
+72
+74
+61
+62
+00
+00
+00
+00
+6c
+65
+62
+31
+32
+38
+5f
+74
+65
+73
+74
+2e
+63
+00
+74
+65
+73
+74
+73
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+69
+6e
+69
+74
+69
+61
+6c
+69
+7a
+65
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+6c
+65
+61
+6e
+75
+70
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+72
+65
+61
+74
+65
+5f
+64
+65
+63
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+72
+65
+61
+74
+65
+5f
+62
+69
+6e
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+72
+65
+61
+74
+65
+5f
+6f
+63
+74
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+72
+65
+61
+74
+65
+5f
+68
+65
+78
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+72
+65
+61
+74
+65
+5f
+63
+68
+61
+72
+63
+6f
+6e
+73
+74
+5f
+6e
+61
+73
+6d
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+72
+65
+61
+74
+65
+5f
+75
+69
+6e
+74
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+72
+65
+61
+74
+65
+5f
+69
+6e
+74
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+6f
+70
+79
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+64
+65
+73
+74
+72
+6f
+79
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+61
+6c
+63
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+7a
+65
+72
+6f
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+69
+73
+5f
+7a
+65
+72
+6f
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+69
+73
+5f
+70
+6f
+73
+31
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+69
+73
+5f
+6e
+65
+67
+31
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+73
+69
+67
+6e
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+67
+65
+74
+5f
+75
+69
+6e
+74
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+67
+65
+74
+5f
+69
+6e
+74
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+63
+68
+65
+63
+6b
+5f
+73
+69
+7a
+65
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+67
+65
+74
+5f
+73
+69
+7a
+65
+64
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+67
+65
+74
+5f
+6c
+65
+62
+31
+32
+38
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+73
+69
+7a
+65
+5f
+6c
+65
+62
+31
+32
+38
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+6e
+75
+6d
+5f
+70
+72
+69
+6e
+74
+00
+6d
+61
+69
+6e
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+43
+72
+65
+61
+74
+65
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+66
+72
+6f
+6d
+5f
+44
+65
+63
+5f
+73
+74
+61
+74
+69
+63
+5f
+42
+6f
+6f
+74
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+66
+72
+6f
+6d
+5f
+44
+65
+63
+5f
+73
+74
+61
+74
+69
+63
+5f
+53
+68
+75
+74
+64
+6f
+77
+6e
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+44
+65
+73
+74
+72
+6f
+79
+00
+79
+61
+73
+6d
+5f
+78
+6d
+61
+6c
+6c
+6f
+63
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+66
+72
+6f
+6d
+5f
+44
+65
+63
+5f
+73
+74
+61
+74
+69
+63
+00
+53
+65
+74
+5f
+4d
+61
+78
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+43
+68
+75
+6e
+6b
+5f
+52
+65
+61
+64
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+43
+6c
+6f
+6e
+65
+00
+79
+61
+73
+6d
+5f
+5f
+77
+61
+72
+6e
+69
+6e
+67
+00
+73
+74
+72
+6c
+65
+6e
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+66
+72
+6f
+6d
+5f
+42
+69
+6e
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+66
+72
+6f
+6d
+5f
+4f
+63
+74
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+66
+72
+6f
+6d
+5f
+48
+65
+78
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+45
+6d
+70
+74
+79
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+4d
+6f
+76
+65
+5f
+4c
+65
+66
+74
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+43
+68
+75
+6e
+6b
+5f
+53
+74
+6f
+72
+65
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+4e
+65
+67
+61
+74
+65
+00
+79
+61
+73
+6d
+5f
+78
+66
+72
+65
+65
+00
+79
+61
+73
+6d
+5f
+69
+6e
+74
+65
+72
+6e
+61
+6c
+5f
+65
+72
+72
+6f
+72
+5f
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+43
+6f
+70
+79
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+44
+69
+76
+69
+64
+65
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+69
+73
+5f
+65
+6d
+70
+74
+79
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+4c
+53
+42
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+4c
+65
+78
+69
+63
+6f
+6d
+70
+61
+72
+65
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+65
+71
+75
+61
+6c
+00
+79
+61
+73
+6d
+5f
+5f
+65
+72
+72
+6f
+72
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+4d
+75
+6c
+74
+69
+70
+6c
+79
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+61
+64
+64
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+73
+75
+62
+00
+53
+65
+74
+5f
+55
+6e
+69
+6f
+6e
+00
+53
+65
+74
+5f
+49
+6e
+74
+65
+72
+73
+65
+63
+74
+69
+6f
+6e
+00
+53
+65
+74
+5f
+45
+78
+63
+6c
+75
+73
+69
+76
+65
+4f
+72
+00
+53
+65
+74
+5f
+43
+6f
+6d
+70
+6c
+65
+6d
+65
+6e
+74
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+4d
+6f
+76
+65
+5f
+52
+69
+67
+68
+74
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+69
+73
+5f
+66
+75
+6c
+6c
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+53
+69
+67
+6e
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+6d
+73
+62
+5f
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+73
+68
+69
+66
+74
+5f
+72
+69
+67
+68
+74
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+64
+65
+63
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+49
+6e
+74
+65
+72
+76
+61
+6c
+5f
+43
+6f
+70
+79
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+42
+6c
+6f
+63
+6b
+5f
+52
+65
+61
+64
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+42
+6c
+6f
+63
+6b
+5f
+53
+74
+6f
+72
+65
+00
+6d
+65
+6d
+63
+70
+79
+00
+66
+70
+72
+69
+6e
+74
+66
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+74
+6f
+5f
+48
+65
+78
+00
+42
+69
+74
+56
+65
+63
+74
+6f
+72
+5f
+42
+6f
+6f
+74
+00
+70
+72
+69
+6e
+74
+66
+00
+73
+70
+72
+69
+6e
+74
+66
+00
+70
+75
+74
+63
+68
+61
+72
+00
+73
+74
+64
+6f
+75
+74
+00
+66
+66
+6c
+75
+73
+68
+00
+79
+61
+73
+6d
+5f
+5f
+78
+73
+74
+72
+64
+75
+70
+00
+2e
+4c
+64
+65
+62
+75
+67
+5f
+61
+62
+62
+72
+65
+76
+30
+00
+2e
+4c
+64
+65
+62
+75
+67
+5f
+69
+6e
+66
+6f
+30
+00
+2e
+4c
+64
+65
+62
+75
+67
+5f
+6c
+69
+6e
+65
+30
+00
+2e
+4c
+74
+65
+78
+74
+30
+00
+2e
+4c
+43
+30
+00
+2e
+4c
+43
+31
+00
+2e
+4c
+43
+32
+00
+2e
+4c
+43
+33
+00
+2e
+4c
+43
+34
+00
+2e
+4c
+43
+35
+00
+2e
+4c
+43
+36
+00
+2e
+4c
+43
+37
+00
+2e
+4c
+43
+38
+00
+2e
+4c
+43
+39
+00
+2e
+4c
+43
+31
+30
+00
+2e
+4c
+43
+31
+31
+00
+2e
+4c
+43
+31
+32
+00
+2e
+4c
+43
+31
+33
+00
+2e
+4c
+43
+31
+34
+00
+2e
+4c
+43
+31
+35
+00
+2e
+4c
+43
+31
+36
+00
+2e
+4c
+43
+31
+37
+00
+2e
+4c
+43
+31
+38
+00
+2e
+4c
+46
+42
+32
+35
+00
+2e
+4c
+56
+4c
+30
+00
+2e
+4c
+43
+46
+49
+30
+00
+2e
+4c
+56
+4c
+31
+00
+63
+6f
+6e
+76
+5f
+62
+76
+00
+72
+65
+73
+75
+6c
+74
+00
+73
+70
+61
+72
+65
+00
+6f
+70
+31
+73
+74
+61
+74
+69
+63
+00
+6f
+70
+32
+73
+74
+61
+74
+69
+63
+00
+66
+72
+6f
+6d
+5f
+64
+65
+63
+5f
+64
+61
+74
+61
+00
+2e
+4c
+56
+4c
+32
+00
+2e
+4c
+46
+45
+32
+35
+00
+2e
+4c
+46
+42
+32
+36
+00
+2e
+4c
+56
+4c
+33
+00
+2e
+4c
+43
+46
+49
+31
+00
+2e
+4c
+56
+4c
+34
+00
+2e
+4c
+56
+4c
+35
+00
+2e
+4c
+46
+45
+32
+36
+00
+2e
+4c
+43
+31
+39
+00
+2e
+4c
+46
+42
+32
+37
+00
+2e
+4c
+56
+4c
+36
+00
+2e
+4c
+43
+46
+49
+32
+00
+2e
+4c
+43
+46
+49
+33
+00
+2e
+4c
+43
+46
+49
+34
+00
+2e
+4c
+56
+4c
+37
+00
+2e
+4c
+43
+46
+49
+35
+00
+2e
+4c
+56
+4c
+38
+00
+2e
+4c
+56
+4c
+39
+00
+2e
+4c
+56
+4c
+31
+30
+00
+2e
+4c
+56
+4c
+31
+31
+00
+2e
+4c
+56
+4c
+31
+32
+00
+2e
+4c
+31
+33
+00
+2e
+4c
+36
+00
+2e
+4c
+38
+00
+2e
+4c
+56
+4c
+31
+33
+00
+2e
+4c
+56
+4c
+31
+34
+00
+2e
+4c
+56
+4c
+31
+35
+00
+2e
+4c
+56
+4c
+31
+36
+00
+2e
+4c
+56
+4c
+31
+37
+00
+2e
+4c
+56
+4c
+31
+38
+00
+2e
+4c
+56
+4c
+31
+39
+00
+2e
+4c
+56
+4c
+32
+30
+00
+2e
+4c
+56
+4c
+32
+31
+00
+2e
+4c
+56
+4c
+32
+32
+00
+2e
+4c
+46
+45
+32
+37
+00
+2e
+4c
+46
+42
+32
+38
+00
+2e
+4c
+56
+4c
+32
+33
+00
+2e
+4c
+43
+46
+49
+36
+00
+2e
+4c
+43
+46
+49
+37
+00
+2e
+4c
+43
+46
+49
+38
+00
+2e
+4c
+56
+4c
+32
+34
+00
+2e
+4c
+43
+46
+49
+39
+00
+2e
+4c
+56
+4c
+32
+35
+00
+2e
+4c
+56
+4c
+32
+36
+00
+2e
+4c
+56
+4c
+32
+37
+00
+2e
+4c
+32
+31
+00
+2e
+4c
+31
+35
+00
+2e
+4c
+31
+37
+00
+2e
+4c
+56
+4c
+32
+38
+00
+2e
+4c
+56
+4c
+32
+39
+00
+2e
+4c
+56
+4c
+33
+30
+00
+2e
+4c
+56
+4c
+33
+31
+00
+2e
+4c
+56
+4c
+33
+32
+00
+2e
+4c
+56
+4c
+33
+33
+00
+2e
+4c
+56
+4c
+33
+34
+00
+2e
+4c
+56
+4c
+33
+35
+00
+2e
+4c
+56
+4c
+33
+36
+00
+2e
+4c
+56
+4c
+33
+37
+00
+2e
+4c
+46
+45
+32
+38
+00
+2e
+4c
+46
+42
+32
+39
+00
+2e
+4c
+56
+4c
+33
+38
+00
+2e
+4c
+43
+46
+49
+31
+30
+00
+2e
+4c
+43
+46
+49
+31
+31
+00
+2e
+4c
+43
+46
+49
+31
+32
+00
+2e
+4c
+56
+4c
+33
+39
+00
+2e
+4c
+43
+46
+49
+31
+33
+00
+2e
+4c
+56
+4c
+34
+30
+00
+2e
+4c
+56
+4c
+34
+31
+00
+2e
+4c
+56
+4c
+34
+32
+00
+2e
+4c
+32
+39
+00
+2e
+4c
+32
+33
+00
+2e
+4c
+32
+35
+00
+2e
+4c
+56
+4c
+34
+33
+00
+2e
+4c
+56
+4c
+34
+34
+00
+2e
+4c
+56
+4c
+34
+35
+00
+2e
+4c
+56
+4c
+34
+36
+00
+2e
+4c
+56
+4c
+34
+37
+00
+2e
+4c
+56
+4c
+34
+38
+00
+2e
+4c
+56
+4c
+34
+39
+00
+2e
+4c
+56
+4c
+35
+30
+00
+2e
+4c
+56
+4c
+35
+31
+00
+2e
+4c
+56
+4c
+35
+32
+00
+2e
+4c
+46
+45
+32
+39
+00
+2e
+4c
+46
+42
+33
+30
+00
+2e
+4c
+56
+4c
+35
+33
+00
+2e
+4c
+43
+46
+49
+31
+34
+00
+2e
+4c
+43
+46
+49
+31
+35
+00
+2e
+4c
+43
+46
+49
+31
+36
+00
+2e
+4c
+56
+4c
+35
+34
+00
+2e
+4c
+43
+46
+49
+31
+37
+00
+2e
+4c
+56
+4c
+35
+35
+00
+2e
+4c
+56
+4c
+35
+36
+00
+2e
+4c
+56
+4c
+35
+37
+00
+2e
+4c
+33
+37
+00
+2e
+4c
+33
+31
+00
+2e
+4c
+33
+33
+00
+2e
+4c
+56
+4c
+35
+38
+00
+2e
+4c
+56
+4c
+35
+39
+00
+2e
+4c
+56
+4c
+36
+30
+00
+2e
+4c
+56
+4c
+36
+31
+00
+2e
+4c
+56
+4c
+36
+32
+00
+2e
+4c
+56
+4c
+36
+33
+00
+2e
+4c
+56
+4c
+36
+34
+00
+2e
+4c
+56
+4c
+36
+35
+00
+2e
+4c
+56
+4c
+36
+36
+00
+2e
+4c
+56
+4c
+36
+37
+00
+2e
+4c
+46
+45
+33
+30
+00
+2e
+4c
+43
+32
+30
+00
+2e
+4c
+46
+42
+33
+31
+00
+2e
+4c
+56
+4c
+36
+38
+00
+2e
+4c
+43
+46
+49
+31
+38
+00
+2e
+4c
+43
+46
+49
+31
+39
+00
+2e
+4c
+43
+46
+49
+32
+30
+00
+2e
+4c
+43
+46
+49
+32
+31
+00
+2e
+4c
+43
+46
+49
+32
+32
+00
+2e
+4c
+56
+4c
+36
+39
+00
+2e
+4c
+56
+4c
+37
+30
+00
+2e
+4c
+56
+4c
+37
+31
+00
+2e
+4c
+56
+4c
+37
+32
+00
+2e
+4c
+35
+39
+00
+2e
+4c
+33
+39
+00
+2e
+4c
+36
+30
+00
+2e
+4c
+34
+33
+00
+2e
+4c
+34
+34
+00
+2e
+4c
+56
+4c
+37
+33
+00
+2e
+4c
+35
+30
+00
+2e
+4c
+34
+35
+00
+2e
+4c
+35
+35
+00
+2e
+4c
+35
+36
+00
+2e
+4c
+35
+37
+00
+2e
+4c
+34
+39
+00
+2e
+4c
+34
+38
+00
+2e
+4c
+56
+4c
+37
+34
+00
+2e
+4c
+56
+4c
+37
+35
+00
+2e
+4c
+34
+37
+00
+2e
+4c
+56
+4c
+37
+36
+00
+2e
+4c
+56
+4c
+37
+37
+00
+2e
+4c
+34
+36
+00
+2e
+4c
+56
+4c
+37
+38
+00
+2e
+4c
+56
+4c
+37
+39
+00
+2e
+4c
+56
+4c
+38
+30
+00
+2e
+4c
+56
+4c
+38
+31
+00
+2e
+4c
+56
+4c
+38
+32
+00
+2e
+4c
+56
+4c
+38
+33
+00
+2e
+4c
+56
+4c
+38
+34
+00
+2e
+4c
+56
+4c
+38
+35
+00
+2e
+4c
+36
+31
+00
+2e
+4c
+56
+4c
+38
+36
+00
+2e
+4c
+56
+4c
+38
+37
+00
+2e
+4c
+35
+31
+00
+2e
+4c
+56
+4c
+38
+38
+00
+2e
+4c
+46
+45
+33
+31
+00
+2e
+4c
+46
+42
+33
+32
+00
+2e
+4c
+56
+4c
+38
+39
+00
+2e
+4c
+43
+46
+49
+32
+33
+00
+2e
+4c
+56
+4c
+39
+30
+00
+2e
+4c
+56
+4c
+39
+31
+00
+2e
+4c
+56
+4c
+39
+32
+00
+2e
+4c
+46
+45
+33
+32
+00
+2e
+4c
+46
+42
+33
+33
+00
+2e
+4c
+56
+4c
+39
+33
+00
+2e
+4c
+43
+46
+49
+32
+34
+00
+2e
+4c
+56
+4c
+39
+34
+00
+2e
+4c
+36
+35
+00
+2e
+4c
+56
+4c
+39
+35
+00
+2e
+4c
+56
+4c
+39
+36
+00
+2e
+4c
+56
+4c
+39
+37
+00
+2e
+4c
+56
+4c
+39
+38
+00
+2e
+4c
+56
+4c
+39
+39
+00
+2e
+4c
+46
+45
+33
+33
+00
+2e
+4c
+46
+42
+33
+34
+00
+2e
+4c
+56
+4c
+31
+30
+30
+00
+2e
+4c
+43
+46
+49
+32
+35
+00
+2e
+4c
+43
+46
+49
+32
+36
+00
+2e
+4c
+56
+4c
+31
+30
+31
+00
+2e
+4c
+43
+46
+49
+32
+37
+00
+2e
+4c
+56
+4c
+31
+30
+32
+00
+2e
+4c
+56
+4c
+31
+30
+33
+00
+2e
+4c
+37
+31
+00
+2e
+4c
+37
+34
+00
+2e
+4c
+56
+4c
+31
+30
+34
+00
+2e
+4c
+56
+4c
+31
+30
+35
+00
+2e
+4c
+56
+4c
+31
+30
+36
+00
+2e
+4c
+56
+4c
+31
+30
+37
+00
+2e
+4c
+56
+4c
+31
+30
+38
+00
+2e
+4c
+56
+4c
+31
+30
+39
+00
+2e
+4c
+56
+4c
+31
+31
+30
+00
+2e
+4c
+56
+4c
+31
+31
+31
+00
+2e
+4c
+56
+4c
+31
+31
+32
+00
+2e
+4c
+56
+4c
+31
+31
+33
+00
+2e
+4c
+56
+4c
+31
+31
+34
+00
+2e
+4c
+46
+45
+33
+34
+00
+2e
+4c
+46
+42
+33
+35
+00
+2e
+4c
+56
+4c
+31
+31
+35
+00
+2e
+4c
+43
+46
+49
+32
+38
+00
+2e
+4c
+56
+4c
+31
+31
+36
+00
+2e
+4c
+37
+39
+00
+2e
+4c
+56
+4c
+31
+31
+37
+00
+2e
+4c
+56
+4c
+31
+31
+38
+00
+2e
+4c
+56
+4c
+31
+31
+39
+00
+2e
+4c
+56
+4c
+31
+32
+30
+00
+2e
+4c
+56
+4c
+31
+32
+31
+00
+2e
+4c
+56
+4c
+31
+32
+32
+00
+2e
+4c
+46
+45
+33
+35
+00
+2e
+4c
+43
+32
+31
+00
+2e
+4c
+43
+32
+32
+00
+2e
+4c
+43
+32
+33
+00
+2e
+4c
+43
+32
+34
+00
+2e
+4c
+43
+32
+35
+00
+2e
+4c
+43
+32
+36
+00
+2e
+4c
+43
+32
+37
+00
+2e
+4c
+46
+42
+33
+36
+00
+2e
+4c
+56
+4c
+31
+32
+33
+00
+2e
+4c
+43
+46
+49
+32
+39
+00
+2e
+4c
+43
+46
+49
+33
+30
+00
+2e
+4c
+43
+46
+49
+33
+31
+00
+2e
+4c
+43
+46
+49
+33
+32
+00
+2e
+4c
+43
+46
+49
+33
+33
+00
+2e
+4c
+43
+46
+49
+33
+34
+00
+2e
+4c
+43
+46
+49
+33
+35
+00
+2e
+4c
+56
+4c
+31
+32
+34
+00
+2e
+4c
+56
+4c
+31
+32
+35
+00
+2e
+4c
+31
+34
+36
+00
+2e
+4c
+56
+4c
+31
+32
+36
+00
+2e
+4c
+56
+4c
+31
+32
+37
+00
+2e
+4c
+56
+4c
+31
+32
+38
+00
+2e
+4c
+56
+4c
+31
+32
+39
+00
+2e
+4c
+38
+33
+00
+2e
+4c
+56
+4c
+31
+33
+30
+00
+2e
+4c
+38
+36
+00
+2e
+4c
+31
+34
+37
+00
+2e
+4c
+56
+4c
+31
+33
+31
+00
+2e
+4c
+38
+39
+00
+2e
+4c
+31
+34
+38
+00
+2e
+4c
+39
+32
+00
+2e
+4c
+31
+32
+31
+00
+2e
+4c
+39
+33
+00
+2e
+4c
+39
+34
+00
+2e
+4c
+39
+35
+00
+2e
+4c
+39
+36
+00
+2e
+4c
+39
+38
+00
+2e
+4c
+31
+30
+30
+00
+2e
+4c
+31
+30
+31
+00
+2e
+4c
+31
+30
+32
+00
+2e
+4c
+31
+30
+33
+00
+2e
+4c
+31
+30
+34
+00
+2e
+4c
+31
+30
+35
+00
+2e
+4c
+31
+30
+36
+00
+2e
+4c
+31
+30
+37
+00
+2e
+4c
+31
+30
+38
+00
+2e
+4c
+31
+30
+39
+00
+2e
+4c
+31
+31
+30
+00
+2e
+4c
+31
+31
+31
+00
+2e
+4c
+31
+31
+32
+00
+2e
+4c
+31
+31
+33
+00
+2e
+4c
+31
+31
+34
+00
+2e
+4c
+31
+31
+35
+00
+2e
+4c
+31
+31
+36
+00
+2e
+4c
+31
+31
+37
+00
+2e
+4c
+31
+31
+38
+00
+2e
+4c
+31
+31
+39
+00
+2e
+4c
+31
+32
+30
+00
+2e
+4c
+56
+4c
+31
+33
+32
+00
+2e
+4c
+31
+32
+32
+00
+2e
+4c
+31
+33
+36
+00
+2e
+4c
+31
+34
+39
+00
+2e
+4c
+31
+33
+38
+00
+2e
+4c
+31
+34
+33
+00
+2e
+4c
+56
+4c
+31
+33
+33
+00
+2e
+4c
+56
+4c
+31
+33
+34
+00
+2e
+4c
+56
+4c
+31
+33
+35
+00
+2e
+4c
+56
+4c
+31
+33
+36
+00
+2e
+4c
+56
+4c
+31
+33
+37
+00
+2e
+4c
+56
+4c
+31
+33
+38
+00
+2e
+4c
+56
+4c
+31
+33
+39
+00
+2e
+4c
+56
+4c
+31
+34
+30
+00
+2e
+4c
+31
+35
+30
+00
+2e
+4c
+56
+4c
+31
+34
+31
+00
+2e
+4c
+56
+4c
+31
+34
+32
+00
+2e
+4c
+56
+4c
+31
+34
+33
+00
+2e
+4c
+56
+4c
+31
+34
+34
+00
+2e
+4c
+56
+4c
+31
+34
+35
+00
+2e
+4c
+56
+4c
+31
+34
+36
+00
+2e
+4c
+56
+4c
+31
+34
+37
+00
+2e
+4c
+56
+4c
+31
+34
+38
+00
+2e
+4c
+56
+4c
+31
+34
+39
+00
+2e
+4c
+56
+4c
+31
+35
+30
+00
+2e
+4c
+31
+34
+35
+00
+2e
+4c
+56
+4c
+31
+35
+31
+00
+2e
+4c
+56
+4c
+31
+35
+32
+00
+2e
+4c
+56
+4c
+31
+35
+33
+00
+2e
+4c
+56
+4c
+31
+35
+34
+00
+2e
+4c
+56
+4c
+31
+35
+35
+00
+2e
+4c
+56
+4c
+31
+35
+36
+00
+2e
+4c
+56
+4c
+31
+35
+37
+00
+2e
+4c
+56
+4c
+31
+35
+38
+00
+2e
+4c
+56
+4c
+31
+35
+39
+00
+2e
+4c
+56
+4c
+31
+36
+30
+00
+2e
+4c
+56
+4c
+31
+36
+31
+00
+2e
+4c
+56
+4c
+31
+36
+32
+00
+2e
+4c
+56
+4c
+31
+36
+33
+00
+2e
+4c
+56
+4c
+31
+36
+34
+00
+2e
+4c
+56
+4c
+31
+36
+35
+00
+2e
+4c
+56
+4c
+31
+36
+36
+00
+2e
+4c
+31
+35
+31
+00
+2e
+4c
+56
+4c
+31
+36
+37
+00
+2e
+4c
+56
+4c
+31
+36
+38
+00
+2e
+4c
+56
+4c
+31
+36
+39
+00
+2e
+4c
+56
+4c
+31
+37
+30
+00
+2e
+4c
+56
+4c
+31
+37
+31
+00
+2e
+4c
+56
+4c
+31
+37
+32
+00
+2e
+4c
+56
+4c
+31
+37
+33
+00
+2e
+4c
+56
+4c
+31
+37
+34
+00
+2e
+4c
+56
+4c
+31
+37
+35
+00
+2e
+4c
+56
+4c
+31
+37
+36
+00
+2e
+4c
+56
+4c
+31
+37
+37
+00
+2e
+4c
+56
+4c
+31
+37
+38
+00
+2e
+4c
+56
+4c
+31
+37
+39
+00
+2e
+4c
+56
+4c
+31
+38
+30
+00
+2e
+4c
+56
+4c
+31
+38
+31
+00
+2e
+4c
+31
+32
+35
+00
+2e
+4c
+56
+4c
+31
+38
+32
+00
+2e
+4c
+56
+4c
+31
+38
+33
+00
+2e
+4c
+56
+4c
+31
+38
+34
+00
+2e
+4c
+56
+4c
+31
+38
+35
+00
+2e
+4c
+56
+4c
+31
+38
+36
+00
+2e
+4c
+31
+35
+32
+00
+2e
+4c
+56
+4c
+31
+38
+37
+00
+2e
+4c
+56
+4c
+31
+38
+38
+00
+2e
+4c
+56
+4c
+31
+38
+39
+00
+2e
+4c
+56
+4c
+31
+39
+30
+00
+2e
+4c
+56
+4c
+31
+39
+31
+00
+2e
+4c
+56
+4c
+31
+39
+32
+00
+2e
+4c
+56
+4c
+31
+39
+33
+00
+2e
+4c
+56
+4c
+31
+39
+34
+00
+2e
+4c
+56
+4c
+31
+39
+35
+00
+2e
+4c
+56
+4c
+31
+39
+36
+00
+2e
+4c
+56
+4c
+31
+39
+37
+00
+2e
+4c
+46
+45
+33
+36
+00
+2e
+4c
+46
+42
+33
+37
+00
+2e
+4c
+56
+4c
+31
+39
+38
+00
+2e
+4c
+43
+46
+49
+33
+36
+00
+2e
+4c
+56
+4c
+31
+39
+39
+00
+2e
+4c
+31
+35
+37
+00
+2e
+4c
+56
+4c
+32
+30
+30
+00
+2e
+4c
+56
+4c
+32
+30
+31
+00
+2e
+4c
+56
+4c
+32
+30
+32
+00
+2e
+4c
+56
+4c
+32
+30
+33
+00
+2e
+4c
+46
+45
+33
+37
+00
+2e
+4c
+46
+42
+33
+38
+00
+2e
+4c
+56
+4c
+32
+30
+34
+00
+2e
+4c
+31
+35
+39
+00
+2e
+4c
+46
+45
+33
+38
+00
+2e
+4c
+46
+42
+33
+39
+00
+2e
+4c
+56
+4c
+32
+30
+35
+00
+2e
+4c
+31
+36
+35
+00
+2e
+4c
+31
+36
+38
+00
+2e
+4c
+46
+45
+33
+39
+00
+2e
+4c
+46
+42
+34
+30
+00
+2e
+4c
+56
+4c
+32
+30
+36
+00
+2e
+4c
+43
+46
+49
+33
+37
+00
+2e
+4c
+56
+4c
+32
+30
+37
+00
+2e
+4c
+31
+37
+37
+00
+2e
+4c
+31
+37
+31
+00
+2e
+4c
+56
+4c
+32
+30
+38
+00
+2e
+4c
+56
+4c
+32
+30
+39
+00
+2e
+4c
+56
+4c
+32
+31
+30
+00
+2e
+4c
+56
+4c
+32
+31
+31
+00
+2e
+4c
+46
+45
+34
+30
+00
+2e
+4c
+46
+42
+34
+31
+00
+2e
+4c
+56
+4c
+32
+31
+32
+00
+2e
+4c
+31
+38
+36
+00
+2e
+4c
+56
+4c
+32
+31
+33
+00
+2e
+4c
+46
+45
+34
+31
+00
+2e
+4c
+43
+32
+38
+00
+2e
+4c
+46
+42
+34
+32
+00
+2e
+4c
+56
+4c
+32
+31
+34
+00
+2e
+4c
+43
+46
+49
+33
+38
+00
+2e
+4c
+56
+4c
+32
+31
+35
+00
+2e
+4c
+31
+38
+39
+00
+2e
+4c
+31
+39
+34
+00
+2e
+4c
+56
+4c
+32
+31
+36
+00
+2e
+4c
+56
+4c
+32
+31
+37
+00
+2e
+4c
+56
+4c
+32
+31
+38
+00
+2e
+4c
+56
+4c
+32
+31
+39
+00
+2e
+4c
+56
+4c
+32
+32
+30
+00
+2e
+4c
+56
+4c
+32
+32
+31
+00
+2e
+4c
+56
+4c
+32
+32
+32
+00
+2e
+4c
+46
+45
+34
+32
+00
+2e
+4c
+46
+42
+34
+33
+00
+2e
+4c
+56
+4c
+32
+32
+33
+00
+2e
+4c
+43
+46
+49
+33
+39
+00
+2e
+4c
+56
+4c
+32
+32
+34
+00
+2e
+4c
+31
+39
+37
+00
+2e
+4c
+56
+4c
+32
+32
+35
+00
+2e
+4c
+32
+30
+38
+00
+2e
+4c
+56
+4c
+32
+32
+36
+00
+2e
+4c
+32
+30
+31
+00
+2e
+4c
+56
+4c
+32
+32
+37
+00
+2e
+4c
+56
+4c
+32
+32
+38
+00
+2e
+4c
+31
+39
+39
+00
+2e
+4c
+56
+4c
+32
+32
+39
+00
+2e
+4c
+56
+4c
+32
+33
+30
+00
+2e
+4c
+42
+42
+32
+00
+2e
+4c
+32
+30
+39
+00
+2e
+4c
+56
+4c
+32
+33
+31
+00
+2e
+4c
+32
+30
+33
+00
+2e
+4c
+42
+45
+32
+00
+2e
+4c
+56
+4c
+32
+33
+32
+00
+2e
+4c
+56
+4c
+32
+33
+33
+00
+2e
+4c
+56
+4c
+32
+33
+34
+00
+2e
+4c
+42
+42
+33
+00
+2e
+4c
+56
+4c
+32
+33
+35
+00
+2e
+4c
+42
+45
+33
+00
+2e
+4c
+56
+4c
+32
+33
+36
+00
+2e
+4c
+42
+42
+34
+00
+2e
+4c
+56
+4c
+32
+33
+37
+00
+2e
+4c
+42
+45
+34
+00
+2e
+4c
+46
+45
+34
+33
+00
+2e
+4c
+46
+42
+34
+35
+00
+2e
+4c
+56
+4c
+32
+33
+38
+00
+2e
+4c
+43
+46
+49
+34
+30
+00
+2e
+4c
+43
+46
+49
+34
+31
+00
+2e
+4c
+43
+46
+49
+34
+32
+00
+2e
+4c
+43
+46
+49
+34
+33
+00
+2e
+4c
+43
+46
+49
+34
+34
+00
+2e
+4c
+43
+46
+49
+34
+35
+00
+2e
+4c
+43
+46
+49
+34
+36
+00
+2e
+4c
+56
+4c
+32
+33
+39
+00
+2e
+4c
+32
+33
+30
+00
+2e
+4c
+56
+4c
+32
+34
+30
+00
+2e
+4c
+56
+4c
+32
+34
+31
+00
+2e
+4c
+56
+4c
+32
+34
+32
+00
+2e
+4c
+56
+4c
+32
+34
+33
+00
+2e
+4c
+32
+31
+35
+00
+2e
+4c
+56
+4c
+32
+34
+34
+00
+2e
+4c
+32
+31
+38
+00
+2e
+4c
+32
+33
+31
+00
+2e
+4c
+32
+31
+39
+00
+2e
+4c
+32
+32
+33
+00
+2e
+4c
+56
+4c
+32
+34
+35
+00
+2e
+4c
+32
+33
+32
+00
+2e
+4c
+56
+4c
+32
+34
+36
+00
+2e
+4c
+56
+4c
+32
+34
+37
+00
+2e
+4c
+56
+4c
+32
+34
+38
+00
+2e
+4c
+56
+4c
+32
+34
+39
+00
+2e
+4c
+56
+4c
+32
+35
+30
+00
+2e
+4c
+56
+4c
+32
+35
+31
+00
+2e
+4c
+56
+4c
+32
+35
+32
+00
+2e
+4c
+56
+4c
+32
+35
+33
+00
+2e
+4c
+56
+4c
+32
+35
+34
+00
+2e
+4c
+56
+4c
+32
+35
+35
+00
+2e
+4c
+42
+42
+35
+00
+2e
+4c
+56
+4c
+32
+35
+36
+00
+2e
+4c
+56
+4c
+32
+35
+37
+00
+2e
+4c
+32
+32
+32
+00
+2e
+4c
+56
+4c
+32
+35
+38
+00
+2e
+4c
+42
+45
+35
+00
+2e
+4c
+32
+33
+33
+00
+2e
+4c
+56
+4c
+32
+35
+39
+00
+2e
+4c
+56
+4c
+32
+36
+30
+00
+2e
+4c
+56
+4c
+32
+36
+31
+00
+2e
+4c
+42
+42
+36
+00
+2e
+4c
+56
+4c
+32
+36
+32
+00
+2e
+4c
+56
+4c
+32
+36
+33
+00
+2e
+4c
+42
+45
+36
+00
+2e
+4c
+56
+4c
+32
+36
+34
+00
+2e
+4c
+56
+4c
+32
+36
+35
+00
+2e
+4c
+56
+4c
+32
+36
+36
+00
+2e
+4c
+46
+45
+34
+35
+00
+2e
+4c
+43
+32
+39
+00
+2e
+4c
+43
+33
+30
+00
+2e
+4c
+43
+33
+31
+00
+2e
+4c
+43
+33
+32
+00
+2e
+4c
+46
+42
+34
+34
+00
+2e
+4c
+56
+4c
+32
+36
+37
+00
+2e
+4c
+43
+46
+49
+34
+37
+00
+2e
+4c
+43
+46
+49
+34
+38
+00
+2e
+4c
+43
+46
+49
+34
+39
+00
+2e
+4c
+43
+46
+49
+35
+30
+00
+2e
+4c
+43
+46
+49
+35
+31
+00
+2e
+4c
+43
+46
+49
+35
+32
+00
+2e
+4c
+56
+4c
+32
+36
+38
+00
+2e
+4c
+43
+46
+49
+35
+33
+00
+2e
+4c
+56
+4c
+32
+36
+39
+00
+2e
+4c
+56
+4c
+32
+37
+30
+00
+2e
+4c
+32
+36
+33
+00
+2e
+4c
+56
+4c
+32
+37
+31
+00
+2e
+4c
+32
+33
+37
+00
+2e
+4c
+32
+36
+34
+00
+2e
+4c
+56
+4c
+32
+37
+32
+00
+2e
+4c
+32
+33
+38
+00
+2e
+4c
+32
+36
+35
+00
+2e
+4c
+32
+34
+30
+00
+2e
+4c
+32
+34
+33
+00
+2e
+4c
+32
+36
+36
+00
+2e
+4c
+32
+34
+36
+00
+2e
+4c
+56
+4c
+32
+37
+33
+00
+2e
+4c
+56
+4c
+32
+37
+34
+00
+2e
+4c
+32
+36
+37
+00
+2e
+4c
+32
+34
+39
+00
+2e
+4c
+32
+36
+38
+00
+2e
+4c
+32
+35
+34
+00
+2e
+4c
+56
+4c
+32
+37
+35
+00
+2e
+4c
+32
+35
+38
+00
+2e
+4c
+56
+4c
+32
+37
+36
+00
+2e
+4c
+32
+36
+30
+00
+2e
+4c
+56
+4c
+32
+37
+37
+00
+2e
+4c
+56
+4c
+32
+37
+38
+00
+2e
+4c
+56
+4c
+32
+37
+39
+00
+2e
+4c
+56
+4c
+32
+38
+30
+00
+2e
+4c
+56
+4c
+32
+38
+31
+00
+2e
+4c
+56
+4c
+32
+38
+32
+00
+2e
+4c
+56
+4c
+32
+38
+33
+00
+2e
+4c
+56
+4c
+32
+38
+34
+00
+2e
+4c
+56
+4c
+32
+38
+35
+00
+2e
+4c
+56
+4c
+32
+38
+36
+00
+2e
+4c
+56
+4c
+32
+38
+37
+00
+2e
+4c
+56
+4c
+32
+38
+38
+00
+2e
+4c
+56
+4c
+32
+38
+39
+00
+2e
+4c
+56
+4c
+32
+39
+30
+00
+2e
+4c
+56
+4c
+32
+39
+31
+00
+2e
+4c
+56
+4c
+32
+39
+32
+00
+2e
+4c
+32
+35
+35
+00
+2e
+4c
+32
+35
+37
+00
+2e
+4c
+56
+4c
+32
+39
+33
+00
+2e
+4c
+46
+45
+34
+34
+00
+2e
+4c
+46
+42
+34
+36
+00
+2e
+4c
+56
+4c
+32
+39
+34
+00
+2e
+4c
+43
+46
+49
+35
+34
+00
+2e
+4c
+43
+46
+49
+35
+35
+00
+2e
+4c
+43
+46
+49
+35
+36
+00
+2e
+4c
+43
+46
+49
+35
+37
+00
+2e
+4c
+43
+46
+49
+35
+38
+00
+2e
+4c
+43
+46
+49
+35
+39
+00
+2e
+4c
+56
+4c
+32
+39
+35
+00
+2e
+4c
+56
+4c
+32
+39
+36
+00
+2e
+4c
+32
+37
+30
+00
+2e
+4c
+56
+4c
+32
+39
+37
+00
+2e
+4c
+32
+39
+30
+00
+2e
+4c
+32
+37
+32
+00
+2e
+4c
+56
+4c
+32
+39
+38
+00
+2e
+4c
+32
+39
+31
+00
+2e
+4c
+56
+4c
+32
+39
+39
+00
+2e
+4c
+32
+37
+37
+00
+2e
+4c
+56
+4c
+33
+30
+30
+00
+2e
+4c
+32
+38
+31
+00
+2e
+4c
+56
+4c
+33
+30
+31
+00
+2e
+4c
+32
+39
+32
+00
+2e
+4c
+56
+4c
+33
+30
+32
+00
+2e
+4c
+32
+38
+34
+00
+2e
+4c
+56
+4c
+33
+30
+33
+00
+2e
+4c
+32
+37
+34
+00
+2e
+4c
+56
+4c
+33
+30
+34
+00
+2e
+4c
+56
+4c
+33
+30
+35
+00
+2e
+4c
+56
+4c
+33
+30
+36
+00
+2e
+4c
+56
+4c
+33
+30
+37
+00
+2e
+4c
+56
+4c
+33
+30
+38
+00
+2e
+4c
+56
+4c
+33
+30
+39
+00
+2e
+4c
+56
+4c
+33
+31
+30
+00
+2e
+4c
+56
+4c
+33
+31
+31
+00
+2e
+4c
+32
+39
+33
+00
+2e
+4c
+56
+4c
+33
+31
+32
+00
+2e
+4c
+56
+4c
+33
+31
+33
+00
+2e
+4c
+56
+4c
+33
+31
+34
+00
+2e
+4c
+32
+38
+35
+00
+2e
+4c
+56
+4c
+33
+31
+35
+00
+2e
+4c
+56
+4c
+33
+31
+36
+00
+2e
+4c
+56
+4c
+33
+31
+37
+00
+2e
+4c
+46
+45
+34
+36
+00
+2e
+4c
+46
+42
+34
+37
+00
+2e
+4c
+56
+4c
+33
+31
+38
+00
+2e
+4c
+43
+46
+49
+36
+30
+00
+2e
+4c
+43
+46
+49
+36
+31
+00
+2e
+4c
+43
+46
+49
+36
+32
+00
+2e
+4c
+43
+46
+49
+36
+33
+00
+2e
+4c
+56
+4c
+33
+31
+39
+00
+2e
+4c
+56
+4c
+33
+32
+30
+00
+2e
+4c
+32
+39
+35
+00
+2e
+4c
+56
+4c
+33
+32
+31
+00
+2e
+4c
+32
+39
+39
+00
+2e
+4c
+32
+39
+37
+00
+2e
+4c
+56
+4c
+33
+32
+32
+00
+2e
+4c
+33
+30
+32
+00
+2e
+4c
+56
+4c
+33
+32
+33
+00
+2e
+4c
+33
+30
+38
+00
+2e
+4c
+33
+30
+34
+00
+2e
+4c
+33
+30
+37
+00
+2e
+4c
+56
+4c
+33
+32
+34
+00
+2e
+4c
+56
+4c
+33
+32
+35
+00
+2e
+4c
+56
+4c
+33
+32
+36
+00
+2e
+4c
+56
+4c
+33
+32
+37
+00
+2e
+4c
+56
+4c
+33
+32
+38
+00
+2e
+4c
+56
+4c
+33
+32
+39
+00
+2e
+4c
+56
+4c
+33
+33
+30
+00
+2e
+4c
+46
+45
+34
+37
+00
+2e
+4c
+43
+33
+33
+00
+2e
+4c
+43
+33
+34
+00
+2e
+4c
+46
+42
+34
+38
+00
+2e
+4c
+56
+4c
+33
+33
+31
+00
+2e
+4c
+43
+46
+49
+36
+34
+00
+2e
+4c
+43
+46
+49
+36
+35
+00
+2e
+4c
+43
+46
+49
+36
+36
+00
+2e
+4c
+43
+46
+49
+36
+37
+00
+2e
+4c
+56
+4c
+33
+33
+32
+00
+2e
+4c
+33
+31
+31
+00
+2e
+4c
+56
+4c
+33
+33
+33
+00
+2e
+4c
+33
+31
+35
+00
+2e
+4c
+56
+4c
+33
+33
+34
+00
+2e
+4c
+56
+4c
+33
+33
+35
+00
+2e
+4c
+56
+4c
+33
+33
+36
+00
+2e
+4c
+56
+4c
+33
+33
+37
+00
+2e
+4c
+56
+4c
+33
+33
+38
+00
+2e
+4c
+56
+4c
+33
+33
+39
+00
+2e
+4c
+56
+4c
+33
+34
+30
+00
+2e
+4c
+56
+4c
+33
+34
+31
+00
+2e
+4c
+56
+4c
+33
+34
+32
+00
+2e
+4c
+56
+4c
+33
+34
+33
+00
+2e
+4c
+56
+4c
+33
+34
+34
+00
+2e
+4c
+56
+4c
+33
+34
+35
+00
+2e
+4c
+56
+4c
+33
+34
+36
+00
+2e
+4c
+56
+4c
+33
+34
+37
+00
+2e
+4c
+56
+4c
+33
+34
+38
+00
+2e
+4c
+46
+45
+34
+38
+00
+2e
+4c
+43
+33
+35
+00
+2e
+4c
+43
+33
+36
+00
+2e
+4c
+43
+33
+37
+00
+2e
+4c
+43
+33
+38
+00
+2e
+4c
+43
+33
+39
+00
+2e
+4c
+43
+34
+30
+00
+2e
+4c
+43
+34
+31
+00
+2e
+4c
+43
+34
+32
+00
+2e
+4c
+43
+34
+33
+00
+2e
+4c
+46
+42
+35
+30
+00
+2e
+4c
+56
+4c
+33
+34
+39
+00
+2e
+4c
+43
+46
+49
+36
+38
+00
+2e
+4c
+56
+4c
+33
+35
+30
+00
+2e
+4c
+43
+46
+49
+36
+39
+00
+2e
+4c
+56
+4c
+33
+35
+31
+00
+2e
+4c
+43
+46
+49
+37
+30
+00
+2e
+4c
+56
+4c
+33
+35
+32
+00
+2e
+4c
+43
+46
+49
+37
+31
+00
+2e
+4c
+56
+4c
+33
+35
+33
+00
+2e
+4c
+43
+46
+49
+37
+32
+00
+2e
+4c
+56
+4c
+33
+35
+34
+00
+2e
+4c
+43
+46
+49
+37
+33
+00
+2e
+4c
+56
+4c
+33
+35
+35
+00
+2e
+4c
+43
+46
+49
+37
+34
+00
+2e
+4c
+56
+4c
+33
+35
+36
+00
+2e
+4c
+33
+36
+36
+00
+2e
+4c
+56
+4c
+33
+35
+37
+00
+2e
+4c
+56
+4c
+33
+35
+38
+00
+2e
+4c
+56
+4c
+33
+35
+39
+00
+2e
+4c
+56
+4c
+33
+36
+30
+00
+2e
+4c
+56
+4c
+33
+36
+31
+00
+2e
+4c
+56
+4c
+33
+36
+32
+00
+2e
+4c
+56
+4c
+33
+36
+33
+00
+2e
+4c
+56
+4c
+33
+36
+34
+00
+2e
+4c
+56
+4c
+33
+36
+35
+00
+66
+61
+69
+6c
+65
+64
+00
+2e
+4c
+56
+4c
+33
+36
+36
+00
+2e
+4c
+33
+32
+30
+00
+2e
+4c
+56
+4c
+33
+36
+37
+00
+2e
+4c
+33
+37
+30
+00
+2e
+4c
+42
+42
+37
+00
+2e
+4c
+42
+42
+38
+00
+2e
+4c
+42
+42
+39
+00
+2e
+4c
+56
+4c
+33
+36
+38
+00
+2e
+4c
+33
+36
+35
+00
+66
+61
+69
+6c
+6d
+73
+67
+00
+2e
+4c
+56
+4c
+33
+36
+39
+00
+2e
+4c
+33
+33
+31
+00
+2e
+4c
+42
+45
+39
+00
+2e
+4c
+42
+45
+38
+00
+2e
+4c
+33
+36
+37
+00
+2e
+4c
+42
+45
+37
+00
+2e
+4c
+42
+42
+31
+30
+00
+2e
+4c
+42
+45
+31
+30
+00
+2e
+4c
+33
+36
+38
+00
+2e
+4c
+42
+42
+31
+31
+00
+2e
+4c
+42
+42
+31
+32
+00
+2e
+4c
+42
+42
+31
+33
+00
+2e
+4c
+56
+4c
+33
+37
+30
+00
+2e
+4c
+33
+36
+39
+00
+2e
+4c
+33
+32
+31
+00
+2e
+4c
+56
+4c
+33
+37
+31
+00
+2e
+4c
+56
+4c
+33
+37
+32
+00
+2e
+4c
+56
+4c
+33
+37
+33
+00
+2e
+4c
+33
+33
+32
+00
+2e
+4c
+56
+4c
+33
+37
+34
+00
+2e
+4c
+56
+4c
+33
+37
+35
+00
+2e
+4c
+56
+4c
+33
+37
+36
+00
+2e
+4c
+33
+33
+34
+00
+2e
+4c
+56
+4c
+33
+37
+37
+00
+2e
+4c
+56
+4c
+33
+37
+38
+00
+2e
+4c
+42
+45
+31
+33
+00
+2e
+4c
+42
+45
+31
+32
+00
+2e
+4c
+42
+45
+31
+31
+00
+2e
+4c
+42
+42
+31
+34
+00
+2e
+4c
+42
+45
+31
+34
+00
+2e
+4c
+42
+42
+31
+35
+00
+2e
+4c
+42
+45
+31
+35
+00
+2e
+4c
+56
+4c
+33
+37
+39
+00
+2e
+4c
+56
+4c
+33
+38
+30
+00
+2e
+4c
+56
+4c
+33
+38
+31
+00
+2e
+4c
+56
+4c
+33
+38
+32
+00
+2e
+4c
+56
+4c
+33
+38
+33
+00
+2e
+4c
+56
+4c
+33
+38
+34
+00
+2e
+4c
+56
+4c
+33
+38
+35
+00
+2e
+4c
+56
+4c
+33
+38
+36
+00
+2e
+4c
+56
+4c
+33
+38
+37
+00
+2e
+4c
+42
+42
+31
+36
+00
+2e
+4c
+42
+42
+31
+37
+00
+2e
+4c
+42
+42
+31
+38
+00
+2e
+4c
+33
+34
+36
+00
+2e
+4c
+56
+4c
+33
+38
+38
+00
+2e
+4c
+56
+4c
+33
+38
+39
+00
+2e
+4c
+33
+34
+32
+00
+2e
+4c
+56
+4c
+33
+39
+30
+00
+2e
+4c
+56
+4c
+33
+39
+31
+00
+2e
+4c
+56
+4c
+33
+39
+32
+00
+2e
+4c
+56
+4c
+33
+39
+33
+00
+2e
+4c
+56
+4c
+33
+39
+34
+00
+2e
+4c
+56
+4c
+33
+39
+35
+00
+2e
+4c
+42
+45
+31
+38
+00
+2e
+4c
+42
+45
+31
+37
+00
+2e
+4c
+42
+45
+31
+36
+00
+2e
+4c
+46
+45
+35
+30
+00
+2e
+4c
+66
+72
+61
+6d
+65
+30
+00
+2e
+4c
+45
+43
+49
+45
+30
+00
+2e
+4c
+53
+43
+49
+45
+30
+00
+2e
+4c
+53
+46
+44
+45
+30
+00
+2e
+4c
+45
+46
+44
+45
+30
+00
+2e
+4c
+41
+53
+46
+44
+45
+30
+00
+2e
+4c
+53
+46
+44
+45
+32
+00
+2e
+4c
+45
+46
+44
+45
+32
+00
+2e
+4c
+41
+53
+46
+44
+45
+32
+00
+2e
+4c
+53
+46
+44
+45
+34
+00
+2e
+4c
+45
+46
+44
+45
+34
+00
+2e
+4c
+41
+53
+46
+44
+45
+34
+00
+2e
+4c
+53
+46
+44
+45
+36
+00
+2e
+4c
+45
+46
+44
+45
+36
+00
+2e
+4c
+41
+53
+46
+44
+45
+36
+00
+2e
+4c
+53
+46
+44
+45
+38
+00
+2e
+4c
+45
+46
+44
+45
+38
+00
+2e
+4c
+41
+53
+46
+44
+45
+38
+00
+2e
+4c
+53
+46
+44
+45
+31
+30
+00
+2e
+4c
+45
+46
+44
+45
+31
+30
+00
+2e
+4c
+41
+53
+46
+44
+45
+31
+30
+00
+2e
+4c
+53
+46
+44
+45
+31
+32
+00
+2e
+4c
+45
+46
+44
+45
+31
+32
+00
+2e
+4c
+41
+53
+46
+44
+45
+31
+32
+00
+2e
+4c
+53
+46
+44
+45
+31
+34
+00
+2e
+4c
+45
+46
+44
+45
+31
+34
+00
+2e
+4c
+41
+53
+46
+44
+45
+31
+34
+00
+2e
+4c
+53
+46
+44
+45
+31
+36
+00
+2e
+4c
+45
+46
+44
+45
+31
+36
+00
+2e
+4c
+41
+53
+46
+44
+45
+31
+36
+00
+2e
+4c
+53
+46
+44
+45
+31
+38
+00
+2e
+4c
+45
+46
+44
+45
+31
+38
+00
+2e
+4c
+41
+53
+46
+44
+45
+31
+38
+00
+2e
+4c
+53
+46
+44
+45
+32
+30
+00
+2e
+4c
+45
+46
+44
+45
+32
+30
+00
+2e
+4c
+41
+53
+46
+44
+45
+32
+30
+00
+2e
+4c
+53
+46
+44
+45
+32
+32
+00
+2e
+4c
+45
+46
+44
+45
+32
+32
+00
+2e
+4c
+41
+53
+46
+44
+45
+32
+32
+00
+2e
+4c
+53
+46
+44
+45
+32
+34
+00
+2e
+4c
+45
+46
+44
+45
+32
+34
+00
+2e
+4c
+41
+53
+46
+44
+45
+32
+34
+00
+2e
+4c
+53
+46
+44
+45
+32
+36
+00
+2e
+4c
+45
+46
+44
+45
+32
+36
+00
+2e
+4c
+41
+53
+46
+44
+45
+32
+36
+00
+2e
+4c
+53
+46
+44
+45
+32
+38
+00
+2e
+4c
+45
+46
+44
+45
+32
+38
+00
+2e
+4c
+41
+53
+46
+44
+45
+32
+38
+00
+2e
+4c
+53
+46
+44
+45
+33
+30
+00
+2e
+4c
+45
+46
+44
+45
+33
+30
+00
+2e
+4c
+41
+53
+46
+44
+45
+33
+30
+00
+2e
+4c
+53
+46
+44
+45
+33
+32
+00
+2e
+4c
+45
+46
+44
+45
+33
+32
+00
+2e
+4c
+41
+53
+46
+44
+45
+33
+32
+00
+2e
+4c
+53
+46
+44
+45
+33
+34
+00
+2e
+4c
+45
+46
+44
+45
+33
+34
+00
+2e
+4c
+41
+53
+46
+44
+45
+33
+34
+00
+2e
+4c
+53
+46
+44
+45
+33
+36
+00
+2e
+4c
+45
+46
+44
+45
+33
+36
+00
+2e
+4c
+41
+53
+46
+44
+45
+33
+36
+00
+2e
+4c
+53
+46
+44
+45
+33
+38
+00
+2e
+4c
+45
+46
+44
+45
+33
+38
+00
+2e
+4c
+41
+53
+46
+44
+45
+33
+38
+00
+2e
+4c
+53
+46
+44
+45
+34
+30
+00
+2e
+4c
+45
+46
+44
+45
+34
+30
+00
+2e
+4c
+41
+53
+46
+44
+45
+34
+30
+00
+2e
+4c
+53
+46
+44
+45
+34
+32
+00
+2e
+4c
+45
+46
+44
+45
+34
+32
+00
+2e
+4c
+41
+53
+46
+44
+45
+34
+32
+00
+2e
+4c
+53
+46
+44
+45
+34
+34
+00
+2e
+4c
+45
+46
+44
+45
+34
+34
+00
+2e
+4c
+41
+53
+46
+44
+45
+34
+34
+00
+2e
+4c
+53
+46
+44
+45
+34
+36
+00
+2e
+4c
+45
+46
+44
+45
+34
+36
+00
+2e
+4c
+41
+53
+46
+44
+45
+34
+36
+00
+2e
+4c
+53
+46
+44
+45
+34
+38
+00
+2e
+4c
+45
+46
+44
+45
+34
+38
+00
+2e
+4c
+41
+53
+46
+44
+45
+34
+38
+00
+2e
+4c
+66
+72
+61
+6d
+65
+31
+00
+2e
+4c
+45
+43
+49
+45
+31
+00
+2e
+4c
+53
+43
+49
+45
+31
+00
+2e
+4c
+53
+46
+44
+45
+31
+00
+2e
+4c
+45
+46
+44
+45
+31
+00
+2e
+4c
+41
+53
+46
+44
+45
+31
+00
+2e
+4c
+53
+46
+44
+45
+33
+00
+2e
+4c
+45
+46
+44
+45
+33
+00
+2e
+4c
+41
+53
+46
+44
+45
+33
+00
+2e
+4c
+53
+46
+44
+45
+35
+00
+2e
+4c
+45
+46
+44
+45
+35
+00
+2e
+4c
+41
+53
+46
+44
+45
+35
+00
+2e
+4c
+53
+46
+44
+45
+37
+00
+2e
+4c
+45
+46
+44
+45
+37
+00
+2e
+4c
+41
+53
+46
+44
+45
+37
+00
+2e
+4c
+53
+46
+44
+45
+39
+00
+2e
+4c
+45
+46
+44
+45
+39
+00
+2e
+4c
+41
+53
+46
+44
+45
+39
+00
+2e
+4c
+53
+46
+44
+45
+31
+31
+00
+2e
+4c
+45
+46
+44
+45
+31
+31
+00
+2e
+4c
+41
+53
+46
+44
+45
+31
+31
+00
+2e
+4c
+53
+46
+44
+45
+31
+33
+00
+2e
+4c
+45
+46
+44
+45
+31
+33
+00
+2e
+4c
+41
+53
+46
+44
+45
+31
+33
+00
+2e
+4c
+53
+46
+44
+45
+31
+35
+00
+2e
+4c
+45
+46
+44
+45
+31
+35
+00
+2e
+4c
+41
+53
+46
+44
+45
+31
+35
+00
+2e
+4c
+53
+46
+44
+45
+31
+37
+00
+2e
+4c
+45
+46
+44
+45
+31
+37
+00
+2e
+4c
+41
+53
+46
+44
+45
+31
+37
+00
+2e
+4c
+53
+46
+44
+45
+31
+39
+00
+2e
+4c
+45
+46
+44
+45
+31
+39
+00
+2e
+4c
+41
+53
+46
+44
+45
+31
+39
+00
+2e
+4c
+53
+46
+44
+45
+32
+31
+00
+2e
+4c
+45
+46
+44
+45
+32
+31
+00
+2e
+4c
+41
+53
+46
+44
+45
+32
+31
+00
+2e
+4c
+53
+46
+44
+45
+32
+33
+00
+2e
+4c
+45
+46
+44
+45
+32
+33
+00
+2e
+4c
+41
+53
+46
+44
+45
+32
+33
+00
+2e
+4c
+53
+46
+44
+45
+32
+35
+00
+2e
+4c
+45
+46
+44
+45
+32
+35
+00
+2e
+4c
+41
+53
+46
+44
+45
+32
+35
+00
+2e
+4c
+53
+46
+44
+45
+32
+37
+00
+2e
+4c
+45
+46
+44
+45
+32
+37
+00
+2e
+4c
+41
+53
+46
+44
+45
+32
+37
+00
+2e
+4c
+53
+46
+44
+45
+32
+39
+00
+2e
+4c
+45
+46
+44
+45
+32
+39
+00
+2e
+4c
+41
+53
+46
+44
+45
+32
+39
+00
+2e
+4c
+53
+46
+44
+45
+33
+31
+00
+2e
+4c
+45
+46
+44
+45
+33
+31
+00
+2e
+4c
+41
+53
+46
+44
+45
+33
+31
+00
+2e
+4c
+53
+46
+44
+45
+33
+33
+00
+2e
+4c
+45
+46
+44
+45
+33
+33
+00
+2e
+4c
+41
+53
+46
+44
+45
+33
+33
+00
+2e
+4c
+53
+46
+44
+45
+33
+35
+00
+2e
+4c
+45
+46
+44
+45
+33
+35
+00
+2e
+4c
+41
+53
+46
+44
+45
+33
+35
+00
+2e
+4c
+53
+46
+44
+45
+33
+37
+00
+2e
+4c
+45
+46
+44
+45
+33
+37
+00
+2e
+4c
+41
+53
+46
+44
+45
+33
+37
+00
+2e
+4c
+53
+46
+44
+45
+33
+39
+00
+2e
+4c
+45
+46
+44
+45
+33
+39
+00
+2e
+4c
+41
+53
+46
+44
+45
+33
+39
+00
+2e
+4c
+53
+46
+44
+45
+34
+31
+00
+2e
+4c
+45
+46
+44
+45
+34
+31
+00
+2e
+4c
+41
+53
+46
+44
+45
+34
+31
+00
+2e
+4c
+53
+46
+44
+45
+34
+33
+00
+2e
+4c
+45
+46
+44
+45
+34
+33
+00
+2e
+4c
+41
+53
+46
+44
+45
+34
+33
+00
+2e
+4c
+53
+46
+44
+45
+34
+35
+00
+2e
+4c
+45
+46
+44
+45
+34
+35
+00
+2e
+4c
+41
+53
+46
+44
+45
+34
+35
+00
+2e
+4c
+53
+46
+44
+45
+34
+37
+00
+2e
+4c
+45
+46
+44
+45
+34
+37
+00
+2e
+4c
+41
+53
+46
+44
+45
+34
+37
+00
+2e
+4c
+53
+46
+44
+45
+34
+39
+00
+2e
+4c
+45
+46
+44
+45
+34
+39
+00
+2e
+4c
+41
+53
+46
+44
+45
+34
+39
+00
+2e
+4c
+65
+74
+65
+78
+74
+30
+00
+2e
+4c
+64
+65
+62
+75
+67
+5f
+6c
+6f
+63
+30
+00
+2e
+4c
+4c
+53
+54
+30
+00
+2e
+4c
+4c
+53
+54
+31
+00
+2e
+4c
+4c
+53
+54
+32
+00
+2e
+4c
+4c
+53
+54
+33
+00
+2e
+4c
+4c
+53
+54
+34
+00
+2e
+4c
+4c
+53
+54
+35
+00
+2e
+4c
+4c
+53
+54
+36
+00
+2e
+4c
+4c
+53
+54
+37
+00
+2e
+4c
+4c
+53
+54
+38
+00
+2e
+4c
+4c
+53
+54
+39
+00
+2e
+4c
+4c
+53
+54
+31
+30
+00
+2e
+4c
+4c
+53
+54
+31
+31
+00
+2e
+4c
+4c
+53
+54
+31
+32
+00
+2e
+4c
+4c
+53
+54
+31
+33
+00
+2e
+4c
+4c
+53
+54
+31
+34
+00
+2e
+4c
+4c
+53
+54
+31
+35
+00
+2e
+4c
+4c
+53
+54
+31
+36
+00
+2e
+4c
+4c
+53
+54
+31
+37
+00
+2e
+4c
+4c
+53
+54
+31
+38
+00
+2e
+4c
+4c
+53
+54
+31
+39
+00
+2e
+4c
+4c
+53
+54
+32
+30
+00
+2e
+4c
+4c
+53
+54
+32
+31
+00
+2e
+4c
+4c
+53
+54
+32
+32
+00
+2e
+4c
+4c
+53
+54
+32
+33
+00
+2e
+4c
+4c
+53
+54
+32
+34
+00
+2e
+4c
+4c
+53
+54
+32
+35
+00
+2e
+4c
+4c
+53
+54
+32
+36
+00
+2e
+4c
+4c
+53
+54
+32
+37
+00
+2e
+4c
+4c
+53
+54
+32
+38
+00
+2e
+4c
+4c
+53
+54
+32
+39
+00
+2e
+4c
+4c
+53
+54
+33
+30
+00
+2e
+4c
+4c
+53
+54
+33
+31
+00
+2e
+4c
+4c
+53
+54
+33
+32
+00
+2e
+4c
+4c
+53
+54
+33
+33
+00
+2e
+4c
+4c
+53
+54
+33
+34
+00
+2e
+4c
+4c
+53
+54
+33
+35
+00
+2e
+4c
+4c
+53
+54
+33
+36
+00
+2e
+4c
+4c
+53
+54
+33
+37
+00
+2e
+4c
+4c
+53
+54
+33
+38
+00
+2e
+4c
+4c
+53
+54
+33
+39
+00
+2e
+4c
+4c
+53
+54
+34
+30
+00
+2e
+4c
+4c
+53
+54
+34
+31
+00
+2e
+4c
+4c
+53
+54
+34
+32
+00
+2e
+4c
+4c
+53
+54
+34
+33
+00
+2e
+4c
+4c
+53
+54
+34
+34
+00
+2e
+4c
+4c
+53
+54
+34
+35
+00
+2e
+4c
+4c
+53
+54
+34
+36
+00
+2e
+4c
+4c
+53
+54
+34
+37
+00
+2e
+4c
+4c
+53
+54
+34
+38
+00
+2e
+4c
+4c
+53
+54
+34
+39
+00
+2e
+4c
+4c
+53
+54
+35
+30
+00
+2e
+4c
+4c
+53
+54
+35
+31
+00
+2e
+4c
+4c
+53
+54
+35
+32
+00
+2e
+4c
+4c
+53
+54
+35
+33
+00
+2e
+4c
+4c
+53
+54
+35
+34
+00
+2e
+4c
+4c
+53
+54
+35
+35
+00
+2e
+4c
+4c
+53
+54
+35
+36
+00
+2e
+4c
+4c
+53
+54
+35
+37
+00
+2e
+4c
+4c
+53
+54
+35
+38
+00
+2e
+4c
+4c
+53
+54
+35
+39
+00
+2e
+4c
+4c
+53
+54
+36
+30
+00
+2e
+4c
+4c
+53
+54
+36
+31
+00
+2e
+4c
+4c
+53
+54
+36
+32
+00
+2e
+4c
+4c
+53
+54
+36
+33
+00
+2e
+4c
+4c
+53
+54
+36
+34
+00
+2e
+4c
+4c
+53
+54
+36
+35
+00
+2e
+4c
+4c
+53
+54
+36
+36
+00
+2e
+4c
+4c
+53
+54
+36
+37
+00
+2e
+4c
+4c
+53
+54
+36
+38
+00
+2e
+4c
+4c
+53
+54
+36
+39
+00
+2e
+4c
+4c
+53
+54
+37
+30
+00
+2e
+4c
+4c
+53
+54
+37
+31
+00
+2e
+4c
+4c
+53
+54
+37
+32
+00
+2e
+4c
+4c
+53
+54
+37
+33
+00
+2e
+4c
+4c
+53
+54
+37
+34
+00
+2e
+4c
+4c
+53
+54
+37
+35
+00
+2e
+4c
+4c
+53
+54
+37
+36
+00
+2e
+4c
+4c
+53
+54
+37
+37
+00
+2e
+4c
+4c
+53
+54
+37
+38
+00
+2e
+4c
+4c
+53
+54
+37
+39
+00
+2e
+4c
+4c
+53
+54
+38
+30
+00
+2e
+4c
+4c
+53
+54
+38
+31
+00
+2e
+4c
+4c
+53
+54
+38
+32
+00
+2e
+4c
+4c
+53
+54
+38
+33
+00
+2e
+4c
+4c
+53
+54
+38
+34
+00
+2e
+4c
+4c
+53
+54
+38
+35
+00
+2e
+4c
+4c
+53
+54
+38
+36
+00
+2e
+4c
+4c
+53
+54
+38
+37
+00
+2e
+4c
+41
+53
+46
+31
+34
+38
+00
+2e
+4c
+41
+53
+46
+31
+34
+39
+00
+2e
+4c
+41
+53
+46
+31
+35
+30
+00
+2e
+4c
+41
+53
+46
+37
+00
+2e
+4c
+41
+53
+46
+30
+00
+2e
+4c
+41
+53
+46
+31
+00
+2e
+4c
+41
+53
+46
+32
+00
+2e
+4c
+41
+53
+46
+33
+00
+2e
+4c
+41
+53
+46
+34
+00
+2e
+4c
+41
+53
+46
+35
+00
+2e
+4c
+41
+53
+46
+36
+00
+2e
+4c
+41
+53
+46
+38
+00
+2e
+4c
+41
+53
+46
+39
+00
+2e
+4c
+41
+53
+46
+31
+30
+00
+2e
+4c
+41
+53
+46
+31
+31
+00
+2e
+4c
+41
+53
+46
+33
+39
+00
+2e
+4c
+41
+53
+46
+31
+32
+00
+2e
+4c
+41
+53
+46
+31
+33
+00
+2e
+4c
+41
+53
+46
+31
+34
+00
+2e
+4c
+41
+53
+46
+31
+35
+00
+2e
+4c
+41
+53
+46
+31
+36
+00
+2e
+4c
+41
+53
+46
+31
+37
+00
+2e
+4c
+41
+53
+46
+31
+38
+00
+2e
+4c
+41
+53
+46
+31
+39
+00
+2e
+4c
+41
+53
+46
+32
+30
+00
+2e
+4c
+41
+53
+46
+32
+31
+00
+2e
+4c
+41
+53
+46
+32
+32
+00
+2e
+4c
+41
+53
+46
+32
+33
+00
+2e
+4c
+41
+53
+46
+32
+34
+00
+2e
+4c
+41
+53
+46
+32
+35
+00
+2e
+4c
+41
+53
+46
+32
+36
+00
+2e
+4c
+41
+53
+46
+32
+37
+00
+2e
+4c
+41
+53
+46
+32
+38
+00
+2e
+4c
+41
+53
+46
+32
+39
+00
+2e
+4c
+41
+53
+46
+33
+30
+00
+2e
+4c
+41
+53
+46
+33
+31
+00
+2e
+4c
+41
+53
+46
+33
+32
+00
+2e
+4c
+41
+53
+46
+33
+33
+00
+2e
+4c
+41
+53
+46
+33
+34
+00
+2e
+4c
+41
+53
+46
+33
+35
+00
+2e
+4c
+41
+53
+46
+33
+36
+00
+2e
+4c
+41
+53
+46
+33
+37
+00
+2e
+4c
+41
+53
+46
+33
+38
+00
+2e
+4c
+41
+53
+46
+34
+30
+00
+2e
+4c
+41
+53
+46
+34
+31
+00
+2e
+4c
+41
+53
+46
+34
+32
+00
+2e
+4c
+41
+53
+46
+34
+33
+00
+2e
+4c
+41
+53
+46
+34
+34
+00
+2e
+4c
+41
+53
+46
+34
+35
+00
+2e
+4c
+41
+53
+46
+34
+36
+00
+2e
+4c
+41
+53
+46
+34
+37
+00
+2e
+4c
+41
+53
+46
+34
+38
+00
+2e
+4c
+41
+53
+46
+34
+39
+00
+2e
+4c
+41
+53
+46
+35
+30
+00
+2e
+4c
+41
+53
+46
+35
+31
+00
+2e
+4c
+41
+53
+46
+35
+32
+00
+2e
+4c
+41
+53
+46
+35
+33
+00
+2e
+4c
+41
+53
+46
+35
+34
+00
+2e
+4c
+41
+53
+46
+35
+35
+00
+2e
+4c
+41
+53
+46
+35
+36
+00
+2e
+4c
+41
+53
+46
+35
+37
+00
+2e
+4c
+41
+53
+46
+35
+38
+00
+2e
+4c
+41
+53
+46
+35
+39
+00
+2e
+4c
+41
+53
+46
+36
+30
+00
+2e
+4c
+41
+53
+46
+36
+31
+00
+2e
+4c
+41
+53
+46
+36
+32
+00
+2e
+4c
+41
+53
+46
+36
+33
+00
+2e
+4c
+41
+53
+46
+36
+34
+00
+2e
+4c
+41
+53
+46
+36
+35
+00
+2e
+4c
+41
+53
+46
+36
+36
+00
+2e
+4c
+41
+53
+46
+36
+37
+00
+2e
+4c
+41
+53
+46
+36
+38
+00
+2e
+4c
+41
+53
+46
+36
+39
+00
+2e
+4c
+41
+53
+46
+37
+30
+00
+2e
+4c
+41
+53
+46
+37
+31
+00
+2e
+4c
+41
+53
+46
+37
+32
+00
+2e
+4c
+41
+53
+46
+37
+33
+00
+2e
+4c
+41
+53
+46
+37
+34
+00
+2e
+4c
+41
+53
+46
+37
+35
+00
+2e
+4c
+41
+53
+46
+37
+36
+00
+2e
+4c
+41
+53
+46
+37
+37
+00
+2e
+4c
+41
+53
+46
+37
+38
+00
+2e
+4c
+41
+53
+46
+37
+39
+00
+2e
+4c
+41
+53
+46
+38
+30
+00
+2e
+4c
+41
+53
+46
+38
+31
+00
+2e
+4c
+41
+53
+46
+38
+32
+00
+2e
+4c
+41
+53
+46
+38
+33
+00
+2e
+4c
+41
+53
+46
+38
+34
+00
+2e
+4c
+41
+53
+46
+38
+35
+00
+2e
+4c
+41
+53
+46
+38
+36
+00
+2e
+4c
+41
+53
+46
+38
+37
+00
+2e
+4c
+41
+53
+46
+38
+38
+00
+2e
+4c
+41
+53
+46
+38
+39
+00
+2e
+4c
+41
+53
+46
+39
+30
+00
+2e
+4c
+41
+53
+46
+39
+31
+00
+2e
+4c
+41
+53
+46
+39
+32
+00
+2e
+4c
+41
+53
+46
+39
+34
+00
+2e
+4c
+41
+53
+46
+39
+33
+00
+2e
+4c
+41
+53
+46
+39
+36
+00
+2e
+4c
+41
+53
+46
+39
+35
+00
+2e
+4c
+41
+53
+46
+39
+37
+00
+2e
+4c
+41
+53
+46
+39
+38
+00
+2e
+4c
+41
+53
+46
+39
+39
+00
+2e
+4c
+41
+53
+46
+31
+30
+30
+00
+2e
+4c
+41
+53
+46
+31
+30
+31
+00
+2e
+4c
+41
+53
+46
+31
+30
+32
+00
+2e
+4c
+41
+53
+46
+31
+30
+33
+00
+2e
+4c
+41
+53
+46
+31
+30
+34
+00
+2e
+4c
+41
+53
+46
+31
+30
+35
+00
+2e
+4c
+41
+53
+46
+31
+30
+36
+00
+2e
+4c
+41
+53
+46
+31
+30
+37
+00
+2e
+4c
+41
+53
+46
+31
+30
+38
+00
+2e
+4c
+41
+53
+46
+31
+30
+39
+00
+2e
+4c
+41
+53
+46
+31
+31
+30
+00
+2e
+4c
+41
+53
+46
+31
+31
+31
+00
+2e
+4c
+41
+53
+46
+31
+31
+32
+00
+2e
+4c
+41
+53
+46
+31
+31
+33
+00
+2e
+4c
+64
+65
+62
+75
+67
+5f
+72
+61
+6e
+67
+65
+73
+30
+00
+2e
+4c
+41
+53
+46
+31
+31
+34
+00
+2e
+4c
+41
+53
+46
+31
+31
+35
+00
+2e
+4c
+41
+53
+46
+31
+31
+36
+00
+2e
+4c
+41
+53
+46
+31
+31
+37
+00
+2e
+4c
+41
+53
+46
+31
+31
+38
+00
+2e
+4c
+41
+53
+46
+31
+31
+39
+00
+2e
+4c
+41
+53
+46
+31
+32
+30
+00
+2e
+4c
+41
+53
+46
+31
+32
+31
+00
+2e
+4c
+41
+53
+46
+31
+32
+32
+00
+2e
+4c
+41
+53
+46
+31
+32
+33
+00
+2e
+4c
+41
+53
+46
+31
+32
+34
+00
+2e
+4c
+41
+53
+46
+31
+32
+35
+00
+2e
+4c
+41
+53
+46
+31
+32
+36
+00
+2e
+4c
+41
+53
+46
+31
+32
+37
+00
+2e
+4c
+41
+53
+46
+31
+32
+38
+00
+2e
+4c
+41
+53
+46
+31
+32
+39
+00
+2e
+4c
+41
+53
+46
+31
+35
+31
+00
+2e
+4c
+41
+53
+46
+31
+33
+30
+00
+2e
+4c
+41
+53
+46
+31
+33
+31
+00
+2e
+4c
+41
+53
+46
+31
+33
+32
+00
+2e
+4c
+41
+53
+46
+31
+33
+33
+00
+2e
+4c
+41
+53
+46
+31
+33
+34
+00
+2e
+4c
+41
+53
+46
+31
+33
+35
+00
+2e
+4c
+41
+53
+46
+31
+33
+36
+00
+2e
+4c
+41
+53
+46
+31
+33
+37
+00
+2e
+4c
+41
+53
+46
+31
+33
+38
+00
+2e
+4c
+41
+53
+46
+31
+33
+39
+00
+2e
+4c
+41
+53
+46
+31
+34
+30
+00
+2e
+4c
+41
+53
+46
+31
+34
+31
+00
+2e
+4c
+41
+53
+46
+31
+34
+32
+00
+2e
+4c
+41
+53
+46
+31
+34
+33
+00
+2e
+4c
+41
+53
+46
+31
+34
+34
+00
+2e
+4c
+41
+53
+46
+31
+34
+35
+00
+2e
+4c
+41
+53
+46
+31
+34
+36
+00
+2e
+4c
+41
+53
+46
+31
+34
+37
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+04
+00
+f1
+ff
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+1e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+1d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+1c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+1a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+18
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0f
+28
+00
+00
+00
+00
+1d
+00
+e2
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+06
+28
+00
+00
+00
+00
+1d
+00
+a2
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fd
+27
+00
+00
+00
+00
+1d
+00
+da
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f4
+27
+00
+00
+00
+00
+1d
+00
+a1
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+eb
+27
+00
+00
+00
+00
+1d
+00
+59
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e2
+27
+00
+00
+00
+00
+1d
+00
+21
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d9
+27
+00
+00
+00
+00
+1d
+00
+0c
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d0
+27
+00
+00
+00
+00
+1d
+00
+49
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c7
+27
+00
+00
+00
+00
+1d
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+be
+27
+00
+00
+00
+00
+1d
+00
+23
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b5
+27
+00
+00
+00
+00
+1d
+00
+28
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ac
+27
+00
+00
+00
+00
+1d
+00
+ce
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a3
+27
+00
+00
+00
+00
+1d
+00
+1b
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9a
+27
+00
+00
+00
+00
+1d
+00
+54
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+91
+27
+00
+00
+00
+00
+1d
+00
+76
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+88
+27
+00
+00
+00
+00
+1d
+00
+c1
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7f
+27
+00
+00
+00
+00
+1d
+00
+9b
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+76
+27
+00
+00
+00
+00
+1d
+00
+1c
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6d
+27
+00
+00
+00
+00
+1d
+00
+98
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+64
+27
+00
+00
+00
+00
+1d
+00
+7b
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5b
+27
+00
+00
+00
+00
+1d
+00
+74
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+52
+27
+00
+00
+00
+00
+1d
+00
+95
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+49
+27
+00
+00
+00
+00
+1d
+00
+b5
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+27
+00
+00
+00
+00
+1d
+00
+78
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+37
+27
+00
+00
+00
+00
+1d
+00
+c3
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+27
+00
+00
+00
+00
+1d
+00
+c5
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+25
+27
+00
+00
+00
+00
+1d
+00
+cd
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1c
+27
+00
+00
+00
+00
+1d
+00
+e0
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+13
+27
+00
+00
+00
+00
+1d
+00
+7d
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0a
+27
+00
+00
+00
+00
+1d
+00
+90
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+27
+00
+00
+00
+00
+1d
+00
+7f
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f8
+26
+00
+00
+00
+00
+1d
+00
+35
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ef
+26
+00
+00
+00
+00
+1d
+00
+3f
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e6
+26
+00
+00
+00
+00
+1d
+00
+a8
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+dd
+26
+00
+00
+00
+00
+1d
+00
+3b
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+cd
+26
+00
+00
+00
+00
+1c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c4
+26
+00
+00
+00
+00
+1d
+00
+cd
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+bb
+26
+00
+00
+00
+00
+1d
+00
+1f
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b2
+26
+00
+00
+00
+00
+1d
+00
+73
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a9
+26
+00
+00
+00
+00
+1d
+00
+9f
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a0
+26
+00
+00
+00
+00
+1d
+00
+ed
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+97
+26
+00
+00
+00
+00
+1d
+00
+de
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8e
+26
+00
+00
+00
+00
+1d
+00
+b0
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+85
+26
+00
+00
+00
+00
+1d
+00
+da
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7c
+26
+00
+00
+00
+00
+1d
+00
+67
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+73
+26
+00
+00
+00
+00
+1d
+00
+07
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6a
+26
+00
+00
+00
+00
+1d
+00
+d4
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+61
+26
+00
+00
+00
+00
+1d
+00
+67
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+58
+26
+00
+00
+00
+00
+1d
+00
+08
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4f
+26
+00
+00
+00
+00
+1d
+00
+ad
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+47
+26
+00
+00
+00
+00
+1d
+00
+f9
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3f
+26
+00
+00
+00
+00
+1d
+00
+50
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+37
+26
+00
+00
+00
+00
+1d
+00
+32
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2f
+26
+00
+00
+00
+00
+1d
+00
+29
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+27
+26
+00
+00
+00
+00
+1d
+00
+68
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1f
+26
+00
+00
+00
+00
+1d
+00
+17
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+17
+26
+00
+00
+00
+00
+1d
+00
+84
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0f
+26
+00
+00
+00
+00
+1d
+00
+e0
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+07
+26
+00
+00
+00
+00
+1d
+00
+40
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ff
+25
+00
+00
+00
+00
+1d
+00
+f4
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f7
+25
+00
+00
+00
+00
+1d
+00
+0f
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ef
+25
+00
+00
+00
+00
+1d
+00
+aa
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e7
+25
+00
+00
+00
+00
+1d
+00
+65
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+df
+25
+00
+00
+00
+00
+1d
+00
+a6
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d7
+25
+00
+00
+00
+00
+1d
+00
+9f
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+cf
+25
+00
+00
+00
+00
+1d
+00
+ab
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c7
+25
+00
+00
+00
+00
+1d
+00
+6c
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+bf
+25
+00
+00
+00
+00
+1d
+00
+61
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b7
+25
+00
+00
+00
+00
+1d
+00
+61
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+af
+25
+00
+00
+00
+00
+1d
+00
+2d
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a7
+25
+00
+00
+00
+00
+1d
+00
+2f
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9f
+25
+00
+00
+00
+00
+1d
+00
+51
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+97
+25
+00
+00
+00
+00
+1d
+00
+52
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8f
+25
+00
+00
+00
+00
+1d
+00
+ff
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+87
+25
+00
+00
+00
+00
+1d
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7f
+25
+00
+00
+00
+00
+1d
+00
+59
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+77
+25
+00
+00
+00
+00
+1d
+00
+1b
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6f
+25
+00
+00
+00
+00
+1d
+00
+40
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+67
+25
+00
+00
+00
+00
+1d
+00
+fb
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5f
+25
+00
+00
+00
+00
+1d
+00
+b9
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+57
+25
+00
+00
+00
+00
+1d
+00
+66
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4f
+25
+00
+00
+00
+00
+1d
+00
+0b
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+47
+25
+00
+00
+00
+00
+1d
+00
+d5
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3f
+25
+00
+00
+00
+00
+1d
+00
+9b
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+37
+25
+00
+00
+00
+00
+1d
+00
+cb
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2f
+25
+00
+00
+00
+00
+1d
+00
+24
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+27
+25
+00
+00
+00
+00
+1d
+00
+d0
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1f
+25
+00
+00
+00
+00
+1d
+00
+57
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+17
+25
+00
+00
+00
+00
+1d
+00
+b3
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0f
+25
+00
+00
+00
+00
+1d
+00
+cc
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+07
+25
+00
+00
+00
+00
+1d
+00
+f9
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ff
+24
+00
+00
+00
+00
+1d
+00
+46
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f7
+24
+00
+00
+00
+00
+1d
+00
+f2
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ef
+24
+00
+00
+00
+00
+1d
+00
+40
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e7
+24
+00
+00
+00
+00
+1d
+00
+6d
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+df
+24
+00
+00
+00
+00
+1d
+00
+4e
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d7
+24
+00
+00
+00
+00
+1d
+00
+53
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+cf
+24
+00
+00
+00
+00
+1d
+00
+e7
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c7
+24
+00
+00
+00
+00
+1d
+00
+66
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+bf
+24
+00
+00
+00
+00
+1d
+00
+32
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b7
+24
+00
+00
+00
+00
+1d
+00
+8d
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+af
+24
+00
+00
+00
+00
+1d
+00
+13
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a7
+24
+00
+00
+00
+00
+1d
+00
+e9
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9f
+24
+00
+00
+00
+00
+1d
+00
+8c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+97
+24
+00
+00
+00
+00
+1d
+00
+e8
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8f
+24
+00
+00
+00
+00
+1d
+00
+69
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+87
+24
+00
+00
+00
+00
+1d
+00
+93
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7f
+24
+00
+00
+00
+00
+1d
+00
+c8
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+77
+24
+00
+00
+00
+00
+1d
+00
+da
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6f
+24
+00
+00
+00
+00
+1d
+00
+18
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+67
+24
+00
+00
+00
+00
+1d
+00
+4f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5f
+24
+00
+00
+00
+00
+1d
+00
+3d
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+57
+24
+00
+00
+00
+00
+1d
+00
+60
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4f
+24
+00
+00
+00
+00
+1d
+00
+86
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+47
+24
+00
+00
+00
+00
+1d
+00
+7f
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3f
+24
+00
+00
+00
+00
+1d
+00
+88
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+37
+24
+00
+00
+00
+00
+1d
+00
+ad
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2f
+24
+00
+00
+00
+00
+1d
+00
+1e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+27
+24
+00
+00
+00
+00
+1d
+00
+c1
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1f
+24
+00
+00
+00
+00
+1d
+00
+18
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+17
+24
+00
+00
+00
+00
+1d
+00
+b3
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0f
+24
+00
+00
+00
+00
+1d
+00
+e6
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+07
+24
+00
+00
+00
+00
+1d
+00
+97
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ff
+23
+00
+00
+00
+00
+1d
+00
+c6
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f7
+23
+00
+00
+00
+00
+1d
+00
+f7
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ef
+23
+00
+00
+00
+00
+1d
+00
+cd
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e7
+23
+00
+00
+00
+00
+1d
+00
+6f
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+df
+23
+00
+00
+00
+00
+1d
+00
+32
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d7
+23
+00
+00
+00
+00
+1d
+00
+5a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+cf
+23
+00
+00
+00
+00
+1d
+00
+46
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c7
+23
+00
+00
+00
+00
+1d
+00
+9e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+bf
+23
+00
+00
+00
+00
+1d
+00
+21
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b7
+23
+00
+00
+00
+00
+1d
+00
+23
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+af
+23
+00
+00
+00
+00
+1d
+00
+b5
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a7
+23
+00
+00
+00
+00
+1d
+00
+2e
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9f
+23
+00
+00
+00
+00
+1d
+00
+a8
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+97
+23
+00
+00
+00
+00
+1d
+00
+c6
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8f
+23
+00
+00
+00
+00
+1d
+00
+bf
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+87
+23
+00
+00
+00
+00
+1d
+00
+e1
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7f
+23
+00
+00
+00
+00
+1d
+00
+29
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+78
+23
+00
+00
+00
+00
+1d
+00
+33
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+71
+23
+00
+00
+00
+00
+1d
+00
+59
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6a
+23
+00
+00
+00
+00
+1d
+00
+11
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+63
+23
+00
+00
+00
+00
+1d
+00
+80
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5c
+23
+00
+00
+00
+00
+1d
+00
+ac
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+55
+23
+00
+00
+00
+00
+1d
+00
+8c
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4e
+23
+00
+00
+00
+00
+1d
+00
+01
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+47
+23
+00
+00
+00
+00
+1d
+00
+5f
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+23
+00
+00
+00
+00
+1d
+00
+8d
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+39
+23
+00
+00
+00
+00
+1d
+00
+9f
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+30
+23
+00
+00
+00
+00
+1d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+27
+23
+00
+00
+00
+00
+1d
+00
+34
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1e
+23
+00
+00
+00
+00
+1d
+00
+ee
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+16
+23
+00
+00
+00
+00
+17
+00
+e8
+25
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0e
+23
+00
+00
+00
+00
+17
+00
+1a
+25
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+06
+23
+00
+00
+00
+00
+17
+00
+e4
+24
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fe
+22
+00
+00
+00
+00
+17
+00
+ae
+24
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f6
+22
+00
+00
+00
+00
+17
+00
+52
+24
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ee
+22
+00
+00
+00
+00
+17
+00
+1c
+24
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e6
+22
+00
+00
+00
+00
+17
+00
+17
+22
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+de
+22
+00
+00
+00
+00
+17
+00
+e1
+21
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d6
+22
+00
+00
+00
+00
+17
+00
+5f
+21
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ce
+22
+00
+00
+00
+00
+17
+00
+03
+21
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c6
+22
+00
+00
+00
+00
+17
+00
+67
+20
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+be
+22
+00
+00
+00
+00
+17
+00
+31
+20
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b6
+22
+00
+00
+00
+00
+17
+00
+d5
+1f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ae
+22
+00
+00
+00
+00
+17
+00
+79
+1f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a6
+22
+00
+00
+00
+00
+17
+00
+19
+1f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9e
+22
+00
+00
+00
+00
+17
+00
+d0
+1e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+96
+22
+00
+00
+00
+00
+17
+00
+9a
+1e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8e
+22
+00
+00
+00
+00
+17
+00
+64
+1e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+86
+22
+00
+00
+00
+00
+17
+00
+f5
+1d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7e
+22
+00
+00
+00
+00
+17
+00
+3a
+1d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+76
+22
+00
+00
+00
+00
+17
+00
+b8
+1c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6e
+22
+00
+00
+00
+00
+17
+00
+58
+1c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+66
+22
+00
+00
+00
+00
+17
+00
+22
+1c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5e
+22
+00
+00
+00
+00
+17
+00
+ec
+1b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+56
+22
+00
+00
+00
+00
+17
+00
+a3
+1b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4e
+22
+00
+00
+00
+00
+17
+00
+6d
+1b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+46
+22
+00
+00
+00
+00
+17
+00
+36
+1b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3e
+22
+00
+00
+00
+00
+17
+00
+b4
+1a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+36
+22
+00
+00
+00
+00
+17
+00
+55
+1a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+22
+00
+00
+00
+00
+17
+00
+0c
+1a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+26
+22
+00
+00
+00
+00
+17
+00
+d5
+19
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1e
+22
+00
+00
+00
+00
+17
+00
+66
+19
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+16
+22
+00
+00
+00
+00
+17
+00
+04
+19
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0e
+22
+00
+00
+00
+00
+17
+00
+95
+18
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+06
+22
+00
+00
+00
+00
+17
+00
+39
+18
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fe
+21
+00
+00
+00
+00
+17
+00
+dd
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f6
+21
+00
+00
+00
+00
+17
+00
+35
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ee
+21
+00
+00
+00
+00
+17
+00
+d9
+16
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e6
+21
+00
+00
+00
+00
+17
+00
+31
+16
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+de
+21
+00
+00
+00
+00
+17
+00
+d1
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d6
+21
+00
+00
+00
+00
+17
+00
+3c
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ce
+21
+00
+00
+00
+00
+17
+00
+78
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c6
+21
+00
+00
+00
+00
+17
+00
+42
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+be
+21
+00
+00
+00
+00
+17
+00
+a6
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b6
+21
+00
+00
+00
+00
+17
+00
+83
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ae
+21
+00
+00
+00
+00
+17
+00
+60
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a6
+21
+00
+00
+00
+00
+17
+00
+ec
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9e
+21
+00
+00
+00
+00
+17
+00
+90
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+96
+21
+00
+00
+00
+00
+17
+00
+1c
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8e
+21
+00
+00
+00
+00
+17
+00
+d3
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+86
+21
+00
+00
+00
+00
+17
+00
+8a
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7e
+21
+00
+00
+00
+00
+17
+00
+41
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+76
+21
+00
+00
+00
+00
+17
+00
+f8
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6e
+21
+00
+00
+00
+00
+17
+00
+d3
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+66
+21
+00
+00
+00
+00
+17
+00
+64
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5e
+21
+00
+00
+00
+00
+17
+00
+02
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+56
+21
+00
+00
+00
+00
+17
+00
+93
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4e
+21
+00
+00
+00
+00
+17
+00
+1f
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+46
+21
+00
+00
+00
+00
+17
+00
+d6
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3e
+21
+00
+00
+00
+00
+17
+00
+7a
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+36
+21
+00
+00
+00
+00
+17
+00
+de
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+21
+00
+00
+00
+00
+17
+00
+82
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+26
+21
+00
+00
+00
+00
+17
+00
+0e
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1e
+21
+00
+00
+00
+00
+17
+00
+d8
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+16
+21
+00
+00
+00
+00
+17
+00
+8c
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0e
+21
+00
+00
+00
+00
+17
+00
+1d
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+06
+21
+00
+00
+00
+00
+17
+00
+e7
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fe
+20
+00
+00
+00
+00
+17
+00
+8b
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f6
+20
+00
+00
+00
+00
+17
+00
+2f
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ee
+20
+00
+00
+00
+00
+17
+00
+cf
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e6
+20
+00
+00
+00
+00
+17
+00
+86
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+de
+20
+00
+00
+00
+00
+17
+00
+2a
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d6
+20
+00
+00
+00
+00
+17
+00
+ce
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ce
+20
+00
+00
+00
+00
+17
+00
+46
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c6
+20
+00
+00
+00
+00
+17
+00
+fd
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+be
+20
+00
+00
+00
+00
+17
+00
+a1
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b6
+20
+00
+00
+00
+00
+17
+00
+45
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ae
+20
+00
+00
+00
+00
+17
+00
+bd
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a7
+20
+00
+00
+00
+00
+17
+00
+74
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a0
+20
+00
+00
+00
+00
+17
+00
+18
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+99
+20
+00
+00
+00
+00
+17
+00
+bc
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+92
+20
+00
+00
+00
+00
+17
+00
+34
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8b
+20
+00
+00
+00
+00
+17
+00
+d8
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+84
+20
+00
+00
+00
+00
+17
+00
+7c
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7d
+20
+00
+00
+00
+00
+17
+00
+20
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+76
+20
+00
+00
+00
+00
+17
+00
+98
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6f
+20
+00
+00
+00
+00
+17
+00
+4c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+68
+20
+00
+00
+00
+00
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5b
+20
+00
+00
+00
+00
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+52
+20
+00
+00
+00
+00
+04
+00
+4f
+18
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+48
+20
+00
+00
+00
+00
+15
+00
+04
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3f
+20
+00
+00
+00
+00
+15
+00
+58
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+36
+20
+00
+00
+00
+00
+15
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2c
+20
+00
+00
+00
+00
+15
+00
+d4
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+23
+20
+00
+00
+00
+00
+15
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1a
+20
+00
+00
+00
+00
+15
+00
+d0
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+20
+00
+00
+00
+00
+15
+00
+a4
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+07
+20
+00
+00
+00
+00
+15
+00
+d0
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fe
+1f
+00
+00
+00
+00
+15
+00
+a0
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f4
+1f
+00
+00
+00
+00
+15
+00
+74
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+eb
+1f
+00
+00
+00
+00
+15
+00
+a0
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e2
+1f
+00
+00
+00
+00
+15
+00
+70
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d8
+1f
+00
+00
+00
+00
+15
+00
+3c
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+cf
+1f
+00
+00
+00
+00
+15
+00
+70
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c6
+1f
+00
+00
+00
+00
+15
+00
+38
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+bc
+1f
+00
+00
+00
+00
+15
+00
+04
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b3
+1f
+00
+00
+00
+00
+15
+00
+38
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+aa
+1f
+00
+00
+00
+00
+15
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a0
+1f
+00
+00
+00
+00
+15
+00
+dc
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+97
+1f
+00
+00
+00
+00
+15
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8e
+1f
+00
+00
+00
+00
+15
+00
+d8
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+84
+1f
+00
+00
+00
+00
+15
+00
+bc
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7b
+1f
+00
+00
+00
+00
+15
+00
+d8
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+72
+1f
+00
+00
+00
+00
+15
+00
+b8
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+68
+1f
+00
+00
+00
+00
+15
+00
+a4
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5f
+1f
+00
+00
+00
+00
+15
+00
+b8
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+56
+1f
+00
+00
+00
+00
+15
+00
+a0
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4c
+1f
+00
+00
+00
+00
+15
+00
+84
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+43
+1f
+00
+00
+00
+00
+15
+00
+a0
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3a
+1f
+00
+00
+00
+00
+15
+00
+80
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+30
+1f
+00
+00
+00
+00
+15
+00
+6c
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+27
+1f
+00
+00
+00
+00
+15
+00
+80
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1e
+1f
+00
+00
+00
+00
+15
+00
+68
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+14
+1f
+00
+00
+00
+00
+15
+00
+54
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0b
+1f
+00
+00
+00
+00
+15
+00
+68
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+1f
+00
+00
+00
+00
+15
+00
+50
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f8
+1e
+00
+00
+00
+00
+15
+00
+2c
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ef
+1e
+00
+00
+00
+00
+15
+00
+50
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e6
+1e
+00
+00
+00
+00
+15
+00
+28
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+dc
+1e
+00
+00
+00
+00
+15
+00
+f4
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d3
+1e
+00
+00
+00
+00
+15
+00
+28
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ca
+1e
+00
+00
+00
+00
+15
+00
+f0
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c0
+1e
+00
+00
+00
+00
+15
+00
+cc
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b7
+1e
+00
+00
+00
+00
+15
+00
+f0
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ae
+1e
+00
+00
+00
+00
+15
+00
+c8
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a4
+1e
+00
+00
+00
+00
+15
+00
+a4
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9b
+1e
+00
+00
+00
+00
+15
+00
+c8
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+92
+1e
+00
+00
+00
+00
+15
+00
+a0
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+88
+1e
+00
+00
+00
+00
+15
+00
+7c
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7f
+1e
+00
+00
+00
+00
+15
+00
+a0
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+76
+1e
+00
+00
+00
+00
+15
+00
+78
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6c
+1e
+00
+00
+00
+00
+15
+00
+54
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+63
+1e
+00
+00
+00
+00
+15
+00
+78
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5a
+1e
+00
+00
+00
+00
+15
+00
+50
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+50
+1e
+00
+00
+00
+00
+15
+00
+1c
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+47
+1e
+00
+00
+00
+00
+15
+00
+50
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3e
+1e
+00
+00
+00
+00
+15
+00
+18
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+34
+1e
+00
+00
+00
+00
+15
+00
+ec
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2b
+1e
+00
+00
+00
+00
+15
+00
+18
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+22
+1e
+00
+00
+00
+00
+15
+00
+e8
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+19
+1e
+00
+00
+00
+00
+15
+00
+bc
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+11
+1e
+00
+00
+00
+00
+15
+00
+e8
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+09
+1e
+00
+00
+00
+00
+15
+00
+b8
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1e
+00
+00
+00
+00
+15
+00
+8c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f8
+1d
+00
+00
+00
+00
+15
+00
+b8
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f0
+1d
+00
+00
+00
+00
+15
+00
+88
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e7
+1d
+00
+00
+00
+00
+15
+00
+5c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+df
+1d
+00
+00
+00
+00
+15
+00
+88
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d7
+1d
+00
+00
+00
+00
+15
+00
+58
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ce
+1d
+00
+00
+00
+00
+15
+00
+3c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c6
+1d
+00
+00
+00
+00
+15
+00
+58
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+be
+1d
+00
+00
+00
+00
+15
+00
+38
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b5
+1d
+00
+00
+00
+00
+15
+00
+1c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ad
+1d
+00
+00
+00
+00
+15
+00
+38
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a5
+1d
+00
+00
+00
+00
+15
+00
+18
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9d
+1d
+00
+00
+00
+00
+15
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+95
+1d
+00
+00
+00
+00
+15
+00
+18
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8c
+1d
+00
+00
+00
+00
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+82
+1d
+00
+00
+00
+00
+13
+00
+04
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+79
+1d
+00
+00
+00
+00
+13
+00
+58
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+70
+1d
+00
+00
+00
+00
+13
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+66
+1d
+00
+00
+00
+00
+13
+00
+d4
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5d
+1d
+00
+00
+00
+00
+13
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+54
+1d
+00
+00
+00
+00
+13
+00
+d0
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4a
+1d
+00
+00
+00
+00
+13
+00
+a4
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+41
+1d
+00
+00
+00
+00
+13
+00
+d0
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+38
+1d
+00
+00
+00
+00
+13
+00
+a0
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+1d
+00
+00
+00
+00
+13
+00
+74
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+25
+1d
+00
+00
+00
+00
+13
+00
+a0
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1c
+1d
+00
+00
+00
+00
+13
+00
+70
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+1d
+00
+00
+00
+00
+13
+00
+3c
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+09
+1d
+00
+00
+00
+00
+13
+00
+70
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1d
+00
+00
+00
+00
+13
+00
+38
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f6
+1c
+00
+00
+00
+00
+13
+00
+04
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ed
+1c
+00
+00
+00
+00
+13
+00
+38
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e4
+1c
+00
+00
+00
+00
+13
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+da
+1c
+00
+00
+00
+00
+13
+00
+dc
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d1
+1c
+00
+00
+00
+00
+13
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c8
+1c
+00
+00
+00
+00
+13
+00
+d8
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+be
+1c
+00
+00
+00
+00
+13
+00
+bc
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b5
+1c
+00
+00
+00
+00
+13
+00
+d8
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ac
+1c
+00
+00
+00
+00
+13
+00
+b8
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a2
+1c
+00
+00
+00
+00
+13
+00
+a4
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+99
+1c
+00
+00
+00
+00
+13
+00
+b8
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+90
+1c
+00
+00
+00
+00
+13
+00
+a0
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+86
+1c
+00
+00
+00
+00
+13
+00
+84
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7d
+1c
+00
+00
+00
+00
+13
+00
+a0
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+74
+1c
+00
+00
+00
+00
+13
+00
+80
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6a
+1c
+00
+00
+00
+00
+13
+00
+6c
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+61
+1c
+00
+00
+00
+00
+13
+00
+80
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+58
+1c
+00
+00
+00
+00
+13
+00
+68
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4e
+1c
+00
+00
+00
+00
+13
+00
+54
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+45
+1c
+00
+00
+00
+00
+13
+00
+68
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3c
+1c
+00
+00
+00
+00
+13
+00
+50
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+32
+1c
+00
+00
+00
+00
+13
+00
+2c
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+29
+1c
+00
+00
+00
+00
+13
+00
+50
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+1c
+00
+00
+00
+00
+13
+00
+28
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+16
+1c
+00
+00
+00
+00
+13
+00
+f4
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0d
+1c
+00
+00
+00
+00
+13
+00
+28
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+1c
+00
+00
+00
+00
+13
+00
+f0
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fa
+1b
+00
+00
+00
+00
+13
+00
+cc
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f1
+1b
+00
+00
+00
+00
+13
+00
+f0
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e8
+1b
+00
+00
+00
+00
+13
+00
+c8
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+de
+1b
+00
+00
+00
+00
+13
+00
+a4
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d5
+1b
+00
+00
+00
+00
+13
+00
+c8
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+cc
+1b
+00
+00
+00
+00
+13
+00
+a0
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c2
+1b
+00
+00
+00
+00
+13
+00
+7c
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b9
+1b
+00
+00
+00
+00
+13
+00
+a0
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b0
+1b
+00
+00
+00
+00
+13
+00
+78
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a6
+1b
+00
+00
+00
+00
+13
+00
+54
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9d
+1b
+00
+00
+00
+00
+13
+00
+78
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+94
+1b
+00
+00
+00
+00
+13
+00
+50
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8a
+1b
+00
+00
+00
+00
+13
+00
+1c
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+81
+1b
+00
+00
+00
+00
+13
+00
+50
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+78
+1b
+00
+00
+00
+00
+13
+00
+18
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6e
+1b
+00
+00
+00
+00
+13
+00
+ec
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+65
+1b
+00
+00
+00
+00
+13
+00
+18
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5c
+1b
+00
+00
+00
+00
+13
+00
+e8
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+53
+1b
+00
+00
+00
+00
+13
+00
+bc
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4b
+1b
+00
+00
+00
+00
+13
+00
+e8
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+43
+1b
+00
+00
+00
+00
+13
+00
+b8
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3a
+1b
+00
+00
+00
+00
+13
+00
+8c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+32
+1b
+00
+00
+00
+00
+13
+00
+b8
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2a
+1b
+00
+00
+00
+00
+13
+00
+88
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+21
+1b
+00
+00
+00
+00
+13
+00
+5c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+19
+1b
+00
+00
+00
+00
+13
+00
+88
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+11
+1b
+00
+00
+00
+00
+13
+00
+58
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+08
+1b
+00
+00
+00
+00
+13
+00
+3c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1b
+00
+00
+00
+00
+13
+00
+58
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f8
+1a
+00
+00
+00
+00
+13
+00
+38
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ef
+1a
+00
+00
+00
+00
+13
+00
+1c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e7
+1a
+00
+00
+00
+00
+13
+00
+38
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+df
+1a
+00
+00
+00
+00
+13
+00
+18
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d7
+1a
+00
+00
+00
+00
+13
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+cf
+1a
+00
+00
+00
+00
+13
+00
+18
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c6
+1a
+00
+00
+00
+00
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+bf
+1a
+00
+00
+00
+00
+04
+00
+4f
+18
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b8
+1a
+00
+00
+00
+00
+04
+00
+4f
+18
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b1
+1a
+00
+00
+00
+00
+04
+00
+4f
+18
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+aa
+1a
+00
+00
+00
+00
+04
+00
+4f
+18
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a2
+1a
+00
+00
+00
+00
+04
+00
+45
+18
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9a
+1a
+00
+00
+00
+00
+04
+00
+40
+18
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+92
+1a
+00
+00
+00
+00
+04
+00
+3b
+18
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8a
+1a
+00
+00
+00
+00
+04
+00
+f3
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+82
+1a
+00
+00
+00
+00
+04
+00
+ee
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7a
+1a
+00
+00
+00
+00
+04
+00
+c0
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+74
+1a
+00
+00
+00
+00
+04
+00
+bb
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6c
+1a
+00
+00
+00
+00
+04
+00
+b6
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+64
+1a
+00
+00
+00
+00
+04
+00
+b0
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5e
+1a
+00
+00
+00
+00
+04
+00
+3b
+18
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+57
+1a
+00
+00
+00
+00
+04
+00
+a7
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+50
+1a
+00
+00
+00
+00
+04
+00
+a7
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+49
+1a
+00
+00
+00
+00
+04
+00
+a7
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+41
+1a
+00
+00
+00
+00
+04
+00
+a7
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+39
+1a
+00
+00
+00
+00
+04
+00
+a4
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+31
+1a
+00
+00
+00
+00
+04
+00
+a2
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+29
+1a
+00
+00
+00
+00
+04
+00
+a0
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+21
+1a
+00
+00
+00
+00
+04
+00
+9e
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+19
+1a
+00
+00
+00
+00
+04
+00
+9c
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+11
+1a
+00
+00
+00
+00
+04
+00
+9b
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+09
+1a
+00
+00
+00
+00
+04
+00
+9a
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+1a
+00
+00
+00
+00
+04
+00
+58
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fa
+19
+00
+00
+00
+00
+04
+00
+2c
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f3
+19
+00
+00
+00
+00
+04
+00
+28
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ec
+19
+00
+00
+00
+00
+04
+00
+24
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e5
+19
+00
+00
+00
+00
+04
+00
+1f
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+de
+19
+00
+00
+00
+00
+04
+00
+1c
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d7
+19
+00
+00
+00
+00
+04
+00
+06
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d0
+19
+00
+00
+00
+00
+04
+00
+06
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c8
+19
+00
+00
+00
+00
+04
+00
+06
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c0
+19
+00
+00
+00
+00
+04
+00
+f0
+16
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ba
+19
+00
+00
+00
+00
+04
+00
+a7
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b2
+19
+00
+00
+00
+00
+04
+00
+a3
+16
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+aa
+19
+00
+00
+00
+00
+04
+00
+a0
+16
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a2
+19
+00
+00
+00
+00
+04
+00
+9c
+16
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9c
+19
+00
+00
+00
+00
+04
+00
+80
+16
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+94
+19
+00
+00
+00
+00
+04
+00
+6e
+16
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8c
+19
+00
+00
+00
+00
+04
+00
+6b
+16
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+84
+19
+00
+00
+00
+00
+04
+00
+67
+16
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7e
+19
+00
+00
+00
+00
+04
+00
+5b
+16
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+78
+19
+00
+00
+00
+00
+04
+00
+f0
+16
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+70
+19
+00
+00
+00
+00
+04
+00
+3b
+16
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+69
+19
+00
+00
+00
+00
+04
+00
+2d
+16
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+62
+19
+00
+00
+00
+00
+04
+00
+2d
+16
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5b
+19
+00
+00
+00
+00
+04
+00
+2d
+16
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+55
+19
+00
+00
+00
+00
+04
+00
+46
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4e
+19
+00
+00
+00
+00
+04
+00
+0f
+16
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+47
+19
+00
+00
+00
+00
+04
+00
+0b
+16
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+41
+19
+00
+00
+00
+00
+04
+00
+08
+16
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3b
+19
+00
+00
+00
+00
+04
+00
+06
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+35
+19
+00
+00
+00
+00
+04
+00
+ef
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2f
+19
+00
+00
+00
+00
+04
+00
+ef
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+29
+19
+00
+00
+00
+00
+04
+00
+ef
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+21
+19
+00
+00
+00
+00
+04
+00
+e5
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+19
+19
+00
+00
+00
+00
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+13
+19
+00
+00
+00
+00
+04
+00
+d9
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0b
+19
+00
+00
+00
+00
+04
+00
+d9
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+05
+19
+00
+00
+00
+00
+04
+00
+9e
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ff
+18
+00
+00
+00
+00
+04
+00
+9e
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f9
+18
+00
+00
+00
+00
+04
+00
+9e
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f3
+18
+00
+00
+00
+00
+04
+00
+9e
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+eb
+18
+00
+00
+00
+00
+04
+00
+9e
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e5
+18
+00
+00
+00
+00
+04
+00
+2d
+16
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+dd
+18
+00
+00
+00
+00
+04
+00
+87
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d6
+18
+00
+00
+00
+00
+12
+00
+80
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ce
+18
+00
+00
+00
+00
+04
+00
+5b
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c6
+18
+00
+00
+00
+00
+04
+00
+53
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+be
+18
+00
+00
+00
+00
+04
+00
+52
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b6
+18
+00
+00
+00
+00
+04
+00
+50
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ae
+18
+00
+00
+00
+00
+04
+00
+4e
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a6
+18
+00
+00
+00
+00
+04
+00
+4c
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9e
+18
+00
+00
+00
+00
+04
+00
+4a
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+96
+18
+00
+00
+00
+00
+04
+00
+49
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8e
+18
+00
+00
+00
+00
+04
+00
+46
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+88
+18
+00
+00
+00
+00
+04
+00
+53
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+80
+18
+00
+00
+00
+00
+04
+00
+31
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+78
+18
+00
+00
+00
+00
+04
+00
+31
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+70
+18
+00
+00
+00
+00
+04
+00
+2a
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+68
+18
+00
+00
+00
+00
+04
+00
+2a
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+60
+18
+00
+00
+00
+00
+04
+00
+29
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+58
+18
+00
+00
+00
+00
+04
+00
+29
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+50
+18
+00
+00
+00
+00
+04
+00
+28
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+48
+18
+00
+00
+00
+00
+04
+00
+28
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+18
+00
+00
+00
+00
+04
+00
+26
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+38
+18
+00
+00
+00
+00
+04
+00
+26
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+30
+18
+00
+00
+00
+00
+04
+00
+24
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+28
+18
+00
+00
+00
+00
+04
+00
+24
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+18
+00
+00
+00
+00
+04
+00
+22
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+18
+18
+00
+00
+00
+00
+04
+00
+22
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+18
+00
+00
+00
+00
+04
+00
+20
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+09
+18
+00
+00
+00
+00
+04
+00
+20
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+18
+00
+00
+00
+00
+0c
+00
+f8
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fd
+17
+00
+00
+00
+00
+0c
+00
+eb
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f7
+17
+00
+00
+00
+00
+11
+00
+58
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f1
+17
+00
+00
+00
+00
+11
+00
+20
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+eb
+17
+00
+00
+00
+00
+11
+00
+e8
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e5
+17
+00
+00
+00
+00
+0c
+00
+e8
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+df
+17
+00
+00
+00
+00
+0c
+00
+e7
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d9
+17
+00
+00
+00
+00
+0c
+00
+e5
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d3
+17
+00
+00
+00
+00
+0c
+00
+d2
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+cc
+17
+00
+00
+00
+00
+04
+00
+18
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c4
+17
+00
+00
+00
+00
+04
+00
+18
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+bc
+17
+00
+00
+00
+00
+04
+00
+15
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b4
+17
+00
+00
+00
+00
+04
+00
+11
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ac
+17
+00
+00
+00
+00
+04
+00
+0c
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a4
+17
+00
+00
+00
+00
+04
+00
+07
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9c
+17
+00
+00
+00
+00
+04
+00
+e7
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+94
+17
+00
+00
+00
+00
+04
+00
+db
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8c
+17
+00
+00
+00
+00
+04
+00
+d8
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+84
+17
+00
+00
+00
+00
+04
+00
+d3
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7c
+17
+00
+00
+00
+00
+04
+00
+cd
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+74
+17
+00
+00
+00
+00
+04
+00
+c8
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6c
+17
+00
+00
+00
+00
+04
+00
+bf
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+64
+17
+00
+00
+00
+00
+04
+00
+af
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5c
+17
+00
+00
+00
+00
+04
+00
+ae
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+54
+17
+00
+00
+00
+00
+04
+00
+aa
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4e
+17
+00
+00
+00
+00
+04
+00
+d8
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+46
+17
+00
+00
+00
+00
+04
+00
+94
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+17
+00
+00
+00
+00
+04
+00
+b0
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+38
+17
+00
+00
+00
+00
+04
+00
+86
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+30
+17
+00
+00
+00
+00
+04
+00
+86
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+28
+17
+00
+00
+00
+00
+04
+00
+82
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+17
+00
+00
+00
+00
+04
+00
+7a
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+18
+17
+00
+00
+00
+00
+04
+00
+75
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+17
+00
+00
+00
+00
+04
+00
+70
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+09
+17
+00
+00
+00
+00
+04
+00
+70
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+17
+00
+00
+00
+00
+0c
+00
+ca
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fd
+16
+00
+00
+00
+00
+0c
+00
+c1
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f6
+16
+00
+00
+00
+00
+04
+00
+6f
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ee
+16
+00
+00
+00
+00
+04
+00
+53
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e6
+16
+00
+00
+00
+00
+04
+00
+43
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+de
+16
+00
+00
+00
+00
+04
+00
+42
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d6
+16
+00
+00
+00
+00
+04
+00
+3e
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ce
+16
+00
+00
+00
+00
+04
+00
+36
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c6
+16
+00
+00
+00
+00
+04
+00
+31
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+be
+16
+00
+00
+00
+00
+04
+00
+2d
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b8
+16
+00
+00
+00
+00
+04
+00
+10
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b2
+16
+00
+00
+00
+00
+04
+00
+61
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ac
+16
+00
+00
+00
+00
+04
+00
+dd
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a4
+16
+00
+00
+00
+00
+04
+00
+dd
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9e
+16
+00
+00
+00
+00
+04
+00
+53
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+96
+16
+00
+00
+00
+00
+04
+00
+bd
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+90
+16
+00
+00
+00
+00
+04
+00
+ba
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8a
+16
+00
+00
+00
+00
+04
+00
+2d
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+82
+16
+00
+00
+00
+00
+04
+00
+ab
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7c
+16
+00
+00
+00
+00
+04
+00
+43
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+74
+16
+00
+00
+00
+00
+04
+00
+a3
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6c
+16
+00
+00
+00
+00
+04
+00
+96
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+64
+16
+00
+00
+00
+00
+04
+00
+96
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5c
+16
+00
+00
+00
+00
+04
+00
+92
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+54
+16
+00
+00
+00
+00
+04
+00
+8a
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4c
+16
+00
+00
+00
+00
+04
+00
+85
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+44
+16
+00
+00
+00
+00
+04
+00
+80
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3d
+16
+00
+00
+00
+00
+04
+00
+80
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+36
+16
+00
+00
+00
+00
+04
+00
+74
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+16
+00
+00
+00
+00
+04
+00
+6f
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+26
+16
+00
+00
+00
+00
+04
+00
+50
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1e
+16
+00
+00
+00
+00
+04
+00
+43
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+18
+16
+00
+00
+00
+00
+04
+00
+18
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+16
+00
+00
+00
+00
+04
+00
+18
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+08
+16
+00
+00
+00
+00
+04
+00
+0f
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+16
+00
+00
+00
+00
+04
+00
+06
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fa
+15
+00
+00
+00
+00
+04
+00
+50
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f2
+15
+00
+00
+00
+00
+04
+00
+eb
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ea
+15
+00
+00
+00
+00
+04
+00
+de
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e2
+15
+00
+00
+00
+00
+04
+00
+dd
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+da
+15
+00
+00
+00
+00
+04
+00
+d9
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d2
+15
+00
+00
+00
+00
+04
+00
+d4
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ca
+15
+00
+00
+00
+00
+04
+00
+cf
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c2
+15
+00
+00
+00
+00
+04
+00
+ca
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ba
+15
+00
+00
+00
+00
+04
+00
+c5
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b4
+15
+00
+00
+00
+00
+04
+00
+c1
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ac
+15
+00
+00
+00
+00
+04
+00
+c1
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a6
+15
+00
+00
+00
+00
+04
+00
+bd
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9e
+15
+00
+00
+00
+00
+04
+00
+bd
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+98
+15
+00
+00
+00
+00
+04
+00
+16
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+90
+15
+00
+00
+00
+00
+04
+00
+b7
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8a
+15
+00
+00
+00
+00
+04
+00
+af
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+82
+15
+00
+00
+00
+00
+04
+00
+af
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7c
+15
+00
+00
+00
+00
+04
+00
+a3
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+74
+15
+00
+00
+00
+00
+04
+00
+a3
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6e
+15
+00
+00
+00
+00
+04
+00
+f0
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+66
+15
+00
+00
+00
+00
+04
+00
+84
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+60
+15
+00
+00
+00
+00
+04
+00
+81
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5a
+15
+00
+00
+00
+00
+04
+00
+43
+13
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+52
+15
+00
+00
+00
+00
+04
+00
+77
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4c
+15
+00
+00
+00
+00
+04
+00
+e0
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+44
+15
+00
+00
+00
+00
+04
+00
+6f
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3c
+15
+00
+00
+00
+00
+04
+00
+62
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+34
+15
+00
+00
+00
+00
+04
+00
+62
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2c
+15
+00
+00
+00
+00
+04
+00
+5e
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+24
+15
+00
+00
+00
+00
+04
+00
+57
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1c
+15
+00
+00
+00
+00
+04
+00
+52
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+14
+15
+00
+00
+00
+00
+04
+00
+4a
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0c
+15
+00
+00
+00
+00
+04
+00
+45
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+15
+00
+00
+00
+00
+04
+00
+40
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fd
+14
+00
+00
+00
+00
+04
+00
+40
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f6
+14
+00
+00
+00
+00
+04
+00
+3d
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ee
+14
+00
+00
+00
+00
+04
+00
+2e
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e8
+14
+00
+00
+00
+00
+04
+00
+14
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e2
+14
+00
+00
+00
+00
+04
+00
+27
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+da
+14
+00
+00
+00
+00
+04
+00
+0e
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d2
+14
+00
+00
+00
+00
+04
+00
+fa
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ca
+14
+00
+00
+00
+00
+04
+00
+f5
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c2
+14
+00
+00
+00
+00
+04
+00
+e0
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ba
+14
+00
+00
+00
+00
+04
+00
+a8
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b2
+14
+00
+00
+00
+00
+04
+00
+93
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+aa
+14
+00
+00
+00
+00
+04
+00
+38
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a2
+14
+00
+00
+00
+00
+04
+00
+35
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9a
+14
+00
+00
+00
+00
+04
+00
+10
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+92
+14
+00
+00
+00
+00
+04
+00
+0f
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8a
+14
+00
+00
+00
+00
+04
+00
+0b
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+82
+14
+00
+00
+00
+00
+04
+00
+06
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7a
+14
+00
+00
+00
+00
+04
+00
+01
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+72
+14
+00
+00
+00
+00
+04
+00
+fc
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6a
+14
+00
+00
+00
+00
+04
+00
+f7
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+62
+14
+00
+00
+00
+00
+04
+00
+f2
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5c
+14
+00
+00
+00
+00
+04
+00
+e4
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+54
+14
+00
+00
+00
+00
+04
+00
+cf
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4e
+14
+00
+00
+00
+00
+04
+00
+93
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+46
+14
+00
+00
+00
+00
+04
+00
+c6
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+14
+00
+00
+00
+00
+04
+00
+9f
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3a
+14
+00
+00
+00
+00
+04
+00
+00
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+34
+14
+00
+00
+00
+00
+04
+00
+94
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+14
+00
+00
+00
+00
+04
+00
+46
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+26
+14
+00
+00
+00
+00
+04
+00
+86
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1e
+14
+00
+00
+00
+00
+04
+00
+61
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+18
+14
+00
+00
+00
+00
+04
+00
+5a
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+14
+00
+00
+00
+00
+04
+00
+2a
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0c
+14
+00
+00
+00
+00
+04
+00
+10
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+06
+14
+00
+00
+00
+00
+04
+00
+2d
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+14
+00
+00
+00
+00
+04
+00
+a8
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fa
+13
+00
+00
+00
+00
+04
+00
+21
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f2
+13
+00
+00
+00
+00
+04
+00
+21
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ec
+13
+00
+00
+00
+00
+04
+00
+e0
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e6
+13
+00
+00
+00
+00
+04
+00
+0d
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+de
+13
+00
+00
+00
+00
+04
+00
+0d
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d8
+13
+00
+00
+00
+00
+04
+00
+30
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d0
+13
+00
+00
+00
+00
+04
+00
+07
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c8
+13
+00
+00
+00
+00
+04
+00
+eb
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c0
+13
+00
+00
+00
+00
+04
+00
+eb
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b8
+13
+00
+00
+00
+00
+04
+00
+e7
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b0
+13
+00
+00
+00
+00
+04
+00
+e4
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a8
+13
+00
+00
+00
+00
+04
+00
+df
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a0
+13
+00
+00
+00
+00
+04
+00
+d7
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+98
+13
+00
+00
+00
+00
+04
+00
+d2
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+90
+13
+00
+00
+00
+00
+04
+00
+ca
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+88
+13
+00
+00
+00
+00
+04
+00
+c5
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+80
+13
+00
+00
+00
+00
+04
+00
+c0
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+79
+13
+00
+00
+00
+00
+04
+00
+c0
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+73
+13
+00
+00
+00
+00
+11
+00
+b8
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6d
+13
+00
+00
+00
+00
+0c
+00
+a6
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+67
+13
+00
+00
+00
+00
+11
+00
+90
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+61
+13
+00
+00
+00
+00
+0c
+00
+90
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5a
+13
+00
+00
+00
+00
+04
+00
+b8
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+52
+13
+00
+00
+00
+00
+04
+00
+b3
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4a
+13
+00
+00
+00
+00
+04
+00
+ae
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+42
+13
+00
+00
+00
+00
+04
+00
+a8
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3c
+13
+00
+00
+00
+00
+04
+00
+a1
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+34
+13
+00
+00
+00
+00
+04
+00
+a1
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2c
+13
+00
+00
+00
+00
+04
+00
+9c
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+26
+13
+00
+00
+00
+00
+04
+00
+65
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1e
+13
+00
+00
+00
+00
+04
+00
+65
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+16
+13
+00
+00
+00
+00
+04
+00
+59
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0e
+13
+00
+00
+00
+00
+04
+00
+56
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+08
+13
+00
+00
+00
+00
+04
+00
+a1
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+13
+00
+00
+00
+00
+04
+00
+48
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fa
+12
+00
+00
+00
+00
+04
+00
+48
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f4
+12
+00
+00
+00
+00
+04
+00
+33
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ec
+12
+00
+00
+00
+00
+04
+00
+30
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e4
+12
+00
+00
+00
+00
+04
+00
+2b
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+de
+12
+00
+00
+00
+00
+04
+00
+26
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d6
+12
+00
+00
+00
+00
+04
+00
+26
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ce
+12
+00
+00
+00
+00
+04
+00
+25
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c6
+12
+00
+00
+00
+00
+04
+00
+21
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+be
+12
+00
+00
+00
+00
+04
+00
+1c
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b6
+12
+00
+00
+00
+00
+04
+00
+17
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ae
+12
+00
+00
+00
+00
+04
+00
+0d
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a6
+12
+00
+00
+00
+00
+04
+00
+08
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9e
+12
+00
+00
+00
+00
+04
+00
+03
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+96
+12
+00
+00
+00
+00
+04
+00
+fa
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8e
+12
+00
+00
+00
+00
+04
+00
+f2
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+88
+12
+00
+00
+00
+00
+04
+00
+65
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+80
+12
+00
+00
+00
+00
+04
+00
+de
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7a
+12
+00
+00
+00
+00
+04
+00
+f2
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+74
+12
+00
+00
+00
+00
+04
+00
+d1
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6e
+12
+00
+00
+00
+00
+04
+00
+26
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+68
+12
+00
+00
+00
+00
+04
+00
+03
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+60
+12
+00
+00
+00
+00
+04
+00
+c2
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5a
+12
+00
+00
+00
+00
+04
+00
+b9
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+52
+12
+00
+00
+00
+00
+04
+00
+b9
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4a
+12
+00
+00
+00
+00
+04
+00
+a2
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+42
+12
+00
+00
+00
+00
+04
+00
+9f
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3a
+12
+00
+00
+00
+00
+04
+00
+98
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+34
+12
+00
+00
+00
+00
+04
+00
+48
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2c
+12
+00
+00
+00
+00
+04
+00
+88
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+24
+12
+00
+00
+00
+00
+04
+00
+88
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1c
+12
+00
+00
+00
+00
+04
+00
+84
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+14
+12
+00
+00
+00
+00
+04
+00
+7f
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0c
+12
+00
+00
+00
+00
+04
+00
+77
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+12
+00
+00
+00
+00
+04
+00
+72
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fc
+11
+00
+00
+00
+00
+04
+00
+6a
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f4
+11
+00
+00
+00
+00
+04
+00
+65
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ec
+11
+00
+00
+00
+00
+04
+00
+60
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e5
+11
+00
+00
+00
+00
+04
+00
+60
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+de
+11
+00
+00
+00
+00
+04
+00
+58
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d8
+11
+00
+00
+00
+00
+04
+00
+57
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d0
+11
+00
+00
+00
+00
+04
+00
+57
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ca
+11
+00
+00
+00
+00
+04
+00
+54
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c2
+11
+00
+00
+00
+00
+04
+00
+54
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+bc
+11
+00
+00
+00
+00
+04
+00
+53
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b4
+11
+00
+00
+00
+00
+04
+00
+4f
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ae
+11
+00
+00
+00
+00
+04
+00
+3c
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a6
+11
+00
+00
+00
+00
+04
+00
+3c
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9e
+11
+00
+00
+00
+00
+04
+00
+3b
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+96
+11
+00
+00
+00
+00
+04
+00
+31
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+90
+11
+00
+00
+00
+00
+04
+00
+30
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8a
+11
+00
+00
+00
+00
+04
+00
+30
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+82
+11
+00
+00
+00
+00
+04
+00
+30
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7c
+11
+00
+00
+00
+00
+04
+00
+3c
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+76
+11
+00
+00
+00
+00
+04
+00
+0f
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6e
+11
+00
+00
+00
+00
+04
+00
+03
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+66
+11
+00
+00
+00
+00
+04
+00
+f8
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+60
+11
+00
+00
+00
+00
+04
+00
+f7
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+58
+11
+00
+00
+00
+00
+04
+00
+ec
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+50
+11
+00
+00
+00
+00
+04
+00
+eb
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4a
+11
+00
+00
+00
+00
+04
+00
+ea
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+42
+11
+00
+00
+00
+00
+04
+00
+ea
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3c
+11
+00
+00
+00
+00
+04
+00
+03
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+34
+11
+00
+00
+00
+00
+04
+00
+cb
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+11
+00
+00
+00
+00
+04
+00
+f0
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+26
+11
+00
+00
+00
+00
+04
+00
+c1
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1e
+11
+00
+00
+00
+00
+04
+00
+c1
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+16
+11
+00
+00
+00
+00
+04
+00
+c0
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0f
+11
+00
+00
+00
+00
+04
+00
+c0
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+08
+11
+00
+00
+00
+00
+04
+00
+bb
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+11
+00
+00
+00
+00
+04
+00
+b6
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f8
+10
+00
+00
+00
+00
+04
+00
+ab
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f0
+10
+00
+00
+00
+00
+04
+00
+a8
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e8
+10
+00
+00
+00
+00
+04
+00
+a7
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e0
+10
+00
+00
+00
+00
+04
+00
+9b
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d8
+10
+00
+00
+00
+00
+04
+00
+9a
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d0
+10
+00
+00
+00
+00
+04
+00
+8e
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ca
+10
+00
+00
+00
+00
+04
+00
+a8
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c4
+10
+00
+00
+00
+00
+04
+00
+a0
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+bc
+10
+00
+00
+00
+00
+04
+00
+74
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b4
+10
+00
+00
+00
+00
+04
+00
+74
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ac
+10
+00
+00
+00
+00
+04
+00
+70
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a5
+10
+00
+00
+00
+00
+04
+00
+70
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9f
+10
+00
+00
+00
+00
+0c
+00
+7c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+98
+10
+00
+00
+00
+00
+04
+00
+6b
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+90
+10
+00
+00
+00
+00
+04
+00
+66
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8a
+10
+00
+00
+00
+00
+04
+00
+63
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+82
+10
+00
+00
+00
+00
+04
+00
+50
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7b
+10
+00
+00
+00
+00
+04
+00
+50
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+74
+10
+00
+00
+00
+00
+04
+00
+4b
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6c
+10
+00
+00
+00
+00
+04
+00
+4a
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+64
+10
+00
+00
+00
+00
+04
+00
+36
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5c
+10
+00
+00
+00
+00
+04
+00
+33
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+54
+10
+00
+00
+00
+00
+04
+00
+30
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4e
+10
+00
+00
+00
+00
+04
+00
+2a
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+48
+10
+00
+00
+00
+00
+04
+00
+33
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+10
+00
+00
+00
+00
+04
+00
+24
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+38
+10
+00
+00
+00
+00
+04
+00
+24
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+30
+10
+00
+00
+00
+00
+04
+00
+20
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+29
+10
+00
+00
+00
+00
+04
+00
+20
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+22
+10
+00
+00
+00
+00
+04
+00
+16
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1c
+10
+00
+00
+00
+00
+04
+00
+14
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+16
+10
+00
+00
+00
+00
+04
+00
+12
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0e
+10
+00
+00
+00
+00
+04
+00
+00
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+07
+10
+00
+00
+00
+00
+04
+00
+00
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+00
+00
+00
+00
+04
+00
+f7
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fa
+0f
+00
+00
+00
+00
+04
+00
+f4
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f2
+0f
+00
+00
+00
+00
+04
+00
+e0
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+eb
+0f
+00
+00
+00
+00
+04
+00
+e0
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e4
+0f
+00
+00
+00
+00
+04
+00
+db
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+dc
+0f
+00
+00
+00
+00
+04
+00
+da
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d4
+0f
+00
+00
+00
+00
+04
+00
+c3
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+cc
+0f
+00
+00
+00
+00
+04
+00
+c2
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c4
+0f
+00
+00
+00
+00
+04
+00
+ba
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+be
+0f
+00
+00
+00
+00
+04
+00
+c3
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b6
+0f
+00
+00
+00
+00
+04
+00
+b1
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ae
+0f
+00
+00
+00
+00
+04
+00
+b1
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a6
+0f
+00
+00
+00
+00
+04
+00
+b0
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9f
+0f
+00
+00
+00
+00
+04
+00
+b0
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+98
+0f
+00
+00
+00
+00
+04
+00
+a2
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+90
+0f
+00
+00
+00
+00
+04
+00
+91
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+88
+0f
+00
+00
+00
+00
+04
+00
+54
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+80
+0f
+00
+00
+00
+00
+04
+00
+45
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+78
+0f
+00
+00
+00
+00
+04
+00
+3b
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+70
+0f
+00
+00
+00
+00
+04
+00
+2c
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+68
+0f
+00
+00
+00
+00
+04
+00
+08
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+60
+0f
+00
+00
+00
+00
+04
+00
+fc
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+58
+0f
+00
+00
+00
+00
+04
+00
+d9
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+50
+0f
+00
+00
+00
+00
+04
+00
+cd
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+48
+0f
+00
+00
+00
+00
+04
+00
+a9
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+0f
+00
+00
+00
+00
+04
+00
+9d
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3a
+0f
+00
+00
+00
+00
+04
+00
+59
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+32
+0f
+00
+00
+00
+00
+04
+00
+83
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2a
+0f
+00
+00
+00
+00
+04
+00
+77
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+22
+0f
+00
+00
+00
+00
+04
+00
+4a
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1a
+0f
+00
+00
+00
+00
+04
+00
+47
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+0f
+00
+00
+00
+00
+04
+00
+31
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0c
+0f
+00
+00
+00
+00
+04
+00
+91
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+0f
+00
+00
+00
+00
+04
+00
+17
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fc
+0e
+00
+00
+00
+00
+04
+00
+03
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f4
+0e
+00
+00
+00
+00
+04
+00
+f1
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ec
+0e
+00
+00
+00
+00
+04
+00
+ec
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e4
+0e
+00
+00
+00
+00
+04
+00
+da
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+dc
+0e
+00
+00
+00
+00
+04
+00
+d5
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d4
+0e
+00
+00
+00
+00
+04
+00
+c3
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+cc
+0e
+00
+00
+00
+00
+04
+00
+be
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c4
+0e
+00
+00
+00
+00
+04
+00
+ac
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+bc
+0e
+00
+00
+00
+00
+04
+00
+a7
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b4
+0e
+00
+00
+00
+00
+04
+00
+90
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ac
+0e
+00
+00
+00
+00
+04
+00
+8b
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a4
+0e
+00
+00
+00
+00
+04
+00
+74
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9c
+0e
+00
+00
+00
+00
+04
+00
+6f
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+94
+0e
+00
+00
+00
+00
+04
+00
+5d
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8e
+0e
+00
+00
+00
+00
+04
+00
+75
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+86
+0e
+00
+00
+00
+00
+04
+00
+46
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7e
+0e
+00
+00
+00
+00
+04
+00
+3a
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+76
+0e
+00
+00
+00
+00
+04
+00
+35
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6e
+0e
+00
+00
+00
+00
+04
+00
+1d
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+66
+0e
+00
+00
+00
+00
+04
+00
+18
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5e
+0e
+00
+00
+00
+00
+04
+00
+09
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+56
+0e
+00
+00
+00
+00
+04
+00
+ff
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4e
+0e
+00
+00
+00
+00
+04
+00
+f0
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+46
+0e
+00
+00
+00
+00
+04
+00
+e6
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3e
+0e
+00
+00
+00
+00
+04
+00
+d7
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+36
+0e
+00
+00
+00
+00
+04
+00
+c5
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+0e
+00
+00
+00
+00
+04
+00
+b9
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+26
+0e
+00
+00
+00
+00
+04
+00
+95
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1e
+0e
+00
+00
+00
+00
+04
+00
+89
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+16
+0e
+00
+00
+00
+00
+04
+00
+68
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0e
+0e
+00
+00
+00
+00
+04
+00
+5c
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+08
+0e
+00
+00
+00
+00
+04
+00
+4b
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0e
+00
+00
+00
+00
+04
+00
+41
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f8
+0d
+00
+00
+00
+00
+04
+00
+35
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f0
+0d
+00
+00
+00
+00
+04
+00
+30
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e8
+0d
+00
+00
+00
+00
+04
+00
+17
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e0
+0d
+00
+00
+00
+00
+04
+00
+12
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d8
+0d
+00
+00
+00
+00
+04
+00
+f9
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d0
+0d
+00
+00
+00
+00
+04
+00
+b5
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c8
+0d
+00
+00
+00
+00
+04
+00
+ab
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c0
+0d
+00
+00
+00
+00
+04
+00
+a8
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b8
+0d
+00
+00
+00
+00
+04
+00
+a0
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b2
+0d
+00
+00
+00
+00
+04
+00
+d0
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+aa
+0d
+00
+00
+00
+00
+04
+00
+80
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a2
+0d
+00
+00
+00
+00
+04
+00
+7f
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9a
+0d
+00
+00
+00
+00
+04
+00
+7b
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+92
+0d
+00
+00
+00
+00
+04
+00
+76
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8a
+0d
+00
+00
+00
+00
+04
+00
+71
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+82
+0d
+00
+00
+00
+00
+04
+00
+6c
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7a
+0d
+00
+00
+00
+00
+04
+00
+67
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+72
+0d
+00
+00
+00
+00
+04
+00
+62
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6c
+0d
+00
+00
+00
+00
+04
+00
+5d
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+66
+0d
+00
+00
+00
+00
+04
+00
+47
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+60
+0d
+00
+00
+00
+00
+04
+00
+e4
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5a
+0d
+00
+00
+00
+00
+04
+00
+80
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+54
+0d
+00
+00
+00
+00
+04
+00
+2a
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4c
+0d
+00
+00
+00
+00
+04
+00
+2a
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+46
+0d
+00
+00
+00
+00
+04
+00
+f0
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+0d
+00
+00
+00
+00
+04
+00
+d7
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3a
+0d
+00
+00
+00
+00
+04
+00
+2c
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+34
+0d
+00
+00
+00
+00
+04
+00
+fc
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+0d
+00
+00
+00
+00
+04
+00
+cd
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+28
+0d
+00
+00
+00
+00
+04
+00
+9d
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+22
+0d
+00
+00
+00
+00
+04
+00
+b9
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1c
+0d
+00
+00
+00
+00
+04
+00
+89
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+16
+0d
+00
+00
+00
+00
+04
+00
+5c
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+0d
+00
+00
+00
+00
+04
+00
+35
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0a
+0d
+00
+00
+00
+00
+04
+00
+3a
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+0d
+00
+00
+00
+00
+04
+00
+77
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fe
+0c
+00
+00
+00
+00
+04
+00
+47
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f8
+0c
+00
+00
+00
+00
+04
+00
+17
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f2
+0c
+00
+00
+00
+00
+04
+00
+f1
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ec
+0c
+00
+00
+00
+00
+04
+00
+da
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e6
+0c
+00
+00
+00
+00
+04
+00
+c3
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e0
+0c
+00
+00
+00
+00
+04
+00
+ac
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+da
+0c
+00
+00
+00
+00
+04
+00
+45
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d4
+0c
+00
+00
+00
+00
+04
+00
+09
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ce
+0c
+00
+00
+00
+00
+04
+00
+f9
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c9
+0c
+00
+00
+00
+00
+04
+00
+17
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c4
+0c
+00
+00
+00
+00
+04
+00
+5d
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+bf
+0c
+00
+00
+00
+00
+04
+00
+90
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ba
+0c
+00
+00
+00
+00
+04
+00
+74
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b5
+0c
+00
+00
+00
+00
+04
+00
+1d
+0a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+af
+0c
+00
+00
+00
+00
+0d
+00
+30
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+aa
+0c
+00
+00
+00
+00
+04
+00
+15
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a4
+0c
+00
+00
+00
+00
+04
+00
+b5
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9f
+0c
+00
+00
+00
+00
+04
+00
+07
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+97
+0c
+00
+00
+00
+00
+04
+00
+e3
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+91
+0c
+00
+00
+00
+00
+04
+00
+a0
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8c
+0c
+00
+00
+00
+00
+04
+00
+e3
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+84
+0c
+00
+00
+00
+00
+04
+00
+b3
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7f
+0c
+00
+00
+00
+00
+04
+00
+b0
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+77
+0c
+00
+00
+00
+00
+04
+00
+b0
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6f
+0c
+00
+00
+00
+00
+04
+00
+99
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+67
+0c
+00
+00
+00
+00
+04
+00
+96
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5f
+0c
+00
+00
+00
+00
+04
+00
+8f
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+59
+0c
+00
+00
+00
+00
+04
+00
+a8
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+51
+0c
+00
+00
+00
+00
+04
+00
+89
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+49
+0c
+00
+00
+00
+00
+04
+00
+78
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+41
+0c
+00
+00
+00
+00
+04
+00
+78
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+39
+0c
+00
+00
+00
+00
+04
+00
+74
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+31
+0c
+00
+00
+00
+00
+04
+00
+6f
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+29
+0c
+00
+00
+00
+00
+04
+00
+67
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+21
+0c
+00
+00
+00
+00
+04
+00
+62
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+19
+0c
+00
+00
+00
+00
+04
+00
+5a
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+11
+0c
+00
+00
+00
+00
+04
+00
+55
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+09
+0c
+00
+00
+00
+00
+04
+00
+50
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+0c
+00
+00
+00
+00
+04
+00
+50
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fc
+0b
+00
+00
+00
+00
+11
+00
+68
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f6
+0b
+00
+00
+00
+00
+0c
+00
+7a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f0
+0b
+00
+00
+00
+00
+0c
+00
+76
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ea
+0b
+00
+00
+00
+00
+0c
+00
+62
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e4
+0b
+00
+00
+00
+00
+0c
+00
+5e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+de
+0b
+00
+00
+00
+00
+0c
+00
+4b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d8
+0b
+00
+00
+00
+00
+0c
+00
+30
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d1
+0b
+00
+00
+00
+00
+04
+00
+4e
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c9
+0b
+00
+00
+00
+00
+04
+00
+4e
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c1
+0b
+00
+00
+00
+00
+04
+00
+4b
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b9
+0b
+00
+00
+00
+00
+04
+00
+38
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b1
+0b
+00
+00
+00
+00
+04
+00
+38
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a9
+0b
+00
+00
+00
+00
+04
+00
+35
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a1
+0b
+00
+00
+00
+00
+04
+00
+2a
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9c
+0b
+00
+00
+00
+00
+04
+00
+38
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+94
+0b
+00
+00
+00
+00
+04
+00
+21
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8c
+0b
+00
+00
+00
+00
+04
+00
+21
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+84
+0b
+00
+00
+00
+00
+04
+00
+20
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7d
+0b
+00
+00
+00
+00
+04
+00
+20
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+76
+0b
+00
+00
+00
+00
+04
+00
+1b
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6e
+0b
+00
+00
+00
+00
+04
+00
+1a
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+66
+0b
+00
+00
+00
+00
+04
+00
+16
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5e
+0b
+00
+00
+00
+00
+04
+00
+11
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+56
+0b
+00
+00
+00
+00
+04
+00
+ea
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4e
+0b
+00
+00
+00
+00
+04
+00
+e9
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+46
+0b
+00
+00
+00
+00
+04
+00
+e5
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3e
+0b
+00
+00
+00
+00
+04
+00
+e0
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+36
+0b
+00
+00
+00
+00
+04
+00
+c7
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+0b
+00
+00
+00
+00
+04
+00
+c6
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+26
+0b
+00
+00
+00
+00
+04
+00
+c2
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1e
+0b
+00
+00
+00
+00
+04
+00
+bd
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+19
+0b
+00
+00
+00
+00
+04
+00
+f0
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+14
+0b
+00
+00
+00
+00
+04
+00
+c7
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0c
+0b
+00
+00
+00
+00
+04
+00
+a2
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+0b
+00
+00
+00
+00
+04
+00
+96
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fc
+0a
+00
+00
+00
+00
+04
+00
+96
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f4
+0a
+00
+00
+00
+00
+04
+00
+92
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ec
+0a
+00
+00
+00
+00
+04
+00
+8d
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e4
+0a
+00
+00
+00
+00
+04
+00
+85
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+dc
+0a
+00
+00
+00
+00
+04
+00
+80
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d5
+0a
+00
+00
+00
+00
+04
+00
+80
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ce
+0a
+00
+00
+00
+00
+04
+00
+71
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c7
+0a
+00
+00
+00
+00
+04
+00
+70
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c0
+0a
+00
+00
+00
+00
+04
+00
+59
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b9
+0a
+00
+00
+00
+00
+04
+00
+0c
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b2
+0a
+00
+00
+00
+00
+04
+00
+0a
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ab
+0a
+00
+00
+00
+00
+04
+00
+09
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a6
+0a
+00
+00
+00
+00
+04
+00
+10
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9f
+0a
+00
+00
+00
+00
+04
+00
+04
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+97
+0a
+00
+00
+00
+00
+04
+00
+04
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+90
+0a
+00
+00
+00
+00
+04
+00
+00
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+89
+0a
+00
+00
+00
+00
+04
+00
+00
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+82
+0a
+00
+00
+00
+00
+04
+00
+ff
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7b
+0a
+00
+00
+00
+00
+04
+00
+fe
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+74
+0a
+00
+00
+00
+00
+04
+00
+e9
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6d
+0a
+00
+00
+00
+00
+04
+00
+e1
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+65
+0a
+00
+00
+00
+00
+04
+00
+e1
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5e
+0a
+00
+00
+00
+00
+04
+00
+e0
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+57
+0a
+00
+00
+00
+00
+04
+00
+e0
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+50
+0a
+00
+00
+00
+00
+04
+00
+d5
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+49
+0a
+00
+00
+00
+00
+04
+00
+b9
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+44
+0a
+00
+00
+00
+00
+04
+00
+70
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3d
+0a
+00
+00
+00
+00
+04
+00
+6c
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+36
+0a
+00
+00
+00
+00
+04
+00
+6a
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+31
+0a
+00
+00
+00
+00
+04
+00
+66
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2a
+0a
+00
+00
+00
+00
+04
+00
+1d
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+23
+0a
+00
+00
+00
+00
+04
+00
+1c
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1c
+0a
+00
+00
+00
+00
+04
+00
+18
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+15
+0a
+00
+00
+00
+00
+04
+00
+0e
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0e
+0a
+00
+00
+00
+00
+04
+00
+09
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+07
+0a
+00
+00
+00
+00
+04
+00
+04
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+00
+04
+00
+01
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f9
+09
+00
+00
+00
+00
+04
+00
+fa
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f4
+09
+00
+00
+00
+00
+04
+00
+f6
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ed
+09
+00
+00
+00
+00
+04
+00
+f6
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e6
+09
+00
+00
+00
+00
+04
+00
+eb
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e1
+09
+00
+00
+00
+00
+04
+00
+e6
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+da
+09
+00
+00
+00
+00
+04
+00
+e6
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d3
+09
+00
+00
+00
+00
+04
+00
+db
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ce
+09
+00
+00
+00
+00
+04
+00
+d6
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c9
+09
+00
+00
+00
+00
+04
+00
+c5
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c4
+09
+00
+00
+00
+00
+04
+00
+b9
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+bf
+09
+00
+00
+00
+00
+04
+00
+c2
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ba
+09
+00
+00
+00
+00
+04
+00
+cb
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b5
+09
+00
+00
+00
+00
+04
+00
+01
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b0
+09
+00
+00
+00
+00
+0d
+00
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a9
+09
+00
+00
+00
+00
+04
+00
+be
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a4
+09
+00
+00
+00
+00
+04
+00
+20
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9f
+09
+00
+00
+00
+00
+04
+00
+b5
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9a
+09
+00
+00
+00
+00
+04
+00
+37
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+95
+09
+00
+00
+00
+00
+04
+00
+9b
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+90
+09
+00
+00
+00
+00
+04
+00
+50
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+89
+09
+00
+00
+00
+00
+04
+00
+7f
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+82
+09
+00
+00
+00
+00
+04
+00
+79
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7b
+09
+00
+00
+00
+00
+04
+00
+73
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+74
+09
+00
+00
+00
+00
+04
+00
+6e
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6c
+09
+00
+00
+00
+00
+04
+00
+6e
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+64
+09
+00
+00
+00
+00
+04
+00
+67
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5c
+09
+00
+00
+00
+00
+04
+00
+62
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+54
+09
+00
+00
+00
+00
+04
+00
+5d
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4c
+09
+00
+00
+00
+00
+04
+00
+55
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+45
+09
+00
+00
+00
+00
+04
+00
+50
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3e
+09
+00
+00
+00
+00
+04
+00
+50
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+38
+09
+00
+00
+00
+00
+11
+00
+30
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+31
+09
+00
+00
+00
+00
+04
+00
+46
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2a
+09
+00
+00
+00
+00
+04
+00
+2e
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+23
+09
+00
+00
+00
+00
+04
+00
+2d
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1c
+09
+00
+00
+00
+00
+04
+00
+29
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+15
+09
+00
+00
+00
+00
+04
+00
+24
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0e
+09
+00
+00
+00
+00
+04
+00
+20
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+07
+09
+00
+00
+00
+00
+04
+00
+02
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+09
+00
+00
+00
+00
+04
+00
+01
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f9
+08
+00
+00
+00
+00
+04
+00
+fd
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f2
+08
+00
+00
+00
+00
+04
+00
+f8
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+eb
+08
+00
+00
+00
+00
+04
+00
+f4
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e6
+08
+00
+00
+00
+00
+04
+00
+02
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e1
+08
+00
+00
+00
+00
+04
+00
+ae
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+dc
+08
+00
+00
+00
+00
+04
+00
+30
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d5
+08
+00
+00
+00
+00
+04
+00
+9a
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ce
+08
+00
+00
+00
+00
+04
+00
+94
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c7
+08
+00
+00
+00
+00
+04
+00
+8b
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+bf
+08
+00
+00
+00
+00
+04
+00
+8b
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b8
+08
+00
+00
+00
+00
+04
+00
+87
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b0
+08
+00
+00
+00
+00
+04
+00
+82
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a8
+08
+00
+00
+00
+00
+04
+00
+7d
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a0
+08
+00
+00
+00
+00
+04
+00
+75
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+99
+08
+00
+00
+00
+00
+04
+00
+70
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+92
+08
+00
+00
+00
+00
+04
+00
+70
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8b
+08
+00
+00
+00
+00
+04
+00
+66
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+84
+08
+00
+00
+00
+00
+04
+00
+4e
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7d
+08
+00
+00
+00
+00
+04
+00
+4d
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+76
+08
+00
+00
+00
+00
+04
+00
+49
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6f
+08
+00
+00
+00
+00
+04
+00
+44
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+68
+08
+00
+00
+00
+00
+04
+00
+40
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+61
+08
+00
+00
+00
+00
+04
+00
+22
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5a
+08
+00
+00
+00
+00
+04
+00
+21
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+53
+08
+00
+00
+00
+00
+04
+00
+1d
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4c
+08
+00
+00
+00
+00
+04
+00
+18
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+45
+08
+00
+00
+00
+00
+04
+00
+14
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+08
+00
+00
+00
+00
+04
+00
+22
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3b
+08
+00
+00
+00
+00
+04
+00
+ce
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+36
+08
+00
+00
+00
+00
+04
+00
+50
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2f
+08
+00
+00
+00
+00
+04
+00
+ba
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+28
+08
+00
+00
+00
+00
+04
+00
+b4
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+21
+08
+00
+00
+00
+00
+04
+00
+ab
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+19
+08
+00
+00
+00
+00
+04
+00
+ab
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+08
+00
+00
+00
+00
+04
+00
+a7
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0a
+08
+00
+00
+00
+00
+04
+00
+a2
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+08
+00
+00
+00
+00
+04
+00
+9d
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fa
+07
+00
+00
+00
+00
+04
+00
+95
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f3
+07
+00
+00
+00
+00
+04
+00
+90
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ec
+07
+00
+00
+00
+00
+04
+00
+90
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e5
+07
+00
+00
+00
+00
+04
+00
+86
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+de
+07
+00
+00
+00
+00
+04
+00
+6c
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d7
+07
+00
+00
+00
+00
+04
+00
+6b
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d0
+07
+00
+00
+00
+00
+04
+00
+67
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c9
+07
+00
+00
+00
+00
+04
+00
+62
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c2
+07
+00
+00
+00
+00
+04
+00
+5e
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+bb
+07
+00
+00
+00
+00
+04
+00
+3e
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b4
+07
+00
+00
+00
+00
+04
+00
+3d
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ad
+07
+00
+00
+00
+00
+04
+00
+39
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a6
+07
+00
+00
+00
+00
+04
+00
+34
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9f
+07
+00
+00
+00
+00
+04
+00
+30
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9a
+07
+00
+00
+00
+00
+04
+00
+40
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+95
+07
+00
+00
+00
+00
+04
+00
+ea
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+90
+07
+00
+00
+00
+00
+04
+00
+70
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+89
+07
+00
+00
+00
+00
+04
+00
+da
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+82
+07
+00
+00
+00
+00
+04
+00
+d4
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7b
+07
+00
+00
+00
+00
+04
+00
+cb
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+74
+07
+00
+00
+00
+00
+04
+00
+cb
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6d
+07
+00
+00
+00
+00
+04
+00
+c7
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+66
+07
+00
+00
+00
+00
+04
+00
+c2
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5f
+07
+00
+00
+00
+00
+04
+00
+bd
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+58
+07
+00
+00
+00
+00
+04
+00
+b5
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+51
+07
+00
+00
+00
+00
+04
+00
+b0
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4a
+07
+00
+00
+00
+00
+04
+00
+b0
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+43
+07
+00
+00
+00
+00
+04
+00
+a6
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3c
+07
+00
+00
+00
+00
+04
+00
+8d
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+35
+07
+00
+00
+00
+00
+04
+00
+8c
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+07
+00
+00
+00
+00
+04
+00
+88
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+27
+07
+00
+00
+00
+00
+04
+00
+83
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+07
+00
+00
+00
+00
+04
+00
+7e
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+19
+07
+00
+00
+00
+00
+04
+00
+5c
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+07
+00
+00
+00
+00
+04
+00
+5b
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0b
+07
+00
+00
+00
+00
+04
+00
+57
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+07
+00
+00
+00
+00
+04
+00
+52
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fd
+06
+00
+00
+00
+00
+04
+00
+4d
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f9
+06
+00
+00
+00
+00
+04
+00
+60
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f5
+06
+00
+00
+00
+00
+04
+00
+16
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f0
+06
+00
+00
+00
+00
+04
+00
+90
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e9
+06
+00
+00
+00
+00
+04
+00
+0c
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e2
+06
+00
+00
+00
+00
+04
+00
+09
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+db
+06
+00
+00
+00
+00
+04
+00
+f4
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d5
+06
+00
+00
+00
+00
+04
+00
+f4
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+cf
+06
+00
+00
+00
+00
+04
+00
+eb
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c8
+06
+00
+00
+00
+00
+04
+00
+eb
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c2
+06
+00
+00
+00
+00
+04
+00
+e7
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+bb
+06
+00
+00
+00
+00
+04
+00
+e2
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b4
+06
+00
+00
+00
+00
+04
+00
+da
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ad
+06
+00
+00
+00
+00
+04
+00
+d5
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a7
+06
+00
+00
+00
+00
+04
+00
+d0
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a0
+06
+00
+00
+00
+00
+04
+00
+d0
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9a
+06
+00
+00
+00
+00
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+93
+06
+00
+00
+00
+00
+04
+00
+d0
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8d
+06
+00
+00
+00
+00
+04
+00
+cb
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+87
+06
+00
+00
+00
+00
+04
+00
+84
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+80
+06
+00
+00
+00
+00
+04
+00
+84
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7a
+06
+00
+00
+00
+00
+04
+00
+80
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+73
+06
+00
+00
+00
+00
+04
+00
+80
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6c
+06
+00
+00
+00
+00
+04
+00
+79
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+66
+06
+00
+00
+00
+00
+04
+00
+78
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+58
+06
+00
+00
+00
+00
+12
+00
+68
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4e
+06
+00
+00
+00
+00
+12
+00
+70
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+44
+06
+00
+00
+00
+00
+12
+00
+78
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3e
+06
+00
+00
+00
+00
+12
+00
+80
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+37
+06
+00
+00
+00
+00
+12
+00
+88
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2f
+06
+00
+00
+00
+00
+12
+00
+90
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+29
+06
+00
+00
+00
+00
+04
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+22
+06
+00
+00
+00
+00
+04
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1c
+06
+00
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+15
+06
+00
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0f
+00
+00
+00
+01
+00
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0f
+06
+00
+00
+00
+00
+0c
+00
+2d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+09
+06
+00
+00
+00
+00
+0c
+00
+2a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+06
+00
+00
+00
+00
+0c
+00
+27
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fd
+05
+00
+00
+00
+00
+0c
+00
+25
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f7
+05
+00
+00
+00
+00
+0d
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f1
+05
+00
+00
+00
+00
+0c
+00
+22
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+eb
+05
+00
+00
+00
+00
+0c
+00
+1d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e5
+05
+00
+00
+00
+00
+0c
+00
+1a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+df
+05
+00
+00
+00
+00
+0c
+00
+17
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+da
+05
+00
+00
+00
+00
+0c
+00
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d5
+05
+00
+00
+00
+00
+0c
+00
+11
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d0
+05
+00
+00
+00
+00
+0c
+00
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+cb
+05
+00
+00
+00
+00
+0c
+00
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c6
+05
+00
+00
+00
+00
+0c
+00
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c1
+05
+00
+00
+00
+00
+0c
+00
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+bc
+05
+00
+00
+00
+00
+0c
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b7
+05
+00
+00
+00
+00
+0c
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b2
+05
+00
+00
+00
+00
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+0d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ad
+05
+00
+00
+00
+00
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a5
+05
+00
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+97
+05
+00
+00
+00
+00
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+89
+05
+00
+00
+00
+00
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+79
+05
+00
+00
+00
+00
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+15
+00
+00
+00
+12
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+79
+00
+00
+00
+00
+00
+00
+00
+2c
+00
+00
+00
+12
+00
+04
+00
+80
+00
+00
+00
+00
+00
+00
+00
+50
+00
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+12
+00
+04
+00
+d0
+00
+00
+00
+00
+00
+00
+00
+d6
+00
+00
+00
+00
+00
+00
+00
+57
+00
+00
+00
+12
+00
+04
+00
+b0
+01
+00
+00
+00
+00
+00
+00
+d6
+00
+00
+00
+00
+00
+00
+00
+6e
+00
+00
+00
+12
+00
+04
+00
+90
+02
+00
+00
+00
+00
+00
+00
+d6
+00
+00
+00
+00
+00
+00
+00
+85
+00
+00
+00
+12
+00
+04
+00
+70
+03
+00
+00
+00
+00
+00
+00
+d6
+00
+00
+00
+00
+00
+00
+00
+9c
+00
+00
+00
+12
+00
+04
+00
+50
+04
+00
+00
+00
+00
+00
+00
+85
+01
+00
+00
+00
+00
+00
+00
+be
+00
+00
+00
+12
+00
+04
+00
+e0
+05
+00
+00
+00
+00
+00
+00
+1f
+00
+00
+00
+00
+00
+00
+00
+d6
+00
+00
+00
+12
+00
+04
+00
+00
+06
+00
+00
+00
+00
+00
+00
+71
+00
+00
+00
+00
+00
+00
+00
+ed
+00
+00
+00
+12
+00
+04
+00
+80
+06
+00
+00
+00
+00
+00
+00
+9b
+00
+00
+00
+00
+00
+00
+00
+fe
+00
+00
+00
+12
+00
+04
+00
+20
+07
+00
+00
+00
+00
+00
+00
+2e
+00
+00
+00
+00
+00
+00
+00
+12
+01
+00
+00
+12
+00
+04
+00
+50
+07
+00
+00
+00
+00
+00
+00
+52
+05
+00
+00
+00
+00
+00
+00
+23
+01
+00
+00
+12
+00
+04
+00
+b0
+0c
+00
+00
+00
+00
+00
+00
+2b
+00
+00
+00
+00
+00
+00
+00
+34
+01
+00
+00
+12
+00
+04
+00
+e0
+0c
+00
+00
+00
+00
+00
+00
+17
+00
+00
+00
+00
+00
+00
+00
+48
+01
+00
+00
+12
+00
+04
+00
+00
+0d
+00
+00
+00
+00
+00
+00
+16
+00
+00
+00
+00
+00
+00
+00
+5c
+01
+00
+00
+12
+00
+04
+00
+20
+0d
+00
+00
+00
+00
+00
+00
+2b
+00
+00
+00
+00
+00
+00
+00
+70
+01
+00
+00
+12
+00
+04
+00
+50
+0d
+00
+00
+00
+00
+00
+00
+1b
+00
+00
+00
+00
+00
+00
+00
+81
+01
+00
+00
+12
+00
+04
+00
+70
+0d
+00
+00
+00
+00
+00
+00
+4b
+00
+00
+00
+00
+00
+00
+00
+96
+01
+00
+00
+12
+00
+04
+00
+c0
+0d
+00
+00
+00
+00
+00
+00
+98
+00
+00
+00
+00
+00
+00
+00
+aa
+01
+00
+00
+12
+00
+04
+00
+60
+0e
+00
+00
+00
+00
+00
+00
+58
+01
+00
+00
+00
+00
+00
+00
+c1
+01
+00
+00
+12
+00
+04
+00
+c0
+0f
+00
+00
+00
+00
+00
+00
+7d
+02
+00
+00
+00
+00
+00
+00
+d7
+01
+00
+00
+12
+00
+04
+00
+40
+12
+00
+00
+00
+00
+00
+00
+34
+01
+00
+00
+00
+00
+00
+00
+ee
+01
+00
+00
+12
+00
+04
+00
+80
+13
+00
+00
+00
+00
+00
+00
+ef
+00
+00
+00
+00
+00
+00
+00
+06
+02
+00
+00
+12
+00
+04
+00
+70
+14
+00
+00
+00
+00
+00
+00
+a8
+00
+00
+00
+00
+00
+00
+00
+18
+02
+00
+00
+12
+00
+04
+00
+20
+15
+00
+00
+00
+00
+00
+00
+2f
+03
+00
+00
+00
+00
+00
+00
+1d
+02
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+02
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4d
+02
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+70
+02
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+82
+02
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8f
+02
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a9
+02
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b1
+02
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c6
+02
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d6
+02
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e4
+02
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+eb
+02
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fe
+02
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+11
+03
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+24
+03
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+34
+03
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+48
+03
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5e
+03
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6f
+03
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+7a
+03
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+8f
+03
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9e
+03
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+af
+03
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c2
+03
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d0
+03
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e6
+03
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f6
+03
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+04
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+15
+04
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+23
+04
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+31
+04
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3b
+04
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4c
+04
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5c
+04
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6b
+04
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+80
+04
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+92
+04
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a1
+04
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b0
+04
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c6
+04
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d4
+04
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ec
+04
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+05
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+17
+05
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1e
+05
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+26
+05
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+37
+05
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+46
+05
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4d
+05
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+55
+05
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5d
+05
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+64
+05
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6b
+05
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+70
+01
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4c
+bd
+00
+00
+00
+00
+00
+00
+7a
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+60
+01
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c8
+be
+00
+00
+00
+00
+00
+00
+18
+28
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+68
+01
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e0
+e6
+00
+00
+00
+00
+00
+00
+08
+76
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+9d
+04
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+01
+00
+00
+00
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+00
+00
+00
+00
+4f
+18
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d1
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+90
+18
+00
+00
+00
+00
+00
+00
+b0
+1f
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+04
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+07
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+38
+00
+00
+00
+00
+00
+00
+ef
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+15
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2f
+3b
+00
+00
+00
+00
+00
+00
+52
+0f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+dc
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+84
+4a
+00
+00
+00
+00
+00
+00
+d0
+20
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+07
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+21
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+54
+6b
+00
+00
+00
+00
+00
+00
+86
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ed
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+dc
+6f
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+09
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+2d
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+f4
+6f
+00
+00
+00
+00
+00
+00
+53
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+36
+00
+00
+00
+01
+00
+00
+00
+32
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+47
+70
+00
+00
+00
+00
+00
+00
+0b
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+45
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+58
+71
+00
+00
+00
+00
+00
+00
+18
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fe
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+70
+72
+00
+00
+00
+00
+00
+00
+30
+03
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+0d
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+4d
+00
+00
+00
+01
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a0
+75
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0b
+01
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a0
+77
+00
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+0f
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+53
+00
+00
+00
+01
+00
+00
+00
+32
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a0
+7a
+00
+00
+00
+00
+00
+00
+78
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+62
+00
+00
+00
+08
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+98
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+67
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+18
+7c
+00
+00
+00
+00
+00
+00
+58
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+16
+01
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+70
+80
+00
+00
+00
+00
+00
+00
+b0
+04
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+13
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+74
+00
+00
+00
+01
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+85
+00
+00
+00
+00
+00
+00
+58
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+28
+01
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+78
+89
+00
+00
+00
+00
+00
+00
+58
+02
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+15
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+7e
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d0
+8b
+00
+00
+00
+00
+00
+00
+1e
+26
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+89
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ee
+b1
+00
+00
+00
+00
+00
+00
+7e
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+37
+01
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6c
+b4
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+18
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+99
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+84
+b4
+00
+00
+00
+00
+00
+00
+30
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4c
+01
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b4
+b4
+00
+00
+00
+00
+00
+00
+30
+00
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+1a
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+a8
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e4
+b4
+00
+00
+00
+00
+00
+00
+f0
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b6
+00
+00
+00
+01
+00
+00
+00
+30
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d4
+b5
+00
+00
+00
+00
+00
+00
+75
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+c1
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+49
+bd
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
diff --git a/modules/dbgfmts/dwarf2/tests/passwin64/Makefile.inc b/modules/dbgfmts/dwarf2/tests/passwin64/Makefile.inc
new file mode 100644
index 00000000..32027367
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/tests/passwin64/Makefile.inc
@@ -0,0 +1,9 @@
+# $Id$
+
+TESTS += modules/dbgfmts/dwarf2/tests/passwin64/dwarf2_passwin64_test.sh
+
+EXTRA_DIST += modules/dbgfmts/dwarf2/tests/passwin64/dwarf2_passwin64_test.sh
+EXTRA_DIST += modules/dbgfmts/dwarf2/tests/passwin64/dwarfwin64_testhd.asm
+EXTRA_DIST += modules/dbgfmts/dwarf2/tests/passwin64/dwarfwin64_testhd.errwarn
+EXTRA_DIST += modules/dbgfmts/dwarf2/tests/passwin64/dwarfwin64_testhd.hex
+
diff --git a/modules/dbgfmts/dwarf2/tests/passwin64/dwarf2_passwin64_test.sh b/modules/dbgfmts/dwarf2/tests/passwin64/dwarf2_passwin64_test.sh
new file mode 100755
index 00000000..e892d33e
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/tests/passwin64/dwarf2_passwin64_test.sh
@@ -0,0 +1,4 @@
+#! /bin/sh
+# $Id$
+${srcdir}/out_test.sh dwarf2_passwin64_test modules/dbgfmts/dwarf2/tests/passwin64 "dwarf2 dbgfmt passwin64" "-f win64 -p gas -g dwarf2" ".o"
+exit $?
diff --git a/modules/dbgfmts/dwarf2/tests/passwin64/dwarfwin64_testhd.asm b/modules/dbgfmts/dwarf2/tests/passwin64/dwarfwin64_testhd.asm
new file mode 100644
index 00000000..d4e2ca43
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/tests/passwin64/dwarfwin64_testhd.asm
@@ -0,0 +1,1132 @@
+ .file "test_hd.c"
+ .section .debug_abbrev,"",@progbits
+.Ldebug_abbrev0:
+ .section .debug_info,"",@progbits
+.Ldebug_info0:
+ .section .debug_line,"",@progbits
+.Ldebug_line0:
+ .text
+.Ltext0:
+ .section .rodata.str1.1,"aMS",@progbits,1
+.LC0:
+ .string "Usage: %s <file>\n"
+.LC1:
+ .string "rb"
+.LC2:
+ .string "Could not open `%s'.\n"
+.LC3:
+ .string "%02x \n"
+.LC4:
+ .string "Error reading from `%s'.\n"
+ .text
+ .p2align 4,,15
+.globl main
+ .type main, @function
+main:
+.LFB26:
+ .file 1 "test_hd.c"
+ .loc 1 33 0
+.LVL0:
+ movq %rbp, -16(%rsp)
+.LCFI0:
+ movq %rbx, -24(%rsp)
+.LCFI1:
+ movq %rsi, %rbp
+ movq %r12, -8(%rsp)
+.LCFI2:
+ subq $24, %rsp
+.LCFI3:
+.LVL1:
+ .loc 1 37 0
+ cmpl $2, %edi
+ je .L2
+.LVL2:
+ .loc 1 38 0
+ movq (%rsi), %rdx
+ movq stderr(%rip), %rdi
+.LVL3:
+ movl $.LC0, %esi
+ xorl %eax, %eax
+ call fprintf
+ movl $1, %eax
+.LVL4:
+.L4:
+ .loc 1 59 0
+ movq (%rsp), %rbx
+.LVL5:
+ movq 8(%rsp), %rbp
+.LVL6:
+ movq 16(%rsp), %r12
+ addq $24, %rsp
+.LVL7:
+ ret
+.LVL8:
+ .p2align 4,,7
+.L2:
+ .loc 1 42 0
+ movq 8(%rbp), %rdi
+.LVL9:
+ leaq 8(%rsi), %r12
+ movl $.LC1, %esi
+ call fopen
+.LVL10:
+ .loc 1 44 0
+ testq %rax, %rax
+.LVL11:
+ .loc 1 42 0
+ movq %rax, %rbx
+.LVL12:
+ .loc 1 44 0
+ jne .L12
+ jmp .L16
+.LVL13:
+ .p2align 4,,7
+.L7:
+ .loc 1 50 0
+ movl %eax, %esi
+ movl $.LC3, %edi
+ xorl %eax, %eax
+.LVL14:
+ call printf
+.LVL15:
+.L12:
+ .loc 1 49 0
+ movq %rbx, %rdi
+ call fgetc
+.LVL16:
+ cmpl $-1, %eax
+ jne .L7
+ .loc 1 52 0
+ movq %rbx, %rdi
+ call ferror
+.LVL17:
+ testl %eax, %eax
+ .p2align 4,,2
+ jne .L15
+ .loc 1 57 0
+ movq %rbx, %rdi
+ call fclose
+ .loc 1 59 0
+ movq (%rsp), %rbx
+.LVL18:
+ movq 8(%rsp), %rbp
+.LVL19:
+ .loc 1 57 0
+ xorl %eax, %eax
+ .loc 1 59 0
+ movq 16(%rsp), %r12
+ addq $24, %rsp
+.LVL20:
+ ret
+.LVL21:
+.L15:
+ .loc 1 53 0
+ movq (%r12), %rdx
+ movq stderr(%rip), %rdi
+ movl $.LC4, %esi
+ xorl %eax, %eax
+ call fprintf
+ .loc 1 59 0
+ movq (%rsp), %rbx
+.LVL22:
+ movq 8(%rsp), %rbp
+.LVL23:
+ .loc 1 53 0
+ movl $1, %eax
+ .loc 1 59 0
+ movq 16(%rsp), %r12
+ addq $24, %rsp
+.LVL24:
+ ret
+.LVL25:
+.L16:
+ .loc 1 45 0
+ movq 8(%rbp), %rdx
+ movq stderr(%rip), %rdi
+ movl $.LC2, %esi
+ xorl %eax, %eax
+ call fprintf
+ movl $1, %eax
+ jmp .L4
+.LFE26:
+ .size main, .-main
+ .section .debug_frame,"",@progbits
+.Lframe0:
+ .long .LECIE0-.LSCIE0
+.LSCIE0:
+ .long 0xffffffff
+ .byte 0x1
+ .string ""
+ .uleb128 0x1
+ .sleb128 -8
+ .byte 0x10
+ .byte 0xc
+ .uleb128 0x7
+ .uleb128 0x8
+ .byte 0x90
+ .uleb128 0x1
+ .align 8
+.LECIE0:
+.LSFDE0:
+ .long .LEFDE0-.LASFDE0
+.LASFDE0:
+ .long .Lframe0
+ .quad .LFB26
+ .quad .LFE26-.LFB26
+ .byte 0x4
+ .long .LCFI1-.LFB26
+ .byte 0x83
+ .uleb128 0x4
+ .byte 0x86
+ .uleb128 0x3
+ .byte 0x4
+ .long .LCFI3-.LCFI1
+ .byte 0xe
+ .uleb128 0x20
+ .byte 0x8c
+ .uleb128 0x2
+ .align 8
+.LEFDE0:
+ .section .eh_frame,"a",@progbits
+.Lframe1:
+ .long .LECIE1-.LSCIE1
+.LSCIE1:
+ .long 0x0
+ .byte 0x1
+ .string ""
+ .uleb128 0x1
+ .sleb128 -8
+ .byte 0x10
+ .byte 0xc
+ .uleb128 0x7
+ .uleb128 0x8
+ .byte 0x90
+ .uleb128 0x1
+ .align 8
+.LECIE1:
+.LSFDE1:
+ .long .LEFDE1-.LASFDE1
+.LASFDE1:
+ .long .LASFDE1-.Lframe1
+ .quad .LFB26
+ .quad .LFE26-.LFB26
+ .byte 0x4
+ .long .LCFI1-.LFB26
+ .byte 0x83
+ .uleb128 0x4
+ .byte 0x86
+ .uleb128 0x3
+ .byte 0x4
+ .long .LCFI3-.LCFI1
+ .byte 0xe
+ .uleb128 0x20
+ .byte 0x8c
+ .uleb128 0x2
+ .align 8
+.LEFDE1:
+ .file 2 "/usr/include/stdio.h"
+ .file 3 "/usr/include/libio.h"
+ .file 4 "/usr/include/bits/types.h"
+ .text
+.Letext0:
+ .section .debug_loc,"",@progbits
+.Ldebug_loc0:
+.LLST0:
+ .quad .LVL0-.Ltext0
+ .quad .LVL1-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL1-.Ltext0
+ .quad .LVL7-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL7-.Ltext0
+ .quad .LVL8-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL8-.Ltext0
+ .quad .LVL20-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL20-.Ltext0
+ .quad .LVL21-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL21-.Ltext0
+ .quad .LVL24-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad .LVL24-.Ltext0
+ .quad .LVL25-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 -24
+ .quad .LVL25-.Ltext0
+ .quad .LFE26-.Ltext0
+ .value 0x2
+ .byte 0x77
+ .sleb128 0
+ .quad 0x0
+ .quad 0x0
+.LLST1:
+ .quad .LVL0-.Ltext0
+ .quad .LVL3-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad .LVL8-.Ltext0
+ .quad .LVL9-.Ltext0
+ .value 0x1
+ .byte 0x55
+ .quad 0x0
+ .quad 0x0
+.LLST2:
+ .quad .LVL0-.Ltext0
+ .quad .LVL2-.Ltext0
+ .value 0x1
+ .byte 0x54
+ .quad .LVL2-.Ltext0
+ .quad .LVL6-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL8-.Ltext0
+ .quad .LVL19-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL21-.Ltext0
+ .quad .LVL23-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad .LVL25-.Ltext0
+ .quad .LFE26-.Ltext0
+ .value 0x1
+ .byte 0x56
+ .quad 0x0
+ .quad 0x0
+.LLST3:
+ .quad .LVL4-.Ltext0
+ .quad .LVL5-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL10-.Ltext0
+ .quad .LVL11-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL12-.Ltext0
+ .quad .LVL18-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL21-.Ltext0
+ .quad .LVL22-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad .LVL25-.Ltext0
+ .quad .LFE26-.Ltext0
+ .value 0x1
+ .byte 0x53
+ .quad 0x0
+ .quad 0x0
+.LLST4:
+ .quad .LVL13-.Ltext0
+ .quad .LVL14-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad .LVL14-.Ltext0
+ .quad .LVL15-.Ltext0
+ .value 0x1
+ .byte 0x54
+ .quad .LVL16-.Ltext0
+ .quad .LVL17-.Ltext0
+ .value 0x1
+ .byte 0x50
+ .quad 0x0
+ .quad 0x0
+ .section .debug_info
+ .long 0x347
+ .value 0x2
+ .long .Ldebug_abbrev0
+ .byte 0x8
+ .uleb128 0x1
+ .long .Ldebug_line0
+ .quad .Letext0
+ .quad .Ltext0
+ .long .LASF51
+ .byte 0x1
+ .long .LASF52
+ .long .LASF53
+ .uleb128 0x2
+ .long .LASF0
+ .byte 0x8
+ .byte 0x7
+ .uleb128 0x2
+ .long .LASF1
+ .byte 0x1
+ .byte 0x8
+ .uleb128 0x2
+ .long .LASF2
+ .byte 0x2
+ .byte 0x7
+ .uleb128 0x2
+ .long .LASF3
+ .byte 0x4
+ .byte 0x7
+ .uleb128 0x2
+ .long .LASF4
+ .byte 0x1
+ .byte 0x6
+ .uleb128 0x2
+ .long .LASF5
+ .byte 0x2
+ .byte 0x5
+ .uleb128 0x3
+ .string "int"
+ .byte 0x4
+ .byte 0x5
+ .uleb128 0x2
+ .long .LASF6
+ .byte 0x8
+ .byte 0x5
+ .uleb128 0x4
+ .long .LASF7
+ .byte 0x4
+ .byte 0x8f
+ .long 0x5e
+ .uleb128 0x4
+ .long .LASF8
+ .byte 0x4
+ .byte 0x90
+ .long 0x5e
+ .uleb128 0x2
+ .long .LASF0
+ .byte 0x8
+ .byte 0x7
+ .uleb128 0x5
+ .byte 0x8
+ .uleb128 0x6
+ .byte 0x8
+ .long 0x8a
+ .uleb128 0x2
+ .long .LASF9
+ .byte 0x1
+ .byte 0x6
+ .uleb128 0x4
+ .long .LASF10
+ .byte 0x2
+ .byte 0x2e
+ .long 0x9c
+ .uleb128 0x7
+ .long 0x238
+ .long .LASF38
+ .byte 0xd8
+ .byte 0x2
+ .byte 0x2e
+ .uleb128 0x8
+ .long .LASF11
+ .byte 0x3
+ .value 0x10c
+ .long 0x57
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .uleb128 0x8
+ .long .LASF12
+ .byte 0x3
+ .value 0x111
+ .long 0x84
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x8
+ .uleb128 0x8
+ .long .LASF13
+ .byte 0x3
+ .value 0x112
+ .long 0x84
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x10
+ .uleb128 0x8
+ .long .LASF14
+ .byte 0x3
+ .value 0x113
+ .long 0x84
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x18
+ .uleb128 0x8
+ .long .LASF15
+ .byte 0x3
+ .value 0x114
+ .long 0x84
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x20
+ .uleb128 0x8
+ .long .LASF16
+ .byte 0x3
+ .value 0x115
+ .long 0x84
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x28
+ .uleb128 0x8
+ .long .LASF17
+ .byte 0x3
+ .value 0x116
+ .long 0x84
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x30
+ .uleb128 0x8
+ .long .LASF18
+ .byte 0x3
+ .value 0x117
+ .long 0x84
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x38
+ .uleb128 0x8
+ .long .LASF19
+ .byte 0x3
+ .value 0x118
+ .long 0x84
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x40
+ .uleb128 0x8
+ .long .LASF20
+ .byte 0x3
+ .value 0x11a
+ .long 0x84
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x48
+ .uleb128 0x8
+ .long .LASF21
+ .byte 0x3
+ .value 0x11b
+ .long 0x84
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x50
+ .uleb128 0x8
+ .long .LASF22
+ .byte 0x3
+ .value 0x11c
+ .long 0x84
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x58
+ .uleb128 0x8
+ .long .LASF23
+ .byte 0x3
+ .value 0x11e
+ .long 0x276
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x60
+ .uleb128 0x8
+ .long .LASF24
+ .byte 0x3
+ .value 0x120
+ .long 0x27c
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x68
+ .uleb128 0x8
+ .long .LASF25
+ .byte 0x3
+ .value 0x122
+ .long 0x57
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x70
+ .uleb128 0x8
+ .long .LASF26
+ .byte 0x3
+ .value 0x126
+ .long 0x57
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x74
+ .uleb128 0x8
+ .long .LASF27
+ .byte 0x3
+ .value 0x128
+ .long 0x65
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x78
+ .uleb128 0x8
+ .long .LASF28
+ .byte 0x3
+ .value 0x12c
+ .long 0x3b
+ .byte 0x3
+ .byte 0x23
+ .uleb128 0x80
+ .uleb128 0x8
+ .long .LASF29
+ .byte 0x3
+ .value 0x12d
+ .long 0x49
+ .byte 0x3
+ .byte 0x23
+ .uleb128 0x82
+ .uleb128 0x8
+ .long .LASF30
+ .byte 0x3
+ .value 0x12e
+ .long 0x282
+ .byte 0x3
+ .byte 0x23
+ .uleb128 0x83
+ .uleb128 0x8
+ .long .LASF31
+ .byte 0x3
+ .value 0x132
+ .long 0x292
+ .byte 0x3
+ .byte 0x23
+ .uleb128 0x88
+ .uleb128 0x8
+ .long .LASF32
+ .byte 0x3
+ .value 0x13b
+ .long 0x70
+ .byte 0x3
+ .byte 0x23
+ .uleb128 0x90
+ .uleb128 0x8
+ .long .LASF33
+ .byte 0x3
+ .value 0x141
+ .long 0x82
+ .byte 0x3
+ .byte 0x23
+ .uleb128 0x98
+ .uleb128 0x8
+ .long .LASF34
+ .byte 0x3
+ .value 0x142
+ .long 0x82
+ .byte 0x3
+ .byte 0x23
+ .uleb128 0xa0
+ .uleb128 0x8
+ .long .LASF35
+ .byte 0x3
+ .value 0x144
+ .long 0x57
+ .byte 0x3
+ .byte 0x23
+ .uleb128 0xa8
+ .uleb128 0x8
+ .long .LASF36
+ .byte 0x3
+ .value 0x146
+ .long 0x298
+ .byte 0x3
+ .byte 0x23
+ .uleb128 0xac
+ .byte 0x0
+ .uleb128 0x9
+ .long .LASF37
+ .byte 0x3
+ .byte 0xb0
+ .uleb128 0x7
+ .long 0x276
+ .long .LASF39
+ .byte 0x18
+ .byte 0x3
+ .byte 0xb6
+ .uleb128 0xa
+ .long .LASF40
+ .byte 0x3
+ .byte 0xb7
+ .long 0x276
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x0
+ .uleb128 0xa
+ .long .LASF41
+ .byte 0x3
+ .byte 0xb8
+ .long 0x27c
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x8
+ .uleb128 0xa
+ .long .LASF42
+ .byte 0x3
+ .byte 0xbc
+ .long 0x57
+ .byte 0x2
+ .byte 0x23
+ .uleb128 0x10
+ .byte 0x0
+ .uleb128 0x6
+ .byte 0x8
+ .long 0x23f
+ .uleb128 0x6
+ .byte 0x8
+ .long 0x9c
+ .uleb128 0xb
+ .long 0x292
+ .long 0x8a
+ .uleb128 0xc
+ .long 0x7b
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x6
+ .byte 0x8
+ .long 0x238
+ .uleb128 0xb
+ .long 0x2a8
+ .long 0x8a
+ .uleb128 0xc
+ .long 0x7b
+ .byte 0x2b
+ .byte 0x0
+ .uleb128 0x2
+ .long .LASF43
+ .byte 0x8
+ .byte 0x7
+ .uleb128 0x2
+ .long .LASF44
+ .byte 0x8
+ .byte 0x5
+ .uleb128 0xd
+ .long 0x317
+ .byte 0x1
+ .long .LASF54
+ .byte 0x1
+ .byte 0x21
+ .byte 0x1
+ .long 0x57
+ .quad .LFB26
+ .quad .LFE26
+ .long .LLST0
+ .uleb128 0xe
+ .long .LASF45
+ .byte 0x1
+ .byte 0x20
+ .long 0x57
+ .long .LLST1
+ .uleb128 0xe
+ .long .LASF46
+ .byte 0x1
+ .byte 0x20
+ .long 0x317
+ .long .LLST2
+ .uleb128 0xf
+ .long .LASF47
+ .byte 0x1
+ .byte 0x22
+ .long 0x31d
+ .long .LLST3
+ .uleb128 0x10
+ .string "ch"
+ .byte 0x1
+ .byte 0x23
+ .long 0x57
+ .long .LLST4
+ .byte 0x0
+ .uleb128 0x6
+ .byte 0x8
+ .long 0x84
+ .uleb128 0x6
+ .byte 0x8
+ .long 0x91
+ .uleb128 0x11
+ .long .LASF48
+ .byte 0x2
+ .byte 0x8e
+ .long 0x27c
+ .byte 0x1
+ .byte 0x1
+ .uleb128 0x11
+ .long .LASF49
+ .byte 0x2
+ .byte 0x8f
+ .long 0x27c
+ .byte 0x1
+ .byte 0x1
+ .uleb128 0x11
+ .long .LASF50
+ .byte 0x2
+ .byte 0x90
+ .long 0x27c
+ .byte 0x1
+ .byte 0x1
+ .byte 0x0
+ .section .debug_abbrev
+ .uleb128 0x1
+ .uleb128 0x11
+ .byte 0x1
+ .uleb128 0x10
+ .uleb128 0x6
+ .uleb128 0x12
+ .uleb128 0x1
+ .uleb128 0x11
+ .uleb128 0x1
+ .uleb128 0x25
+ .uleb128 0xe
+ .uleb128 0x13
+ .uleb128 0xb
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x1b
+ .uleb128 0xe
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x2
+ .uleb128 0x24
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3e
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x24
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3e
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x4
+ .uleb128 0x16
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x5
+ .uleb128 0xf
+ .byte 0x0
+ .uleb128 0xb
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x6
+ .uleb128 0xf
+ .byte 0x0
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x7
+ .uleb128 0x13
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0xb
+ .uleb128 0xb
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x8
+ .uleb128 0xd
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0x5
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x38
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x9
+ .uleb128 0x16
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xa
+ .uleb128 0xd
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x38
+ .uleb128 0xa
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xb
+ .uleb128 0x1
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0x49
+ .uleb128 0x13
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xc
+ .uleb128 0x21
+ .byte 0x0
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2f
+ .uleb128 0xb
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xd
+ .uleb128 0x2e
+ .byte 0x1
+ .uleb128 0x1
+ .uleb128 0x13
+ .uleb128 0x3f
+ .uleb128 0xc
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x27
+ .uleb128 0xc
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x11
+ .uleb128 0x1
+ .uleb128 0x12
+ .uleb128 0x1
+ .uleb128 0x40
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xe
+ .uleb128 0x5
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0xf
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x10
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0x8
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x2
+ .uleb128 0x6
+ .byte 0x0
+ .byte 0x0
+ .uleb128 0x11
+ .uleb128 0x34
+ .byte 0x0
+ .uleb128 0x3
+ .uleb128 0xe
+ .uleb128 0x3a
+ .uleb128 0xb
+ .uleb128 0x3b
+ .uleb128 0xb
+ .uleb128 0x49
+ .uleb128 0x13
+ .uleb128 0x3f
+ .uleb128 0xc
+ .uleb128 0x3c
+ .uleb128 0xc
+ .byte 0x0
+ .byte 0x0
+ .byte 0x0
+ .section .debug_pubnames,"",@progbits
+ .long 0x17
+ .value 0x2
+ .long .Ldebug_info0
+ .long 0x34b
+ .long 0x2b6
+ .string "main"
+ .long 0x0
+ .section .debug_aranges,"",@progbits
+ .long 0x2c
+ .value 0x2
+ .long .Ldebug_info0
+ .byte 0x8
+ .byte 0x0
+ .value 0x0
+ .value 0x0
+ .quad .Ltext0
+ .quad .Letext0-.Ltext0
+ .quad 0x0
+ .quad 0x0
+ .section .debug_str,"MS",@progbits,1
+.LASF7:
+ .string "__off_t"
+.LASF12:
+ .string "_IO_read_ptr"
+.LASF24:
+ .string "_chain"
+.LASF30:
+ .string "_shortbuf"
+.LASF4:
+ .string "signed char"
+.LASF18:
+ .string "_IO_buf_base"
+.LASF43:
+ .string "long long unsigned int"
+.LASF44:
+ .string "long long int"
+.LASF47:
+ .string "bfile"
+.LASF25:
+ .string "_fileno"
+.LASF13:
+ .string "_IO_read_end"
+.LASF6:
+ .string "long int"
+.LASF11:
+ .string "_flags"
+.LASF19:
+ .string "_IO_buf_end"
+.LASF28:
+ .string "_cur_column"
+.LASF27:
+ .string "_old_offset"
+.LASF32:
+ .string "_offset"
+.LASF54:
+ .string "main"
+.LASF48:
+ .string "stdin"
+.LASF3:
+ .string "unsigned int"
+.LASF0:
+ .string "long unsigned int"
+.LASF52:
+ .string "test_hd.c"
+.LASF16:
+ .string "_IO_write_ptr"
+.LASF41:
+ .string "_sbuf"
+.LASF2:
+ .string "short unsigned int"
+.LASF31:
+ .string "_lock"
+.LASF49:
+ .string "stdout"
+.LASF26:
+ .string "_flags2"
+.LASF35:
+ .string "_mode"
+.LASF10:
+ .string "FILE"
+.LASF20:
+ .string "_IO_save_base"
+.LASF17:
+ .string "_IO_write_end"
+.LASF53:
+ .string "/home/pete/yasm"
+.LASF37:
+ .string "_IO_lock_t"
+.LASF38:
+ .string "_IO_FILE"
+.LASF39:
+ .string "_IO_marker"
+.LASF42:
+ .string "_pos"
+.LASF23:
+ .string "_markers"
+.LASF1:
+ .string "unsigned char"
+.LASF5:
+ .string "short int"
+.LASF29:
+ .string "_vtable_offset"
+.LASF9:
+ .string "char"
+.LASF51:
+ .string "GNU C 4.0.2 (Debian 4.0.2-2)"
+.LASF40:
+ .string "_next"
+.LASF8:
+ .string "__off64_t"
+.LASF14:
+ .string "_IO_read_base"
+.LASF22:
+ .string "_IO_save_end"
+.LASF33:
+ .string "__pad1"
+.LASF34:
+ .string "__pad2"
+.LASF36:
+ .string "_unused2"
+.LASF50:
+ .string "stderr"
+.LASF46:
+ .string "argv"
+.LASF21:
+ .string "_IO_backup_base"
+.LASF45:
+ .string "argc"
+.LASF15:
+ .string "_IO_write_base"
+ .ident "GCC: (GNU) 4.0.2 (Debian 4.0.2-2)"
+ .section .note.GNU-stack,"",@progbits
diff --git a/modules/dbgfmts/dwarf2/tests/passwin64/dwarfwin64_testhd.errwarn b/modules/dbgfmts/dwarf2/tests/passwin64/dwarfwin64_testhd.errwarn
new file mode 100644
index 00000000..c00bbe1e
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/tests/passwin64/dwarfwin64_testhd.errwarn
@@ -0,0 +1,15 @@
+-:2: warning: Unrecognized qualifier `progbits'
+-:4: warning: Unrecognized qualifier `progbits'
+-:6: warning: Unrecognized qualifier `progbits'
+-:10: warning: unrecognized section attribute: `M'
+-:10: warning: unrecognized section attribute: `S'
+-:10: warning: Unrecognized qualifier `progbits'
+-:153: warning: Unrecognized qualifier `progbits'
+-:190: warning: Unrecognized qualifier `progbits'
+-:232: warning: Unrecognized qualifier `progbits'
+-:1000: warning: Unrecognized qualifier `progbits'
+-:1008: warning: Unrecognized qualifier `progbits'
+-:1020: warning: unrecognized section attribute: `M'
+-:1020: warning: unrecognized section attribute: `S'
+-:1020: warning: Unrecognized qualifier `progbits'
+-:1132: warning: Unrecognized qualifier `progbits'
diff --git a/modules/dbgfmts/dwarf2/tests/passwin64/dwarfwin64_testhd.hex b/modules/dbgfmts/dwarf2/tests/passwin64/dwarfwin64_testhd.hex
new file mode 100644
index 00000000..41ed7bcb
--- /dev/null
+++ b/modules/dbgfmts/dwarf2/tests/passwin64/dwarfwin64_testhd.hex
@@ -0,0 +1,7552 @@
+64
+86
+0d
+00
+00
+00
+00
+00
+17
+11
+00
+00
+9d
+00
+00
+00
+00
+00
+00
+00
+2e
+74
+65
+78
+74
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+01
+00
+00
+1c
+02
+00
+00
+20
+03
+00
+00
+00
+00
+00
+00
+10
+00
+00
+00
+20
+00
+50
+60
+2f
+34
+00
+00
+00
+00
+00
+00
+04
+01
+00
+00
+00
+00
+00
+00
+e8
+00
+00
+00
+c0
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+00
+10
+42
+2f
+31
+38
+00
+00
+00
+00
+00
+ec
+01
+00
+00
+00
+00
+00
+00
+4b
+03
+00
+00
+a8
+04
+00
+00
+f3
+07
+00
+00
+00
+00
+00
+00
+43
+00
+00
+00
+40
+00
+10
+42
+2f
+33
+30
+00
+00
+00
+00
+00
+37
+05
+00
+00
+00
+00
+00
+00
+9f
+00
+00
+00
+91
+0a
+00
+00
+30
+0b
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+40
+00
+10
+42
+2f
+34
+32
+00
+00
+00
+00
+00
+d6
+05
+00
+00
+00
+00
+00
+00
+4c
+00
+00
+00
+3a
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+00
+40
+40
+2f
+35
+37
+00
+00
+00
+00
+00
+22
+06
+00
+00
+00
+00
+00
+00
+48
+00
+00
+00
+86
+0b
+00
+00
+ce
+0b
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+40
+00
+40
+42
+2f
+37
+30
+00
+00
+00
+00
+00
+6a
+06
+00
+00
+00
+00
+00
+00
+48
+00
+00
+00
+e2
+0b
+00
+00
+2a
+0c
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+20
+00
+40
+60
+2f
+38
+30
+00
+00
+00
+00
+00
+b2
+06
+00
+00
+00
+00
+00
+00
+0d
+02
+00
+00
+34
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+00
+10
+42
+2f
+39
+31
+00
+00
+00
+00
+00
+bf
+08
+00
+00
+00
+00
+00
+00
+1b
+00
+00
+00
+41
+0e
+00
+00
+5c
+0e
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+40
+00
+10
+42
+2f
+31
+30
+37
+00
+00
+00
+00
+da
+08
+00
+00
+00
+00
+00
+00
+30
+00
+00
+00
+66
+0e
+00
+00
+96
+0e
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+40
+00
+10
+42
+2f
+31
+32
+32
+00
+00
+00
+00
+0a
+09
+00
+00
+00
+00
+00
+00
+4a
+02
+00
+00
+aa
+0e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+00
+10
+42
+2e
+63
+6f
+6d
+6d
+65
+6e
+74
+54
+0b
+00
+00
+00
+00
+00
+00
+23
+00
+00
+00
+f4
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+42
+2f
+31
+33
+33
+00
+00
+00
+00
+77
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+00
+00
+60
+48
+89
+6c
+24
+f0
+48
+89
+5c
+24
+e8
+48
+89
+f5
+4c
+89
+64
+24
+f8
+48
+83
+ec
+18
+83
+ff
+02
+74
+35
+48
+8b
+16
+48
+8b
+3d
+00
+00
+00
+00
+be
+00
+00
+00
+00
+31
+c0
+e8
+00
+00
+00
+00
+b8
+01
+00
+00
+00
+48
+8b
+1c
+24
+48
+8b
+6c
+24
+08
+4c
+8b
+64
+24
+10
+48
+83
+c4
+18
+c3
+66
+66
+66
+90
+66
+66
+90
+48
+8b
+7d
+08
+4c
+8d
+66
+08
+be
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+48
+85
+c0
+48
+89
+c3
+75
+14
+eb
+77
+66
+66
+66
+90
+89
+c6
+bf
+00
+00
+00
+00
+31
+c0
+e8
+00
+00
+00
+00
+48
+89
+df
+e8
+00
+00
+00
+00
+83
+f8
+ff
+75
+e5
+48
+89
+df
+e8
+00
+00
+00
+00
+85
+c0
+75
+1d
+48
+89
+df
+e8
+00
+00
+00
+00
+48
+8b
+1c
+24
+48
+8b
+6c
+24
+08
+31
+c0
+4c
+8b
+64
+24
+10
+48
+83
+c4
+18
+c3
+49
+8b
+14
+24
+48
+8b
+3d
+00
+00
+00
+00
+be
+00
+00
+00
+00
+31
+c0
+e8
+00
+00
+00
+00
+48
+8b
+1c
+24
+48
+8b
+6c
+24
+08
+b8
+01
+00
+00
+00
+4c
+8b
+64
+24
+10
+48
+83
+c4
+18
+c3
+48
+8b
+55
+08
+48
+8b
+3d
+00
+00
+00
+00
+be
+00
+00
+00
+00
+31
+c0
+e8
+00
+00
+00
+00
+b8
+01
+00
+00
+00
+e9
+32
+ff
+ff
+ff
+21
+00
+00
+00
+1f
+00
+00
+00
+04
+00
+26
+00
+00
+00
+10
+00
+00
+00
+02
+00
+2d
+00
+00
+00
+21
+00
+00
+00
+04
+00
+59
+00
+00
+00
+11
+00
+00
+00
+02
+00
+5e
+00
+00
+00
+29
+00
+00
+00
+04
+00
+73
+00
+00
+00
+13
+00
+00
+00
+02
+00
+7a
+00
+00
+00
+32
+00
+00
+00
+04
+00
+82
+00
+00
+00
+34
+00
+00
+00
+04
+00
+8f
+00
+00
+00
+36
+00
+00
+00
+04
+00
+9b
+00
+00
+00
+39
+00
+00
+00
+04
+00
+bb
+00
+00
+00
+1f
+00
+00
+00
+04
+00
+c0
+00
+00
+00
+14
+00
+00
+00
+02
+00
+c7
+00
+00
+00
+21
+00
+00
+00
+04
+00
+ea
+00
+00
+00
+1f
+00
+00
+00
+04
+00
+ef
+00
+00
+00
+12
+00
+00
+00
+02
+00
+f6
+00
+00
+00
+21
+00
+00
+00
+04
+00
+01
+11
+01
+10
+06
+12
+01
+11
+01
+25
+0e
+13
+0b
+03
+0e
+1b
+0e
+00
+00
+02
+24
+00
+03
+0e
+0b
+0b
+3e
+0b
+00
+00
+03
+24
+00
+03
+08
+0b
+0b
+3e
+0b
+00
+00
+04
+16
+00
+03
+0e
+3a
+0b
+3b
+0b
+49
+13
+00
+00
+05
+0f
+00
+0b
+0b
+00
+00
+06
+0f
+00
+0b
+0b
+49
+13
+00
+00
+07
+13
+01
+01
+13
+03
+0e
+0b
+0b
+3a
+0b
+3b
+0b
+00
+00
+08
+0d
+00
+03
+0e
+3a
+0b
+3b
+05
+49
+13
+38
+0a
+00
+00
+09
+16
+00
+03
+0e
+3a
+0b
+3b
+0b
+00
+00
+0a
+0d
+00
+03
+0e
+3a
+0b
+3b
+0b
+49
+13
+38
+0a
+00
+00
+0b
+01
+01
+01
+13
+49
+13
+00
+00
+0c
+21
+00
+49
+13
+2f
+0b
+00
+00
+0d
+2e
+01
+01
+13
+3f
+0c
+03
+0e
+3a
+0b
+3b
+0b
+27
+0c
+49
+13
+11
+01
+12
+01
+40
+06
+00
+00
+0e
+05
+00
+03
+0e
+3a
+0b
+3b
+0b
+49
+13
+02
+06
+00
+00
+0f
+34
+00
+03
+0e
+3a
+0b
+3b
+0b
+49
+13
+02
+06
+00
+00
+10
+34
+00
+03
+08
+3a
+0b
+3b
+0b
+49
+13
+02
+06
+00
+00
+11
+34
+00
+03
+0e
+3a
+0b
+3b
+0b
+49
+13
+3f
+0c
+3c
+0c
+00
+00
+00
+47
+03
+00
+00
+02
+00
+00
+00
+00
+00
+08
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+00
+08
+07
+02
+00
+00
+00
+00
+01
+08
+02
+00
+00
+00
+00
+02
+07
+02
+00
+00
+00
+00
+04
+07
+02
+00
+00
+00
+00
+01
+06
+02
+00
+00
+00
+00
+02
+05
+03
+69
+6e
+74
+00
+04
+05
+02
+00
+00
+00
+00
+08
+05
+04
+00
+00
+00
+00
+04
+8f
+5e
+00
+00
+00
+04
+00
+00
+00
+00
+04
+90
+5e
+00
+00
+00
+02
+00
+00
+00
+00
+08
+07
+05
+08
+06
+08
+8a
+00
+00
+00
+02
+00
+00
+00
+00
+01
+06
+04
+00
+00
+00
+00
+02
+2e
+9c
+00
+00
+00
+07
+38
+02
+00
+00
+00
+00
+00
+00
+d8
+02
+2e
+08
+00
+00
+00
+00
+03
+0c
+01
+57
+00
+00
+00
+02
+23
+00
+08
+00
+00
+00
+00
+03
+11
+01
+84
+00
+00
+00
+02
+23
+08
+08
+00
+00
+00
+00
+03
+12
+01
+84
+00
+00
+00
+02
+23
+10
+08
+00
+00
+00
+00
+03
+13
+01
+84
+00
+00
+00
+02
+23
+18
+08
+00
+00
+00
+00
+03
+14
+01
+84
+00
+00
+00
+02
+23
+20
+08
+00
+00
+00
+00
+03
+15
+01
+84
+00
+00
+00
+02
+23
+28
+08
+00
+00
+00
+00
+03
+16
+01
+84
+00
+00
+00
+02
+23
+30
+08
+00
+00
+00
+00
+03
+17
+01
+84
+00
+00
+00
+02
+23
+38
+08
+00
+00
+00
+00
+03
+18
+01
+84
+00
+00
+00
+02
+23
+40
+08
+00
+00
+00
+00
+03
+1a
+01
+84
+00
+00
+00
+02
+23
+48
+08
+00
+00
+00
+00
+03
+1b
+01
+84
+00
+00
+00
+02
+23
+50
+08
+00
+00
+00
+00
+03
+1c
+01
+84
+00
+00
+00
+02
+23
+58
+08
+00
+00
+00
+00
+03
+1e
+01
+76
+02
+00
+00
+02
+23
+60
+08
+00
+00
+00
+00
+03
+20
+01
+7c
+02
+00
+00
+02
+23
+68
+08
+00
+00
+00
+00
+03
+22
+01
+57
+00
+00
+00
+02
+23
+70
+08
+00
+00
+00
+00
+03
+26
+01
+57
+00
+00
+00
+02
+23
+74
+08
+00
+00
+00
+00
+03
+28
+01
+65
+00
+00
+00
+02
+23
+78
+08
+00
+00
+00
+00
+03
+2c
+01
+3b
+00
+00
+00
+03
+23
+80
+01
+08
+00
+00
+00
+00
+03
+2d
+01
+49
+00
+00
+00
+03
+23
+82
+01
+08
+00
+00
+00
+00
+03
+2e
+01
+82
+02
+00
+00
+03
+23
+83
+01
+08
+00
+00
+00
+00
+03
+32
+01
+92
+02
+00
+00
+03
+23
+88
+01
+08
+00
+00
+00
+00
+03
+3b
+01
+70
+00
+00
+00
+03
+23
+90
+01
+08
+00
+00
+00
+00
+03
+41
+01
+82
+00
+00
+00
+03
+23
+98
+01
+08
+00
+00
+00
+00
+03
+42
+01
+82
+00
+00
+00
+03
+23
+a0
+01
+08
+00
+00
+00
+00
+03
+44
+01
+57
+00
+00
+00
+03
+23
+a8
+01
+08
+00
+00
+00
+00
+03
+46
+01
+98
+02
+00
+00
+03
+23
+ac
+01
+00
+09
+00
+00
+00
+00
+03
+b0
+07
+76
+02
+00
+00
+00
+00
+00
+00
+18
+03
+b6
+0a
+00
+00
+00
+00
+03
+b7
+76
+02
+00
+00
+02
+23
+00
+0a
+00
+00
+00
+00
+03
+b8
+7c
+02
+00
+00
+02
+23
+08
+0a
+00
+00
+00
+00
+03
+bc
+57
+00
+00
+00
+02
+23
+10
+00
+06
+08
+3f
+02
+00
+00
+06
+08
+9c
+00
+00
+00
+0b
+92
+02
+00
+00
+8a
+00
+00
+00
+0c
+7b
+00
+00
+00
+00
+00
+06
+08
+38
+02
+00
+00
+0b
+a8
+02
+00
+00
+8a
+00
+00
+00
+0c
+7b
+00
+00
+00
+2b
+00
+02
+00
+00
+00
+00
+08
+07
+02
+00
+00
+00
+00
+08
+05
+0d
+17
+03
+00
+00
+01
+00
+00
+00
+00
+01
+21
+01
+57
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0e
+00
+00
+00
+00
+01
+20
+57
+00
+00
+00
+00
+00
+00
+00
+0e
+00
+00
+00
+00
+01
+20
+17
+03
+00
+00
+00
+00
+00
+00
+0f
+00
+00
+00
+00
+01
+22
+1d
+03
+00
+00
+00
+00
+00
+00
+10
+63
+68
+00
+01
+23
+57
+00
+00
+00
+00
+00
+00
+00
+00
+06
+08
+84
+00
+00
+00
+06
+08
+91
+00
+00
+00
+11
+00
+00
+00
+00
+02
+8e
+7c
+02
+00
+00
+01
+01
+11
+00
+00
+00
+00
+02
+8f
+7c
+02
+00
+00
+01
+01
+11
+00
+00
+00
+00
+02
+90
+7c
+02
+00
+00
+01
+01
+00
+06
+00
+00
+00
+06
+00
+00
+00
+02
+00
+0c
+00
+00
+00
+0c
+00
+00
+00
+02
+00
+10
+00
+00
+00
+53
+00
+00
+00
+01
+00
+18
+00
+00
+00
+0d
+00
+00
+00
+01
+00
+20
+00
+00
+00
+5c
+00
+00
+00
+02
+00
+25
+00
+00
+00
+5d
+00
+00
+00
+02
+00
+29
+00
+00
+00
+5e
+00
+00
+00
+02
+00
+2e
+00
+00
+00
+5f
+00
+00
+00
+02
+00
+35
+00
+00
+00
+60
+00
+00
+00
+02
+00
+3c
+00
+00
+00
+61
+00
+00
+00
+02
+00
+43
+00
+00
+00
+62
+00
+00
+00
+02
+00
+4a
+00
+00
+00
+63
+00
+00
+00
+02
+00
+51
+00
+00
+00
+64
+00
+00
+00
+02
+00
+5f
+00
+00
+00
+65
+00
+00
+00
+02
+00
+66
+00
+00
+00
+66
+00
+00
+00
+02
+00
+71
+00
+00
+00
+67
+00
+00
+00
+02
+00
+7c
+00
+00
+00
+5f
+00
+00
+00
+02
+00
+8b
+00
+00
+00
+68
+00
+00
+00
+02
+00
+92
+00
+00
+00
+69
+00
+00
+00
+02
+00
+a1
+00
+00
+00
+6a
+00
+00
+00
+02
+00
+a9
+00
+00
+00
+6b
+00
+00
+00
+02
+00
+b8
+00
+00
+00
+6c
+00
+00
+00
+02
+00
+c7
+00
+00
+00
+6d
+00
+00
+00
+02
+00
+d6
+00
+00
+00
+6e
+00
+00
+00
+02
+00
+e5
+00
+00
+00
+6f
+00
+00
+00
+02
+00
+f4
+00
+00
+00
+70
+00
+00
+00
+02
+00
+03
+01
+00
+00
+71
+00
+00
+00
+02
+00
+12
+01
+00
+00
+72
+00
+00
+00
+02
+00
+21
+01
+00
+00
+73
+00
+00
+00
+02
+00
+30
+01
+00
+00
+74
+00
+00
+00
+02
+00
+3f
+01
+00
+00
+75
+00
+00
+00
+02
+00
+4e
+01
+00
+00
+76
+00
+00
+00
+02
+00
+5d
+01
+00
+00
+77
+00
+00
+00
+02
+00
+6c
+01
+00
+00
+78
+00
+00
+00
+02
+00
+7b
+01
+00
+00
+79
+00
+00
+00
+02
+00
+8a
+01
+00
+00
+7a
+00
+00
+00
+02
+00
+99
+01
+00
+00
+7b
+00
+00
+00
+02
+00
+a8
+01
+00
+00
+7c
+00
+00
+00
+02
+00
+b8
+01
+00
+00
+7d
+00
+00
+00
+02
+00
+c8
+01
+00
+00
+7e
+00
+00
+00
+02
+00
+d8
+01
+00
+00
+7f
+00
+00
+00
+02
+00
+e8
+01
+00
+00
+80
+00
+00
+00
+02
+00
+f8
+01
+00
+00
+81
+00
+00
+00
+02
+00
+08
+02
+00
+00
+82
+00
+00
+00
+02
+00
+18
+02
+00
+00
+83
+00
+00
+00
+02
+00
+28
+02
+00
+00
+84
+00
+00
+00
+02
+00
+39
+02
+00
+00
+85
+00
+00
+00
+02
+00
+44
+02
+00
+00
+86
+00
+00
+00
+02
+00
+4c
+02
+00
+00
+87
+00
+00
+00
+02
+00
+5a
+02
+00
+00
+88
+00
+00
+00
+02
+00
+68
+02
+00
+00
+89
+00
+00
+00
+02
+00
+a9
+02
+00
+00
+8a
+00
+00
+00
+02
+00
+b0
+02
+00
+00
+8b
+00
+00
+00
+02
+00
+bc
+02
+00
+00
+8c
+00
+00
+00
+02
+00
+c7
+02
+00
+00
+16
+00
+00
+00
+01
+00
+cf
+02
+00
+00
+42
+00
+00
+00
+01
+00
+d7
+02
+00
+00
+57
+00
+00
+00
+02
+00
+dc
+02
+00
+00
+8d
+00
+00
+00
+02
+00
+e6
+02
+00
+00
+58
+00
+00
+00
+02
+00
+eb
+02
+00
+00
+8e
+00
+00
+00
+02
+00
+f5
+02
+00
+00
+59
+00
+00
+00
+02
+00
+fa
+02
+00
+00
+8f
+00
+00
+00
+02
+00
+04
+03
+00
+00
+5a
+00
+00
+00
+02
+00
+12
+03
+00
+00
+5b
+00
+00
+00
+02
+00
+24
+03
+00
+00
+90
+00
+00
+00
+02
+00
+31
+03
+00
+00
+91
+00
+00
+00
+02
+00
+3e
+03
+00
+00
+92
+00
+00
+00
+02
+00
+9b
+00
+00
+00
+02
+00
+60
+00
+00
+00
+01
+01
+fb
+0e
+0d
+00
+01
+01
+01
+01
+00
+00
+00
+01
+00
+00
+01
+2f
+75
+73
+72
+2f
+69
+6e
+63
+6c
+75
+64
+65
+00
+2f
+75
+73
+72
+2f
+69
+6e
+63
+6c
+75
+64
+65
+2f
+62
+69
+74
+73
+00
+00
+74
+65
+73
+74
+5f
+68
+64
+2e
+63
+00
+00
+00
+00
+73
+74
+64
+69
+6f
+2e
+68
+00
+01
+00
+00
+6c
+69
+62
+69
+6f
+2e
+68
+00
+01
+00
+00
+74
+79
+70
+65
+73
+2e
+68
+00
+02
+00
+00
+00
+00
+09
+02
+00
+00
+00
+00
+00
+00
+00
+00
+03
+20
+01
+08
+5c
+59
+03
+15
+08
+9e
+03
+6f
+08
+90
+08
+22
+3a
+3e
+88
+d5
+cb
+bf
+84
+8e
+30
+03
+7a
+9e
+08
+6c
+03
+7a
+90
+5e
+03
+72
+9e
+02
+21
+00
+01
+01
+6d
+00
+00
+00
+17
+00
+00
+00
+01
+00
+55
+73
+61
+67
+65
+3a
+20
+25
+73
+20
+3c
+66
+69
+6c
+65
+3e
+0a
+00
+72
+62
+00
+43
+6f
+75
+6c
+64
+20
+6e
+6f
+74
+20
+6f
+70
+65
+6e
+20
+60
+25
+73
+27
+2e
+0a
+00
+25
+30
+32
+78
+20
+0a
+00
+45
+72
+72
+6f
+72
+20
+72
+65
+61
+64
+69
+6e
+67
+20
+66
+72
+6f
+6d
+20
+60
+25
+73
+27
+2e
+0a
+00
+14
+00
+00
+00
+ff
+ff
+ff
+ff
+01
+00
+01
+78
+10
+0c
+07
+08
+90
+01
+00
+00
+00
+00
+00
+00
+2c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+01
+00
+00
+00
+00
+00
+00
+04
+0a
+00
+00
+00
+83
+04
+86
+03
+04
+0c
+00
+00
+00
+0e
+20
+8c
+02
+00
+00
+00
+00
+00
+00
+1c
+00
+00
+00
+45
+00
+00
+00
+02
+00
+20
+00
+00
+00
+16
+00
+00
+00
+01
+00
+14
+00
+00
+00
+00
+00
+00
+00
+01
+00
+01
+78
+10
+0c
+07
+08
+90
+01
+00
+00
+00
+00
+00
+00
+2c
+00
+00
+00
+1c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+01
+00
+00
+00
+00
+00
+00
+04
+0a
+00
+00
+00
+83
+04
+86
+03
+04
+0c
+00
+00
+00
+0e
+20
+8c
+02
+00
+00
+00
+00
+00
+00
+20
+00
+00
+00
+16
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+16
+00
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+16
+00
+00
+00
+00
+00
+00
+00
+48
+00
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+48
+00
+00
+00
+00
+00
+00
+00
+49
+00
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+49
+00
+00
+00
+00
+00
+00
+00
+b3
+00
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+b3
+00
+00
+00
+00
+00
+00
+00
+b4
+00
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+b4
+00
+00
+00
+00
+00
+00
+00
+e2
+00
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+e2
+00
+00
+00
+00
+00
+00
+00
+e3
+00
+00
+00
+00
+00
+00
+00
+02
+00
+77
+68
+e3
+00
+00
+00
+00
+00
+00
+00
+04
+01
+00
+00
+00
+00
+00
+00
+02
+00
+77
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+25
+00
+00
+00
+00
+00
+00
+00
+01
+00
+55
+49
+00
+00
+00
+00
+00
+00
+00
+54
+00
+00
+00
+00
+00
+00
+00
+01
+00
+55
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1b
+00
+00
+00
+00
+00
+00
+00
+01
+00
+54
+1b
+00
+00
+00
+00
+00
+00
+00
+3f
+00
+00
+00
+00
+00
+00
+00
+01
+00
+56
+49
+00
+00
+00
+00
+00
+00
+00
+a8
+00
+00
+00
+00
+00
+00
+00
+01
+00
+56
+b4
+00
+00
+00
+00
+00
+00
+00
+d4
+00
+00
+00
+00
+00
+00
+00
+01
+00
+56
+e3
+00
+00
+00
+00
+00
+00
+00
+04
+01
+00
+00
+00
+00
+00
+00
+01
+00
+56
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+36
+00
+00
+00
+00
+00
+00
+00
+3a
+00
+00
+00
+00
+00
+00
+00
+01
+00
+53
+62
+00
+00
+00
+00
+00
+00
+00
+65
+00
+00
+00
+00
+00
+00
+00
+01
+00
+50
+68
+00
+00
+00
+00
+00
+00
+00
+a3
+00
+00
+00
+00
+00
+00
+00
+01
+00
+53
+b4
+00
+00
+00
+00
+00
+00
+00
+cf
+00
+00
+00
+00
+00
+00
+00
+01
+00
+53
+e3
+00
+00
+00
+00
+00
+00
+00
+04
+01
+00
+00
+00
+00
+00
+00
+01
+00
+53
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6c
+00
+00
+00
+00
+00
+00
+00
+79
+00
+00
+00
+00
+00
+00
+00
+01
+00
+50
+79
+00
+00
+00
+00
+00
+00
+00
+7e
+00
+00
+00
+00
+00
+00
+00
+01
+00
+54
+86
+00
+00
+00
+00
+00
+00
+00
+93
+00
+00
+00
+00
+00
+00
+00
+01
+00
+50
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+17
+00
+00
+00
+02
+00
+00
+00
+00
+00
+4b
+03
+00
+00
+b6
+02
+00
+00
+6d
+61
+69
+6e
+00
+00
+00
+00
+00
+06
+00
+00
+00
+09
+00
+00
+00
+02
+00
+2c
+00
+00
+00
+02
+00
+00
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+06
+00
+00
+00
+09
+00
+00
+00
+02
+00
+10
+00
+00
+00
+0d
+00
+00
+00
+01
+00
+5f
+5f
+6f
+66
+66
+5f
+74
+00
+5f
+49
+4f
+5f
+72
+65
+61
+64
+5f
+70
+74
+72
+00
+5f
+63
+68
+61
+69
+6e
+00
+5f
+73
+68
+6f
+72
+74
+62
+75
+66
+00
+73
+69
+67
+6e
+65
+64
+20
+63
+68
+61
+72
+00
+5f
+49
+4f
+5f
+62
+75
+66
+5f
+62
+61
+73
+65
+00
+6c
+6f
+6e
+67
+20
+6c
+6f
+6e
+67
+20
+75
+6e
+73
+69
+67
+6e
+65
+64
+20
+69
+6e
+74
+00
+6c
+6f
+6e
+67
+20
+6c
+6f
+6e
+67
+20
+69
+6e
+74
+00
+62
+66
+69
+6c
+65
+00
+5f
+66
+69
+6c
+65
+6e
+6f
+00
+5f
+49
+4f
+5f
+72
+65
+61
+64
+5f
+65
+6e
+64
+00
+6c
+6f
+6e
+67
+20
+69
+6e
+74
+00
+5f
+66
+6c
+61
+67
+73
+00
+5f
+49
+4f
+5f
+62
+75
+66
+5f
+65
+6e
+64
+00
+5f
+63
+75
+72
+5f
+63
+6f
+6c
+75
+6d
+6e
+00
+5f
+6f
+6c
+64
+5f
+6f
+66
+66
+73
+65
+74
+00
+5f
+6f
+66
+66
+73
+65
+74
+00
+6d
+61
+69
+6e
+00
+73
+74
+64
+69
+6e
+00
+75
+6e
+73
+69
+67
+6e
+65
+64
+20
+69
+6e
+74
+00
+6c
+6f
+6e
+67
+20
+75
+6e
+73
+69
+67
+6e
+65
+64
+20
+69
+6e
+74
+00
+74
+65
+73
+74
+5f
+68
+64
+2e
+63
+00
+5f
+49
+4f
+5f
+77
+72
+69
+74
+65
+5f
+70
+74
+72
+00
+5f
+73
+62
+75
+66
+00
+73
+68
+6f
+72
+74
+20
+75
+6e
+73
+69
+67
+6e
+65
+64
+20
+69
+6e
+74
+00
+5f
+6c
+6f
+63
+6b
+00
+73
+74
+64
+6f
+75
+74
+00
+5f
+66
+6c
+61
+67
+73
+32
+00
+5f
+6d
+6f
+64
+65
+00
+46
+49
+4c
+45
+00
+5f
+49
+4f
+5f
+73
+61
+76
+65
+5f
+62
+61
+73
+65
+00
+5f
+49
+4f
+5f
+77
+72
+69
+74
+65
+5f
+65
+6e
+64
+00
+2f
+68
+6f
+6d
+65
+2f
+70
+65
+74
+65
+2f
+79
+61
+73
+6d
+00
+5f
+49
+4f
+5f
+6c
+6f
+63
+6b
+5f
+74
+00
+5f
+49
+4f
+5f
+46
+49
+4c
+45
+00
+5f
+49
+4f
+5f
+6d
+61
+72
+6b
+65
+72
+00
+5f
+70
+6f
+73
+00
+5f
+6d
+61
+72
+6b
+65
+72
+73
+00
+75
+6e
+73
+69
+67
+6e
+65
+64
+20
+63
+68
+61
+72
+00
+73
+68
+6f
+72
+74
+20
+69
+6e
+74
+00
+5f
+76
+74
+61
+62
+6c
+65
+5f
+6f
+66
+66
+73
+65
+74
+00
+63
+68
+61
+72
+00
+47
+4e
+55
+20
+43
+20
+34
+2e
+30
+2e
+32
+20
+28
+44
+65
+62
+69
+61
+6e
+20
+34
+2e
+30
+2e
+32
+2d
+32
+29
+00
+5f
+6e
+65
+78
+74
+00
+5f
+5f
+6f
+66
+66
+36
+34
+5f
+74
+00
+5f
+49
+4f
+5f
+72
+65
+61
+64
+5f
+62
+61
+73
+65
+00
+5f
+49
+4f
+5f
+73
+61
+76
+65
+5f
+65
+6e
+64
+00
+5f
+5f
+70
+61
+64
+31
+00
+5f
+5f
+70
+61
+64
+32
+00
+5f
+75
+6e
+75
+73
+65
+64
+32
+00
+73
+74
+64
+65
+72
+72
+00
+61
+72
+67
+76
+00
+5f
+49
+4f
+5f
+62
+61
+63
+6b
+75
+70
+5f
+62
+61
+73
+65
+00
+61
+72
+67
+63
+00
+5f
+49
+4f
+5f
+77
+72
+69
+74
+65
+5f
+62
+61
+73
+65
+00
+00
+47
+43
+43
+3a
+20
+28
+47
+4e
+55
+29
+20
+34
+2e
+30
+2e
+32
+20
+28
+44
+65
+62
+69
+61
+6e
+20
+34
+2e
+30
+2e
+32
+2d
+32
+29
+00
+2e
+66
+69
+6c
+65
+00
+00
+00
+00
+00
+00
+00
+fe
+ff
+00
+00
+67
+01
+74
+65
+73
+74
+5f
+68
+64
+2e
+63
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+74
+65
+78
+74
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+03
+01
+04
+01
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+95
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+03
+01
+e8
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a3
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+03
+00
+00
+00
+00
+00
+b3
+00
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+03
+01
+4b
+03
+00
+00
+43
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+bf
+00
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+03
+00
+00
+00
+00
+00
+cd
+00
+00
+00
+00
+00
+00
+00
+04
+00
+00
+00
+03
+01
+9f
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d9
+00
+00
+00
+00
+00
+00
+00
+04
+00
+00
+00
+03
+00
+2e
+4c
+74
+65
+78
+74
+30
+00
+00
+00
+00
+00
+01
+00
+00
+00
+03
+00
+00
+00
+00
+00
+e7
+00
+00
+00
+00
+00
+00
+00
+05
+00
+00
+00
+03
+01
+4c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+4c
+43
+30
+00
+00
+00
+00
+00
+00
+00
+00
+05
+00
+00
+00
+03
+00
+2e
+4c
+43
+31
+00
+00
+00
+00
+12
+00
+00
+00
+05
+00
+00
+00
+03
+00
+2e
+4c
+43
+32
+00
+00
+00
+00
+15
+00
+00
+00
+05
+00
+00
+00
+03
+00
+2e
+4c
+43
+33
+00
+00
+00
+00
+2b
+00
+00
+00
+05
+00
+00
+00
+03
+00
+2e
+4c
+43
+34
+00
+00
+00
+00
+32
+00
+00
+00
+05
+00
+00
+00
+03
+00
+6d
+61
+69
+6e
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+02
+00
+2e
+4c
+46
+42
+32
+36
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+56
+4c
+30
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+43
+46
+49
+30
+00
+00
+05
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+43
+46
+49
+31
+00
+00
+0a
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+43
+46
+49
+32
+00
+00
+12
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+43
+46
+49
+33
+00
+00
+16
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+56
+4c
+31
+00
+00
+00
+16
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+32
+00
+00
+00
+00
+00
+50
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+56
+4c
+32
+00
+00
+00
+1b
+00
+00
+00
+01
+00
+00
+00
+03
+00
+73
+74
+64
+65
+72
+72
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+2e
+4c
+56
+4c
+33
+00
+00
+00
+25
+00
+00
+00
+01
+00
+00
+00
+03
+00
+66
+70
+72
+69
+6e
+74
+66
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+2e
+4c
+56
+4c
+34
+00
+00
+00
+36
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+34
+00
+00
+00
+00
+00
+36
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+56
+4c
+35
+00
+00
+00
+3a
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+56
+4c
+36
+00
+00
+00
+3f
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+56
+4c
+37
+00
+00
+00
+48
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+56
+4c
+38
+00
+00
+00
+49
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+56
+4c
+39
+00
+00
+00
+54
+00
+00
+00
+01
+00
+00
+00
+03
+00
+66
+6f
+70
+65
+6e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+2e
+4c
+56
+4c
+31
+30
+00
+00
+62
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+56
+4c
+31
+31
+00
+00
+65
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+56
+4c
+31
+32
+00
+00
+68
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+31
+32
+00
+00
+00
+00
+7e
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+31
+36
+00
+00
+00
+00
+e3
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+56
+4c
+31
+33
+00
+00
+6c
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+37
+00
+00
+00
+00
+00
+70
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+56
+4c
+31
+34
+00
+00
+79
+00
+00
+00
+01
+00
+00
+00
+03
+00
+70
+72
+69
+6e
+74
+66
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+2e
+4c
+56
+4c
+31
+35
+00
+00
+7e
+00
+00
+00
+01
+00
+00
+00
+03
+00
+66
+67
+65
+74
+63
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+2e
+4c
+56
+4c
+31
+36
+00
+00
+86
+00
+00
+00
+01
+00
+00
+00
+03
+00
+66
+65
+72
+72
+6f
+72
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+2e
+4c
+56
+4c
+31
+37
+00
+00
+93
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+31
+35
+00
+00
+00
+00
+b4
+00
+00
+00
+01
+00
+00
+00
+03
+00
+66
+63
+6c
+6f
+73
+65
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+2e
+4c
+56
+4c
+31
+38
+00
+00
+a3
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+56
+4c
+31
+39
+00
+00
+a8
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+56
+4c
+32
+30
+00
+00
+b3
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+56
+4c
+32
+31
+00
+00
+b4
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+56
+4c
+32
+32
+00
+00
+cf
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+56
+4c
+32
+33
+00
+00
+d4
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+56
+4c
+32
+34
+00
+00
+e2
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+56
+4c
+32
+35
+00
+00
+e3
+00
+00
+00
+01
+00
+00
+00
+03
+00
+2e
+4c
+46
+45
+32
+36
+00
+00
+04
+01
+00
+00
+01
+00
+00
+00
+03
+00
+00
+00
+00
+00
+f6
+00
+00
+00
+00
+00
+00
+00
+06
+00
+00
+00
+03
+01
+48
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+4c
+66
+72
+61
+6d
+65
+30
+00
+00
+00
+00
+06
+00
+00
+00
+03
+00
+2e
+4c
+45
+43
+49
+45
+30
+00
+18
+00
+00
+00
+06
+00
+00
+00
+03
+00
+2e
+4c
+53
+43
+49
+45
+30
+00
+04
+00
+00
+00
+06
+00
+00
+00
+03
+00
+2e
+4c
+53
+46
+44
+45
+30
+00
+18
+00
+00
+00
+06
+00
+00
+00
+03
+00
+2e
+4c
+45
+46
+44
+45
+30
+00
+48
+00
+00
+00
+06
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+44
+45
+30
+1c
+00
+00
+00
+06
+00
+00
+00
+03
+00
+00
+00
+00
+00
+03
+01
+00
+00
+00
+00
+00
+00
+07
+00
+00
+00
+03
+01
+48
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+4c
+66
+72
+61
+6d
+65
+31
+00
+00
+00
+00
+07
+00
+00
+00
+03
+00
+2e
+4c
+45
+43
+49
+45
+31
+00
+18
+00
+00
+00
+07
+00
+00
+00
+03
+00
+2e
+4c
+53
+43
+49
+45
+31
+00
+04
+00
+00
+00
+07
+00
+00
+00
+03
+00
+2e
+4c
+53
+46
+44
+45
+31
+00
+18
+00
+00
+00
+07
+00
+00
+00
+03
+00
+2e
+4c
+45
+46
+44
+45
+31
+00
+48
+00
+00
+00
+07
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+44
+45
+31
+1c
+00
+00
+00
+07
+00
+00
+00
+03
+00
+2e
+4c
+65
+74
+65
+78
+74
+30
+04
+01
+00
+00
+01
+00
+00
+00
+03
+00
+00
+00
+00
+00
+0d
+01
+00
+00
+00
+00
+00
+00
+08
+00
+00
+00
+03
+01
+0d
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+18
+01
+00
+00
+00
+00
+00
+00
+08
+00
+00
+00
+03
+00
+2e
+4c
+4c
+53
+54
+30
+00
+00
+00
+00
+00
+00
+08
+00
+00
+00
+03
+00
+2e
+4c
+4c
+53
+54
+31
+00
+00
+b0
+00
+00
+00
+08
+00
+00
+00
+03
+00
+2e
+4c
+4c
+53
+54
+32
+00
+00
+e6
+00
+00
+00
+08
+00
+00
+00
+03
+00
+2e
+4c
+4c
+53
+54
+33
+00
+00
+55
+01
+00
+00
+08
+00
+00
+00
+03
+00
+2e
+4c
+4c
+53
+54
+34
+00
+00
+c4
+01
+00
+00
+08
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+35
+31
+00
+bb
+01
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+35
+32
+00
+e5
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+35
+33
+00
+52
+01
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+30
+00
+00
+d3
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+31
+00
+00
+8f
+01
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+32
+00
+00
+03
+01
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+33
+00
+00
+c6
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+34
+00
+00
+26
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+35
+00
+00
+9d
+01
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+36
+00
+00
+7f
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+37
+00
+00
+00
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+38
+00
+00
+de
+01
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+39
+00
+00
+b6
+01
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+31
+30
+00
+31
+01
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+33
+38
+00
+6d
+01
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+31
+31
+00
+88
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+31
+32
+00
+08
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+31
+33
+00
+72
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+31
+34
+00
+e8
+01
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+31
+35
+00
+3b
+02
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+31
+36
+00
+ef
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+31
+37
+00
+44
+01
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+31
+38
+00
+32
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+31
+39
+00
+8f
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+32
+30
+00
+36
+01
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+32
+31
+00
+26
+02
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+32
+32
+00
+f6
+01
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+32
+33
+00
+86
+01
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+32
+34
+00
+15
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+32
+35
+00
+6a
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+32
+36
+00
+23
+01
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+32
+37
+00
+a7
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+32
+38
+00
+9b
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+32
+39
+00
+a7
+01
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+33
+30
+00
+1c
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+33
+31
+00
+16
+01
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+33
+32
+00
+b3
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+33
+33
+00
+03
+02
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+33
+34
+00
+0a
+02
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+33
+35
+00
+2b
+01
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+33
+36
+00
+11
+02
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+33
+37
+00
+62
+01
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+33
+39
+00
+76
+01
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+34
+30
+00
+d8
+01
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+34
+31
+00
+fd
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+34
+32
+00
+81
+01
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+34
+33
+00
+3f
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+34
+34
+00
+56
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+35
+34
+00
+bb
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+34
+35
+00
+36
+02
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+34
+36
+00
+21
+02
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+34
+37
+00
+64
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+34
+38
+00
+c0
+00
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+34
+39
+00
+1c
+01
+00
+00
+0b
+00
+00
+00
+03
+00
+2e
+4c
+41
+53
+46
+35
+30
+00
+1a
+02
+00
+00
+0b
+00
+00
+00
+03
+00
+00
+00
+00
+00
+25
+01
+00
+00
+00
+00
+00
+00
+09
+00
+00
+00
+03
+01
+1b
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+35
+01
+00
+00
+00
+00
+00
+00
+0a
+00
+00
+00
+03
+01
+30
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+44
+01
+00
+00
+00
+00
+00
+00
+0b
+00
+00
+00
+03
+01
+4a
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+63
+6f
+6d
+6d
+65
+6e
+74
+00
+00
+00
+00
+0c
+00
+00
+00
+03
+01
+23
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+4f
+01
+00
+00
+00
+00
+00
+00
+0d
+00
+00
+00
+03
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+5f
+01
+00
+00
+2e
+64
+65
+62
+75
+67
+5f
+61
+62
+62
+72
+65
+76
+00
+2e
+64
+65
+62
+75
+67
+5f
+69
+6e
+66
+6f
+00
+2e
+64
+65
+62
+75
+67
+5f
+6c
+69
+6e
+65
+00
+2e
+72
+6f
+64
+61
+74
+61
+2e
+73
+74
+72
+31
+2e
+31
+00
+2e
+64
+65
+62
+75
+67
+5f
+66
+72
+61
+6d
+65
+00
+2e
+65
+68
+5f
+66
+72
+61
+6d
+65
+00
+2e
+64
+65
+62
+75
+67
+5f
+6c
+6f
+63
+00
+2e
+64
+65
+62
+75
+67
+5f
+70
+75
+62
+6e
+61
+6d
+65
+73
+00
+2e
+64
+65
+62
+75
+67
+5f
+61
+72
+61
+6e
+67
+65
+73
+00
+2e
+64
+65
+62
+75
+67
+5f
+73
+74
+72
+00
+2e
+6e
+6f
+74
+65
+2e
+47
+4e
+55
+2d
+73
+74
+61
+63
+6b
+00
+2e
+64
+65
+62
+75
+67
+5f
+61
+62
+62
+72
+65
+76
+00
+2e
+4c
+64
+65
+62
+75
+67
+5f
+61
+62
+62
+72
+65
+76
+30
+00
+2e
+64
+65
+62
+75
+67
+5f
+69
+6e
+66
+6f
+00
+2e
+4c
+64
+65
+62
+75
+67
+5f
+69
+6e
+66
+6f
+30
+00
+2e
+64
+65
+62
+75
+67
+5f
+6c
+69
+6e
+65
+00
+2e
+4c
+64
+65
+62
+75
+67
+5f
+6c
+69
+6e
+65
+30
+00
+2e
+72
+6f
+64
+61
+74
+61
+2e
+73
+74
+72
+31
+2e
+31
+00
+2e
+64
+65
+62
+75
+67
+5f
+66
+72
+61
+6d
+65
+00
+2e
+65
+68
+5f
+66
+72
+61
+6d
+65
+00
+2e
+64
+65
+62
+75
+67
+5f
+6c
+6f
+63
+00
+2e
+4c
+64
+65
+62
+75
+67
+5f
+6c
+6f
+63
+30
+00
+2e
+64
+65
+62
+75
+67
+5f
+70
+75
+62
+6e
+61
+6d
+65
+73
+00
+2e
+64
+65
+62
+75
+67
+5f
+61
+72
+61
+6e
+67
+65
+73
+00
+2e
+64
+65
+62
+75
+67
+5f
+73
+74
+72
+00
+2e
+6e
+6f
+74
+65
+2e
+47
+4e
+55
+2d
+73
+74
+61
+63
+6b
+00
diff --git a/modules/dbgfmts/null/null-dbgfmt.c b/modules/dbgfmts/null/null-dbgfmt.c
index ef118840..0ec4928f 100644
--- a/modules/dbgfmts/null/null-dbgfmt.c
+++ b/modules/dbgfmts/null/null-dbgfmt.c
@@ -35,8 +35,7 @@ yasm_dbgfmt_module yasm_null_LTX_dbgfmt;
static /*@null@*/ /*@only@*/ yasm_dbgfmt *
-null_dbgfmt_create(const char *in_filename, const char *obj_filename,
- yasm_object *object, yasm_objfmt *of, yasm_arch *a)
+null_dbgfmt_create(yasm_object *object, yasm_objfmt *of, yasm_arch *a)
{
yasm_dbgfmt_base *dbgfmt = yasm_xmalloc(sizeof(yasm_dbgfmt_base));
dbgfmt->module = &yasm_null_LTX_dbgfmt;
@@ -51,13 +50,14 @@ null_dbgfmt_destroy(/*@only@*/ yasm_dbgfmt *dbgfmt)
static int
null_dbgfmt_directive(yasm_dbgfmt *dbgfmt, const char *name,
- yasm_valparamhead *valparams, unsigned long line)
+ yasm_section *sect, yasm_valparamhead *valparams,
+ unsigned long line)
{
return 1;
}
static void
-null_dbgfmt_generate(yasm_dbgfmt *dbgfmt)
+null_dbgfmt_generate(yasm_dbgfmt *dbgfmt, yasm_errwarns *errwarns)
{
}
diff --git a/modules/dbgfmts/stabs/stabs-dbgfmt.c b/modules/dbgfmts/stabs/stabs-dbgfmt.c
index 07794791..30d2c8df 100644
--- a/modules/dbgfmts/stabs/stabs-dbgfmt.c
+++ b/modules/dbgfmts/stabs/stabs-dbgfmt.c
@@ -85,7 +85,6 @@ typedef struct yasm_dbgfmt_stabs {
yasm_object *object;
yasm_symtab *symtab;
- const char *filename;
yasm_linemap *linemap;
yasm_arch *arch;
} yasm_dbgfmt_stabs;
@@ -105,6 +104,7 @@ typedef struct {
yasm_bytecode *basebc; /* base bytecode from which to track SLINEs */
yasm_dbgfmt_stabs *dbgfmt_stabs;
+ yasm_errwarns *errwarns;
} stabs_info;
typedef struct {
@@ -126,7 +126,7 @@ static yasm_bc_resolve_flags stabs_bc_str_resolve
(yasm_bytecode *bc, int save, yasm_calc_bc_dist_func calc_bc_dist);
static int stabs_bc_str_tobytes
(yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
+ yasm_output_value_func output_value,
/*@null@*/ yasm_output_reloc_func output_reloc);
static void stabs_bc_stab_destroy(void *contents);
@@ -136,7 +136,7 @@ static yasm_bc_resolve_flags stabs_bc_stab_resolve
(yasm_bytecode *bc, int save, yasm_calc_bc_dist_func calc_bc_dist);
static int stabs_bc_stab_tobytes
(yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
+ yasm_output_value_func output_value,
/*@null@*/ yasm_output_reloc_func output_reloc);
/* Bytecode callback structures */
@@ -146,7 +146,8 @@ static const yasm_bytecode_callback stabs_bc_str_callback = {
stabs_bc_str_print,
yasm_bc_finalize_common,
stabs_bc_str_resolve,
- stabs_bc_str_tobytes
+ stabs_bc_str_tobytes,
+ 0
};
static const yasm_bytecode_callback stabs_bc_stab_callback = {
@@ -154,19 +155,18 @@ static const yasm_bytecode_callback stabs_bc_stab_callback = {
stabs_bc_stab_print,
yasm_bc_finalize_common,
stabs_bc_stab_resolve,
- stabs_bc_stab_tobytes
+ stabs_bc_stab_tobytes,
+ 0
};
yasm_dbgfmt_module yasm_stabs_LTX_dbgfmt;
static /*@null@*/ /*@only@*/ yasm_dbgfmt *
-stabs_dbgfmt_create(const char *in_filename, const char *obj_filename,
- yasm_object *object, yasm_objfmt *of, yasm_arch *a)
+stabs_dbgfmt_create(yasm_object *object, yasm_objfmt *of, yasm_arch *a)
{
yasm_dbgfmt_stabs *dbgfmt_stabs = yasm_xmalloc(sizeof(yasm_dbgfmt_stabs));
dbgfmt_stabs->dbgfmt.module = &yasm_stabs_LTX_dbgfmt;
- dbgfmt_stabs->filename = in_filename;
dbgfmt_stabs->object = object;
dbgfmt_stabs->symtab = yasm_object_get_symtab(object);
dbgfmt_stabs->linemap = yasm_object_get_linemap(object);
@@ -302,12 +302,15 @@ stabs_dbgfmt_generate_sections(yasm_section *sect, /*@null@*/ void *d)
/* handle first (pseudo) bc separately */
stabs_dbgfmt_generate_n_fun(d, yasm_section_bcs_first(sect));
- yasm_section_bcs_traverse(sect, d, stabs_dbgfmt_generate_bcs);
+ yasm_section_bcs_traverse(sect, info->errwarns, d,
+ stabs_dbgfmt_generate_bcs);
if (yasm__strcasecmp(sectname, ".text")==0) {
/* Close out last function by appending a null SO stab after last bc */
yasm_bytecode *bc = yasm_section_bcs_last(sect);
- yasm_symrec *sym = yasm_symtab_define_label2(".n_so", bc, 1, bc->line);
+ yasm_symrec *sym =
+ yasm_symtab_define_label(yasm_object_get_symtab(
+ yasm_section_get_object(sect)), ".n_so", bc, 1, bc->line);
stabs_dbgfmt_append_stab(info, info->stab, 0, N_SO, 0, sym, bc, 0);
}
@@ -315,7 +318,7 @@ stabs_dbgfmt_generate_sections(yasm_section *sect, /*@null@*/ void *d)
}
static void
-stabs_dbgfmt_generate(yasm_dbgfmt *dbgfmt)
+stabs_dbgfmt_generate(yasm_dbgfmt *dbgfmt, yasm_errwarns *errwarns)
{
yasm_dbgfmt_stabs *dbgfmt_stabs = (yasm_dbgfmt_stabs *)dbgfmt;
stabs_info info;
@@ -334,30 +337,39 @@ stabs_dbgfmt_generate(yasm_dbgfmt *dbgfmt)
return;
info.dbgfmt_stabs = dbgfmt_stabs;
+ info.errwarns = errwarns;
info.lastline = 0;
info.stabcount = 0;
info.stab = yasm_object_get_general(dbgfmt_stabs->object, ".stab", 0, 4, 0,
0, &new, 0);
if (!new) {
yasm_bytecode *last = yasm_section_bcs_last(info.stab);
- if (last == NULL)
- yasm__error(yasm_section_bcs_first(info.stab)->line,
+ if (last == NULL) {
+ yasm_error_set(YASM_ERROR_GENERAL,
N_("stabs debugging conflicts with user-defined section .stab"));
- else
- yasm__warning(YASM_WARN_GENERAL, 0,
+ yasm_errwarn_propagate(errwarns,
+ yasm_section_bcs_first(info.stab)->line);
+ } else {
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("stabs debugging overrides empty section .stab"));
+ yasm_errwarn_propagate(errwarns, 0);
+ }
}
info.stabstr = yasm_object_get_general(dbgfmt_stabs->object, ".stabstr", 0,
1, 0, 0, &new, 0);
if (!new) {
yasm_bytecode *last = yasm_section_bcs_last(info.stabstr);
- if (last == NULL)
- yasm__error(yasm_section_bcs_first(info.stabstr)->line,
+ if (last == NULL) {
+ yasm_error_set(YASM_ERROR_GENERAL,
N_("stabs debugging conflicts with user-defined section .stabstr"));
- else
- yasm__warning(YASM_WARN_GENERAL, 0,
+ yasm_errwarn_propagate(errwarns,
+ yasm_section_bcs_first(info.stab)->line);
+ } else {
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("stabs debugging overrides empty section .stabstr"));
+ yasm_errwarn_propagate(errwarns, 0);
+ }
}
@@ -370,7 +382,8 @@ stabs_dbgfmt_generate(yasm_dbgfmt *dbgfmt)
/* initial strtab bytecodes */
nullbc = stabs_dbgfmt_append_bcstr(info.stabstr, "");
- filebc = stabs_dbgfmt_append_bcstr(info.stabstr, dbgfmt_stabs->filename);
+ filebc = stabs_dbgfmt_append_bcstr(info.stabstr,
+ yasm_object_get_source_fn(dbgfmt_stabs->object));
stext = yasm_object_find_general(dbgfmt_stabs->object, ".text");
firstsym = yasm_symtab_use(dbgfmt_stabs->symtab, ".text", 0);
@@ -398,7 +411,7 @@ stabs_dbgfmt_generate(yasm_dbgfmt *dbgfmt)
static int
stabs_bc_stab_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
+ yasm_output_value_func output_value,
yasm_output_reloc_func output_reloc)
{
/* This entire function, essentially the core of rendering stabs to a file,
@@ -432,7 +445,7 @@ stabs_bc_stab_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
static int
stabs_bc_str_tobytes(yasm_bytecode *bc, unsigned char **bufp, void *d,
- yasm_output_expr_func output_expr,
+ yasm_output_value_func output_value,
yasm_output_reloc_func output_reloc)
{
const char *str = (const char *)bc->contents;
@@ -493,7 +506,8 @@ stabs_bc_str_resolve(yasm_bytecode *bc, int save,
static int
stabs_dbgfmt_directive(yasm_dbgfmt *dbgfmt, const char *name,
- yasm_valparamhead *valparams, unsigned long line)
+ yasm_section *sect, yasm_valparamhead *valparams,
+ unsigned long line)
{
return 1;
}
diff --git a/modules/dbgfmts/stabs/tests/stabs-elf.hex b/modules/dbgfmts/stabs/tests/stabs-elf.hex
index 46c003c4..c2e9e3cf 100644
--- a/modules/dbgfmts/stabs/tests/stabs-elf.hex
+++ b/modules/dbgfmts/stabs/tests/stabs-elf.hex
@@ -30,7 +30,7 @@
00
00
00
-60
+80
04
00
00
@@ -131,7 +131,7 @@ c3
00
00
01
-0f
+11
00
00
18
@@ -139,7 +139,7 @@ c3
00
00
01
-03
+05
00
00
1e
@@ -147,7 +147,7 @@ c3
00
00
01
-11
+13
00
00
23
@@ -155,7 +155,7 @@ c3
00
00
01
-04
+06
00
00
2b
@@ -163,7 +163,7 @@ c3
00
00
01
-0f
+11
00
00
30
@@ -171,7 +171,7 @@ c3
00
00
01
-04
+06
00
00
35
@@ -179,7 +179,7 @@ c3
00
00
02
-10
+12
00
00
68
@@ -251,7 +251,7 @@ c3
00
00
01
-03
+05
00
00
38
@@ -259,7 +259,7 @@ c3
00
00
01
-0b
+0d
00
00
3c
@@ -267,7 +267,7 @@ c3
00
00
01
-0e
+10
00
00
01
@@ -575,7 +575,7 @@ c3
00
00
01
-09
+0b
00
00
20
@@ -583,7 +583,7 @@ c3
00
00
01
-0a
+0c
00
00
8c
@@ -591,7 +591,7 @@ c3
00
00
01
-0b
+0d
00
00
28
@@ -599,7 +599,7 @@ c3
00
00
01
-02
+04
00
00
00
@@ -645,6 +645,21 @@ c3
73
00
2e
+73
+74
+61
+62
+00
+2e
+73
+74
+61
+62
+73
+74
+72
+00
+2e
72
65
6c
@@ -665,12 +680,6 @@ c3
61
00
2e
-73
-74
-61
-62
-00
-2e
72
65
6c
@@ -683,15 +692,6 @@ c3
2e
73
74
-61
-62
-73
-74
-72
-00
-2e
-73
-74
72
74
61
@@ -862,6 +862,38 @@ c3
00
f1
ff
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+09
+00
69
00
00
@@ -1258,7 +1290,7 @@ d0
03
00
00
-20
+40
01
00
00
@@ -1266,7 +1298,7 @@ d0
00
00
00
-0a
+0c
00
00
00
@@ -1318,7 +1350,7 @@ d0
00
00
00
-12
+21
00
00
00
@@ -1398,7 +1430,7 @@ b8
00
00
00
-1c
+2b
00
00
00
@@ -1478,7 +1510,7 @@ f8
00
00
00
-26
+12
00
00
00
@@ -1518,7 +1550,7 @@ f8
00
00
00
-2c
+35
00
00
00
@@ -1558,7 +1590,7 @@ f8
00
00
00
-36
+18
00
00
00
diff --git a/modules/listfmts/nasm/nasm-listfmt.c b/modules/listfmts/nasm/nasm-listfmt.c
index 0bde6a95..0f197234 100644
--- a/modules/listfmts/nasm/nasm-listfmt.c
+++ b/modules/listfmts/nasm/nasm-listfmt.c
@@ -81,23 +81,33 @@ nasm_listfmt_destroy(/*@only@*/ yasm_listfmt *listfmt)
}
static int
-nasm_listfmt_output_expr(yasm_expr **ep, unsigned char *buf, size_t destsize,
- size_t valsize, int shift, unsigned long offset,
- yasm_bytecode *bc, int rel, int warn,
- /*@null@*/ void *d)
+nasm_listfmt_output_value(yasm_value *value, unsigned char *buf,
+ size_t destsize, unsigned long offset,
+ yasm_bytecode *bc, int warn, /*@null@*/ void *d)
{
/*@null@*/ nasm_listfmt_output_info *info = (nasm_listfmt_output_info *)d;
/*@dependent@*/ /*@null@*/ yasm_intnum *intn;
- /*@dependent@*/ /*@null@*/ const yasm_floatnum *flt;
+ unsigned int valsize = value->size;
assert(info != NULL);
+ /* Output */
+ switch (yasm_value_output_basic(value, buf, destsize, bc, warn, info->arch,
+ NULL)) {
+ case -1:
+ return 1;
+ case 0:
+ break;
+ default:
+ return 0;
+ }
+
/* Generate reloc if needed */
if (info->next_reloc && info->next_reloc_addr == bc->offset+offset) {
bcreloc *reloc = yasm_xmalloc(sizeof(bcreloc));
reloc->offset = offset;
reloc->size = destsize;
- reloc->rel = rel;
+ reloc->rel = value->curpos_rel;
STAILQ_INSERT_TAIL(&info->bcrelocs, reloc, link);
/* Get next reloc's info */
@@ -110,24 +120,21 @@ nasm_listfmt_output_expr(yasm_expr **ep, unsigned char *buf, size_t destsize,
}
}
- flt = yasm_expr_get_floatnum(ep);
- if (flt) {
- if (shift < 0)
- yasm_internal_error(N_("attempting to negative shift a float"));
- return yasm_arch_floatnum_tobytes(info->arch, flt, buf, destsize,
- valsize, (unsigned int)shift, 0,
- bc->line);
- }
-
- intn = yasm_expr_get_intnum(ep, NULL);
- if (intn)
- return yasm_arch_intnum_tobytes(info->arch, intn, buf, destsize,
- valsize, shift, bc, 0, bc->line);
- else {
+ if (value->abs) {
+ intn = yasm_expr_get_intnum(&value->abs, NULL);
+ if (intn)
+ return yasm_arch_intnum_tobytes(info->arch, intn, buf, destsize,
+ valsize, 0, bc, 0);
+ else {
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("relocation too complex"));
+ return 1;
+ }
+ } else {
int retval;
intn = yasm_intnum_create_uint(0);
retval = yasm_arch_intnum_tobytes(info->arch, intn, buf, destsize,
- valsize, shift, bc, 0, bc->line);
+ valsize, 0, bc, 0);
yasm_intnum_destroy(intn);
return retval;
}
@@ -207,9 +214,10 @@ nasm_listfmt_output(yasm_listfmt *listfmt, FILE *f, yasm_linemap *linemap,
/* convert bytecode into bytes, recording relocs along the
* way
*/
- bigbuf = yasm_bc_tobytes(bc, buf, &size, &multiple, &gap,
- &info, nasm_listfmt_output_expr,
- NULL);
+ bigbuf = yasm_bc_tobytes(bc, buf, &size, &gap, &info,
+ nasm_listfmt_output_value, NULL);
+ yasm_bc_get_multiple(bc, &multiple, NULL);
+ size /= multiple;
/* output bytes with reloc information */
origp = bigbuf ? bigbuf : buf;
diff --git a/modules/objfmts/bin/bin-objfmt.c b/modules/objfmts/bin/bin-objfmt.c
index ed57b67f..da84defd 100644
--- a/modules/objfmts/bin/bin-objfmt.c
+++ b/modules/objfmts/bin/bin-objfmt.c
@@ -47,8 +47,7 @@ yasm_objfmt_module yasm_bin_LTX_objfmt;
static yasm_objfmt *
-bin_objfmt_create(/*@unused@*/ const char *in_filename, yasm_object *object,
- yasm_arch *a)
+bin_objfmt_create(yasm_object *object, yasm_arch *a)
{
yasm_objfmt_bin *objfmt_bin = yasm_xmalloc(sizeof(yasm_objfmt_bin));
objfmt_bin->objfmt.module = &yasm_bin_LTX_objfmt;
@@ -117,7 +116,8 @@ bin_objfmt_expr_xform(/*@returned@*/ /*@only@*/ yasm_expr *e,
/* Transform symrecs that reference sections into
* start expr + intnum(dist).
*/
- if (e->terms[i].type == YASM_EXPR_SYM &&
+ if ((e->terms[i].type == YASM_EXPR_SYM ||
+ e->terms[i].type == YASM_EXPR_SYMEXP) &&
yasm_symrec_get_label(e->terms[i].data.sym, &precbc) &&
(sect = yasm_bc_get_section(precbc)) &&
(dist = yasm_common_calc_bc_dist(yasm_section_bcs_first(sect),
@@ -135,58 +135,48 @@ bin_objfmt_expr_xform(/*@returned@*/ /*@only@*/ yasm_expr *e,
}
static int
-bin_objfmt_output_expr(yasm_expr **ep, unsigned char *buf, size_t destsize,
- size_t valsize, int shift,
- /*@unused@*/ unsigned long offset, yasm_bytecode *bc,
- int rel, int warn, /*@null@*/ void *d)
+bin_objfmt_output_value(yasm_value *value, unsigned char *buf, size_t destsize,
+ /*@unused@*/ unsigned long offset, yasm_bytecode *bc,
+ int warn, /*@null@*/ void *d)
{
/*@null@*/ bin_objfmt_output_info *info = (bin_objfmt_output_info *)d;
- /*@dependent@*/ /*@null@*/ yasm_intnum *intn;
- /*@dependent@*/ /*@null@*/ const yasm_floatnum *flt;
+ /*@dependent@*/ /*@null@*/ yasm_bytecode *precbc;
+ /*@dependent@*/ yasm_section *sect;
assert(info != NULL);
- /* For binary output, this is trivial: any expression that doesn't simplify
- * to an integer is an error (references something external).
- * Other object formats need to generate their relocation list from here!
- */
-
- *ep = yasm_expr__level_tree(*ep, 1, 1, NULL, bin_objfmt_expr_xform, NULL,
- NULL);
-
- /* Handle floating point expressions */
- flt = yasm_expr_get_floatnum(ep);
- if (flt) {
- if (shift < 0)
- yasm_internal_error(N_("attempting to negative shift a float"));
- return yasm_arch_floatnum_tobytes(info->objfmt_bin->arch, flt, buf,
- destsize, valsize,
- (unsigned int)shift, warn, bc->line);
- }
-
- /* Handle integer expressions */
- intn = yasm_expr_get_intnum(ep, NULL);
- if (intn) {
- if (rel) {
- int retval = yasm_arch_intnum_fixup_rel(info->objfmt_bin->arch,
- intn, valsize, bc,
- bc->line);
- if (retval)
- return retval;
- }
- return yasm_arch_intnum_tobytes(info->objfmt_bin->arch, intn, buf,
- destsize, valsize, shift, bc, warn,
- bc->line);
+ /* Binary objects we need to resolve against object, not against section. */
+ if (value->rel && !value->curpos_rel
+ && yasm_symrec_get_label(value->rel, &precbc)
+ && (sect = yasm_bc_get_section(precbc))) {
+ if (!value->abs)
+ value->abs = yasm_expr_create_ident(yasm_expr_sym(value->rel),
+ bc->line);
+ else
+ value->abs =
+ yasm_expr_create(YASM_EXPR_ADD, yasm_expr_expr(value->abs),
+ yasm_expr_sym(value->rel), bc->line);
+ value->rel = NULL;
}
- /* Check for complex float expressions */
- if (yasm_expr__contains(*ep, YASM_EXPR_FLOAT)) {
- yasm__error(bc->line, N_("floating point expression too complex"));
- return 1;
+ /* Simplify absolute portion of value, transforming symrecs */
+ if (value->abs)
+ value->abs = yasm_expr__level_tree
+ (value->abs, 1, 1, 1, NULL, bin_objfmt_expr_xform, NULL, NULL);
+
+ /* Output */
+ switch (yasm_value_output_basic(value, buf, destsize, bc, warn,
+ info->objfmt_bin->arch, NULL)) {
+ case -1:
+ return 1;
+ case 0:
+ break;
+ default:
+ return 0;
}
/* Couldn't output, assume it contains an external reference. */
- yasm__error(bc->line,
+ yasm_error_set(YASM_ERROR_GENERAL,
N_("binary object format does not support external references"));
return 1;
}
@@ -197,14 +187,12 @@ bin_objfmt_output_bytecode(yasm_bytecode *bc, /*@null@*/ void *d)
/*@null@*/ bin_objfmt_output_info *info = (bin_objfmt_output_info *)d;
/*@null@*/ /*@only@*/ unsigned char *bigbuf;
unsigned long size = REGULAR_OUTBUF_SIZE;
- unsigned long multiple;
- unsigned long i;
int gap;
assert(info != NULL);
- bigbuf = yasm_bc_tobytes(bc, info->buf, &size, &multiple, &gap, info,
- bin_objfmt_output_expr, NULL);
+ bigbuf = yasm_bc_tobytes(bc, info->buf, &size, &gap, info,
+ bin_objfmt_output_value, NULL);
/* Don't bother doing anything else if size ended up being 0. */
if (size == 0) {
@@ -216,20 +204,19 @@ bin_objfmt_output_bytecode(yasm_bytecode *bc, /*@null@*/ void *d)
/* Warn that gaps are converted to 0 and write out the 0's. */
if (gap) {
unsigned long left;
- yasm__warning(YASM_WARN_UNINIT_CONTENTS, bc->line,
+ yasm_warn_set(YASM_WARN_UNINIT_CONTENTS,
N_("uninitialized space declared in code/data section: zeroing"));
/* Write out in chunks */
memset(info->buf, 0, REGULAR_OUTBUF_SIZE);
- left = multiple*size;
+ left = size;
while (left > REGULAR_OUTBUF_SIZE) {
fwrite(info->buf, REGULAR_OUTBUF_SIZE, 1, info->f);
left -= REGULAR_OUTBUF_SIZE;
}
fwrite(info->buf, left, 1, info->f);
} else {
- /* Output multiple copies of buf (or bigbuf if non-NULL) to file */
- for (i=0; i<multiple; i++)
- fwrite(bigbuf ? bigbuf : info->buf, (size_t)size, 1, info->f);
+ /* Output buf (or bigbuf if non-NULL) to file */
+ fwrite(bigbuf ? bigbuf : info->buf, (size_t)size, 1, info->f);
}
/* If bigbuf was allocated, free it */
@@ -240,8 +227,8 @@ bin_objfmt_output_bytecode(yasm_bytecode *bc, /*@null@*/ void *d)
}
static void
-bin_objfmt_output(yasm_objfmt *objfmt, FILE *f, const char *obj_filename,
- /*@unused@*/ int all_syms, /*@unused@*/ yasm_dbgfmt *df)
+bin_objfmt_output(yasm_objfmt *objfmt, FILE *f, /*@unused@*/ int all_syms,
+ /*@unused@*/ yasm_dbgfmt *df, yasm_errwarns *errwarns)
{
yasm_objfmt_bin *objfmt_bin = (yasm_objfmt_bin *)objfmt;
/*@observer@*/ /*@null@*/ yasm_section *text, *data, *bss, *prevsect;
@@ -276,7 +263,9 @@ bin_objfmt_output(yasm_objfmt *objfmt, FILE *f, const char *obj_filename,
assert(startexpr != NULL);
startnum = yasm_expr_get_intnum(&startexpr, NULL);
if (!startnum) {
- yasm__error(startexpr->line, N_("ORG expression too complex"));
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("ORG expression too complex"));
+ yasm_errwarn_propagate(errwarns, startexpr->line);
return;
}
start = yasm_intnum_get_uint(startnum);
@@ -307,7 +296,8 @@ bin_objfmt_output(yasm_objfmt *objfmt, FILE *f, const char *obj_filename,
/* Output .text first. */
info.sect = text;
info.start = textstart;
- yasm_section_bcs_traverse(text, &info, bin_objfmt_output_bytecode);
+ yasm_section_bcs_traverse(text, errwarns, &info,
+ bin_objfmt_output_bytecode);
/* If .data is present, output it */
if (data) {
@@ -320,7 +310,8 @@ bin_objfmt_output(yasm_objfmt *objfmt, FILE *f, const char *obj_filename,
/* Output .data bytecodes */
info.sect = data;
info.start = datastart;
- yasm_section_bcs_traverse(data, &info, bin_objfmt_output_bytecode);
+ yasm_section_bcs_traverse(data, errwarns,
+ &info, bin_objfmt_output_bytecode);
}
/* If .bss is present, check it for non-reserve bytecodes */
@@ -335,6 +326,31 @@ bin_objfmt_destroy(yasm_objfmt *objfmt)
yasm_xfree(objfmt);
}
+static void
+bin_objfmt_init_new_section(yasm_objfmt_bin *objfmt_bin, yasm_section *sect,
+ const char *sectname, unsigned long line)
+{
+ yasm_symtab_define_label(
+ yasm_object_get_symtab(objfmt_bin->object), sectname,
+ yasm_section_bcs_first(sect), 1, line);
+}
+
+static yasm_section *
+bin_objfmt_add_default_section(yasm_objfmt *objfmt)
+{
+ yasm_objfmt_bin *objfmt_bin = (yasm_objfmt_bin *)objfmt;
+ yasm_section *retval;
+ int isnew;
+
+ retval = yasm_object_get_general(objfmt_bin->object, ".text", 0, 16, 1, 0,
+ &isnew, 0);
+ if (isnew) {
+ bin_objfmt_init_new_section(objfmt_bin, retval, ".text", 0);
+ yasm_section_set_default(retval, 1);
+ }
+ return retval;
+}
+
static /*@observer@*/ /*@null@*/ yasm_section *
bin_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
/*@unused@*/ /*@null@*/
@@ -365,15 +381,15 @@ bin_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
resonly = 1;
} else {
/* other section names not recognized. */
- yasm__error(line, N_("segment name `%s' not recognized"),
- sectname);
+ yasm_error_set(YASM_ERROR_GENERAL,
+ N_("segment name `%s' not recognized"), sectname);
return NULL;
}
/* Check for ALIGN qualifier */
while ((vp = yasm_vps_next(vp))) {
if (!vp->val) {
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("Unrecognized numeric qualifier"));
continue;
}
@@ -382,7 +398,7 @@ bin_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
/*@dependent@*/ /*@null@*/ const yasm_intnum *align_expr;
if (strcmp(sectname, ".text") == 0) {
- yasm__error(line,
+ yasm_error_set(YASM_ERROR_GENERAL,
N_("cannot specify an alignment to the `%s' section"),
sectname);
return NULL;
@@ -390,7 +406,7 @@ bin_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
align_expr = yasm_expr_get_intnum(&vp->param, NULL);
if (!align_expr) {
- yasm__error(line,
+ yasm_error_set(YASM_ERROR_VALUE,
N_("argument to `%s' is not a power of two"),
vp->val);
return NULL;
@@ -399,7 +415,7 @@ bin_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
/* Alignments must be a power of two. */
if ((align & (align - 1)) != 0) {
- yasm__error(line,
+ yasm_error_set(YASM_ERROR_VALUE,
N_("argument to `%s' is not a power of two"),
vp->val);
return NULL;
@@ -414,12 +430,14 @@ bin_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
yasm_expr_int(yasm_intnum_create_uint(start)), line), align,
strcmp(sectname, ".text") == 0, resonly, &isnew, line);
- if (isnew) {
- yasm_symtab_define_label(
- yasm_object_get_symtab(objfmt_bin->object), sectname,
- yasm_section_bcs_first(retval), 1, line);
+ if (isnew)
+ bin_objfmt_init_new_section(objfmt_bin, retval, sectname, line);
+
+ if (isnew || yasm_section_is_default(retval)) {
+ yasm_section_set_default(retval, 0);
+ yasm_section_set_align(retval, align, line);
} else if (have_align)
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("alignment value ignored on section redeclaration"));
return retval;
@@ -436,7 +454,7 @@ bin_objfmt_extern_declare(yasm_objfmt *objfmt, const char *name,
yasm_objfmt_bin *objfmt_bin = (yasm_objfmt_bin *)objfmt;
yasm_symrec *sym;
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("binary object format does not support extern variables"));
sym = yasm_symtab_declare(objfmt_bin->symtab, name, YASM_SYM_EXTERN, line);
@@ -452,7 +470,7 @@ bin_objfmt_global_declare(yasm_objfmt *objfmt, const char *name,
yasm_objfmt_bin *objfmt_bin = (yasm_objfmt_bin *)objfmt;
yasm_symrec *sym;
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("binary object format does not support global variables"));
sym = yasm_symtab_declare(objfmt_bin->symtab, name, YASM_SYM_GLOBAL, line);
@@ -469,7 +487,7 @@ bin_objfmt_common_declare(yasm_objfmt *objfmt, const char *name,
yasm_symrec *sym;
yasm_expr_destroy(size);
- yasm__error(line,
+ yasm_error_set(YASM_ERROR_TYPE,
N_("binary object format does not support common variables"));
sym = yasm_symtab_declare(objfmt_bin->symtab, name, YASM_SYM_COMMON, line);
@@ -501,7 +519,8 @@ bin_objfmt_directive(yasm_objfmt *objfmt, const char *name,
}
if (!start) {
- yasm__error(line, N_("argument to ORG must be expression"));
+ yasm_error_set(YASM_ERROR_SYNTAX,
+ N_("argument to ORG must be expression"));
return 0;
}
@@ -529,13 +548,13 @@ yasm_objfmt_module yasm_bin_LTX_objfmt = {
"Flat format binary",
"bin",
NULL,
- ".text",
16,
bin_objfmt_dbgfmt_keywords,
"null",
bin_objfmt_create,
bin_objfmt_output,
bin_objfmt_destroy,
+ bin_objfmt_add_default_section,
bin_objfmt_section_switch,
bin_objfmt_extern_declare,
bin_objfmt_global_declare,
diff --git a/modules/objfmts/bin/tests/reserve-err.errwarn b/modules/objfmts/bin/tests/reserve-err.errwarn
index 25fb790a..814b3a3e 100644
--- a/modules/objfmts/bin/tests/reserve-err.errwarn
+++ b/modules/objfmts/bin/tests/reserve-err.errwarn
@@ -1,6 +1,6 @@
-:4: expression must not contain floating point value
-:5: expression must not contain floating point value
--:7: attempt to reserve non-constant quantity of space
+-:7: reserve expression not absolute
-:11: expression must not contain floating point value
-:12: expression must not contain floating point value
--:14: attempt to reserve non-constant quantity of space
+-:14: reserve expression not absolute
diff --git a/modules/objfmts/coff/coff-objfmt.c b/modules/objfmts/coff/coff-objfmt.c
index 31d3da97..6a3a9957 100644
--- a/modules/objfmts/coff/coff-objfmt.c
+++ b/modules/objfmts/coff/coff-objfmt.c
@@ -92,6 +92,7 @@ typedef struct coff_reloc {
#define COFF_STYP_STD_MASK 0x000003FFUL
#define COFF_STYP_ALIGN_MASK 0x00F00000UL
#define COFF_STYP_ALIGN_SHIFT 20
+#define COFF_STYP_NRELOC_OVFL 0x01000000UL
#define COFF_STYP_DISCARD 0x02000000UL
#define COFF_STYP_NOCACHE 0x04000000UL
#define COFF_STYP_NOPAGE 0x08000000UL
@@ -99,7 +100,7 @@ typedef struct coff_reloc {
#define COFF_STYP_EXECUTE 0x20000000UL
#define COFF_STYP_READ 0x40000000UL
#define COFF_STYP_WRITE 0x80000000UL
-#define COFF_STYP_WIN32_MASK 0xFE000000UL
+#define COFF_STYP_WIN32_MASK 0xFF000000UL
#define COFF_FLAG_NOBASE (1UL<<0) /* Use no-base (NB) relocs */
@@ -114,6 +115,7 @@ typedef struct coff_section_data {
unsigned long nreloc; /* number of relocation entries >64k -> error */
unsigned long flags2; /* internal flags (see COFF_FLAG_* above) */
unsigned long strtab_name; /* strtab offset of name if name > 8 chars */
+ int isdebug; /* is a debug section? */
} coff_section_data;
typedef enum coff_symrec_sclass {
@@ -182,10 +184,13 @@ typedef struct yasm_objfmt_coff {
yasm_object *object;
yasm_symtab *symtab;
/*@dependent@*/ yasm_arch *arch;
+
+ coff_symrec_data *filesym_data; /* Data for .file symbol */
} yasm_objfmt_coff;
typedef struct coff_objfmt_output_info {
yasm_objfmt_coff *objfmt_coff;
+ yasm_errwarns *errwarns;
/*@dependent@*/ FILE *f;
/*@only@*/ unsigned char *buf;
yasm_section *sect;
@@ -239,11 +244,10 @@ coff_objfmt_sym_set_data(yasm_symrec *sym, coff_symrec_sclass sclass,
}
static yasm_objfmt_coff *
-coff_common_create(const char *in_filename, yasm_object *object, yasm_arch *a)
+coff_common_create(yasm_object *object, yasm_arch *a)
{
yasm_objfmt_coff *objfmt_coff = yasm_xmalloc(sizeof(yasm_objfmt_coff));
yasm_symrec *filesym;
- coff_symrec_data *data;
objfmt_coff->object = object;
objfmt_coff->symtab = yasm_object_get_symtab(object);
@@ -260,18 +264,19 @@ coff_common_create(const char *in_filename, yasm_object *object, yasm_arch *a)
/* FIXME: misuse of NULL bytecode here; it works, but only barely. */
filesym = yasm_symtab_define_special(objfmt_coff->symtab, ".file",
YASM_SYM_GLOBAL);
- data = coff_objfmt_sym_set_data(filesym, COFF_SCL_FILE, NULL, 1,
- COFF_SYMTAB_AUX_FILE);
- data->aux[0].fname = yasm__xstrdup(in_filename);
+ objfmt_coff->filesym_data =
+ coff_objfmt_sym_set_data(filesym, COFF_SCL_FILE, NULL, 1,
+ COFF_SYMTAB_AUX_FILE);
+ /* Filename is set in coff_objfmt_output */
+ objfmt_coff->filesym_data->aux[0].fname = NULL;
return objfmt_coff;
}
static yasm_objfmt *
-coff_objfmt_create(const char *in_filename, yasm_object *object, yasm_arch *a)
+coff_objfmt_create(yasm_object *object, yasm_arch *a)
{
- yasm_objfmt_coff *objfmt_coff =
- coff_common_create(in_filename, object, a);
+ yasm_objfmt_coff *objfmt_coff = coff_common_create(object, a);
if (objfmt_coff) {
/* Support x86 and amd64 machines of x86 arch */
@@ -292,10 +297,9 @@ coff_objfmt_create(const char *in_filename, yasm_object *object, yasm_arch *a)
}
static yasm_objfmt *
-win32_objfmt_create(const char *in_filename, yasm_object *object, yasm_arch *a)
+win32_objfmt_create(yasm_object *object, yasm_arch *a)
{
- yasm_objfmt_coff *objfmt_coff =
- coff_common_create(in_filename, object, a);
+ yasm_objfmt_coff *objfmt_coff = coff_common_create(object, a);
if (objfmt_coff) {
/* Support x86 and amd64 machines of x86 arch.
@@ -319,10 +323,9 @@ win32_objfmt_create(const char *in_filename, yasm_object *object, yasm_arch *a)
}
static yasm_objfmt *
-win64_objfmt_create(const char *in_filename, yasm_object *object, yasm_arch *a)
+win64_objfmt_create(yasm_object *object, yasm_arch *a)
{
- yasm_objfmt_coff *objfmt_coff =
- coff_common_create(in_filename, object, a);
+ yasm_objfmt_coff *objfmt_coff = coff_common_create(object, a);
if (objfmt_coff) {
/* Support amd64 machine of x86 arch */
@@ -340,6 +343,64 @@ win64_objfmt_create(const char *in_filename, yasm_object *object, yasm_arch *a)
return (yasm_objfmt *)objfmt_coff;
}
+static coff_section_data *
+coff_objfmt_init_new_section(yasm_objfmt_coff *objfmt_coff, yasm_section *sect,
+ const char *sectname, unsigned long line)
+{
+ coff_section_data *data;
+ yasm_symrec *sym;
+
+ data = yasm_xmalloc(sizeof(coff_section_data));
+ data->scnum = objfmt_coff->parse_scnum++;
+ data->flags = 0;
+ data->addr = 0;
+ data->scnptr = 0;
+ data->size = 0;
+ data->relptr = 0;
+ data->nreloc = 0;
+ data->flags2 = 0;
+ data->strtab_name = 0;
+ data->isdebug = 0;
+ yasm_section_add_data(sect, &coff_section_data_cb, data);
+
+ sym = yasm_symtab_define_label(objfmt_coff->symtab, sectname,
+ yasm_section_bcs_first(sect), 1, line);
+ yasm_symrec_declare(sym, YASM_SYM_GLOBAL, line);
+ coff_objfmt_sym_set_data(sym, COFF_SCL_STAT, NULL, 1,
+ COFF_SYMTAB_AUX_SECT);
+ data->sym = sym;
+ return data;
+}
+
+static int
+coff_objfmt_init_remaining_section(yasm_section *sect, /*@null@*/ void *d)
+{
+ /*@null@*/ coff_objfmt_output_info *info = (coff_objfmt_output_info *)d;
+ /*@dependent@*/ /*@null@*/ coff_section_data *csd;
+
+ /* Skip absolute sections */
+ if (yasm_section_is_absolute(sect))
+ return 0;
+
+ assert(info != NULL);
+ csd = yasm_section_get_data(sect, &coff_section_data_cb);
+ if (!csd) {
+ /* Initialize new one */
+ const char *sectname = yasm_section_get_name(sect);
+ csd = coff_objfmt_init_new_section(info->objfmt_coff, sect, sectname,
+ 0);
+ if (yasm__strncasecmp(sectname, ".debug", 6)==0) {
+ csd->flags = COFF_STYP_DATA;
+ if (info->objfmt_coff->win32)
+ csd->flags |= COFF_STYP_DISCARD|COFF_STYP_READ;
+ csd->isdebug = 1;
+ } else
+ csd->flags = COFF_STYP_TEXT;
+ }
+
+ return 0;
+}
+
static int
coff_objfmt_set_section_addr(yasm_section *sect, /*@null@*/ void *d)
{
@@ -364,115 +425,206 @@ coff_objfmt_set_section_addr(yasm_section *sect, /*@null@*/ void *d)
}
static int
-coff_objfmt_output_expr(yasm_expr **ep, unsigned char *buf, size_t destsize,
- size_t valsize, int shift, unsigned long offset,
- yasm_bytecode *bc, int rel, int warn,
- /*@null@*/ void *d)
+coff_objfmt_output_value(yasm_value *value, unsigned char *buf, size_t destsize,
+ unsigned long offset, yasm_bytecode *bc, int warn,
+ /*@null@*/ void *d)
{
/*@null@*/ coff_objfmt_output_info *info = (coff_objfmt_output_info *)d;
yasm_objfmt_coff *objfmt_coff;
+ /*@only@*/ /*@null@*/ yasm_intnum *dist = NULL;
/*@dependent@*/ /*@null@*/ yasm_intnum *intn;
- /*@dependent@*/ /*@null@*/ const yasm_floatnum *flt;
- /*@dependent@*/ /*@null@*/ yasm_symrec *sym;
- /*@dependent@*/ yasm_section *label_sect;
- /*@dependent@*/ /*@null@*/ yasm_bytecode *label_precbc;
+ unsigned long intn_val, intn_minus;
+ int retval;
+ unsigned int valsize = value->size;
assert(info != NULL);
objfmt_coff = info->objfmt_coff;
- *ep = yasm_expr_simplify(*ep, yasm_common_calc_bc_dist);
+ if (value->abs)
+ value->abs = yasm_expr_simplify(value->abs, yasm_common_calc_bc_dist);
- /* Handle floating point expressions */
- flt = yasm_expr_get_floatnum(ep);
- if (flt) {
- if (shift < 0)
- yasm_internal_error(N_("attempting to negative shift a float"));
- return yasm_arch_floatnum_tobytes(objfmt_coff->arch, flt, buf,
- destsize, valsize,
- (unsigned int)shift, warn, bc->line);
+ /* Try to output constant and PC-relative section-local first.
+ * Note this does NOT output any value with a SEG, WRT, external,
+ * cross-section, or non-PC-relative reference (those are handled below).
+ */
+ switch (yasm_value_output_basic(value, buf, destsize, bc, warn,
+ info->objfmt_coff->arch,
+ yasm_common_calc_bc_dist)) {
+ case -1:
+ return 1;
+ case 0:
+ break;
+ default:
+ return 0;
}
- /* Handle integer expressions, with relocation if necessary */
- if (objfmt_coff->win64)
- sym = yasm_expr_extract_symrec(ep, YASM_SYMREC_REPLACE_ZERO,
- yasm_common_calc_bc_dist);
- else
- sym = yasm_expr_extract_symrec(ep, YASM_SYMREC_REPLACE_VALUE,
- yasm_common_calc_bc_dist);
+ /* Handle other expressions, with relocation if necessary */
+ if (value->rshift > 0
+ || (value->seg_of && (value->wrt || value->curpos_rel))
+ || (value->section_rel && (value->wrt || value->curpos_rel))) {
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("coff: relocation too complex"));
+ return 1;
+ }
- if (sym) {
+ intn_val = 0;
+ intn_minus = 0;
+ if (value->rel) {
+ yasm_sym_vis vis = yasm_symrec_get_visibility(value->rel);
+ /*@dependent@*/ /*@null@*/ yasm_symrec *sym = value->rel;
unsigned long addr;
coff_reloc *reloc;
- yasm_sym_vis vis;
- reloc = yasm_xmalloc(sizeof(coff_reloc));
- addr = bc->offset + offset;
- if (COFF_SET_VMA)
- addr += info->addr;
- reloc->reloc.addr = yasm_intnum_create_uint(addr);
- reloc->reloc.sym = sym;
- vis = yasm_symrec_get_visibility(sym);
+ /* Sometimes we want the relocation to be generated against one
+ * symbol but the value generated correspond to a different symbol.
+ * This is done through (sym being referenced) WRT (sym used for
+ * reloc). Note both syms need to be in the same section!
+ */
+ if (value->wrt) {
+ /*@dependent@*/ /*@null@*/ yasm_bytecode *rel_precbc, *wrt_precbc;
+ if (!yasm_symrec_get_label(sym, &rel_precbc)
+ || !yasm_symrec_get_label(value->wrt, &wrt_precbc)) {
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("coff: wrt expression too complex"));
+ return 1;
+ }
+ dist = yasm_common_calc_bc_dist(wrt_precbc, rel_precbc);
+ if (!dist) {
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("coff: cannot wrt across sections"));
+ return 1;
+ }
+ sym = value->wrt;
+ }
+
if (vis & YASM_SYM_COMMON) {
/* In standard COFF, COMMON symbols have their length added in */
if (!objfmt_coff->win32) {
/*@dependent@*/ /*@null@*/ coff_symrec_data *csymd;
+ /*@dependent@*/ /*@null@*/ yasm_intnum *common_size;
csymd = yasm_symrec_get_data(sym, &coff_symrec_data_cb);
assert(csymd != NULL);
- *ep = yasm_expr_create(YASM_EXPR_ADD, yasm_expr_expr(*ep),
- yasm_expr_expr(yasm_expr_copy(csymd->size)),
- csymd->size->line);
- *ep = yasm_expr_simplify(*ep, yasm_common_calc_bc_dist);
+ common_size = yasm_expr_get_intnum(&csymd->size,
+ yasm_common_calc_bc_dist);
+ if (!common_size) {
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("coff: common size too complex"));
+ return 1;
+ }
+
+ if (yasm_intnum_sign(common_size) < 0) {
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("coff: common size is negative"));
+ return 1;
+ }
+
+ intn_val += yasm_intnum_get_uint(common_size);
}
} else if (!(vis & YASM_SYM_EXTERN) && !objfmt_coff->win64) {
+ /*@dependent@*/ /*@null@*/ yasm_bytecode *sym_precbc;
+
/* Local symbols need relocation to their section's start */
- if (yasm_symrec_get_label(sym, &label_precbc)) {
- /*@null@*/ coff_section_data *label_csd;
- label_sect = yasm_bc_get_section(label_precbc);
- label_csd = yasm_section_get_data(label_sect,
- &coff_section_data_cb);
- assert(label_csd != NULL);
- reloc->reloc.sym = label_csd->sym;
+ if (yasm_symrec_get_label(sym, &sym_precbc)) {
+ yasm_section *sym_sect = yasm_bc_get_section(sym_precbc);
+ /*@null@*/ coff_section_data *sym_csd;
+ sym_csd = yasm_section_get_data(sym_sect,
+ &coff_section_data_cb);
+ assert(sym_csd != NULL);
+ sym = sym_csd->sym;
+ intn_val = sym_precbc->offset + sym_precbc->len;
if (COFF_SET_VMA)
- *ep = yasm_expr_create(YASM_EXPR_ADD, yasm_expr_expr(*ep),
- yasm_expr_int(yasm_intnum_create_uint(label_csd->addr)),
- (*ep)->line);
+ intn_val += sym_csd->addr;
}
}
- if (rel) {
+ if (value->curpos_rel) {
+ /* For standard COFF, need to adjust to start of section, e.g.
+ * subtract out the bytecode offset.
+ * For Win32 COFF, need to adjust based on value size and position.
+ * For Win64 COFF that's IP-relative, adjust to next bytecode;
+ * the difference between the offset+destsize and BC length is
+ * taken care of by special relocation types.
+ */
+ if (objfmt_coff->win64 && value->ip_rel)
+ intn_val += bc->len;
+ else if (objfmt_coff->win32)
+ intn_val += offset+destsize;
+ else
+ intn_minus = bc->offset;
+ }
+
+ if (value->seg_of || value->section_rel) {
+ /* Segment or section-relative generation; zero value. */
+ intn_val = 0;
+ intn_minus = 0;
+ }
+
+ /* Generate reloc */
+ reloc = yasm_xmalloc(sizeof(coff_reloc));
+ addr = bc->offset + offset;
+ if (COFF_SET_VMA)
+ addr += info->addr;
+ reloc->reloc.addr = yasm_intnum_create_uint(addr);
+ reloc->reloc.sym = sym;
+
+ if (value->curpos_rel) {
if (objfmt_coff->machine == COFF_MACHINE_I386) {
if (valsize == 32)
reloc->type = COFF_RELOC_I386_REL32;
else {
- yasm__error(bc->line, N_("coff: invalid relocation size"));
+ yasm_error_set(YASM_ERROR_TYPE,
+ N_("coff: invalid relocation size"));
return 1;
}
} else if (objfmt_coff->machine == COFF_MACHINE_AMD64) {
- if (valsize == 32)
- reloc->type = COFF_RELOC_AMD64_REL32;
- else {
- yasm__error(bc->line, N_("coff: invalid relocation size"));
+ if (valsize != 32) {
+ yasm_error_set(YASM_ERROR_TYPE,
+ N_("coff: invalid relocation size"));
return 1;
}
+ if (!value->ip_rel)
+ reloc->type = COFF_RELOC_AMD64_REL32;
+ else switch (bc->len - (offset+destsize)) {
+ case 0:
+ reloc->type = COFF_RELOC_AMD64_REL32;
+ break;
+ case 1:
+ reloc->type = COFF_RELOC_AMD64_REL32_1;
+ break;
+ case 2:
+ reloc->type = COFF_RELOC_AMD64_REL32_2;
+ break;
+ case 3:
+ reloc->type = COFF_RELOC_AMD64_REL32_3;
+ break;
+ case 4:
+ reloc->type = COFF_RELOC_AMD64_REL32_4;
+ break;
+ case 5:
+ reloc->type = COFF_RELOC_AMD64_REL32_5;
+ break;
+ default:
+ yasm_error_set(YASM_ERROR_TYPE,
+ N_("coff: invalid relocation size"));
+ return 1;
+ }
} else
yasm_internal_error(N_("coff objfmt: unrecognized machine"));
- /* For standard COFF, need to reference to start of section, so add
- * $$ in.
- * For Win32 COFF, need to reference to next bytecode, so add '$'
- * (really $+$.len) in.
- */
- if (objfmt_coff->win32)
- *ep = yasm_expr_create(YASM_EXPR_ADD, yasm_expr_expr(*ep),
- yasm_expr_sym(yasm_symtab_define_label2("$", bc,
- 0, (*ep)->line)),
- (*ep)->line);
+ } else if (value->seg_of) {
+ if (objfmt_coff->machine == COFF_MACHINE_I386)
+ reloc->type = COFF_RELOC_I386_SECTION;
+ else if (objfmt_coff->machine == COFF_MACHINE_AMD64)
+ reloc->type = COFF_RELOC_AMD64_SECTION;
else
- *ep = yasm_expr_create(YASM_EXPR_ADD, yasm_expr_expr(*ep),
- yasm_expr_sym(yasm_symtab_define_label2("$$",
- yasm_section_bcs_first(info->sect), 0, (*ep)->line)),
- (*ep)->line);
- *ep = yasm_expr_simplify(*ep, yasm_common_calc_bc_dist);
+ yasm_internal_error(N_("coff objfmt: unrecognized machine"));
+ } else if (value->section_rel) {
+ if (objfmt_coff->machine == COFF_MACHINE_I386)
+ reloc->type = COFF_RELOC_I386_SECREL;
+ else if (objfmt_coff->machine == COFF_MACHINE_AMD64)
+ reloc->type = COFF_RELOC_AMD64_SECREL;
+ else
+ yasm_internal_error(N_("coff objfmt: unrecognized machine"));
} else {
if (objfmt_coff->machine == COFF_MACHINE_I386) {
if (info->csd->flags2 & COFF_FLAG_NOBASE)
@@ -488,7 +640,8 @@ coff_objfmt_output_expr(yasm_expr **ep, unsigned char *buf, size_t destsize,
} else if (valsize == 64)
reloc->type = COFF_RELOC_AMD64_ADDR64;
else {
- yasm__error(bc->line, N_("coff: invalid relocation size"));
+ yasm_error_set(YASM_ERROR_TYPE,
+ N_("coff: invalid relocation size"));
return 1;
}
} else
@@ -497,26 +650,40 @@ coff_objfmt_output_expr(yasm_expr **ep, unsigned char *buf, size_t destsize,
info->csd->nreloc++;
yasm_section_add_reloc(info->sect, (yasm_reloc *)reloc, yasm_xfree);
}
- intn = yasm_expr_get_intnum(ep, NULL);
- if (intn) {
- if (rel) {
- int retval = yasm_arch_intnum_fixup_rel(objfmt_coff->arch, intn,
- valsize, bc, bc->line);
- if (retval)
- return retval;
+
+ /* Build up final integer output from intn_val, intn_minus, value->abs,
+ * and dist. We do all this at the end to avoid creating temporary
+ * intnums above (except for dist).
+ */
+ if (intn_minus <= intn_val)
+ intn = yasm_intnum_create_uint(intn_val-intn_minus);
+ else {
+ intn = yasm_intnum_create_uint(intn_minus-intn_val);
+ yasm_intnum_calc(intn, YASM_EXPR_NEG, NULL);
+ }
+
+ if (value->abs) {
+ yasm_intnum *intn2 = yasm_expr_get_intnum(&value->abs, NULL);
+ if (!intn2) {
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("coff: relocation too complex"));
+ yasm_intnum_destroy(intn);
+ if (dist)
+ yasm_intnum_destroy(dist);
+ return 1;
}
- return yasm_arch_intnum_tobytes(objfmt_coff->arch, intn, buf, destsize,
- valsize, shift, bc, warn, bc->line);
+ yasm_intnum_calc(intn, YASM_EXPR_ADD, intn2);
}
- /* Check for complex float expressions */
- if (yasm_expr__contains(*ep, YASM_EXPR_FLOAT)) {
- yasm__error(bc->line, N_("floating point expression too complex"));
- return 1;
+ if (dist) {
+ yasm_intnum_calc(intn, YASM_EXPR_ADD, dist);
+ yasm_intnum_destroy(dist);
}
- yasm__error(bc->line, N_("coff: relocation too complex"));
- return 1;
+ retval = yasm_arch_intnum_tobytes(objfmt_coff->arch, intn, buf, destsize,
+ valsize, 0, bc, warn);
+ yasm_intnum_destroy(intn);
+ return retval;
}
static int
@@ -525,14 +692,12 @@ coff_objfmt_output_bytecode(yasm_bytecode *bc, /*@null@*/ void *d)
/*@null@*/ coff_objfmt_output_info *info = (coff_objfmt_output_info *)d;
/*@null@*/ /*@only@*/ unsigned char *bigbuf;
unsigned long size = REGULAR_OUTBUF_SIZE;
- unsigned long multiple;
- unsigned long i;
int gap;
assert(info != NULL);
- bigbuf = yasm_bc_tobytes(bc, info->buf, &size, &multiple, &gap, info,
- coff_objfmt_output_expr, NULL);
+ bigbuf = yasm_bc_tobytes(bc, info->buf, &size, &gap, info,
+ coff_objfmt_output_value, NULL);
/* Don't bother doing anything else if size ended up being 0. */
if (size == 0) {
@@ -541,25 +706,24 @@ coff_objfmt_output_bytecode(yasm_bytecode *bc, /*@null@*/ void *d)
return 0;
}
- info->csd->size += multiple*size;
+ info->csd->size += size;
/* Warn that gaps are converted to 0 and write out the 0's. */
if (gap) {
unsigned long left;
- yasm__warning(YASM_WARN_UNINIT_CONTENTS, bc->line,
+ yasm_warn_set(YASM_WARN_UNINIT_CONTENTS,
N_("uninitialized space declared in code/data section: zeroing"));
/* Write out in chunks */
memset(info->buf, 0, REGULAR_OUTBUF_SIZE);
- left = multiple*size;
+ left = size;
while (left > REGULAR_OUTBUF_SIZE) {
fwrite(info->buf, REGULAR_OUTBUF_SIZE, 1, info->f);
left -= REGULAR_OUTBUF_SIZE;
}
fwrite(info->buf, left, 1, info->f);
} else {
- /* Output multiple copies of buf (or bigbuf if non-NULL) to file */
- for (i=0; i<multiple; i++)
- fwrite(bigbuf ? bigbuf : info->buf, (size_t)size, 1, info->f);
+ /* Output buf (or bigbuf if non-NULL) to file */
+ fwrite(bigbuf ? bigbuf : info->buf, (size_t)size, 1, info->f);
}
/* If bigbuf was allocated, free it */
@@ -576,6 +740,7 @@ coff_objfmt_output_section(yasm_section *sect, /*@null@*/ void *d)
/*@dependent@*/ /*@null@*/ coff_section_data *csd;
long pos;
coff_reloc *reloc;
+ unsigned char *localbuf;
/* Don't output absolute sections into the section table */
if (yasm_section_is_absolute(sect))
@@ -594,7 +759,8 @@ coff_objfmt_output_section(yasm_section *sect, /*@null@*/ void *d)
}
}
- csd->addr = info->addr;
+ if (!csd->isdebug)
+ csd->addr = info->addr;
if ((csd->flags & COFF_STYP_STD_MASK) == COFF_STYP_BSS) {
yasm_bytecode *last = yasm_section_bcs_last(sect);
@@ -616,7 +782,8 @@ coff_objfmt_output_section(yasm_section *sect, /*@null@*/ void *d)
info->sect = sect;
info->csd = csd;
- yasm_section_bcs_traverse(sect, info, coff_objfmt_output_bytecode);
+ yasm_section_bcs_traverse(sect, info->errwarns, info,
+ coff_objfmt_output_bytecode);
/* Sanity check final section size */
if (csd->size != (last->offset + last->len))
@@ -628,7 +795,8 @@ coff_objfmt_output_section(yasm_section *sect, /*@null@*/ void *d)
if (csd->size == 0)
return 0;
- info->addr += csd->size;
+ if (!csd->isdebug)
+ info->addr += csd->size;
csd->scnptr = (unsigned long)pos;
/* No relocations to output? Go on to next section */
@@ -643,17 +811,28 @@ coff_objfmt_output_section(yasm_section *sect, /*@null@*/ void *d)
}
csd->relptr = (unsigned long)pos;
+ /* If >=64K relocs (for Win32/64), we set a flag in the section header
+ * (NRELOC_OVFL) and the first relocation contains the number of relocs.
+ */
+ if (csd->nreloc >= 64*1024 && info->objfmt_coff->win32) {
+ localbuf = info->buf;
+ YASM_WRITE_32_L(localbuf, csd->nreloc+1); /* address of relocation */
+ YASM_WRITE_32_L(localbuf, 0); /* relocated symbol */
+ YASM_WRITE_16_L(localbuf, 0); /* type of relocation */
+ fwrite(info->buf, 10, 1, info->f);
+ }
+
reloc = (coff_reloc *)yasm_section_relocs_first(sect);
while (reloc) {
- unsigned char *localbuf = info->buf;
/*@null@*/ coff_symrec_data *csymd;
+ localbuf = info->buf;
csymd = yasm_symrec_get_data(reloc->reloc.sym, &coff_symrec_data_cb);
if (!csymd)
yasm_internal_error(
N_("coff: no symbol data for relocated symbol"));
- yasm_intnum_get_sized(reloc->reloc.addr, localbuf, 4, 32, 0, 0, 0, 0);
+ yasm_intnum_get_sized(reloc->reloc.addr, localbuf, 4, 32, 0, 0, 0);
localbuf += 4; /* address of relocation */
YASM_WRITE_32_L(localbuf, csymd->index); /* relocated symbol */
YASM_WRITE_16_L(localbuf, reloc->type); /* type of relocation */
@@ -725,19 +904,30 @@ coff_objfmt_output_secthead(yasm_section *sect, /*@null@*/ void *d)
} else
strncpy((char *)localbuf, yasm_section_get_name(sect), 8);
localbuf += 8;
- YASM_WRITE_32_L(localbuf, csd->addr); /* physical address */
- if (COFF_SET_VMA)
- YASM_WRITE_32_L(localbuf, csd->addr); /* virtual address */
- else
+ if (csd->isdebug) {
+ YASM_WRITE_32_L(localbuf, 0); /* physical address */
YASM_WRITE_32_L(localbuf, 0); /* virtual address */
+ } else {
+ YASM_WRITE_32_L(localbuf, csd->addr); /* physical address */
+ if (COFF_SET_VMA)
+ YASM_WRITE_32_L(localbuf, csd->addr);/* virtual address */
+ else
+ YASM_WRITE_32_L(localbuf, 0); /* virtual address */
+ }
YASM_WRITE_32_L(localbuf, csd->size); /* section size */
YASM_WRITE_32_L(localbuf, csd->scnptr); /* file ptr to data */
YASM_WRITE_32_L(localbuf, csd->relptr); /* file ptr to relocs */
YASM_WRITE_32_L(localbuf, 0); /* file ptr to line nums */
if (csd->nreloc >= 64*1024) {
- yasm__warning(YASM_WARN_GENERAL, 0,
- N_("too many relocations in section `%s'"),
- yasm_section_get_name(sect));
+ /* Win32/64 has special handling for this case. */
+ if (objfmt_coff->win32)
+ csd->flags |= COFF_STYP_NRELOC_OVFL;
+ else {
+ yasm_warn_set(YASM_WARN_GENERAL,
+ N_("too many relocations in section `%s'"),
+ yasm_section_get_name(sect));
+ yasm_errwarn_propagate(info->errwarns, 0);
+ }
YASM_WRITE_16_L(localbuf, 0xFFFF); /* max out */
} else
YASM_WRITE_16_L(localbuf, csd->nreloc); /* num of relocation entries */
@@ -765,7 +955,7 @@ coff_objfmt_count_sym(yasm_symrec *sym, /*@null@*/ void *d)
info->indx += sym_data->numaux + 1;
}
- return 1;
+ return 0;
}
static int
@@ -822,10 +1012,12 @@ coff_objfmt_output_sym(yasm_symrec *sym, /*@null@*/ void *d)
abs_start = yasm_expr_copy(yasm_section_get_start(sect));
intn = yasm_expr_get_intnum(&abs_start,
yasm_common_calc_bc_dist);
- if (!intn)
- yasm__error(abs_start->line,
+ if (!intn) {
+ yasm_error_set(YASM_ERROR_NOT_CONSTANT,
N_("absolute section start not an integer expression"));
- else
+ yasm_errwarn_propagate(info->errwarns,
+ abs_start->line);
+ } else
value = yasm_intnum_get_uint(intn);
yasm_expr_destroy(abs_start);
@@ -840,9 +1032,11 @@ coff_objfmt_output_sym(yasm_symrec *sym, /*@null@*/ void *d)
intn = yasm_expr_get_intnum(&equ_val_copy,
yasm_common_calc_bc_dist);
if (!intn) {
- if (vis & YASM_SYM_GLOBAL)
- yasm__error(equ_val->line,
+ if (vis & YASM_SYM_GLOBAL) {
+ yasm_error_set(YASM_ERROR_NOT_CONSTANT,
N_("global EQU value not an integer expression"));
+ yasm_errwarn_propagate(info->errwarns, equ_val->line);
+ }
} else
value = yasm_intnum_get_uint(intn);
yasm_expr_destroy(equ_val_copy);
@@ -852,10 +1046,11 @@ coff_objfmt_output_sym(yasm_symrec *sym, /*@null@*/ void *d)
if (vis & YASM_SYM_COMMON) {
intn = yasm_expr_get_intnum(&csymd->size,
yasm_common_calc_bc_dist);
- if (!intn)
- yasm__error(csymd->size->line,
+ if (!intn) {
+ yasm_error_set(YASM_ERROR_NOT_CONSTANT,
N_("COMMON data size not an integer expression"));
- else
+ yasm_errwarn_propagate(info->errwarns, csymd->size->line);
+ } else
value = yasm_intnum_get_uint(intn);
scnum = 0;
}
@@ -906,7 +1101,7 @@ coff_objfmt_output_sym(yasm_symrec *sym, /*@null@*/ void *d)
fwrite(info->buf, 18, 1, info->f);
}
}
- return 1;
+ return 0;
}
static int
@@ -942,12 +1137,12 @@ coff_objfmt_output_str(yasm_symrec *sym, /*@null@*/ void *d)
}
}
}
- return 1;
+ return 0;
}
static void
-coff_objfmt_output(yasm_objfmt *objfmt, FILE *f, const char *obj_filename,
- int all_syms, /*@unused@*/ yasm_dbgfmt *df)
+coff_objfmt_output(yasm_objfmt *objfmt, FILE *f, int all_syms, yasm_dbgfmt *df,
+ yasm_errwarns *errwarns)
{
yasm_objfmt_coff *objfmt_coff = (yasm_objfmt_coff *)objfmt;
coff_objfmt_output_info info;
@@ -957,6 +1152,11 @@ coff_objfmt_output(yasm_objfmt *objfmt, FILE *f, const char *obj_filename,
unsigned long symtab_count;
unsigned int flags;
+ if (objfmt_coff->filesym_data->aux[0].fname)
+ yasm_xfree(objfmt_coff->filesym_data->aux[0].fname);
+ objfmt_coff->filesym_data->aux[0].fname =
+ yasm__xstrdup(yasm_object_get_source_fn(objfmt_coff->object));
+
/* Force all syms for win64 because they're needed for relocations.
* FIXME: Not *all* syms need to be output, only the ones needed for
* relocation. Find a way to do that someday.
@@ -965,9 +1165,16 @@ coff_objfmt_output(yasm_objfmt *objfmt, FILE *f, const char *obj_filename,
info.strtab_offset = 4;
info.objfmt_coff = objfmt_coff;
+ info.errwarns = errwarns;
info.f = f;
info.buf = yasm_xmalloc(REGULAR_OUTBUF_SIZE);
+ /* Initialize section data (and count in parse_scnum) any sections that
+ * we've not initialized so far.
+ */
+ yasm_object_sections_traverse(objfmt_coff->object, &info,
+ coff_objfmt_init_remaining_section);
+
/* Allocate space for headers by seeking forward */
if (fseek(f, (long)(20+40*(objfmt_coff->parse_scnum-1)), SEEK_SET) < 0) {
yasm__fatal(N_("could not seek on output file"));
@@ -1029,7 +1236,9 @@ coff_objfmt_output(yasm_objfmt *objfmt, FILE *f, const char *obj_filename,
YASM_WRITE_32_L(localbuf, symtab_count); /* number of symtabs */
YASM_WRITE_16_L(localbuf, 0); /* size of optional header (none) */
/* flags */
- flags = COFF_F_LNNO;
+ flags = 0;
+ if (strcmp(yasm_dbgfmt_keyword(df), "null")==0)
+ flags = COFF_F_LNNO;
if (!all_syms)
flags |= COFF_F_LSYMS;
if (objfmt_coff->machine != COFF_MACHINE_AMD64)
@@ -1049,33 +1258,24 @@ coff_objfmt_destroy(yasm_objfmt *objfmt)
yasm_xfree(objfmt);
}
-static void
-coff_objfmt_init_new_section(yasm_objfmt_coff *objfmt_coff,
- yasm_section *sect, const char *sectname,
- unsigned long flags, unsigned long flags2,
- unsigned long line)
+static yasm_section *
+coff_objfmt_add_default_section(yasm_objfmt *objfmt)
{
- coff_section_data *data;
- yasm_symrec *sym;
-
- data = yasm_xmalloc(sizeof(coff_section_data));
- data->scnum = objfmt_coff->parse_scnum++;
- data->flags = flags;
- data->addr = 0;
- data->scnptr = 0;
- data->size = 0;
- data->relptr = 0;
- data->nreloc = 0;
- data->flags2 = flags2;
- data->strtab_name = 0;
- yasm_section_add_data(sect, &coff_section_data_cb, data);
+ yasm_objfmt_coff *objfmt_coff = (yasm_objfmt_coff *)objfmt;
+ yasm_section *retval;
+ coff_section_data *csd;
+ int isnew;
- sym = yasm_symtab_define_label(objfmt_coff->symtab, sectname,
- yasm_section_bcs_first(sect), 1, line);
- yasm_symrec_declare(sym, YASM_SYM_GLOBAL, line);
- coff_objfmt_sym_set_data(sym, COFF_SCL_STAT, NULL, 1,
- COFF_SYMTAB_AUX_SECT);
- data->sym = sym;
+ retval = yasm_object_get_general(objfmt_coff->object, ".text", 0, 16, 1, 0,
+ &isnew, 0);
+ if (isnew) {
+ csd = coff_objfmt_init_new_section(objfmt_coff, retval, ".text", 0);
+ csd->flags = COFF_STYP_TEXT;
+ if (objfmt_coff->win32)
+ csd->flags |= COFF_STYP_EXECUTE | COFF_STYP_READ;
+ yasm_section_set_default(retval, 1);
+ }
+ return retval;
}
static /*@observer@*/ /*@null@*/ yasm_section *
@@ -1088,12 +1288,14 @@ coff_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
yasm_valparam *vp = yasm_vps_first(valparams);
yasm_section *retval;
int isnew;
+ int iscode = 0;
unsigned long flags;
unsigned long flags2 = 0;
int flags_override = 0;
char *sectname;
int resonly = 0;
unsigned long align = 0;
+ coff_section_data *csd;
static const struct {
const char *name;
@@ -1138,7 +1340,7 @@ coff_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
* files via "/nnnn" (where nnnn is decimal offset into string table),
* so only warn for regular COFF.
*/
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("COFF section names limited to 8 characters: truncating"));
sectname[8] = '\0';
}
@@ -1168,13 +1370,15 @@ coff_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
flags |= COFF_STYP_EXECUTE | COFF_STYP_READ;
align = 16;
}
- } else if (strcmp(sectname, ".rdata") == 0) {
+ iscode = 1;
+ } else if (strcmp(sectname, ".rdata") == 0
+ || strncmp(sectname, ".rodata", 7) == 0) {
flags = COFF_STYP_DATA;
if (objfmt_coff->win32) {
flags |= COFF_STYP_READ;
align = 8;
} else
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("Standard COFF does not support read-only data sections"));
} else if (strcmp(sectname, ".drectve") == 0) {
flags = COFF_STYP_INFO;
@@ -1191,11 +1395,17 @@ coff_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
flags = COFF_STYP_INFO;
if (objfmt_coff->win32)
flags |= COFF_STYP_DISCARD | COFF_STYP_READ;
+ } else if (yasm__strncasecmp(sectname, ".debug", 6)==0) {
+ flags = COFF_STYP_DATA;
+ if (objfmt_coff->win32)
+ flags |= COFF_STYP_DISCARD|COFF_STYP_READ;
+ align = 1;
} else {
/* Default to code */
flags = COFF_STYP_TEXT;
if (objfmt_coff->win32)
flags |= COFF_STYP_EXECUTE | COFF_STYP_READ;
+ iscode = 1;
}
while ((vp = yasm_vps_next(vp))) {
@@ -1205,7 +1415,7 @@ coff_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
win32warn = 0;
if (!vp->val) {
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("Unrecognized numeric qualifier"));
continue;
}
@@ -1221,12 +1431,16 @@ coff_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
flags2 &= ~flagquals[i].flags2;
if (objfmt_coff->win32)
flags &= ~flagquals[i].win32flags;
+ if (flagquals[i].win32flags & COFF_STYP_EXECUTE)
+ iscode = 0;
break;
case 1:
flags |= flagquals[i].stdflags;
flags2 |= flagquals[i].flags2;
if (objfmt_coff->win32)
flags |= flagquals[i].win32flags;
+ if (flagquals[i].win32flags & COFF_STYP_EXECUTE)
+ iscode = 1;
break;
case 2:
flags &= ~COFF_STYP_STD_MASK;
@@ -1236,6 +1450,8 @@ coff_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
flags &= ~COFF_STYP_WIN32_MASK;
flags |= flagquals[i].win32flags;
}
+ if (flagquals[i].win32flags & COFF_STYP_EXECUTE)
+ iscode = 1;
break;
}
flags_override = 1;
@@ -1249,6 +1465,7 @@ coff_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
/* GAS-style flags */
int alloc = 0, load = 0, readonly = 0, code = 0, data = 0;
int shared = 0;
+ iscode = 0;
for (i=4; i<strlen(vp->val); i++) {
switch (vp->val[i]) {
case 'a':
@@ -1280,7 +1497,7 @@ coff_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
readonly = 0;
break;
default:
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("unrecognized section attribute: `%c'"),
vp->val[i]);
}
@@ -1289,6 +1506,7 @@ coff_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
flags = COFF_STYP_TEXT;
if (objfmt_coff->win32)
flags |= COFF_STYP_EXECUTE | COFF_STYP_READ;
+ iscode = 1;
} else if (data) {
flags = COFF_STYP_DATA;
if (objfmt_coff->win32)
@@ -1308,24 +1526,24 @@ coff_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
/*@dependent@*/ /*@null@*/ const yasm_intnum *align_expr;
align_expr = yasm_expr_get_intnum(&vp->param, NULL);
if (!align_expr) {
- yasm__error(line,
- N_("argument to `%s' is not a power of two"),
- vp->val);
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("argument to `%s' is not a power of two"),
+ vp->val);
return NULL;
}
align = yasm_intnum_get_uint(align_expr);
/* Alignments must be a power of two. */
if ((align & (align - 1)) != 0) {
- yasm__error(line,
- N_("argument to `%s' is not a power of two"),
- vp->val);
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("argument to `%s' is not a power of two"),
+ vp->val);
return NULL;
}
/* Check to see if alignment is supported size */
if (align > 8192) {
- yasm__error(line,
+ yasm_error_set(YASM_ERROR_VALUE,
N_("Win32 does not support alignments > 8192"));
return NULL;
}
@@ -1333,23 +1551,29 @@ coff_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
} else
win32warn = 1;
} else
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("Unrecognized qualifier `%s'"), vp->val);
+ yasm_warn_set(YASM_WARN_GENERAL, N_("Unrecognized qualifier `%s'"),
+ vp->val);
if (win32warn)
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("Standard COFF does not support qualifier `%s'"), vp->val);
}
retval = yasm_object_get_general(objfmt_coff->object, sectname, 0, align,
- (flags & COFF_STYP_EXECUTE) != 0,
- resonly, &isnew, line);
+ iscode, resonly, &isnew, line);
if (isnew)
- coff_objfmt_init_new_section(objfmt_coff, retval, sectname, flags,
- flags2, line);
- else if (flags_override)
- yasm__warning(YASM_WARN_GENERAL, line,
+ csd = coff_objfmt_init_new_section(objfmt_coff, retval, sectname, line);
+ else
+ csd = yasm_section_get_data(retval, &coff_section_data_cb);
+
+ if (isnew || yasm_section_is_default(retval)) {
+ yasm_section_set_default(retval, 0);
+ csd->flags = flags;
+ csd->flags2 = flags2;
+ yasm_section_set_align(retval, align, line);
+ } else if (flags_override)
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("section flags ignored on section redeclaration"));
return retval;
}
@@ -1494,7 +1718,8 @@ win32_objfmt_directive(yasm_objfmt *objfmt, const char *name,
if (vp->val)
yasm_symtab_use(objfmt_coff->symtab, vp->val, line);
else {
- yasm__error(line, N_("argument to EXPORT must be symbol name"));
+ yasm_error_set(YASM_ERROR_SYNTAX,
+ N_("argument to EXPORT must be symbol name"));
return 0;
}
@@ -1503,11 +1728,13 @@ win32_objfmt_directive(yasm_objfmt *objfmt, const char *name,
0, 0, &isnew, line);
/* Initialize directive section if needed */
- if (isnew)
- coff_objfmt_init_new_section(objfmt_coff, sect,
- yasm_section_get_name(sect),
- COFF_STYP_INFO | COFF_STYP_DISCARD
- | COFF_STYP_READ, 0, line);
+ if (isnew) {
+ coff_section_data *csd;
+ csd = coff_objfmt_init_new_section(objfmt_coff, sect,
+ yasm_section_get_name(sect),
+ line);
+ csd->flags = COFF_STYP_INFO | COFF_STYP_DISCARD | COFF_STYP_READ;
+ }
/* Add text as data bytecode */
yasm_dvs_initialize(&dvs);
@@ -1517,7 +1744,8 @@ win32_objfmt_directive(yasm_objfmt *objfmt, const char *name,
yasm_dvs_append(&dvs, yasm_dv_create_string(yasm__xstrdup(vp->val),
strlen(vp->val)));
yasm_dvs_append(&dvs, yasm_dv_create_string(yasm__xstrdup(" "), 1));
- yasm_section_bcs_append(sect, yasm_bc_create_data(&dvs, 1, 0, line));
+ yasm_section_bcs_append(sect, yasm_bc_create_data(&dvs, 1, 0, NULL,
+ line));
return 0;
} else
@@ -1528,6 +1756,7 @@ win32_objfmt_directive(yasm_objfmt *objfmt, const char *name,
/* Define valid debug formats to use with this object format */
static const char *coff_objfmt_dbgfmt_keywords[] = {
"null",
+ "dwarf2",
NULL
};
@@ -1536,13 +1765,13 @@ yasm_objfmt_module yasm_coff_LTX_objfmt = {
"COFF (DJGPP)",
"coff",
"o",
- ".text",
32,
coff_objfmt_dbgfmt_keywords,
"null",
coff_objfmt_create,
coff_objfmt_output,
coff_objfmt_destroy,
+ coff_objfmt_add_default_section,
coff_objfmt_section_switch,
coff_objfmt_extern_declare,
coff_objfmt_global_declare,
@@ -1550,18 +1779,26 @@ yasm_objfmt_module yasm_coff_LTX_objfmt = {
coff_objfmt_directive
};
+/* Define valid debug formats to use with this object format */
+static const char *winXX_objfmt_dbgfmt_keywords[] = {
+ "null",
+ "dwarf2",
+ "cv8",
+ NULL
+};
+
/* Define objfmt structure -- see objfmt.h for details */
yasm_objfmt_module yasm_win32_LTX_objfmt = {
"Win32",
"win32",
"obj",
- ".text",
32,
- coff_objfmt_dbgfmt_keywords,
+ winXX_objfmt_dbgfmt_keywords,
"null",
win32_objfmt_create,
coff_objfmt_output,
coff_objfmt_destroy,
+ coff_objfmt_add_default_section,
coff_objfmt_section_switch,
coff_objfmt_extern_declare,
coff_objfmt_global_declare,
@@ -1574,13 +1811,13 @@ yasm_objfmt_module yasm_win64_LTX_objfmt = {
"Win64",
"win64",
"obj",
- ".text",
64,
- coff_objfmt_dbgfmt_keywords,
+ winXX_objfmt_dbgfmt_keywords,
"null",
win64_objfmt_create,
coff_objfmt_output,
coff_objfmt_destroy,
+ coff_objfmt_add_default_section,
coff_objfmt_section_switch,
coff_objfmt_extern_declare,
coff_objfmt_global_declare,
@@ -1591,13 +1828,13 @@ yasm_objfmt_module yasm_x64_LTX_objfmt = {
"Win64",
"x64",
"obj",
- ".text",
64,
- coff_objfmt_dbgfmt_keywords,
+ winXX_objfmt_dbgfmt_keywords,
"null",
win64_objfmt_create,
coff_objfmt_output,
coff_objfmt_destroy,
+ coff_objfmt_add_default_section,
coff_objfmt_section_switch,
coff_objfmt_extern_declare,
coff_objfmt_global_declare,
diff --git a/modules/objfmts/coff/tests/x86id.errwarn b/modules/objfmts/coff/tests/x86id.errwarn
index e69de29b..b83cc295 100644
--- a/modules/objfmts/coff/tests/x86id.errwarn
+++ b/modules/objfmts/coff/tests/x86id.errwarn
@@ -0,0 +1,44 @@
+-:37: warning: Standard COFF does not support read-only data sections
+-:6284: warning: Standard COFF does not support read-only data sections
+-:6527: warning: Standard COFF does not support read-only data sections
+-:6540: warning: Standard COFF does not support read-only data sections
+-:6549: warning: Standard COFF does not support read-only data sections
+-:6559: warning: Standard COFF does not support read-only data sections
+-:6562: warning: Standard COFF does not support read-only data sections
+-:6629: warning: Standard COFF does not support read-only data sections
+-:7499: warning: Standard COFF does not support read-only data sections
+-:7518: warning: Standard COFF does not support read-only data sections
+-:7991: warning: Standard COFF does not support read-only data sections
+-:9105: warning: Standard COFF does not support read-only data sections
+-:9121: warning: Standard COFF does not support read-only data sections
+-:9143: warning: Standard COFF does not support read-only data sections
+-:9298: warning: Standard COFF does not support read-only data sections
+-:9368: warning: Standard COFF does not support read-only data sections
+-:9511: warning: Standard COFF does not support read-only data sections
+-:9596: warning: Standard COFF does not support read-only data sections
+-:9661: warning: Standard COFF does not support read-only data sections
+-:9741: warning: Standard COFF does not support read-only data sections
+-:9810: warning: Standard COFF does not support read-only data sections
+-:9879: warning: Standard COFF does not support read-only data sections
+-:9945: warning: Standard COFF does not support read-only data sections
+-:10005: warning: Standard COFF does not support read-only data sections
+-:10069: warning: Standard COFF does not support read-only data sections
+-:10139: warning: Standard COFF does not support read-only data sections
+-:10208: warning: Standard COFF does not support read-only data sections
+-:10270: warning: Standard COFF does not support read-only data sections
+-:10935: warning: Standard COFF does not support read-only data sections
+-:11679: warning: Standard COFF does not support read-only data sections
+-:11848: warning: Standard COFF does not support read-only data sections
+-:12534: warning: Standard COFF does not support read-only data sections
+-:14533: warning: Standard COFF does not support read-only data sections
+-:15942: warning: Standard COFF does not support read-only data sections
+-:18092: warning: Standard COFF does not support read-only data sections
+-:18170: warning: Standard COFF does not support read-only data sections
+-:18580: warning: Standard COFF does not support read-only data sections
+-:19769: warning: Standard COFF does not support read-only data sections
+-:19878: warning: Standard COFF does not support read-only data sections
+-:21893: warning: Standard COFF does not support read-only data sections
+-:24311: warning: Standard COFF does not support read-only data sections
+-:24465: warning: Standard COFF does not support read-only data sections
+-:25481: warning: Standard COFF does not support read-only data sections
+-:25614: warning: Standard COFF does not support read-only data sections
diff --git a/modules/objfmts/coff/tests/x86id.hex b/modules/objfmts/coff/tests/x86id.hex
index 5f1ed61f..ccadb768 100644
--- a/modules/objfmts/coff/tests/x86id.hex
+++ b/modules/objfmts/coff/tests/x86id.hex
@@ -96,7 +96,7 @@ f2
00
40
00
-00
+30
00
2e
72
@@ -134,9 +134,9 @@ da
07
00
00
-20
-00
+40
00
+60
00
55
89
@@ -70630,6 +70630,8 @@ ff
00
00
00
+eb
+0d
90
90
90
@@ -70643,10 +70645,8 @@ ff
90
90
90
-90
-90
-90
-90
+eb
+07
90
90
90
@@ -71914,6 +71914,8 @@ c7
00
00
00
+eb
+0d
90
90
90
@@ -71928,12 +71930,10 @@ c7
90
90
90
-90
-90
-90
-90
-90
-90
+8d
+74
+26
+00
04
00
00
@@ -72102,6 +72102,8 @@ c7
00
00
00
+eb
+0d
90
90
90
@@ -72115,10 +72117,8 @@ c7
90
90
90
-90
-90
-90
-90
+eb
+07
90
90
90
@@ -72910,8 +72910,8 @@ a8
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -73514,6 +73514,8 @@ a9
00
00
00
+eb
+0d
90
90
90
@@ -73528,12 +73530,10 @@ a9
90
90
90
-90
-90
-90
-90
-90
-90
+8d
+74
+26
+00
00
00
00
@@ -73926,6 +73926,8 @@ a9
00
00
00
+eb
+0d
90
90
90
@@ -73939,10 +73941,8 @@ a9
90
90
90
-90
-90
-90
-90
+eb
+07
90
90
90
@@ -74118,6 +74118,8 @@ ed
00
00
00
+eb
+0d
90
90
90
@@ -74131,10 +74133,8 @@ ed
90
90
90
-90
-90
-90
-90
+eb
+07
90
90
90
@@ -74310,6 +74310,8 @@ ef
00
00
00
+eb
+0d
90
90
90
@@ -74323,10 +74325,8 @@ ef
90
90
90
-90
-90
-90
-90
+eb
+07
90
90
90
@@ -74418,8 +74418,8 @@ ef
00
00
00
-90
-90
+eb
+0a
90
90
90
@@ -74487,13 +74487,13 @@ ef
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
04
00
00
@@ -74551,13 +74551,13 @@ ef
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
00
00
00
@@ -75202,6 +75202,8 @@ ef
00
00
00
+eb
+0d
90
90
90
@@ -75215,10 +75217,8 @@ ef
90
90
90
-90
-90
-90
-90
+eb
+0b
90
90
90
@@ -75398,6 +75398,8 @@ ff
00
00
00
+eb
+0d
90
90
90
@@ -75411,10 +75413,8 @@ ff
90
90
90
-90
-90
-90
-90
+eb
+07
90
90
90
@@ -75534,8 +75534,8 @@ f7
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -76110,8 +76110,8 @@ f7
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -76183,13 +76183,13 @@ d4
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
00
00
00
@@ -76722,8 +76722,8 @@ af
00
00
00
-90
-90
+eb
+0a
90
90
90
@@ -77126,6 +77126,8 @@ d1
00
00
00
+eb
+0d
90
90
90
@@ -77139,10 +77141,8 @@ d1
90
90
90
-90
-90
-90
-90
+eb
+07
90
90
90
@@ -77710,8 +77710,8 @@ ff
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -78314,6 +78314,8 @@ ff
00
00
00
+eb
+0d
90
90
90
@@ -78328,12 +78330,10 @@ ff
90
90
90
-90
-90
-90
-90
-90
-90
+8d
+74
+26
+00
00
00
00
@@ -78418,8 +78418,8 @@ c8
00
00
00
-90
-90
+eb
+0a
90
90
90
@@ -78626,6 +78626,8 @@ c8
00
00
00
+eb
+0d
90
90
90
@@ -78639,10 +78641,8 @@ c8
90
90
90
-90
-90
-90
-90
+eb
+0b
90
90
90
@@ -78711,13 +78711,13 @@ e3
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
00
00
00
@@ -78970,10 +78970,10 @@ e0
00
00
00
-90
-90
-90
-90
+8d
+74
+26
+00
04
00
00
@@ -79142,6 +79142,8 @@ ba
00
00
00
+eb
+0d
90
90
90
@@ -79155,10 +79157,8 @@ ba
90
90
90
-90
-90
-90
-90
+eb
+07
90
90
90
@@ -79278,8 +79278,8 @@ cd
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -79378,8 +79378,8 @@ cd
00
00
00
-90
-90
+eb
+0a
90
90
90
@@ -79530,6 +79530,8 @@ cd
00
00
00
+eb
+0d
90
90
90
@@ -79544,12 +79546,10 @@ cd
90
90
90
-90
-90
-90
-90
-90
-90
+8d
+74
+26
+00
02
00
00
@@ -79718,6 +79718,8 @@ cd
00
00
00
+eb
+0d
90
90
90
@@ -79731,10 +79733,8 @@ cd
90
90
90
-90
-90
-90
-90
+eb
+07
90
90
90
@@ -79854,8 +79854,8 @@ a1
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -79982,8 +79982,8 @@ a2
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -80082,8 +80082,8 @@ a1
00
00
00
-90
-90
+eb
+0a
90
90
90
@@ -80206,8 +80206,8 @@ c9
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -80334,8 +80334,8 @@ a1
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -80407,13 +80407,13 @@ a1
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
00
10
00
@@ -80582,6 +80582,8 @@ aa
00
00
00
+eb
+0d
90
90
90
@@ -80595,10 +80597,8 @@ aa
90
90
90
-90
-90
-90
-90
+eb
+07
90
90
90
@@ -80690,8 +80690,8 @@ aa
00
00
00
-90
-90
+eb
+0a
90
90
90
@@ -80814,8 +80814,8 @@ d9
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -80887,13 +80887,13 @@ e0
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
00
10
00
@@ -80978,8 +80978,8 @@ a1
00
00
00
-90
-90
+eb
+0a
90
90
90
@@ -81047,13 +81047,13 @@ c8
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
08
00
00
@@ -81194,6 +81194,8 @@ c7
00
00
00
+eb
+0d
90
90
90
@@ -81208,12 +81210,10 @@ c7
90
90
90
-90
-90
-90
-90
-90
-90
+8d
+74
+26
+00
20
00
00
@@ -81326,8 +81326,8 @@ a1
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -81426,8 +81426,8 @@ ae
00
00
00
-90
-90
+eb
+0a
90
90
90
@@ -81802,6 +81802,8 @@ c4
00
00
00
+eb
+0d
90
90
90
@@ -81816,12 +81818,10 @@ c4
90
90
90
-90
-90
-90
-90
-90
-90
+8d
+74
+26
+00
00
20
00
@@ -81879,13 +81879,13 @@ c5
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
00
20
00
@@ -82222,8 +82222,8 @@ f7
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -82322,8 +82322,8 @@ c4
00
00
00
-90
-90
+eb
+0a
90
90
90
@@ -82474,6 +82474,8 @@ c4
00
00
00
+eb
+0d
90
90
90
@@ -82488,12 +82490,10 @@ c4
90
90
90
-90
-90
-90
-90
-90
-90
+8d
+74
+26
+00
00
40
00
@@ -82578,8 +82578,8 @@ c4
00
00
00
-90
-90
+eb
+0a
90
90
90
@@ -82647,13 +82647,13 @@ c4
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
40
20
00
@@ -82766,8 +82766,8 @@ c4
21
00
00
-90
-90
+eb
+0d
90
90
90
@@ -82866,8 +82866,8 @@ c4
21
00
00
-90
-90
+eb
+0a
90
90
90
@@ -82935,13 +82935,13 @@ c5
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
00
80
00
@@ -82999,13 +82999,13 @@ c4
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
00
80
00
@@ -83118,8 +83118,8 @@ c4
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -83274,6 +83274,8 @@ c4
00
00
00
+eb
+0d
90
90
90
@@ -83288,12 +83290,10 @@ c4
90
90
90
-90
-90
-90
-90
-90
-90
+8d
+74
+26
+00
00
80
00
@@ -83602,8 +83602,8 @@ a2
00
00
00
-90
-90
+eb
+0a
90
90
90
@@ -83671,13 +83671,13 @@ a7
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
04
00
20
@@ -83846,6 +83846,8 @@ a7
00
00
00
+eb
+0d
90
90
90
@@ -83859,10 +83861,8 @@ a7
90
90
90
-90
-90
-90
-90
+eb
+07
90
90
90
@@ -83991,13 +83991,13 @@ a6
00
24
00
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
00
00
00
@@ -84133,6 +84133,8 @@ a6
65
64
00
+eb
+0d
90
90
90
@@ -84146,10 +84148,8 @@ a6
90
90
90
-90
-90
-90
-90
+eb
+08
90
90
90
@@ -84225,6 +84225,8 @@ a6
65
72
00
+eb
+0d
90
90
90
@@ -84238,10 +84240,8 @@ a6
90
90
90
-90
-90
-90
-90
+eb
+0c
90
90
90
@@ -84320,6 +84320,8 @@ a6
6f
6e
00
+eb
+0d
90
90
90
@@ -84333,10 +84335,8 @@ a6
90
90
90
-90
-90
-90
-90
+eb
+0d
90
90
90
@@ -84383,9 +84383,9 @@ a6
6f
6e
00
-90
-90
-90
+8d
+76
+00
af
03
00
@@ -84474,10 +84474,10 @@ ef
06
00
00
-90
-90
-90
-90
+8d
+74
+26
+00
75
6e
72
@@ -85258,6 +85258,8 @@ fc
15
00
00
+eb
+0d
90
90
90
@@ -85272,12 +85274,10 @@ fc
90
90
90
-90
-90
-90
-90
-90
-90
+8d
+74
+26
+00
60
73
27
@@ -85322,6 +85322,8 @@ fc
64
65
00
+eb
+0d
90
90
90
@@ -85336,12 +85338,10 @@ fc
90
90
90
-90
-90
-90
-90
-90
-90
+8d
+74
+26
+00
43
61
6e
@@ -85397,8 +85397,8 @@ fc
64
65
00
-90
-90
+eb
+07
90
90
90
@@ -85471,6 +85471,8 @@ fc
64
65
00
+eb
+0d
90
90
90
@@ -85484,10 +85486,8 @@ fc
90
90
90
-90
-90
-90
-90
+eb
+0d
90
90
90
diff --git a/modules/objfmts/dbg/dbg-objfmt.c b/modules/objfmts/dbg/dbg-objfmt.c
index 2b8b83a5..3562cbe1 100644
--- a/modules/objfmts/dbg/dbg-objfmt.c
+++ b/modules/objfmts/dbg/dbg-objfmt.c
@@ -43,8 +43,7 @@ yasm_objfmt_module yasm_dbg_LTX_objfmt;
static yasm_objfmt *
-dbg_objfmt_create(const char *in_filename, yasm_object *object,
- yasm_arch *a)
+dbg_objfmt_create(yasm_object *object, yasm_arch *a)
{
yasm_objfmt_dbg *objfmt_dbg = yasm_xmalloc(sizeof(yasm_objfmt_dbg));
@@ -57,14 +56,13 @@ dbg_objfmt_create(const char *in_filename, yasm_object *object,
fprintf(stderr, N_("could not open temporary file"));
return 0;
}
- fprintf(objfmt_dbg->dbgfile, "create(\"%s\", %s arch)\n",
- in_filename, yasm_arch_keyword(a));
+ fprintf(objfmt_dbg->dbgfile, "create(%s arch)\n", yasm_arch_keyword(a));
return (yasm_objfmt *)objfmt_dbg;
}
static void
-dbg_objfmt_output(yasm_objfmt *objfmt, FILE *f, const char *obj_filename,
- int all_syms, yasm_dbgfmt *df)
+dbg_objfmt_output(yasm_objfmt *objfmt, FILE *f, int all_syms, yasm_dbgfmt *df,
+ yasm_errwarns *errwarns)
{
yasm_objfmt_dbg *objfmt_dbg = (yasm_objfmt_dbg *)objfmt;
char buf[1024];
@@ -98,6 +96,26 @@ dbg_objfmt_destroy(yasm_objfmt *objfmt)
yasm_xfree(objfmt);
}
+static yasm_section *
+dbg_objfmt_add_default_section(yasm_objfmt *objfmt)
+{
+ yasm_objfmt_dbg *objfmt_dbg = (yasm_objfmt_dbg *)objfmt;
+ yasm_section *retval;
+ int isnew;
+
+ retval = yasm_object_get_general(objfmt_dbg->object, ".text",
+ yasm_expr_create_ident(yasm_expr_int(yasm_intnum_create_uint(200)), 0),
+ 0, 0, 0, &isnew, 0);
+ if (isnew) {
+ fprintf(objfmt_dbg->dbgfile, "(new) ");
+ yasm_symtab_define_label(
+ yasm_object_get_symtab(objfmt_dbg->object), ".text",
+ yasm_section_bcs_first(retval), 1, 0);
+ yasm_section_set_default(retval, 1);
+ }
+ return retval;
+}
+
static /*@observer@*/ /*@null@*/ yasm_section *
dbg_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
/*@unused@*/ /*@null@*/
@@ -125,6 +143,7 @@ dbg_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
yasm_object_get_symtab(objfmt_dbg->object), vp->val,
yasm_section_bcs_first(retval), 1, line);
}
+ yasm_section_set_default(retval, 0);
fprintf(objfmt_dbg->dbgfile, "\"%s\" section\n", vp->val);
return retval;
} else {
@@ -133,15 +152,6 @@ dbg_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
}
}
-static void
-dbg_objfmt_section_align(yasm_objfmt *objfmt, yasm_section *sect,
- unsigned long align, unsigned long line)
-{
- yasm_objfmt_dbg *objfmt_dbg = (yasm_objfmt_dbg *)objfmt;
- fprintf(objfmt_dbg->dbgfile, "section_align(\"%s\", %lu, %lu)\n",
- yasm_section_get_name(sect), align, line);
-}
-
static yasm_symrec *
dbg_objfmt_extern_declare(yasm_objfmt *objfmt, const char *name,
/*@unused@*/ /*@null@*/
@@ -226,13 +236,13 @@ yasm_objfmt_module yasm_dbg_LTX_objfmt = {
"Trace of all info passed to object format module",
"dbg",
"dbg",
- ".text",
32,
dbg_objfmt_dbgfmt_keywords,
"null",
dbg_objfmt_create,
dbg_objfmt_output,
dbg_objfmt_destroy,
+ dbg_objfmt_add_default_section,
dbg_objfmt_section_switch,
dbg_objfmt_extern_declare,
dbg_objfmt_global_declare,
diff --git a/modules/objfmts/elf/elf-machine.h b/modules/objfmts/elf/elf-machine.h
index 9eb896fc..bec98dbf 100644
--- a/modules/objfmts/elf/elf-machine.h
+++ b/modules/objfmts/elf/elf-machine.h
@@ -30,12 +30,12 @@
#define YASM_WRITE_32I_L(p, i) do {\
assert(yasm_intnum_check_size(i, 32, 0, 2)); \
- yasm_intnum_get_sized(i, p, 4, 32, 0, 0, 0, 0); \
+ yasm_intnum_get_sized(i, p, 4, 32, 0, 0, 0); \
p += 4; } while (0)
#define YASM_WRITE_64I_L(p, i) do {\
assert(yasm_intnum_check_size(i, 64, 0, 2)); \
- yasm_intnum_get_sized(i, p, 8, 64, 0, 0, 0, 0); \
+ yasm_intnum_get_sized(i, p, 8, 64, 0, 0, 0); \
p += 8; } while (0)
#define YASM_WRITE_64C_L(p, hi, lo) do {\
diff --git a/modules/objfmts/elf/elf-objfmt.c b/modules/objfmts/elf/elf-objfmt.c
index 15bffadd..2beeffbf 100644
--- a/modules/objfmts/elf/elf-objfmt.c
+++ b/modules/objfmts/elf/elf-objfmt.c
@@ -63,11 +63,13 @@ typedef struct yasm_objfmt_elf {
yasm_symtab *symtab;
/*@dependent@*/ yasm_arch *arch;
+ elf_strtab_entry *file_strtab_entry;/* .file symbol associated string */
yasm_symrec *dotdotsym; /* ..sym symbol */
} yasm_objfmt_elf;
typedef struct {
yasm_objfmt_elf *objfmt_elf;
+ yasm_errwarns *errwarns;
FILE *f;
elf_secthead *shead;
yasm_section *sect;
@@ -122,7 +124,7 @@ elf_objfmt_append_local_sym(yasm_symrec *sym, /*@null@*/ void *d)
assert(info != NULL);
if (!yasm_symrec_get_label(sym, &precbc))
- return 1;
+ return 0;
sect = yasm_bc_get_section(precbc);
entry = yasm_symrec_get_data(sym, &elf_symrec_data);
@@ -146,20 +148,19 @@ elf_objfmt_append_local_sym(yasm_symrec *sym, /*@null@*/ void *d)
yasm_symrec_add_data(sym, &elf_symrec_data, entry);
if (is_sect)
- return 1;
+ return 0;
}
if (precbc)
value = precbc->offset + precbc->len;
elf_symtab_set_nonzero(entry, sect, 0, 0, 0, NULL, &value);
- return 1;
+ return 0;
}
static yasm_objfmt *
-elf_objfmt_create_common(const char *in_filename, yasm_object *object,
- yasm_arch *a, yasm_objfmt_module *module,
- int bits_pref,
+elf_objfmt_create_common(yasm_object *object, yasm_arch *a,
+ yasm_objfmt_module *module, int bits_pref,
const elf_machine_handler **elf_march_out)
{
yasm_objfmt_elf *objfmt_elf = yasm_xmalloc(sizeof(yasm_objfmt_elf));
@@ -186,8 +187,11 @@ elf_objfmt_create_common(const char *in_filename, yasm_object *object,
/* FIXME: misuse of NULL bytecode here; it works, but only barely. */
filesym = yasm_symtab_define_label(objfmt_elf->symtab, ".file", NULL, 0,
0);
- entry = elf_symtab_entry_create(
- elf_strtab_append_str(objfmt_elf->strtab, in_filename), filesym);
+ /* Put in current input filename; we'll replace it in output() */
+ objfmt_elf->file_strtab_entry =
+ elf_strtab_append_str(objfmt_elf->strtab,
+ yasm_object_get_source_fn(object));
+ entry = elf_symtab_entry_create(objfmt_elf->file_strtab_entry, filesym);
yasm_symrec_add_data(filesym, &elf_symrec_data, entry);
elf_symtab_set_nonzero(entry, NULL, SHN_ABS, STB_LOCAL, STT_FILE, NULL,
NULL);
@@ -201,14 +205,14 @@ elf_objfmt_create_common(const char *in_filename, yasm_object *object,
}
static yasm_objfmt *
-elf_objfmt_create(const char *in_filename, yasm_object *object, yasm_arch *a)
+elf_objfmt_create(yasm_object *object, yasm_arch *a)
{
const elf_machine_handler *elf_march;
yasm_objfmt *objfmt;
yasm_objfmt_elf *objfmt_elf;
- objfmt = elf_objfmt_create_common(in_filename, object, a,
- &yasm_elf_LTX_objfmt, 0, &elf_march);
+ objfmt = elf_objfmt_create_common(object, a, &yasm_elf_LTX_objfmt, 0,
+ &elf_march);
if (objfmt) {
objfmt_elf = (yasm_objfmt_elf *)objfmt;
/* Figure out which bitness of object format to use */
@@ -221,17 +225,17 @@ elf_objfmt_create(const char *in_filename, yasm_object *object, yasm_arch *a)
}
static yasm_objfmt *
-elf32_objfmt_create(const char *in_filename, yasm_object *object, yasm_arch *a)
+elf32_objfmt_create(yasm_object *object, yasm_arch *a)
{
- return elf_objfmt_create_common(in_filename, object, a,
- &yasm_elf32_LTX_objfmt, 32, NULL);
+ return elf_objfmt_create_common(object, a, &yasm_elf32_LTX_objfmt, 32,
+ NULL);
}
static yasm_objfmt *
-elf64_objfmt_create(const char *in_filename, yasm_object *object, yasm_arch *a)
+elf64_objfmt_create(yasm_object *object, yasm_arch *a)
{
- return elf_objfmt_create_common(in_filename, object, a,
- &yasm_elf64_LTX_objfmt, 64, NULL);
+ return elf_objfmt_create_common(object, a, &yasm_elf64_LTX_objfmt, 64,
+ NULL);
}
static long
@@ -244,14 +248,16 @@ elf_objfmt_output_align(FILE *f, unsigned int align)
pos = ftell(f);
if (pos == -1) {
- yasm__error(0, N_("could not get file position on output file"));
+ yasm_error_set(YASM_ERROR_IO,
+ N_("could not get file position on output file"));
return -1;
}
delta = align - (pos & (align-1));
if (delta != align) {
pos += delta;
if (fseek(f, pos, SEEK_SET) < 0) {
- yasm__error(0, N_("could not set file position on output file"));
+ yasm_error_set(YASM_ERROR_IO,
+ N_("could not set file position on output file"));
return -1;
}
}
@@ -271,7 +277,7 @@ elf_objfmt_output_reloc(yasm_symrec *sym, yasm_bytecode *bc,
reloc = elf_reloc_entry_create(sym, NULL,
yasm_intnum_create_uint(bc->offset), 0, valsize);
if (reloc == NULL) {
- yasm__error(bc->line, N_("elf: invalid relocation size"));
+ yasm_error_set(YASM_ERROR_TYPE, N_("elf: invalid relocation size"));
return 1;
}
/* allocate .rel[a] sections on a need-basis */
@@ -280,130 +286,117 @@ elf_objfmt_output_reloc(yasm_symrec *sym, yasm_bytecode *bc,
zero = yasm_intnum_create_uint(0);
elf_handle_reloc_addend(zero, reloc);
retval = yasm_arch_intnum_tobytes(info->objfmt_elf->arch, zero, buf,
- destsize, valsize, 0, bc, warn,
- bc->line);
+ destsize, valsize, 0, bc, warn);
yasm_intnum_destroy(zero);
return retval;
}
static int
-elf_objfmt_output_expr(yasm_expr **ep, unsigned char *buf, size_t destsize,
- size_t valsize, int shift, unsigned long offset,
- yasm_bytecode *bc, int rel, int warn,
+elf_objfmt_output_value(yasm_value *value, unsigned char *buf, size_t destsize,
+ unsigned long offset, yasm_bytecode *bc, int warn,
/*@null@*/ void *d)
{
/*@null@*/ elf_objfmt_output_info *info = (elf_objfmt_output_info *)d;
/*@dependent@*/ /*@null@*/ yasm_intnum *intn;
- /*@dependent@*/ /*@null@*/ const yasm_floatnum *flt;
- /*@dependent@*/ /*@null@*/ yasm_symrec *sym;
+ unsigned long intn_val;
/*@null@*/ elf_reloc_entry *reloc = NULL;
- /*@null@*/ yasm_expr *wrt_expr;
- /*@dependent@*/ /*@null@*/ yasm_symrec *wrt = NULL;
+ int retval;
+ unsigned int valsize = value->size;
if (info == NULL)
yasm_internal_error("null info struct");
- *ep = yasm_expr_simplify(*ep, yasm_common_calc_bc_dist);
-
- /* Handle floating point expressions */
- flt = yasm_expr_get_floatnum(ep);
- if (flt) {
- if (shift < 0)
- yasm_internal_error(N_("attempting to negative shift a float"));
- return yasm_arch_floatnum_tobytes(info->objfmt_elf->arch, flt, buf,
- destsize, valsize,
- (unsigned int)shift, warn, bc->line);
- }
-
- /* Check for a WRT relocation */
- wrt_expr = yasm_expr_extract_wrt(ep);
- if (wrt_expr) {
- wrt = yasm_expr_extract_symrec(&wrt_expr, YASM_SYMREC_REPLACE_ZERO,
- yasm_common_calc_bc_dist);
- yasm_expr_destroy(wrt_expr);
- if (!wrt) {
- yasm__error(bc->line, N_("WRT expression too complex"));
+ if (value->abs)
+ value->abs = yasm_expr_simplify(value->abs, yasm_common_calc_bc_dist);
+
+ /* Try to output constant and PC-relative section-local first.
+ * Note this does NOT output any value with a SEG, WRT, external,
+ * cross-section, or non-PC-relative reference (those are handled below).
+ */
+ switch (yasm_value_output_basic(value, buf, destsize, bc, warn,
+ info->objfmt_elf->arch,
+ yasm_common_calc_bc_dist)) {
+ case -1:
return 1;
- }
+ case 0:
+ break;
+ default:
+ return 0;
}
- /* Handle integer expressions, with relocation if necessary */
- if (wrt == info->objfmt_elf->dotdotsym
- || (wrt && elf_is_wrt_sym_relative(wrt)))
- sym = yasm_expr_extract_symrec(ep, YASM_SYMREC_REPLACE_ZERO,
- yasm_common_calc_bc_dist);
- else
- sym = yasm_expr_extract_symrec(ep, YASM_SYMREC_REPLACE_VALUE_IF_LOCAL,
- yasm_common_calc_bc_dist);
+ /* Handle other expressions, with relocation if necessary */
+ if (value->seg_of || value->section_rel || value->rshift > 0) {
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("elf: relocation too complex"));
+ return 1;
+ }
- if (sym) {
- yasm_sym_vis vis;
+ intn_val = 0;
+ if (value->rel) {
+ yasm_sym_vis vis = yasm_symrec_get_visibility(value->rel);
+ /*@dependent@*/ /*@null@*/ yasm_symrec *sym = value->rel;
+ /*@dependent@*/ /*@null@*/ yasm_symrec *wrt = value->wrt;
- vis = yasm_symrec_get_visibility(sym);
if (wrt == info->objfmt_elf->dotdotsym)
wrt = NULL;
else if (wrt && elf_is_wrt_sym_relative(wrt))
;
else if (vis == YASM_SYM_LOCAL) {
- yasm_bytecode *label_precbc;
- /* Local symbols need relocation to their section's start */
- if (yasm_symrec_get_label(sym, &label_precbc)) {
- yasm_section *label_sect = yasm_bc_get_section(label_precbc);
+ yasm_bytecode *sym_precbc;
+ /* Local symbols need relocation to their section's start, and
+ * add in the offset of the bytecode (within the target section)
+ * into the abs portion.
+ *
+ * This is only done if the symbol is relocated against the
+ * section instead of the symbol itself.
+ */
+ if (yasm_symrec_get_label(sym, &sym_precbc)) {
+ /* Relocate to section start */
+ yasm_section *sym_sect = yasm_bc_get_section(sym_precbc);
/*@null@*/ elf_secthead *sym_shead;
- sym_shead =
- yasm_section_get_data(label_sect, &elf_section_data);
+ sym_shead = yasm_section_get_data(sym_sect, &elf_section_data);
assert(sym_shead != NULL);
sym = elf_secthead_get_sym(sym_shead);
- }
- }
- if (rel) {
- /* Need to reference to start of section, so add $$ in. */
- *ep = yasm_expr_create(YASM_EXPR_ADD, yasm_expr_expr(*ep),
- yasm_expr_sym(yasm_symtab_define_label2("$$",
- yasm_section_bcs_first(info->sect), 0, (*ep)->line)),
- (*ep)->line);
- /* HELP: and this seems to have the desired effect. */
- *ep = yasm_expr_create(YASM_EXPR_ADD, yasm_expr_expr(*ep),
- yasm_expr_int(yasm_intnum_create_uint(bc->offset + offset)),
- (*ep)->line);
- *ep = yasm_expr_simplify(*ep, yasm_common_calc_bc_dist);
+ intn_val = sym_precbc->offset + sym_precbc->len;
+ }
}
+
+ /* For PC-relative, need to add offset of expression within bc. */
+ if (value->curpos_rel)
+ intn_val += offset;
reloc = elf_reloc_entry_create(sym, wrt,
- yasm_intnum_create_uint(bc->offset + offset), rel, valsize);
+ yasm_intnum_create_uint(bc->offset + offset), value->curpos_rel,
+ valsize);
if (reloc == NULL) {
- yasm__error(bc->line, N_("elf: invalid relocation (WRT or size)"));
+ yasm_error_set(YASM_ERROR_TYPE,
+ N_("elf: invalid relocation (WRT or size)"));
return 1;
}
/* allocate .rel[a] sections on a need-basis */
elf_secthead_append_reloc(info->sect, info->shead, reloc);
}
- intn = yasm_expr_get_intnum(ep, NULL);
- if (intn) {
- if (rel) {
- int retval = yasm_arch_intnum_fixup_rel(info->objfmt_elf->arch,
- intn, valsize, bc,
- bc->line);
- if (retval)
- return retval;
- }
- if (reloc)
- elf_handle_reloc_addend(intn, reloc);
- return yasm_arch_intnum_tobytes(info->objfmt_elf->arch, intn, buf,
- destsize, valsize, shift, bc, warn,
- bc->line);
- }
+ intn = yasm_intnum_create_uint(intn_val);
- /* Check for complex float expressions */
- if (yasm_expr__contains(*ep, YASM_EXPR_FLOAT)) {
- yasm__error(bc->line, N_("floating point expression too complex"));
- return 1;
+ if (value->abs) {
+ yasm_intnum *intn2 = yasm_expr_get_intnum(&value->abs, NULL);
+ if (!intn2) {
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("elf: relocation too complex"));
+ yasm_intnum_destroy(intn);
+ return 1;
+ }
+ yasm_intnum_calc(intn, YASM_EXPR_ADD, intn2);
}
- yasm__error(bc->line, N_("elf: relocation too complex"));
- return 1;
+ if (reloc)
+ elf_handle_reloc_addend(intn, reloc);
+ retval = yasm_arch_intnum_tobytes(info->objfmt_elf->arch, intn, buf,
+ destsize, valsize, 0, bc, warn);
+ yasm_intnum_destroy(intn);
+ return retval;
}
static int
@@ -413,15 +406,13 @@ elf_objfmt_output_bytecode(yasm_bytecode *bc, /*@null@*/ void *d)
unsigned char buf[256];
/*@null@*/ /*@only@*/ unsigned char *bigbuf;
unsigned long size = 256;
- unsigned long multiple;
- unsigned long i;
int gap;
if (info == NULL)
yasm_internal_error("null info struct");
- bigbuf = yasm_bc_tobytes(bc, buf, &size, &multiple, &gap, info,
- elf_objfmt_output_expr, elf_objfmt_output_reloc);
+ bigbuf = yasm_bc_tobytes(bc, buf, &size, &gap, info,
+ elf_objfmt_output_value, elf_objfmt_output_reloc);
/* Don't bother doing anything else if size ended up being 0. */
if (size == 0) {
@@ -431,32 +422,26 @@ elf_objfmt_output_bytecode(yasm_bytecode *bc, /*@null@*/ void *d)
}
else {
yasm_intnum *bcsize = yasm_intnum_create_uint(size);
- yasm_intnum *mult = yasm_intnum_create_uint(multiple);
-
- yasm_intnum_calc(bcsize, YASM_EXPR_MUL, mult, 0);
elf_secthead_add_size(info->shead, bcsize);
-
yasm_intnum_destroy(bcsize);
- yasm_intnum_destroy(mult);
}
/* Warn that gaps are converted to 0 and write out the 0's. */
if (gap) {
unsigned long left;
- yasm__warning(YASM_WARN_UNINIT_CONTENTS, bc->line,
+ yasm_warn_set(YASM_WARN_UNINIT_CONTENTS,
N_("uninitialized space declared in code/data section: zeroing"));
/* Write out in chunks */
memset(buf, 0, 256);
- left = multiple*size;
+ left = size;
while (left > 256) {
fwrite(buf, 256, 1, info->f);
left -= 256;
}
fwrite(buf, left, 1, info->f);
} else {
- /* Output multiple copies of buf (or bigbuf if non-NULL) to file */
- for (i=0; i<multiple; i++)
- fwrite(bigbuf ? bigbuf : buf, (size_t)size, 1, info->f);
+ /* Output buf (or bigbuf if non-NULL) to file */
+ fwrite(bigbuf ? bigbuf : buf, (size_t)size, 1, info->f);
}
/* If bigbuf was allocated, free it */
@@ -466,31 +451,44 @@ elf_objfmt_output_bytecode(yasm_bytecode *bc, /*@null@*/ void *d)
return 0;
}
-static elf_secthead *
-elf_objfmt_create_dbg_secthead(yasm_section *sect,
- elf_objfmt_output_info *info)
+static int
+elf_objfmt_create_dbg_secthead(yasm_section *sect, /*@null@*/ void *d)
{
+ /*@null@*/ elf_objfmt_output_info *info = (elf_objfmt_output_info *)d;
elf_secthead *shead;
elf_section_type type=SHT_PROGBITS;
elf_size entsize=0;
- const char *sectname = yasm_section_get_name(sect);
- elf_strtab_entry *name = elf_strtab_append_str(info->objfmt_elf->shstrtab,
- sectname);
+ const char *sectname;
+ /*@dependent@*/ yasm_symrec *sym;
+ elf_strtab_entry *name;
+
+ shead = yasm_section_get_data(sect, &elf_section_data);
+ if (yasm_section_is_absolute(sect) || shead)
+ return 0; /* only create new secthead if missing and non-absolute */
+
+ sectname = yasm_section_get_name(sect);
+ name = elf_strtab_append_str(info->objfmt_elf->shstrtab, sectname);
if (yasm__strcasecmp(sectname, ".stab")==0) {
entsize = 12;
} else if (yasm__strcasecmp(sectname, ".stabstr")==0) {
type = SHT_STRTAB;
- }
- else
+ } else if (yasm__strncasecmp(sectname, ".debug_", 7)==0) {
+ ;
+ } else
yasm_internal_error(N_("Unrecognized section without data"));
shead = elf_secthead_create(name, type, 0, 0, 0);
elf_secthead_set_entsize(shead, entsize);
+ sym = yasm_symtab_define_label(
+ yasm_object_get_symtab(info->objfmt_elf->object), sectname,
+ yasm_section_bcs_first(sect), 1, 0);
+ elf_secthead_set_sym(shead, sym);
+
yasm_section_add_data(sect, &elf_section_data, shead);
- return shead;
+ return 0;
}
static int
@@ -510,7 +508,7 @@ elf_objfmt_output_section(yasm_section *sect, /*@null@*/ void *d)
yasm_internal_error("null info struct");
shead = yasm_section_get_data(sect, &elf_section_data);
if (shead == NULL)
- shead = elf_objfmt_create_dbg_secthead(sect, info);
+ yasm_internal_error("no associated data");
if (elf_secthead_get_align(shead) == 0)
elf_secthead_set_align(shead, yasm_section_get_align(sect));
@@ -529,20 +527,27 @@ elf_objfmt_output_section(yasm_section *sect, /*@null@*/ void *d)
return 0;
}
- if ((pos = ftell(info->f)) == -1)
- yasm__error(0, N_("couldn't read position on output stream"));
+ if ((pos = ftell(info->f)) == -1) {
+ yasm_error_set(YASM_ERROR_IO,
+ N_("couldn't read position on output stream"));
+ yasm_errwarn_propagate(info->errwarns, 0);
+ }
pos = elf_secthead_set_file_offset(shead, pos);
- if (fseek(info->f, pos, SEEK_SET) < 0)
- yasm__error(0, N_("couldn't seek on output stream"));
+ if (fseek(info->f, pos, SEEK_SET) < 0) {
+ yasm_error_set(YASM_ERROR_IO, N_("couldn't seek on output stream"));
+ yasm_errwarn_propagate(info->errwarns, 0);
+ }
info->sect = sect;
info->shead = shead;
- yasm_section_bcs_traverse(sect, info, elf_objfmt_output_bytecode);
+ yasm_section_bcs_traverse(sect, info->errwarns, info,
+ elf_objfmt_output_bytecode);
elf_secthead_set_index(shead, ++info->sindex);
/* No relocations to output? Go on to next section */
- if (elf_secthead_write_relocs_to_file(info->f, sect, shead) == 0)
+ if (elf_secthead_write_relocs_to_file(info->f, sect, shead,
+ info->errwarns) == 0)
return 0;
elf_secthead_set_rel_index(shead, ++info->sindex);
@@ -586,8 +591,8 @@ elf_objfmt_output_secthead(yasm_section *sect, /*@null@*/ void *d)
}
static void
-elf_objfmt_output(yasm_objfmt *objfmt, FILE *f, const char *obj_filename,
- int all_syms, yasm_dbgfmt *df)
+elf_objfmt_output(yasm_objfmt *objfmt, FILE *f, int all_syms, yasm_dbgfmt *df,
+ yasm_errwarns *errwarns)
{
yasm_objfmt_elf *objfmt_elf = (yasm_objfmt_elf *)objfmt;
elf_objfmt_output_info info;
@@ -601,18 +606,29 @@ elf_objfmt_output(yasm_objfmt *objfmt, FILE *f, const char *obj_filename,
unsigned long elf_symtab_nlocal;
info.objfmt_elf = objfmt_elf;
+ info.errwarns = errwarns;
info.f = f;
+ /* Update filename strtab */
+ elf_strtab_entry_set_str(objfmt_elf->file_strtab_entry,
+ yasm_object_get_source_fn(objfmt_elf->object));
+
/* Allocate space for Ehdr by seeking forward */
if (fseek(f, (long)(elf_proghead_get_size()), SEEK_SET) < 0) {
- yasm__error(0, N_("could not seek on output file"));
+ yasm_error_set(YASM_ERROR_IO, N_("could not seek on output file"));
+ yasm_errwarn_propagate(errwarns, 0);
return;
}
+ /* Create missing section headers */
+ localsym_info.objfmt_elf = objfmt_elf;
+ if (yasm_object_sections_traverse(objfmt_elf->object, &info,
+ elf_objfmt_create_dbg_secthead))
+ return;
+
/* add all (local) syms to symtab because relocation needs a symtab index
* if all_syms, register them by name. if not, use strtab entry 0 */
localsym_info.local_names = all_syms;
- localsym_info.objfmt_elf = objfmt_elf;
yasm_symtab_traverse(yasm_object_get_symtab(objfmt_elf->object),
&localsym_info, elf_objfmt_append_local_sym);
elf_symtab_nlocal = elf_symtab_assign_indices(objfmt_elf->elf_symtab);
@@ -631,26 +647,35 @@ elf_objfmt_output(yasm_objfmt *objfmt, FILE *f, const char *obj_filename,
".shstrtab");
/* output .shstrtab */
- if ((pos = elf_objfmt_output_align(f, 4)) == -1)
+ if ((pos = elf_objfmt_output_align(f, 4)) == -1) {
+ yasm_errwarn_propagate(errwarns, 0);
return;
+ }
elf_shstrtab_offset = (unsigned long) pos;
elf_shstrtab_size = elf_strtab_output_to_file(f, objfmt_elf->shstrtab);
/* output .strtab */
- if ((pos = elf_objfmt_output_align(f, 4)) == -1)
+ if ((pos = elf_objfmt_output_align(f, 4)) == -1) {
+ yasm_errwarn_propagate(errwarns, 0);
return;
+ }
elf_strtab_offset = (unsigned long) pos;
elf_strtab_size = elf_strtab_output_to_file(f, objfmt_elf->strtab);
/* output .symtab - last section so all others have indexes */
- if ((pos = elf_objfmt_output_align(f, 4)) == -1)
+ if ((pos = elf_objfmt_output_align(f, 4)) == -1) {
+ yasm_errwarn_propagate(errwarns, 0);
return;
+ }
elf_symtab_offset = (unsigned long) pos;
- elf_symtab_size = elf_symtab_write_to_file(f, objfmt_elf->elf_symtab);
+ elf_symtab_size = elf_symtab_write_to_file(f, objfmt_elf->elf_symtab,
+ errwarns);
/* output section header table */
- if ((pos = elf_objfmt_output_align(f, 16)) == -1)
+ if ((pos = elf_objfmt_output_align(f, 16)) == -1) {
+ yasm_errwarn_propagate(errwarns, 0);
return;
+ }
elf_shead_addr = (unsigned long) pos;
/* stabs debugging support */
@@ -707,7 +732,8 @@ elf_objfmt_output(yasm_objfmt *objfmt, FILE *f, const char *obj_filename,
/* output Ehdr */
if (fseek(f, 0, SEEK_SET) < 0) {
- yasm__error(0, N_("could not seek on output file"));
+ yasm_error_set(YASM_ERROR_IO, N_("could not seek on output file"));
+ yasm_errwarn_propagate(errwarns, 0);
return;
}
@@ -724,6 +750,43 @@ elf_objfmt_destroy(yasm_objfmt *objfmt)
yasm_xfree(objfmt);
}
+static elf_secthead *
+elf_objfmt_init_new_section(yasm_objfmt_elf *objfmt_elf, yasm_section *sect,
+ const char *sectname, unsigned long type,
+ unsigned long flags, unsigned long line)
+{
+ elf_secthead *esd;
+ yasm_symrec *sym;
+ elf_strtab_entry *name = elf_strtab_append_str(objfmt_elf->shstrtab,
+ sectname);
+
+ esd = elf_secthead_create(name, type, flags, 0, 0);
+ yasm_section_add_data(sect, &elf_section_data, esd);
+ sym = yasm_symtab_define_label(
+ yasm_object_get_symtab(objfmt_elf->object), sectname,
+ yasm_section_bcs_first(sect), 1, line);
+
+ elf_secthead_set_sym(esd, sym);
+
+ return esd;
+}
+
+static yasm_section *
+elf_objfmt_add_default_section(yasm_objfmt *objfmt)
+{
+ yasm_objfmt_elf *objfmt_elf = (yasm_objfmt_elf *)objfmt;
+ yasm_section *retval;
+ int isnew;
+ elf_secthead *esd;
+
+ retval = yasm_object_get_general(objfmt_elf->object, ".text", 0, 16, 1, 0,
+ &isnew, 0);
+ esd = elf_objfmt_init_new_section(objfmt_elf, retval, ".text", SHT_PROGBITS,
+ SHF_ALLOC + SHF_EXECINSTR, 0);
+ yasm_section_set_default(retval, 1);
+ return retval;
+}
+
static /*@observer@*/ /*@null@*/ yasm_section *
elf_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
/*@null@*/ yasm_valparamhead *objext_valparams,
@@ -736,7 +799,6 @@ elf_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
unsigned long type = SHT_PROGBITS;
unsigned long flags = SHF_ALLOC;
unsigned long align = 4;
- yasm_intnum *align_intn = NULL;
int flags_override = 0;
char *sectname;
int resonly = 0;
@@ -750,6 +812,8 @@ elf_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
/*{ "progbits", SHT_PROGBITS },*/
/*{ "align", 0 } */
};
+ /*@dependent@*/ /*@null@*/ const yasm_intnum *merge_intn = NULL;
+ elf_secthead *esd;
if (!vp || vp->param || !vp->val)
return NULL;
@@ -784,7 +848,7 @@ elf_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
int match;
if (!vp->val) {
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("Unrecognized numeric qualifier"));
continue;
}
@@ -833,7 +897,7 @@ elf_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
flags |= SHF_TLS;
break;
default:
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("unrecognized section attribute: `%c'"),
vp->val[i]);
}
@@ -851,64 +915,58 @@ elf_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
align_expr = yasm_expr_get_intnum(&vp->param, NULL);
if (!align_expr) {
- yasm__error(line,
- N_("argument to `%s' is not a power of two"),
- vp->val);
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("argument to `%s' is not a power of two"),
+ vp->val);
return NULL;
}
align = yasm_intnum_get_uint(align_expr);
/* Alignments must be a power of two. */
if ((align & (align - 1)) != 0) {
- yasm__error(line,
- N_("argument to `%s' is not a power of two"),
- vp->val);
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("argument to `%s' is not a power of two"),
+ vp->val);
return NULL;
}
} else
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("Unrecognized qualifier `%s'"), vp->val);
}
-
- retval = yasm_object_get_general(objfmt_elf->object, sectname, 0, align,
- (flags & SHF_EXECINSTR) != 0, resonly,
- &isnew, line);
-
- if (isnew) {
- elf_secthead *esd;
- yasm_symrec *sym;
- elf_strtab_entry *name = elf_strtab_append_str(objfmt_elf->shstrtab,
- sectname);
-
- esd = elf_secthead_create(name, type, flags, 0, 0);
- yasm_section_add_data(retval, &elf_section_data, esd);
- sym = yasm_symtab_define_label(
- yasm_object_get_symtab(objfmt_elf->object), sectname,
- yasm_section_bcs_first(retval), 1, line);
-
- elf_secthead_set_sym(esd, sym);
-
/* Handle merge entity size */
if (flags & SHF_MERGE) {
if (objext_valparams && (vp = yasm_vps_first(objext_valparams))
&& vp->param) {
- /*@dependent@*/ /*@null@*/ const yasm_intnum *merge_intn;
merge_intn = yasm_expr_get_intnum(&vp->param, NULL);
- if (merge_intn)
- elf_secthead_set_entsize(esd,
- yasm_intnum_get_uint(merge_intn));
- else
- yasm__warning(YASM_WARN_GENERAL, line,
+ if (!merge_intn)
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("invalid merge entity size"));
} else {
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("entity size for SHF_MERGE not specified"));
flags &= ~SHF_MERGE;
}
}
+
+ retval = yasm_object_get_general(objfmt_elf->object, sectname, 0, align,
+ (flags & SHF_EXECINSTR) != 0, resonly,
+ &isnew, line);
+
+ if (isnew)
+ esd = elf_objfmt_init_new_section(objfmt_elf, retval, sectname, type,
+ flags, line);
+ else
+ esd = yasm_section_get_data(retval, &elf_section_data);
+
+ if (isnew || yasm_section_is_default(retval)) {
+ yasm_section_set_default(retval, 0);
+ elf_secthead_set_typeflags(esd, type, flags);
+ if (merge_intn)
+ elf_secthead_set_entsize(esd, yasm_intnum_get_uint(merge_intn));
+ yasm_section_set_align(retval, align, line);
} else if (flags_override)
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("section flags ignored on section redeclaration"));
return retval;
}
@@ -930,7 +988,8 @@ elf_objfmt_extern_declare(yasm_objfmt *objfmt, const char *name, /*@unused@*/
for (; vp; vp = yasm_vps_next(vp))
{
if (vp->val)
- yasm__error(line, N_("unrecognized symbol type `%s'"), vp->val);
+ yasm_error_set(YASM_ERROR_TYPE,
+ N_("unrecognized symbol type `%s'"), vp->val);
}
}
return sym;
@@ -973,8 +1032,9 @@ elf_objfmt_global_declare(yasm_objfmt *objfmt, const char *name,
vis_overrides++;
}
else
- yasm__error(line, N_("unrecognized symbol type `%s'"),
- vp->val);
+ yasm_error_set(YASM_ERROR_TYPE,
+ N_("unrecognized symbol type `%s'"),
+ vp->val);
}
else if (vp->param && !size) {
size = vp->param;
@@ -982,7 +1042,7 @@ elf_objfmt_global_declare(yasm_objfmt *objfmt, const char *name,
}
}
if (vis_overrides > 1) {
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("More than one symbol visibility provided; using last"));
}
}
@@ -1013,20 +1073,20 @@ elf_objfmt_common_declare(yasm_objfmt *objfmt, const char *name,
align_expr = yasm_expr_get_intnum(&vp->param, NULL);
if (!align_expr) {
- yasm__error(line,
- N_("alignment constraint is not a power of two"));
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("alignment constraint is not a power of two"));
return sym;
}
addralign = yasm_intnum_get_uint(align_expr);
/* Alignments must be a power of two. */
if ((addralign & (addralign - 1)) != 0) {
- yasm__error(line,
- N_("alignment constraint is not a power of two"));
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("alignment constraint is not a power of two"));
return sym;
}
} else if (vp->val)
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("Unrecognized qualifier `%s'"), vp->val);
}
}
@@ -1051,7 +1111,7 @@ elf_objfmt_directive(yasm_objfmt *objfmt, const char *name,
elf_symtab_entry *entry;
if (!symname) {
- yasm__error(line, N_("Symbol name not specified"));
+ yasm_error_set(YASM_ERROR_SYNTAX, N_("Symbol name not specified"));
return 0;
}
@@ -1075,10 +1135,10 @@ elf_objfmt_directive(yasm_objfmt *objfmt, const char *name,
else if (yasm__strcasecmp(vp->val, "object") == 0)
elf_sym_set_type(entry, STT_OBJECT);
else
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("unrecognized symbol type `%s'"), vp->val);
} else
- yasm__error(line, N_("no type specified"));
+ yasm_error_set(YASM_ERROR_SYNTAX, N_("no type specified"));
} else if (yasm__strcasecmp(name, "size") == 0) {
/* Get symbol elf data */
sym = yasm_symtab_use(objfmt_elf->symtab, symname, line);
@@ -1100,7 +1160,7 @@ elf_objfmt_directive(yasm_objfmt *objfmt, const char *name,
elf_sym_set_size(entry, yasm_expr_create_ident(yasm_expr_sym(
yasm_symtab_use(objfmt_elf->symtab, vp->val, line)), line));
else
- yasm__error(line, N_("no size specified"));
+ yasm_error_set(YASM_ERROR_SYNTAX, N_("no size specified"));
} else if (yasm__strcasecmp(name, "weak") == 0) {
sym = yasm_symtab_declare(objfmt_elf->symtab, symname, YASM_SYM_GLOBAL,
line);
@@ -1117,6 +1177,7 @@ elf_objfmt_directive(yasm_objfmt *objfmt, const char *name,
static const char *elf_objfmt_dbgfmt_keywords[] = {
"null",
"stabs",
+ "dwarf2",
NULL
};
@@ -1125,13 +1186,13 @@ yasm_objfmt_module yasm_elf_LTX_objfmt = {
"ELF",
"elf",
"o",
- ".text",
32,
elf_objfmt_dbgfmt_keywords,
"null",
elf_objfmt_create,
elf_objfmt_output,
elf_objfmt_destroy,
+ elf_objfmt_add_default_section,
elf_objfmt_section_switch,
elf_objfmt_extern_declare,
elf_objfmt_global_declare,
@@ -1143,13 +1204,13 @@ yasm_objfmt_module yasm_elf32_LTX_objfmt = {
"ELF (32-bit)",
"elf32",
"o",
- ".text",
32,
elf_objfmt_dbgfmt_keywords,
"null",
elf32_objfmt_create,
elf_objfmt_output,
elf_objfmt_destroy,
+ elf_objfmt_add_default_section,
elf_objfmt_section_switch,
elf_objfmt_extern_declare,
elf_objfmt_global_declare,
@@ -1161,13 +1222,13 @@ yasm_objfmt_module yasm_elf64_LTX_objfmt = {
"ELF (64-bit)",
"elf64",
"o",
- ".text",
64,
elf_objfmt_dbgfmt_keywords,
"null",
elf64_objfmt_create,
elf_objfmt_output,
elf_objfmt_destroy,
+ elf_objfmt_add_default_section,
elf_objfmt_section_switch,
elf_objfmt_extern_declare,
elf_objfmt_global_declare,
diff --git a/modules/objfmts/elf/elf-x86-amd64.c b/modules/objfmts/elf/elf-x86-amd64.c
index 7894bec1..ac504ed8 100644
--- a/modules/objfmts/elf/elf-x86-amd64.c
+++ b/modules/objfmts/elf/elf-x86-amd64.c
@@ -116,7 +116,7 @@ elf_x86_amd64_write_secthead_rel(unsigned char *bufp,
nreloc = yasm_intnum_create_uint(shead->nreloc);
relocsize = yasm_intnum_create_uint(RELOC64A_SIZE);
- yasm_intnum_calc(relocsize, YASM_EXPR_MUL, nreloc, 0);
+ yasm_intnum_calc(relocsize, YASM_EXPR_MUL, nreloc);
YASM_WRITE_64I_L(bufp, relocsize); /* size */
yasm_intnum_destroy(nreloc);
yasm_intnum_destroy(relocsize);
diff --git a/modules/objfmts/elf/elf.c b/modules/objfmts/elf/elf.c
index bab607f1..f2426c01 100644
--- a/modules/objfmts/elf/elf.c
+++ b/modules/objfmts/elf/elf.c
@@ -164,6 +164,24 @@ elf_strtab_entry_create(const char *str)
return entry;
}
+void
+elf_strtab_entry_set_str(elf_strtab_entry *entry, const char *str)
+{
+ elf_strtab_entry *last;
+ if (entry->str)
+ yasm_xfree(entry->str);
+ entry->str = yasm__xstrdup(str);
+
+ /* Update all following indices since string length probably changes */
+ last = entry;
+ entry = STAILQ_NEXT(last, qlink);
+ while (entry) {
+ entry->index = last->index + strlen(last->str) + 1;
+ last = entry;
+ entry = STAILQ_NEXT(last, qlink);
+ }
+}
+
elf_strtab_head *
elf_strtab_create()
{
@@ -404,7 +422,8 @@ elf_symtab_assign_indices(elf_symtab_head *symtab)
}
unsigned long
-elf_symtab_write_to_file(FILE *f, elf_symtab_head *symtab)
+elf_symtab_write_to_file(FILE *f, elf_symtab_head *symtab,
+ yasm_errwarns *errwarns)
{
unsigned char buf[SYMTAB_MAXSIZE], *bufp;
elf_symtab_entry *entry, *prev;
@@ -423,9 +442,11 @@ elf_symtab_write_to_file(FILE *f, elf_symtab_head *symtab)
if (entry->xsize) {
size_intn = yasm_intnum_copy(
yasm_expr_get_intnum(&entry->xsize, yasm_common_calc_bc_dist));
- if (!size_intn)
- yasm__error(entry->xsize->line,
- N_("size specifier not an integer expression"));
+ if (!size_intn) {
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("size specifier not an integer expression"));
+ yasm_errwarn_propagate(errwarns, entry->xsize->line);
+ }
}
else
size_intn = yasm_intnum_create_uint(entry->size);
@@ -442,8 +463,9 @@ elf_symtab_write_to_file(FILE *f, elf_symtab_head *symtab)
yasm_common_calc_bc_dist);
if (equ_intn == NULL) {
- yasm__error(equ_expr->line,
- N_("EQU value not an integer expression"));
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("EQU value not an integer expression"));
+ yasm_errwarn_propagate(errwarns, equ_expr->line);
}
value_intn = yasm_intnum_copy(equ_intn);
@@ -559,6 +581,8 @@ elf_secthead_destroy(elf_secthead *shead)
if (shead == NULL)
yasm_internal_error(N_("shead is null"));
+ yasm_intnum_destroy(shead->size);
+
yasm_xfree(shead);
}
@@ -680,7 +704,7 @@ elf_secthead_write_rel_to_file(FILE *f, elf_section_index symtab_idx,
unsigned long
elf_secthead_write_relocs_to_file(FILE *f, yasm_section *sect,
- elf_secthead *shead)
+ elf_secthead *shead, yasm_errwarns *errwarns)
{
elf_reloc_entry *reloc;
unsigned char buf[RELOC_MAXSIZE], *bufp;
@@ -696,11 +720,16 @@ elf_secthead_write_relocs_to_file(FILE *f, yasm_section *sect,
/* first align section to multiple of 4 */
pos = ftell(f);
- if (pos == -1)
- yasm__error(0, N_("couldn't read position on output stream"));
+ if (pos == -1) {
+ yasm_error_set(YASM_ERROR_IO,
+ N_("couldn't read position on output stream"));
+ yasm_errwarn_propagate(errwarns, 0);
+ }
pos = (pos + 3) & ~3;
- if (fseek(f, pos, SEEK_SET) < 0)
- yasm__error(0, N_("couldn't seek on output stream"));
+ if (fseek(f, pos, SEEK_SET) < 0) {
+ yasm_error_set(YASM_ERROR_IO, N_("couldn't seek on output stream"));
+ yasm_errwarn_propagate(errwarns, 0);
+ }
shead->rel_offset = (unsigned long)pos;
@@ -739,6 +768,14 @@ elf_secthead_get_type(elf_secthead *shead)
return shead->type;
}
+void
+elf_secthead_set_typeflags(elf_secthead *shead, elf_section_type type,
+ elf_section_flags flags)
+{
+ shead->type = type;
+ shead->flags = flags;
+}
+
int
elf_secthead_is_empty(elf_secthead *shead)
{
@@ -815,7 +852,7 @@ void
elf_secthead_add_size(elf_secthead *shead, yasm_intnum *size)
{
if (size) {
- yasm_intnum_calc(shead->size, YASM_EXPR_ADD, size, 0);
+ yasm_intnum_calc(shead->size, YASM_EXPR_ADD, size);
}
}
diff --git a/modules/objfmts/elf/elf.h b/modules/objfmts/elf/elf.h
index b33bbef2..1a75f91a 100644
--- a/modules/objfmts/elf/elf.h
+++ b/modules/objfmts/elf/elf.h
@@ -421,6 +421,7 @@ void elf_reloc_entry_destroy(void *entry);
/* strtab functions */
elf_strtab_entry *elf_strtab_entry_create(const char *str);
+void elf_strtab_entry_set_str(elf_strtab_entry *entry, const char *str);
elf_strtab_head *elf_strtab_create(void);
elf_strtab_entry *elf_strtab_append_str(elf_strtab_head *head, const char *str);
void elf_strtab_destroy(elf_strtab_head *head);
@@ -435,7 +436,8 @@ void elf_symtab_insert_local_sym(elf_symtab_head *symtab,
elf_symtab_entry *entry);
void elf_symtab_destroy(elf_symtab_head *head);
unsigned long elf_symtab_assign_indices(elf_symtab_head *symtab);
-unsigned long elf_symtab_write_to_file(FILE *f, elf_symtab_head *symtab);
+unsigned long elf_symtab_write_to_file(FILE *f, elf_symtab_head *symtab,
+ yasm_errwarns *errwarns);
void elf_symtab_set_nonzero(elf_symtab_entry *entry,
struct yasm_section *sect,
elf_section_index sectidx,
@@ -461,6 +463,8 @@ unsigned long elf_secthead_write_to_file(FILE *f, elf_secthead *esd,
void elf_secthead_append_reloc(yasm_section *sect, elf_secthead *shead,
elf_reloc_entry *reloc);
elf_section_type elf_secthead_get_type(elf_secthead *shead);
+void elf_secthead_set_typeflags(elf_secthead *shead, elf_section_type type,
+ elf_section_flags flags);
int elf_secthead_is_empty(elf_secthead *shead);
struct yasm_symrec *elf_secthead_get_sym(elf_secthead *shead);
unsigned long elf_secthead_get_align(const elf_secthead *shead);
@@ -487,7 +491,8 @@ unsigned long elf_secthead_write_rel_to_file(FILE *f, elf_section_index symtab,
elf_secthead *esd,
elf_section_index sindex);
unsigned long elf_secthead_write_relocs_to_file(FILE *f, yasm_section *sect,
- elf_secthead *shead);
+ elf_secthead *shead,
+ yasm_errwarns *errwarns);
long elf_secthead_set_file_offset(elf_secthead *shead, long pos);
/* program header function */
diff --git a/modules/objfmts/elf/tests/Makefile.inc b/modules/objfmts/elf/tests/Makefile.inc
index 15f35652..48a22c1d 100644
--- a/modules/objfmts/elf/tests/Makefile.inc
+++ b/modules/objfmts/elf/tests/Makefile.inc
@@ -3,6 +3,11 @@
TESTS += modules/objfmts/elf/tests/elf_test.sh
EXTRA_DIST += modules/objfmts/elf/tests/elf_test.sh
+EXTRA_DIST += modules/objfmts/elf/tests/curpos.asm
+EXTRA_DIST += modules/objfmts/elf/tests/curpos.hex
+EXTRA_DIST += modules/objfmts/elf/tests/curpos.errwarn
+EXTRA_DIST += modules/objfmts/elf/tests/curpos-err.asm
+EXTRA_DIST += modules/objfmts/elf/tests/curpos-err.errwarn
EXTRA_DIST += modules/objfmts/elf/tests/elfcond.asm
EXTRA_DIST += modules/objfmts/elf/tests/elfcond.hex
EXTRA_DIST += modules/objfmts/elf/tests/elfcond.errwarn
@@ -19,6 +24,9 @@ EXTRA_DIST += modules/objfmts/elf/tests/elftest.errwarn
EXTRA_DIST += modules/objfmts/elf/tests/elftimes.asm
EXTRA_DIST += modules/objfmts/elf/tests/elftimes.hex
EXTRA_DIST += modules/objfmts/elf/tests/elftimes.errwarn
+EXTRA_DIST += modules/objfmts/elf/tests/elf-overdef.asm
+EXTRA_DIST += modules/objfmts/elf/tests/elf-overdef.hex
+EXTRA_DIST += modules/objfmts/elf/tests/elf-overdef.errwarn
EXTRA_DIST += modules/objfmts/elf/tests/elf-x86id.asm
EXTRA_DIST += modules/objfmts/elf/tests/elf-x86id.hex
EXTRA_DIST += modules/objfmts/elf/tests/elf-x86id.errwarn
diff --git a/modules/objfmts/elf/tests/curpos-err.asm b/modules/objfmts/elf/tests/curpos-err.asm
new file mode 100644
index 00000000..d6f632c9
--- /dev/null
+++ b/modules/objfmts/elf/tests/curpos-err.asm
@@ -0,0 +1,27 @@
+global bar
+global foo
+
+section .bar
+bar:
+dd foo-$
+dd baz-$
+call foo
+call baz
+foo:
+
+section .data
+baz:
+dd foo-$
+dd $-foo ; illegal
+dd baz-$
+dd $-baz
+dd foo+4-$ ; with constant
+dd $-baz+foo+4-$ ; both local and cross-segment (legal)
+dd baz+foo+4-$-$ ; ditto, slightly different
+dd (bar-$)+(foo-$) ; illegal (too many cross-segment)
+dd baz-$+baz-$ ; two from same segment
+
+section .text
+mov dword [foo-$], 5
+mov eax, foo-$
+call foo
diff --git a/modules/objfmts/elf/tests/curpos-err.errwarn b/modules/objfmts/elf/tests/curpos-err.errwarn
new file mode 100644
index 00000000..fb6f65d7
--- /dev/null
+++ b/modules/objfmts/elf/tests/curpos-err.errwarn
@@ -0,0 +1,2 @@
+-:15: data expression too complex
+-:21: data expression too complex
diff --git a/modules/objfmts/elf/tests/curpos.asm b/modules/objfmts/elf/tests/curpos.asm
new file mode 100644
index 00000000..4599e9cb
--- /dev/null
+++ b/modules/objfmts/elf/tests/curpos.asm
@@ -0,0 +1,27 @@
+global bar
+global foo
+
+section .bar
+bar:
+dd foo-$
+dd baz-$
+call foo
+call baz
+foo:
+
+section .data
+baz:
+dd foo-$
+;dd $-foo ; illegal
+dd baz-$
+dd $-baz
+dd foo+4-$ ; with constant
+dd $-baz+foo+4-$ ; both local and cross-segment (legal)
+dd baz+foo+4-$-$ ; ditto, slightly different
+;dd (bar-$)+(foo-$) ; illegal (too many cross-segment)
+dd baz-$+baz-$ ; two from same segment
+
+section .text
+mov dword [foo-$], 5
+mov eax, foo-$
+call foo
diff --git a/modules/objfmts/elf/tests/curpos.errwarn b/modules/objfmts/elf/tests/curpos.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/objfmts/elf/tests/curpos.errwarn
diff --git a/modules/objfmts/elf/tests/curpos.hex b/modules/objfmts/elf/tests/curpos.hex
new file mode 100644
index 00000000..d14b84d0
--- /dev/null
+++ b/modules/objfmts/elf/tests/curpos.hex
@@ -0,0 +1,832 @@
+7f
+45
+4c
+46
+01
+01
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+03
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b0
+01
+00
+00
+00
+00
+00
+00
+34
+00
+00
+00
+00
+00
+28
+00
+0a
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+c7
+05
+02
+00
+00
+00
+05
+00
+00
+00
+b8
+01
+00
+00
+00
+e8
+fc
+ff
+ff
+ff
+02
+00
+00
+00
+02
+07
+00
+00
+0b
+00
+00
+00
+02
+07
+00
+00
+10
+00
+00
+00
+02
+07
+00
+00
+12
+00
+00
+00
+00
+00
+00
+00
+e8
+05
+00
+00
+00
+e8
+fc
+ff
+ff
+ff
+00
+00
+04
+00
+00
+00
+02
+02
+00
+00
+0e
+00
+00
+00
+02
+02
+00
+00
+00
+00
+00
+00
+fc
+ff
+ff
+ff
+08
+00
+00
+00
+04
+00
+00
+00
+14
+00
+00
+00
+f0
+ff
+ff
+ff
+d0
+ff
+ff
+ff
+00
+00
+00
+00
+02
+07
+00
+00
+0c
+00
+00
+00
+02
+07
+00
+00
+10
+00
+00
+00
+02
+07
+00
+00
+14
+00
+00
+00
+02
+07
+00
+00
+00
+2e
+74
+65
+78
+74
+00
+2e
+62
+61
+72
+00
+2e
+64
+61
+74
+61
+00
+2e
+72
+65
+6c
+2e
+74
+65
+78
+74
+00
+2e
+72
+65
+6c
+2e
+62
+61
+72
+00
+2e
+72
+65
+6c
+2e
+64
+61
+74
+61
+00
+2e
+73
+74
+72
+74
+61
+62
+00
+2e
+73
+79
+6d
+74
+61
+62
+00
+2e
+73
+68
+73
+74
+72
+74
+61
+62
+00
+00
+00
+00
+00
+2d
+00
+62
+61
+72
+00
+66
+6f
+6f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+f1
+ff
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+04
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+00
+06
+00
+07
+00
+00
+00
+12
+00
+00
+00
+00
+00
+00
+00
+10
+00
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3f
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+cc
+00
+00
+00
+49
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2f
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+18
+01
+00
+00
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+37
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+24
+01
+00
+00
+80
+00
+00
+00
+02
+00
+00
+00
+06
+00
+00
+00
+04
+00
+00
+00
+10
+00
+00
+00
+01
+00
+00
+00
+01
+00
+00
+00
+06
+00
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+14
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+12
+00
+00
+00
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+54
+00
+00
+00
+18
+00
+00
+00
+03
+00
+00
+00
+04
+00
+00
+00
+04
+00
+00
+00
+08
+00
+00
+00
+07
+00
+00
+00
+01
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+6c
+00
+00
+00
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+1c
+00
+00
+00
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+80
+00
+00
+00
+10
+00
+00
+00
+03
+00
+00
+00
+06
+00
+00
+00
+04
+00
+00
+00
+08
+00
+00
+00
+0c
+00
+00
+00
+01
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+90
+00
+00
+00
+1c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+25
+00
+00
+00
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+ac
+00
+00
+00
+20
+00
+00
+00
+03
+00
+00
+00
+08
+00
+00
+00
+04
+00
+00
+00
+08
+00
+00
+00
diff --git a/modules/objfmts/elf/tests/elf-overdef.asm b/modules/objfmts/elf/tests/elf-overdef.asm
new file mode 100644
index 00000000..e42d1f48
--- /dev/null
+++ b/modules/objfmts/elf/tests/elf-overdef.asm
@@ -0,0 +1,2 @@
+section .text align=64
+
diff --git a/modules/objfmts/elf/tests/elf-overdef.errwarn b/modules/objfmts/elf/tests/elf-overdef.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/objfmts/elf/tests/elf-overdef.errwarn
diff --git a/modules/objfmts/elf/tests/elf-overdef.hex b/modules/objfmts/elf/tests/elf-overdef.hex
new file mode 100644
index 00000000..30b8ed4e
--- /dev/null
+++ b/modules/objfmts/elf/tests/elf-overdef.hex
@@ -0,0 +1,360 @@
+7f
+45
+4c
+46
+01
+01
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+03
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a0
+00
+00
+00
+00
+00
+00
+00
+34
+00
+00
+00
+00
+00
+28
+00
+05
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+74
+65
+78
+74
+00
+2e
+73
+74
+72
+74
+61
+62
+00
+2e
+73
+79
+6d
+74
+61
+62
+00
+2e
+73
+68
+73
+74
+72
+74
+61
+62
+00
+00
+00
+00
+00
+2d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+f1
+ff
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+17
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+21
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+07
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+64
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0f
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+68
+00
+00
+00
+30
+00
+00
+00
+02
+00
+00
+00
+03
+00
+00
+00
+04
+00
+00
+00
+10
+00
+00
+00
+01
+00
+00
+00
+01
+00
+00
+00
+06
+00
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+00
+00
+00
+00
diff --git a/modules/objfmts/elf/tests/elf-x86id.hex b/modules/objfmts/elf/tests/elf-x86id.hex
index 1a61d6ed..5f3bb4c1 100644
--- a/modules/objfmts/elf/tests/elf-x86id.hex
+++ b/modules/objfmts/elf/tests/elf-x86id.hex
@@ -68765,6 +68765,10 @@ ff
00
00
00
+00
+00
+00
+00
02
00
00
@@ -68930,6 +68934,8 @@ ff
00
00
00
+eb
+0d
90
90
90
@@ -68943,10 +68949,8 @@ ff
90
90
90
-90
-90
-90
-90
+eb
+07
90
90
90
@@ -70214,6 +70218,8 @@ c7
00
00
00
+eb
+0d
90
90
90
@@ -70228,12 +70234,10 @@ c7
90
90
90
-90
-90
-90
-90
-90
-90
+8d
+74
+26
+00
04
00
00
@@ -70402,6 +70406,8 @@ c7
00
00
00
+eb
+0d
90
90
90
@@ -70415,10 +70421,8 @@ c7
90
90
90
-90
-90
-90
-90
+eb
+07
90
90
90
@@ -71210,8 +71214,8 @@ a8
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -71814,6 +71818,8 @@ a9
00
00
00
+eb
+0d
90
90
90
@@ -71828,12 +71834,10 @@ a9
90
90
90
-90
-90
-90
-90
-90
-90
+8d
+74
+26
+00
00
00
00
@@ -72226,6 +72230,8 @@ a9
00
00
00
+eb
+0d
90
90
90
@@ -72239,10 +72245,8 @@ a9
90
90
90
-90
-90
-90
-90
+eb
+07
90
90
90
@@ -72418,6 +72422,8 @@ ed
00
00
00
+eb
+0d
90
90
90
@@ -72431,10 +72437,8 @@ ed
90
90
90
-90
-90
-90
-90
+eb
+07
90
90
90
@@ -72610,6 +72614,8 @@ ef
00
00
00
+eb
+0d
90
90
90
@@ -72623,10 +72629,8 @@ ef
90
90
90
-90
-90
-90
-90
+eb
+07
90
90
90
@@ -72718,8 +72722,8 @@ ef
00
00
00
-90
-90
+eb
+0a
90
90
90
@@ -72787,13 +72791,13 @@ ef
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
04
00
00
@@ -72851,13 +72855,13 @@ ef
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
00
00
00
@@ -73502,6 +73506,8 @@ ef
00
00
00
+eb
+0d
90
90
90
@@ -73515,10 +73521,8 @@ ef
90
90
90
-90
-90
-90
-90
+eb
+0b
90
90
90
@@ -73698,6 +73702,8 @@ ff
00
00
00
+eb
+0d
90
90
90
@@ -73711,10 +73717,8 @@ ff
90
90
90
-90
-90
-90
-90
+eb
+07
90
90
90
@@ -73834,8 +73838,8 @@ f7
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -74410,8 +74414,8 @@ f7
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -74483,13 +74487,13 @@ d4
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
00
00
00
@@ -75022,8 +75026,8 @@ af
00
00
00
-90
-90
+eb
+0a
90
90
90
@@ -75426,6 +75430,8 @@ d1
00
00
00
+eb
+0d
90
90
90
@@ -75439,10 +75445,8 @@ d1
90
90
90
-90
-90
-90
-90
+eb
+07
90
90
90
@@ -76010,8 +76014,8 @@ ff
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -76614,6 +76618,8 @@ ff
00
00
00
+eb
+0d
90
90
90
@@ -76628,12 +76634,10 @@ ff
90
90
90
-90
-90
-90
-90
-90
-90
+8d
+74
+26
+00
00
00
00
@@ -76718,8 +76722,8 @@ c8
00
00
00
-90
-90
+eb
+0a
90
90
90
@@ -76926,6 +76930,8 @@ c8
00
00
00
+eb
+0d
90
90
90
@@ -76939,10 +76945,8 @@ c8
90
90
90
-90
-90
-90
-90
+eb
+0b
90
90
90
@@ -77011,13 +77015,13 @@ e3
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
00
00
00
@@ -77270,10 +77274,10 @@ e0
00
00
00
-90
-90
-90
-90
+8d
+74
+26
+00
04
00
00
@@ -77442,6 +77446,8 @@ ba
00
00
00
+eb
+0d
90
90
90
@@ -77455,10 +77461,8 @@ ba
90
90
90
-90
-90
-90
-90
+eb
+07
90
90
90
@@ -77578,8 +77582,8 @@ cd
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -77678,8 +77682,8 @@ cd
00
00
00
-90
-90
+eb
+0a
90
90
90
@@ -77830,6 +77834,8 @@ cd
00
00
00
+eb
+0d
90
90
90
@@ -77844,12 +77850,10 @@ cd
90
90
90
-90
-90
-90
-90
-90
-90
+8d
+74
+26
+00
02
00
00
@@ -78018,6 +78022,8 @@ cd
00
00
00
+eb
+0d
90
90
90
@@ -78031,10 +78037,8 @@ cd
90
90
90
-90
-90
-90
-90
+eb
+07
90
90
90
@@ -78154,8 +78158,8 @@ a1
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -78282,8 +78286,8 @@ a2
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -78382,8 +78386,8 @@ a1
00
00
00
-90
-90
+eb
+0a
90
90
90
@@ -78506,8 +78510,8 @@ c9
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -78634,8 +78638,8 @@ a1
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -78707,13 +78711,13 @@ a1
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
00
10
00
@@ -78882,6 +78886,8 @@ aa
00
00
00
+eb
+0d
90
90
90
@@ -78895,10 +78901,8 @@ aa
90
90
90
-90
-90
-90
-90
+eb
+07
90
90
90
@@ -78990,8 +78994,8 @@ aa
00
00
00
-90
-90
+eb
+0a
90
90
90
@@ -79114,8 +79118,8 @@ d9
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -79187,13 +79191,13 @@ e0
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
00
10
00
@@ -79278,8 +79282,8 @@ a1
00
00
00
-90
-90
+eb
+0a
90
90
90
@@ -79347,13 +79351,13 @@ c8
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
08
00
00
@@ -79494,6 +79498,8 @@ c7
00
00
00
+eb
+0d
90
90
90
@@ -79508,12 +79514,10 @@ c7
90
90
90
-90
-90
-90
-90
-90
-90
+8d
+74
+26
+00
20
00
00
@@ -79626,8 +79630,8 @@ a1
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -79726,8 +79730,8 @@ ae
00
00
00
-90
-90
+eb
+0a
90
90
90
@@ -80102,6 +80106,8 @@ c4
00
00
00
+eb
+0d
90
90
90
@@ -80116,12 +80122,10 @@ c4
90
90
90
-90
-90
-90
-90
-90
-90
+8d
+74
+26
+00
00
20
00
@@ -80179,13 +80183,13 @@ c5
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
00
20
00
@@ -80522,8 +80526,8 @@ f7
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -80622,8 +80626,8 @@ c4
00
00
00
-90
-90
+eb
+0a
90
90
90
@@ -80774,6 +80778,8 @@ c4
00
00
00
+eb
+0d
90
90
90
@@ -80788,12 +80794,10 @@ c4
90
90
90
-90
-90
-90
-90
-90
-90
+8d
+74
+26
+00
00
40
00
@@ -80878,8 +80882,8 @@ c4
00
00
00
-90
-90
+eb
+0a
90
90
90
@@ -80947,13 +80951,13 @@ c4
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
40
20
00
@@ -81066,8 +81070,8 @@ c4
21
00
00
-90
-90
+eb
+0d
90
90
90
@@ -81166,8 +81170,8 @@ c4
21
00
00
-90
-90
+eb
+0a
90
90
90
@@ -81235,13 +81239,13 @@ c5
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
00
80
00
@@ -81299,13 +81303,13 @@ c4
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
00
80
00
@@ -81418,8 +81422,8 @@ c4
00
00
00
-90
-90
+eb
+0d
90
90
90
@@ -81574,6 +81578,8 @@ c4
00
00
00
+eb
+0d
90
90
90
@@ -81588,12 +81594,10 @@ c4
90
90
90
-90
-90
-90
-90
-90
-90
+8d
+74
+26
+00
00
80
00
@@ -81902,8 +81906,8 @@ a2
00
00
00
-90
-90
+eb
+0a
90
90
90
@@ -81971,13 +81975,13 @@ a7
00
00
90
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
04
00
20
@@ -82146,6 +82150,8 @@ a7
00
00
00
+eb
+0d
90
90
90
@@ -82159,10 +82165,8 @@ a7
90
90
90
-90
-90
-90
-90
+eb
+07
90
90
90
@@ -82291,13 +82295,13 @@ a6
00
24
00
-90
-90
-90
-90
-90
-90
-90
+8d
+b4
+26
+00
+00
+00
+00
00
00
00
@@ -82433,6 +82437,8 @@ a6
65
64
00
+eb
+0d
90
90
90
@@ -82446,10 +82452,8 @@ a6
90
90
90
-90
-90
-90
-90
+eb
+08
90
90
90
@@ -82525,6 +82529,8 @@ a6
65
72
00
+eb
+0d
90
90
90
@@ -82538,10 +82544,8 @@ a6
90
90
90
-90
-90
-90
-90
+eb
+0c
90
90
90
@@ -82620,6 +82624,8 @@ a6
6f
6e
00
+eb
+0d
90
90
90
@@ -82633,10 +82639,8 @@ a6
90
90
90
-90
-90
-90
-90
+eb
+0d
90
90
90
@@ -82683,9 +82687,9 @@ a6
6f
6e
00
-90
-90
-90
+8d
+76
+00
af
03
00
@@ -82774,10 +82778,10 @@ ef
06
00
00
-90
-90
-90
-90
+8d
+74
+26
+00
75
6e
72
@@ -83558,6 +83562,8 @@ fc
15
00
00
+eb
+0d
90
90
90
@@ -83572,12 +83578,10 @@ fc
90
90
90
-90
-90
-90
-90
-90
-90
+8d
+74
+26
+00
60
73
27
@@ -83622,6 +83626,8 @@ fc
64
65
00
+eb
+0d
90
90
90
@@ -83636,12 +83642,10 @@ fc
90
90
90
-90
-90
-90
-90
-90
-90
+8d
+74
+26
+00
43
61
6e
@@ -83697,8 +83701,8 @@ fc
64
65
00
-90
-90
+eb
+07
90
90
90
@@ -83771,6 +83775,8 @@ fc
64
65
00
+eb
+0d
90
90
90
@@ -83784,10 +83790,8 @@ fc
90
90
90
-90
-90
-90
-90
+eb
+0d
90
90
90
@@ -153410,10 +153414,6 @@ cb
00
00
00
-00
-00
-00
-00
3b
00
00
@@ -153430,7 +153430,7 @@ cb
00
00
00
-90
+94
a2
01
00
@@ -153470,7 +153470,7 @@ a2
00
00
00
-d8
+dc
a2
01
00
@@ -153510,7 +153510,7 @@ e4
00
00
00
-bc
+c0
a4
01
00
@@ -153670,7 +153670,7 @@ f3
00
00
00
-9c
+a0
0c
01
00
@@ -153686,7 +153686,7 @@ f3
00
00
00
-04
+20
00
00
00
@@ -153710,7 +153710,7 @@ f3
00
00
00
-c0
+c4
63
01
00
diff --git a/modules/objfmts/elf/tests/gas64/Makefile.inc b/modules/objfmts/elf/tests/gas64/Makefile.inc
index 1ae2e255..68d08f02 100644
--- a/modules/objfmts/elf/tests/gas64/Makefile.inc
+++ b/modules/objfmts/elf/tests/gas64/Makefile.inc
@@ -3,6 +3,9 @@
TESTS += modules/objfmts/elf/tests/gas64/elf_gas64_test.sh
EXTRA_DIST += modules/objfmts/elf/tests/gas64/elf_gas64_test.sh
+EXTRA_DIST += modules/objfmts/elf/tests/gas64/elf_gas64_curpos.asm
+EXTRA_DIST += modules/objfmts/elf/tests/gas64/elf_gas64_curpos.hex
+EXTRA_DIST += modules/objfmts/elf/tests/gas64/elf_gas64_curpos.errwarn
EXTRA_DIST += modules/objfmts/elf/tests/gas64/elf_gas64_reloc.asm
EXTRA_DIST += modules/objfmts/elf/tests/gas64/elf_gas64_reloc.hex
EXTRA_DIST += modules/objfmts/elf/tests/gas64/elf_gas64_reloc.errwarn
diff --git a/modules/objfmts/elf/tests/gas64/elf_gas64_curpos.asm b/modules/objfmts/elf/tests/gas64/elf_gas64_curpos.asm
new file mode 100644
index 00000000..60a893b3
--- /dev/null
+++ b/modules/objfmts/elf/tests/gas64/elf_gas64_curpos.asm
@@ -0,0 +1,27 @@
+.globl bar
+.globl foo
+
+.section .bar
+bar:
+.4byte foo-.
+.4byte baz-.
+call foo
+call baz
+foo:
+
+.section .data
+baz:
+.4byte foo-.
+#.4byte .-foo # illegal
+.4byte baz-.
+.4byte .-baz
+.4byte foo+4-. # with constant
+.4byte .-baz+foo+4-. # both local and cross-segment (legal)
+#.4byte baz+foo+4-.-. # ditto, slightly different - GAS gets confused on this
+#.4byte (bar-.)+(foo-.) # illegal (too many cross-segment)
+.4byte baz-.+baz-. # two from same segment
+
+.section .text
+movl $5, foo-.
+movl $(foo-.), %eax
+call foo
diff --git a/modules/objfmts/elf/tests/gas64/elf_gas64_curpos.errwarn b/modules/objfmts/elf/tests/gas64/elf_gas64_curpos.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/objfmts/elf/tests/gas64/elf_gas64_curpos.errwarn
diff --git a/modules/objfmts/elf/tests/gas64/elf_gas64_curpos.hex b/modules/objfmts/elf/tests/gas64/elf_gas64_curpos.hex
new file mode 100644
index 00000000..f1a2befa
--- /dev/null
+++ b/modules/objfmts/elf/tests/gas64/elf_gas64_curpos.hex
@@ -0,0 +1,1248 @@
+7f
+45
+4c
+46
+02
+01
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+3e
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+60
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+00
+00
+40
+00
+0a
+00
+01
+00
+c7
+04
+25
+00
+00
+00
+00
+05
+00
+00
+00
+b8
+00
+00
+00
+00
+e8
+00
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+07
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+0c
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+07
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+11
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+07
+00
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+12
+00
+00
+00
+00
+00
+00
+00
+e8
+05
+00
+00
+00
+e8
+00
+00
+00
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0e
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+02
+00
+00
+00
+fc
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+00
+00
+00
+00
+fc
+ff
+ff
+ff
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+d8
+ff
+ff
+ff
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0c
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+07
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+07
+00
+00
+00
+14
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+74
+65
+78
+74
+00
+2e
+62
+61
+72
+00
+2e
+64
+61
+74
+61
+00
+2e
+72
+65
+6c
+61
+2e
+74
+65
+78
+74
+00
+2e
+72
+65
+6c
+61
+2e
+62
+61
+72
+00
+2e
+72
+65
+6c
+61
+2e
+64
+61
+74
+61
+00
+2e
+73
+74
+72
+74
+61
+62
+00
+2e
+73
+79
+6d
+74
+61
+62
+00
+2e
+73
+68
+73
+74
+72
+74
+61
+62
+00
+00
+2d
+00
+62
+61
+72
+00
+66
+6f
+6f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+04
+00
+f1
+ff
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+10
+00
+06
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+07
+00
+00
+00
+10
+00
+06
+00
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+42
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+44
+01
+00
+00
+00
+00
+00
+00
+4c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+32
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+90
+01
+00
+00
+00
+00
+00
+00
+0b
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+3a
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+9c
+01
+00
+00
+00
+00
+00
+00
+c0
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+06
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+00
+00
+00
+00
+15
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+12
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+58
+00
+00
+00
+00
+00
+00
+00
+48
+00
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+04
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+07
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a0
+00
+00
+00
+00
+00
+00
+00
+12
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1d
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+b4
+00
+00
+00
+00
+00
+00
+00
+30
+00
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+06
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+0c
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e4
+00
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+27
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+fc
+00
+00
+00
+00
+00
+00
+00
+48
+00
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+08
+00
+00
+00
+08
+00
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
diff --git a/modules/objfmts/win32/tests/Makefile.inc b/modules/objfmts/win32/tests/Makefile.inc
index 0fdd0353..02d0d5b7 100644
--- a/modules/objfmts/win32/tests/Makefile.inc
+++ b/modules/objfmts/win32/tests/Makefile.inc
@@ -6,6 +6,15 @@ EXTRA_DIST += modules/objfmts/win32/tests/export.asm
EXTRA_DIST += modules/objfmts/win32/tests/export.hex
EXTRA_DIST += modules/objfmts/win32/tests/export.errwarn
EXTRA_DIST += modules/objfmts/win32/tests/win32_test.sh
+EXTRA_DIST += modules/objfmts/win32/tests/win32-curpos.asm
+EXTRA_DIST += modules/objfmts/win32/tests/win32-curpos.hex
+EXTRA_DIST += modules/objfmts/win32/tests/win32-curpos.errwarn
+EXTRA_DIST += modules/objfmts/win32/tests/win32-segof.asm
+EXTRA_DIST += modules/objfmts/win32/tests/win32-segof.hex
+EXTRA_DIST += modules/objfmts/win32/tests/win32-segof.errwarn
+EXTRA_DIST += modules/objfmts/win32/tests/win32-overdef.asm
+EXTRA_DIST += modules/objfmts/win32/tests/win32-overdef.hex
+EXTRA_DIST += modules/objfmts/win32/tests/win32-overdef.errwarn
EXTRA_DIST += modules/objfmts/win32/tests/win32test.c
EXTRA_DIST += modules/objfmts/win32/tests/win32test.asm
EXTRA_DIST += modules/objfmts/win32/tests/win32test.hex
diff --git a/modules/objfmts/win32/tests/win32-curpos.asm b/modules/objfmts/win32/tests/win32-curpos.asm
new file mode 100644
index 00000000..4599e9cb
--- /dev/null
+++ b/modules/objfmts/win32/tests/win32-curpos.asm
@@ -0,0 +1,27 @@
+global bar
+global foo
+
+section .bar
+bar:
+dd foo-$
+dd baz-$
+call foo
+call baz
+foo:
+
+section .data
+baz:
+dd foo-$
+;dd $-foo ; illegal
+dd baz-$
+dd $-baz
+dd foo+4-$ ; with constant
+dd $-baz+foo+4-$ ; both local and cross-segment (legal)
+dd baz+foo+4-$-$ ; ditto, slightly different
+;dd (bar-$)+(foo-$) ; illegal (too many cross-segment)
+dd baz-$+baz-$ ; two from same segment
+
+section .text
+mov dword [foo-$], 5
+mov eax, foo-$
+call foo
diff --git a/modules/objfmts/win32/tests/win32-curpos.errwarn b/modules/objfmts/win32/tests/win32-curpos.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/objfmts/win32/tests/win32-curpos.errwarn
diff --git a/modules/objfmts/win32/tests/win32-curpos.hex b/modules/objfmts/win32/tests/win32-curpos.hex
new file mode 100644
index 00000000..16b39a8f
--- /dev/null
+++ b/modules/objfmts/win32/tests/win32-curpos.hex
@@ -0,0 +1,480 @@
+4c
+01
+03
+00
+00
+00
+00
+00
+28
+01
+00
+00
+0a
+00
+00
+00
+00
+00
+0c
+01
+2e
+74
+65
+78
+74
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+14
+00
+00
+00
+8c
+00
+00
+00
+a0
+00
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+20
+00
+50
+60
+2e
+62
+61
+72
+00
+00
+00
+00
+14
+00
+00
+00
+00
+00
+00
+00
+12
+00
+00
+00
+be
+00
+00
+00
+d0
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+20
+00
+00
+60
+2e
+64
+61
+74
+61
+00
+00
+00
+26
+00
+00
+00
+00
+00
+00
+00
+1c
+00
+00
+00
+e4
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+04
+00
+00
+00
+40
+00
+30
+c0
+c7
+05
+18
+00
+00
+00
+05
+00
+00
+00
+b8
+17
+00
+00
+00
+e8
+12
+00
+00
+00
+02
+00
+00
+00
+06
+00
+00
+00
+14
+00
+0b
+00
+00
+00
+06
+00
+00
+00
+14
+00
+10
+00
+00
+00
+06
+00
+00
+00
+14
+00
+12
+00
+00
+00
+04
+00
+00
+00
+e8
+05
+00
+00
+00
+e8
+00
+00
+00
+00
+04
+00
+00
+00
+08
+00
+00
+00
+14
+00
+0e
+00
+00
+00
+08
+00
+00
+00
+14
+00
+16
+00
+00
+00
+fc
+ff
+ff
+ff
+08
+00
+00
+00
+1a
+00
+00
+00
+2a
+00
+00
+00
+06
+00
+00
+00
+d0
+ff
+ff
+ff
+00
+00
+00
+00
+06
+00
+00
+00
+14
+00
+0c
+00
+00
+00
+06
+00
+00
+00
+14
+00
+10
+00
+00
+00
+06
+00
+00
+00
+14
+00
+14
+00
+00
+00
+06
+00
+00
+00
+14
+00
+2e
+66
+69
+6c
+65
+00
+00
+00
+00
+00
+00
+00
+fe
+ff
+00
+00
+67
+01
+2d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+74
+65
+78
+74
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+03
+01
+14
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+62
+61
+72
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+02
+00
+66
+6f
+6f
+00
+00
+00
+00
+00
+12
+00
+00
+00
+02
+00
+00
+00
+02
+00
+2e
+62
+61
+72
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+03
+01
+12
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+64
+61
+74
+61
+00
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+03
+01
+1c
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+00
+00
diff --git a/modules/objfmts/win32/tests/win32-overdef.asm b/modules/objfmts/win32/tests/win32-overdef.asm
new file mode 100644
index 00000000..e42d1f48
--- /dev/null
+++ b/modules/objfmts/win32/tests/win32-overdef.asm
@@ -0,0 +1,2 @@
+section .text align=64
+
diff --git a/modules/objfmts/win32/tests/win32-overdef.errwarn b/modules/objfmts/win32/tests/win32-overdef.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/objfmts/win32/tests/win32-overdef.errwarn
diff --git a/modules/objfmts/win32/tests/win32-overdef.hex b/modules/objfmts/win32/tests/win32-overdef.hex
new file mode 100644
index 00000000..00d97cd6
--- /dev/null
+++ b/modules/objfmts/win32/tests/win32-overdef.hex
@@ -0,0 +1,136 @@
+4c
+01
+01
+00
+00
+00
+00
+00
+3c
+00
+00
+00
+04
+00
+00
+00
+00
+00
+0c
+01
+2e
+74
+65
+78
+74
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+00
+70
+60
+2e
+66
+69
+6c
+65
+00
+00
+00
+00
+00
+00
+00
+fe
+ff
+00
+00
+67
+01
+2d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+74
+65
+78
+74
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+03
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+00
+00
diff --git a/modules/objfmts/win32/tests/win32-segof.asm b/modules/objfmts/win32/tests/win32-segof.asm
new file mode 100644
index 00000000..5535cd0f
--- /dev/null
+++ b/modules/objfmts/win32/tests/win32-segof.asm
@@ -0,0 +1,10 @@
+extern value
+mov ax, seg value
+mov ds, ax
+
+mov ax, seg local
+mov es, ax
+
+section .data
+
+local:
diff --git a/modules/objfmts/win32/tests/win32-segof.errwarn b/modules/objfmts/win32/tests/win32-segof.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/objfmts/win32/tests/win32-segof.errwarn
diff --git a/modules/objfmts/win32/tests/win32-segof.hex b/modules/objfmts/win32/tests/win32-segof.hex
new file mode 100644
index 00000000..873129f1
--- /dev/null
+++ b/modules/objfmts/win32/tests/win32-segof.hex
@@ -0,0 +1,262 @@
+4c
+01
+02
+00
+00
+00
+00
+00
+84
+00
+00
+00
+07
+00
+00
+00
+00
+00
+0c
+01
+2e
+74
+65
+78
+74
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0c
+00
+00
+00
+64
+00
+00
+00
+70
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+20
+00
+50
+60
+2e
+64
+61
+74
+61
+00
+00
+00
+0c
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+00
+30
+c0
+66
+b8
+00
+00
+8e
+d8
+66
+b8
+00
+00
+8e
+c0
+02
+00
+00
+00
+04
+00
+00
+00
+0a
+00
+08
+00
+00
+00
+05
+00
+00
+00
+0a
+00
+2e
+66
+69
+6c
+65
+00
+00
+00
+00
+00
+00
+00
+fe
+ff
+00
+00
+67
+01
+2d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+74
+65
+78
+74
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+03
+01
+0c
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+76
+61
+6c
+75
+65
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+2e
+64
+61
+74
+61
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+03
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+00
+00
diff --git a/modules/objfmts/win64/tests/Makefile.inc b/modules/objfmts/win64/tests/Makefile.inc
index 70010766..8918be9a 100644
--- a/modules/objfmts/win64/tests/Makefile.inc
+++ b/modules/objfmts/win64/tests/Makefile.inc
@@ -3,7 +3,14 @@
TESTS += modules/objfmts/win64/tests/win64_test.sh
EXTRA_DIST += modules/objfmts/win64/tests/win64_test.sh
+EXTRA_DIST += modules/objfmts/win64/tests/win64-curpos.asm
+EXTRA_DIST += modules/objfmts/win64/tests/win64-curpos.hex
+EXTRA_DIST += modules/objfmts/win64/tests/win64-curpos.errwarn
EXTRA_DIST += modules/objfmts/win64/tests/win64-dataref.asm
EXTRA_DIST += modules/objfmts/win64/tests/win64-dataref.hex
EXTRA_DIST += modules/objfmts/win64/tests/win64-dataref.errwarn
EXTRA_DIST += modules/objfmts/win64/tests/win64-dataref.masm
+EXTRA_DIST += modules/objfmts/win64/tests/win64-dataref2.asm
+EXTRA_DIST += modules/objfmts/win64/tests/win64-dataref2.hex
+EXTRA_DIST += modules/objfmts/win64/tests/win64-dataref2.errwarn
+EXTRA_DIST += modules/objfmts/win64/tests/win64-dataref2.masm
diff --git a/modules/objfmts/win64/tests/win64-curpos.asm b/modules/objfmts/win64/tests/win64-curpos.asm
new file mode 100644
index 00000000..4599e9cb
--- /dev/null
+++ b/modules/objfmts/win64/tests/win64-curpos.asm
@@ -0,0 +1,27 @@
+global bar
+global foo
+
+section .bar
+bar:
+dd foo-$
+dd baz-$
+call foo
+call baz
+foo:
+
+section .data
+baz:
+dd foo-$
+;dd $-foo ; illegal
+dd baz-$
+dd $-baz
+dd foo+4-$ ; with constant
+dd $-baz+foo+4-$ ; both local and cross-segment (legal)
+dd baz+foo+4-$-$ ; ditto, slightly different
+;dd (bar-$)+(foo-$) ; illegal (too many cross-segment)
+dd baz-$+baz-$ ; two from same segment
+
+section .text
+mov dword [foo-$], 5
+mov eax, foo-$
+call foo
diff --git a/modules/objfmts/win64/tests/win64-curpos.errwarn b/modules/objfmts/win64/tests/win64-curpos.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/objfmts/win64/tests/win64-curpos.errwarn
diff --git a/modules/objfmts/win64/tests/win64-curpos.hex b/modules/objfmts/win64/tests/win64-curpos.hex
new file mode 100644
index 00000000..d7c51b10
--- /dev/null
+++ b/modules/objfmts/win64/tests/win64-curpos.hex
@@ -0,0 +1,499 @@
+64
+86
+03
+00
+00
+00
+00
+00
+29
+01
+00
+00
+0b
+00
+00
+00
+00
+00
+04
+00
+2e
+74
+65
+78
+74
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+15
+00
+00
+00
+8c
+00
+00
+00
+a1
+00
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+20
+00
+50
+60
+2e
+62
+61
+72
+00
+00
+00
+00
+15
+00
+00
+00
+00
+00
+00
+00
+12
+00
+00
+00
+bf
+00
+00
+00
+d1
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+20
+00
+00
+60
+2e
+64
+61
+74
+61
+00
+00
+00
+27
+00
+00
+00
+00
+00
+00
+00
+1c
+00
+00
+00
+e5
+00
+00
+00
+01
+01
+00
+00
+00
+00
+00
+00
+04
+00
+00
+00
+40
+00
+50
+c0
+c7
+04
+25
+07
+00
+00
+00
+05
+00
+00
+00
+b8
+05
+00
+00
+00
+e8
+00
+00
+00
+00
+03
+00
+00
+00
+05
+00
+00
+00
+04
+00
+0c
+00
+00
+00
+05
+00
+00
+00
+04
+00
+11
+00
+00
+00
+05
+00
+00
+00
+04
+00
+12
+00
+00
+00
+04
+00
+00
+00
+e8
+05
+00
+00
+00
+e8
+00
+00
+00
+00
+04
+00
+00
+00
+08
+00
+00
+00
+04
+00
+0e
+00
+00
+00
+08
+00
+00
+00
+04
+00
+04
+00
+00
+00
+fc
+ff
+ff
+ff
+08
+00
+00
+00
+08
+00
+00
+00
+18
+00
+00
+00
+f4
+ff
+ff
+ff
+d0
+ff
+ff
+ff
+00
+00
+00
+00
+05
+00
+00
+00
+04
+00
+0c
+00
+00
+00
+05
+00
+00
+00
+04
+00
+10
+00
+00
+00
+05
+00
+00
+00
+04
+00
+14
+00
+00
+00
+05
+00
+00
+00
+04
+00
+2e
+66
+69
+6c
+65
+00
+00
+00
+00
+00
+00
+00
+fe
+ff
+00
+00
+67
+01
+2d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+74
+65
+78
+74
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+03
+01
+15
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+62
+61
+72
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+02
+00
+66
+6f
+6f
+00
+00
+00
+00
+00
+12
+00
+00
+00
+02
+00
+00
+00
+02
+00
+2e
+62
+61
+72
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+03
+01
+12
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+62
+61
+7a
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+03
+00
+2e
+64
+61
+74
+61
+00
+00
+00
+00
+00
+00
+00
+03
+00
+00
+00
+03
+01
+1c
+00
+00
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+00
+00
diff --git a/modules/objfmts/win64/tests/win64-dataref.asm b/modules/objfmts/win64/tests/win64-dataref.asm
index 97517646..d863dc5a 100644
--- a/modules/objfmts/win64/tests/win64-dataref.asm
+++ b/modules/objfmts/win64/tests/win64-dataref.asm
@@ -130,11 +130,11 @@ trap: sub rsp, 256
[SECTION .pdata]
dd trap
-dd trap+(trap.end-trap)
-dd $xdatasym
+dd trap.end wrt trap
+dd $$xdatasym
[SECTION .xdata]
-$xdatasym:
+$$xdatasym:
db 1, 7, 2, 0, 7, 1, 0x20, 0
[SECTION _FOO]
diff --git a/modules/objfmts/win64/tests/win64-dataref2.asm b/modules/objfmts/win64/tests/win64-dataref2.asm
new file mode 100644
index 00000000..75bb4d09
--- /dev/null
+++ b/modules/objfmts/win64/tests/win64-dataref2.asm
@@ -0,0 +1,17 @@
+bits 64
+
+section .text
+
+bar:
+
+mov eax, [foo wrt rip]
+shl dword [foo wrt rip], 5
+cmp dword [foo wrt rip], 16
+cmp word [foo wrt rip], 10000
+cmp dword [foo wrt rip], 10000000
+je bar
+
+section .data
+
+foo:
+dd 5
diff --git a/modules/objfmts/win64/tests/win64-dataref2.errwarn b/modules/objfmts/win64/tests/win64-dataref2.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/objfmts/win64/tests/win64-dataref2.errwarn
diff --git a/modules/objfmts/win64/tests/win64-dataref2.hex b/modules/objfmts/win64/tests/win64-dataref2.hex
new file mode 100644
index 00000000..1b7a430c
--- /dev/null
+++ b/modules/objfmts/win64/tests/win64-dataref2.hex
@@ -0,0 +1,343 @@
+64
+86
+02
+00
+00
+00
+00
+00
+c3
+00
+00
+00
+08
+00
+00
+00
+00
+00
+04
+00
+2e
+74
+65
+78
+74
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+29
+00
+00
+00
+64
+00
+00
+00
+8d
+00
+00
+00
+00
+00
+00
+00
+05
+00
+00
+00
+20
+00
+50
+60
+2e
+64
+61
+74
+61
+00
+00
+00
+29
+00
+00
+00
+00
+00
+00
+00
+04
+00
+00
+00
+bf
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+00
+50
+c0
+8b
+05
+00
+00
+00
+00
+c1
+25
+00
+00
+00
+00
+05
+83
+3d
+00
+00
+00
+00
+10
+66
+81
+3d
+00
+00
+00
+00
+10
+27
+81
+3d
+00
+00
+00
+00
+80
+96
+98
+00
+74
+d7
+02
+00
+00
+00
+05
+00
+00
+00
+04
+00
+08
+00
+00
+00
+05
+00
+00
+00
+05
+00
+0f
+00
+00
+00
+05
+00
+00
+00
+05
+00
+17
+00
+00
+00
+05
+00
+00
+00
+06
+00
+1f
+00
+00
+00
+05
+00
+00
+00
+08
+00
+05
+00
+00
+00
+2e
+66
+69
+6c
+65
+00
+00
+00
+00
+00
+00
+00
+fe
+ff
+00
+00
+67
+01
+2d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+74
+65
+78
+74
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+03
+01
+29
+00
+00
+00
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+62
+61
+72
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+03
+00
+66
+6f
+6f
+00
+00
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+03
+00
+2e
+64
+61
+74
+61
+00
+00
+00
+00
+00
+00
+00
+02
+00
+00
+00
+03
+01
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+00
+00
diff --git a/modules/objfmts/win64/tests/win64-dataref2.masm b/modules/objfmts/win64/tests/win64-dataref2.masm
new file mode 100644
index 00000000..827db3e0
--- /dev/null
+++ b/modules/objfmts/win64/tests/win64-dataref2.masm
@@ -0,0 +1,17 @@
+
+_DATA SEGMENT
+foo dd 0
+
+_DATA ENDS
+_TEXT SEGMENT
+bar:
+mov eax, foo
+shl foo, 5
+cmp foo, 16
+cmp word ptr foo, 10000
+cmp foo, 10000000
+je bar
+
+_TEXT ENDS
+
+END
diff --git a/modules/objfmts/xdf/tests/Makefile.inc b/modules/objfmts/xdf/tests/Makefile.inc
index bec2fb38..babc0566 100644
--- a/modules/objfmts/xdf/tests/Makefile.inc
+++ b/modules/objfmts/xdf/tests/Makefile.inc
@@ -12,6 +12,9 @@ EXTRA_DIST += modules/objfmts/xdf/tests/xdfprotect.errwarn
EXTRA_DIST += modules/objfmts/xdf/tests/xdfother.asm
EXTRA_DIST += modules/objfmts/xdf/tests/xdfother.hex
EXTRA_DIST += modules/objfmts/xdf/tests/xdfother.errwarn
+EXTRA_DIST += modules/objfmts/xdf/tests/xdf-overdef.asm
+EXTRA_DIST += modules/objfmts/xdf/tests/xdf-overdef.hex
+EXTRA_DIST += modules/objfmts/xdf/tests/xdf-overdef.errwarn
EXTRA_DIST += modules/objfmts/xdf/tests/xdfvirtual.asm
EXTRA_DIST += modules/objfmts/xdf/tests/xdfvirtual.hex
EXTRA_DIST += modules/objfmts/xdf/tests/xdfvirtual.errwarn
diff --git a/modules/objfmts/xdf/tests/xdf-overdef.asm b/modules/objfmts/xdf/tests/xdf-overdef.asm
new file mode 100644
index 00000000..e42d1f48
--- /dev/null
+++ b/modules/objfmts/xdf/tests/xdf-overdef.asm
@@ -0,0 +1,2 @@
+section .text align=64
+
diff --git a/modules/objfmts/xdf/tests/xdf-overdef.errwarn b/modules/objfmts/xdf/tests/xdf-overdef.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/objfmts/xdf/tests/xdf-overdef.errwarn
diff --git a/modules/objfmts/xdf/tests/xdf-overdef.hex b/modules/objfmts/xdf/tests/xdf-overdef.hex
new file mode 100644
index 00000000..d98026d2
--- /dev/null
+++ b/modules/objfmts/xdf/tests/xdf-overdef.hex
@@ -0,0 +1,78 @@
+22
+43
+65
+87
+01
+00
+00
+00
+01
+00
+00
+00
+3e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+48
+00
+00
+00
+00
+00
+00
+00
+2e
+74
+65
+78
+74
+00
diff --git a/modules/objfmts/xdf/xdf-objfmt.c b/modules/objfmts/xdf/xdf-objfmt.c
index 737adf33..56fe213c 100644
--- a/modules/objfmts/xdf/xdf-objfmt.c
+++ b/modules/objfmts/xdf/xdf-objfmt.c
@@ -98,6 +98,7 @@ typedef struct yasm_objfmt_xdf {
typedef struct xdf_objfmt_output_info {
yasm_objfmt_xdf *objfmt_xdf;
+ yasm_errwarns *errwarns;
/*@dependent@*/ FILE *f;
/*@only@*/ unsigned char *buf;
yasm_section *sect;
@@ -128,7 +129,7 @@ yasm_objfmt_module yasm_xdf_LTX_objfmt;
static yasm_objfmt *
-xdf_objfmt_create(const char *in_filename, yasm_object *object, yasm_arch *a)
+xdf_objfmt_create(yasm_object *object, yasm_arch *a)
{
yasm_objfmt_xdf *objfmt_xdf = yasm_xmalloc(sizeof(yasm_objfmt_xdf));
@@ -157,112 +158,93 @@ xdf_objfmt_create(const char *in_filename, yasm_object *object, yasm_arch *a)
}
static int
-xdf_objfmt_output_expr(yasm_expr **ep, unsigned char *buf, size_t destsize,
- size_t valsize, int shift, unsigned long offset,
- yasm_bytecode *bc, int rel, int warn,
+xdf_objfmt_output_value(yasm_value *value, unsigned char *buf, size_t destsize,
+ unsigned long offset, yasm_bytecode *bc, int warn,
/*@null@*/ void *d)
{
/*@null@*/ xdf_objfmt_output_info *info = (xdf_objfmt_output_info *)d;
yasm_objfmt_xdf *objfmt_xdf;
/*@dependent@*/ /*@null@*/ yasm_intnum *intn;
- /*@dependent@*/ /*@null@*/ const yasm_floatnum *flt;
- /*@dependent@*/ /*@null@*/ yasm_symrec *sym;
- yasm_expr *shr_expr;
- yasm_expr *wrt_expr;
- unsigned int shr = 0;
- unsigned int seg = 0;
+ unsigned long intn_minus;
+ int retval;
+ unsigned int valsize = value->size;
assert(info != NULL);
objfmt_xdf = info->objfmt_xdf;
- *ep = yasm_expr_simplify(*ep, yasm_common_calc_bc_dist);
-
- /* Handle floating point expressions */
- flt = yasm_expr_get_floatnum(ep);
- if (flt) {
- if (shift < 0)
- yasm_internal_error(N_("attempting to negative shift a float"));
- return yasm_arch_floatnum_tobytes(objfmt_xdf->arch, flt, buf,
- destsize, valsize,
- (unsigned int)shift, warn, bc->line);
- }
-
- /* Check for a right shift value */
- shr_expr = yasm_expr_extract_shr(ep);
- if (shr_expr) {
- /*@dependent@*/ /*@null@*/ const yasm_intnum *shr_intn;
- shr_intn = yasm_expr_get_intnum(&shr_expr, NULL);
- if (!shr_intn) {
- yasm__error(bc->line, N_("shift expression too complex"));
+ if (value->abs)
+ value->abs = yasm_expr_simplify(value->abs, yasm_common_calc_bc_dist);
+
+ /* Try to output constant and PC-relative section-local first.
+ * Note this does NOT output any value with a SEG, WRT, external,
+ * cross-section, or non-PC-relative reference (those are handled below).
+ */
+ switch (yasm_value_output_basic(value, buf, destsize, bc, warn,
+ info->objfmt_xdf->arch,
+ yasm_common_calc_bc_dist)) {
+ case -1:
return 1;
- }
- shr = yasm_intnum_get_uint(shr_intn);
+ case 0:
+ break;
+ default:
+ return 0;
}
- /* Check for a segment relocation */
- if (yasm_expr_extract_seg(ep))
- seg = 1;
-
- /* Check for a WRT relocation */
- wrt_expr = yasm_expr_extract_wrt(ep);
+ if (value->section_rel) {
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("xdf: relocation too complex"));
+ return 1;
+ }
- /* Handle integer expressions, with relocation if necessary */
- sym = yasm_expr_extract_symrec(ep, YASM_SYMREC_REPLACE_ZERO,
- yasm_common_calc_bc_dist);
- if (sym) {
+ intn_minus = 0;
+ if (value->rel) {
xdf_reloc *reloc;
reloc = yasm_xmalloc(sizeof(xdf_reloc));
reloc->reloc.addr = yasm_intnum_create_uint(bc->offset + offset);
- reloc->reloc.sym = sym;
+ reloc->reloc.sym = value->rel;
reloc->base = NULL;
reloc->size = valsize/8;
- reloc->shift = shr;
+ reloc->shift = value->rshift;
- if (seg)
+ if (value->seg_of)
reloc->type = XDF_RELOC_SEG;
- else if (wrt_expr) {
- reloc->base = yasm_expr_extract_symrec(&wrt_expr,
- YASM_SYMREC_REPLACE_ZERO,
- yasm_common_calc_bc_dist);
- if (!reloc->base) {
- yasm__error(bc->line, N_("WRT expression too complex"));
- return 1;
- }
+ else if (value->wrt) {
+ reloc->base = value->wrt;
reloc->type = XDF_RELOC_WRT;
- } else if (rel) {
+ } else if (value->curpos_rel) {
reloc->type = XDF_RELOC_RIP;
- /* Need to reference to start of section, so add $$ in. */
- *ep = yasm_expr_create(YASM_EXPR_ADD, yasm_expr_expr(*ep),
- yasm_expr_sym(yasm_symtab_define_label2("$$",
- yasm_section_bcs_first(info->sect), 0, (*ep)->line)),
- (*ep)->line);
- *ep = yasm_expr_simplify(*ep, yasm_common_calc_bc_dist);
+ /* Adjust to start of section, so subtract out the bytecode
+ * offset.
+ */
+ intn_minus = bc->offset;
} else
reloc->type = XDF_RELOC_REL;
info->xsd->nreloc++;
yasm_section_add_reloc(info->sect, (yasm_reloc *)reloc, yasm_xfree);
}
- intn = yasm_expr_get_intnum(ep, NULL);
- if (intn) {
- if (rel) {
- int retval = yasm_arch_intnum_fixup_rel(objfmt_xdf->arch, intn,
- valsize, bc, bc->line);
- if (retval)
- return retval;
- }
- return yasm_arch_intnum_tobytes(objfmt_xdf->arch, intn, buf, destsize,
- valsize, shift, bc, warn, bc->line);
- }
- /* Check for complex float expressions */
- if (yasm_expr__contains(*ep, YASM_EXPR_FLOAT)) {
- yasm__error(bc->line, N_("floating point expression too complex"));
- return 1;
+ if (intn_minus > 0) {
+ intn = yasm_intnum_create_uint(intn_minus);
+ yasm_intnum_calc(intn, YASM_EXPR_NEG, NULL);
+ } else
+ intn = yasm_intnum_create_uint(0);
+
+ if (value->abs) {
+ yasm_intnum *intn2 = yasm_expr_get_intnum(&value->abs, NULL);
+ if (!intn2) {
+ yasm_error_set(YASM_ERROR_TOO_COMPLEX,
+ N_("xdf: relocation too complex"));
+ yasm_intnum_destroy(intn);
+ return 1;
+ }
+ yasm_intnum_calc(intn, YASM_EXPR_ADD, intn2);
}
- yasm__error(bc->line, N_("xdf: relocation too complex"));
- return 1;
+ retval = yasm_arch_intnum_tobytes(objfmt_xdf->arch, intn, buf, destsize,
+ valsize, 0, bc, warn);
+ yasm_intnum_destroy(intn);
+ return retval;
}
static int
@@ -271,14 +253,12 @@ xdf_objfmt_output_bytecode(yasm_bytecode *bc, /*@null@*/ void *d)
/*@null@*/ xdf_objfmt_output_info *info = (xdf_objfmt_output_info *)d;
/*@null@*/ /*@only@*/ unsigned char *bigbuf;
unsigned long size = REGULAR_OUTBUF_SIZE;
- unsigned long multiple;
- unsigned long i;
int gap;
assert(info != NULL);
- bigbuf = yasm_bc_tobytes(bc, info->buf, &size, &multiple, &gap, info,
- xdf_objfmt_output_expr, NULL);
+ bigbuf = yasm_bc_tobytes(bc, info->buf, &size, &gap, info,
+ xdf_objfmt_output_value, NULL);
/* Don't bother doing anything else if size ended up being 0. */
if (size == 0) {
@@ -287,25 +267,24 @@ xdf_objfmt_output_bytecode(yasm_bytecode *bc, /*@null@*/ void *d)
return 0;
}
- info->xsd->size += multiple*size;
+ info->xsd->size += size;
/* Warn that gaps are converted to 0 and write out the 0's. */
if (gap) {
unsigned long left;
- yasm__warning(YASM_WARN_UNINIT_CONTENTS, bc->line,
- N_("uninitialized space: zeroing"));
+ yasm_warn_set(YASM_WARN_UNINIT_CONTENTS,
+ N_("uninitialized space: zeroing"));
/* Write out in chunks */
memset(info->buf, 0, REGULAR_OUTBUF_SIZE);
- left = multiple*size;
+ left = size;
while (left > REGULAR_OUTBUF_SIZE) {
fwrite(info->buf, REGULAR_OUTBUF_SIZE, 1, info->f);
left -= REGULAR_OUTBUF_SIZE;
}
fwrite(info->buf, left, 1, info->f);
} else {
- /* Output multiple copies of buf (or bigbuf if non-NULL) to file */
- for (i=0; i<multiple; i++)
- fwrite(bigbuf ? bigbuf : info->buf, (size_t)size, 1, info->f);
+ /* Output buf (or bigbuf if non-NULL) to file */
+ fwrite(bigbuf ? bigbuf : info->buf, (size_t)size, 1, info->f);
}
/* If bigbuf was allocated, free it */
@@ -349,7 +328,8 @@ xdf_objfmt_output_section(yasm_section *sect, /*@null@*/ void *d)
info->sect = sect;
info->xsd = xsd;
- yasm_section_bcs_traverse(sect, info, xdf_objfmt_output_bytecode);
+ yasm_section_bcs_traverse(sect, info->errwarns, info,
+ xdf_objfmt_output_bytecode);
/* Sanity check final section size */
if (xsd->size != (last->offset + last->len))
@@ -385,7 +365,7 @@ xdf_objfmt_output_section(yasm_section *sect, /*@null@*/ void *d)
yasm_internal_error(
N_("xdf: no symbol data for relocated symbol"));
- yasm_intnum_get_sized(reloc->reloc.addr, localbuf, 4, 32, 0, 0, 0, 0);
+ yasm_intnum_get_sized(reloc->reloc.addr, localbuf, 4, 32, 0, 0, 0);
localbuf += 4; /* address of relocation */
YASM_WRITE_32_L(localbuf, xsymd->index); /* relocated symbol */
if (reloc->base) {
@@ -436,17 +416,17 @@ xdf_objfmt_output_secthead(yasm_section *sect, /*@null@*/ void *d)
YASM_WRITE_32_L(localbuf, xsymd->index); /* section name symbol */
if (xsd->addr) {
- yasm_intnum_get_sized(xsd->addr, localbuf, 8, 64, 0, 0, 0, 0);
+ yasm_intnum_get_sized(xsd->addr, localbuf, 8, 64, 0, 0, 0);
localbuf += 8; /* physical address */
} else {
YASM_WRITE_32_L(localbuf, 0);
YASM_WRITE_32_L(localbuf, 0);
}
if (xsd->vaddr) {
- yasm_intnum_get_sized(xsd->vaddr, localbuf, 8, 64, 0, 0, 0, 0);
+ yasm_intnum_get_sized(xsd->vaddr, localbuf, 8, 64, 0, 0, 0);
localbuf += 8; /* virtual address */
} else if (xsd->addr) {
- yasm_intnum_get_sized(xsd->addr, localbuf, 8, 64, 0, 0, 0, 0);
+ yasm_intnum_get_sized(xsd->addr, localbuf, 8, 64, 0, 0, 0);
localbuf += 8; /* VA=PA */
} else {
YASM_WRITE_32_L(localbuf, 0);
@@ -476,7 +456,7 @@ xdf_objfmt_count_sym(yasm_symrec *sym, /*@null@*/ void *d)
info->indx++;
}
- return 1;
+ return 0;
}
static int
@@ -522,10 +502,11 @@ xdf_objfmt_output_sym(yasm_symrec *sym, /*@null@*/ void *d)
abs_start = yasm_expr_copy(yasm_section_get_start(sect));
intn = yasm_expr_get_intnum(&abs_start,
yasm_common_calc_bc_dist);
- if (!intn)
- yasm__error(abs_start->line,
+ if (!intn) {
+ yasm_error_set(YASM_ERROR_NOT_CONSTANT,
N_("absolute section start not an integer expression"));
- else
+ yasm_errwarn_propagate(info->errwarns, abs_start->line);
+ } else
value = yasm_intnum_get_uint(intn);
yasm_expr_destroy(abs_start);
@@ -541,9 +522,11 @@ xdf_objfmt_output_sym(yasm_symrec *sym, /*@null@*/ void *d)
intn = yasm_expr_get_intnum(&equ_val_copy,
yasm_common_calc_bc_dist);
if (!intn) {
- if (vis & YASM_SYM_GLOBAL)
- yasm__error(equ_val->line,
+ if (vis & YASM_SYM_GLOBAL) {
+ yasm_error_set(YASM_ERROR_NOT_CONSTANT,
N_("global EQU value not an integer expression"));
+ yasm_errwarn_propagate(info->errwarns, equ_val->line);
+ }
} else
value = yasm_intnum_get_uint(intn);
yasm_expr_destroy(equ_val_copy);
@@ -565,7 +548,7 @@ xdf_objfmt_output_sym(yasm_symrec *sym, /*@null@*/ void *d)
YASM_WRITE_32_L(localbuf, flags); /* flags */
fwrite(info->buf, 16, 1, info->f);
}
- return 1;
+ return 0;
}
static int
@@ -581,12 +564,12 @@ xdf_objfmt_output_str(yasm_symrec *sym, /*@null@*/ void *d)
size_t len = strlen(name);
fwrite(name, len+1, 1, info->f);
}
- return 1;
+ return 0;
}
static void
-xdf_objfmt_output(yasm_objfmt *objfmt, FILE *f, const char *obj_filename,
- int all_syms, /*@unused@*/ yasm_dbgfmt *df)
+xdf_objfmt_output(yasm_objfmt *objfmt, FILE *f, int all_syms,
+ /*@unused@*/ yasm_dbgfmt *df, yasm_errwarns *errwarns)
{
yasm_objfmt_xdf *objfmt_xdf = (yasm_objfmt_xdf *)objfmt;
xdf_objfmt_output_info info;
@@ -594,6 +577,7 @@ xdf_objfmt_output(yasm_objfmt *objfmt, FILE *f, const char *obj_filename,
unsigned long symtab_count = 0;
info.objfmt_xdf = objfmt_xdf;
+ info.errwarns = errwarns;
info.f = f;
info.buf = yasm_xmalloc(REGULAR_OUTBUF_SIZE);
@@ -651,6 +635,48 @@ xdf_objfmt_destroy(yasm_objfmt *objfmt)
yasm_xfree(objfmt);
}
+static xdf_section_data *
+xdf_objfmt_init_new_section(yasm_objfmt_xdf *objfmt_xdf, yasm_section *sect,
+ const char *sectname, unsigned long line)
+{
+ xdf_section_data *data;
+ yasm_symrec *sym;
+
+ data = yasm_xmalloc(sizeof(xdf_section_data));
+ data->scnum = objfmt_xdf->parse_scnum++;
+ data->flags = 0;
+ data->addr = NULL;
+ data->vaddr = NULL;
+ data->scnptr = 0;
+ data->size = 0;
+ data->relptr = 0;
+ data->nreloc = 0;
+ STAILQ_INIT(&data->relocs);
+ yasm_section_add_data(sect, &xdf_section_data_cb, data);
+
+ sym = yasm_symtab_define_label(objfmt_xdf->symtab, sectname,
+ yasm_section_bcs_first(sect), 1, line);
+ data->sym = sym;
+ return data;
+}
+
+static yasm_section *
+xdf_objfmt_add_default_section(yasm_objfmt *objfmt)
+{
+ yasm_objfmt_xdf *objfmt_xdf = (yasm_objfmt_xdf *)objfmt;
+ yasm_section *retval;
+ xdf_section_data *xsd;
+ int isnew;
+
+ retval = yasm_object_get_general(objfmt_xdf->object, ".text", 0, 0, 1, 0,
+ &isnew, 0);
+ if (isnew) {
+ xsd = xdf_objfmt_init_new_section(objfmt_xdf, retval, ".text", 0);
+ yasm_section_set_default(retval, 1);
+ }
+ return retval;
+}
+
static /*@observer@*/ /*@null@*/ yasm_section *
xdf_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
/*@unused@*/ /*@null@*/
@@ -668,6 +694,7 @@ xdf_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
int flags_override = 0;
char *sectname;
int resonly = 0;
+ xdf_section_data *xsd;
if (!vp || vp->param || !vp->val)
return NULL;
@@ -676,7 +703,7 @@ xdf_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
while ((vp = yasm_vps_next(vp))) {
if (!vp->val) {
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("Unrecognized numeric qualifier"));
continue;
}
@@ -702,15 +729,17 @@ xdf_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
flags |= XDF_SECT_ABSOLUTE;
absaddr = yasm_expr_get_intnum(&vp->param, NULL);
if (!absaddr) {
- yasm__error(line, N_("argument to `%s' is not an integer"),
- vp->val);
+ yasm_error_set(YASM_ERROR_NOT_CONSTANT,
+ N_("argument to `%s' is not an integer"),
+ vp->val);
return NULL;
}
} else if (yasm__strcasecmp(vp->val, "virtual") == 0 && vp->param) {
vaddr = yasm_expr_get_intnum(&vp->param, NULL);
if (!vaddr) {
- yasm__error(line, N_("argument to `%s' is not an integer"),
- vp->val);
+ yasm_error_set(YASM_ERROR_NOT_CONSTANT,
+ N_("argument to `%s' is not an integer"),
+ vp->val);
return NULL;
}
} else if (yasm__strcasecmp(vp->val, "align") == 0 && vp->param) {
@@ -718,61 +747,56 @@ xdf_objfmt_section_switch(yasm_objfmt *objfmt, yasm_valparamhead *valparams,
align_expr = yasm_expr_get_intnum(&vp->param, NULL);
if (!align_expr) {
- yasm__error(line, N_("argument to `%s' is not a power of two"),
- vp->val);
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("argument to `%s' is not a power of two"),
+ vp->val);
return NULL;
}
align = yasm_intnum_get_uint(align_expr);
/* Alignments must be a power of two. */
if ((align & (align - 1)) != 0) {
- yasm__error(line, N_("argument to `%s' is not a power of two"),
- vp->val);
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("argument to `%s' is not a power of two"),
+ vp->val);
return NULL;
}
/* Check to see if alignment is supported size */
if (align > 4096) {
- yasm__error(line,
- N_("XDF does not support alignments > 4096"));
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("XDF does not support alignments > 4096"));
return NULL;
}
} else
- yasm__warning(YASM_WARN_GENERAL, line,
- N_("Unrecognized qualifier `%s'"), vp->val);
+ yasm_warn_set(YASM_WARN_GENERAL, N_("Unrecognized qualifier `%s'"),
+ vp->val);
}
retval = yasm_object_get_general(objfmt_xdf->object, sectname, 0, align, 1,
resonly, &isnew, line);
- if (isnew) {
- xdf_section_data *data;
- yasm_symrec *sym;
-
- data = yasm_xmalloc(sizeof(xdf_section_data));
- data->scnum = objfmt_xdf->parse_scnum++;
- data->flags = flags;
- if (absaddr)
- data->addr = yasm_intnum_copy(absaddr);
- else
- data->addr = NULL;
- if (vaddr)
- data->vaddr = yasm_intnum_copy(vaddr);
- else
- data->vaddr = NULL;
- data->scnptr = 0;
- data->size = 0;
- data->relptr = 0;
- data->nreloc = 0;
- STAILQ_INIT(&data->relocs);
- yasm_section_add_data(retval, &xdf_section_data_cb, data);
-
- sym =
- yasm_symtab_define_label(objfmt_xdf->symtab, sectname,
- yasm_section_bcs_first(retval), 1, line);
- data->sym = sym;
+ if (isnew)
+ xsd = xdf_objfmt_init_new_section(objfmt_xdf, retval, sectname, line);
+ else
+ xsd = yasm_section_get_data(retval, &xdf_section_data_cb);
+
+ if (isnew || yasm_section_is_default(retval)) {
+ yasm_section_set_default(retval, 0);
+ xsd->flags = flags;
+ if (absaddr) {
+ if (xsd->addr)
+ yasm_intnum_destroy(xsd->addr);
+ xsd->addr = yasm_intnum_copy(absaddr);
+ }
+ if (vaddr) {
+ if (xsd->vaddr)
+ yasm_intnum_destroy(xsd->vaddr);
+ xsd->vaddr = yasm_intnum_copy(vaddr);
+ }
+ yasm_section_set_align(retval, align, line);
} else if (flags_override)
- yasm__warning(YASM_WARN_GENERAL, line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("section flags ignored on section redeclaration"));
return retval;
}
@@ -839,7 +863,7 @@ xdf_objfmt_common_declare(yasm_objfmt *objfmt, const char *name,
yasm_objfmt_xdf *objfmt_xdf = (yasm_objfmt_xdf *)objfmt;
yasm_expr_destroy(size);
- yasm__error(line,
+ yasm_error_set(YASM_ERROR_GENERAL,
N_("XDF object format does not support common variables"));
return yasm_symtab_declare(objfmt_xdf->symtab, name, YASM_SYM_COMMON,
@@ -883,13 +907,13 @@ yasm_objfmt_module yasm_xdf_LTX_objfmt = {
"Extended Dynamic Object",
"xdf",
"xdf",
- ".text",
32,
xdf_objfmt_dbgfmt_keywords,
"null",
xdf_objfmt_create,
xdf_objfmt_output,
xdf_objfmt_destroy,
+ xdf_objfmt_add_default_section,
xdf_objfmt_section_switch,
xdf_objfmt_extern_declare,
xdf_objfmt_global_declare,
diff --git a/modules/parsers/gas/gas-bison.y b/modules/parsers/gas/gas-bison.y
index 2a9d8b3b..0eba1c8f 100644
--- a/modules/parsers/gas/gas-bison.y
+++ b/modules/parsers/gas/gas-bison.y
@@ -43,23 +43,34 @@ RCSID("$Id$");
#include "modules/parsers/gas/gas-defs.h"
static void define_label(yasm_parser_gas *parser_gas, char *name, int local);
+static void define_lcomm(yasm_parser_gas *parser_gas, /*@only@*/ char *name,
+ yasm_expr *size, /*@null@*/ yasm_expr *align);
static yasm_section *gas_get_section
- (yasm_parser_gas *parser_gas, char *name, /*@null@*/ char *flags,
+ (yasm_parser_gas *parser_gas, /*@only@*/ char *name, /*@null@*/ char *flags,
/*@null@*/ char *type, /*@null@*/ yasm_valparamhead *objext_valparams,
int builtin);
-static void gas_switch_section(yasm_parser_gas *parser_gas, char *name,
- /*@null@*/ char *flags, /*@null@*/ char *type,
- /*@null@*/ yasm_valparamhead *objext_valparams,
- int builtin);
-static yasm_bytecode *gas_parser_align(yasm_parser_gas *parser_gas,
- yasm_valparamhead *valparams,
- int power2);
+static void gas_switch_section
+ (yasm_parser_gas *parser_gas, /*@only@*/ char *name, /*@null@*/ char *flags,
+ /*@null@*/ char *type, /*@null@*/ yasm_valparamhead *objext_valparams,
+ int builtin);
+static yasm_bytecode *gas_parser_align
+ (yasm_parser_gas *parser_gas, yasm_section *sect, yasm_expr *boundval,
+ /*@null@*/ yasm_expr *fillval, /*@null@*/ yasm_expr *maxskipval,
+ int power2);
+static yasm_bytecode *gas_parser_dir_align(yasm_parser_gas *parser_gas,
+ yasm_valparamhead *valparams,
+ int power2);
+static yasm_bytecode *gas_parser_dir_fill
+ (yasm_parser_gas *parser_gas, /*@only@*/ yasm_expr *repeat,
+ /*@only@*/ /*@null@*/ yasm_expr *size,
+ /*@only@*/ /*@null@*/ yasm_expr *value);
static void gas_parser_directive
(yasm_parser_gas *parser_gas, const char *name,
yasm_valparamhead *valparams,
/*@null@*/ yasm_valparamhead *objext_valparams);
-#define gas_parser_error(s) yasm__parser_error(cur_line, s)
+#define gas_parser_error(s) \
+ yasm_error_set(YASM_ERROR_PARSE, "%s", s)
#define YYPARSE_PARAM parser_gas_arg
#define YYLEX_PARAM parser_gas_arg
#define parser_gas ((yasm_parser_gas *)parser_gas_arg)
@@ -106,11 +117,11 @@ static void gas_parser_directive
%token LINE
%token DIR_2BYTE DIR_4BYTE DIR_ALIGN DIR_ASCII DIR_ASCIZ DIR_BALIGN
%token DIR_BSS DIR_BYTE DIR_COMM DIR_DATA DIR_DOUBLE DIR_ENDR DIR_EXTERN
-%token DIR_EQU DIR_FILE DIR_FLOAT DIR_GLOBAL DIR_IDENT DIR_INT DIR_LINE
-%token DIR_LOC DIR_LCOMM DIR_OCTA DIR_ORG DIR_P2ALIGN DIR_REPT DIR_SECTION
-%token DIR_SHORT DIR_SIZE DIR_SKIP DIR_SLEB128 DIR_STRING DIR_TEXT
-%token DIR_TFLOAT DIR_TYPE DIR_QUAD DIR_ULEB128 DIR_VALUE DIR_WEAK DIR_WORD
-%token DIR_ZERO
+%token DIR_EQU DIR_FILE DIR_FILL DIR_FLOAT DIR_GLOBAL DIR_IDENT DIR_INT
+%token DIR_LINE DIR_LOC DIR_LOCAL DIR_LCOMM DIR_OCTA DIR_ORG DIR_P2ALIGN
+%token DIR_REPT DIR_SECTION DIR_SHORT DIR_SIZE DIR_SKIP DIR_SLEB128 DIR_STRING
+%token DIR_TEXT DIR_TFLOAT DIR_TYPE DIR_QUAD DIR_ULEB128 DIR_VALUE DIR_WEAK
+%token DIR_WORD DIR_ZERO
%type <bc> lineexp instr
@@ -131,10 +142,11 @@ static void gas_parser_directive
%%
input: /* empty */
| input line {
+ yasm_errwarn_propagate(parser_gas->errwarns, cur_line);
if (parser_gas->save_input)
yasm_linemap_add_source(parser_gas->linemap,
parser_gas->prev_bc,
- parser_gas->save_line[parser_gas->save_last ^ 1]);
+ (char *)parser_gas->save_line[parser_gas->save_last ^ 1]);
yasm_linemap_goto_next(parser_gas->linemap);
}
;
@@ -142,8 +154,8 @@ input: /* empty */
line: '\n'
| linebcs '\n'
| error '\n' {
- yasm__error(cur_line,
- N_("label or instruction expected at start of line"));
+ yasm_error_set(YASM_ERROR_SYNTAX,
+ N_("label or instruction expected at start of line"));
yyerrok;
}
;
@@ -181,7 +193,7 @@ lineexp: instr
| DIR_LINE INTNUM {
$$ = (yasm_bytecode *)NULL;
if (yasm_intnum_sign($2) < 0)
- yasm__error(cur_line, N_("line number is negative"));
+ yasm_error_set(YASM_ERROR_SYNTAX, N_("line number is negative"));
else
yasm_linemap_set(parser_gas->linemap, NULL,
yasm_intnum_get_uint($2), 1);
@@ -192,9 +204,11 @@ lineexp: instr
$$ = (yasm_bytecode *)NULL;
if (!intn) {
- yasm__error(cur_line, N_("rept expression not absolute"));
+ yasm_error_set(YASM_ERROR_NOT_ABSOLUTE,
+ N_("rept expression not absolute"));
} else if (yasm_intnum_sign(intn) < 0) {
- yasm__error(cur_line, N_("rept expression is negative"));
+ yasm_error_set(YASM_ERROR_VALUE,
+ N_("rept expression is negative"));
} else {
gas_rept *rept = yasm_xmalloc(sizeof(gas_rept));
STAILQ_INIT(&rept->lines);
@@ -213,49 +227,70 @@ lineexp: instr
| DIR_ENDR {
$$ = (yasm_bytecode *)NULL;
/* Shouldn't ever get here unless we didn't get a DIR_REPT first */
- yasm__error(cur_line, N_("endr without matching rept"));
+ yasm_error_set(YASM_ERROR_SYNTAX, N_("endr without matching rept"));
}
/* Alignment directives */
| DIR_ALIGN dirvals2 {
/* FIXME: Whether this is power-of-two or not depends on arch and
* objfmt.
*/
- $$ = gas_parser_align(parser_gas, &$2, 0);
+ $$ = gas_parser_dir_align(parser_gas, &$2, 0);
}
| DIR_P2ALIGN dirvals2 {
- $$ = gas_parser_align(parser_gas, &$2, 1);
+ $$ = gas_parser_dir_align(parser_gas, &$2, 1);
}
| DIR_BALIGN dirvals2 {
- $$ = gas_parser_align(parser_gas, &$2, 0);
+ $$ = gas_parser_dir_align(parser_gas, &$2, 0);
}
| DIR_ORG INTNUM {
/* TODO: support expr instead of intnum */
$$ = yasm_bc_create_org(yasm_intnum_get_uint($2), cur_line);
}
/* Data visibility directives */
+ | DIR_LOCAL label_id {
+ yasm_symtab_declare(parser_gas->symtab, $2, YASM_SYM_DLOCAL, cur_line);
+ yasm_xfree($2);
+ $$ = NULL;
+ }
| DIR_GLOBAL label_id {
yasm_objfmt_global_declare(parser_gas->objfmt, $2, NULL, cur_line);
yasm_xfree($2);
$$ = NULL;
}
| DIR_COMM label_id ',' expr {
- yasm_objfmt_common_declare(parser_gas->objfmt, $2, $4, NULL, cur_line);
- yasm_xfree($2);
+ /* If already explicitly declared local, treat like LCOMM */
+ /*@null@*/ /*@dependent@*/ yasm_symrec *sym =
+ yasm_symtab_get(parser_gas->symtab, $2);
+ if (sym && yasm_symrec_get_visibility(sym) == YASM_SYM_DLOCAL) {
+ define_lcomm(parser_gas, $2, $4, NULL);
+ } else {
+ yasm_objfmt_common_declare(parser_gas->objfmt, $2, $4, NULL,
+ cur_line);
+ yasm_xfree($2);
+ }
$$ = NULL;
}
| DIR_COMM label_id ',' expr ',' expr {
- /* Give third parameter as objext valparam for use as alignment */
- yasm_valparamhead vps;
- yasm_valparam *vp;
+ /* If already explicitly declared local, treat like LCOMM */
+ /*@null@*/ /*@dependent@*/ yasm_symrec *sym =
+ yasm_symtab_get(parser_gas->symtab, $2);
+ if (sym && yasm_symrec_get_visibility(sym)) {
+ define_lcomm(parser_gas, $2, $4, $6);
+ } else {
+ /* Give third parameter as objext valparam for use as alignment */
+ yasm_valparamhead vps;
+ yasm_valparam *vp;
- yasm_vps_initialize(&vps);
- vp = yasm_vp_create(NULL, $6);
- yasm_vps_append(&vps, vp);
+ yasm_vps_initialize(&vps);
+ vp = yasm_vp_create(NULL, $6);
+ yasm_vps_append(&vps, vp);
- yasm_objfmt_common_declare(parser_gas->objfmt, $2, $4, &vps, cur_line);
+ yasm_objfmt_common_declare(parser_gas->objfmt, $2, $4, &vps,
+ cur_line);
- yasm_vps_delete(&vps);
- yasm_xfree($2);
+ yasm_vps_delete(&vps);
+ yasm_xfree($2);
+ }
$$ = NULL;
}
| DIR_EXTERN label_id {
@@ -279,66 +314,50 @@ lineexp: instr
$$ = NULL;
}
| DIR_LCOMM label_id ',' expr {
- /* Put into .bss section. */
- /*@dependent@*/ yasm_section *bss =
- gas_get_section(parser_gas, yasm__xstrdup(".bss"), NULL, NULL,
- NULL, 1);
- /* TODO: default alignment */
- yasm_symtab_define_label(p_symtab, $2, yasm_section_bcs_last(bss), 1,
- cur_line);
- yasm_section_bcs_append(bss, yasm_bc_create_reserve($4, 1, cur_line));
- yasm_xfree($2);
+ define_lcomm(parser_gas, $2, $4, NULL);
$$ = NULL;
}
| DIR_LCOMM label_id ',' expr ',' expr {
- /* Put into .bss section. */
- /*@dependent@*/ yasm_section *bss =
- gas_get_section(parser_gas, yasm__xstrdup(".bss"), NULL, NULL,
- NULL, 1);
- /* TODO: force alignment */
- yasm_symtab_define_label(p_symtab, $2, yasm_section_bcs_last(bss), 1,
- cur_line);
- yasm_section_bcs_append(bss, yasm_bc_create_reserve($4, 1, cur_line));
- yasm_xfree($2);
+ define_lcomm(parser_gas, $2, $4, $6);
$$ = NULL;
}
/* Integer data definition directives */
| DIR_ASCII strvals {
- $$ = yasm_bc_create_data(&$2, 1, 0, cur_line);
+ $$ = yasm_bc_create_data(&$2, 1, 0, parser_gas->arch, cur_line);
}
| DIR_ASCIZ strvals {
- $$ = yasm_bc_create_data(&$2, 1, 1, cur_line);
+ $$ = yasm_bc_create_data(&$2, 1, 1, parser_gas->arch, cur_line);
}
| DIR_BYTE datavals {
- $$ = yasm_bc_create_data(&$2, 1, 0, cur_line);
+ $$ = yasm_bc_create_data(&$2, 1, 0, parser_gas->arch, cur_line);
}
| DIR_SHORT datavals {
/* TODO: This should depend on arch */
- $$ = yasm_bc_create_data(&$2, 2, 0, cur_line);
+ $$ = yasm_bc_create_data(&$2, 2, 0, parser_gas->arch, cur_line);
}
| DIR_WORD datavals {
- $$ = yasm_bc_create_data(&$2, yasm_arch_wordsize(parser_gas->arch), 0,
- cur_line);
+ $$ = yasm_bc_create_data(&$2, yasm_arch_wordsize(parser_gas->arch)/8, 0,
+ parser_gas->arch, cur_line);
}
| DIR_INT datavals {
/* TODO: This should depend on arch */
- $$ = yasm_bc_create_data(&$2, 4, 0, cur_line);
+ $$ = yasm_bc_create_data(&$2, 4, 0, parser_gas->arch, cur_line);
}
| DIR_VALUE datavals {
/* XXX: At least on x86, this is two bytes */
- $$ = yasm_bc_create_data(&$2, 2, 0, cur_line);
+ $$ = yasm_bc_create_data(&$2, 2, 0, parser_gas->arch, cur_line);
}
| DIR_2BYTE datavals {
- $$ = yasm_bc_create_data(&$2, 2, 0, cur_line);
+ $$ = yasm_bc_create_data(&$2, 2, 0, parser_gas->arch, cur_line);
}
| DIR_4BYTE datavals {
- $$ = yasm_bc_create_data(&$2, 4, 0, cur_line);
+ $$ = yasm_bc_create_data(&$2, 4, 0, parser_gas->arch, cur_line);
}
| DIR_QUAD datavals {
- $$ = yasm_bc_create_data(&$2, 8, 0, cur_line);
+ $$ = yasm_bc_create_data(&$2, 8, 0, parser_gas->arch, cur_line);
}
| DIR_OCTA datavals {
- $$ = yasm_bc_create_data(&$2, 16, 0, cur_line);
+ $$ = yasm_bc_create_data(&$2, 16, 0, parser_gas->arch, cur_line);
}
| DIR_ZERO expr {
yasm_datavalhead dvs;
@@ -346,7 +365,7 @@ lineexp: instr
yasm_dvs_initialize(&dvs);
yasm_dvs_append(&dvs, yasm_dv_create_expr(
p_expr_new_ident(yasm_expr_int(yasm_intnum_create_uint(0)))));
- $$ = yasm_bc_create_data(&dvs, 1, 0, cur_line);
+ $$ = yasm_bc_create_data(&dvs, 1, 0, parser_gas->arch, cur_line);
yasm_bc_set_multiple($$, $2);
}
@@ -358,13 +377,13 @@ lineexp: instr
}
/* Floating point data definition directives */
| DIR_FLOAT datavals {
- $$ = yasm_bc_create_data(&$2, 4, 0, cur_line);
+ $$ = yasm_bc_create_data(&$2, 4, 0, parser_gas->arch, cur_line);
}
| DIR_DOUBLE datavals {
- $$ = yasm_bc_create_data(&$2, 8, 0, cur_line);
+ $$ = yasm_bc_create_data(&$2, 8, 0, parser_gas->arch, cur_line);
}
| DIR_TFLOAT datavals {
- $$ = yasm_bc_create_data(&$2, 10, 0, cur_line);
+ $$ = yasm_bc_create_data(&$2, 10, 0, parser_gas->arch, cur_line);
}
/* Empty space / fill data definition directives */
| DIR_SKIP expr {
@@ -375,10 +394,20 @@ lineexp: instr
yasm_dvs_initialize(&dvs);
yasm_dvs_append(&dvs, yasm_dv_create_expr($4));
- $$ = yasm_bc_create_data(&dvs, 1, 0, cur_line);
+ $$ = yasm_bc_create_data(&dvs, 1, 0, parser_gas->arch, cur_line);
yasm_bc_set_multiple($$, $2);
}
+ /* fill data definition directive */
+ | DIR_FILL expr {
+ $$ = gas_parser_dir_fill(parser_gas, $2, NULL, NULL);
+ }
+ | DIR_FILL expr ',' expr {
+ $$ = gas_parser_dir_fill(parser_gas, $2, $4, NULL);
+ }
+ | DIR_FILL expr ',' expr ',' expr {
+ $$ = gas_parser_dir_fill(parser_gas, $2, $4, $6);
+ }
/* Section directives */
| DIR_TEXT {
gas_switch_section(parser_gas, yasm__xstrdup(".text"), NULL, NULL,
@@ -401,14 +430,17 @@ lineexp: instr
}
| DIR_SECTION label_id ',' STRING {
gas_switch_section(parser_gas, $2, $4.contents, NULL, NULL, 0);
+ yasm_xfree($4.contents);
$$ = NULL;
}
| DIR_SECTION label_id ',' STRING ',' '@' label_id {
gas_switch_section(parser_gas, $2, $4.contents, $7, NULL, 0);
+ yasm_xfree($4.contents);
$$ = NULL;
}
| DIR_SECTION label_id ',' STRING ',' '@' label_id ',' dirvals {
gas_switch_section(parser_gas, $2, $4.contents, $7, &$9, 0);
+ yasm_xfree($4.contents);
$$ = NULL;
}
/* Other directives */
@@ -427,22 +459,74 @@ lineexp: instr
yasm_dvs_append(&dvs, yasm_dv_create_expr(
p_expr_new_ident(yasm_expr_int(yasm_intnum_create_uint(0)))));
yasm_section_bcs_append(comment,
- yasm_bc_create_data(&dvs, 1, 0, cur_line));
+ yasm_bc_create_data(&dvs, 1, 0, parser_gas->arch, cur_line));
}
yasm_section_bcs_append(comment,
- yasm_bc_create_data(&$2, 1, 1, cur_line));
+ yasm_bc_create_data(&$2, 1, 1, parser_gas->arch, cur_line));
$$ = NULL;
}
| DIR_FILE INTNUM STRING {
- /* TODO */
+ yasm_valparamhead vps;
+ yasm_valparam *vp;
+
+ yasm_vps_initialize(&vps);
+ vp = yasm_vp_create(NULL, p_expr_new_ident(yasm_expr_int($2)));
+ yasm_vps_append(&vps, vp);
+ vp = yasm_vp_create($3.contents, NULL);
+ yasm_vps_append(&vps, vp);
+
+ yasm_dbgfmt_directive(parser_gas->dbgfmt, "file",
+ parser_gas->cur_section, &vps, cur_line);
+
+ yasm_vps_delete(&vps);
$$ = NULL;
}
| DIR_FILE STRING {
- /* TODO */
+ yasm_valparamhead vps;
+ yasm_valparam *vp;
+
+ yasm_vps_initialize(&vps);
+ vp = yasm_vp_create($2.contents, NULL);
+ yasm_vps_append(&vps, vp);
+
+ yasm_dbgfmt_directive(parser_gas->dbgfmt, "file",
+ parser_gas->cur_section, &vps, cur_line);
+
+ yasm_vps_delete(&vps);
+ $$ = NULL;
+ }
+ | DIR_LOC INTNUM INTNUM {
+ yasm_valparamhead vps;
+ yasm_valparam *vp;
+
+ yasm_vps_initialize(&vps);
+ vp = yasm_vp_create(NULL, p_expr_new_ident(yasm_expr_int($2)));
+ yasm_vps_append(&vps, vp);
+ vp = yasm_vp_create(NULL, p_expr_new_ident(yasm_expr_int($3)));
+ yasm_vps_append(&vps, vp);
+
+ yasm_dbgfmt_directive(parser_gas->dbgfmt, "loc",
+ parser_gas->cur_section, &vps, cur_line);
+
+ yasm_vps_delete(&vps);
$$ = NULL;
}
| DIR_LOC INTNUM INTNUM INTNUM {
- /* TODO */
+ yasm_valparamhead vps;
+ yasm_valparam *vp;
+
+ yasm_vps_initialize(&vps);
+ vp = yasm_vp_create(NULL, p_expr_new_ident(yasm_expr_int($2)));
+ yasm_vps_append(&vps, vp);
+ vp = yasm_vp_create(NULL, p_expr_new_ident(yasm_expr_int($3)));
+ yasm_vps_append(&vps, vp);
+ vp = yasm_vp_create(NULL, p_expr_new_ident(yasm_expr_int($4)));
+ yasm_vps_append(&vps, vp);
+
+ yasm_dbgfmt_directive(parser_gas->dbgfmt, "loc",
+ parser_gas->cur_section, &vps, cur_line);
+
+ yasm_vps_delete(&vps);
$$ = NULL;
}
| DIR_TYPE label_id ',' '@' label_id {
@@ -478,15 +562,15 @@ lineexp: instr
$$ = NULL;
}
| DIR_ID dirvals {
- yasm__warning(YASM_WARN_GENERAL, cur_line,
- N_("directive `%s' not recognized"), $1);
+ yasm_warn_set(YASM_WARN_GENERAL, N_("directive `%s' not recognized"),
+ $1);
$$ = (yasm_bytecode *)NULL;
yasm_xfree($1);
yasm_vps_delete(&$2);
}
| DIR_ID error {
- yasm__warning(YASM_WARN_GENERAL, cur_line,
- N_("directive `%s' not recognized"), $1);
+ yasm_warn_set(YASM_WARN_GENERAL, N_("directive `%s' not recognized"),
+ $1);
$$ = (yasm_bytecode *)NULL;
yasm_xfree($1);
}
@@ -505,7 +589,7 @@ instr: INSN {
&$2.operands, cur_line);
}
| INSN error {
- yasm__error(cur_line, N_("expression syntax error"));
+ yasm_error_set(YASM_ERROR_SYNTAX, N_("expression syntax error"));
$$ = NULL;
}
| PREFIX instr {
@@ -525,15 +609,18 @@ instr: INSN {
yasm_bc_insn_add_seg_prefix($$, $1[0]);
}
| ID {
- yasm__error(cur_line, N_("instruction not recognized: `%s'"), $1);
+ yasm_error_set(YASM_ERROR_SYNTAX,
+ N_("instruction not recognized: `%s'"), $1);
$$ = NULL;
}
| ID operands {
- yasm__error(cur_line, N_("instruction not recognized: `%s'"), $1);
+ yasm_error_set(YASM_ERROR_SYNTAX,
+ N_("instruction not recognized: `%s'"), $1);
$$ = NULL;
}
| ID error {
- yasm__error(cur_line, N_("instruction not recognized: `%s'"), $1);
+ yasm_error_set(YASM_ERROR_SYNTAX,
+ N_("instruction not recognized: `%s'"), $1);
$$ = NULL;
}
;
@@ -615,7 +702,7 @@ regmemexpr: '(' REG ')' {
}
| '(' ',' INTNUM ')' {
if (yasm_intnum_get_uint($3) != 1)
- yasm__warning(YASM_WARN_GENERAL, cur_line,
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("scale factor of %u without an index register"),
yasm_intnum_get_uint($3));
$$ = p_expr_new(yasm_expr_int(yasm_intnum_create_uint(0)),
@@ -652,20 +739,21 @@ memaddr: expr {
}
| SEGREG ':' memaddr {
$$ = $3;
- yasm_ea_set_segreg($$, $1[0], cur_line);
+ yasm_ea_set_segreg($$, $1[0]);
}
;
operand: memaddr { $$ = yasm_operand_create_mem($1); }
| REG { $$ = yasm_operand_create_reg($1[0]); }
+ | SEGREG { $$ = yasm_operand_create_segreg($1[0]); }
| REGGROUP { $$ = yasm_operand_create_reg($1[0]); }
| REGGROUP '(' INTNUM ')' {
unsigned long reg =
yasm_arch_reggroup_get_reg(parser_gas->arch, $1[0],
yasm_intnum_get_uint($3));
if (reg == 0) {
- yasm__error(cur_line, N_("bad register index `%u'"),
- yasm_intnum_get_uint($3));
+ yasm_error_set(YASM_ERROR_SYNTAX, N_("bad register index `%u'"),
+ yasm_intnum_get_uint($3));
$$ = yasm_operand_create_reg($1[0]);
} else
$$ = yasm_operand_create_reg(reg);
@@ -706,8 +794,8 @@ expr: INTNUM { $$ = p_expr_new_ident(yasm_expr_int($1)); }
explabel: expr_id {
/* "." references the current assembly position */
if ($1[1] == '\0' && $1[0] == '.')
- $$ = yasm_symtab_define_label(p_symtab, ".", parser_gas->prev_bc,
- 0, cur_line);
+ $$ = yasm_symtab_define_curpos(p_symtab, ".", parser_gas->prev_bc,
+ cur_line);
else
$$ = yasm_symtab_use(p_symtab, $1, cur_line);
yasm_xfree($1);
@@ -750,6 +838,26 @@ define_label(yasm_parser_gas *parser_gas, char *name, int local)
yasm_xfree(name);
}
+static void
+define_lcomm(yasm_parser_gas *parser_gas, /*@only@*/ char *name,
+ yasm_expr *size, /*@null@*/ yasm_expr *align)
+{
+ /* Put into .bss section. */
+ /*@dependent@*/ yasm_section *bss =
+ gas_get_section(parser_gas, yasm__xstrdup(".bss"), NULL, NULL, NULL, 1);
+
+ if (align) {
+ /* XXX: assume alignment is in bytes, not power-of-two */
+ yasm_section_bcs_append(bss, gas_parser_align(parser_gas, bss, align,
+ NULL, NULL, 0));
+ }
+
+ yasm_symtab_define_label(p_symtab, name, yasm_section_bcs_last(bss), 1,
+ cur_line);
+ yasm_section_bcs_append(bss, yasm_bc_create_reserve(size, 1, cur_line));
+ yasm_xfree(name);
+}
+
static yasm_section *
gas_get_section(yasm_parser_gas *parser_gas, char *name,
/*@null@*/ char *flags, /*@null@*/ char *type,
@@ -762,7 +870,7 @@ gas_get_section(yasm_parser_gas *parser_gas, char *name,
yasm_section *new_section;
yasm_vps_initialize(&vps);
- vp = yasm_vp_create(yasm__xstrdup(name), NULL);
+ vp = yasm_vp_create(name, NULL);
yasm_vps_append(&vps, vp);
if (!builtin) {
@@ -795,22 +903,58 @@ gas_switch_section(yasm_parser_gas *parser_gas, char *name,
{
yasm_section *new_section;
- new_section = gas_get_section(parser_gas, name, flags, type,
+ new_section = gas_get_section(parser_gas, yasm__xstrdup(name), flags, type,
objext_valparams, builtin);
if (new_section) {
parser_gas->cur_section = new_section;
parser_gas->prev_bc = yasm_section_bcs_last(new_section);
} else
- yasm__error(cur_line, N_("invalid section name `%s'"), name);
+ yasm_error_set(YASM_ERROR_GENERAL, N_("invalid section name `%s'"),
+ name);
+
+ yasm_xfree(name);
+
+ if (objext_valparams)
+ yasm_vps_delete(objext_valparams);
}
static yasm_bytecode *
-gas_parser_align(yasm_parser_gas *parser_gas, yasm_valparamhead *valparams,
- int power2)
+gas_parser_align(yasm_parser_gas *parser_gas, yasm_section *sect,
+ yasm_expr *boundval, /*@null@*/ yasm_expr *fillval,
+ /*@null@*/ yasm_expr *maxskipval, int power2)
+{
+ yasm_intnum *boundintn;
+
+ /* Convert power of two to number of bytes if necessary */
+ if (power2)
+ boundval = yasm_expr_create(YASM_EXPR_SHL,
+ yasm_expr_int(yasm_intnum_create_uint(1)),
+ yasm_expr_expr(boundval), cur_line);
+
+ /* Largest .align in the section specifies section alignment. */
+ boundintn = yasm_expr_get_intnum(&boundval, NULL);
+ if (boundintn) {
+ unsigned long boundint = yasm_intnum_get_uint(boundintn);
+
+ /* Alignments must be a power of two. */
+ if ((boundint & (boundint - 1)) == 0) {
+ if (boundint > yasm_section_get_align(sect))
+ yasm_section_set_align(sect, boundint, cur_line);
+ }
+ }
+
+ return yasm_bc_create_align(boundval, fillval, maxskipval,
+ yasm_section_is_code(sect) ?
+ yasm_arch_get_fill(parser_gas->arch) : NULL,
+ cur_line);
+}
+
+static yasm_bytecode *
+gas_parser_dir_align(yasm_parser_gas *parser_gas, yasm_valparamhead *valparams,
+ int power2)
{
/*@dependent@*/ yasm_valparam *bound, *fill = NULL, *maxskip = NULL;
yasm_expr *boundval, *fillval = NULL, *maxskipval = NULL;
- yasm_intnum *boundintn;
bound = yasm_vps_first(valparams);
boundval = bound->param;
@@ -818,7 +962,8 @@ gas_parser_align(yasm_parser_gas *parser_gas, yasm_valparamhead *valparams,
if (bound && boundval) {
fill = yasm_vps_next(bound);
} else {
- yasm__error(cur_line, N_("align directive must specify alignment"));
+ yasm_error_set(YASM_ERROR_SYNTAX,
+ N_("align directive must specify alignment"));
return NULL;
}
@@ -835,31 +980,46 @@ gas_parser_align(yasm_parser_gas *parser_gas, yasm_valparamhead *valparams,
yasm_vps_delete(valparams);
- /* Convert power of two to number of bytes if necessary */
- if (power2)
- boundval = yasm_expr_create(YASM_EXPR_SHL,
- yasm_expr_int(yasm_intnum_create_uint(1)),
- yasm_expr_expr(boundval), cur_line);
+ return gas_parser_align(parser_gas, parser_gas->cur_section, boundval,
+ fillval, maxskipval, power2);
+}
- /* If .align is the first bytecode in the section, it's really specifying
- * section alignment.
- */
- boundintn = yasm_expr_get_intnum(&boundval, NULL);
- if (boundintn) {
- unsigned long boundint = yasm_intnum_get_uint(boundintn);
+static yasm_bytecode *
+gas_parser_dir_fill(yasm_parser_gas *parser_gas, /*@only@*/ yasm_expr *repeat,
+ /*@only@*/ /*@null@*/ yasm_expr *size,
+ /*@only@*/ /*@null@*/ yasm_expr *value)
+{
+ yasm_datavalhead dvs;
+ yasm_bytecode *bc;
+ unsigned int ssize;
- /* Alignments must be a power of two. */
- if ((boundint & (boundint - 1)) == 0) {
- if (boundint > yasm_section_get_align(parser_gas->cur_section))
- yasm_section_set_align(parser_gas->cur_section, boundint,
- cur_line);
+ if (size) {
+ /*@dependent@*/ /*@null@*/ yasm_intnum *intn;
+ intn = yasm_expr_get_intnum(&size, NULL);
+ if (!intn) {
+ yasm_error_set(YASM_ERROR_NOT_ABSOLUTE,
+ N_("size must be an absolute expression"));
+ yasm_expr_destroy(repeat);
+ yasm_expr_destroy(size);
+ if (value)
+ yasm_expr_destroy(value);
+ return NULL;
}
- }
+ ssize = yasm_intnum_get_uint(intn);
+ } else
+ ssize = 1;
- return yasm_bc_create_align(boundval, fillval, maxskipval,
- yasm_section_is_code(parser_gas->cur_section) ?
- yasm_arch_get_fill(parser_gas->arch) : NULL,
- cur_line);
+ if (!value)
+ value = yasm_expr_create_ident(
+ yasm_expr_int(yasm_intnum_create_uint(0)), cur_line);
+
+ yasm_dvs_initialize(&dvs);
+ yasm_dvs_append(&dvs, yasm_dv_create_expr(value));
+ bc = yasm_bc_create_data(&dvs, ssize, 0, parser_gas->arch, cur_line);
+
+ yasm_bc_set_multiple(bc, repeat);
+
+ return bc;
}
static void
@@ -875,7 +1035,8 @@ gas_parser_directive(yasm_parser_gas *parser_gas, const char *name,
;
} else if (yasm_objfmt_directive(parser_gas->objfmt, name, valparams,
objext_valparams, line)) {
- yasm__error(line, N_("unrecognized directive [%s]"), name);
+ yasm_error_set(YASM_ERROR_GENERAL, N_("unrecognized directive [%s]"),
+ name);
}
yasm_vps_delete(valparams);
diff --git a/modules/parsers/gas/gas-parser.c b/modules/parsers/gas/gas-parser.c
index 9e215a72..e1a3635f 100644
--- a/modules/parsers/gas/gas-parser.c
+++ b/modules/parsers/gas/gas-parser.c
@@ -38,8 +38,9 @@
static void
gas_parser_do_parse(yasm_object *object, yasm_preproc *pp, yasm_arch *a,
- yasm_objfmt *of, FILE *f, const char *in_filename,
- int save_input, yasm_section *def_sect)
+ yasm_objfmt *of, yasm_dbgfmt *df, FILE *f,
+ const char *in_filename, int save_input,
+ yasm_section *def_sect, yasm_errwarns *errwarns)
{
yasm_parser_gas parser_gas;
@@ -55,6 +56,8 @@ gas_parser_do_parse(yasm_object *object, yasm_preproc *pp, yasm_arch *a,
parser_gas.preproc = pp;
parser_gas.arch = a;
parser_gas.objfmt = of;
+ parser_gas.dbgfmt = df;
+ parser_gas.errwarns = errwarns;
parser_gas.cur_section = def_sect;
parser_gas.prev_bc = yasm_section_bcs_first(def_sect);
@@ -85,9 +88,10 @@ gas_parser_do_parse(yasm_object *object, yasm_preproc *pp, yasm_arch *a,
gas_parser_parse(&parser_gas);
/* Check for ending inside a rept */
- if (parser_gas.rept)
- yasm__error(parser_gas.rept->startline,
- N_("rept without matching endr"));
+ if (parser_gas.rept) {
+ yasm_error_set(YASM_ERROR_SYNTAX, N_("rept without matching endr"));
+ yasm_errwarn_propagate(errwarns, parser_gas.rept->startline);
+ }
gas_parser_cleanup(&parser_gas);
diff --git a/modules/parsers/gas/gas-parser.h b/modules/parsers/gas/gas-parser.h
index 23806c29..c26c939d 100644
--- a/modules/parsers/gas/gas-parser.h
+++ b/modules/parsers/gas/gas-parser.h
@@ -32,7 +32,7 @@
#include "gas-bison.h"
-#define YYCTYPE char
+#define YYCTYPE unsigned char
typedef struct Scanner {
YYCTYPE *bot, *tok, *ptr, *cur, *pos, *lim, *top, *eof;
unsigned int tchar, tline, cline;
@@ -55,7 +55,7 @@ typedef struct gas_rept {
size_t linepos; /* position to start pulling chars from line */
int ended; /* seen endr directive yet? */
- char *oldbuf; /* saved previous fill buffer */
+ YYCTYPE *oldbuf; /* saved previous fill buffer */
size_t oldbuflen; /* previous fill buffer length */
size_t oldbufpos; /* position in previous fill buffer */
} gas_rept;
@@ -74,6 +74,8 @@ typedef struct yasm_parser_gas {
/*@dependent@*/ yasm_preproc *preproc;
/*@dependent@*/ yasm_arch *arch;
/*@dependent@*/ yasm_objfmt *objfmt;
+ /*@dependent@*/ yasm_dbgfmt *dbgfmt;
+ /*@dependent@*/ yasm_errwarns *errwarns;
/*@dependent@*/ yasm_linemap *linemap;
/*@dependent@*/ yasm_symtab *symtab;
diff --git a/modules/parsers/gas/gas-token.re b/modules/parsers/gas/gas-token.re
index 67bcb6bf..5977b158 100644
--- a/modules/parsers/gas/gas-token.re
+++ b/modules/parsers/gas/gas-token.re
@@ -52,14 +52,16 @@ RCSID("$Id$");
s->tok = cursor; \
}
+#define TOK ((char *)s->tok)
#define TOKLEN (size_t)(cursor-s->tok)
static size_t
-rept_input(yasm_parser_gas *parser_gas, /*@out@*/ char *buf, size_t max_size)
+rept_input(yasm_parser_gas *parser_gas, /*@out@*/ YYCTYPE *buf,
+ size_t max_size)
{
gas_rept *rept = parser_gas->rept;
size_t numleft = max_size;
- char *bufp = buf;
+ YYCTYPE *bufp = buf;
/* If numrept is 0, copy out just the line end characters */
if (rept->numrept == 0) {
@@ -137,7 +139,7 @@ fill(yasm_parser_gas *parser_gas, YYCTYPE *cursor)
if(!s->eof){
size_t cnt = s->tok - s->bot;
if(cnt){
- memcpy(s->bot, s->tok, (size_t)(s->lim - s->tok));
+ memmove(s->bot, s->tok, (size_t)(s->lim - s->tok));
s->tok = s->bot;
s->ptr -= cnt;
cursor -= cnt;
@@ -147,7 +149,7 @@ fill(yasm_parser_gas *parser_gas, YYCTYPE *cursor)
if (!s->bot)
first = 1;
if((s->top - s->lim) < BSIZE){
- char *buf = yasm_xmalloc((size_t)(s->lim - s->bot) + BSIZE);
+ YYCTYPE *buf = yasm_xmalloc((size_t)(s->lim - s->bot) + BSIZE);
memcpy(buf, s->tok, (size_t)(s->lim - s->tok));
s->tok = buf;
s->ptr = &buf[s->ptr - s->bot];
@@ -162,14 +164,14 @@ fill(yasm_parser_gas *parser_gas, YYCTYPE *cursor)
if (parser_gas->rept && parser_gas->rept->ended) {
/* Pull from rept lines instead of preproc */
cnt = rept_input(parser_gas, s->lim, BSIZE);
- } else if((cnt = yasm_preproc_input(parser_gas->preproc, s->lim,
- BSIZE)) == 0) {
+ } else if((cnt = yasm_preproc_input(parser_gas->preproc,
+ (char *)s->lim, BSIZE)) == 0) {
s->eof = &s->lim[cnt]; *s->eof++ = '\n';
}
s->lim += cnt;
if (first && parser_gas->save_input) {
int i;
- char *saveline;
+ YYCTYPE *saveline;
parser_gas->save_last ^= 1;
saveline = parser_gas->save_line[parser_gas->save_last];
/* save next line into cur_line */
@@ -186,7 +188,7 @@ save_line(yasm_parser_gas *parser_gas, YYCTYPE *cursor)
{
Scanner *s = &parser_gas->s;
int i = 0;
- char *saveline;
+ YYCTYPE *saveline;
parser_gas->save_last ^= 1;
saveline = parser_gas->save_line[parser_gas->save_last];
@@ -211,7 +213,7 @@ gas_parser_cleanup(yasm_parser_gas *parser_gas)
#define STRBUF_ALLOC_SIZE 128
/* string buffer used when parsing strings/character constants */
-static char *strbuf = (char *)NULL;
+static YYCTYPE *strbuf = NULL;
/* length of strbuf (including terminating NULL character) */
static size_t strbuf_size = 0;
@@ -221,7 +223,8 @@ strbuf_append(size_t count, YYCTYPE *cursor, Scanner *s, unsigned long line,
int ch)
{
if (cursor == s->eof)
- yasm__error(line, N_("unexpected end of file in string"));
+ yasm_error_set(YASM_ERROR_SYNTAX,
+ N_("unexpected end of file in string"));
if (count >= strbuf_size) {
strbuf = yasm_xrealloc(strbuf, strbuf_size + STRBUF_ALLOC_SIZE);
@@ -277,7 +280,7 @@ scan:
([1-9] digit*) | "0" {
savech = s->tok[TOKLEN];
s->tok[TOKLEN] = '\0';
- lvalp->intn = yasm_intnum_create_dec(s->tok, cur_line);
+ lvalp->intn = yasm_intnum_create_dec(TOK);
s->tok[TOKLEN] = savech;
RETURN(INTNUM);
}
@@ -286,7 +289,7 @@ scan:
'0b' bindigit+ {
savech = s->tok[TOKLEN];
s->tok[TOKLEN] = '\0';
- lvalp->intn = yasm_intnum_create_bin(s->tok+2, cur_line);
+ lvalp->intn = yasm_intnum_create_bin(TOK+2);
s->tok[TOKLEN] = savech;
RETURN(INTNUM);
}
@@ -295,7 +298,7 @@ scan:
"0" octdigit+ {
savech = s->tok[TOKLEN];
s->tok[TOKLEN] = '\0';
- lvalp->intn = yasm_intnum_create_oct(s->tok, cur_line);
+ lvalp->intn = yasm_intnum_create_oct(TOK);
s->tok[TOKLEN] = savech;
RETURN(INTNUM);
}
@@ -305,7 +308,7 @@ scan:
savech = s->tok[TOKLEN];
s->tok[TOKLEN] = '\0';
/* skip 0 and x */
- lvalp->intn = yasm_intnum_create_hex(s->tok+2, cur_line);
+ lvalp->intn = yasm_intnum_create_hex(TOK+2);
s->tok[TOKLEN] = savech;
RETURN(INTNUM);
}
@@ -314,7 +317,7 @@ scan:
"0" [DdEeFfTt] [-+]? (digit+)? ("." digit*)? ('e' [-+]? digit+)? {
savech = s->tok[TOKLEN];
s->tok[TOKLEN] = '\0';
- lvalp->flt = yasm_floatnum_create(s->tok+2);
+ lvalp->flt = yasm_floatnum_create(TOK+2);
s->tok[TOKLEN] = savech;
RETURN(FLTNUM);
}
@@ -357,6 +360,7 @@ scan:
'.equ' { parser_gas->state = INSTDIR; RETURN(DIR_EQU); }
'.extern' { parser_gas->state = INSTDIR; RETURN(DIR_EXTERN); }
'.file' { parser_gas->state = INSTDIR; RETURN(DIR_FILE); }
+ '.fill' { parser_gas->state = INSTDIR; RETURN(DIR_FILL); }
'.float' { parser_gas->state = INSTDIR; RETURN(DIR_FLOAT); }
'.global' { parser_gas->state = INSTDIR; RETURN(DIR_GLOBAL); }
'.globl' { parser_gas->state = INSTDIR; RETURN(DIR_GLOBAL); }
@@ -366,6 +370,7 @@ scan:
'.lcomm' { parser_gas->state = INSTDIR; RETURN(DIR_LCOMM); }
'.line' { parser_gas->state = INSTDIR; RETURN(DIR_LINE); }
'.loc' { parser_gas->state = INSTDIR; RETURN(DIR_LOC); }
+ '.local' { parser_gas->state = INSTDIR; RETURN(DIR_LOCAL); }
'.long' { parser_gas->state = INSTDIR; RETURN(DIR_INT); }
'.octa' { parser_gas->state = INSTDIR; RETURN(DIR_OCTA); }
'.org' { parser_gas->state = INSTDIR; RETURN(DIR_ORG); }
@@ -395,13 +400,13 @@ scan:
/* label or maybe directive */
[.][a-zA-Z0-9_$.]* {
- lvalp->str_val = yasm__xstrndup(s->tok, TOKLEN);
+ lvalp->str_val = yasm__xstrndup(TOK, TOKLEN);
RETURN(DIR_ID);
}
/* label */
[_][a-zA-Z0-9_$.]* {
- lvalp->str_val = yasm__xstrndup(s->tok, TOKLEN);
+ lvalp->str_val = yasm__xstrndup(TOK, TOKLEN);
RETURN(ID);
}
@@ -409,25 +414,22 @@ scan:
[%][a-zA-Z0-9]+ {
savech = s->tok[TOKLEN];
s->tok[TOKLEN] = '\0';
- if (yasm_arch_parse_check_reg(parser_gas->arch, lvalp->arch_data,
- s->tok+1, cur_line)) {
- s->tok[TOKLEN] = savech;
- RETURN(REG);
- }
- if (yasm_arch_parse_check_reggroup(parser_gas->arch,
- lvalp->arch_data, s->tok+1,
- cur_line)) {
- s->tok[TOKLEN] = savech;
- RETURN(REGGROUP);
- }
- if (yasm_arch_parse_check_segreg(parser_gas->arch,
- lvalp->arch_data, s->tok+1,
- cur_line)) {
- s->tok[TOKLEN] = savech;
- RETURN(SEGREG);
+ switch (yasm_arch_parse_check_regtmod
+ (parser_gas->arch, lvalp->arch_data, TOK+1, TOKLEN-1)) {
+ case YASM_ARCH_REG:
+ s->tok[TOKLEN] = savech;
+ RETURN(REG);
+ case YASM_ARCH_REGGROUP:
+ s->tok[TOKLEN] = savech;
+ RETURN(REGGROUP);
+ case YASM_ARCH_SEGREG:
+ s->tok[TOKLEN] = savech;
+ RETURN(SEGREG);
+ default:
+ break;
}
- yasm__error(cur_line, N_("Unrecognized register name `%s'"),
- s->tok);
+ yasm_error_set(YASM_ERROR_GENERAL,
+ N_("Unrecognized register name `%s'"), s->tok);
s->tok[TOKLEN] = savech;
lvalp->arch_data[0] = 0;
lvalp->arch_data[1] = 0;
@@ -444,7 +446,7 @@ scan:
|| s->tok[count] == '\r')
count--;
/* Just an identifier, return as such. */
- lvalp->str_val = yasm__xstrndup(s->tok, count);
+ lvalp->str_val = yasm__xstrndup(TOK, count);
RETURN(LABEL);
}
@@ -456,23 +458,21 @@ scan:
if (parser_gas->state != INSTDIR) {
savech = s->tok[TOKLEN];
s->tok[TOKLEN] = '\0';
- if (yasm_arch_parse_check_insn(parser_gas->arch,
- lvalp->arch_data, s->tok,
- cur_line)) {
- s->tok[TOKLEN] = savech;
- parser_gas->state = INSTDIR;
- RETURN(INSN);
- }
- if (yasm_arch_parse_check_prefix(parser_gas->arch,
- lvalp->arch_data, s->tok,
- cur_line)) {
- s->tok[TOKLEN] = savech;
- RETURN(PREFIX);
+ switch (yasm_arch_parse_check_insnprefix
+ (parser_gas->arch, lvalp->arch_data, TOK, TOKLEN)) {
+ case YASM_ARCH_INSN:
+ s->tok[TOKLEN] = savech;
+ parser_gas->state = INSTDIR;
+ RETURN(INSN);
+ case YASM_ARCH_PREFIX:
+ s->tok[TOKLEN] = savech;
+ RETURN(PREFIX);
+ default:
+ s->tok[TOKLEN] = savech;
}
- s->tok[TOKLEN] = savech;
}
/* Just an identifier, return as such. */
- lvalp->str_val = yasm__xstrndup(s->tok, TOKLEN);
+ lvalp->str_val = yasm__xstrndup(TOK, TOKLEN);
RETURN(ID);
}
@@ -488,7 +488,7 @@ scan:
}
any {
- yasm__warning(YASM_WARN_UNREC_CHAR, cur_line,
+ yasm_warn_set(YASM_WARN_UNREC_CHAR,
N_("ignoring unrecognized character `%s'"),
yasm__conv_unprint(s->tok[0]));
goto scan;
@@ -501,7 +501,7 @@ section_directive:
/*!re2c
[a-zA-Z0-9_$.-]+ {
- lvalp->str_val = yasm__xstrndup(s->tok, TOKLEN);
+ lvalp->str_val = yasm__xstrndup(TOK, TOKLEN);
parser_gas->state = INITIAL;
RETURN(ID);
}
@@ -523,7 +523,7 @@ section_directive:
}
any {
- yasm__warning(YASM_WARN_UNREC_CHAR, cur_line,
+ yasm_warn_set(YASM_WARN_UNREC_CHAR,
N_("ignoring unrecognized character `%s'"),
yasm__conv_unprint(s->tok[0]));
goto section_directive;
@@ -568,7 +568,7 @@ stringconst_scan:
"\\" digit digit digit {
savech = s->tok[TOKLEN];
s->tok[TOKLEN] = '\0';
- lvalp->intn = yasm_intnum_create_oct(s->tok+1, cur_line);
+ lvalp->intn = yasm_intnum_create_oct(TOK+1);
s->tok[TOKLEN] = savech;
strbuf_append(count++, cursor, s, cur_line,
@@ -579,7 +579,7 @@ stringconst_scan:
'\\x' hexdigit+ {
savech = s->tok[TOKLEN];
s->tok[TOKLEN] = '\0';
- lvalp->intn = yasm_intnum_create_hex(s->tok+2, cur_line);
+ lvalp->intn = yasm_intnum_create_hex(TOK+2);
s->tok[TOKLEN] = savech;
strbuf_append(count++, cursor, s, cur_line,
@@ -602,7 +602,7 @@ stringconst_scan:
dquot {
strbuf_append(count, cursor, s, cur_line, '\0');
- lvalp->str.contents = strbuf;
+ lvalp->str.contents = (char *)strbuf;
lvalp->str.len = count;
RETURN(STRING);
}
@@ -647,7 +647,9 @@ rept_scan:
int i;
if (linestart) {
/* We don't support nested right now, error */
- yasm__error(cur_line, N_("nested rept not supported"));
+ yasm_error_set(YASM_ERROR_GENERAL,
+ N_("nested rept not supported"));
+ yasm_errwarn_propagate(parser_gas->errwarns, cur_line);
}
for (i=0; i<6; i++)
strbuf_append(count++, cursor, s, cur_line, s->tok[i]);
@@ -670,8 +672,9 @@ rept_scan:
/* Add .line as first line to get line numbers correct */
new_line = yasm_xmalloc(sizeof(gas_rept_line));
new_line->data = yasm_xmalloc(40);
- sprintf(new_line->data, ".line %lu;", rept->startline+1);
- new_line->len = strlen(new_line->data);
+ sprintf((char *)new_line->data, ".line %lu;",
+ rept->startline+1);
+ new_line->len = strlen((char *)new_line->data);
STAILQ_INSERT_HEAD(&rept->lines, new_line, link);
/* Save previous fill buffer */
diff --git a/modules/parsers/gas/tests/Makefile.inc b/modules/parsers/gas/tests/Makefile.inc
index b463f8f1..09b9b5ff 100644
--- a/modules/parsers/gas/tests/Makefile.inc
+++ b/modules/parsers/gas/tests/Makefile.inc
@@ -15,9 +15,15 @@ EXTRA_DIST += modules/parsers/gas/tests/datavis2.hex
EXTRA_DIST += modules/parsers/gas/tests/execsect.asm
EXTRA_DIST += modules/parsers/gas/tests/execsect.errwarn
EXTRA_DIST += modules/parsers/gas/tests/execsect.hex
+EXTRA_DIST += modules/parsers/gas/tests/gas-fill.asm
+EXTRA_DIST += modules/parsers/gas/tests/gas-fill.errwarn
+EXTRA_DIST += modules/parsers/gas/tests/gas-fill.hex
EXTRA_DIST += modules/parsers/gas/tests/gas-instlabel.asm
EXTRA_DIST += modules/parsers/gas/tests/gas-instlabel.errwarn
EXTRA_DIST += modules/parsers/gas/tests/gas-instlabel.hex
+EXTRA_DIST += modules/parsers/gas/tests/gas-push.asm
+EXTRA_DIST += modules/parsers/gas/tests/gas-push.errwarn
+EXTRA_DIST += modules/parsers/gas/tests/gas-push.hex
EXTRA_DIST += modules/parsers/gas/tests/gas-semi.asm
EXTRA_DIST += modules/parsers/gas/tests/gas-semi.errwarn
EXTRA_DIST += modules/parsers/gas/tests/gas-semi.hex
@@ -30,6 +36,9 @@ EXTRA_DIST += modules/parsers/gas/tests/jmpcall.hex
EXTRA_DIST += modules/parsers/gas/tests/leb128.asm
EXTRA_DIST += modules/parsers/gas/tests/leb128.errwarn
EXTRA_DIST += modules/parsers/gas/tests/leb128.hex
+EXTRA_DIST += modules/parsers/gas/tests/localcomm.asm
+EXTRA_DIST += modules/parsers/gas/tests/localcomm.errwarn
+EXTRA_DIST += modules/parsers/gas/tests/localcomm.hex
EXTRA_DIST += modules/parsers/gas/tests/reggroup-err.asm
EXTRA_DIST += modules/parsers/gas/tests/reggroup-err.errwarn
EXTRA_DIST += modules/parsers/gas/tests/reggroup.asm
diff --git a/modules/parsers/gas/tests/gas-fill.asm b/modules/parsers/gas/tests/gas-fill.asm
new file mode 100644
index 00000000..09c601d7
--- /dev/null
+++ b/modules/parsers/gas/tests/gas-fill.asm
@@ -0,0 +1,6 @@
+.text
+.fill 5
+.fill 3, 1
+.fill 4, 2
+.fill 4, 8, 0x11223344
+.fill 4, 4, 0x11223344
diff --git a/modules/parsers/gas/tests/gas-fill.errwarn b/modules/parsers/gas/tests/gas-fill.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/parsers/gas/tests/gas-fill.errwarn
diff --git a/modules/parsers/gas/tests/gas-fill.hex b/modules/parsers/gas/tests/gas-fill.hex
new file mode 100644
index 00000000..71654672
--- /dev/null
+++ b/modules/parsers/gas/tests/gas-fill.hex
@@ -0,0 +1,424 @@
+7f
+45
+4c
+46
+01
+01
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+03
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+e0
+00
+00
+00
+00
+00
+00
+00
+34
+00
+00
+00
+00
+00
+28
+00
+05
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+44
+33
+22
+11
+00
+00
+00
+00
+44
+33
+22
+11
+00
+00
+00
+00
+44
+33
+22
+11
+00
+00
+00
+00
+44
+33
+22
+11
+00
+00
+00
+00
+44
+33
+22
+11
+44
+33
+22
+11
+44
+33
+22
+11
+44
+33
+22
+11
+00
+2e
+74
+65
+78
+74
+00
+2e
+73
+74
+72
+74
+61
+62
+00
+2e
+73
+79
+6d
+74
+61
+62
+00
+2e
+73
+68
+73
+74
+72
+74
+61
+62
+00
+00
+00
+00
+00
+2d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+f1
+ff
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+17
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+80
+00
+00
+00
+21
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+07
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a4
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0f
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a8
+00
+00
+00
+30
+00
+00
+00
+02
+00
+00
+00
+03
+00
+00
+00
+04
+00
+00
+00
+10
+00
+00
+00
+01
+00
+00
+00
+01
+00
+00
+00
+06
+00
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+40
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
diff --git a/modules/parsers/gas/tests/gas-push.asm b/modules/parsers/gas/tests/gas-push.asm
new file mode 100644
index 00000000..b5e2e1ba
--- /dev/null
+++ b/modules/parsers/gas/tests/gas-push.asm
@@ -0,0 +1,3 @@
+push %gs
+pushw %gs
+pushl %gs
diff --git a/modules/parsers/gas/tests/gas-push.errwarn b/modules/parsers/gas/tests/gas-push.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/parsers/gas/tests/gas-push.errwarn
diff --git a/modules/parsers/gas/tests/gas-push.hex b/modules/parsers/gas/tests/gas-push.hex
new file mode 100644
index 00000000..305b468c
--- /dev/null
+++ b/modules/parsers/gas/tests/gas-push.hex
@@ -0,0 +1,360 @@
+7f
+45
+4c
+46
+01
+01
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+03
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+a0
+00
+00
+00
+00
+00
+00
+00
+34
+00
+00
+00
+00
+00
+28
+00
+05
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0f
+a8
+66
+0f
+a8
+0f
+a8
+00
+00
+2e
+74
+65
+78
+74
+00
+2e
+73
+74
+72
+74
+61
+62
+00
+2e
+73
+79
+6d
+74
+61
+62
+00
+2e
+73
+68
+73
+74
+72
+74
+61
+62
+00
+00
+00
+00
+00
+2d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+f1
+ff
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+17
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+48
+00
+00
+00
+21
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+07
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6c
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0f
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+70
+00
+00
+00
+30
+00
+00
+00
+02
+00
+00
+00
+03
+00
+00
+00
+04
+00
+00
+00
+10
+00
+00
+00
+01
+00
+00
+00
+01
+00
+00
+00
+06
+00
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+07
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
diff --git a/modules/parsers/gas/tests/localcomm.asm b/modules/parsers/gas/tests/localcomm.asm
new file mode 100644
index 00000000..17f33e6e
--- /dev/null
+++ b/modules/parsers/gas/tests/localcomm.asm
@@ -0,0 +1,18 @@
+ .text
+ .local failmsg
+ .comm failmsg,100,32
+ .local failed
+ .comm failed,1000,32
+ .local from_dec_data
+ .comm from_dec_data,8,8
+ .local op2static
+ .comm op2static,8,8
+ .local op1static
+ .comm op1static,8,8
+ .local spare
+ .comm spare,8,8
+ .local result
+ .comm result,8,8
+ .local conv_bv
+ .comm conv_bv,8,8
+
diff --git a/modules/parsers/gas/tests/localcomm.errwarn b/modules/parsers/gas/tests/localcomm.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/parsers/gas/tests/localcomm.errwarn
diff --git a/modules/parsers/gas/tests/localcomm.hex b/modules/parsers/gas/tests/localcomm.hex
new file mode 100644
index 00000000..93540bef
--- /dev/null
+++ b/modules/parsers/gas/tests/localcomm.hex
@@ -0,0 +1,544 @@
+7f
+45
+4c
+46
+01
+01
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+03
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+30
+01
+00
+00
+00
+00
+00
+00
+34
+00
+00
+00
+00
+00
+28
+00
+06
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+2e
+74
+65
+78
+74
+00
+2e
+62
+73
+73
+00
+2e
+73
+74
+72
+74
+61
+62
+00
+2e
+73
+79
+6d
+74
+61
+62
+00
+2e
+73
+68
+73
+74
+72
+74
+61
+62
+00
+00
+00
+00
+2d
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+f1
+ff
+00
+00
+00
+00
+90
+04
+00
+00
+00
+00
+00
+00
+00
+00
+05
+00
+00
+00
+00
+00
+88
+04
+00
+00
+00
+00
+00
+00
+00
+00
+05
+00
+00
+00
+00
+00
+80
+04
+00
+00
+00
+00
+00
+00
+00
+00
+05
+00
+00
+00
+00
+00
+78
+04
+00
+00
+00
+00
+00
+00
+00
+00
+05
+00
+00
+00
+00
+00
+70
+04
+00
+00
+00
+00
+00
+00
+00
+00
+05
+00
+00
+00
+00
+00
+68
+04
+00
+00
+00
+00
+00
+00
+00
+00
+05
+00
+00
+00
+00
+00
+80
+00
+00
+00
+00
+00
+00
+00
+00
+00
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+05
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+03
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+1c
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+26
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+0c
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+68
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+14
+00
+00
+00
+02
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+6c
+00
+00
+00
+c0
+00
+00
+00
+02
+00
+00
+00
+0c
+00
+00
+00
+04
+00
+00
+00
+10
+00
+00
+00
+01
+00
+00
+00
+01
+00
+00
+00
+06
+00
+00
+00
+00
+00
+00
+00
+40
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+10
+00
+00
+00
+00
+00
+00
+00
+07
+00
+00
+00
+08
+00
+00
+00
+03
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+98
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+00
+00
+00
+00
+00
+00
+00
diff --git a/modules/parsers/nasm/nasm-bison.y b/modules/parsers/nasm/nasm-bison.y
index 853f68c8..ab5c0b67 100644
--- a/modules/parsers/nasm/nasm-bison.y
+++ b/modules/parsers/nasm/nasm-bison.y
@@ -48,7 +48,7 @@ static int fix_directive_symrec(/*@null@*/ yasm_expr__item *ei,
static void define_label(yasm_parser_nasm *parser_nasm, /*@only@*/ char *name,
int local);
-#define nasm_parser_error(s) yasm__parser_error(cur_line, s)
+#define nasm_parser_error(s) yasm_error_set(YASM_ERROR_PARSE, "%s", s)
#define YYPARSE_PARAM parser_nasm_arg
#define YYLEX_PARAM parser_nasm_arg
#define parser_nasm ((yasm_parser_nasm *)parser_nasm_arg)
@@ -129,6 +129,7 @@ static void define_label(yasm_parser_nasm *parser_nasm, /*@only@*/ char *name,
%%
input: /* empty */
| input line {
+ yasm_errwarn_propagate(parser_nasm->errwarns, cur_line);
parser_nasm->temp_bc =
yasm_section_bcs_append(parser_nasm->cur_section, $2);
if (parser_nasm->temp_bc)
@@ -136,7 +137,7 @@ input: /* empty */
if (parser_nasm->save_input)
yasm_linemap_add_source(parser_nasm->linemap,
parser_nasm->temp_bc,
- parser_nasm->save_line[parser_nasm->save_last ^ 1]);
+ (char *)parser_nasm->save_line[parser_nasm->save_last ^ 1]);
yasm_linemap_goto_next(parser_nasm->linemap);
}
;
@@ -159,8 +160,8 @@ line: '\n' { $$ = (yasm_bytecode *)NULL; }
$$ = (yasm_bytecode *)NULL;
}
| error '\n' {
- yasm__error(cur_line,
- N_("label or instruction expected at start of line"));
+ yasm_error_set(YASM_ERROR_SYNTAX,
+ N_("label or instruction expected at start of line"));
$$ = (yasm_bytecode *)NULL;
yyerrok;
}
@@ -169,8 +170,8 @@ line: '\n' { $$ = (yasm_bytecode *)NULL; }
lineexp: exp
| TIMES expr exp { $$ = $3; yasm_bc_set_multiple($$, $2); }
| label_id {
- yasm__warning(YASM_WARN_ORPHAN_LABEL, cur_line,
- N_("label alone on a line without a colon might be in error"));
+ yasm_warn_set(YASM_WARN_ORPHAN_LABEL,
+ N_("label alone on a line without a colon might be in error"));
$$ = (yasm_bytecode *)NULL;
define_label(parser_nasm, $1.name, $1.local);
}
@@ -196,10 +197,10 @@ lineexp: exp
exp: instr
| DECLARE_DATA datavals {
- $$ = yasm_bc_create_data(&$2, $1, 0, cur_line);
+ $$ = yasm_bc_create_data(&$2, $1/8, 0, parser_nasm->arch, cur_line);
}
| RESERVE_SPACE expr {
- $$ = yasm_bc_create_reserve($2, $1, cur_line);
+ $$ = yasm_bc_create_reserve($2, $1/8, cur_line);
}
| INCBIN STRING {
$$ = yasm_bc_create_incbin($2.contents, NULL, NULL, cur_line);
@@ -226,7 +227,7 @@ instr: INSN {
&$2.operands, cur_line);
}
| INSN error {
- yasm__error(cur_line, N_("expression syntax error"));
+ yasm_error_set(YASM_ERROR_SYNTAX, N_("expression syntax error"));
$$ = NULL;
}
| PREFIX instr {
@@ -252,7 +253,7 @@ dataval: dvexpr { $$ = yasm_dv_create_expr($1); }
$$ = yasm_dv_create_string($1.contents, $1.len);
}
| error {
- yasm__error(cur_line, N_("expression syntax error"));
+ yasm_error_set(YASM_ERROR_SYNTAX, N_("expression syntax error"));
$$ = (yasm_dataval *)NULL;
}
;
@@ -271,7 +272,7 @@ directive: DIRECTIVE_NAME directive_val {
yasm_xfree($1);
}
| DIRECTIVE_NAME error {
- yasm__error(cur_line, N_("invalid arguments to [%s]"), $1);
+ yasm_error_set(YASM_ERROR_SYNTAX, N_("invalid arguments to [%s]"), $1);
yasm_xfree($1);
}
;
@@ -329,7 +330,7 @@ memaddr: expr {
}
| SEGREG ':' memaddr {
$$ = $3;
- yasm_ea_set_segreg($$, $1[0], cur_line);
+ yasm_ea_set_segreg($$, $1[0]);
}
| SIZE_OVERRIDE memaddr { $$ = $2; yasm_ea_set_len($$, $1); }
| NOSPLIT memaddr { $$ = $2; yasm_ea_set_nosplit($$, 1); }
@@ -355,7 +356,8 @@ operand: '[' memaddr ']' { $$ = yasm_operand_create_mem($2); }
$$ = $2;
if ($$->type == YASM_INSN__OPERAND_REG &&
yasm_arch_get_reg_size(parser_nasm->arch, $$->data.reg) != $1)
- yasm__error(cur_line, N_("cannot override register size"));
+ yasm_error_set(YASM_ERROR_TYPE,
+ N_("cannot override register size"));
else
$$->size = $1;
}
@@ -431,7 +433,7 @@ expr: INTNUM { $$ = p_expr_new_ident(yasm_expr_int($1)); }
| REG { $$ = p_expr_new_ident(yasm_expr_reg($1[0])); }
| STRING {
$$ = p_expr_new_ident(yasm_expr_int(
- yasm_intnum_create_charconst_nasm($1.contents, cur_line)));
+ yasm_intnum_create_charconst_nasm($1.contents)));
yasm_xfree($1.contents);
}
| explabel { $$ = p_expr_new_ident(yasm_expr_sym($1)); }
@@ -479,8 +481,8 @@ explabel: ID {
}
| '$' {
/* "$" references the current assembly position */
- $$ = yasm_symtab_define_label(p_symtab, "$", parser_nasm->prev_bc, 0,
- cur_line);
+ $$ = yasm_symtab_define_curpos(p_symtab, "$", parser_nasm->prev_bc,
+ cur_line);
}
| START_SECTION_ID {
/* "$$" references the start of the current section */
@@ -541,21 +543,24 @@ nasm_parser_directive(yasm_parser_nasm *parser_nasm, const char *name,
yasm_objfmt_extern_declare(parser_nasm->objfmt, vp->val,
objext_valparams, line);
} else
- yasm__error(line, N_("invalid argument to [%s]"), "EXTERN");
+ yasm_error_set(YASM_ERROR_SYNTAX, N_("invalid argument to [%s]"),
+ "EXTERN");
} else if (yasm__strcasecmp(name, "global") == 0) {
vp = yasm_vps_first(valparams);
if (vp->val) {
yasm_objfmt_global_declare(parser_nasm->objfmt, vp->val,
objext_valparams, line);
} else
- yasm__error(line, N_("invalid argument to [%s]"), "GLOBAL");
+ yasm_error_set(YASM_ERROR_SYNTAX, N_("invalid argument to [%s]"),
+ "GLOBAL");
} else if (yasm__strcasecmp(name, "common") == 0) {
vp = yasm_vps_first(valparams);
if (vp->val) {
vp2 = yasm_vps_next(vp);
if (!vp2 || (!vp2->val && !vp2->param))
- yasm__error(line, N_("no size specified in %s declaration"),
- "COMMON");
+ yasm_error_set(YASM_ERROR_SYNTAX,
+ N_("no size specified in %s declaration"),
+ "COMMON");
else {
if (vp2->val) {
yasm_objfmt_common_declare(parser_nasm->objfmt, vp->val,
@@ -570,7 +575,8 @@ nasm_parser_directive(yasm_parser_nasm *parser_nasm, const char *name,
}
}
} else
- yasm__error(line, N_("invalid argument to [%s]"), "COMMON");
+ yasm_error_set(YASM_ERROR_SYNTAX, N_("invalid argument to [%s]"),
+ "COMMON");
} else if (yasm__strcasecmp(name, "section") == 0 ||
yasm__strcasecmp(name, "segment") == 0) {
yasm_section *new_section =
@@ -580,7 +586,8 @@ nasm_parser_directive(yasm_parser_nasm *parser_nasm, const char *name,
parser_nasm->cur_section = new_section;
parser_nasm->prev_bc = yasm_section_bcs_last(new_section);
} else
- yasm__error(line, N_("invalid argument to [%s]"), "SECTION");
+ yasm_error_set(YASM_ERROR_SYNTAX, N_("invalid argument to [%s]"),
+ "SECTION");
} else if (yasm__strcasecmp(name, "absolute") == 0) {
/* it can be just an ID or a complete expression, so handle both. */
vp = yasm_vps_first(valparams);
@@ -596,28 +603,75 @@ nasm_parser_directive(yasm_parser_nasm *parser_nasm, const char *name,
vp->param = NULL;
}
parser_nasm->prev_bc = yasm_section_bcs_last(parser_nasm->cur_section);
+ } else if (yasm__strcasecmp(name, "align") == 0) {
+ /*@only@*/ yasm_expr *boundval;
+ /*@depedent@*/ yasm_intnum *boundintn;
+
+ /* it can be just an ID or a complete expression, so handle both. */
+ vp = yasm_vps_first(valparams);
+ if (vp->val)
+ boundval = p_expr_new_ident(yasm_expr_sym(
+ yasm_symtab_use(p_symtab, vp->val, line)));
+ else if (vp->param) {
+ boundval = vp->param;
+ vp->param = NULL;
+ }
+
+ /* Largest .align in the section specifies section alignment.
+ * Note: this doesn't match NASM behavior, but is a lot more
+ * intelligent!
+ */
+ boundintn = yasm_expr_get_intnum(&boundval, NULL);
+ if (boundintn) {
+ unsigned long boundint = yasm_intnum_get_uint(boundintn);
+
+ /* Alignments must be a power of two. */
+ if ((boundint & (boundint - 1)) == 0) {
+ if (boundint > yasm_section_get_align(parser_nasm->cur_section))
+ yasm_section_set_align(parser_nasm->cur_section, boundint,
+ cur_line);
+ }
+ }
+
+ /* As this directive is called only when nop is used as fill, always
+ * use arch (nop) fill.
+ */
+ parser_nasm->prev_bc =
+ yasm_section_bcs_append(parser_nasm->cur_section,
+ yasm_bc_create_align(boundval, NULL, NULL,
+ /*yasm_section_is_code(parser_nasm->cur_section) ?*/
+ yasm_arch_get_fill(parser_nasm->arch)/* : NULL*/,
+ cur_line));
} else if (yasm__strcasecmp(name, "cpu") == 0) {
yasm_vps_foreach(vp, valparams) {
if (vp->val)
- yasm_arch_parse_cpu(parser_nasm->arch, vp->val, line);
+ yasm_arch_parse_cpu(parser_nasm->arch, vp->val,
+ strlen(vp->val));
else if (vp->param) {
const yasm_intnum *intcpu;
intcpu = yasm_expr_get_intnum(&vp->param, NULL);
if (!intcpu)
- yasm__error(line, N_("invalid argument to [%s]"), "CPU");
+ yasm_error_set(YASM_ERROR_SYNTAX,
+ N_("invalid argument to [%s]"), "CPU");
else {
char strcpu[16];
sprintf(strcpu, "%lu", yasm_intnum_get_uint(intcpu));
- yasm_arch_parse_cpu(parser_nasm->arch, strcpu, line);
+ yasm_arch_parse_cpu(parser_nasm->arch, strcpu,
+ strlen(strcpu));
}
}
}
} else if (!yasm_arch_parse_directive(parser_nasm->arch, name, valparams,
objext_valparams, parser_nasm->object, line)) {
;
+ } else if (!yasm_dbgfmt_directive(parser_nasm->dbgfmt, name,
+ parser_nasm->cur_section, valparams,
+ line)) {
+ ;
} else if (yasm_objfmt_directive(parser_nasm->objfmt, name, valparams,
objext_valparams, line)) {
- yasm__error(line, N_("unrecognized directive [%s]"), name);
+ yasm_error_set(YASM_ERROR_SYNTAX, N_("unrecognized directive [%s]"),
+ name);
}
yasm_vps_delete(valparams);
diff --git a/modules/parsers/nasm/nasm-parser.c b/modules/parsers/nasm/nasm-parser.c
index 95f23c96..ade9a076 100644
--- a/modules/parsers/nasm/nasm-parser.c
+++ b/modules/parsers/nasm/nasm-parser.c
@@ -35,8 +35,9 @@
static void
nasm_parser_do_parse(yasm_object *object, yasm_preproc *pp, yasm_arch *a,
- yasm_objfmt *of, FILE *f, const char *in_filename,
- int save_input, yasm_section *def_sect)
+ yasm_objfmt *of, yasm_dbgfmt *df, FILE *f,
+ const char *in_filename, int save_input,
+ yasm_section *def_sect, yasm_errwarns *errwarns)
{
yasm_parser_nasm parser_nasm;
@@ -52,6 +53,8 @@ nasm_parser_do_parse(yasm_object *object, yasm_preproc *pp, yasm_arch *a,
parser_nasm.preproc = pp;
parser_nasm.arch = a;
parser_nasm.objfmt = of;
+ parser_nasm.dbgfmt = df;
+ parser_nasm.errwarns = errwarns;
parser_nasm.cur_section = def_sect;
parser_nasm.prev_bc = yasm_section_bcs_first(def_sect);
diff --git a/modules/parsers/nasm/nasm-parser.h b/modules/parsers/nasm/nasm-parser.h
index c2147018..a8a4a616 100644
--- a/modules/parsers/nasm/nasm-parser.h
+++ b/modules/parsers/nasm/nasm-parser.h
@@ -29,7 +29,7 @@
#include "nasm-bison.h"
-#define YYCTYPE char
+#define YYCTYPE unsigned char
typedef struct Scanner {
YYCTYPE *bot, *tok, *ptr, *cur, *pos, *lim, *top, *eof;
unsigned int tchar, tline, cline;
@@ -51,6 +51,8 @@ typedef struct yasm_parser_nasm {
/*@dependent@*/ yasm_preproc *preproc;
/*@dependent@*/ yasm_arch *arch;
/*@dependent@*/ yasm_objfmt *objfmt;
+ /*@dependent@*/ yasm_dbgfmt *dbgfmt;
+ /*@dependent@*/ yasm_errwarns *errwarns;
/*@dependent@*/ yasm_linemap *linemap;
/*@dependent@*/ yasm_symtab *symtab;
@@ -68,7 +70,8 @@ typedef struct yasm_parser_nasm {
DIRECTIVE,
DIRECTIVE2,
LINECHG,
- LINECHG2
+ LINECHG2,
+ INSTRUCTION
} state;
} yasm_parser_nasm;
diff --git a/modules/parsers/nasm/nasm-token.re b/modules/parsers/nasm/nasm-token.re
index 41a1377a..b529e350 100644
--- a/modules/parsers/nasm/nasm-token.re
+++ b/modules/parsers/nasm/nasm-token.re
@@ -51,6 +51,7 @@ RCSID("$Id$");
s->tok = cursor; \
}
+#define TOK ((char *)s->tok)
#define TOKLEN (size_t)(cursor-s->tok)
@@ -62,7 +63,7 @@ fill(yasm_parser_nasm *parser_nasm, YYCTYPE *cursor)
if(!s->eof){
size_t cnt = s->tok - s->bot;
if(cnt){
- memcpy(s->bot, s->tok, (size_t)(s->lim - s->tok));
+ memmove(s->bot, s->tok, (size_t)(s->lim - s->tok));
s->tok = s->bot;
s->ptr -= cnt;
cursor -= cnt;
@@ -72,7 +73,7 @@ fill(yasm_parser_nasm *parser_nasm, YYCTYPE *cursor)
if (!s->bot)
first = 1;
if((s->top - s->lim) < BSIZE){
- char *buf = yasm_xmalloc((size_t)(s->lim - s->bot) + BSIZE);
+ YYCTYPE *buf = yasm_xmalloc((size_t)(s->lim - s->bot) + BSIZE);
memcpy(buf, s->tok, (size_t)(s->lim - s->tok));
s->tok = buf;
s->ptr = &buf[s->ptr - s->bot];
@@ -84,14 +85,14 @@ fill(yasm_parser_nasm *parser_nasm, YYCTYPE *cursor)
yasm_xfree(s->bot);
s->bot = buf;
}
- if((cnt = yasm_preproc_input(parser_nasm->preproc, s->lim,
+ if((cnt = yasm_preproc_input(parser_nasm->preproc, (char *)s->lim,
BSIZE)) == 0) {
s->eof = &s->lim[cnt]; *s->eof++ = '\n';
}
s->lim += cnt;
if (first && parser_nasm->save_input) {
int i;
- char *saveline;
+ YYCTYPE *saveline;
parser_nasm->save_last ^= 1;
saveline = parser_nasm->save_line[parser_nasm->save_last];
/* save next line into cur_line */
@@ -108,7 +109,7 @@ save_line(yasm_parser_nasm *parser_nasm, YYCTYPE *cursor)
{
Scanner *s = &parser_nasm->s;
int i = 0;
- char *saveline;
+ YYCTYPE *saveline;
parser_nasm->save_last ^= 1;
saveline = parser_nasm->save_line[parser_nasm->save_last];
@@ -133,7 +134,7 @@ nasm_parser_cleanup(yasm_parser_nasm *parser_nasm)
#define STRBUF_ALLOC_SIZE 128
/* string buffer used when parsing strings/character constants */
-static char *strbuf = (char *)NULL;
+static YYCTYPE *strbuf = NULL;
/* length of strbuf (including terminating NULL character) */
static size_t strbuf_size = 0;
@@ -185,7 +186,7 @@ scan:
digit+ {
savech = s->tok[TOKLEN];
s->tok[TOKLEN] = '\0';
- lvalp->intn = yasm_intnum_create_dec(s->tok, cur_line);
+ lvalp->intn = yasm_intnum_create_dec(TOK);
s->tok[TOKLEN] = savech;
RETURN(INTNUM);
}
@@ -193,21 +194,21 @@ scan:
bindigit+ 'b' {
s->tok[TOKLEN-1] = '\0'; /* strip off 'b' */
- lvalp->intn = yasm_intnum_create_bin(s->tok, cur_line);
+ lvalp->intn = yasm_intnum_create_bin(TOK);
RETURN(INTNUM);
}
- /* 777q - octal number */
- octdigit+ 'q' {
- s->tok[TOKLEN-1] = '\0'; /* strip off 'q' */
- lvalp->intn = yasm_intnum_create_oct(s->tok, cur_line);
+ /* 777q or 777o - octal number */
+ octdigit+ [qQoO] {
+ s->tok[TOKLEN-1] = '\0'; /* strip off 'q' or 'o' */
+ lvalp->intn = yasm_intnum_create_oct(TOK);
RETURN(INTNUM);
}
/* 0AAh form of hexidecimal number */
digit hexdigit* 'h' {
s->tok[TOKLEN-1] = '\0'; /* strip off 'h' */
- lvalp->intn = yasm_intnum_create_hex(s->tok, cur_line);
+ lvalp->intn = yasm_intnum_create_hex(TOK);
RETURN(INTNUM);
}
@@ -217,10 +218,10 @@ scan:
s->tok[TOKLEN] = '\0';
if (s->tok[1] == 'x')
/* skip 0 and x */
- lvalp->intn = yasm_intnum_create_hex(s->tok+2, cur_line);
+ lvalp->intn = yasm_intnum_create_hex(TOK+2);
else
/* don't skip 0 */
- lvalp->intn = yasm_intnum_create_hex(s->tok+1, cur_line);
+ lvalp->intn = yasm_intnum_create_hex(TOK+1);
s->tok[TOKLEN] = savech;
RETURN(INTNUM);
}
@@ -229,7 +230,7 @@ scan:
digit+ "." digit* ('e' [-+]? digit+)? {
savech = s->tok[TOKLEN];
s->tok[TOKLEN] = '\0';
- lvalp->flt = yasm_floatnum_create(s->tok);
+ lvalp->flt = yasm_floatnum_create(TOK);
s->tok[TOKLEN] = savech;
RETURN(FLTNUM);
}
@@ -248,7 +249,7 @@ scan:
}
/* size specifiers */
- 'byte' { lvalp->int_info = 1; RETURN(SIZE_OVERRIDE); }
+ 'byte' { lvalp->int_info = 8; RETURN(SIZE_OVERRIDE); }
'hword' {
lvalp->int_info = yasm_arch_wordsize(parser_nasm->arch)/2;
RETURN(SIZE_OVERRIDE);
@@ -265,14 +266,14 @@ scan:
lvalp->int_info = yasm_arch_wordsize(parser_nasm->arch)*4;
RETURN(SIZE_OVERRIDE);
}
- 'tword' { lvalp->int_info = 10; RETURN(SIZE_OVERRIDE); }
+ 'tword' { lvalp->int_info = 80; RETURN(SIZE_OVERRIDE); }
'dqword' {
lvalp->int_info = yasm_arch_wordsize(parser_nasm->arch)*8;
RETURN(SIZE_OVERRIDE);
}
/* pseudo-instructions */
- 'db' { lvalp->int_info = 1; RETURN(DECLARE_DATA); }
+ 'db' { lvalp->int_info = 8; RETURN(DECLARE_DATA); }
'dhw' {
lvalp->int_info = yasm_arch_wordsize(parser_nasm->arch)/2;
RETURN(DECLARE_DATA);
@@ -289,13 +290,13 @@ scan:
lvalp->int_info = yasm_arch_wordsize(parser_nasm->arch)*4;
RETURN(DECLARE_DATA);
}
- 'dt' { lvalp->int_info = 10; RETURN(DECLARE_DATA); }
+ 'dt' { lvalp->int_info = 80; RETURN(DECLARE_DATA); }
'ddq' {
lvalp->int_info = yasm_arch_wordsize(parser_nasm->arch)*8;
RETURN(DECLARE_DATA);
}
- 'resb' { lvalp->int_info = 1; RETURN(RESERVE_SPACE); }
+ 'resb' { lvalp->int_info = 8; RETURN(RESERVE_SPACE); }
'reshw' {
lvalp->int_info = yasm_arch_wordsize(parser_nasm->arch)/2;
RETURN(RESERVE_SPACE);
@@ -312,7 +313,7 @@ scan:
lvalp->int_info = yasm_arch_wordsize(parser_nasm->arch)*4;
RETURN(RESERVE_SPACE);
}
- 'rest' { lvalp->int_info = 10; RETURN(RESERVE_SPACE); }
+ 'rest' { lvalp->int_info = 80; RETURN(RESERVE_SPACE); }
'resdq' {
lvalp->int_info = yasm_arch_wordsize(parser_nasm->arch)*8;
RETURN(RESERVE_SPACE);
@@ -346,7 +347,7 @@ scan:
/* special non-local ..@label and labels like ..start */
".." [a-zA-Z0-9_$#@~.?]+ {
- lvalp->str_val = yasm__xstrndup(s->tok, TOKLEN);
+ lvalp->str_val = yasm__xstrndup(TOK, TOKLEN);
RETURN(SPECIAL_ID);
}
@@ -354,18 +355,18 @@ scan:
"." [a-zA-Z0-9_$#@~?][a-zA-Z0-9_$#@~.?]* {
/* override local labels in directive state */
if (parser_nasm->state == DIRECTIVE2) {
- lvalp->str_val = yasm__xstrndup(s->tok, TOKLEN);
+ lvalp->str_val = yasm__xstrndup(TOK, TOKLEN);
RETURN(ID);
} else if (!parser_nasm->locallabel_base) {
- lvalp->str_val = yasm__xstrndup(s->tok, TOKLEN);
- yasm__warning(YASM_WARN_GENERAL, cur_line,
+ lvalp->str_val = yasm__xstrndup(TOK, TOKLEN);
+ yasm_warn_set(YASM_WARN_GENERAL,
N_("no non-local label before `%s'"),
lvalp->str_val);
} else {
len = TOKLEN + parser_nasm->locallabel_base_len;
lvalp->str_val = yasm_xmalloc(len + 1);
strcpy(lvalp->str_val, parser_nasm->locallabel_base);
- strncat(lvalp->str_val, s->tok, TOKLEN);
+ strncat(lvalp->str_val, TOK, TOKLEN);
lvalp->str_val[len] = '\0';
}
@@ -373,8 +374,8 @@ scan:
}
/* forced identifier */
- "$" [a-zA-Z_?][a-zA-Z0-9_$#@~.?]* {
- lvalp->str_val = yasm__xstrndup(s->tok, TOKLEN);
+ "$" [a-zA-Z0-9_$#@~.?]+ {
+ lvalp->str_val = yasm__xstrndup(TOK+1, TOKLEN-1);
RETURN(ID);
}
@@ -382,37 +383,35 @@ scan:
[a-zA-Z_?][a-zA-Z0-9_$#@~.?]* {
savech = s->tok[TOKLEN];
s->tok[TOKLEN] = '\0';
- if (yasm_arch_parse_check_reg(parser_nasm->arch, lvalp->arch_data,
- s->tok, cur_line)) {
- s->tok[TOKLEN] = savech;
- RETURN(REG);
+ if (parser_nasm->state != INSTRUCTION)
+ switch (yasm_arch_parse_check_insnprefix
+ (parser_nasm->arch, lvalp->arch_data, TOK, TOKLEN)) {
+ case YASM_ARCH_INSN:
+ parser_nasm->state = INSTRUCTION;
+ s->tok[TOKLEN] = savech;
+ RETURN(INSN);
+ case YASM_ARCH_PREFIX:
+ s->tok[TOKLEN] = savech;
+ RETURN(PREFIX);
+ default:
+ break;
+ }
+ switch (yasm_arch_parse_check_regtmod
+ (parser_nasm->arch, lvalp->arch_data, TOK, TOKLEN)) {
+ case YASM_ARCH_REG:
+ s->tok[TOKLEN] = savech;
+ RETURN(REG);
+ case YASM_ARCH_SEGREG:
+ s->tok[TOKLEN] = savech;
+ RETURN(SEGREG);
+ case YASM_ARCH_TARGETMOD:
+ s->tok[TOKLEN] = savech;
+ RETURN(TARGETMOD);
+ default:
+ s->tok[TOKLEN] = savech;
}
- if (yasm_arch_parse_check_insn(parser_nasm->arch, lvalp->arch_data,
- s->tok, cur_line)) {
- s->tok[TOKLEN] = savech;
- RETURN(INSN);
- }
- if (yasm_arch_parse_check_segreg(parser_nasm->arch,
- lvalp->arch_data, s->tok,
- cur_line)) {
- s->tok[TOKLEN] = savech;
- RETURN(SEGREG);
- }
- if (yasm_arch_parse_check_prefix(parser_nasm->arch,
- lvalp->arch_data, s->tok,
- cur_line)) {
- s->tok[TOKLEN] = savech;
- RETURN(PREFIX);
- }
- if (yasm_arch_parse_check_targetmod(parser_nasm->arch,
- lvalp->arch_data, s->tok,
- cur_line)) {
- s->tok[TOKLEN] = savech;
- RETURN(TARGETMOD);
- }
- s->tok[TOKLEN] = savech;
/* Just an identifier, return as such. */
- lvalp->str_val = yasm__xstrndup(s->tok, TOKLEN);
+ lvalp->str_val = yasm__xstrndup(TOK, TOKLEN);
RETURN(ID);
}
@@ -428,7 +427,7 @@ scan:
}
any {
- yasm__warning(YASM_WARN_UNREC_CHAR, cur_line,
+ yasm_warn_set(YASM_WARN_UNREC_CHAR,
N_("ignoring unrecognized character `%s'"),
yasm__conv_unprint(s->tok[0]));
goto scan;
@@ -444,7 +443,7 @@ linechg:
linechg_numcount++;
savech = s->tok[TOKLEN];
s->tok[TOKLEN] = '\0';
- lvalp->intn = yasm_intnum_create_dec(s->tok, cur_line);
+ lvalp->intn = yasm_intnum_create_dec(TOK);
s->tok[TOKLEN] = savech;
RETURN(INTNUM);
}
@@ -469,7 +468,7 @@ linechg:
}
any {
- yasm__warning(YASM_WARN_UNREC_CHAR, cur_line,
+ yasm_warn_set(YASM_WARN_UNREC_CHAR,
N_("ignoring unrecognized character `%s'"),
yasm__conv_unprint(s->tok[0]));
goto linechg;
@@ -491,7 +490,7 @@ linechg2:
(any \ [\r\n])+ {
parser_nasm->state = LINECHG;
- lvalp->str_val = yasm__xstrndup(s->tok, TOKLEN);
+ lvalp->str_val = yasm__xstrndup(TOK, TOKLEN);
RETURN(FILENAME);
}
*/
@@ -510,12 +509,12 @@ directive:
iletter+ {
parser_nasm->state = DIRECTIVE2;
- lvalp->str_val = yasm__xstrndup(s->tok, TOKLEN);
+ lvalp->str_val = yasm__xstrndup(TOK, TOKLEN);
RETURN(DIRECTIVE_NAME);
}
any {
- yasm__warning(YASM_WARN_UNREC_CHAR, cur_line,
+ yasm_warn_set(YASM_WARN_UNREC_CHAR,
N_("ignoring unrecognized character `%s'"),
yasm__conv_unprint(s->tok[0]));
goto directive;
@@ -534,12 +533,12 @@ stringconst_scan:
/*!re2c
"\n" {
if (cursor == s->eof)
- yasm__error(cur_line,
- N_("unexpected end of file in string"));
+ yasm_error_set(YASM_ERROR_SYNTAX,
+ N_("unexpected end of file in string"));
else
- yasm__error(cur_line, N_("unterminated string"));
+ yasm_error_set(YASM_ERROR_SYNTAX, N_("unterminated string"));
strbuf[count] = '\0';
- lvalp->str.contents = strbuf;
+ lvalp->str.contents = (char *)strbuf;
lvalp->str.len = count;
if (parser_nasm->save_input && cursor != s->eof)
cursor = save_line(parser_nasm, cursor);
@@ -549,7 +548,7 @@ stringconst_scan:
any {
if (s->tok[0] == endch) {
strbuf[count] = '\0';
- lvalp->str.contents = strbuf;
+ lvalp->str.contents = (char *)strbuf;
lvalp->str.len = count;
RETURN(STRING);
}
diff --git a/modules/parsers/nasm/tests/Makefile.inc b/modules/parsers/nasm/tests/Makefile.inc
index 3e7e1cdc..a4351798 100644
--- a/modules/parsers/nasm/tests/Makefile.inc
+++ b/modules/parsers/nasm/tests/Makefile.inc
@@ -3,6 +3,12 @@
TESTS += modules/parsers/nasm/tests/nasm_test.sh
EXTRA_DIST += modules/parsers/nasm/tests/nasm_test.sh
+EXTRA_DIST += modules/parsers/nasm/tests/alignnop16.asm
+EXTRA_DIST += modules/parsers/nasm/tests/alignnop16.errwarn
+EXTRA_DIST += modules/parsers/nasm/tests/alignnop16.hex
+EXTRA_DIST += modules/parsers/nasm/tests/alignnop32.asm
+EXTRA_DIST += modules/parsers/nasm/tests/alignnop32.errwarn
+EXTRA_DIST += modules/parsers/nasm/tests/alignnop32.hex
EXTRA_DIST += modules/parsers/nasm/tests/endcomma.asm
EXTRA_DIST += modules/parsers/nasm/tests/endcomma.errwarn
EXTRA_DIST += modules/parsers/nasm/tests/endcomma.hex
diff --git a/modules/parsers/nasm/tests/alignnop16.asm b/modules/parsers/nasm/tests/alignnop16.asm
new file mode 100644
index 00000000..dd413619
--- /dev/null
+++ b/modules/parsers/nasm/tests/alignnop16.asm
@@ -0,0 +1,4 @@
+bits 16
+mov eax,32
+align 16
+ret
diff --git a/modules/parsers/nasm/tests/alignnop16.errwarn b/modules/parsers/nasm/tests/alignnop16.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/parsers/nasm/tests/alignnop16.errwarn
diff --git a/modules/parsers/nasm/tests/alignnop16.hex b/modules/parsers/nasm/tests/alignnop16.hex
new file mode 100644
index 00000000..de32de77
--- /dev/null
+++ b/modules/parsers/nasm/tests/alignnop16.hex
@@ -0,0 +1,17 @@
+66
+b8
+20
+00
+00
+00
+eb
+08
+90
+90
+90
+90
+90
+90
+90
+90
+c3
diff --git a/modules/parsers/nasm/tests/alignnop32.asm b/modules/parsers/nasm/tests/alignnop32.asm
new file mode 100644
index 00000000..13410d06
--- /dev/null
+++ b/modules/parsers/nasm/tests/alignnop32.asm
@@ -0,0 +1,4 @@
+bits 32
+mov eax,32
+align 16
+ret
diff --git a/modules/parsers/nasm/tests/alignnop32.errwarn b/modules/parsers/nasm/tests/alignnop32.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/parsers/nasm/tests/alignnop32.errwarn
diff --git a/modules/parsers/nasm/tests/alignnop32.hex b/modules/parsers/nasm/tests/alignnop32.hex
new file mode 100644
index 00000000..4af43b8c
--- /dev/null
+++ b/modules/parsers/nasm/tests/alignnop32.hex
@@ -0,0 +1,17 @@
+b8
+20
+00
+00
+00
+eb
+09
+90
+90
+90
+90
+90
+90
+90
+90
+90
+c3
diff --git a/modules/preprocs/nasm/Makefile.inc b/modules/preprocs/nasm/Makefile.inc
index 07b957f4..a91eb914 100644
--- a/modules/preprocs/nasm/Makefile.inc
+++ b/modules/preprocs/nasm/Makefile.inc
@@ -11,10 +11,10 @@ libyasm_a_SOURCES += modules/preprocs/nasm/nasm-eval.c
YASM_MODULES += preproc_nasm
-$(top_modulesdir)/src/preprocs/nasm/nasm-pp.c: nasm-macros.c
+$(top_srcdir)/src/preprocs/nasm/nasm-pp.c: nasm-macros.c
-nasm-macros.c: $(top_srcdir)/modules/preprocs/nasm/standard.mac genmacro$(EXEEXT)
- $(top_builddir)/genmacro$(EXEEXT) $(top_srcdir)/modules/preprocs/nasm/standard.mac
+nasm-macros.c: $(top_srcdir)/modules/preprocs/nasm/standard.mac version.mac genmacro$(EXEEXT)
+ $(top_builddir)/genmacro$(EXEEXT) $(top_srcdir)/modules/preprocs/nasm/standard.mac version.mac
BUILT_SOURCES += nasm-macros.c
CLEANFILES += nasm-macros.c
@@ -29,6 +29,22 @@ genmacro_LINK = $(CCLD_FOR_BUILD) -o $@
genmacro.$(OBJEXT): modules/preprocs/nasm/genmacro.c
$(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f modules/preprocs/nasm/genmacro.c || echo '$(srcdir)/'`modules/preprocs/nasm/genmacro.c
+version.mac: genversion$(EXEEXT)
+ $(top_builddir)/genversion$(EXEEXT) $@
+
+BUILT_SOURCES += version.mac
+CLEANFILES += version.mac
+
+noinst_PROGRAMS += genversion
+
+genversion_SOURCES =
+EXTRA_DIST += modules/preprocs/nasm/genversion.c
+genversion_LDADD = genversion.$(OBJEXT)
+genversion_LINK = $(CCLD_FOR_BUILD) -o $@
+
+genversion.$(OBJEXT): modules/preprocs/nasm/genversion.c
+ $(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f modules/preprocs/nasm/genversion.c || echo '$(srcdir)/'`modules/preprocs/nasm/genversion.c
+
EXTRA_DIST += modules/preprocs/nasm/standard.mac
EXTRA_DIST += modules/preprocs/nasm/tests/Makefile.inc
diff --git a/modules/preprocs/nasm/genversion.c b/modules/preprocs/nasm/genversion.c
new file mode 100644
index 00000000..db28def5
--- /dev/null
+++ b/modules/preprocs/nasm/genversion.c
@@ -0,0 +1,79 @@
+/* $Id$
+ *
+ * Generate version.mac
+ *
+ * Copyright (C) 2006 Peter Johnson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "config.h" /* for PACKAGE_VERSION */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+int
+main(int argc, char *argv[])
+{
+ FILE *out;
+ int major, minor, subminor;
+
+ if (argc != 2) {
+ fprintf(stderr, "Usage: %s <outfile>\n", argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ out = fopen(argv[1], "wt");
+
+ if (!out) {
+ fprintf(stderr, "Could not open `%s'.\n", argv[1]);
+ return EXIT_FAILURE;
+ }
+
+ fprintf(out, "; This file auto-generated by genversion.c"
+ " - don't edit it\n");
+
+ if (sscanf(PACKAGE_INTVER, "%d.%d.%d", &major, &minor, &subminor) != 3) {
+ fprintf(stderr, "Version tokenizing error\n");
+ fclose(out);
+ remove(argv[1]);
+ return EXIT_FAILURE;
+ }
+
+ fprintf(out, "%%define __YASM_MAJOR__ %d\n", major);
+ fprintf(out, "%%define __YASM_MINOR__ %d\n", minor);
+ fprintf(out, "%%define __YASM_SUBMINOR__ %d\n", subminor);
+ if (!isdigit(PACKAGE_BUILD[0]))
+ fprintf(out, "%%define __YASM_BUILD__ 0\n");
+ else
+ fprintf(out, "%%define __YASM_BUILD__ %d\n", atoi(PACKAGE_BUILD));
+
+ /* Version id (hex number) */
+ fprintf(out, "%%define __YASM_VERSION_ID__ 0%02x%02x%02x00h\n", major,
+ minor, subminor);
+
+ /* Version string - version sans build */
+ fprintf(out, "%%define __YASM_VER__ \"%s\"\n", PACKAGE_INTVER);
+ fclose(out);
+
+ return EXIT_SUCCESS;
+}
diff --git a/modules/preprocs/nasm/nasm-eval.c b/modules/preprocs/nasm/nasm-eval.c
index 333af297..b85cfbf5 100644
--- a/modules/preprocs/nasm/nasm-eval.c
+++ b/modules/preprocs/nasm/nasm-eval.c
@@ -9,217 +9,21 @@
*/
#include <util.h>
#include <libyasm/coretype.h>
+#include <libyasm/intnum.h>
+#include <libyasm/expr.h>
#include <ctype.h>
#include "nasm.h"
#include "nasmlib.h"
#include "nasm-eval.h"
-/*#include "labels.h"*/
-
-#define TEMPEXPRS_DELTA 128
-#define TEMPEXPR_DELTA 8
static scanner scan; /* Address of scanner routine */
static efunc error; /* Address of error reporting routine */
-static lfunc labelfunc; /* Address of label routine */
-
-static struct ofmt *outfmt; /* Structure of addresses of output routines */
-
-static nasm_expr **tempexprs = NULL;
-static int ntempexprs;
-static int tempexprs_size = 0;
-
-static nasm_expr *tempexpr;
-static int ntempexpr;
-static int tempexpr_size;
static struct tokenval *tokval; /* The current token */
static int i; /* The t_type of tokval */
static void *scpriv;
-static loc_t *location; /* Pointer to current line's segment,offset */
-static int *opflags;
-
-static struct eval_hints *hint;
-
-static int in_abs_seg = 0; /* ABSOLUTE segment flag */
-static long abs_seg = 0; /* ABSOLUTE segment */
-static long abs_offset = 0; /* ABSOLUTE segment offset */
-
-/*
- * Unimportant cleanup is done to avoid confusing people who are trying
- * to debug real memory leaks
- */
-void nasm_eval_cleanup(void)
-{
- while (ntempexprs) {
- ntempexprs--;
- nasm_free (tempexprs[ntempexprs]);
- }
- nasm_free (tempexprs);
-}
-
-/*
- * Construct a temporary expression.
- */
-static void begintemp(void)
-{
- tempexpr = NULL;
- tempexpr_size = ntempexpr = 0;
-}
-
-static void addtotemp(long type, long value)
-{
- while (ntempexpr >= tempexpr_size) {
- tempexpr_size += TEMPEXPR_DELTA;
- tempexpr = nasm_realloc(tempexpr,
- tempexpr_size*sizeof(*tempexpr));
- }
- tempexpr[ntempexpr].type = type;
- tempexpr[ntempexpr++].value = value;
-}
-
-static nasm_expr *finishtemp(void)
-{
- addtotemp (0L, 0L); /* terminate */
- while (ntempexprs >= tempexprs_size) {
- tempexprs_size += TEMPEXPRS_DELTA;
- tempexprs = nasm_realloc(tempexprs,
- tempexprs_size*sizeof(*tempexprs));
- }
- return tempexprs[ntempexprs++] = tempexpr;
-}
-
-/*
- * Add two vector datatypes. We have some bizarre behaviour on far-
- * absolute segment types: we preserve them during addition _only_
- * if one of the segments is a truly pure scalar.
- */
-static nasm_expr *add_vectors(nasm_expr *p, nasm_expr *q)
-{
- int preserve;
-
- preserve = nasm_is_really_simple(p) || nasm_is_really_simple(q);
-
- begintemp();
-
- while (p->type && q->type &&
- p->type < EXPR_SEGBASE+SEG_ABS &&
- q->type < EXPR_SEGBASE+SEG_ABS)
- {
- int lasttype;
-
- if (p->type > q->type) {
- addtotemp(q->type, q->value);
- lasttype = q++->type;
- } else if (p->type < q->type) {
- addtotemp(p->type, p->value);
- lasttype = p++->type;
- } else { /* *p and *q have same type */
- long sum = p->value + q->value;
- if (sum)
- addtotemp(p->type, sum);
- lasttype = p->type;
- p++, q++;
- }
- if (lasttype == EXPR_UNKNOWN) {
- return finishtemp();
- }
- }
- while (p->type &&
- (preserve || p->type < EXPR_SEGBASE+SEG_ABS))
- {
- addtotemp(p->type, p->value);
- p++;
- }
- while (q->type &&
- (preserve || q->type < EXPR_SEGBASE+SEG_ABS))
- {
- addtotemp(q->type, q->value);
- q++;
- }
-
- return finishtemp();
-}
-
-/*
- * Multiply a vector by a scalar. Strip far-absolute segment part
- * if present.
- *
- * Explicit treatment of UNKNOWN is not required in this routine,
- * since it will silently do the Right Thing anyway.
- *
- * If `affect_hints' is set, we also change the hint type to
- * NOTBASE if a MAKEBASE hint points at a register being
- * multiplied. This allows [eax*1+ebx] to hint EBX rather than EAX
- * as the base register.
- */
-static nasm_expr *scalar_mult(nasm_expr *vect, long scalar, int affect_hints)
-{
- nasm_expr *p = vect;
-
- while (p->type && p->type < EXPR_SEGBASE+SEG_ABS) {
- p->value = scalar * (p->value);
- if (hint && hint->type == EAH_MAKEBASE &&
- p->type == hint->base && affect_hints)
- hint->type = EAH_NOTBASE;
- p++;
- }
- p->type = 0;
-
- return vect;
-}
-
-static nasm_expr *scalarvect (long scalar)
-{
- begintemp();
- addtotemp(EXPR_SIMPLE, scalar);
- return finishtemp();
-}
-
-static nasm_expr *unknown_expr (void)
-{
- begintemp();
- addtotemp(EXPR_UNKNOWN, 1L);
- return finishtemp();
-}
-
-/*
- * The SEG operator: calculate the segment part of a relocatable
- * value. Return NULL, as usual, if an error occurs. Report the
- * error too.
- */
-static nasm_expr *segment_part (nasm_expr *e)
-{
- long seg;
-
- if (nasm_is_unknown(e))
- return unknown_expr();
-
- if (!nasm_is_reloc(e)) {
- error(ERR_NONFATAL, "cannot apply SEG to a non-relocatable value");
- return NULL;
- }
-
- seg = nasm_reloc_seg(e);
- if (seg == NO_SEG) {
- error(ERR_NONFATAL, "cannot apply SEG to a non-relocatable value");
- return NULL;
- } else if (seg & SEG_ABS) {
- return scalarvect(seg & ~SEG_ABS);
- } else if (seg & 1) {
- error(ERR_NONFATAL, "SEG applied to something which"
- " is already a segment base");
- return NULL;
- }
- else {
- long base = outfmt->segbase(seg+1);
-
- begintemp();
- addtotemp((base == NO_SEG ? EXPR_UNKNOWN : EXPR_SEGBASE+base), 1L);
- return finishtemp();
- }
-}
/*
* Recursive-descent parser. Called with a single boolean operand,
@@ -254,104 +58,83 @@ static nasm_expr *segment_part (nasm_expr *e)
* | number
*/
-static nasm_expr *rexp0(int), *rexp1(int), *rexp2(int), *rexp3(int);
+static yasm_expr *rexp0(void), *rexp1(void), *rexp2(void), *rexp3(void);
-static nasm_expr *expr0(int), *expr1(int), *expr2(int), *expr3(int);
-static nasm_expr *expr4(int), *expr5(int), *expr6(int);
+static yasm_expr *expr0(void), *expr1(void), *expr2(void), *expr3(void);
+static yasm_expr *expr4(void), *expr5(void), *expr6(void);
-static nasm_expr *(*bexpr)(int);
+static yasm_expr *(*bexpr)(void);
-static nasm_expr *rexp0(int critical)
+static yasm_expr *rexp0(void)
{
- nasm_expr *e, *f;
+ yasm_expr *e, *f;
- e = rexp1(critical);
+ e = rexp1();
if (!e)
return NULL;
while (i == TOKEN_DBL_OR)
{
i = scan(scpriv, tokval);
- f = rexp1(critical);
- if (!f)
+ f = rexp1();
+ if (!f) {
+ yasm_expr_destroy(e);
return NULL;
- if (!(nasm_is_simple(e) || nasm_is_just_unknown(e)) ||
- !(nasm_is_simple(f) || nasm_is_just_unknown(f)))
- {
- error(ERR_NONFATAL, "`|' operator may only be applied to"
- " scalar values");
}
- if (nasm_is_just_unknown(e) || nasm_is_just_unknown(f))
- e = unknown_expr();
- else
- e = scalarvect ((long) (nasm_reloc_value(e) || nasm_reloc_value(f)));
+ e = yasm_expr_create_tree(e, YASM_EXPR_LOR, f, 0);
}
return e;
}
-static nasm_expr *rexp1(int critical)
+static yasm_expr *rexp1(void)
{
- nasm_expr *e, *f;
+ yasm_expr *e, *f;
- e = rexp2(critical);
+ e = rexp2();
if (!e)
return NULL;
while (i == TOKEN_DBL_XOR)
{
i = scan(scpriv, tokval);
- f = rexp2(critical);
- if (!f)
+ f = rexp2();
+ if (!f) {
+ yasm_expr_destroy(e);
return NULL;
- if (!(nasm_is_simple(e) || nasm_is_just_unknown(e)) ||
- !(nasm_is_simple(f) || nasm_is_just_unknown(f)))
- {
- error(ERR_NONFATAL, "`^' operator may only be applied to"
- " scalar values");
}
- if (nasm_is_just_unknown(e) || nasm_is_just_unknown(f))
- e = unknown_expr();
- else
- e = scalarvect ((long) (!nasm_reloc_value(e) ^ !nasm_reloc_value(f)));
+ e = yasm_expr_create_tree(e, YASM_EXPR_LXOR, f, 0);
}
return e;
}
-static nasm_expr *rexp2(int critical)
+static yasm_expr *rexp2(void)
{
- nasm_expr *e, *f;
+ yasm_expr *e, *f;
- e = rexp3(critical);
+ e = rexp3();
if (!e)
return NULL;
while (i == TOKEN_DBL_AND)
{
i = scan(scpriv, tokval);
- f = rexp3(critical);
- if (!f)
+ f = rexp3();
+ if (!f) {
+ yasm_expr_destroy(e);
return NULL;
- if (!(nasm_is_simple(e) || nasm_is_just_unknown(e)) ||
- !(nasm_is_simple(f) || nasm_is_just_unknown(f)))
- {
- error(ERR_NONFATAL, "`&' operator may only be applied to"
- " scalar values");
}
- if (nasm_is_just_unknown(e) || nasm_is_just_unknown(f))
- e = unknown_expr();
- else
- e = scalarvect ((long) (nasm_reloc_value(e) && nasm_reloc_value(f)));
+
+ e = yasm_expr_create_tree(e, YASM_EXPR_LAND, f, 0);
}
return e;
}
-static nasm_expr *rexp3(int critical)
+static yasm_expr *rexp3(void)
{
- nasm_expr *e, *f;
- long v;
+ yasm_expr *e, *f;
- e = expr0(critical);
+ e = expr0();
if (!e)
return NULL;
@@ -360,137 +143,106 @@ static nasm_expr *rexp3(int critical)
{
int j = i;
i = scan(scpriv, tokval);
- f = expr0(critical);
- if (!f)
+ f = expr0();
+ if (!f) {
+ yasm_expr_destroy(e);
return NULL;
-
- e = add_vectors (e, scalar_mult(f, -1L, FALSE));
+ }
switch (j)
{
- case TOKEN_EQ: case TOKEN_NE:
- if (nasm_is_unknown(e))
- v = -1; /* means unknown */
- else if (!nasm_is_really_simple(e) || nasm_reloc_value(e) != 0)
- v = (j == TOKEN_NE); /* unequal, so return TRUE if NE */
- else
- v = (j == TOKEN_EQ); /* equal, so return TRUE if EQ */
- break;
- default:
- if (nasm_is_unknown(e))
- v = -1; /* means unknown */
- else if (!nasm_is_really_simple(e)) {
- error(ERR_NONFATAL, "`%s': operands differ by a non-scalar",
- (j == TOKEN_LE ? "<=" : j == TOKEN_LT ? "<" :
- j == TOKEN_GE ? ">=" : ">"));
- v = 0; /* must set it to _something_ */
- } else {
- int vv = nasm_reloc_value(e);
- if (vv == 0)
- v = (j == TOKEN_LE || j == TOKEN_GE);
- else if (vv > 0)
- v = (j == TOKEN_GE || j == TOKEN_GT);
- else /* vv < 0 */
- v = (j == TOKEN_LE || j == TOKEN_LT);
- }
- break;
+ case TOKEN_EQ:
+ e = yasm_expr_create_tree(e, YASM_EXPR_EQ, f, 0);
+ break;
+ case TOKEN_LT:
+ e = yasm_expr_create_tree(e, YASM_EXPR_LT, f, 0);
+ break;
+ case TOKEN_GT:
+ e = yasm_expr_create_tree(e, YASM_EXPR_GT, f, 0);
+ break;
+ case TOKEN_NE:
+ e = yasm_expr_create_tree(e, YASM_EXPR_NE, f, 0);
+ break;
+ case TOKEN_LE:
+ e = yasm_expr_create_tree(e, YASM_EXPR_LE, f, 0);
+ break;
+ case TOKEN_GE:
+ e = yasm_expr_create_tree(e, YASM_EXPR_GE, f, 0);
+ break;
}
-
- if (v == -1)
- e = unknown_expr();
- else
- e = scalarvect(v);
}
return e;
}
-static nasm_expr *expr0(int critical)
+static yasm_expr *expr0(void)
{
- nasm_expr *e, *f;
+ yasm_expr *e, *f;
- e = expr1(critical);
+ e = expr1();
if (!e)
return NULL;
while (i == '|')
{
i = scan(scpriv, tokval);
- f = expr1(critical);
- if (!f)
+ f = expr1();
+ if (!f) {
+ yasm_expr_destroy(e);
return NULL;
- if (!(nasm_is_simple(e) || nasm_is_just_unknown(e)) ||
- !(nasm_is_simple(f) || nasm_is_just_unknown(f)))
- {
- error(ERR_NONFATAL, "`|' operator may only be applied to"
- " scalar values");
}
- if (nasm_is_just_unknown(e) || nasm_is_just_unknown(f))
- e = unknown_expr();
- else
- e = scalarvect (nasm_reloc_value(e) | nasm_reloc_value(f));
+
+ e = yasm_expr_create_tree(e, YASM_EXPR_OR, f, 0);
}
return e;
}
-static nasm_expr *expr1(int critical)
+static yasm_expr *expr1(void)
{
- nasm_expr *e, *f;
+ yasm_expr *e, *f;
- e = expr2(critical);
+ e = expr2();
if (!e)
return NULL;
while (i == '^') {
i = scan(scpriv, tokval);
- f = expr2(critical);
- if (!f)
+ f = expr2();
+ if (!f) {
+ yasm_expr_destroy(e);
return NULL;
- if (!(nasm_is_simple(e) || nasm_is_just_unknown(e)) ||
- !(nasm_is_simple(f) || nasm_is_just_unknown(f)))
- {
- error(ERR_NONFATAL, "`^' operator may only be applied to"
- " scalar values");
}
- if (nasm_is_just_unknown(e) || nasm_is_just_unknown(f))
- e = unknown_expr();
- else
- e = scalarvect (nasm_reloc_value(e) ^ nasm_reloc_value(f));
+
+ e = yasm_expr_create_tree(e, YASM_EXPR_XOR, f, 0);
}
return e;
}
-static nasm_expr *expr2(int critical)
+static yasm_expr *expr2(void)
{
- nasm_expr *e, *f;
+ yasm_expr *e, *f;
- e = expr3(critical);
+ e = expr3();
if (!e)
return NULL;
while (i == '&') {
i = scan(scpriv, tokval);
- f = expr3(critical);
- if (!f)
+ f = expr3();
+ if (!f) {
+ yasm_expr_destroy(e);
return NULL;
- if (!(nasm_is_simple(e) || nasm_is_just_unknown(e)) ||
- !(nasm_is_simple(f) || nasm_is_just_unknown(f)))
- {
- error(ERR_NONFATAL, "`&' operator may only be applied to"
- " scalar values");
}
- if (nasm_is_just_unknown(e) || nasm_is_just_unknown(f))
- e = unknown_expr();
- else
- e = scalarvect (nasm_reloc_value(e) & nasm_reloc_value(f));
+
+ e = yasm_expr_create_tree(e, YASM_EXPR_AND, f, 0);
}
return e;
}
-static nasm_expr *expr3(int critical)
+static yasm_expr *expr3(void)
{
- nasm_expr *e, *f;
+ yasm_expr *e, *f;
- e = expr4(critical);
+ e = expr4();
if (!e)
return NULL;
@@ -498,60 +250,57 @@ static nasm_expr *expr3(int critical)
{
int j = i;
i = scan(scpriv, tokval);
- f = expr4(critical);
- if (!f)
+ f = expr4();
+ if (!f) {
+ yasm_expr_destroy(e);
return NULL;
- if (!(nasm_is_simple(e) || nasm_is_just_unknown(e)) ||
- !(nasm_is_simple(f) || nasm_is_just_unknown(f)))
- {
- error(ERR_NONFATAL, "shift operator may only be applied to"
- " scalar values");
- } else if (nasm_is_just_unknown(e) || nasm_is_just_unknown(f)) {
- e = unknown_expr();
- } else switch (j) {
- case TOKEN_SHL:
- e = scalarvect (nasm_reloc_value(e) << nasm_reloc_value(f));
- break;
- case TOKEN_SHR:
- e = scalarvect ((long)(((unsigned long)nasm_reloc_value(e)) >>
- nasm_reloc_value(f)));
- break;
+ }
+
+ switch (j) {
+ case TOKEN_SHL:
+ e = yasm_expr_create_tree(e, YASM_EXPR_SHL, f, 0);
+ break;
+ case TOKEN_SHR:
+ e = yasm_expr_create_tree(e, YASM_EXPR_SHR, f, 0);
+ break;
}
}
return e;
}
-static nasm_expr *expr4(int critical)
+static yasm_expr *expr4(void)
{
- nasm_expr *e, *f;
+ yasm_expr *e, *f;
- e = expr5(critical);
+ e = expr5();
if (!e)
return NULL;
while (i == '+' || i == '-')
{
int j = i;
i = scan(scpriv, tokval);
- f = expr5(critical);
- if (!f)
+ f = expr5();
+ if (!f) {
+ yasm_expr_destroy(e);
return NULL;
+ }
switch (j) {
case '+':
- e = add_vectors (e, f);
+ e = yasm_expr_create_tree(e, YASM_EXPR_ADD, f, 0);
break;
case '-':
- e = add_vectors (e, scalar_mult(f, -1L, FALSE));
+ e = yasm_expr_create_tree(e, YASM_EXPR_SUB, f, 0);
break;
}
}
return e;
}
-static nasm_expr *expr5(int critical)
+static yasm_expr *expr5(void)
{
- nasm_expr *e, *f;
+ yasm_expr *e, *f;
- e = expr6(critical);
+ e = expr6();
if (!e)
return NULL;
while (i == '*' || i == '/' || i == '%' ||
@@ -559,111 +308,61 @@ static nasm_expr *expr5(int critical)
{
int j = i;
i = scan(scpriv, tokval);
- f = expr6(critical);
- if (!f)
- return NULL;
- if (j != '*' && (!(nasm_is_simple(e) || nasm_is_just_unknown(e)) ||
- !(nasm_is_simple(f) || nasm_is_just_unknown(f))))
- {
- error(ERR_NONFATAL, "division operator may only be applied to"
- " scalar values");
- return NULL;
- }
- if (j != '*' && !nasm_is_unknown(f) && nasm_reloc_value(f) == 0) {
- error(ERR_NONFATAL, "division by zero");
+ f = expr6();
+ if (!f) {
+ yasm_expr_destroy(e);
return NULL;
}
switch (j) {
case '*':
- if (nasm_is_simple(e))
- e = scalar_mult (f, nasm_reloc_value(e), TRUE);
- else if (nasm_is_simple(f))
- e = scalar_mult (e, nasm_reloc_value(f), TRUE);
- else if (nasm_is_just_unknown(e) && nasm_is_just_unknown(f))
- e = unknown_expr();
- else {
- error(ERR_NONFATAL, "unable to multiply two "
- "non-scalar objects");
- return NULL;
- }
+ e = yasm_expr_create_tree(e, YASM_EXPR_MUL, f, 0);
break;
case '/':
- if (nasm_is_just_unknown(e) || nasm_is_just_unknown(f))
- e = unknown_expr();
- else
- e = scalarvect ((long)(((unsigned long)nasm_reloc_value(e)) /
- ((unsigned long)nasm_reloc_value(f))));
+ e = yasm_expr_create_tree(e, YASM_EXPR_DIV, f, 0);
break;
case '%':
- if (nasm_is_just_unknown(e) || nasm_is_just_unknown(f))
- e = unknown_expr();
- else
- e = scalarvect ((long)(((unsigned long)nasm_reloc_value(e)) %
- ((unsigned long)nasm_reloc_value(f))));
+ e = yasm_expr_create_tree(e, YASM_EXPR_MOD, f, 0);
break;
case TOKEN_SDIV:
- if (nasm_is_just_unknown(e) || nasm_is_just_unknown(f))
- e = unknown_expr();
- else
- e = scalarvect (((signed long)nasm_reloc_value(e)) /
- ((signed long)nasm_reloc_value(f)));
+ e = yasm_expr_create_tree(e, YASM_EXPR_SIGNDIV, f, 0);
break;
case TOKEN_SMOD:
- if (nasm_is_just_unknown(e) || nasm_is_just_unknown(f))
- e = unknown_expr();
- else
- e = scalarvect (((signed long)nasm_reloc_value(e)) %
- ((signed long)nasm_reloc_value(f)));
+ e = yasm_expr_create_tree(e, YASM_EXPR_SIGNMOD, f, 0);
break;
}
}
return e;
}
-static nasm_expr *expr6(int critical)
+static yasm_expr *expr6(void)
{
- long type;
- nasm_expr *e;
- long label_seg, label_ofs;
+ yasm_expr *e = NULL;
if (i == '-') {
i = scan(scpriv, tokval);
- e = expr6(critical);
+ e = expr6();
if (!e)
return NULL;
- return scalar_mult (e, -1L, FALSE);
+ return yasm_expr_create_branch(YASM_EXPR_NEG, e, 0);
} else if (i == '+') {
i = scan(scpriv, tokval);
- return expr6(critical);
+ return expr6();
} else if (i == '~') {
i = scan(scpriv, tokval);
- e = expr6(critical);
+ e = expr6();
if (!e)
return NULL;
- if (nasm_is_just_unknown(e))
- return unknown_expr();
- else if (!nasm_is_simple(e)) {
- error(ERR_NONFATAL, "`~' operator may only be applied to"
- " scalar values");
- return NULL;
- }
- return scalarvect(~nasm_reloc_value(e));
+ return yasm_expr_create_branch(YASM_EXPR_NOT, e, 0);
} else if (i == TOKEN_SEG) {
i = scan(scpriv, tokval);
- e = expr6(critical);
- if (!e)
- return NULL;
- e = segment_part(e);
+ e = expr6();
if (!e)
return NULL;
- if (nasm_is_unknown(e) && critical) {
- error(ERR_NONFATAL, "unable to determine segment base");
- return NULL;
- }
+ error(ERR_NONFATAL, "%s not supported", "SEG");
return e;
} else if (i == '(') {
i = scan(scpriv, tokval);
- e = bexpr(critical);
+ e = bexpr();
if (!e)
return NULL;
if (i != ')') {
@@ -673,100 +372,34 @@ static nasm_expr *expr6(int critical)
i = scan(scpriv, tokval);
return e;
}
- else if (i == TOKEN_NUM || i == TOKEN_REG || i == TOKEN_ID ||
+ else if (i == TOKEN_NUM || i == TOKEN_ID ||
i == TOKEN_HERE || i == TOKEN_BASE)
{
- begintemp();
switch (i) {
case TOKEN_NUM:
- addtotemp(EXPR_SIMPLE, tokval->t_integer);
- break;
- case TOKEN_REG:
- addtotemp(tokval->t_integer, 1L);
- if (hint && hint->type == EAH_NOHINT)
- hint->base = tokval->t_integer, hint->type = EAH_MAKEBASE;
+ e = yasm_expr_create_ident(yasm_expr_int(tokval->t_integer), 0);
break;
case TOKEN_ID:
case TOKEN_HERE:
case TOKEN_BASE:
- /*
- * If !location->known, this indicates that no
- * symbol, Here or Base references are valid because we
- * are in preprocess-only mode.
- */
- if (!location || !location->known) {
- error(ERR_NONFATAL,
- "%s not supported",
- (i == TOKEN_ID ? "symbol references" :
- i == TOKEN_HERE ? "`$'" : "`$$'"));
- addtotemp(EXPR_UNKNOWN, 1L);
- break;
- }
-
- type = EXPR_SIMPLE; /* might get overridden by UNKNOWN */
- if (i == TOKEN_BASE)
- {
- label_seg = in_abs_seg ? abs_seg : location->segment;
- label_ofs = 0;
- } else if (i == TOKEN_HERE) {
- label_seg = in_abs_seg ? abs_seg : location->segment;
- label_ofs = in_abs_seg ? abs_offset : location->offset;
- } else {
- if (!labelfunc(tokval->t_charptr,&label_seg,&label_ofs))
- {
- if (critical == 2) {
- error (ERR_NONFATAL, "symbol `%s' undefined",
- tokval->t_charptr);
- return NULL;
- } else if (critical == 1) {
- error (ERR_NONFATAL,
- "symbol `%s' not defined before use",
- tokval->t_charptr);
- return NULL;
- } else {
- if (opflags)
- *opflags |= 1;
- type = EXPR_UNKNOWN;
- label_seg = NO_SEG;
- label_ofs = 1;
- }
- }
-#if 0
- if (opflags && nasm_is_extern (tokval->t_charptr))
- *opflags |= OPFLAG_EXTERN;
-#endif
- }
- addtotemp(type, label_ofs);
- if (label_seg!=NO_SEG)
- addtotemp(EXPR_SEGBASE + label_seg, 1L);
+ error(ERR_NONFATAL, "%s not supported",
+ (i == TOKEN_ID ? "symbol references" :
+ i == TOKEN_HERE ? "`$'" : "`$$'"));
+ e = yasm_expr_create_ident(yasm_expr_int(yasm_intnum_create_int(1)),
+ 0);
break;
}
i = scan(scpriv, tokval);
- return finishtemp();
+ return e;
} else {
error(ERR_NONFATAL, "expression syntax error");
return NULL;
}
}
-void nasm_eval_global_info (struct ofmt *output, lfunc lookup_label, loc_t *locp)
-{
- outfmt = output;
- labelfunc = lookup_label;
- location = locp;
-}
-
-nasm_expr *nasm_evaluate (scanner sc, void *scprivate, struct tokenval *tv,
- int *fwref, int critical, efunc report_error,
- struct eval_hints *hints)
+yasm_expr *nasm_evaluate (scanner sc, void *scprivate, struct tokenval *tv,
+ int critical, efunc report_error)
{
- nasm_expr *e;
- nasm_expr *f = NULL;
-
- hint = hints;
- if (hint)
- hint->type = EAH_NOHINT;
-
if (critical & CRITICAL) {
critical &= ~CRITICAL;
bexpr = rexp0;
@@ -777,52 +410,11 @@ nasm_expr *nasm_evaluate (scanner sc, void *scprivate, struct tokenval *tv,
scpriv = scprivate;
tokval = tv;
error = report_error;
- opflags = fwref;
if (tokval->t_type == TOKEN_INVALID)
i = scan(scpriv, tokval);
else
i = tokval->t_type;
- while (ntempexprs) { /* initialise temporary storage */
- ntempexprs--;
- nasm_free (tempexprs[ntempexprs]);
- }
-
- e = bexpr (critical);
- if (!e)
- return NULL;
-
- if (i == TOKEN_WRT) {
- i = scan(scpriv, tokval); /* eat the WRT */
- f = expr6 (critical);
- if (!f)
- return NULL;
- }
- e = scalar_mult (e, 1L, FALSE); /* strip far-absolute segment part */
- if (f) {
- nasm_expr *g;
- if (nasm_is_just_unknown(f))
- g = unknown_expr();
- else {
- long value;
- begintemp();
- if (!nasm_is_reloc(f)) {
- error(ERR_NONFATAL, "invalid right-hand operand to WRT");
- return NULL;
- }
- value = nasm_reloc_seg(f);
- if (value == NO_SEG)
- value = nasm_reloc_value(f) | SEG_ABS;
- else if (!(value & SEG_ABS) && !(value % 2) && critical)
- {
- error(ERR_NONFATAL, "invalid right-hand operand to WRT");
- return NULL;
- }
- addtotemp(EXPR_WRT, value);
- g = finishtemp();
- }
- e = add_vectors (e, g);
- }
- return e;
+ return bexpr ();
}
diff --git a/modules/preprocs/nasm/nasm-eval.h b/modules/preprocs/nasm/nasm-eval.h
index 92495937..32e3da8b 100644
--- a/modules/preprocs/nasm/nasm-eval.h
+++ b/modules/preprocs/nasm/nasm-eval.h
@@ -10,19 +10,9 @@
#define NASM_EVAL_H
/*
- * Called once to tell the evaluator what output format is
- * providing segment-base details, and what function can be used to
- * look labels up.
- */
-void nasm_eval_global_info (struct ofmt *output, lfunc lookup_label, loc_t *locp);
-
-/*
* The evaluator itself.
*/
-nasm_expr *nasm_evaluate (scanner sc, void *scprivate, struct tokenval *tv,
- int *fwref, int critical, efunc report_error,
- struct eval_hints *hints);
-
-void nasm_eval_cleanup(void);
+yasm_expr *nasm_evaluate (scanner sc, void *scprivate, struct tokenval *tv,
+ int critical, efunc report_error);
#endif
diff --git a/modules/preprocs/nasm/nasm-pp.c b/modules/preprocs/nasm/nasm-pp.c
index 4c219227..81548d6f 100644
--- a/modules/preprocs/nasm/nasm-pp.c
+++ b/modules/preprocs/nasm/nasm-pp.c
@@ -35,6 +35,9 @@
*/
#include <util.h>
#include <libyasm/coretype.h>
+#include <libyasm/intnum.h>
+#include <libyasm/expr.h>
+#include <libyasm/file.h>
#include <stdarg.h>
#include <ctype.h>
#include <limits.h>
@@ -51,7 +54,6 @@ typedef struct Blocks Blocks;
typedef struct Line Line;
typedef struct Include Include;
typedef struct Cond Cond;
-typedef struct IncPath IncPath;
/*
* Store the definition of a single-line macro.
@@ -88,7 +90,7 @@ struct MMacro
MMacro *next;
char *name;
int casesense;
- int nparam_min, nparam_max;
+ long nparam_min, nparam_max;
int plus; /* is the last parameter greedy? */
int nolist; /* is this macro listing-inhibited? */
int in_progress;
@@ -101,7 +103,7 @@ struct MMacro
MMacro *rep_nest; /* used for nesting %rep */
Token **params; /* actual parameters */
Token *iline; /* invocation line */
- int nparam, rotate, *paramlen;
+ long nparam, rotate, *paramlen;
unsigned long unique;
int lineno; /* Current line number on expansion */
};
@@ -195,17 +197,6 @@ struct Include
};
/*
- * Include search path. This is simply a list of strings which get
- * prepended, in turn, to the name of an include file, in an
- * attempt to find the file if it's not in the current directory.
- */
-struct IncPath
-{
- IncPath *next;
- char *path;
-};
-
-/*
* Conditional assembly: we maintain a separate stack of these for
* each level of file inclusion. (The only reason we keep the
* stacks separate is to ensure that a stray `%endif' in a file
@@ -348,7 +339,8 @@ static int LocalOffset = 4;
static Context *cstk;
static Include *istk;
-static IncPath *ipath = NULL;
+static size_t num_ipaths = 0;
+static char **ipaths = NULL;
static FILE *first_fp = NULL;
@@ -425,7 +417,7 @@ static Token *expand_mmac_params(Token * tline);
static Token *expand_smacro(Token * tline);
static Token *expand_id(Token * tline);
static Context *get_ctx(char *name, int all_contexts);
-static void make_tok_num(Token * tok, long val);
+static void make_tok_num(Token * tok, yasm_intnum *val);
static void error(int severity, const char *fmt, ...);
static void *new_Block(size_t size);
static void delete_Blocks(void);
@@ -1286,20 +1278,6 @@ get_ctx(char *name, int all_contexts)
return NULL;
}
-/* Add a slash to the end of a path if it is missing. We use the
- * forward slash to make it compatible with Unix systems.
- */
-static void
-backslash(char *s)
-{
- int pos = strlen(s);
- if (s[pos - 1] != '\\' && s[pos - 1] != '/')
- {
- s[pos] = '/';
- s[pos + 1] = '\0';
- }
-}
-
/*
* Open an include file. This routine must always return a valid
* file pointer if it returns - it's responsible for throwing an
@@ -1308,36 +1286,19 @@ backslash(char *s)
* the end of the path.
*/
static FILE *
-inc_fopen(char *file)
+inc_fopen(char *file, char **newname)
{
FILE *fp;
- const char *prefix = "";
- char *combine;
- IncPath *ip = ipath;
- int len = strlen(file);
+ char *combine = NULL;
- while (1)
- {
- combine = nasm_malloc(strlen(prefix) + 1 + len + 1);
- strcpy(combine, prefix);
- if (prefix[0] != 0)
- backslash(combine);
- strcat(combine, file);
- fp = fopen(combine, "r");
- if (fp)
- nasm_preproc_add_dep(combine);
- else
- nasm_free(combine);
- if (fp)
- return fp;
- if (!ip)
- break;
- prefix = ip->path;
- ip = ip->next;
- }
+ fp = yasm__fopen_include(file, nasm_src_get_fname(), (const char **)ipaths,
+ "r", &combine);
+ if (!fp)
+ error(ERR_FATAL, "unable to open include file `%s'", file);
+ nasm_preproc_add_dep(combine);
- error(ERR_FATAL, "unable to open include file `%s'", file);
- return NULL; /* never reached - placate compilers */
+ *newname = combine;
+ return fp;
}
/*
@@ -1463,7 +1424,8 @@ if_condition(Token * tline, int i)
int j, casesense;
Token *t, *tt, **tptr, *origline;
struct tokenval tokval;
- nasm_expr *evalresult;
+ yasm_expr *evalresult;
+ yasm_intnum *intn;
origline = tline;
@@ -1630,8 +1592,10 @@ if_condition(Token * tline, int i)
}
else
{
+ intn = nasm_readnum(tline->text, &j);
searching.nparam_min = searching.nparam_max =
- nasm_readnum(tline->text, &j);
+ yasm_intnum_get_int(intn);
+ yasm_intnum_destroy(intn);
if (j)
error(ERR_NONFATAL,
"unable to parse parameter count `%s'",
@@ -1648,7 +1612,9 @@ if_condition(Token * tline, int i)
directives[i]);
else
{
- searching.nparam_max = nasm_readnum(tline->text, &j);
+ intn = nasm_readnum(tline->text, &j);
+ searching.nparam_max = yasm_intnum_get_int(intn);
+ yasm_intnum_destroy(intn);
if (j)
error(ERR_NONFATAL,
"unable to parse parameter count `%s'",
@@ -1735,21 +1701,25 @@ if_condition(Token * tline, int i)
t = tline = expand_smacro(tline);
tptr = &t;
tokval.t_type = TOKEN_INVALID;
- evalresult = evaluate(ppscan, tptr, &tokval,
- NULL, pass | CRITICAL, error, NULL);
+ evalresult = evaluate(ppscan, tptr, &tokval, pass | CRITICAL,
+ error);
free_tlist(tline);
if (!evalresult)
return -1;
if (tokval.t_type)
error(ERR_WARNING,
"trailing garbage after expression ignored");
- if (!nasm_is_simple(evalresult))
+ intn = yasm_expr_get_intnum(&evalresult, NULL);
+ if (!intn)
{
error(ERR_NONFATAL,
"non-constant value given to `%s'", directives[i]);
+ yasm_expr_destroy(evalresult);
return -1;
}
- return nasm_reloc_value(evalresult) != 0;
+ j = !yasm_intnum_is_zero(intn);
+ yasm_expr_destroy(evalresult);
+ return j;
default:
error(ERR_FATAL,
@@ -1790,7 +1760,7 @@ do_directive(Token * tline)
{
int i, j, k, m, nparam, nolist;
int offset;
- char *p, *mname;
+ char *p, *mname, *newname;
Include *inc;
Context *ctx;
Cond *cond;
@@ -1799,8 +1769,9 @@ do_directive(Token * tline)
Token *t, *tt, *param_start, *macro_start, *last, **tptr, *origline;
Line *l;
struct tokenval tokval;
- nasm_expr *evalresult;
+ yasm_expr *evalresult;
MMacro *tmp_defining; /* Used when manipulating rep_nest */
+ yasm_intnum *intn;
origline = tline;
@@ -2165,8 +2136,8 @@ do_directive(Token * tline)
inc = nasm_malloc(sizeof(Include));
inc->next = istk;
inc->conds = NULL;
- inc->fp = inc_fopen(p);
- inc->fname = nasm_src_set_fname(p);
+ inc->fp = inc_fopen(p, &newname);
+ inc->fname = nasm_src_set_fname(newname);
inc->lineno = nasm_src_set_linnum(0);
inc->lineinc = 1;
inc->expansion = NULL;
@@ -2382,8 +2353,10 @@ do_directive(Token * tline)
}
else
{
+ intn = nasm_readnum(tline->text, &j);
defining->nparam_min = defining->nparam_max =
- nasm_readnum(tline->text, &j);
+ yasm_intnum_get_int(intn);
+ yasm_intnum_destroy(intn);
if (j)
error(ERR_NONFATAL,
"unable to parse parameter count `%s'",
@@ -2400,7 +2373,9 @@ do_directive(Token * tline)
(i == PP_IMACRO ? "i" : ""));
else
{
- defining->nparam_max = nasm_readnum(tline->text, &j);
+ intn = nasm_readnum(tline->text, &j);
+ defining->nparam_max = yasm_intnum_get_int(intn);
+ yasm_intnum_destroy(intn);
if (j)
error(ERR_NONFATAL,
"unable to parse parameter count `%s'",
@@ -2486,17 +2461,18 @@ do_directive(Token * tline)
tline = t;
tptr = &t;
tokval.t_type = TOKEN_INVALID;
- evalresult =
- evaluate(ppscan, tptr, &tokval, NULL, pass, error, NULL);
+ evalresult = evaluate(ppscan, tptr, &tokval, pass, error);
free_tlist(tline);
if (!evalresult)
return DIRECTIVE_FOUND;
if (tokval.t_type)
error(ERR_WARNING,
"trailing garbage after expression ignored");
- if (!nasm_is_simple(evalresult))
+ intn = yasm_expr_get_intnum(&evalresult, NULL);
+ if (!intn)
{
error(ERR_NONFATAL, "non-constant value given to `%%rotate'");
+ yasm_expr_destroy(evalresult);
return DIRECTIVE_FOUND;
}
mmac = istk->mstk;
@@ -2514,13 +2490,14 @@ do_directive(Token * tline)
}
else
{
- mmac->rotate = mmac->rotate + nasm_reloc_value(evalresult);
+ mmac->rotate = mmac->rotate + yasm_intnum_get_int(intn);
if (mmac->rotate < 0)
mmac->rotate =
mmac->nparam - (-mmac->rotate) % mmac->nparam;
mmac->rotate %= mmac->nparam;
}
+ yasm_expr_destroy(evalresult);
return DIRECTIVE_FOUND;
case PP_REP:
@@ -2543,8 +2520,7 @@ do_directive(Token * tline)
t = expand_smacro(tline);
tptr = &t;
tokval.t_type = TOKEN_INVALID;
- evalresult =
- evaluate(ppscan, tptr, &tokval, NULL, pass, error, NULL);
+ evalresult = evaluate(ppscan, tptr, &tokval, pass, error);
if (!evalresult)
{
free_tlist(origline);
@@ -2553,12 +2529,15 @@ do_directive(Token * tline)
if (tokval.t_type)
error(ERR_WARNING,
"trailing garbage after expression ignored");
- if (!nasm_is_simple(evalresult))
+ intn = yasm_expr_get_intnum(&evalresult, NULL);
+ if (!intn)
{
error(ERR_NONFATAL, "non-constant value given to `%%rep'");
+ yasm_expr_destroy(evalresult);
return DIRECTIVE_FOUND;
}
- i = (int)nasm_reloc_value(evalresult) + 1;
+ i = (int)yasm_intnum_get_int(intn) + 1;
+ yasm_expr_destroy(evalresult);
}
else
{
@@ -2857,7 +2836,8 @@ do_directive(Token * tline)
macro_start = nasm_malloc(sizeof(*macro_start));
macro_start->next = NULL;
- make_tok_num(macro_start, (int)strlen(t->text) - 2);
+ make_tok_num(macro_start,
+ yasm_intnum_create_uint(strlen(t->text) - 2));
macro_start->mac = NULL;
/*
@@ -2937,34 +2917,36 @@ do_directive(Token * tline)
tt = t->next;
tptr = &tt;
tokval.t_type = TOKEN_INVALID;
- evalresult =
- evaluate(ppscan, tptr, &tokval, NULL, pass, error, NULL);
+ evalresult = evaluate(ppscan, tptr, &tokval, pass, error);
if (!evalresult)
{
free_tlist(tline);
free_tlist(origline);
return DIRECTIVE_FOUND;
}
- if (!nasm_is_simple(evalresult))
+ intn = yasm_expr_get_intnum(&evalresult, NULL);
+ if (!intn)
{
error(ERR_NONFATAL, "non-constant value given to `%%substr`");
free_tlist(tline);
free_tlist(origline);
+ yasm_expr_destroy(evalresult);
return DIRECTIVE_FOUND;
}
macro_start = nasm_malloc(sizeof(*macro_start));
macro_start->next = NULL;
macro_start->text = nasm_strdup("'''");
- if (evalresult->value > 0
- && evalresult->value < (int)strlen(t->text) - 1)
+ if (yasm_intnum_sign(intn) == 1
+ && yasm_intnum_get_uint(intn) < strlen(t->text) - 1)
{
- macro_start->text[1] = t->text[evalresult->value];
+ macro_start->text[1] = t->text[yasm_intnum_get_uint(intn)];
}
else
{
macro_start->text[2] = '\0';
}
+ yasm_expr_destroy(evalresult);
macro_start->type = TOK_STRING;
macro_start->mac = NULL;
@@ -3034,8 +3016,7 @@ do_directive(Token * tline)
t = tline;
tptr = &t;
tokval.t_type = TOKEN_INVALID;
- evalresult =
- evaluate(ppscan, tptr, &tokval, NULL, pass, error, NULL);
+ evalresult = evaluate(ppscan, tptr, &tokval, pass, error);
free_tlist(tline);
if (!evalresult)
{
@@ -3047,18 +3028,21 @@ do_directive(Token * tline)
error(ERR_WARNING,
"trailing garbage after expression ignored");
- if (!nasm_is_simple(evalresult))
+ intn = yasm_expr_get_intnum(&evalresult, NULL);
+ if (!intn)
{
error(ERR_NONFATAL,
"non-constant value given to `%%%sassign'",
(i == PP_IASSIGN ? "i" : ""));
free_tlist(origline);
+ yasm_expr_destroy(evalresult);
return DIRECTIVE_FOUND;
}
macro_start = nasm_malloc(sizeof(*macro_start));
macro_start->next = NULL;
- make_tok_num(macro_start, nasm_reloc_value(evalresult));
+ make_tok_num(macro_start, yasm_intnum_copy(intn));
+ yasm_expr_destroy(evalresult);
macro_start->mac = NULL;
/*
@@ -3109,7 +3093,9 @@ do_directive(Token * tline)
free_tlist(origline);
return DIRECTIVE_FOUND;
}
- k = nasm_readnum(tline->text, &j);
+ intn = nasm_readnum(tline->text, &j);
+ k = yasm_intnum_get_int(intn);
+ yasm_intnum_destroy(intn);
m = 1;
tline = tline->next;
if (tok_is_(tline, "+"))
@@ -3121,7 +3107,9 @@ do_directive(Token * tline)
free_tlist(origline);
return DIRECTIVE_FOUND;
}
- m = nasm_readnum(tline->text, &j);
+ intn = nasm_readnum(tline->text, &j);
+ m = yasm_intnum_get_int(intn);
+ yasm_intnum_destroy(intn);
tline = tline->next;
}
skip_white_(tline);
@@ -3228,7 +3216,7 @@ expand_mmac_params(Token * tline)
*/
case '0':
type = TOK_NUMBER;
- sprintf(tmpbuf, "%d", mac->nparam);
+ sprintf(tmpbuf, "%ld", mac->nparam);
text = nasm_strdup(tmpbuf);
break;
case '%':
@@ -3461,7 +3449,7 @@ expand_smacro(Token * tline)
if (!strcmp("__LINE__", m->name))
{
nasm_free(tline->text);
- make_tok_num(tline, nasm_src_get_linnum());
+ make_tok_num(tline, yasm_intnum_create_int(nasm_src_get_linnum()));
continue;
}
tline = delete_Token(tline);
@@ -3942,7 +3930,8 @@ expand_mmacro(Token * tline)
Token **params, *t, *tt;
MMacro *m;
Line *l, *ll;
- int i, nparam, *paramlen;
+ int i, nparam;
+ long *paramlen;
t = tline;
skip_white_(t);
@@ -4139,7 +4128,7 @@ pp_reset(FILE *f, const char *file, int apass, efunc errfunc, evalfunc eval,
istk->mstk = NULL;
istk->fp = f;
istk->fname = NULL;
- nasm_src_set_fname(nasm_strdup(file));
+ nasm_free(nasm_src_set_fname(nasm_strdup(file)));
nasm_src_set_linnum(0);
istk->lineinc = 1;
defining = NULL;
@@ -4438,26 +4427,26 @@ pp_cleanup(int pass_)
}
}
-void
-pp_include_path(const char *path)
+static void
+backslash(char *s)
{
- IncPath *i;
-/* by alexfru: order of path inclusion fixed (was reverse order) */
- i = nasm_malloc(sizeof(IncPath));
- i->path = nasm_strdup(path);
- i->next = NULL;
-
- if (ipath != NULL)
- {
- IncPath *j = ipath;
- while (j->next != NULL)
- j = j->next;
- j->next = i;
- }
- else
+ int pos = strlen(s);
+ if (s[pos - 1] != '\\' && s[pos - 1] != '/')
{
- ipath = i;
+ s[pos] = '/';
+ s[pos + 1] = '\0';
}
+}
+
+void
+pp_include_path(const char *path)
+{
+ num_ipaths++;
+ ipaths = yasm_xrealloc(ipaths, (num_ipaths+1)*sizeof(char *));
+ ipaths[num_ipaths-1] = yasm_xmalloc(strlen(path)+2);
+ strcpy(ipaths[num_ipaths-1], path);
+ backslash(ipaths[num_ipaths-1]);
+ ipaths[num_ipaths] = NULL;
}
void
@@ -4547,11 +4536,9 @@ pp_extra_stdmac(const char **macros)
}
static void
-make_tok_num(Token * tok, long val)
+make_tok_num(Token * tok, yasm_intnum *val)
{
- char numbuf[20];
- sprintf(numbuf, "%ld", val);
- tok->text = nasm_strdup(numbuf);
+ tok->text = yasm_intnum_get_str(val);
tok->type = TOK_NUMBER;
}
diff --git a/modules/preprocs/nasm/nasm-preproc.c b/modules/preprocs/nasm/nasm-preproc.c
index 870b9c13..253aebbb 100644
--- a/modules/preprocs/nasm/nasm-preproc.c
+++ b/modules/preprocs/nasm/nasm-preproc.c
@@ -46,6 +46,7 @@ typedef struct yasm_preproc_nasm {
int lineinc;
} yasm_preproc_nasm;
static yasm_linemap *cur_lm;
+static yasm_errwarns *cur_errwarns;
int tasm_compatible_mode = 0;
typedef struct preproc_dep {
@@ -106,11 +107,10 @@ nasm_efunc(int severity, const char *fmt, ...)
va_start(va, fmt);
switch (severity & ERR_MASK) {
case ERR_WARNING:
- yasm__warning_va(YASM_WARN_PREPROC,
- yasm_linemap_get_current(cur_lm), fmt, va);
+ yasm_warn_set_va(YASM_WARN_PREPROC, fmt, va);
break;
case ERR_NONFATAL:
- yasm__error_va(yasm_linemap_get_current(cur_lm), fmt, va);
+ yasm_error_set_va(YASM_ERROR_GENERAL, fmt, va);
break;
case ERR_FATAL:
yasm_fatal(fmt, va);
@@ -123,10 +123,12 @@ nasm_efunc(int severity, const char *fmt, ...)
break;
}
va_end(va);
+ yasm_errwarn_propagate(cur_errwarns, yasm_linemap_get_current(cur_lm));
}
static yasm_preproc *
-nasm_preproc_create(FILE *f, const char *in_filename, yasm_linemap *lm)
+nasm_preproc_create(FILE *f, const char *in_filename, yasm_linemap *lm,
+ yasm_errwarns *errwarns)
{
yasm_preproc_nasm *preproc_nasm = yasm_xmalloc(sizeof(yasm_preproc_nasm));
@@ -134,6 +136,7 @@ nasm_preproc_create(FILE *f, const char *in_filename, yasm_linemap *lm)
preproc_nasm->in = f;
cur_lm = lm;
+ cur_errwarns = errwarns;
preproc_deps = NULL;
done_dep_preproc = 0;
preproc_nasm->line = NULL;
@@ -149,7 +152,6 @@ static void
nasm_preproc_destroy(yasm_preproc *preproc)
{
nasmpp.cleanup(0);
- nasm_eval_cleanup();
yasm_xfree(preproc);
if (preproc_deps)
yasm_xfree(preproc_deps);
@@ -170,24 +172,28 @@ nasm_preproc_input(yasm_preproc *preproc, char *buf, size_t max_size)
preproc_nasm->linepos = preproc_nasm->line;
preproc_nasm->lineleft = strlen(preproc_nasm->line) + 1;
preproc_nasm->line[preproc_nasm->lineleft-1] = '\n';
- }
- altline = nasm_src_get(&linnum, &preproc_nasm->file_name);
- if (altline) {
- if (altline == 1 && preproc_nasm->lineinc == 1) {
- *buf++ = '\n';
- max_size--;
- tot++;
- } else {
- preproc_nasm->lineinc =
- (altline != -1 || preproc_nasm->lineinc != 1);
- n = sprintf(buf, "%%line %ld+%d %s\n", linnum,
- preproc_nasm->lineinc, preproc_nasm->file_name);
- buf += n;
- max_size -= n;
- tot += n;
+ altline = nasm_src_get(&linnum, &preproc_nasm->file_name);
+ if (altline) {
+ if (altline == 1 && preproc_nasm->lineinc == 1) {
+ *buf++ = '\n';
+ max_size--;
+ tot++;
+ } else {
+ preproc_nasm->lineinc =
+ (altline != -1 || preproc_nasm->lineinc != 1);
+ n = sprintf(buf, "%%line %ld+%d %s\n", linnum,
+ preproc_nasm->lineinc, preproc_nasm->file_name);
+ buf += n;
+ max_size -= n;
+ tot += n;
+ }
+ preproc_nasm->prior_linnum = linnum;
+ }
+ if (preproc_nasm->file_name) {
+ yasm_xfree(preproc_nasm->file_name);
+ preproc_nasm->file_name = NULL;
}
- preproc_nasm->prior_linnum = linnum;
}
n = preproc_nasm->lineleft<max_size?preproc_nasm->lineleft:max_size;
@@ -206,19 +212,17 @@ nasm_preproc_input(yasm_preproc *preproc, char *buf, size_t max_size)
}
void
-nasm_preproc_add_dep(/*@only@*/ char *name)
+nasm_preproc_add_dep(char *name)
{
preproc_dep *dep;
- /* If not processing dependencies, simply free name and return */
- if (!preproc_deps) {
- yasm_xfree(name);
+ /* If not processing dependencies, simply return */
+ if (!preproc_deps)
return;
- }
/* Save in preproc_deps */
dep = yasm_xmalloc(sizeof(preproc_dep));
- dep->name = name;
+ dep->name = yasm__xstrdup(name);
STAILQ_INSERT_TAIL(preproc_deps, dep, link);
}
diff --git a/modules/preprocs/nasm/nasm.h b/modules/preprocs/nasm/nasm.h
index d95eee8a..9a83543a 100644
--- a/modules/preprocs/nasm/nasm.h
+++ b/modules/preprocs/nasm/nasm.h
@@ -21,9 +21,6 @@
#define TRUE 1
#endif
-#define NO_SEG -1L /* null segment value */
-#define SEG_ABS 0x40000000L /* mask for far-absolute segments */
-
#ifndef FILENAME_MAX
#define FILENAME_MAX 256
#endif
@@ -39,21 +36,6 @@
#define IDLEN_MAX 4096
/*
- * Name pollution problems: <time.h> on Digital UNIX pulls in some
- * strange hardware header file which sees fit to define R_SP. We
- * undefine it here so as not to break the enum below.
- */
-#ifdef R_SP
-#undef R_SP
-#endif
-
-/*
- * We must declare the existence of this structure type up here,
- * since we have to reference it before we define it...
- */
-struct ofmt;
-
-/*
* -------------------------
* Error reporting functions
* -------------------------
@@ -102,21 +84,6 @@ typedef void (*efunc) (int severity, const char *fmt, ...);
*/
/*
- * A label-lookup function should look like this.
- */
-typedef int (*lfunc) (char *label, long *segment, long *offset);
-
-/*
- * And a label-definition function like this. The boolean parameter
- * `is_norm' states whether the label is a `normal' label (which
- * should affect the local-label system), or something odder like
- * an EQU or a segment-base symbol, which shouldn't.
- */
-typedef void (*ldfunc) (char *label, long segment, long offset, char *special,
- int is_norm, int isextrn, struct ofmt *ofmt,
- efunc error);
-
-/*
* List-file generators should look like this:
*/
typedef struct {
@@ -186,7 +153,7 @@ typedef struct {
*/
struct tokenval {
int t_type;
- long t_integer, t_inttwo;
+ yasm_intnum *t_integer, *t_inttwo;
char *t_charptr;
};
typedef int (*scanner) (void *private_data, struct tokenval *tv);
@@ -212,48 +179,12 @@ enum { /* token types, other than chars */
TOKEN_FLOAT /* floating-point constant */
};
-typedef struct {
- long segment;
- long offset;
- int known;
-} loc_t;
-
-/*
- * Expression-evaluator datatype. Expressions, within the
- * evaluator, are stored as an array of these beasts, terminated by
- * a record with type==0. Mostly, it's a vector type: each type
- * denotes some kind of a component, and the value denotes the
- * multiple of that component present in the expression. The
- * exception is the WRT type, whose `value' field denotes the
- * segment to which the expression is relative. These segments will
- * be segment-base types, i.e. either odd segment values or SEG_ABS
- * types. So it is still valid to assume that anything with a
- * `value' field of zero is insignificant.
- */
-typedef struct {
- long type; /* a register, or EXPR_xxx */
- long value; /* must be >= 32 bits */
-} nasm_expr;
-
-/*
- * The evaluator can also return hints about which of two registers
- * used in an expression should be the base register. See also the
- * `operand' structure.
- */
-struct eval_hints {
- int base;
- int type;
-};
-
/*
* The actual expression evaluator function looks like this. When
* called, it expects the first token of its expression to already
* be in `*tv'; if it is not, set tv->t_type to TOKEN_INVALID and
* it will start by calling the scanner.
*
- * If a forward reference happens during evaluation, the evaluator
- * must set `*fwref' to TRUE if `fwref' is non-NULL.
- *
* `critical' is non-zero if the expression may not contain forward
* references. The evaluator will report its own error if this
* occurs; if `critical' is 1, the error will be "symbol not
@@ -265,27 +196,10 @@ struct eval_hints {
* syntax is recognised, in which relational operators such as =, <
* and >= are accepted, as well as low-precedence logical operators
* &&, ^^ and ||.
- *
- * If `hints' is non-NULL, it gets filled in with some hints as to
- * the base register in complex effective addresses.
*/
#define CRITICAL 0x100
-typedef nasm_expr *(*evalfunc) (scanner sc, void *scprivate, struct tokenval *tv,
- int *fwref, int critical, efunc error,
- struct eval_hints *hints);
-
-/*
- * Special values for expr->type. ASSUMPTION MADE HERE: the number
- * of distinct register names (i.e. possible "type" fields for an
- * expr structure) does not exceed 124 (EXPR_REG_START through
- * EXPR_REG_END).
- */
-#define EXPR_REG_START 1
-#define EXPR_REG_END 124
-#define EXPR_UNKNOWN 125L /* for forward references */
-#define EXPR_SIMPLE 126L
-#define EXPR_WRT 127L
-#define EXPR_SEGBASE 128L
+typedef yasm_expr *(*evalfunc) (scanner sc, void *scprivate, struct tokenval *tv,
+ int critical, efunc error);
/*
* Preprocessors ought to look like this:
@@ -349,478 +263,6 @@ enum {
};
/*
- * -----------------------------------------------------------
- * Format of the `insn' structure returned from `parser.c' and
- * passed into `assemble.c'
- * -----------------------------------------------------------
- */
-
-/*
- * Here we define the operand types. These are implemented as bit
- * masks, since some are subsets of others; e.g. AX in a MOV
- * instruction is a special operand type, whereas AX in other
- * contexts is just another 16-bit register. (Also, consider CL in
- * shift instructions, DX in OUT, etc.)
- */
-
-/* size, and other attributes, of the operand */
-#define BITS8 0x00000001L
-#define BITS16 0x00000002L
-#define BITS32 0x00000004L
-#define BITS64 0x00000008L /* FPU only */
-#define BITS80 0x00000010L /* FPU only */
-#define FAR 0x00000020L /* grotty: this means 16:16 or */
- /* 16:32, like in CALL/JMP */
-#define NEAR 0x00000040L
-#define SHORT 0x00000080L /* and this means what it says :) */
-
-#define SIZE_MASK 0x000000FFL /* all the size attributes */
-#define NON_SIZE (~SIZE_MASK)
-
-#define TO 0x00000100L /* reverse effect in FADD, FSUB &c */
-#define COLON 0x00000200L /* operand is followed by a colon */
-#define STRICT 0x00000400L /* do not optimize this operand */
-
-/* type of operand: memory reference, register, etc. */
-#define MEMORY 0x00204000L
-#define REGISTER 0x00001000L /* register number in 'basereg' */
-#define IMMEDIATE 0x00002000L
-
-#define REGMEM 0x00200000L /* for r/m, ie EA, operands */
-#define REGNORM 0x00201000L /* 'normal' reg, qualifies as EA */
-#define REG8 0x00201001L
-#define REG16 0x00201002L
-#define REG32 0x00201004L
-#define MMXREG 0x00201008L /* MMX registers */
-#define XMMREG 0x00201010L /* XMM Katmai reg */
-#define FPUREG 0x01000000L /* floating point stack registers */
-#define FPU0 0x01000800L /* FPU stack register zero */
-
-/* special register operands: these may be treated differently */
-#define REG_SMASK 0x00070000L /* a mask for the following */
-#define REG_ACCUM 0x00211000L /* accumulator: AL, AX or EAX */
-#define REG_AL 0x00211001L /* REG_ACCUM | BITSxx */
-#define REG_AX 0x00211002L /* ditto */
-#define REG_EAX 0x00211004L /* and again */
-#define REG_COUNT 0x00221000L /* counter: CL, CX or ECX */
-#define REG_CL 0x00221001L /* REG_COUNT | BITSxx */
-#define REG_CX 0x00221002L /* ditto */
-#define REG_ECX 0x00221004L /* another one */
-#define REG_DL 0x00241001L
-#define REG_DX 0x00241002L
-#define REG_EDX 0x00241004L
-#define REG_SREG 0x00081002L /* any segment register */
-#define REG_CS 0x01081002L /* CS */
-#define REG_DESS 0x02081002L /* DS, ES, SS (non-CS 86 registers) */
-#define REG_FSGS 0x04081002L /* FS, GS (386 extended registers) */
-#define REG_SEG67 0x08081002L /* Non-implemented segment registers */
-#define REG_CDT 0x00101004L /* CRn, DRn and TRn */
-#define REG_CREG 0x08101004L /* CRn */
-#define REG_DREG 0x10101004L /* DRn */
-#define REG_TREG 0x20101004L /* TRn */
-
-/* special type of EA */
-#define MEM_OFFS 0x00604000L /* simple [address] offset */
-
-/* special type of immediate operand */
-#define ONENESS 0x00800000L /* so UNITY == IMMEDIATE | ONENESS */
-#define UNITY 0x00802000L /* for shift/rotate instructions */
-#define BYTENESS 0x40000000L /* so SBYTE == IMMEDIATE | BYTENESS */
-#define SBYTE 0x40002000L /* for op r16/32,immediate instrs. */
-
-
-/* Register names automatically generated from regs.dat */
-/*#include "regs.h"*/
-
-enum { /* condition code names */
- C_A, C_AE, C_B, C_BE, C_C, C_E, C_G, C_GE, C_L, C_LE, C_NA, C_NAE,
- C_NB, C_NBE, C_NC, C_NE, C_NG, C_NGE, C_NL, C_NLE, C_NO, C_NP,
- C_NS, C_NZ, C_O, C_P, C_PE, C_PO, C_S, C_Z
-};
-#if 0
-/*
- * Note that because segment registers may be used as instruction
- * prefixes, we must ensure the enumerations for prefixes and
- * register names do not overlap.
- */
-enum { /* instruction prefixes */
- PREFIX_ENUM_START = REG_ENUM_LIMIT,
- P_A16 = PREFIX_ENUM_START, P_A32, P_LOCK, P_O16, P_O32, P_REP, P_REPE,
- P_REPNE, P_REPNZ, P_REPZ, P_TIMES
-};
-#endif
-enum { /* extended operand types */
- EOT_NOTHING, EOT_DB_STRING, EOT_DB_NUMBER
-};
-
-enum { /* special EA flags */
- EAF_BYTEOFFS = 1, /* force offset part to byte size */
- EAF_WORDOFFS = 2, /* force offset part to [d]word size */
- EAF_TIMESTWO = 4 /* really do EAX*2 not EAX+EAX */
-};
-
-enum { /* values for `hinttype' */
- EAH_NOHINT = 0, /* no hint at all - our discretion */
- EAH_MAKEBASE = 1, /* try to make given reg the base */
- EAH_NOTBASE = 2 /* try _not_ to make reg the base */
-};
-
-typedef struct { /* operand to an instruction */
- long type; /* type of operand */
- int addr_size; /* 0 means default; 16; 32 */
- int basereg, indexreg, scale; /* registers and scale involved */
- int hintbase, hinttype; /* hint as to real base register */
- long segment; /* immediate segment, if needed */
- long offset; /* any immediate number */
- long wrt; /* segment base it's relative to */
- int eaflags; /* special EA flags */
- int opflags; /* see OPFLAG_* defines below */
-} operand;
-
-#define OPFLAG_FORWARD 1 /* operand is a forward reference */
-#define OPFLAG_EXTERN 2 /* operand is an external reference */
-
-typedef struct extop { /* extended operand */
- struct extop *next; /* linked list */
- long type; /* defined above */
- char *stringval; /* if it's a string, then here it is */
- int stringlen; /* ... and here's how long it is */
- long segment; /* if it's a number/address, then... */
- long offset; /* ... it's given here ... */
- long wrt; /* ... and here */
-} extop;
-
-#define MAXPREFIX 4
-
-typedef struct { /* an instruction itself */
- char *label; /* the label defined, or NULL */
- int prefixes[MAXPREFIX]; /* instruction prefixes, if any */
- int nprefix; /* number of entries in above */
- int opcode; /* the opcode - not just the string */
- int condition; /* the condition code, if Jcc/SETcc */
- int operands; /* how many operands? 0-3
- * (more if db et al) */
- operand oprs[3]; /* the operands, defined as above */
- extop *eops; /* extended operands */
- int eops_float; /* true if DD and floating */
- long times; /* repeat count (TIMES prefix) */
- int forw_ref; /* is there a forward reference? */
-} insn;
-
-enum geninfo { GI_SWITCH };
-/*
- * ------------------------------------------------------------
- * The data structure defining an output format driver, and the
- * interfaces to the functions therein.
- * ------------------------------------------------------------
- */
-
-struct ofmt {
- /*
- * This is a short (one-liner) description of the type of
- * output generated by the driver.
- */
- const char *fullname;
-
- /*
- * This is a single keyword used to select the driver.
- */
- const char *shortname;
-
- /*
- * this is reserved for out module specific help.
- * It is set to NULL in all the out modules but is not implemented
- * in the main program
- */
- const char *helpstring;
-
- /*
- * this is a pointer to the first element of the debug information
- */
- struct dfmt **debug_formats;
-
- /*
- * and a pointer to the element that is being used
- * note: this is set to the default at compile time and changed if the
- * -F option is selected. If developing a set of new debug formats for
- * an output format, be sure to set this to whatever default you want
- *
- */
- struct dfmt *current_dfmt;
-
- /*
- * This, if non-NULL, is a NULL-terminated list of `char *'s
- * pointing to extra standard macros supplied by the object
- * format (e.g. a sensible initial default value of __SECT__,
- * and user-level equivalents for any format-specific
- * directives).
- */
- const char **stdmac;
-
- /*
- * This procedure is called at the start of an output session.
- * It tells the output format what file it will be writing to,
- * what routine to report errors through, and how to interface
- * to the label manager and expression evaluator if necessary.
- * It also gives it a chance to do other initialisation.
- */
- void (*init) (FILE *fp, efunc error, ldfunc ldef, evalfunc eval);
-
- /*
- * This procedure is called to pass generic information to the
- * object file. The first parameter gives the information type
- * (currently only command line switches)
- * and the second parameter gives the value. This function returns
- * 1 if recognized, 0 if unrecognized
- */
- int (*setinfo)(enum geninfo type, char **string);
-
- /*
- * This procedure is called by assemble() to write actual
- * generated code or data to the object file. Typically it
- * doesn't have to actually _write_ it, just store it for
- * later.
- *
- * The `type' argument specifies the type of output data, and
- * usually the size as well: its contents are described below.
- */
- void (*output) (long segto, const void *data, unsigned long type,
- long segment, long wrt);
-
- /*
- * This procedure is called once for every symbol defined in
- * the module being assembled. It gives the name and value of
- * the symbol, in NASM's terms, and indicates whether it has
- * been declared to be global. Note that the parameter "name",
- * when passed, will point to a piece of static storage
- * allocated inside the label manager - it's safe to keep using
- * that pointer, because the label manager doesn't clean up
- * until after the output driver has.
- *
- * Values of `is_global' are: 0 means the symbol is local; 1
- * means the symbol is global; 2 means the symbol is common (in
- * which case `offset' holds the _size_ of the variable).
- * Anything else is available for the output driver to use
- * internally.
- *
- * This routine explicitly _is_ allowed to call the label
- * manager to define further symbols, if it wants to, even
- * though it's been called _from_ the label manager. That much
- * re-entrancy is guaranteed in the label manager. However, the
- * label manager will in turn call this routine, so it should
- * be prepared to be re-entrant itself.
- *
- * The `special' parameter contains special information passed
- * through from the command that defined the label: it may have
- * been an EXTERN, a COMMON or a GLOBAL. The distinction should
- * be obvious to the output format from the other parameters.
- */
- void (*symdef) (char *name, long segment, long offset, int is_global,
- char *special);
-
- /*
- * This procedure is called when the source code requests a
- * segment change. It should return the corresponding segment
- * _number_ for the name, or NO_SEG if the name is not a valid
- * segment name.
- *
- * It may also be called with NULL, in which case it is to
- * return the _default_ section number for starting assembly in.
- *
- * It is allowed to modify the string it is given a pointer to.
- *
- * It is also allowed to specify a default instruction size for
- * the segment, by setting `*bits' to 16 or 32. Or, if it
- * doesn't wish to define a default, it can leave `bits' alone.
- */
- long (*section) (char *name, int pass, int *bits);
-
- /*
- * This procedure is called to modify the segment base values
- * returned from the SEG operator. It is given a segment base
- * value (i.e. a segment value with the low bit set), and is
- * required to produce in return a segment value which may be
- * different. It can map segment bases to absolute numbers by
- * means of returning SEG_ABS types.
- *
- * It should return NO_SEG if the segment base cannot be
- * determined; the evaluator (which calls this routine) is
- * responsible for throwing an error condition if that occurs
- * in pass two or in a critical expression.
- */
- long (*segbase) (long segment);
-
- /*
- * This procedure is called to allow the output driver to
- * process its own specific directives. When called, it has the
- * directive word in `directive' and the parameter string in
- * `value'. It is called in both assembly passes, and `pass'
- * will be either 1 or 2.
- *
- * This procedure should return zero if it does not _recognise_
- * the directive, so that the main program can report an error.
- * If it recognises the directive but then has its own errors,
- * it should report them itself and then return non-zero. It
- * should also return non-zero if it correctly processes the
- * directive.
- */
- int (*directive) (char *directive, char *value, int pass);
-
- /*
- * This procedure is called before anything else - even before
- * the "init" routine - and is passed the name of the input
- * file from which this output file is being generated. It
- * should return its preferred name for the output file in
- * `outname', if outname[0] is not '\0', and do nothing to
- * `outname' otherwise. Since it is called before the driver is
- * properly initialised, it has to be passed its error handler
- * separately.
- *
- * This procedure may also take its own copy of the input file
- * name for use in writing the output file: it is _guaranteed_
- * that it will be called before the "init" routine.
- *
- * The parameter `outname' points to an area of storage
- * guaranteed to be at least FILENAME_MAX in size.
- */
- void (*filename) (char *inname, char *outname, efunc error);
-
- /*
- * This procedure is called after assembly finishes, to allow
- * the output driver to clean itself up and free its memory.
- * Typically, it will also be the point at which the object
- * file actually gets _written_.
- *
- * One thing the cleanup routine should always do is to close
- * the output file pointer.
- */
- void (*cleanup) (int debuginfo);
-};
-
-/*
- * values for the `type' parameter to an output function. Each one
- * must have the actual number of _bytes_ added to it.
- *
- * Exceptions are OUT_RELxADR, which denote an x-byte relocation
- * which will be a relative jump. For this we need to know the
- * distance in bytes from the start of the relocated record until
- * the end of the containing instruction. _This_ is what is stored
- * in the size part of the parameter, in this case.
- *
- * Also OUT_RESERVE denotes reservation of N bytes of BSS space,
- * and the contents of the "data" parameter is irrelevant.
- *
- * The "data" parameter for the output function points to a "long",
- * containing the address in question, unless the type is
- * OUT_RAWDATA, in which case it points to an "unsigned char"
- * array.
- */
-#define OUT_RAWDATA 0x00000000UL
-#define OUT_ADDRESS 0x10000000UL
-#define OUT_REL2ADR 0x20000000UL
-#define OUT_REL4ADR 0x30000000UL
-#define OUT_RESERVE 0x40000000UL
-#define OUT_TYPMASK 0xF0000000UL
-#define OUT_SIZMASK 0x0FFFFFFFUL
-
-/*
- * ------------------------------------------------------------
- * The data structure defining a debug format driver, and the
- * interfaces to the functions therein.
- * ------------------------------------------------------------
- */
-
-struct dfmt {
-
- /*
- * This is a short (one-liner) description of the type of
- * output generated by the driver.
- */
- const char *fullname;
-
- /*
- * This is a single keyword used to select the driver.
- */
- const char *shortname;
-
-
- /*
- * init - called initially to set up local pointer to object format,
- * void pointer to implementation defined data, file pointer (which
- * probably won't be used, but who knows?), and error function.
- */
- void (*init) (struct ofmt * of, void * id, FILE * fp, efunc error);
-
- /*
- * linenum - called any time there is output with a change of
- * line number or file.
- */
- void (*linenum) (const char * filename, long linenumber, long segto);
-
- /*
- * debug_deflabel - called whenever a label is defined. Parameters
- * are the same as to 'symdef()' in the output format. This function
- * would be called before the output format version.
- */
-
- void (*debug_deflabel) (char * name, long segment, long offset,
- int is_global, char * special);
- /*
- * debug_directive - called whenever a DEBUG directive other than 'LINE'
- * is encountered. 'directive' contains the first parameter to the
- * DEBUG directive, and params contains the rest. For example,
- * 'DEBUG VAR _somevar:int' would translate to a call to this
- * function with 'directive' equal to "VAR" and 'params' equal to
- * "_somevar:int".
- */
- void (*debug_directive) (const char * directive, const char * params);
-
- /*
- * typevalue - called whenever the assembler wishes to register a type
- * for the last defined label. This routine MUST detect if a type was
- * already registered and not re-register it.
- */
- void (*debug_typevalue) (long type);
-
- /*
- * debug_output - called whenever output is required
- * 'type' is the type of info required, and this is format-specific
- */
- void (*debug_output) (int type, void *param);
-
- /*
- * cleanup - called after processing of file is complete
- */
- void (*cleanup) (void);
-
-};
-/*
- * The type definition macros
- * for debugging
- *
- * low 3 bits: reserved
- * next 5 bits: type
- * next 24 bits: number of elements for arrays (0 for labels)
- */
-
-#define TY_UNKNOWN 0x00
-#define TY_LABEL 0x08
-#define TY_BYTE 0x10
-#define TY_WORD 0x18
-#define TY_DWORD 0x20
-#define TY_FLOAT 0x28
-#define TY_QWORD 0x30
-#define TY_TBYTE 0x38
-#define TY_COMMON 0xE0
-#define TY_SEG 0xE8
-#define TY_EXTERN 0xF0
-#define TY_EQU 0xF8
-
-#define TYM_TYPE(x) ((x) & 0xF8)
-#define TYM_ELEMENTS(x) (((x) & 0xFFFFFF00) >> 8)
-
-#define TYS_ELEMENTS(x) ((x) << 8)
-/*
* -----
* Other
* -----
@@ -835,15 +277,4 @@ struct dfmt {
extern int tasm_compatible_mode;
-/*
- * This declaration passes the "pass" number to all other modules
- * "pass0" assumes the values: 0, 0, ..., 0, 1, 2
- * where 0 = optimizing pass
- * 1 = pass 1
- * 2 = pass 2
- */
-
-extern int pass0; /* this is globally known */
-extern int optimizing;
-
#endif
diff --git a/modules/preprocs/nasm/nasmlib.c b/modules/preprocs/nasm/nasmlib.c
index 3d735117..5d9ae4d6 100644
--- a/modules/preprocs/nasm/nasmlib.c
+++ b/modules/preprocs/nasm/nasmlib.c
@@ -7,6 +7,7 @@
*/
#include <util.h>
#include <libyasm/coretype.h>
+#include <libyasm/intnum.h>
#include <ctype.h>
#include "nasm.h"
@@ -16,14 +17,14 @@
#define lib_isnumchar(c) ( isalnum(c) || (c) == '$')
#define numvalue(c) ((c)>='a' ? (c)-'a'+10 : (c)>='A' ? (c)-'A'+10 : (c)-'0')
-long nasm_readnum (char *str, int *error)
+yasm_intnum *nasm_readnum (char *str, int *error)
{
- char *r = str, *q;
+ char *r = str, *q, *p;
long radix;
- unsigned long result, checklimit;
- int digit, last;
- int warn = FALSE;
- int sign = 1;
+ yasm_intnum *intn;
+ char save;
+ int digit;
+ int sign = 0;
*error = FALSE;
@@ -36,7 +37,7 @@ long nasm_readnum (char *str, int *error)
if (*r == '-')
{
r++;
- sign = -1;
+ sign = 1;
}
q = r;
@@ -69,237 +70,61 @@ long nasm_readnum (char *str, int *error)
*/
if (r >= q) {
*error = TRUE;
- return 0;
+ return yasm_intnum_create_uint(0);
}
- /*
- * `checklimit' must be 2**32 / radix. We can't do that in
- * 32-bit arithmetic, which we're (probably) using, so we
- * cheat: since we know that all radices we use are even, we
- * can divide 2**31 by radix/2 instead.
- */
- checklimit = 0x80000000UL / (radix>>1);
-
- /*
- * Calculate the highest allowable value for the last digit
- * of a 32 bit constant... in radix 10, it is 6, otherwise it is 0
- */
- last = (radix == 10 ? 6 : 0);
-
- result = 0;
- while (*r && r < q) {
- if (*r<'0' || (*r>'9' && *r<'A') || (digit = numvalue(*r)) >= radix)
+ /* Check for valid number of that radix */
+ p = r;
+ while (*p && p < q) {
+ if (*p<'0' || (*p>'9' && *p<'A') || (digit = numvalue(*p)) >= radix)
{
*error = TRUE;
- return 0;
- }
- if (result > checklimit ||
- (result == checklimit && digit >= last))
- {
- warn = TRUE;
- }
-
- result = radix * result + digit;
- r++;
- }
-#if 0
- if (warn)
- nasm_malloc_error (ERR_WARNING | ERR_PASS1 | ERR_WARN_NOV,
- "numeric constant %s does not fit in 32 bits",
- str);
-#endif
- return result*sign;
-}
-
-long nasm_readstrnum (char *str, int length, int *warn)
-{
- long charconst = 0;
- int i;
-
- *warn = FALSE;
-
- str += length;
- for (i=0; i<length; i++) {
- if (charconst & 0xff000000UL) {
- *warn = TRUE;
+ return yasm_intnum_create_uint(0);
}
- charconst = (charconst<<8) + (unsigned char) *--str;
+ p++;
}
- return charconst;
-}
-
-static long next_seg;
-
-void nasm_seg_init(void)
-{
- next_seg = 0;
-}
-
-long nasm_seg_alloc(void)
-{
- return (next_seg += 2) - 2;
-}
-
-/*
- * Return TRUE if the argument is a simple scalar. (Or a far-
- * absolute, which counts.)
- */
-int nasm_is_simple (nasm_expr *vect)
-{
- while (vect->type && !vect->value)
- vect++;
- if (!vect->type)
- return 1;
- if (vect->type != EXPR_SIMPLE)
- return 0;
- do {
- vect++;
- } while (vect->type && !vect->value);
- if (vect->type && vect->type < EXPR_SEGBASE+SEG_ABS) return 0;
- return 1;
-}
-/*
- * Return TRUE if the argument is a simple scalar, _NOT_ a far-
- * absolute.
- */
-int nasm_is_really_simple (nasm_expr *vect)
-{
- while (vect->type && !vect->value)
- vect++;
- if (!vect->type)
- return 1;
- if (vect->type != EXPR_SIMPLE)
- return 0;
- do {
- vect++;
- } while (vect->type && !vect->value);
- if (vect->type) return 0;
- return 1;
-}
-
-/*
- * Return TRUE if the argument is relocatable (i.e. a simple
- * scalar, plus at most one segment-base, plus possibly a WRT).
- */
-int nasm_is_reloc (nasm_expr *vect)
-{
- while (vect->type && !vect->value) /* skip initial value-0 terms */
- vect++;
- if (!vect->type) /* trivially return TRUE if nothing */
- return 1; /* is present apart from value-0s */
- if (vect->type < EXPR_SIMPLE) /* FALSE if a register is present */
- return 0;
- if (vect->type == EXPR_SIMPLE) { /* skip over a pure number term... */
- do {
- vect++;
- } while (vect->type && !vect->value);
- if (!vect->type) /* ...returning TRUE if that's all */
- return 1;
- }
- if (vect->type == EXPR_WRT) { /* skip over a WRT term... */
- do {
- vect++;
- } while (vect->type && !vect->value);
- if (!vect->type) /* ...returning TRUE if that's all */
- return 1;
+ /* Use intnum to actually do the conversion */
+ save = *q;
+ *q = '\0';
+ switch (radix) {
+ case 2:
+ intn = yasm_intnum_create_bin(r);
+ break;
+ case 8:
+ intn = yasm_intnum_create_oct(r);
+ break;
+ case 10:
+ intn = yasm_intnum_create_dec(r);
+ break;
+ case 16:
+ intn = yasm_intnum_create_hex(r);
+ break;
+ default:
+ *error = TRUE;
+ intn = yasm_intnum_create_uint(0);
+ break;
}
- if (vect->value != 0 && vect->value != 1)
- return 0; /* segment base multiplier non-unity */
- do { /* skip over _one_ seg-base term... */
- vect++;
- } while (vect->type && !vect->value);
- if (!vect->type) /* ...returning TRUE if that's all */
- return 1;
- return 0; /* And return FALSE if there's more */
-}
-
-/*
- * Return TRUE if the argument contains an `unknown' part.
- */
-int nasm_is_unknown(nasm_expr *vect)
-{
- while (vect->type && vect->type < EXPR_UNKNOWN)
- vect++;
- return (vect->type == EXPR_UNKNOWN);
-}
+ *q = save;
-/*
- * Return TRUE if the argument contains nothing but an `unknown'
- * part.
- */
-int nasm_is_just_unknown(nasm_expr *vect)
-{
- while (vect->type && !vect->value)
- vect++;
- return (vect->type == EXPR_UNKNOWN);
+ if (sign)
+ yasm_intnum_calc(intn, YASM_EXPR_NEG, NULL);
+ return intn;
}
-/*
- * Return the scalar part of a relocatable vector. (Including
- * simple scalar vectors - those qualify as relocatable.)
- */
-long nasm_reloc_value (nasm_expr *vect)
+yasm_intnum *nasm_readstrnum (char *str, int length, int *warn)
{
- while (vect->type && !vect->value)
- vect++;
- if (!vect->type) return 0;
- if (vect->type == EXPR_SIMPLE)
- return vect->value;
- else
- return 0;
-}
+ char save;
+ yasm_intnum *intn;
-/*
- * Return the segment number of a relocatable vector, or NO_SEG for
- * simple scalars.
- */
-long nasm_reloc_seg (nasm_expr *vect)
-{
- while (vect->type && (vect->type == EXPR_WRT || !vect->value))
- vect++;
- if (vect->type == EXPR_SIMPLE) {
- do {
- vect++;
- } while (vect->type && (vect->type == EXPR_WRT || !vect->value));
- }
- if (!vect->type)
- return NO_SEG;
- else
- return vect->type - EXPR_SEGBASE;
-}
+ *warn = FALSE;
-/*
- * Return the WRT segment number of a relocatable vector, or NO_SEG
- * if no WRT part is present.
- */
-long nasm_reloc_wrt (nasm_expr *vect)
-{
- while (vect->type && vect->type < EXPR_WRT)
- vect++;
- if (vect->type == EXPR_WRT) {
- return vect->value;
- } else
- return NO_SEG;
-}
+ save = str[length];
+ str[length] = '\0';
+ intn = yasm_intnum_create_charconst_nasm(str);
+ str[length] = save;
-/*
- * Binary search.
- */
-int nasm_bsi (char *string, const char **array, int size)
-{
- int i = -1, j = size; /* always, i < index < j */
- while (j-i >= 2) {
- int k = (i+j)/2;
- int l = strcmp(string, array[k]);
- if (l<0) /* it's in the first half */
- j = k;
- else if (l>0) /* it's in the second half */
- i = k;
- else /* we've got it :) */
- return k;
- }
- return -1; /* we haven't got it :( */
+ return intn;
}
static char *file_name = NULL;
@@ -312,6 +137,11 @@ char *nasm_src_set_fname(char *newname)
return oldname;
}
+char *nasm_src_get_fname(void)
+{
+ return file_name;
+}
+
long nasm_src_set_linnum(long newline)
{
long oldline = line_number;
@@ -360,7 +190,7 @@ void nasm_quote(char **str)
*str = p;
}
-char *nasm_strcat(char *one, char *two)
+char *nasm_strcat(const char *one, const char *two)
{
char *rslt;
int l1=strlen(one);
diff --git a/modules/preprocs/nasm/nasmlib.h b/modules/preprocs/nasm/nasmlib.h
index 9acfe68b..37538f40 100644
--- a/modules/preprocs/nasm/nasmlib.h
+++ b/modules/preprocs/nasm/nasmlib.h
@@ -32,7 +32,7 @@
* Convert a string into a number, using NASM number rules. Sets
* `*error' to TRUE if an error occurs, and FALSE otherwise.
*/
-long nasm_readnum(char *str, int *error);
+yasm_intnum *nasm_readnum(char *str, int *error);
/*
* Convert a character constant into a number. Sets
@@ -40,38 +40,10 @@ long nasm_readnum(char *str, int *error);
* str points to and length covers the middle of the string,
* without the quotes.
*/
-long nasm_readstrnum(char *str, int length, int *warn);
-
-/*
- * seg_init: Initialise the segment-number allocator.
- * seg_alloc: allocate a hitherto unused segment number.
- */
-void nasm_seg_init(void);
-long nasm_seg_alloc(void);
-
-#ifdef YASM_NASM_H
-/*
- * Library routines to manipulate expression data types.
- */
-int nasm_is_reloc(nasm_expr *);
-int nasm_is_simple(nasm_expr *);
-int nasm_is_really_simple (nasm_expr *);
-int nasm_is_unknown(nasm_expr *);
-int nasm_is_just_unknown(nasm_expr *);
-long nasm_reloc_value(nasm_expr *);
-long nasm_reloc_seg(nasm_expr *);
-long nasm_reloc_wrt(nasm_expr *);
-#endif
-
-/*
- * Binary search routine. Returns index into `array' of an entry
- * matching `string', or <0 if no match. `array' is taken to
- * contain `size' elements.
- */
-int nasm_bsi (char *string, const char **array, int size);
-
+yasm_intnum *nasm_readstrnum(char *str, int length, int *warn);
char *nasm_src_set_fname(char *newname);
+char *nasm_src_get_fname(void);
long nasm_src_set_linnum(long newline);
long nasm_src_get_linnum(void);
/*
@@ -83,6 +55,6 @@ long nasm_src_get_linnum(void);
int nasm_src_get(long *xline, char **xname);
void nasm_quote(char **str);
-char *nasm_strcat(char *one, char *two);
+char *nasm_strcat(const char *one, const char *two);
#endif
diff --git a/modules/preprocs/nasm/standard.mac b/modules/preprocs/nasm/standard.mac
index 5afcfaf1..85170cb2 100644
--- a/modules/preprocs/nasm/standard.mac
+++ b/modules/preprocs/nasm/standard.mac
@@ -65,7 +65,11 @@ __SECT__
%endmacro
%imacro align 1-2+.nolist nop
+%ifidni %2,nop
+ [align %1]
+%else
times ($$-$) & ((%1)-1) %2
+%endif
%endmacro
%imacro alignb 1-2+.nolist resb 1
times ($$-$) & ((%1)-1) %2
@@ -125,6 +129,12 @@ __SECT__
%endmacro
%endif
+%ifidn __YASM_OBJFMT__,x64
+%imacro export 1+.nolist
+[export %1]
+%endmacro
+%endif
+
%ifidn __YASM_OBJFMT__,elf
%imacro type 1+.nolist
[type %1]
diff --git a/modules/preprocs/nasm/tests/Makefile.inc b/modules/preprocs/nasm/tests/Makefile.inc
index 986b5710..2dd9d02d 100644
--- a/modules/preprocs/nasm/tests/Makefile.inc
+++ b/modules/preprocs/nasm/tests/Makefile.inc
@@ -5,8 +5,14 @@ TESTS += modules/preprocs/nasm/tests/nasmpp_test.sh
EXTRA_DIST += modules/preprocs/nasm/tests/nasmpp_test.sh
EXTRA_DIST += modules/preprocs/nasm/tests/ifcritical-err.asm
EXTRA_DIST += modules/preprocs/nasm/tests/ifcritical-err.errwarn
+EXTRA_DIST += modules/preprocs/nasm/tests/longline.asm
+EXTRA_DIST += modules/preprocs/nasm/tests/longline.errwarn
+EXTRA_DIST += modules/preprocs/nasm/tests/longline.hex
EXTRA_DIST += modules/preprocs/nasm/tests/noinclude-err.asm
EXTRA_DIST += modules/preprocs/nasm/tests/noinclude-err.errwarn
+EXTRA_DIST += modules/preprocs/nasm/tests/nasmpp-bigint.asm
+EXTRA_DIST += modules/preprocs/nasm/tests/nasmpp-bigint.errwarn
+EXTRA_DIST += modules/preprocs/nasm/tests/nasmpp-bigint.hex
EXTRA_DIST += modules/preprocs/nasm/tests/orgsect.asm
EXTRA_DIST += modules/preprocs/nasm/tests/orgsect.errwarn
EXTRA_DIST += modules/preprocs/nasm/tests/orgsect.hex
diff --git a/modules/preprocs/nasm/tests/ifcritical-err.errwarn b/modules/preprocs/nasm/tests/ifcritical-err.errwarn
index 7cc7b039..7cc27b44 100644
--- a/modules/preprocs/nasm/tests/ifcritical-err.errwarn
+++ b/modules/preprocs/nasm/tests/ifcritical-err.errwarn
@@ -1,2 +1 @@
-:4: symbol references not supported
--:4: non-constant value given to `%if'
diff --git a/modules/preprocs/nasm/tests/longline.asm b/modules/preprocs/nasm/tests/longline.asm
new file mode 100644
index 00000000..212a30b7
--- /dev/null
+++ b/modules/preprocs/nasm/tests/longline.asm
@@ -0,0 +1,2 @@
+ db (((0x52<<3)^(((0x52>>5)&1)*0x11b)^(((0x52>>5)&2)*0x11b)^(((0x52>>5)&4)*0x11b)) ^ ((0x52<<2)^(((0x52>>6)&1)*0x11b)^(((0x52>>6)&2)*0x11b)) ^ ((0x52<<1)^(((0x52>>7)&1)*0x11b))), (((0x52<<3)^(((0x52>>5)&1)*0x11b)^(((0x52>>5)&2)*0x11b)^(((0x52>>5)&4)*0x11b)) ^ 0x52), (((0x52<<3)^(((0x52>>5)&1)*0x11b)^(((0x52>>5)&2)*0x11b)^(((0x52>>5)&4)*0x11b)) ^ ((0x52<<2)^(((0x52>>6)&1)*0x11b)^(((0x52>>6)&2)*0x11b)) ^ 0x52), (((0x52<<3)^(((0x52>>5)&1)*0x11b)^(((0x52>>5)&2)*0x11b)^(((0x52>>5)&4)*0x11b)) ^ ((0x52<<1)^(((0x52>>7)&1)*0x11b)) ^ 0x52), (((0x52<<3)^(((0x52>>5)&1)*0x11b)^(((0x52>>5)&2)*0x11b)^(((0x52>>5)&4)*0x11b)) ^ ((0x52<<2)^(((0x52>>6)&1)*0x11b)^(((0x52>>6)&2)*0x11b)) ^ ((0x52<<1)^(((0x52>>7)&1)*0x11b))), (((0x52<<3)^(((0x52>>5)&1)*0x11b)^(((0x52>>5)&2)*0x11b)^(((0x52>>5)&4)*0x11b)) ^ 0x52), (((0x52<<3)^(((0x52>>5)&1)*0x11b)^(((0x52>>5)&2)*0x11b)^(((0x52>>5)&4)*0x11b)) ^ ((0x52<<2)^(((0x52>>6)&1)*0x11b)^(((0x52>>6)&2)*0x11b)) ^ 0x52), (((0x52<<3)^(((0x52>>5)&1)*0x11b)^(((0x52>>5)&2)*0x11b)^(((0x52>>5)&4)*0x11b)) ^ ((0x52<<1)^(((0x52>>7)&1)*0x11b)) ^ 0x52),(((0x09<<3)^(((0x09>>5)&1)*0x11b)^(((0x09>>5)&2)*0x11b)^(((0x09>>5)&4)*0x11b)) ^ ((0x09<<2)^(((0x09>>6)&1)*0x11b)^(((0x09>>6)&2)*0x11b)) ^ ((0x09<<1)^(((0x09>>7)&1)*0x11b))), (((0x09<<3)^(((0x09>>5)&1)*0x11b)^(((0x09>>5)&2)*0x11b)^(((0x09>>5)&4)*0x11b)) ^ 0x09), (((0x09<<3)^(((0x09>>5)&1)*0x11b)^(((0x09>>5)&2)*0x11b)^(((0x09>>5)&4)*0x11b)) ^ ((0x09<<2)^(((0x09>>6)&1)*0x11b)^(((0x09>>6)&2)*0x11b)) ^ 0x09), (((0x09<<3)^(((0x09>>5)&1)*0x11b)^(((0x09>>5)&2)*0x11b)^(((0x09>>5)&4)*0x11b)) ^ ((0x09<<1)^(((0x09>>7)&1)*0x11b)) ^ 0x09), (((0x09<<3)^(((0x09>>5)&1)*0x11b)^(((0x09>>5)&2)*0x11b)^(((0x09>>5)&4)*0x11b)) ^ ((0x09<<2)^(((0x09>>6)&1)*0x11b)^(((0x09>>6)&2)*0x11b)) ^ ((0x09<<1)^(((0x09>>7)&1)*0x11b))), (((0x09<<3)^(((0x09>>5)&1)*0x11b)^(((0x09>>5)&2)*0x11b)^(((0x09>>5)&4)*0x11b)) ^ 0x09), (((0x09<<3)^(((0x09>>5)&1)*0x11b)^(((0x09>>5)&2)*0x11b)^(((0x09>>5)&4)*0x11b)) ^ ((0x09<<2)^(((0x09>>6)&1)*0x11b)^(((0x09>>6)&2)*0x11b)) ^ 0x09), (((0x09<<3)^(((0x09>>5)&1)*0x11b)^(((0x09>>5)&2)*0x11b)^(((0x09>>5)&4)*0x11b)) ^ ((0x09<<1)^(((0x09>>7)&1)*0x11b)) ^ 0x09),(((0x6a<<3)^(((0x6a>>5)&1)*0x11b)^(((0x6a>>5)&2)*0x11b)^(((0x6a>>5)&4)*0x11b)) ^ ((0x6a<<2)^(((0x6a>>6)&1)*0x11b)^(((0x6a>>6)&2)*0x11b)) ^ ((0x6a<<1)^(((0x6a>>7)&1)*0x11b))), (((0x6a<<3)^(((0x6a>>5)&1)*0x11b)^(((0x6a>>5)&2)*0x11b)^(((0x6a>>5)&4)*0x11b)) ^ 0x6a), (((0x6a<<3)^(((0x6a>>5)&1)*0x11b)^(((0x6a>>5)&2)*0x11b)^(((0x6a>>5)&4)*0x11b)) ^ ((0x6a<<2)^(((0x6a>>6)&1)*0x11b)^(((0x6a>>6)&2)*0x11b)) ^ 0x6a), (((0x6a<<3)^(((0x6a>>5)&1)*0x11b)^(((0x6a>>5)&2)*0x11b)^(((0x6a>>5)&4)*0x11b)) ^ ((0x6a<<1)^(((0x6a>>7)&1)*0x11b)) ^ 0x6a), (((0x6a<<3)^(((0x6a>>5)&1)*0x11b)^(((0x6a>>5)&2)*0x11b)^(((0x6a>>5)&4)*0x11b)) ^ ((0x6a<<2)^(((0x6a>>6)&1)*0x11b)^(((0x6a>>6)&2)*0x11b)) ^ ((0x6a<<1)^(((0x6a>>7)&1)*0x11b))), (((0x6a<<3)^(((0x6a>>5)&1)*0x11b)^(((0x6a>>5)&2)*0x11b)^(((0x6a>>5)&4)*0x11b)) ^ 0x6a), (((0x6a<<3)^(((0x6a>>5)&1)*0x11b)^(((0x6a>>5)&2)*0x11b)^(((0x6a>>5)&4)*0x11b)) ^ ((0x6a<<2)^(((0x6a>>6)&1)*0x11b)^(((0x6a>>6)&2)*0x11b)) ^ 0x6a), (((0x6a<<3)^(((0x6a>>5)&1)*0x11b)^(((0x6a>>5)&2)*0x11b)^(((0x6a>>5)&4)*0x11b)) ^ ((0x6a<<1)^(((0x6a>>7)&1)*0x11b)) ^ 0x6a),(((0xd5<<3)^(((0xd5>>5)&1)*0x11b)^(((0xd5>>5)&2)*0x11b)^(((0xd5>>5)&4)*0x11b)) ^ ((0xd5<<2)^(((0xd5>>6)&1)*0x11b)^(((0xd5>>6)&2)*0x11b)) ^ ((0xd5<<1)^(((0xd5>>7)&1)*0x11b))), (((0xd5<<3)^(((0xd5>>5)&1)*0x11b)^(((0xd5>>5)&2)*0x11b)^(((0xd5>>5)&4)*0x11b)) ^ 0xd5), (((0xd5<<3)^(((0xd5>>5)&1)*0x11b)^(((0xd5>>5)&2)*0x11b)^(((0xd5>>5)&4)*0x11b)) ^ ((0xd5<<2)^(((0xd5>>6)&1)*0x11b)^(((0xd5>>6)&2)*0x11b)) ^ 0xd5), (((0xd5<<3)^(((0xd5>>5)&1)*0x11b)^(((0xd5>>5)&2)*0x11b)^(((0xd5>>5)&4)*0x11b)) ^ ((0xd5<<1)^(((0xd5>>7)&1)*0x11b)) ^ 0xd5), (((0xd5<<3)^(((0xd5>>5)&1)*0x11b)^(((0xd5>>5)&2)*0x11b)^(((0xd5>>5)&4)*0x11b)) ^ ((0xd5<<2)^(((0xd5>>6)&1)*0x11b)^(((0xd5>>6)&2)*0x11b)) ^ ((0xd5<<1)^(((0xd5>>7)&1)*0x11b))), (((0xd5<<3)^(((0xd5>>5)&1)*0x11b)^(((0xd5>>5)&2)*0x11b)^(((0xd5>>5)&4)*0x11b)) ^ 0xd5), (((0xd5<<3)^(((0xd5>>5)&1)*0x11b)^(((0xd5>>5)&2)*0x11b)^(((0xd5>>5)&4)*0x11b)) ^ ((0xd5<<2)^(((0xd5>>6)&1)*0x11b)^(((0xd5>>6)&2)*0x11b)) ^ 0xd5), (((0xd5<<3)^(((0xd5>>5)&1)*0x11b)^(((0xd5>>5)&2)*0x11b)^(((0xd5>>5)&4)*0x11b)) ^ ((0xd5<<1)^(((0xd5>>7)&1)*0x11b)) ^ 0xd5),(((0x30<<3)^(((0x30>>5)&1)*0x11b)^(((0x30>>5)&2)*0x11b)^(((0x30>>5)&4)*0x11b)) ^ ((0x30<<2)^(((0x30>>6)&1)*0x11b)^(((0x30>>6)&2)*0x11b)) ^ ((0x30<<1)^(((0x30>>7)&1)*0x11b))), (((0x30<<3)^(((0x30>>5)&1)*0x11b)^(((0x30>>5)&2)*0x11b)^(((0x30>>5)&4)*0x11b)) ^ 0x30), (((0x30<<3)^(((0x30>>5)&1)*0x11b)^(((0x30>>5)&2)*0x11b)^(((0x30>>5)&4)*0x11b)) ^ ((0x30<<2)^(((0x30>>6)&1)*0x11b)^(((0x30>>6)&2)*0x11b)) ^ 0x30), (((0x30<<3)^(((0x30>>5)&1)*0x11b)^(((0x30>>5)&2)*0x11b)^(((0x30>>5)&4)*0x11b)) ^ ((0x30<<1)^(((0x30>>7)&1)*0x11b)) ^ 0x30), (((0x30<<3)^(((0x30>>5)&1)*0x11b)^(((0x30>>5)&2)*0x11b)^(((0x30>>5)&4)*0x11b)) ^ ((0x30<<2)^(((0x30>>6)&1)*0x11b)^(((0x30>>6)&2)*0x11b)) ^ ((0x30<<1)^(((0x30>>7)&1)*0x11b))), (((0x30<<3)^(((0x30>>5)&1)*0x11b)^(((0x30>>5)&2)*0x11b)^(((0x30>>5)&4)*0x11b)) ^ 0x30), (((0x30<<3)^(((0x30>>5)&1)*0x11b)^(((0x30>>5)&2)*0x11b)^(((0x30>>5)&4)*0x11b)) ^ ((0x30<<2)^(((0x30>>6)&1)*0x11b)^(((0x30>>6)&2)*0x11b)) ^ 0x30), (((0x30<<3)^(((0x30>>5)&1)*0x11b)^(((0x30>>5)&2)*0x11b)^(((0x30>>5)&4)*0x11b)) ^ ((0x30<<1)^(((0x30>>7)&1)*0x11b)) ^ 0x30),(((0x36<<3)^(((0x36>>5)&1)*0x11b)^(((0x36>>5)&2)*0x11b)^(((0x36>>5)&4)*0x11b)) ^ ((0x36<<2)^(((0x36>>6)&1)*0x11b)^(((0x36>>6)&2)*0x11b)) ^ ((0x36<<1)^(((0x36>>7)&1)*0x11b))), (((0x36<<3)^(((0x36>>5)&1)*0x11b)^(((0x36>>5)&2)*0x11b)^(((0x36>>5)&4)*0x11b)) ^ 0x36), (((0x36<<3)^(((0x36>>5)&1)*0x11b)^(((0x36>>5)&2)*0x11b)^(((0x36>>5)&4)*0x11b)) ^ ((0x36<<2)^(((0x36>>6)&1)*0x11b)^(((0x36>>6)&2)*0x11b)) ^ 0x36), (((0x36<<3)^(((0x36>>5)&1)*0x11b)^(((0x36>>5)&2)*0x11b)^(((0x36>>5)&4)*0x11b)) ^ ((0x36<<1)^(((0x36>>7)&1)*0x11b)) ^ 0x36), (((0x36<<3)^(((0x36>>5)&1)*0x11b)^(((0x36>>5)&2)*0x11b)^(((0x36>>5)&4)*0x11b)) ^ ((0x36<<2)^(((0x36>>6)&1)*0x11b)^(((0x36>>6)&2)*0x11b)) ^ ((0x36<<1)^(((0x36>>7)&1)*0x11b))), (((0x36<<3)^(((0x36>>5)&1)*0x11b)^(((0x36>>5)&2)*0x11b)^(((0x36>>5)&4)*0x11b)) ^ 0x36), (((0x36<<3)^(((0x36>>5)&1)*0x11b)^(((0x36>>5)&2)*0x11b)^(((0x36>>5)&4)*0x11b)) ^ ((0x36<<2)^(((0x36>>6)&1)*0x11b)^(((0x36>>6)&2)*0x11b)) ^ 0x36), (((0x36<<3)^(((0x36>>5)&1)*0x11b)^(((0x36>>5)&2)*0x11b)^(((0x36>>5)&4)*0x11b)) ^ ((0x36<<1)^(((0x36>>7)&1)*0x11b)) ^ 0x36),(((0xa5<<3)^(((0xa5>>5)&1)*0x11b)^(((0xa5>>5)&2)*0x11b)^(((0xa5>>5)&4)*0x11b)) ^ ((0xa5<<2)^(((0xa5>>6)&1)*0x11b)^(((0xa5>>6)&2)*0x11b)) ^ ((0xa5<<1)^(((0xa5>>7)&1)*0x11b))), (((0xa5<<3)^(((0xa5>>5)&1)*0x11b)^(((0xa5>>5)&2)*0x11b)^(((0xa5>>5)&4)*0x11b)) ^ 0xa5), (((0xa5<<3)^(((0xa5>>5)&1)*0x11b)^(((0xa5>>5)&2)*0x11b)^(((0xa5>>5)&4)*0x11b)) ^ ((0xa5<<2)^(((0xa5>>6)&1)*0x11b)^(((0xa5>>6)&2)*0x11b)) ^ 0xa5), (((0xa5<<3)^(((0xa5>>5)&1)*0x11b)^(((0xa5>>5)&2)*0x11b)^(((0xa5>>5)&4)*0x11b)) ^ ((0xa5<<1)^(((0xa5>>7)&1)*0x11b)) ^ 0xa5), (((0xa5<<3)^(((0xa5>>5)&1)*0x11b)^(((0xa5>>5)&2)*0x11b)^(((0xa5>>5)&4)*0x11b)) ^ ((0xa5<<2)^(((0xa5>>6)&1)*0x11b)^(((0xa5>>6)&2)*0x11b)) ^ ((0xa5<<1)^(((0xa5>>7)&1)*0x11b))), (((0xa5<<3)^(((0xa5>>5)&1)*0x11b)^(((0xa5>>5)&2)*0x11b)^(((0xa5>>5)&4)*0x11b)) ^ 0xa5), (((0xa5<<3)^(((0xa5>>5)&1)*0x11b)^(((0xa5>>5)&2)*0x11b)^(((0xa5>>5)&4)*0x11b)) ^ ((0xa5<<2)^(((0xa5>>6)&1)*0x11b)^(((0xa5>>6)&2)*0x11b)) ^ 0xa5), (((0xa5<<3)^(((0xa5>>5)&1)*0x11b)^(((0xa5>>5)&2)*0x11b)^(((0xa5>>5)&4)*0x11b)) ^ ((0xa5<<1)^(((0xa5>>7)&1)*0x11b)) ^ 0xa5),(((0x38<<3)^(((0x38>>5)&1)*0x11b)^(((0x38>>5)&2)*0x11b)^(((0x38>>5)&4)*0x11b)) ^ ((0x38<<2)^(((0x38>>6)&1)*0x11b)^(((0x38>>6)&2)*0x11b)) ^ ((0x38<<1)^(((0x38>>7)&1)*0x11b))), (((0x38<<3)^(((0x38>>5)&1)*0x11b)^(((0x38>>5)&2)*0x11b)^(((0x38>>5)&4)*0x11b)) ^ 0x38), (((0x38<<3)^(((0x38>>5)&1)*0x11b)^(((0x38>>5)&2)*0x11b)^(((0x38>>5)&4)*0x11b)) ^ ((0x38<<2)^(((0x38>>6)&1)*0x11b)^(((0x38>>6)&2)*0x11b)) ^ 0x38), (((0x38<<3)^(((0x38>>5)&1)*0x11b)^(((0x38>>5)&2)*0x11b)^(((0x38>>5)&4)*0x11b)) ^ ((0x38<<1)^(((0x38>>7)&1)*0x11b)) ^ 0x38), (((0x38<<3)^(((0x38>>5)&1)*0x11b)^(((0x38>>5)&2)*0x11b)^(((0x38>>5)&4)*0x11b)) ^ ((0x38<<2)^(((0x38>>6)&1)*0x11b)^(((0x38>>6)&2)*0x11b)) ^ ((0x38<<1)^(((0x38>>7)&1)*0x11b))), (((0x38<<3)^(((0x38>>5)&1)*0x11b)^(((0x38>>5)&2)*0x11b)^(((0x38>>5)&4)*0x11b)) ^ 0x38), (((0x38<<3)^(((0x38>>5)&1)*0x11b)^(((0x38>>5)&2)*0x11b)^(((0x38>>5)&4)*0x11b)) ^ ((0x38<<2)^(((0x38>>6)&1)*0x11b)^(((0x38>>6)&2)*0x11b)) ^ 0x38), (((0x38<<3)^(((0x38>>5)&1)*0x11b)^(((0x38>>5)&2)*0x11b)^(((0x38>>5)&4)*0x11b)) ^ ((0x38<<1)^(((0x38>>7)&1)*0x11b)) ^ 0x38)
+
diff --git a/modules/preprocs/nasm/tests/longline.errwarn b/modules/preprocs/nasm/tests/longline.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/preprocs/nasm/tests/longline.errwarn
diff --git a/modules/preprocs/nasm/tests/longline.hex b/modules/preprocs/nasm/tests/longline.hex
new file mode 100644
index 00000000..0a0968cc
--- /dev/null
+++ b/modules/preprocs/nasm/tests/longline.hex
@@ -0,0 +1,64 @@
+51
+f4
+a7
+50
+51
+f4
+a7
+50
+7e
+41
+65
+53
+7e
+41
+65
+53
+1a
+17
+a4
+c3
+1a
+17
+a4
+c3
+3a
+27
+5e
+96
+3a
+27
+5e
+96
+3b
+ab
+6b
+cb
+3b
+ab
+6b
+cb
+1f
+9d
+45
+f1
+1f
+9d
+45
+f1
+ac
+fa
+58
+ab
+ac
+fa
+58
+ab
+4b
+e3
+03
+93
+4b
+e3
+03
+93
diff --git a/modules/preprocs/nasm/tests/nasmpp-bigint.asm b/modules/preprocs/nasm/tests/nasmpp-bigint.asm
new file mode 100644
index 00000000..4314661a
--- /dev/null
+++ b/modules/preprocs/nasm/tests/nasmpp-bigint.asm
@@ -0,0 +1,3 @@
+%if 0x100000000000000 > 0x1000000000000
+db 0
+%endif
diff --git a/modules/preprocs/nasm/tests/nasmpp-bigint.errwarn b/modules/preprocs/nasm/tests/nasmpp-bigint.errwarn
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/modules/preprocs/nasm/tests/nasmpp-bigint.errwarn
diff --git a/modules/preprocs/nasm/tests/nasmpp-bigint.hex b/modules/preprocs/nasm/tests/nasmpp-bigint.hex
new file mode 100644
index 00000000..164742d7
--- /dev/null
+++ b/modules/preprocs/nasm/tests/nasmpp-bigint.hex
@@ -0,0 +1 @@
+00
diff --git a/modules/preprocs/raw/raw-preproc.c b/modules/preprocs/raw/raw-preproc.c
index 7ad5cc46..9f71674d 100644
--- a/modules/preprocs/raw/raw-preproc.c
+++ b/modules/preprocs/raw/raw-preproc.c
@@ -37,6 +37,7 @@ typedef struct yasm_preproc_raw {
int is_interactive;
FILE *in;
yasm_linemap *cur_lm;
+ yasm_errwarns *errwarns;
} yasm_preproc_raw;
yasm_preproc_module yasm_raw_LTX_preproc;
@@ -44,13 +45,15 @@ yasm_preproc_module yasm_raw_LTX_preproc;
int isatty(int);
static yasm_preproc *
-raw_preproc_create(FILE *f, const char *in_filename, yasm_linemap *lm)
+raw_preproc_create(FILE *f, const char *in_filename, yasm_linemap *lm,
+ yasm_errwarns *errwarns)
{
yasm_preproc_raw *preproc_raw = yasm_xmalloc(sizeof(yasm_preproc_raw));
preproc_raw->preproc.module = &yasm_raw_LTX_preproc;
preproc_raw->in = f;
preproc_raw->cur_lm = lm;
+ preproc_raw->errwarns = errwarns;
/*@-unrecog@*/
preproc_raw->is_interactive = f ? (isatty(fileno(f)) > 0) : 0;
/*@=unrecog@*/
@@ -77,13 +80,17 @@ raw_preproc_input(yasm_preproc *preproc, char *buf, size_t max_size)
buf[n] = (char)c;
if (c == '\n')
buf[n++] = (char)c;
- if (c == EOF && ferror(preproc_raw->in))
- yasm__error(yasm_linemap_get_current(preproc_raw->cur_lm),
- N_("error when reading from file"));
+ if (c == EOF && ferror(preproc_raw->in)) {
+ yasm_error_set(YASM_ERROR_IO, N_("error when reading from file"));
+ yasm_errwarn_propagate(preproc_raw->errwarns,
+ yasm_linemap_get_current(preproc_raw->cur_lm));
+ }
} else if (((n = fread(buf, 1, max_size, preproc_raw->in)) == 0) &&
- ferror(preproc_raw->in))
- yasm__error(yasm_linemap_get_current(preproc_raw->cur_lm),
- N_("error when reading from file"));
+ ferror(preproc_raw->in)) {
+ yasm_error_set(YASM_ERROR_IO, N_("error when reading from file"));
+ yasm_errwarn_propagate(preproc_raw->errwarns,
+ yasm_linemap_get_current(preproc_raw->cur_lm));
+ }
return n;
}
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 89ebb8f8..52ab74b3 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -6,6 +6,8 @@
frontends/yasm/yasm-options.c
frontends/yasm/yasm.c
+gas-bison.c
+gas-token.c
lc3bid.c
libyasm/bitvect.c
libyasm/bytecode.c
@@ -14,7 +16,6 @@ libyasm/expr.c
libyasm/floatnum.c
libyasm/hamt.c
libyasm/intnum.c
-libyasm/linemgr.c
libyasm/section.c
libyasm/symrec.c
libyasm/xmalloc.c
@@ -23,13 +24,23 @@ modules/arch/lc3b/lc3bbc.c
modules/arch/x86/x86arch.c
modules/arch/x86/x86bc.c
modules/arch/x86/x86expr.c
+modules/arch/x86/x86id.c
+modules/dbgfmts/dwarf2/dwarf2-dbgfmt.c
+modules/dbgfmts/dwarf2/dwarf2-info.c
+modules/dbgfmts/dwarf2/dwarf2-line.c
+modules/dbgfmts/stabs/stabs-dbgfmt.c
+modules/listfmts/nasm/nasm-listfmt.c
modules/objfmts/bin/bin-objfmt.c
modules/objfmts/coff/coff-objfmt.c
modules/objfmts/dbg/dbg-objfmt.c
+modules/objfmts/elf/elf-objfmt.c
+modules/objfmts/elf/elf-x86-amd64.c
+modules/objfmts/elf/elf-x86-x86.c
+modules/objfmts/elf/elf.c
+modules/objfmts/xdf/xdf-objfmt.c
modules/optimizers/basic/basic-optimizer.c
+modules/parsers/gas/gas-parser.c
modules/preprocs/nasm/nasm-pp.c
-modules/preprocs/nasm/nasm-preproc.c
modules/preprocs/raw/raw-preproc.c
nasm-bison.c
nasm-token.c
-x86id.c
diff --git a/tests/win32-relocovfl.asm b/tests/win32-relocovfl.asm
new file mode 100644
index 00000000..fc3cddb9
--- /dev/null
+++ b/tests/win32-relocovfl.asm
@@ -0,0 +1,3 @@
+extern foo
+section .text
+times 64*1024 dd foo
diff --git a/tools/Makefile.inc b/tools/Makefile.inc
index 4e6ec10e..56a4697f 100644
--- a/tools/Makefile.inc
+++ b/tools/Makefile.inc
@@ -1,5 +1,9 @@
# $Id$
EXTRA_DIST += tools/re2c/Makefile.inc
+EXTRA_DIST += tools/gap/Makefile.inc
+EXTRA_DIST += tools/python-yasm/Makefile.inc
include tools/re2c/Makefile.inc
+include tools/gap/Makefile.inc
+include tools/python-yasm/Makefile.inc
diff --git a/tools/gap/Makefile.inc b/tools/gap/Makefile.inc
new file mode 100644
index 00000000..4457af76
--- /dev/null
+++ b/tools/gap/Makefile.inc
@@ -0,0 +1,34 @@
+# $Id$
+
+# These utility programs have to be built for BUILD host in cross-build.
+# This makes things rather non-standard automake
+
+noinst_PROGRAMS += gap
+
+gap_SOURCES =
+EXTRA_DIST += tools/gap/gap.c
+EXTRA_DIST += tools/gap/perfect.c
+EXTRA_DIST += tools/gap/perfect.h
+EXTRA_DIST += tools/gap/standard.h
+gap_LDADD = gap.$(OBJEXT)
+gap_LDADD += gap-perfect.$(OBJEXT)
+gap_LDADD += gap-phash.$(OBJEXT)
+gap_LDADD += gap-xmalloc.$(OBJEXT)
+gap_LDADD += gap-xstrdup.$(OBJEXT)
+gap_LINK = $(CCLD_FOR_BUILD) -o $@
+
+gap.$(OBJEXT): tools/gap/gap.c
+ $(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f tools/gap/gap.c || echo '$(srcdir)/'`tools/gap/gap.c
+
+gap-perfect.$(OBJEXT): tools/gap/perfect.c
+ $(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f tools/gap/perfect.c || echo '$(srcdir)/'`tools/gap/perfect.c
+
+gap-phash.$(OBJEXT): libyasm/phash.c
+ $(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f libyasm/phash.c || echo '$(srcdir)/'`libyasm/phash.c
+
+gap-xmalloc.$(OBJEXT): libyasm/xmalloc.c
+ $(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f libyasm/xmalloc.c || echo '$(srcdir)/'`libyasm/xmalloc.c
+
+gap-xstrdup.$(OBJEXT): libyasm/xstrdup.c
+ $(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(INCLUDES) -c -o $@ `test -f libyasm/xstrdup.c || echo '$(srcdir)/'`libyasm/xstrdup.c
+
diff --git a/tools/gap/gap.c b/tools/gap/gap.c
new file mode 100644
index 00000000..eb96d166
--- /dev/null
+++ b/tools/gap/gap.c
@@ -0,0 +1,854 @@
+/* $Id$
+ *
+ * Generate Arch Parser (GAP): generates ARCHparse.c from ARCHparse.gap.
+ *
+ * Copyright (C) 2006 Peter Johnson
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <stdio.h>
+#include <ctype.h>
+#include <stdarg.h>
+#include <string.h>
+#include "tools/gap/perfect.h"
+#include "libyasm/compat-queue.h"
+#include "libyasm/coretype.h"
+#include "libyasm/errwarn.h"
+
+typedef STAILQ_HEAD(slist, sval) slist;
+typedef struct sval {
+ STAILQ_ENTRY(sval) link;
+ char *str;
+} sval;
+
+typedef STAILQ_HEAD(dir_list, dir) dir_list;
+typedef struct dir {
+ STAILQ_ENTRY(dir) link;
+ char *name;
+ const char *func;
+ slist args;
+} dir;
+
+typedef STAILQ_HEAD(dir_byp_list, dir_byp) dir_byp_list;
+typedef struct dir_byp {
+ STAILQ_ENTRY(dir_byp) link;
+ /*@null@*/ char *parser;
+ dir_list dirs;
+} dir_byp;
+
+typedef enum {
+ ARCH = 0,
+ PARSERS,
+ INSN,
+ CPU,
+ CPU_ALIAS,
+ CPU_FEATURE,
+ TARGETMOD,
+ PREFIX,
+ REG,
+ REGGROUP,
+ SEGREG,
+ NUM_DIRS
+} dir_type;
+
+typedef struct {
+ void (*parse_insn) (void); /* arch-specific parse_insn */
+ int multi_parser[NUM_DIRS]; /* whether it has an initial parser field */
+} arch_handler;
+
+static void x86_parse_insn(void);
+static const arch_handler arch_x86 = {
+ x86_parse_insn,
+ {0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0}
+};
+
+static struct {
+ const char *name;
+ const arch_handler *arch;
+} archs[] = {
+ {"x86", &arch_x86},
+};
+
+static char line[1024];
+static unsigned int cur_line = 0, next_line = 1;
+static int errors = 0;
+static const arch_handler *arch = NULL;
+
+/* Lists of directives, keyed by parser name */
+static dir_byp_list insnprefix_byp;
+static dir_byp_list cpu_byp;
+static dir_byp_list regtmod_byp;
+
+static void
+report_error(const char *fmt, ...)
+{
+ va_list ap;
+
+ fprintf(stderr, "%u: ", cur_line);
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ fputc('\n', stderr);
+ errors++;
+}
+
+void
+yasm__fatal(const char *message, ...)
+{
+ abort();
+}
+
+static void
+dup_slist(slist *out, slist *in)
+{
+ sval *sv;
+
+ STAILQ_INIT(out);
+ STAILQ_FOREACH(sv, in, link) {
+ sval *nsv = yasm_xmalloc(sizeof(sval));
+ nsv->str = yasm__xstrdup(sv->str);
+ STAILQ_INSERT_TAIL(out, nsv, link);
+ }
+}
+
+static dir *
+dup_dir(dir *in)
+{
+ dir *out = yasm_xmalloc(sizeof(dir));
+ out->name = yasm__xstrdup(in->name);
+ out->func = in->func;
+ dup_slist(&out->args, &in->args);
+ return out;
+}
+
+static dir_list *
+get_dirs(dir_byp_list *byp, /*@null@*/ const char *parser)
+{
+ dir_list *found = NULL;
+ dir_byp *db;
+
+ if (STAILQ_EMPTY(byp)) {
+ report_error("PARSERS not yet specified");
+ return NULL;
+ }
+
+ STAILQ_FOREACH(db, byp, link) {
+ if ((!parser && !db->parser) ||
+ (parser && db->parser && strcmp(parser, db->parser) == 0)) {
+ found = &db->dirs;
+ break;
+ }
+ }
+
+ return found;
+}
+
+/* Add a keyword/data to a slist of slist keyed by parser name.
+ * Returns nonzero on error.
+ */
+static int
+add_dir(dir_byp_list *byp, /*@null@*/ const char *parser, dir *d)
+{
+ dir_list *found = get_dirs(byp, parser);
+
+ if (found) {
+ STAILQ_INSERT_TAIL(found, d, link);
+ return 0;
+ } else if (!parser) {
+ /* Add separately to all */
+ dir_byp *db;
+ int first = 1;
+ STAILQ_FOREACH(db, byp, link) {
+ if (!first)
+ d = dup_dir(d);
+ first = 0;
+ STAILQ_INSERT_TAIL(&db->dirs, d, link);
+ }
+ return 0;
+ } else {
+ report_error("parser not found");
+ return 1;
+ }
+}
+
+static char *
+check_parser(dir_type type)
+{
+ char *parser = NULL;
+
+ if (arch->multi_parser[type]) {
+ parser = strtok(NULL, " \t\n");
+ if (strcmp(parser, "-") == 0)
+ parser = NULL;
+ }
+
+ return parser;
+}
+
+static void
+parse_args(slist *args)
+{
+ char *tok;
+ sval *sv;
+
+ STAILQ_INIT(args);
+
+ tok = strtok(NULL, " \t\n");
+ if (!tok) {
+ report_error("no args");
+ return;
+ }
+
+ while (tok) {
+ sv = yasm_xmalloc(sizeof(sval));
+ sv->str = yasm__xstrdup(tok);
+ STAILQ_INSERT_TAIL(args, sv, link);
+ tok = strtok(NULL, " \t\n");
+ }
+}
+
+static dir *
+parse_generic(dir_type type, const char *func, dir_byp_list *byp)
+{
+ char *parser = check_parser(type);
+ char *name = strtok(NULL, " \t\n");
+ dir *d = yasm_xmalloc(sizeof(dir));
+
+ d->name = yasm__xstrdup(name);
+ d->func = func;
+ parse_args(&d->args);
+
+ add_dir(byp, parser, d);
+ return d;
+}
+
+static void
+parse_arch(void)
+{
+ size_t i;
+ int found = 0;
+ char *tok = strtok(NULL, " \t\n");
+
+ if (!tok) {
+ report_error("ARCH requires an operand");
+ return;
+ }
+ for (i=0; i<sizeof(archs)/sizeof(archs[0]); i++) {
+ if (strcmp(archs[i].name, tok) == 0) {
+ found = 1;
+ break;
+ }
+ }
+ if (!found) {
+ report_error("unrecognized ARCH");
+ return;
+ }
+
+ arch = archs[i].arch;
+}
+
+static void
+parse_parsers(void)
+{
+ dir_byp *db;
+ char *tok;
+
+ if (!arch) {
+ report_error("ARCH not specified before PARSERS");
+ return;
+ }
+
+ tok = strtok(NULL, " \t\n");
+ if (!tok) {
+ report_error("no PARSERS parameter");
+ return;
+ }
+
+ while (tok) {
+ /* Insert into each slist of slist if broken out by parser */
+ if (arch->multi_parser[INSN] || arch->multi_parser[PREFIX]) {
+ db = yasm_xmalloc(sizeof(dir_byp));
+ db->parser = yasm__xstrdup(tok);
+ STAILQ_INIT(&db->dirs);
+
+ STAILQ_INSERT_TAIL(&insnprefix_byp, db, link);
+ }
+ if (arch->multi_parser[CPU] || arch->multi_parser[CPU_ALIAS] ||
+ arch->multi_parser[CPU_FEATURE]) {
+ db = yasm_xmalloc(sizeof(dir_byp));
+ db->parser = yasm__xstrdup(tok);
+ STAILQ_INIT(&db->dirs);
+
+ STAILQ_INSERT_TAIL(&cpu_byp, db, link);
+ }
+ if (arch->multi_parser[TARGETMOD] || arch->multi_parser[REG] ||
+ arch->multi_parser[REGGROUP] || arch->multi_parser[SEGREG]) {
+ db = yasm_xmalloc(sizeof(dir_byp));
+ db->parser = yasm__xstrdup(tok);
+ STAILQ_INIT(&db->dirs);
+
+ STAILQ_INSERT_TAIL(&regtmod_byp, db, link);
+ }
+ tok = strtok(NULL, " \t\n");
+ }
+
+ /* Add NULL (global) versions if not already created */
+ if (STAILQ_EMPTY(&insnprefix_byp)) {
+ db = yasm_xmalloc(sizeof(dir_byp));
+ db->parser = NULL;
+ STAILQ_INIT(&db->dirs);
+
+ STAILQ_INSERT_TAIL(&insnprefix_byp, db, link);
+ }
+ if (STAILQ_EMPTY(&cpu_byp)) {
+ db = yasm_xmalloc(sizeof(dir_byp));
+ db->parser = NULL;
+ STAILQ_INIT(&db->dirs);
+
+ STAILQ_INSERT_TAIL(&cpu_byp, db, link);
+ }
+ if (STAILQ_EMPTY(&regtmod_byp)) {
+ db = yasm_xmalloc(sizeof(dir_byp));
+ db->parser = NULL;
+ STAILQ_INIT(&db->dirs);
+
+ STAILQ_INSERT_TAIL(&regtmod_byp, db, link);
+ }
+}
+
+static void
+x86_parse_insn(void)
+{
+ char *parser = check_parser(INSN);
+ char *bname = strtok(NULL, " \t\n");
+ char *suffix = strtok(NULL, " \t\n");
+ dir *d;
+ slist args;
+ sval *sv;
+
+ if (!suffix) {
+ report_error("INSN requires suffix");
+ return;
+ }
+
+ /* save the remainder of args */
+ parse_args(&args);
+
+ if (suffix[0] != '"') {
+ /* Just one instruction to generate */
+ sv = yasm_xmalloc(sizeof(sval));
+ sv->str = yasm__xstrdup(suffix);
+ STAILQ_INSERT_HEAD(&args, sv, link);
+
+ d = yasm_xmalloc(sizeof(dir));
+ d->name = yasm__xstrdup(bname);
+ d->func = "INSN";
+ d->args = args;
+ add_dir(&insnprefix_byp, parser, d);
+ } else {
+ /* Need to generate with suffixes for gas */
+ char *p;
+ char sufstr[6];
+ size_t bnamelen = strlen(bname);
+
+ strcpy(sufstr, "SUF_X");
+
+ for (p = &suffix[1]; *p != '"'; p++) {
+ sufstr[4] = toupper(*p);
+
+ d = yasm_xmalloc(sizeof(dir));
+
+ d->name = yasm_xmalloc(bnamelen+2);
+ strcpy(d->name, bname);
+ d->name[bnamelen] = tolower(*p);
+ d->name[bnamelen+1] = '\0';
+
+ d->func = "INSN";
+ dup_slist(&d->args, &args);
+
+ sv = yasm_xmalloc(sizeof(sval));
+ sv->str = yasm__xstrdup(sufstr);
+ STAILQ_INSERT_HEAD(&d->args, sv, link);
+
+ add_dir(&insnprefix_byp, "gas", d);
+ }
+
+ /* And finally the version sans suffix */
+ sv = yasm_xmalloc(sizeof(sval));
+ sv->str = yasm__xstrdup("NONE");
+ STAILQ_INSERT_HEAD(&args, sv, link);
+
+ d = yasm_xmalloc(sizeof(dir));
+ d->name = yasm__xstrdup(bname);
+ d->func = "INSN";
+ d->args = args;
+ add_dir(&insnprefix_byp, parser, d);
+ }
+}
+
+static void
+parse_insn(void)
+{
+ if (!arch) {
+ report_error("ARCH not defined prior to INSN");
+ return;
+ }
+ arch->parse_insn();
+}
+
+static void
+parse_cpu(void)
+{
+ dir *d = parse_generic(CPU, "CPU", &cpu_byp);
+ sval *sv = yasm_xmalloc(sizeof(sval));
+ sv->str = yasm__xstrdup("CPU_MODE_VERBATIM");
+ STAILQ_INSERT_TAIL(&d->args, sv, link);
+}
+
+static void
+parse_cpu_alias(void)
+{
+ char *parser = check_parser(CPU_ALIAS);
+ char *name = strtok(NULL, " \t\n");
+ char *alias = strtok(NULL, " \t\n");
+ dir_list *dirs = get_dirs(&cpu_byp, parser);
+ dir *aliasd, *d;
+
+ if (!alias) {
+ report_error("CPU_ALIAS requires an operand");
+ return;
+ }
+
+ STAILQ_FOREACH(aliasd, dirs, link) {
+ if (strcmp(aliasd->name, alias) == 0)
+ break;
+ }
+ if (!aliasd) {
+ report_error("could not find `%s'", alias);
+ return;
+ }
+
+ d = yasm_xmalloc(sizeof(dir));
+ d->name = yasm__xstrdup(name);
+ d->func = "CPU";
+ dup_slist(&d->args, &aliasd->args);
+
+ add_dir(&cpu_byp, parser, d);
+}
+
+static void
+parse_cpu_feature(void)
+{
+ char *parser = check_parser(CPU_FEATURE);
+ char *name = strtok(NULL, " \t\n");
+ dir *name_dir = yasm_xmalloc(sizeof(dir));
+ dir *noname_dir = yasm_xmalloc(sizeof(dir));
+ sval *sv;
+
+ name_dir->name = yasm__xstrdup(name);
+ name_dir->func = "CPU_FEATURE";
+ parse_args(&name_dir->args);
+
+ noname_dir->name = yasm_xmalloc(strlen(name)+3);
+ strcpy(noname_dir->name, "no");
+ strcat(noname_dir->name, name);
+ noname_dir->func = name_dir->func;
+ dup_slist(&noname_dir->args, &name_dir->args);
+
+ sv = yasm_xmalloc(sizeof(sval));
+ sv->str = yasm__xstrdup("CPU_MODE_SET");
+ STAILQ_INSERT_TAIL(&name_dir->args, sv, link);
+
+ sv = yasm_xmalloc(sizeof(sval));
+ sv->str = yasm__xstrdup("CPU_MODE_CLEAR");
+ STAILQ_INSERT_TAIL(&noname_dir->args, sv, link);
+
+ add_dir(&cpu_byp, parser, name_dir);
+ add_dir(&cpu_byp, parser, noname_dir);
+}
+
+static void
+parse_targetmod(void)
+{
+ parse_generic(TARGETMOD, "TARGETMOD", &regtmod_byp);
+}
+
+static void
+parse_prefix(void)
+{
+ parse_generic(PREFIX, "PREFIX", &insnprefix_byp);
+}
+
+static void
+parse_reg(void)
+{
+ parse_generic(REG, "REG", &regtmod_byp);
+}
+
+static void
+parse_reggroup(void)
+{
+ parse_generic(REGGROUP, "REGGROUP", &regtmod_byp);
+}
+
+static void
+parse_segreg(void)
+{
+ parse_generic(SEGREG, "SEGREG", &regtmod_byp);
+}
+
+/* make the c output for the perfect hash tab array */
+static void
+make_c_tab(
+ FILE *f,
+ const char *which,
+ const char *parser,
+ bstuff *tab, /* table indexed by b */
+ ub4 smax, /* range of scramble[] */
+ ub4 blen, /* b in 0..blen-1, power of 2 */
+ ub4 *scramble) /* used in final hash */
+{
+ ub4 i;
+ /* table for the mapping for the perfect hash */
+ if (blen >= USE_SCRAMBLE) {
+ /* A way to make the 1-byte values in tab bigger */
+ if (smax > UB2MAXVAL+1) {
+ fprintf(f, "static const unsigned long %s_", which);
+ if (parser)
+ fprintf(f, "%s_", parser);
+ fprintf(f, "scramble[] = {\n");
+ for (i=0; i<=UB1MAXVAL; i+=4)
+ fprintf(f, "0x%.8lx, 0x%.8lx, 0x%.8lx, 0x%.8lx,\n",
+ scramble[i+0], scramble[i+1], scramble[i+2], scramble[i+3]);
+ } else {
+ fprintf(f, "static const unsigned short %s_", which);
+ if (parser)
+ fprintf(f, "%s_", parser);
+ fprintf(f, "scramble[] = {\n");
+ for (i=0; i<=UB1MAXVAL; i+=8)
+ fprintf(f,
+"0x%.4lx, 0x%.4lx, 0x%.4lx, 0x%.4lx, 0x%.4lx, 0x%.4lx, 0x%.4lx, 0x%.4lx,\n",
+ scramble[i+0], scramble[i+1], scramble[i+2], scramble[i+3],
+ scramble[i+4], scramble[i+5], scramble[i+6], scramble[i+7]);
+ }
+ fprintf(f, "};\n");
+ fprintf(f, "\n");
+ }
+
+ if (blen > 0) {
+ /* small adjustments to _a_ to make values distinct */
+ if (smax <= UB1MAXVAL+1 || blen >= USE_SCRAMBLE)
+ fprintf(f, "static const unsigned char %s_", which);
+ else
+ fprintf(f, "static const unsigned short %s_", which);
+ if (parser)
+ fprintf(f, "%s_", parser);
+ fprintf(f, "tab[] = {\n");
+
+ if (blen < 16) {
+ for (i=0; i<blen; ++i)
+ fprintf(f, "%3ld,", scramble[tab[i].val_b]);
+ } else if (blen <= 1024) {
+ for (i=0; i<blen; i+=16)
+ fprintf(f, "%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,\n",
+ scramble[tab[i+0].val_b], scramble[tab[i+1].val_b],
+ scramble[tab[i+2].val_b], scramble[tab[i+3].val_b],
+ scramble[tab[i+4].val_b], scramble[tab[i+5].val_b],
+ scramble[tab[i+6].val_b], scramble[tab[i+7].val_b],
+ scramble[tab[i+8].val_b], scramble[tab[i+9].val_b],
+ scramble[tab[i+10].val_b], scramble[tab[i+11].val_b],
+ scramble[tab[i+12].val_b], scramble[tab[i+13].val_b],
+ scramble[tab[i+14].val_b], scramble[tab[i+15].val_b]);
+ } else if (blen < USE_SCRAMBLE) {
+ for (i=0; i<blen; i+=8)
+ fprintf(f, "%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,\n",
+ scramble[tab[i+0].val_b], scramble[tab[i+1].val_b],
+ scramble[tab[i+2].val_b], scramble[tab[i+3].val_b],
+ scramble[tab[i+4].val_b], scramble[tab[i+5].val_b],
+ scramble[tab[i+6].val_b], scramble[tab[i+7].val_b]);
+ } else {
+ for (i=0; i<blen; i+=16)
+ fprintf(f, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,\n",
+ tab[i+0].val_b, tab[i+1].val_b,
+ tab[i+2].val_b, tab[i+3].val_b,
+ tab[i+4].val_b, tab[i+5].val_b,
+ tab[i+6].val_b, tab[i+7].val_b,
+ tab[i+8].val_b, tab[i+9].val_b,
+ tab[i+10].val_b, tab[i+11].val_b,
+ tab[i+12].val_b, tab[i+13].val_b,
+ tab[i+14].val_b, tab[i+15].val_b);
+ }
+ fprintf(f, "};\n");
+ fprintf(f, "\n");
+ }
+}
+
+static void
+perfect_dir(FILE *out, const char *which, const char *parser, dir_list *dirs)
+{
+ ub4 nkeys;
+ key *keys;
+ hashform form;
+ bstuff *tab; /* table indexed by b */
+ hstuff *tabh; /* table indexed by hash value */
+ ub4 smax; /* scramble[] values in 0..smax-1, a power of 2 */
+ ub4 alen; /* a in 0..alen-1, a power of 2 */
+ ub4 blen; /* b in 0..blen-1, a power of 2 */
+ ub4 salt; /* a parameter to the hash function */
+ gencode final; /* code for final hash */
+ ub4 i;
+ ub4 scramble[SCRAMBLE_LEN]; /* used in final hash function */
+ char buf[10][80]; /* buffer for generated code */
+ char *buf2[10]; /* also for generated code */
+ int cpumode = strcmp(which, "cpu") == 0;
+ dir *d;
+
+ /* perfect hash configuration */
+ form.mode = NORMAL_HM;
+ form.hashtype = STRING_HT;
+ form.perfect = MINIMAL_HP;
+ form.speed = SLOW_HS;
+
+ /* set up code for final hash */
+ final.line = buf2;
+ final.used = 0;
+ final.len = 10;
+ for (i=0; i<10; i++)
+ final.line[i] = buf[i];
+
+ /* build list of keys */
+ nkeys = 0;
+ keys = NULL;
+ STAILQ_FOREACH(d, dirs, link) {
+ key *k = yasm_xmalloc(sizeof(key));
+
+ k->name_k = yasm__xstrdup(d->name);
+ k->len_k = strlen(d->name);
+ k->next_k = keys;
+ keys = k;
+ nkeys++;
+ }
+
+ /* find the hash */
+ findhash(&tab, &tabh, &alen, &blen, &salt, &final,
+ scramble, &smax, keys, nkeys, &form);
+
+ /* output the dir table: this should loop up to smax for NORMAL_HP,
+ * or up to pakd.nkeys for MINIMAL_HP.
+ */
+ fprintf(out, "static const %s_parse_data %s_", which, which);
+ if (parser)
+ fprintf(out, "%s_", parser);
+ fprintf(out, "pd[%lu] = {\n", nkeys);
+ for (i=0; i<nkeys; i++) {
+ if (tabh[i].key_h) {
+ sval *sv;
+ STAILQ_FOREACH(d, dirs, link) {
+ if (strcmp(d->name, tabh[i].key_h->name_k) == 0)
+ break;
+ }
+ if (!d) {
+ report_error("internal error: could not find `%s'",
+ tabh[i].key_h->name_k);
+ break;
+ }
+ if (cpumode)
+ fprintf(out, "{\"%s\",", d->name);
+ else
+ fprintf(out, "%s(\"%s\",", d->func, d->name);
+ STAILQ_FOREACH(sv, &d->args, link) {
+ fprintf(out, " %s", sv->str);
+ if (STAILQ_NEXT(sv, link))
+ fprintf(out, ",");
+ }
+ fprintf(out, cpumode ? "}" : ")");
+ } else
+ fprintf(out, " { NULL }");
+
+ if (i < nkeys-1)
+ fprintf(out, ",");
+ fprintf(out, "\n");
+ }
+ fprintf(out, "};\n");
+
+ /* output the hash tab[] array */
+ make_c_tab(out, which, parser, tab, smax, blen, scramble);
+
+ /* The hash function */
+ fprintf(out, "#define tab %s_", which);
+ if (parser)
+ fprintf(out, "%s_", parser);
+ fprintf(out, "tab\n");
+ fprintf(out, "static const %s_parse_data *\n%s_", which, which);
+ if (parser)
+ fprintf(out, "%s_", parser);
+ fprintf(out, "find(const char *key, size_t len)\n");
+ fprintf(out, "{\n");
+ fprintf(out, " const %s_parse_data *ret;\n", which);
+ for (i=0; i<final.used; ++i)
+ fprintf(out, final.line[i]);
+ fprintf(out, " if (rsl >= %lu) return NULL;\n", nkeys);
+ fprintf(out, " ret = &%s_", which);
+ if (parser)
+ fprintf(out, "%s_", parser);
+ fprintf(out, "pd[rsl];\n");
+ fprintf(out, " if (strcmp(key, ret->name) != 0) return NULL;\n");
+ fprintf(out, " return ret;\n");
+ fprintf(out, "}\n");
+ fprintf(out, "#undef tab\n\n");
+
+ free(tab);
+ free(tabh);
+}
+
+/* Get an entire "real" line from the input file by combining any
+ * \\\n continuations.
+ */
+static int get_line(FILE *in)
+{
+ char *p = line;
+ cur_line = next_line;
+
+ if (feof(in))
+ return 0;
+
+ while (p < &line[1023-128]) {
+ if (!fgets(p, 128, in))
+ return 1;
+ next_line++;
+ /* if continuation, strip out leading whitespace */
+ if (p > line) {
+ char *p2 = p;
+ while (isspace(*p2)) p2++;
+ if (p2 > p)
+ memmove(p, p2, strlen(p2)+1);
+ }
+ while (*p) p++;
+ if (p[-2] != '\\' || p[-1] != '\n') {
+ if (p[-1] == '\n')
+ p[-1] = '\0';
+ return 1;
+ }
+ p -= 2;
+ }
+ return 0;
+}
+
+static struct {
+ const char *name;
+ int indx;
+ void (*handler) (void);
+} directives[] = {
+ {"ARCH", ARCH, parse_arch},
+ {"PARSERS", PARSERS, parse_parsers},
+ {"INSN", INSN, parse_insn},
+ {"CPU", CPU, parse_cpu},
+ {"CPU_ALIAS", CPU_ALIAS, parse_cpu_alias},
+ {"CPU_FEATURE", CPU_FEATURE, parse_cpu_feature},
+ {"TARGETMOD", TARGETMOD, parse_targetmod},
+ {"PREFIX", PREFIX, parse_prefix},
+ {"REG", REG, parse_reg},
+ {"REGGROUP", REGGROUP, parse_reggroup},
+ {"SEGREG", SEGREG, parse_segreg},
+};
+
+int
+main(int argc, char *argv[])
+{
+ FILE *in, *out;
+ size_t i;
+ char *tok;
+ int count[NUM_DIRS];
+ dir_byp *db;
+
+ for (i=0; i<NUM_DIRS; i++)
+ count[i] = 0;
+
+ if (argc != 3) {
+ fprintf(stderr, "Usage: gap <in> <out>\n");
+ return EXIT_FAILURE;
+ }
+
+ in = fopen(argv[1], "rt");
+ if (!in) {
+ fprintf(stderr, "Could not open `%s' for reading\n", argv[1]);
+ return EXIT_FAILURE;
+ }
+
+ STAILQ_INIT(&insnprefix_byp);
+ STAILQ_INIT(&cpu_byp);
+ STAILQ_INIT(&regtmod_byp);
+
+ /* Parse input file */
+ while (get_line(in)) {
+ int found;
+ /*printf("%s\n", line);*/
+ tok = strtok(line, " \t\n");
+ if (!tok)
+ continue;
+
+ /* Comments start with # as the first thing on a line */
+ if (tok[0] == '#')
+ continue;
+
+ /* Look for directive */
+ found = 0;
+ for (i=0; i<sizeof(directives)/sizeof(directives[0]); i++) {
+ if (strcmp(tok, directives[i].name) == 0) {
+ count[directives[i].indx]++;
+ directives[i].handler();
+ found = 1;
+ break;
+ }
+ }
+ if (!found)
+ report_error("unknown directive `%s'\n", tok);
+ }
+
+ /* Output some informational statistics */
+ printf("Directives read:\n");
+ for (i=0; i<sizeof(directives)/sizeof(directives[0]); i++)
+ printf("\t%d\t%s\n", count[directives[i].indx], directives[i].name);
+
+ if (errors > 0)
+ return EXIT_FAILURE;
+
+ out = fopen(argv[2], "wt");
+ if (!out) {
+ fprintf(stderr, "Could not open `%s' for writing\n", argv[2]);
+ return EXIT_FAILURE;
+ }
+
+ /* Get perfect hashes for the three lists of directives */
+ STAILQ_FOREACH(db, &insnprefix_byp, link)
+ perfect_dir(out, "insnprefix", db->parser, &db->dirs);
+ STAILQ_FOREACH(db, &cpu_byp, link)
+ perfect_dir(out, "cpu", db->parser, &db->dirs);
+ STAILQ_FOREACH(db, &regtmod_byp, link)
+ perfect_dir(out, "regtmod", db->parser, &db->dirs);
+
+ if (errors > 0)
+ return EXIT_FAILURE;
+
+ return EXIT_SUCCESS;
+}
+
diff --git a/tools/gap/perfect.c b/tools/gap/perfect.c
new file mode 100644
index 00000000..77464c25
--- /dev/null
+++ b/tools/gap/perfect.c
@@ -0,0 +1,1189 @@
+/* Modified for use with yasm by Peter Johnson.
+ * $Id$
+ */
+/*
+------------------------------------------------------------------------------
+perfect.c: code to generate code for a hash for perfect hashing.
+(c) Bob Jenkins, September 1996, December 1999
+You may use this code in any way you wish, and it is free. No warranty.
+I hereby place this in the public domain.
+Source is http://burtleburtle.net/bob/c/perfect.c
+
+This generates a minimal perfect hash function. That means, given a
+set of n keys, this determines a hash function that maps each of
+those keys into a value in 0..n-1 with no collisions.
+
+The perfect hash function first uses a normal hash function on the key
+to determine (a,b) such that the pair (a,b) is distinct for all
+keys, then it computes a^scramble[tab[b]] to get the final perfect hash.
+tab[] is an array of 1-byte values and scramble[] is a 256-term array of
+2-byte or 4-byte values. If there are n keys, the length of tab[] is a
+power of two between n/3 and n.
+
+I found the idea of computing distinct (a,b) values in "Practical minimal
+perfect hash functions for large databases", Fox, Heath, Chen, and Daoud,
+Communications of the ACM, January 1992. They found the idea in Chichelli
+(CACM Jan 1980). Beyond that, our methods differ.
+
+The key is hashed to a pair (a,b) where a in 0..*alen*-1 and b in
+0..*blen*-1. A fast hash function determines both a and b
+simultaneously. Any decent hash function is likely to produce
+hashes so that (a,b) is distinct for all pairs. I try the hash
+using different values of *salt* until all pairs are distinct.
+
+The final hash is (a XOR scramble[tab[b]]). *scramble* is a
+predetermined mapping of 0..255 into 0..smax-1. *tab* is an
+array that we fill in in such a way as to make the hash perfect.
+
+First we fill in all values of *tab* that are used by more than one
+key. We try all possible values for each position until one works.
+
+This leaves m unmapped keys and m values that something could hash to.
+If you treat unmapped keys as lefthand nodes and unused hash values
+as righthand nodes, and draw a line connecting each key to each hash
+value it could map to, you get a bipartite graph. We attempt to
+find a perfect matching in this graph. If we succeed, we have
+determined a perfect hash for the whole set of keys.
+
+*scramble* is used because (a^tab[i]) clusters keys around *a*.
+------------------------------------------------------------------------------
+*/
+
+#include <string.h>
+#include "tools/gap/standard.h"
+#include "libyasm/coretype.h"
+#include "libyasm/phash.h"
+#include "tools/gap/perfect.h"
+
+#define CHECKSTATE 8
+
+/*
+------------------------------------------------------------------------------
+Find the mapping that will produce a perfect hash
+------------------------------------------------------------------------------
+*/
+
+/* return the ceiling of the log (base 2) of val */
+ub4 phash_log2(val)
+ub4 val;
+{
+ ub4 i;
+ for (i=0; ((ub4)1<<i) < val; ++i)
+ ;
+ return i;
+}
+
+/* compute p(x), where p is a permutation of 0..(1<<nbits)-1 */
+/* permute(0)=0. This is intended and useful. */
+static ub4 permute(
+ ub4 x, /* input, a value in some range */
+ ub4 nbits) /* input, number of bits in range */
+{
+ int i;
+ int mask = ((ub4)1<<nbits)-1; /* all ones */
+ int const2 = 1+nbits/2;
+ int const3 = 1+nbits/3;
+ int const4 = 1+nbits/4;
+ int const5 = 1+nbits/5;
+ for (i=0; i<20; ++i)
+ {
+ x = (x+(x<<const2)) & mask;
+ x = (x^(x>>const3));
+ x = (x+(x<<const4)) & mask;
+ x = (x^(x>>const5));
+ }
+ return x;
+}
+
+/* initialize scramble[] with distinct random values in 0..smax-1 */
+static void scrambleinit(
+ ub4 *scramble, /* hash is a^scramble[tab[b]] */
+ ub4 smax) /* scramble values should be in 0..smax-1 */
+{
+ ub4 i;
+
+ /* fill scramble[] with distinct random integers in 0..smax-1 */
+ for (i=0; i<SCRAMBLE_LEN; ++i)
+ {
+ scramble[i] = permute(i, phash_log2(smax));
+ }
+}
+
+/*
+ * Check if key1 and key2 are the same.
+ * We already checked (a,b) are the same.
+ */
+static void checkdup(
+ key *key1,
+ key *key2,
+ hashform *form)
+{
+ switch(form->hashtype)
+ {
+ case STRING_HT:
+ if ((key1->len_k == key2->len_k) &&
+ !memcmp(key1->name_k, key2->name_k, (size_t)key1->len_k))
+ {
+ fprintf(stderr, "perfect.c: Duplicates keys! %.*s\n",
+ (int)key1->len_k, key1->name_k);
+ exit(EXIT_FAILURE);
+ }
+ break;
+ case INT_HT:
+ if (key1->hash_k == key2->hash_k)
+ {
+ fprintf(stderr, "perfect.c: Duplicate keys! %.8lx\n", key1->hash_k);
+ exit(EXIT_FAILURE);
+ }
+ break;
+ case AB_HT:
+ fprintf(stderr, "perfect.c: Duplicate keys! %.8lx %.8lx\n",
+ key1->a_k, key1->b_k);
+ exit(EXIT_FAILURE);
+ break;
+ default:
+ fprintf(stderr, "perfect.c: Illegal hash type %ld\n", (ub4)form->hashtype);
+ exit(EXIT_FAILURE);
+ break;
+ }
+}
+
+
+/*
+ * put keys in tabb according to key->b_k
+ * check if the initial hash might work
+ */
+static int inittab(
+ bstuff *tabb, /* output, list of keys with b for (a,b) */
+ ub4 blen, /* length of tabb */
+ key *keys, /* list of keys already hashed */
+ hashform *form, /* user directives */
+ int complete) /* TRUE means to complete init despite collisions */
+{
+ int nocollision = TRUE;
+ key *mykey;
+
+ memset((void *)tabb, 0, (size_t)(sizeof(bstuff)*blen));
+
+ /* Two keys with the same (a,b) guarantees a collision */
+ for (mykey=keys; mykey; mykey=mykey->next_k)
+ {
+ key *otherkey;
+
+ for (otherkey=tabb[mykey->b_k].list_b;
+ otherkey;
+ otherkey=otherkey->nextb_k)
+ {
+ if (mykey->a_k == otherkey->a_k)
+ {
+ nocollision = FALSE;
+ checkdup(mykey, otherkey, form);
+ if (!complete)
+ return FALSE;
+ }
+ }
+ ++tabb[mykey->b_k].listlen_b;
+ mykey->nextb_k = tabb[mykey->b_k].list_b;
+ tabb[mykey->b_k].list_b = mykey;
+ }
+
+ /* no two keys have the same (a,b) pair */
+ return nocollision;
+}
+
+
+/* Do the initial hash for normal mode (use lookup and checksum) */
+static void initnorm(
+ key *keys, /* list of all keys */
+ ub4 alen, /* (a,b) has a in 0..alen-1, a power of 2 */
+ ub4 blen, /* (a,b) has b in 0..blen-1, a power of 2 */
+ ub4 smax, /* maximum range of computable hash values */
+ ub4 salt, /* used to initialize the hash function */
+ gencode *final) /* output, code for the final hash */
+{
+ key *mykey;
+ if (phash_log2(alen)+phash_log2(blen) > UB4BITS)
+ {
+ ub4 initlev = (salt*0x9e3779b9)&0xffffffff; /* the golden ratio; an arbitrary value */
+
+ for (mykey=keys; mykey; mykey=mykey->next_k)
+ {
+ ub4 i, state[CHECKSTATE];
+ for (i=0; i<CHECKSTATE; ++i) state[i] = initlev;
+ phash_checksum( mykey->name_k, mykey->len_k, state);
+ mykey->a_k = state[0]&(alen-1);
+ mykey->b_k = state[1]&(blen-1);
+ }
+ final->used = 4;
+ sprintf(final->line[0],
+ " unsigned long i,state[CHECKSTATE],rsl;\n");
+ sprintf(final->line[1],
+ " for (i=0; i<CHECKSTATE; ++i) state[i]=0x%lx;\n",initlev);
+ sprintf(final->line[2],
+ " phash_checksum(key, len, state);\n");
+ sprintf(final->line[3],
+ " rsl = ((state[0]&0x%lx)^scramble[tab[state[1]&0x%lx]]);\n",
+ alen-1, blen-1);
+ }
+ else
+ {
+ ub4 loga = phash_log2(alen); /* log based 2 of blen */
+ ub4 initlev = (salt*0x9e3779b9)&0xffffffff; /* the golden ratio; an arbitrary value */
+
+ for (mykey=keys; mykey; mykey=mykey->next_k)
+ {
+ ub4 hash = phash_lookup(mykey->name_k, mykey->len_k, initlev);
+ mykey->a_k = (loga > 0) ? hash>>(UB4BITS-loga) : 0;
+ mykey->b_k = (blen > 1) ? hash&(blen-1) : 0;
+ }
+ final->used = 2;
+ sprintf(final->line[0],
+ " unsigned long rsl, val = phash_lookup(key, len, 0x%lxUL);\n", initlev);
+ if (smax <= 1)
+ {
+ sprintf(final->line[1], " rsl = 0;\n");
+ }
+ else if (blen < USE_SCRAMBLE)
+ {
+ sprintf(final->line[1], " rsl = ((val>>%ld)^tab[val&0x%lx]);\n",
+ UB4BITS-phash_log2(alen), blen-1);
+ }
+ else
+ {
+ sprintf(final->line[1], " rsl = ((val>>%ld)^scramble[tab[val&0x%lx]]);\n",
+ UB4BITS-phash_log2(alen), blen-1);
+ }
+ }
+}
+
+
+
+/* Do initial hash for inline mode */
+static void initinl(
+ key *keys, /* list of all keys */
+ ub4 alen, /* (a,b) has a in 0..alen-1, a power of 2 */
+ ub4 blen, /* (a,b) has b in 0..blen-1, a power of 2 */
+ ub4 smax, /* range of computable hash values */
+ ub4 salt, /* used to initialize the hash function */
+ gencode *final) /* generated code for final hash */
+{
+ key *mykey;
+ ub4 amask = alen-1;
+ ub4 blog = phash_log2(blen);
+ ub4 initval = salt*0x9e3779b9; /* the golden ratio; an arbitrary value */
+
+ /* It's more important to have b uniform than a, so b is the low bits */
+ for (mykey = keys; mykey != (key *)0; mykey = mykey->next_k)
+ {
+ ub4 hash = initval;
+ ub4 i;
+ for (i=0; i<mykey->len_k; ++i)
+ {
+ hash = ((ub1)mykey->name_k[i] ^ hash) + ((hash<<(UB4BITS-6))+(hash>>6));
+ }
+ mykey->hash_k = hash;
+ mykey->a_k = (alen > 1) ? (hash & amask) : 0;
+ mykey->b_k = (blen > 1) ? (hash >> (UB4BITS-blog)) : 0;
+ }
+ final->used = 1;
+ if (smax <= 1)
+ {
+ sprintf(final->line[0], " unsigned long rsl = 0;\n");
+ }
+ else if (blen < USE_SCRAMBLE)
+ {
+ sprintf(final->line[0], " unsigned long rsl = ((val & 0x%lx) ^ tab[val >> %ld]);\n",
+ amask, UB4BITS-blog);
+ }
+ else
+ {
+ sprintf(final->line[0], " unsigned long rsl = ((val & 0x%lx) ^ scramble[tab[val >> %ld]]);\n",
+ amask, UB4BITS-blog);
+ }
+}
+
+
+/*
+ * Run a hash function on the key to get a and b
+ * Returns:
+ * 0: didn't find distinct (a,b) for all keys
+ * 1: found distinct (a,b) for all keys, put keys in tabb[]
+ * 2: found a perfect hash, no need to do any more work
+ */
+static ub4 initkey(
+ key *keys, /* list of all keys */
+ ub4 nkeys, /* total number of keys */
+ bstuff *tabb, /* stuff indexed by b */
+ ub4 alen, /* (a,b) has a in 0..alen-1, a power of 2 */
+ ub4 blen, /* (a,b) has b in 0..blen-1, a power of 2 */
+ ub4 smax, /* range of computable hash values */
+ ub4 salt, /* used to initialize the hash function */
+ hashform *form, /* user directives */
+ gencode *final) /* code for final hash */
+{
+ /* Do the initial hash of the keys */
+ switch(form->mode)
+ {
+ case NORMAL_HM:
+ initnorm(keys, alen, blen, smax, salt, final);
+ break;
+ case INLINE_HM:
+ initinl(keys, alen, blen, smax, salt, final);
+ break;
+#if 0
+ case HEX_HM:
+ case DECIMAL_HM:
+ finished = inithex(keys, nkeys, alen, blen, smax, salt, final, form);
+ if (finished) return 2;
+ break;
+#endif
+ default:
+ fprintf(stderr, "fatal error: illegal mode\n");
+ exit(1);
+ }
+
+ if (nkeys <= 1)
+ {
+ final->used = 1;
+ sprintf(final->line[0], " unsigned long rsl = 0;\n");
+ return 2;
+ }
+
+ return inittab(tabb, blen, keys, form, FALSE);
+}
+
+/* Print an error message and exit if there are duplicates */
+static void duplicates(
+ bstuff *tabb, /* array of lists of keys with the same b */
+ ub4 blen, /* length of tabb, a power of 2 */
+ key *keys,
+ hashform *form) /* user directives */
+{
+ ub4 i;
+ key *key1;
+ key *key2;
+
+ (void)inittab(tabb, blen, keys, form, TRUE);
+
+ /* for each b, do nested loops through key list looking for duplicates */
+ for (i=0; i<blen; ++i)
+ for (key1=tabb[i].list_b; key1; key1=key1->nextb_k)
+ for (key2=key1->nextb_k; key2; key2=key2->nextb_k)
+ checkdup(key1, key2, form);
+}
+
+
+/* Try to apply an augmenting list */
+static int apply(
+ bstuff *tabb,
+ hstuff *tabh,
+ qstuff *tabq,
+ ub4 blen,
+ ub4 *scramble,
+ ub4 tail,
+ int rollback) /* FALSE applies augmenting path, TRUE rolls back */
+{
+ ub4 hash;
+ key *mykey;
+ bstuff *pb;
+ ub4 child;
+ ub4 parent;
+ ub4 stabb; /* scramble[tab[b]] */
+
+ /* walk from child to parent */
+ for (child=tail-1; child; child=parent)
+ {
+ parent = tabq[child].parent_q; /* find child's parent */
+ pb = tabq[parent].b_q; /* find parent's list of siblings */
+
+ /* erase old hash values */
+ stabb = scramble[pb->val_b];
+ for (mykey=pb->list_b; mykey; mykey=mykey->nextb_k)
+ {
+ hash = mykey->a_k^stabb;
+ if (mykey == tabh[hash].key_h)
+ { /* erase hash for all of child's siblings */
+ tabh[hash].key_h = (key *)0;
+ }
+ }
+
+ /* change pb->val_b, which will change the hashes of all parent siblings */
+ pb->val_b = (rollback ? tabq[child].oldval_q : tabq[child].newval_q);
+
+ /* set new hash values */
+ stabb = scramble[pb->val_b];
+ for (mykey=pb->list_b; mykey; mykey=mykey->nextb_k)
+ {
+ hash = mykey->a_k^stabb;
+ if (rollback)
+ {
+ if (parent == 0) continue; /* root never had a hash */
+ }
+ else if (tabh[hash].key_h)
+ {
+ /* very rare: roll back any changes */
+ apply(tabb, tabh, tabq, blen, scramble, tail, TRUE);
+ return FALSE; /* failure, collision */
+ }
+ tabh[hash].key_h = mykey;
+ }
+ }
+ return TRUE;
+}
+
+
+/*
+-------------------------------------------------------------------------------
+augment(): Add item to the mapping.
+
+Construct a spanning tree of *b*s with *item* as root, where each
+parent can have all its hashes changed (by some new val_b) with
+at most one collision, and each child is the b of that collision.
+
+I got this from Tarjan's "Data Structures and Network Algorithms". The
+path from *item* to a *b* that can be remapped with no collision is
+an "augmenting path". Change values of tab[b] along the path so that
+the unmapped key gets mapped and the unused hash value gets used.
+
+Assuming 1 key per b, if m out of n hash values are still unused,
+you should expect the transitive closure to cover n/m nodes before
+an unused node is found. Sum(i=1..n)(n/i) is about nlogn, so expect
+this approach to take about nlogn time to map all single-key b's.
+-------------------------------------------------------------------------------
+*/
+static int augment(
+ bstuff *tabb, /* stuff indexed by b */
+ hstuff *tabh, /* which key is associated with which hash, indexed by hash */
+ qstuff *tabq, /* queue of *b* values, this is the spanning tree */
+ ub4 blen, /* length of tabb */
+ ub4 *scramble, /* final hash is a^scramble[tab[b]] */
+ ub4 smax, /* highest value in scramble */
+ bstuff *item, /* &tabb[b] for the b to be mapped */
+ ub4 nkeys, /* final hash must be in 0..nkeys-1 */
+ ub4 highwater, /* a value higher than any now in tabb[].water_b */
+ hashform *form) /* TRUE if we should do a minimal perfect hash */
+{
+ ub4 q; /* current position walking through the queue */
+ ub4 tail; /* tail of the queue. 0 is the head of the queue. */
+ ub4 limit=((blen < USE_SCRAMBLE) ? smax : UB1MAXVAL+1);
+ ub4 highhash = ((form->perfect == MINIMAL_HP) ? nkeys : smax);
+ int trans = (form->speed == SLOW_HS || form->perfect == MINIMAL_HP);
+
+ /* initialize the root of the spanning tree */
+ tabq[0].b_q = item;
+ tail = 1;
+
+ /* construct the spanning tree by walking the queue, add children to tail */
+ for (q=0; q<tail; ++q)
+ {
+ bstuff *myb = tabq[q].b_q; /* the b for this node */
+ ub4 i; /* possible value for myb->val_b */
+
+ if (!trans && (q == 1))
+ break; /* don't do transitive closure */
+
+ for (i=0; i<limit; ++i)
+ {
+ bstuff *childb = (bstuff *)0; /* the b that this i maps to */
+ key *mykey; /* for walking through myb's keys */
+
+ for (mykey = myb->list_b; mykey; mykey=mykey->nextb_k)
+ {
+ key *childkey;
+ ub4 hash = mykey->a_k^scramble[i];
+
+ if (hash >= highhash) break; /* out of bounds */
+ childkey = tabh[hash].key_h;
+
+ if (childkey)
+ {
+ bstuff *hitb = &tabb[childkey->b_k];
+
+ if (childb)
+ {
+ if (childb != hitb) break; /* hit at most one child b */
+ }
+ else
+ {
+ childb = hitb; /* remember this as childb */
+ if (childb->water_b == highwater) break; /* already explored */
+ }
+ }
+ }
+ if (mykey) continue; /* myb with i has multiple collisions */
+
+ /* add childb to the queue of reachable things */
+ if (childb) childb->water_b = highwater;
+ tabq[tail].b_q = childb;
+ tabq[tail].newval_q = i; /* how to make parent (myb) use this hash */
+ tabq[tail].oldval_q = myb->val_b; /* need this for rollback */
+ tabq[tail].parent_q = q;
+ ++tail;
+
+ if (!childb)
+ { /* found an *i* with no collisions? */
+ /* try to apply the augmenting path */
+ if (apply(tabb, tabh, tabq, blen, scramble, tail, FALSE))
+ return TRUE; /* success, item was added to the perfect hash */
+
+ --tail; /* don't know how to handle such a child! */
+ }
+ }
+ }
+ return FALSE;
+}
+
+
+/* find a mapping that makes this a perfect hash */
+static int perfect(
+ bstuff *tabb,
+ hstuff *tabh,
+ qstuff *tabq,
+ ub4 blen,
+ ub4 smax,
+ ub4 *scramble,
+ ub4 nkeys,
+ hashform *form)
+{
+ ub4 maxkeys; /* maximum number of keys for any b */
+ ub4 i, j;
+
+ /* clear any state from previous attempts */
+ memset((void *)tabh, 0,
+ (size_t)(sizeof(hstuff)*
+ ((form->perfect == MINIMAL_HP) ? nkeys : smax)));
+ memset((void *)tabq, 0, (size_t)(sizeof(qstuff)*(blen+1)));
+
+ for (maxkeys=0,i=0; i<blen; ++i)
+ if (tabb[i].listlen_b > maxkeys)
+ maxkeys = tabb[i].listlen_b;
+
+ /* In descending order by number of keys, map all *b*s */
+ for (j=maxkeys; j>0; --j)
+ for (i=0; i<blen; ++i)
+ if (tabb[i].listlen_b == j)
+ if (!augment(tabb, tabh, tabq, blen, scramble, smax, &tabb[i], nkeys,
+ i+1, form))
+ {
+ printf("fail to map group of size %ld for tab size %ld\n", j, blen);
+ return FALSE;
+ }
+
+ /* Success! We found a perfect hash of all keys into 0..nkeys-1. */
+ return TRUE;
+}
+
+
+/*
+ * Simple case: user gave (a,b). No more mixing, no guessing alen or blen.
+ * This assumes a,b reside in (key->a_k, key->b_k), and final->form == AB_HK.
+ */
+static void hash_ab(
+ bstuff **tabb, /* output, tab[] of the perfect hash, length *blen */
+ ub4 *alen, /* output, 0..alen-1 is range for a of (a,b) */
+ ub4 *blen, /* output, 0..blen-1 is range for b of (a,b) */
+ ub4 *salt, /* output, initializes initial hash */
+ gencode *final, /* code for final hash */
+ ub4 *scramble, /* input, hash = a^scramble[tab[b]] */
+ ub4 *smax, /* input, scramble[i] in 0..smax-1 */
+ key *keys, /* input, keys to hash */
+ ub4 nkeys, /* input, number of keys being hashed */
+ hashform *form) /* user directives */
+{
+ hstuff *tabh;
+ qstuff *tabq;
+ key *mykey;
+ ub4 i;
+ int used_tab;
+
+ /* initially make smax the first power of two bigger than nkeys */
+ *smax = ((ub4)1<<phash_log2(nkeys));
+ scrambleinit(scramble, *smax);
+
+ /* set *alen and *blen based on max A and B from user */
+ *alen = 1;
+ *blen = 1;
+ for (mykey = keys; mykey != (key *)0; mykey = mykey->next_k)
+ {
+ while (*alen <= mykey->a_k) *alen *= 2;
+ while (*blen <= mykey->b_k) *blen *= 2;
+ }
+ if (*alen > 2**smax)
+ {
+ fprintf(stderr,
+ "perfect.c: Can't deal with (A,B) having A bigger than twice \n");
+ fprintf(stderr,
+ " the smallest power of two greater or equal to any legal hash.\n");
+ exit(EXIT_FAILURE);
+ }
+
+ /* allocate working memory */
+ *tabb = (bstuff *)yasm_xmalloc((size_t)(sizeof(bstuff)*(*blen)));
+ tabq = (qstuff *)yasm_xmalloc(sizeof(qstuff)*(*blen+1));
+ tabh = (hstuff *)yasm_xmalloc(sizeof(hstuff)*(form->perfect == MINIMAL_HP ?
+ nkeys : *smax));
+
+ /* check that (a,b) are distinct and put them in tabb indexed by b */
+ (void)inittab(*tabb, *blen, keys, form, FALSE);
+
+ /* try with smax */
+ if (!perfect(*tabb, tabh, tabq, *blen, *smax, scramble, nkeys, form))
+ {
+ if (form->perfect == MINIMAL_HP)
+ {
+ printf("fatal error: Cannot find perfect hash for user (A,B) pairs\n");
+ exit(EXIT_FAILURE);
+ }
+ else
+ {
+ /* try with 2*smax */
+ free((void *)tabh);
+ *smax = *smax * 2;
+ scrambleinit(scramble, *smax);
+ tabh = (hstuff *)yasm_xmalloc(sizeof(hstuff)*(form->perfect == MINIMAL_HP ?
+ nkeys : *smax));
+ if (!perfect(*tabb, tabh, tabq, *blen, *smax, scramble, nkeys, form))
+ {
+ printf("fatal error: Cannot find perfect hash for user (A,B) pairs\n");
+ exit(EXIT_FAILURE);
+ }
+ }
+ }
+
+ /* check if tab[] was really needed */
+ for (i=0; i<*blen; ++i)
+ {
+ if ((*tabb)[i].val_b != 0) break; /* assumes permute(0) == 0 */
+ }
+ used_tab = (i < *blen);
+
+ /* write the code for the perfect hash */
+ *salt = 1;
+ final->used = 1;
+ if (!used_tab)
+ {
+ sprintf(final->line[0], " unsigned long rsl = a;\n");
+ }
+ else if (*blen < USE_SCRAMBLE)
+ {
+ sprintf(final->line[0], " unsigned long rsl = (a ^ tab[b]);\n");
+ }
+ else
+ {
+ sprintf(final->line[0], " unsigned long rsl = (a ^ scramble[tab[b]]);\n");
+ }
+
+ printf("success, found a perfect hash\n");
+
+ free((void *)tabq);
+ free((void *)tabh);
+}
+
+
+/* guess initial values for alen and blen */
+static void initalen(
+ ub4 *alen, /* output, initial alen */
+ ub4 *blen, /* output, initial blen */
+ ub4 *smax,/* input, power of two greater or equal to max hash value */
+ ub4 nkeys, /* number of keys being hashed */
+ hashform *form) /* user directives */
+{
+ /*
+ * Find initial *alen, *blen
+ * Initial alen and blen values were found empirically. Some factors:
+ *
+ * If smax<256 there is no scramble, so tab[b] needs to cover 0..smax-1.
+ *
+ * alen and blen must be powers of 2 because the values in 0..alen-1 and
+ * 0..blen-1 are produced by applying a bitmask to the initial hash function.
+ *
+ * alen must be less than smax, in fact less than nkeys, because otherwise
+ * there would often be no i such that a^scramble[i] is in 0..nkeys-1 for
+ * all the *a*s associated with a given *b*, so there would be no legal
+ * value to assign to tab[b]. This only matters when we're doing a minimal
+ * perfect hash.
+ *
+ * It takes around 800 trials to find distinct (a,b) with nkey=smax*(5/8)
+ * and alen*blen = smax*smax/32.
+ *
+ * Values of blen less than smax/4 never work, and smax/2 always works.
+ *
+ * We want blen as small as possible because it is the number of bytes in
+ * the huge array we must create for the perfect hash.
+ *
+ * When nkey <= smax*(5/8), blen=smax/4 works much more often with
+ * alen=smax/8 than with alen=smax/4. Above smax*(5/8), blen=smax/4
+ * doesn't seem to care whether alen=smax/8 or alen=smax/4. I think it
+ * has something to do with 5/8 = 1/8 * 5. For example examine 80000,
+ * 85000, and 90000 keys with different values of alen. This only matters
+ * if we're doing a minimal perfect hash.
+ *
+ * When alen*blen <= 1<<UB4BITS, the initial hash must produce one integer.
+ * Bigger than that it must produce two integers, which increases the
+ * cost of the hash per character hashed.
+ */
+ if (form->perfect == NORMAL_HP)
+ {
+ if ((form->speed == FAST_HS) && (nkeys > *smax*0.8))
+ {
+ *smax = *smax * 2;
+ }
+
+ *alen = ((form->hashtype==INT_HT) && *smax>131072) ?
+ ((ub4)1<<(UB4BITS-phash_log2(*blen))) : /* distinct keys => distinct (A,B) */
+ *smax; /* no reason to restrict alen to smax/2 */
+ if ((form->hashtype == INT_HT) && *smax < 32)
+ *blen = *smax; /* go for function speed not space */
+ else if (*smax/4 <= (1<<14))
+ *blen = ((nkeys <= *smax*0.56) ? *smax/32 :
+ (nkeys <= *smax*0.74) ? *smax/16 : *smax/8);
+ else
+ *blen = ((nkeys <= *smax*0.6) ? *smax/16 :
+ (nkeys <= *smax*0.8) ? *smax/8 : *smax/4);
+
+ if ((form->speed == FAST_HS) && (*blen < *smax/8))
+ *blen = *smax/8;
+
+ if (*alen < 1) *alen = 1;
+ if (*blen < 1) *blen = 1;
+ }
+ else
+ {
+ switch(phash_log2(*smax))
+ {
+ case 0:
+ *alen = 1;
+ *blen = 1;
+ case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8:
+ *alen = (form->perfect == NORMAL_HP) ? *smax : *smax/2;
+ *blen = *smax/2;
+ break;
+ case 9:
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ case 17:
+ if (form->speed == FAST_HS)
+ {
+ *alen = *smax/2;
+ *blen = *smax/4;
+ }
+ else if (*smax/4 < USE_SCRAMBLE)
+ {
+ *alen = ((nkeys <= *smax*0.52) ? *smax/8 : *smax/4);
+ *blen = ((nkeys <= *smax*0.52) ? *smax/8 : *smax/4);
+ }
+ else
+ {
+ *alen = ((nkeys <= *smax*(5.0/8.0)) ? *smax/8 :
+ (nkeys <= *smax*(3.0/4.0)) ? *smax/4 : *smax/2);
+ *blen = *smax/4; /* always give the small size a shot */
+ }
+ break;
+ case 18:
+ if (form->speed == FAST_HS)
+ {
+ *alen = *smax/2;
+ *blen = *smax/2;
+ }
+ else
+ {
+ *alen = *smax/8; /* never require the multiword hash */
+ *blen = (nkeys <= *smax*(5.0/8.0)) ? *smax/4 : *smax/2;
+ }
+ break;
+ case 19:
+ case 20:
+ *alen = (nkeys <= *smax*(5.0/8.0)) ? *smax/8 : *smax/2;
+ *blen = (nkeys <= *smax*(5.0/8.0)) ? *smax/4 : *smax/2;
+ break;
+ default:
+ *alen = *smax/2; /* just find a hash as quick as possible */
+ *blen = *smax/2; /* we'll be thrashing virtual memory at this size */
+ break;
+ }
+ }
+}
+
+/*
+** Try to find a perfect hash function.
+** Return the successful initializer for the initial hash.
+** Return 0 if no perfect hash could be found.
+*/
+void findhash(
+ bstuff **tabb, /* output, tab[] of the perfect hash, length *blen */
+ hstuff **tabh, /* output, table of keys indexed by hash value */
+ ub4 *alen, /* output, 0..alen-1 is range for a of (a,b) */
+ ub4 *blen, /* output, 0..blen-1 is range for b of (a,b) */
+ ub4 *salt, /* output, initializes initial hash */
+ gencode *final, /* code for final hash */
+ ub4 *scramble, /* input, hash = a^scramble[tab[b]] */
+ ub4 *smax, /* input, scramble[i] in 0..smax-1 */
+ key *keys, /* input, keys to hash */
+ ub4 nkeys, /* input, number of keys being hashed */
+ hashform *form) /* user directives */
+{
+ ub4 bad_initkey; /* how many times did initkey fail? */
+ ub4 bad_perfect; /* how many times did perfect fail? */
+ ub4 trysalt; /* trial initializer for initial hash */
+ ub4 maxalen;
+ qstuff *tabq; /* table of stuff indexed by queue value, used by augment */
+
+ /* The case of (A,B) supplied by the user is a special case */
+ if (form->hashtype == AB_HT)
+ {
+ hash_ab(tabb, alen, blen, salt, final,
+ scramble, smax, keys, nkeys, form);
+ return;
+ }
+
+ /* guess initial values for smax, alen and blen */
+ *smax = ((ub4)1<<phash_log2(nkeys));
+ initalen(alen, blen, smax, nkeys, form);
+
+ scrambleinit(scramble, *smax);
+
+ maxalen = (form->perfect == MINIMAL_HP) ? *smax/2 : *smax;
+
+ /* allocate working memory */
+ *tabb = (bstuff *)yasm_xmalloc((size_t)(sizeof(bstuff)*(*blen)));
+ tabq = (qstuff *)yasm_xmalloc(sizeof(qstuff)*(*blen+1));
+ *tabh = (hstuff *)yasm_xmalloc(sizeof(hstuff)*(form->perfect == MINIMAL_HP ?
+ nkeys : *smax));
+
+ /* Actually find the perfect hash */
+ *salt = 0;
+ bad_initkey = 0;
+ bad_perfect = 0;
+ for (trysalt=1; ; ++trysalt)
+ {
+ ub4 rslinit;
+ /* Try to find distinct (A,B) for all keys */
+
+ rslinit = initkey(keys, nkeys, *tabb, *alen, *blen, *smax, trysalt,
+ form, final);
+
+ if (rslinit == 2)
+ { /* initkey actually found a perfect hash, not just distinct (a,b) */
+ *salt = 1;
+ *blen = 0;
+ break;
+ }
+ else if (rslinit == 0)
+ {
+ /* didn't find distinct (a,b) */
+ if (++bad_initkey >= RETRY_INITKEY)
+ {
+ /* Try to put more bits in (A,B) to make distinct (A,B) more likely */
+ if (*alen < maxalen)
+ {
+ *alen *= 2;
+ }
+ else if (*blen < *smax)
+ {
+ *blen *= 2;
+ free(tabq);
+ free(*tabb);
+ *tabb = (bstuff *)yasm_xmalloc((size_t)(sizeof(bstuff)*(*blen)));
+ tabq = (qstuff *)yasm_xmalloc((size_t)(sizeof(qstuff)*(*blen+1)));
+ }
+ else
+ {
+ duplicates(*tabb, *blen, keys, form); /* check for duplicates */
+ printf("fatal error: Cannot perfect hash: cannot find distinct (A,B)\n");
+ exit(EXIT_FAILURE);
+ }
+ bad_initkey = 0;
+ bad_perfect = 0;
+ }
+ continue; /* two keys have same (a,b) pair */
+ }
+
+ printf("found distinct (A,B) on attempt %ld\n", trysalt);
+
+ /* Given distinct (A,B) for all keys, build a perfect hash */
+ if (!perfect(*tabb, *tabh, tabq, *blen, *smax, scramble, nkeys, form))
+ {
+ if ((form->hashtype != INT_HT && ++bad_perfect >= RETRY_PERFECT) ||
+ (form->hashtype == INT_HT && ++bad_perfect >= RETRY_HEX))
+ {
+ if (*blen < *smax)
+ {
+ *blen *= 2;
+ free(*tabb);
+ free(tabq);
+ *tabb = (bstuff *)yasm_xmalloc((size_t)(sizeof(bstuff)*(*blen)));
+ tabq = (qstuff *)yasm_xmalloc((size_t)(sizeof(qstuff)*(*blen+1)));
+ --trysalt; /* we know this salt got distinct (A,B) */
+ }
+ else
+ {
+ printf("fatal error: Cannot perfect hash: cannot build tab[]\n");
+ exit(EXIT_FAILURE);
+ }
+ bad_perfect = 0;
+ }
+ continue;
+ }
+
+ *salt = trysalt;
+ break;
+ }
+
+ printf("built perfect hash table of size %ld\n", *blen);
+
+ /* free working memory */
+ free((void *)tabq);
+}
+
+#if 0
+/*
+------------------------------------------------------------------------------
+Input/output type routines
+------------------------------------------------------------------------------
+*/
+
+/* get the list of keys */
+static void getkeys(keys, nkeys, textroot, keyroot, form)
+key **keys; /* list of all keys */
+ub4 *nkeys; /* number of keys */
+reroot *textroot; /* get space to store key text */
+reroot *keyroot; /* get space for keys */
+hashform *form; /* user directives */
+{
+ key *mykey;
+ char *mytext;
+ mytext = (char *)renew(textroot);
+ *keys = 0;
+ *nkeys = 0;
+ while (fgets(mytext, MAXKEYLEN, stdin))
+ {
+ mykey = (key *)renew(keyroot);
+ if (form->mode == AB_HM)
+ {
+ sscanf(mytext, "%lx %lx ", &mykey->a_k, &mykey->b_k);
+ }
+ else if (form->mode == ABDEC_HM)
+ {
+ sscanf(mytext, "%ld %ld ", &mykey->a_k, &mykey->b_k);
+ }
+ else if (form->mode == HEX_HM)
+ {
+ sscanf(mytext, "%lx ", &mykey->hash_k);
+ }
+ else if (form->mode == DECIMAL_HM)
+ {
+ sscanf(mytext, "%ld ", &mykey->hash_k);
+ }
+ else
+ {
+ mykey->name_k = (ub1 *)mytext;
+ mytext = (char *)renew(textroot);
+ mykey->len_k = (ub4)(strlen((char *)mykey->name_k)-1);
+ }
+ mykey->next_k = *keys;
+ *keys = mykey;
+ ++*nkeys;
+ }
+ redel(textroot, mytext);
+}
+
+/* make the .c file */
+static void make_c(tab, smax, blen, scramble, final, form)
+bstuff *tab; /* table indexed by b */
+ub4 smax; /* range of scramble[] */
+ub4 blen; /* b in 0..blen-1, power of 2 */
+ub4 *scramble; /* used in final hash */
+gencode *final; /* code for the final hash */
+hashform *form; /* user directives */
+{
+ ub4 i;
+ FILE *f;
+ f = fopen("phash.c", "w");
+ fprintf(f, "/* table for the mapping for the perfect hash */\n");
+ fprintf(f, "#include \"lookupa.h\"\n");
+ fprintf(f, "\n");
+ if (blen >= USE_SCRAMBLE)
+ {
+ fprintf(f, "/* A way to make the 1-byte values in tab bigger */\n");
+ if (smax > UB2MAXVAL+1)
+ {
+ fprintf(f, "unsigned long scramble[] = {\n");
+ for (i=0; i<=UB1MAXVAL; i+=4)
+ fprintf(f, "0x%.8lx, 0x%.8lx, 0x%.8lx, 0x%.8lx,\n",
+ scramble[i+0], scramble[i+1], scramble[i+2], scramble[i+3]);
+ }
+ else
+ {
+ fprintf(f, "unsigned short scramble[] = {\n");
+ for (i=0; i<=UB1MAXVAL; i+=8)
+ fprintf(f,
+"0x%.4lx, 0x%.4lx, 0x%.4lx, 0x%.4lx, 0x%.4lx, 0x%.4lx, 0x%.4lx, 0x%.4lx,\n",
+ scramble[i+0], scramble[i+1], scramble[i+2], scramble[i+3],
+ scramble[i+4], scramble[i+5], scramble[i+6], scramble[i+7]);
+ }
+ fprintf(f, "};\n");
+ fprintf(f, "\n");
+ }
+ if (blen > 0)
+ {
+ fprintf(f, "/* small adjustments to _a_ to make values distinct */\n");
+
+ if (smax <= UB1MAXVAL+1 || blen >= USE_SCRAMBLE)
+ fprintf(f, "unsigned char tab[] = {\n");
+ else
+ fprintf(f, "unsigned short tab[] = {\n");
+
+ if (blen < 16)
+ {
+ for (i=0; i<blen; ++i) fprintf(f, "%3d,", scramble[tab[i].val_b]);
+ }
+ else if (blen <= 1024)
+ {
+ for (i=0; i<blen; i+=16)
+ fprintf(f, "%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,\n",
+ scramble[tab[i+0].val_b], scramble[tab[i+1].val_b],
+ scramble[tab[i+2].val_b], scramble[tab[i+3].val_b],
+ scramble[tab[i+4].val_b], scramble[tab[i+5].val_b],
+ scramble[tab[i+6].val_b], scramble[tab[i+7].val_b],
+ scramble[tab[i+8].val_b], scramble[tab[i+9].val_b],
+ scramble[tab[i+10].val_b], scramble[tab[i+11].val_b],
+ scramble[tab[i+12].val_b], scramble[tab[i+13].val_b],
+ scramble[tab[i+14].val_b], scramble[tab[i+15].val_b]);
+ }
+ else if (blen < USE_SCRAMBLE)
+ {
+ for (i=0; i<blen; i+=8)
+ fprintf(f, "%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,\n",
+ scramble[tab[i+0].val_b], scramble[tab[i+1].val_b],
+ scramble[tab[i+2].val_b], scramble[tab[i+3].val_b],
+ scramble[tab[i+4].val_b], scramble[tab[i+5].val_b],
+ scramble[tab[i+6].val_b], scramble[tab[i+7].val_b]);
+ }
+ else
+ {
+ for (i=0; i<blen; i+=16)
+ fprintf(f, "%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld,\n",
+ tab[i+0].val_b, tab[i+1].val_b,
+ tab[i+2].val_b, tab[i+3].val_b,
+ tab[i+4].val_b, tab[i+5].val_b,
+ tab[i+6].val_b, tab[i+7].val_b,
+ tab[i+8].val_b, tab[i+9].val_b,
+ tab[i+10].val_b, tab[i+11].val_b,
+ tab[i+12].val_b, tab[i+13].val_b,
+ tab[i+14].val_b, tab[i+15].val_b);
+ }
+ fprintf(f, "};\n");
+ fprintf(f, "\n");
+ }
+ fprintf(f, "/* The hash function */\n");
+ switch(form->mode)
+ {
+ case NORMAL_HM:
+ fprintf(f, "ub4 phash(key, len)\n");
+ fprintf(f, "char *key;\n");
+ fprintf(f, "int len;\n");
+ break;
+ case INLINE_HM:
+ case HEX_HM:
+ case DECIMAL_HM:
+ fprintf(f, "ub4 phash(val)\n");
+ fprintf(f, "ub4 val;\n");
+ break;
+ case AB_HM:
+ case ABDEC_HM:
+ fprintf(f, "ub4 phash(a,b)\n");
+ fprintf(f, "ub4 a;\n");
+ fprintf(f, "ub4 b;\n");
+ break;
+ }
+ fprintf(f, "{\n");
+ for (i=0; i<final->used; ++i)
+ fprintf(f, final->line[i]);
+ fprintf(f, " return rsl;\n");
+ fprintf(f, "}\n");
+ fprintf(f, "\n");
+ fclose(f);
+}
+
+/*
+------------------------------------------------------------------------------
+Read in the keys, find the hash, and write the .c and .h files
+------------------------------------------------------------------------------
+*/
+static void driver(form)
+hashform *form; /* user directives */
+{
+ ub4 nkeys; /* number of keys */
+ key *keys; /* head of list of keys */
+ bstuff *tab; /* table indexed by b */
+ ub4 smax; /* scramble[] values in 0..smax-1, a power of 2 */
+ ub4 alen; /* a in 0..alen-1, a power of 2 */
+ ub4 blen; /* b in 0..blen-1, a power of 2 */
+ ub4 salt; /* a parameter to the hash function */
+ reroot *textroot; /* MAXKEYLEN-character text lines */
+ reroot *keyroot; /* source of keys */
+ gencode final; /* code for final hash */
+ ub4 i;
+ ub4 scramble[SCRAMBLE_LEN]; /* used in final hash function */
+ char buf[10][80]; /* buffer for generated code */
+ char *buf2[10]; /* also for generated code */
+
+ /* set up memory sources */
+ textroot = remkroot((size_t)MAXKEYLEN);
+ keyroot = remkroot(sizeof(key));
+
+ /* set up code for final hash */
+ final.line = buf2;
+ final.used = 0;
+ final.len = 10;
+ for (i=0; i<10; ++i) final.line[i] = buf[i];
+
+ /* read in the list of keywords */
+ getkeys(&keys, &nkeys, textroot, keyroot, form);
+ printf("Read in %ld keys\n",nkeys);
+
+ /* find the hash */
+ findhash(&tab, &alen, &blen, &salt, &final,
+ scramble, &smax, keys, nkeys, form);
+
+ /* generate the phash.c file */
+ make_c(tab, smax, blen, scramble, &final, form);
+ printf("Wrote phash.c\n");
+
+ /* clean up memory sources */
+ refree(textroot);
+ refree(keyroot);
+ free((void *)tab);
+ printf("Cleaned up\n");
+}
+
+
+/* Interpret arguments and call the driver */
+/* See usage_error for the expected arguments */
+int main(argc, argv)
+int argc;
+char **argv;
+{
+ int mode_given = FALSE;
+ int minimal_given = FALSE;
+ int speed_given = FALSE;
+ hashform form;
+ char *c;
+
+ /* default behavior */
+ form.mode = NORMAL_HM;
+ form.hashtype = STRING_HT;
+ form.perfect = MINIMAL_HP;
+ form.speed = SLOW_HS;
+
+ /* Generate the [minimal] perfect hash */
+ driver(&form);
+
+ return EXIT_SUCCESS;
+}
+#endif
diff --git a/tools/gap/perfect.h b/tools/gap/perfect.h
new file mode 100644
index 00000000..bfb60010
--- /dev/null
+++ b/tools/gap/perfect.h
@@ -0,0 +1,132 @@
+/*
+------------------------------------------------------------------------------
+perfect.h: code to generate code for a hash for perfect hashing.
+(c) Bob Jenkins, September 1996
+You may use this code in any way you wish, and it is free. No warranty.
+I hereby place this in the public domain.
+Source is http://burtleburtle.net/bob/c/perfect.h
+------------------------------------------------------------------------------
+*/
+
+#ifndef STANDARD
+#include "standard.h"
+#endif
+
+#ifndef PERFECT
+#define PERFECT
+
+#define MAXKEYLEN 30 /* maximum length of a key */
+#define USE_SCRAMBLE 4096 /* use scramble if blen >= USE_SCRAMBLE */
+#define SCRAMBLE_LEN ((ub4)1<<16) /* length of *scramble* */
+#define RETRY_INITKEY 2048 /* number of times to try to find distinct (a,b) */
+#define RETRY_PERFECT 1 /* number of times to try to make a perfect hash */
+#define RETRY_HEX 200 /* RETRY_PERFECT when hex keys given */
+
+/* the generated code for the final hash, assumes initial hash is done */
+struct gencode
+{
+ char **line; /* array of text lines, 80 bytes apiece */
+ /*
+ * The code placed here must declare "ub4 rsl"
+ * and assign it the value of the perfect hash using the function inputs.
+ * Later code will be tacked on which returns rsl or manipulates it according
+ * to the user directives.
+ *
+ * This code is at the top of the routine; it may and must declare any
+ * local variables it needs.
+ *
+ * Each way of filling in **line should be given a comment that is a unique
+ * tag. A testcase named with that tag should also be found which tests
+ * the generated code.
+ */
+ ub4 len; /* number of lines available for final hash */
+ ub4 used; /* number of lines used by final hash */
+
+ ub4 lowbit; /* for HEX, lowest interesting bit */
+ ub4 highbit; /* for HEX, highest interesting bit */
+ ub4 diffbits; /* bits which differ for some key */
+ ub4 i,j,k,l,m,n,o; /* state machine used in hexn() */
+};
+typedef struct gencode gencode;
+
+/* user directives: perfect hash? minimal perfect hash? input is an int? */
+struct hashform
+{
+ enum {
+ NORMAL_HM, /* key is a string */
+ INLINE_HM, /* user will do initial hash, we must choose salt for them */
+ HEX_HM, /* key to be hashed is a hexidecimal 4-byte integer */
+ DECIMAL_HM, /* key to be hashed is a decimal 4-byte integer */
+ AB_HM, /* key to be hashed is "A B", where A and B are (A,B) in hex */
+ ABDEC_HM /* like AB_HM, but in decimal */
+ } mode;
+ enum {
+ STRING_HT, /* key is a string */
+ INT_HT, /* key is an integer */
+ AB_HT /* dunno what key is, but input is distinct (A,B) pair */
+ } hashtype;
+ enum {
+ NORMAL_HP, /* just find a perfect hash */
+ MINIMAL_HP /* find a minimal perfect hash */
+ } perfect;
+ enum {
+ FAST_HS, /* fast mode */
+ SLOW_HS /* slow mode */
+ } speed;
+};
+typedef struct hashform hashform;
+
+/* representation of a key */
+struct key
+{
+ char *name_k; /* the actual key */
+ ub4 len_k; /* the length of the actual key */
+ ub4 hash_k; /* the initial hash value for this key */
+ struct key *next_k; /* next key */
+/* beyond this point is mapping-dependent */
+ ub4 a_k; /* a, of the key maps to (a,b) */
+ ub4 b_k; /* b, of the key maps to (a,b) */
+ struct key *nextb_k; /* next key with this b */
+};
+typedef struct key key;
+
+/* things indexed by b of original (a,b) pair */
+struct bstuff
+{
+ ub2 val_b; /* hash=a^tabb[b].val_b */
+ key *list_b; /* tabb[i].list_b is list of keys with b==i */
+ ub4 listlen_b; /* length of list_b */
+ ub4 water_b; /* high watermark of who has visited this map node */
+};
+typedef struct bstuff bstuff;
+
+/* things indexed by final hash value */
+struct hstuff
+{
+ key *key_h; /* tabh[i].key_h is the key with a hash of i */
+};
+typedef struct hstuff hstuff;
+
+/* things indexed by queue position */
+struct qstuff
+{
+ bstuff *b_q; /* b that currently occupies this hash */
+ ub4 parent_q; /* queue position of parent that could use this hash */
+ ub2 newval_q; /* what to change parent tab[b] to to use this hash */
+ ub2 oldval_q; /* original value of tab[b] */
+};
+typedef struct qstuff qstuff;
+
+/* return ceiling(log based 2 of x) */
+ub4 phash_log2(ub4 x);
+
+/* Given the keys, scramble[], and hash mode, find the perfect hash */
+void findhash(bstuff **tabb, hstuff **tabh, ub4 *alen, ub4 *blen, ub4 *salt,
+ gencode *final, ub4 *scramble, ub4 *smax, key *keys, ub4 nkeys,
+ hashform *form);
+
+/* private, but in a different file because it's excessively verbose */
+int inithex(key *keys, ub4 nkeys, ub4 alen, ub4 blen, ub4 smax, ub4 salt,
+ gencode *final, hashform *form);
+
+#endif /* PERFECT */
diff --git a/tools/gap/standard.h b/tools/gap/standard.h
new file mode 100644
index 00000000..596b8936
--- /dev/null
+++ b/tools/gap/standard.h
@@ -0,0 +1,35 @@
+/*
+------------------------------------------------------------------------------
+Standard definitions and types, Bob Jenkins
+------------------------------------------------------------------------------
+*/
+#ifndef STANDARD
+#define STANDARD
+
+#include <stdio.h>
+#include <stddef.h>
+#include <stdlib.h>
+typedef unsigned long int ub4; /* unsigned 4-byte quantities */
+#define UB4BITS 32
+typedef unsigned short int ub2;
+#define UB2MAXVAL 0xffff
+typedef unsigned char ub1;
+#define UB1MAXVAL 0xff
+typedef int word; /* fastest type available */
+
+#define bis(target,mask) ((target) |= (mask))
+#define bic(target,mask) ((target) &= ~(mask))
+#define bit(target,mask) ((target) & (mask))
+#ifndef align
+# define align(a) (((ub4)a+(sizeof(void *)-1))&(~(sizeof(void *)-1)))
+#endif /* align */
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+#endif /* STANDARD */
diff --git a/tools/python-yasm/Makefile.inc b/tools/python-yasm/Makefile.inc
new file mode 100644
index 00000000..43bca45a
--- /dev/null
+++ b/tools/python-yasm/Makefile.inc
@@ -0,0 +1,55 @@
+# $Id$
+
+PYBINDING_DEPS = tools/python-yasm/bytecode.pxi
+PYBINDING_DEPS += tools/python-yasm/coretype.pxi
+PYBINDING_DEPS += tools/python-yasm/errwarn.pxi
+PYBINDING_DEPS += tools/python-yasm/expr.pxi
+PYBINDING_DEPS += tools/python-yasm/floatnum.pxi
+PYBINDING_DEPS += tools/python-yasm/intnum.pxi
+PYBINDING_DEPS += tools/python-yasm/symrec.pxi
+PYBINDING_DEPS += tools/python-yasm/value.pxi
+
+EXTRA_DIST += tools/python-yasm/setup.py
+EXTRA_DIST += tools/python-yasm/yasm.pyx
+EXTRA_DIST += $(PYBINDING_DEPS)
+
+if HAVE_PYTHON
+
+yasm_python.c: $(srcdir)/tools/python-yasm/yasm.pyx $(PYBINDING_DEPS)
+ $(PYTHON) -c "from Pyrex.Compiler.Main import main; main(command_line=1)" \
+ -o $@ `test -f tools/python-yasm/yasm.pyx || echo '$(srcdir)/'`tools/python-yasm/yasm.pyx
+
+CLEANFILES += yasm_python.c
+
+# Now the Python build magic...
+python-setup.txt: Makefile
+ echo "includes=${DEFAULT_INCLUDES} ${INCLUDES} ${DEFS}" > python-setup.txt
+ echo "sources=${libyasm_a_SOURCES}" >> python-setup.txt
+ echo "srcdir=${srcdir}" >> python-setup.txt
+ echo "gcc=${GCC}" >> python-setup.txt
+
+CLEANFILES += python-setup.txt
+
+.python-build: python-setup.txt yasm_python.c ${libyasm_a_SOURCES}
+ $(PYTHON) `test -f tools/python-yasm/setup.py || echo '$(srcdir)/'`tools/python-yasm/setup.py build
+ touch .python-build
+python-build: .python-build
+
+CLEANFILES += .python-build
+
+python-install: .python-build
+ $(PYTHON) `test -f tools/python-yasm/setup.py || echo '$(srcdir)/'`tools/python-yasm/setup.py install "--install-lib=$(pythondir)"
+
+python-uninstall:
+ rm -f `$(PYTHON) -c "import sys;sys.path.insert(0, '${pythondir}'); import yasm; print yasm.__file__"`
+
+else
+
+python-build:
+python-install:
+python-uninstall:
+
+endif
+
+EXTRA_DIST += tools/python-yasm/tests/Makefile.inc
+include tools/python-yasm/tests/Makefile.inc
diff --git a/tools/python-yasm/bytecode.pxi b/tools/python-yasm/bytecode.pxi
new file mode 100644
index 00000000..1c3e5ab4
--- /dev/null
+++ b/tools/python-yasm/bytecode.pxi
@@ -0,0 +1,191 @@
+# Python bindings for Yasm: Pyrex input file for bytecode.h
+#
+# Copyright (C) 2006 Michael Urman, Peter Johnson
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+cdef extern from "libyasm/bytecode.h":
+ cdef struct yasm_effaddr
+
+ cdef struct yasm_effaddr_callback:
+ void (*destroy) (yasm_effaddr *ea)
+ void (*print_ "print") (yasm_effaddr *ea, FILE *f, int indent_level)
+
+ cdef struct yasm_effaddr:
+ yasm_effaddr_callback *callback
+ yasm_value disp
+ unsigned long segreg
+ unsigned int disp_len
+ unsigned int need_disp
+ unsigned int nosplit
+ unsigned int strong
+
+ cdef struct yasm_immval:
+ yasm_value val
+ unsigned int len
+ unsigned int sign
+
+ cdef struct yasm_dataval
+ cdef struct yasm_datavalhead
+
+ cdef enum yasm_bc_resolve_flags:
+ YASM_BC_RESOLVE_NONE
+ YASM_BC_RESOLVE_ERROR
+ YASM_BC_RESOLVE_MIN_LEN
+ YASM_BC_RESOLVE_UNKNOWN_LEN
+
+ cdef yasm_immval* yasm_imm_create_expr(yasm_expr *e)
+ cdef yasm_expr* yasm_ea_get_disp(yasm_effaddr *ea)
+ cdef void yasm_ea_set_len(yasm_effaddr *ea, unsigned int len)
+ cdef void yasm_ea_set_nosplit(yasm_effaddr *ea, unsigned int nosplit)
+ cdef void yasm_ea_set_strong(yasm_effaddr *ea, unsigned int strong)
+ cdef void yasm_ea_set_segreg(yasm_effaddr *ea, unsigned long segreg)
+ cdef void yasm_ea_destroy(yasm_effaddr *ea)
+ cdef void yasm_ea_print(yasm_effaddr *ea, FILE *f, int indent_level)
+
+ cdef void yasm_bc_set_multiple(yasm_bytecode *bc, yasm_expr *e)
+ cdef yasm_bytecode* yasm_bc_create_data(yasm_datavalhead *datahead,
+ unsigned int size, int append_zero, unsigned long line)
+ cdef yasm_bytecode* yasm_bc_create_leb128(yasm_datavalhead *datahead,
+ int sign, unsigned long line)
+ cdef yasm_bytecode* yasm_bc_create_reserve(yasm_expr *numitems,
+ unsigned int itemsize, unsigned long line)
+ cdef yasm_bytecode* yasm_bc_create_incbin(char *filename,
+ yasm_expr *start, yasm_expr *maxlen, unsigned long line)
+ cdef yasm_bytecode* yasm_bc_create_align(yasm_expr *boundary,
+ yasm_expr *fill, yasm_expr *maxskip,
+ unsigned char **code_fill, unsigned long line)
+ cdef yasm_bytecode* yasm_bc_create_org(unsigned long start,
+ unsigned long line)
+ cdef yasm_bytecode* yasm_bc_create_insn(yasm_arch *arch,
+ unsigned long insn_data[4], int num_operands,
+ yasm_insn_operands *operands, unsigned long line)
+ cdef yasm_bytecode* yasm_bc_create_empty_insn(yasm_arch *arch,
+ unsigned long insn_data[4], int num_operands,
+ yasm_insn_operands *operands, unsigned long line)
+ cdef void yasm_bc_insn_add_prefix(yasm_bytecode *bc,
+ unsigned long prefix_data[4])
+ cdef void yasm_bc_insn_add_seg_prefix(yasm_bytecode *bc,
+ unsigned long segreg)
+ cdef yasm_section* yasm_bc_get_section(yasm_bytecode *bc)
+ cdef void yasm_bc__add_symrec(yasm_bytecode *bc, yasm_symrec *sym)
+ cdef void yasm_bc_destroy(yasm_bytecode *bc)
+ cdef void yasm_bc_print(yasm_bytecode *bc, FILE *f, int indent_level)
+ cdef void yasm_bc_finalize(yasm_bytecode *bc, yasm_bytecode *prev_bc)
+ cdef yasm_intnum *yasm_common_calc_bc_dist(yasm_bytecode *precbc1,
+ yasm_bytecode *precbc2)
+ cdef yasm_bc_resolve_flags yasm_bc_resolve(yasm_bytecode *bc, int save,
+ yasm_calc_bc_dist_func calc_bc_dist)
+ cdef unsigned char* yasm_bc_tobytes(yasm_bytecode *bc,
+ unsigned char *buf, unsigned long *bufsize, int *gap, void *d,
+ yasm_output_value_func output_value,
+ yasm_output_reloc_func output_reloc)
+ cdef int yasm_bc_get_multiple(yasm_bytecode *bc, unsigned long *multiple,
+ yasm_calc_bc_dist_func calc_bc_dist)
+
+ cdef yasm_dataval* yasm_dv_create_expr(yasm_expr *expn)
+ cdef yasm_dataval* yasm_dv_create_string(char *contents, size_t len)
+
+ cdef void yasm_dvs_initialize(yasm_datavalhead *headp)
+ cdef void yasm_dvs_destroy(yasm_datavalhead *headp)
+ cdef yasm_dataval* yasm_dvs_append(yasm_datavalhead *headp,
+ yasm_dataval *dv)
+ cdef void yasm_dvs_print(yasm_datavalhead *headp, FILE *f,
+ int indent_level)
+
+cdef extern from "libyasm/bc-int.h":
+ cdef struct yasm_bytecode_callback:
+ void (*destroy) (void *contents)
+ void (*c_print "print") (void *contents, FILE *f, int indent_level)
+ void (*finalize) (yasm_bytecode *bc, yasm_bytecode *prev_bc)
+ yasm_bc_resolve_flags (*resolve) (yasm_bytecode *bc, int save,
+ yasm_calc_bc_dist_func calc_bc_dist)
+ int (*tobytes) (yasm_bytecode *bc, unsigned char **bufp, void *d,
+ yasm_output_value_func output_value,
+ yasm_output_reloc_func output_reloc)
+ int reserve
+
+ cdef struct yasm_bytecode:
+ yasm_bytecode_callback *callback
+ yasm_section *section
+ yasm_expr *multiple
+ unsigned long len
+ unsigned long line
+ unsigned long offset
+ unsigned long opt_flags
+ yasm_symrec **symrecs
+ void *contents
+
+ cdef yasm_bytecode *yasm_bc_create_common(yasm_bytecode_callback *callback,
+ void *contents, unsigned long line)
+
+ cdef void yasm_bc_transform(yasm_bytecode *bc,
+ yasm_bytecode_callback *callback, void *contents)
+
+ cdef void yasm_bc_finalize_common(yasm_bytecode *bc, yasm_bytecode *prev_bc)
+
+ cdef yasm_bytecode *yasm_bc__next(yasm_bytecode *bc)
+
+cdef object __make_immval(yasm_immval *imm):
+ return ImmVal(__pass_voidp(imm, ImmVal))
+
+cdef class ImmVal:
+ cdef yasm_immval *imm
+
+ def __new__(self, value):
+ if isinstance(value, Expression):
+ self.imm = yasm_imm_create_expr(
+ yasm_expr_copy((<Expression>value).expr))
+ elif PyCObject_Check(value):
+ self.imm = <yasm_immval *>__get_voidp(value, ImmVal)
+ else:
+ raise TypeError
+
+cdef class Bytecode:
+ cdef yasm_bytecode *bc
+
+ property len:
+ def __get__(self): return self.bc.len
+ def __set__(self, value): self.bc.len = value
+ property line:
+ def __get__(self): return self.bc.line
+ def __set__(self, value): self.bc.line = value
+ property offset:
+ def __get__(self): return self.bc.offset
+ def __set__(self, value): self.bc.offset = value
+ property opt_flags:
+ def __get__(self): return self.bc.opt_flags
+ def __set__(self, value): self.bc.opt_flags = value
+ property symbols:
+ # Someday extend this to do something modifiable, e.g. return a
+ # list-like object.
+ def __get__(self):
+ cdef yasm_symrec *sym
+ cdef int i
+ s = []
+ i = 0
+ sym = self.bc.symrecs[i]
+ while sym != NULL:
+ s.append(__make_symbol(sym))
+ i = i+1
+ sym = self.bc.symrecs[i]
+ return s
diff --git a/tools/python-yasm/coretype.pxi b/tools/python-yasm/coretype.pxi
new file mode 100644
index 00000000..c0aabcad
--- /dev/null
+++ b/tools/python-yasm/coretype.pxi
@@ -0,0 +1,124 @@
+# Python bindings for Yasm: Pyrex input file for coretype.h
+#
+# Copyright (C) 2006 Michael Urman, Peter Johnson
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+cdef extern struct FILE:
+ int fileno
+
+ctypedef unsigned long size_t
+
+cdef extern struct va_list:
+ int arglist
+
+cdef extern from "libyasm/coretype.h":
+ cdef struct yasm_arch
+ cdef struct yasm_preproc
+ cdef struct yasm_parser
+ cdef struct yasm_optimizer
+ cdef struct yasm_objfmt
+ cdef struct yasm_dbgfmt
+ cdef struct yasm_listfmt
+
+ cdef struct yasm_assoc_data_callback:
+ void (*destroy) (void *data)
+ void (*print_ "print") (void *data, FILE *f, int indent_level)
+
+ cdef struct yasm_errwarns
+
+ cdef struct yasm_bytecode
+ cdef struct yasm_object
+ cdef struct yasm_section
+ cdef struct yasm_symtab
+ cdef struct yasm_symrec
+ cdef struct yasm_expr
+ cdef struct yasm_intnum
+ cdef struct yasm_floatnum
+
+ cdef struct yasm_value:
+ yasm_expr *abs
+ yasm_symrec *rel
+ yasm_symrec *wrt
+ unsigned int seg_of
+ unsigned int rshift
+ unsigned int curpos_rel
+ unsigned int ip_rel
+ unsigned int section_rel
+ unsigned int size
+
+ cdef struct yasm_linemap
+ cdef struct yasm_valparam
+ cdef struct yasm_valparamhead
+ cdef struct yasm_insn_operands
+
+ ctypedef enum yasm_expr_op:
+ YASM_EXPR_IDENT
+ YASM_EXPR_ADD
+ YASM_EXPR_SUB
+ YASM_EXPR_MUL
+ YASM_EXPR_DIV
+ YASM_EXPR_SIGNDIV
+ YASM_EXPR_MOD
+ YASM_EXPR_SIGNMOD
+ YASM_EXPR_NEG
+ YASM_EXPR_NOT
+ YASM_EXPR_OR
+ YASM_EXPR_AND
+ YASM_EXPR_XOR
+ YASM_EXPR_XNOR
+ YASM_EXPR_NOR
+ YASM_EXPR_SHL
+ YASM_EXPR_SHR
+ YASM_EXPR_LOR
+ YASM_EXPR_LAND
+ YASM_EXPR_LNOT
+ YASM_EXPR_LXOR
+ YASM_EXPR_LXNOR
+ YASM_EXPR_LNOR
+ YASM_EXPR_LT
+ YASM_EXPR_GT
+ YASM_EXPR_EQ
+ YASM_EXPR_LE
+ YASM_EXPR_GE
+ YASM_EXPR_NE
+ YASM_EXPR_NONNUM
+ YASM_EXPR_SEG
+ YASM_EXPR_WRT
+ YASM_EXPR_SEGOFF
+
+ ctypedef enum yasm_sym_vis:
+ YASM_SYM_LOCAL
+ YASM_SYM_GLOBAL
+ YASM_SYM_COMMON
+ YASM_SYM_EXTERN
+ YASM_SYM_DLOCAL
+
+ ctypedef yasm_intnum*(*yasm_calc_bc_dist_func)(yasm_bytecode *precbc1,
+ yasm_bytecode *precbc2)
+ ctypedef int*(*yasm_output_value_func)(yasm_value *value, unsigned char
+ *buf, size_t destsize, unsigned long offset, yasm_bytecode *bc,
+ int warn, void *d)
+ ctypedef int(*yasm_output_reloc_func)(yasm_symrec *sym,
+ yasm_bytecode *bc, unsigned char *buf, size_t destsize,
+ size_t valsize, int warn, void *d)
+
diff --git a/tools/python-yasm/errwarn.pxi b/tools/python-yasm/errwarn.pxi
new file mode 100644
index 00000000..390391b2
--- /dev/null
+++ b/tools/python-yasm/errwarn.pxi
@@ -0,0 +1,144 @@
+# Python bindings for Yasm: Pyrex input file for errwarn.h
+#
+# Copyright (C) 2006 Peter Johnson
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+cdef extern from "libyasm/errwarn.h":
+ ctypedef enum yasm_warn_class:
+ YASM_WARN_NONE
+ YASM_WARN_GENERAL
+ YASM_WARN_UNREC_CHAR
+ YASM_WARN_PREPROC
+ YASM_WARN_ORPHAN_LABEL
+ YASM_WARN_UNINIT_CONTENTS
+
+ ctypedef enum yasm_error_class:
+ YASM_ERROR_NONE
+ YASM_ERROR_GENERAL
+ YASM_ERROR_ARITHMETIC
+ YASM_ERROR_OVERFLOW
+ YASM_ERROR_FLOATING_POINT
+ YASM_ERROR_ZERO_DIVISION
+ YASM_ERROR_ASSERTION
+ YASM_ERROR_VALUE
+ YASM_ERROR_NOT_ABSOLUTE
+ YASM_ERROR_TOO_COMPLEX
+ YASM_ERROR_NOT_CONSTANT
+ YASM_ERROR_IO
+ YASM_ERROR_NOT_IMPLEMENTED
+ YASM_ERROR_TYPE
+ YASM_ERROR_SYNTAX
+ YASM_ERROR_PARSE
+
+ void yasm_errwarn_initialize()
+ void yasm_errwarn_cleanup()
+ extern void (*yasm_internal_error_) (char *file, unsigned int line,
+ char *message)
+ void yasm_internal_error(char *message)
+ extern void (*yasm_fatal) (char *message, va_list va)
+ void yasm__fatal(char *message, ...)
+
+ void yasm_error_clear()
+ yasm_error_class yasm_error_occurred()
+ int yasm_error_matches(yasm_error_class eclass)
+
+ void yasm_error_set_va(yasm_error_class eclass, char *format, va_list va)
+ void yasm_error_set(yasm_error_class eclass, char *format, ...)
+ void yasm_error_set_xref_va(unsigned long xrefline, char *format,
+ va_list va)
+ void yasm_error_set_xref(unsigned long xrefline, char *format, ...)
+ void yasm_error_fetch(yasm_error_class *eclass, char **str,
+ unsigned long *xrefline, char **xrefstr)
+
+ void yasm_warn_clear()
+ void yasm_warn_set_va(yasm_warn_class wclass, char *format, va_list va)
+ void yasm_warn_set(yasm_warn_class wclass, char *format, ...)
+ void yasm_warn_fetch(yasm_warn_class *wclass, char **str)
+
+ void yasm_warn_enable(yasm_warn_class wclass)
+ void yasm_warn_disable(yasm_warn_class wclass)
+
+ void yasm_warn_disable_all()
+
+ yasm_errwarns *yasm_errwarns_create()
+ void yasm_errwarns_destroy(yasm_errwarns *errwarns)
+ void yasm_errwarn_propagate(yasm_errwarns *errwarns, unsigned long line)
+ unsigned int yasm_errwarns_num_errors(yasm_errwarns *errwarns,
+ int warning_as_error)
+
+ ctypedef void (*yasm_print_error_func) (char *fn, unsigned long line,
+ char *msg, unsigned long xrefline,
+ char *xrefmsg)
+ ctypedef void (*yasm_print_warning_func) (char *fn, unsigned long line,
+ char *msg)
+ void yasm_errwarns_output_all(yasm_errwarns *errwarns, yasm_linemap *lm,
+ int warning_as_error,
+ yasm_print_error_func print_error,
+ yasm_print_warning_func print_warning)
+
+ char *yasm__conv_unprint(int ch)
+
+ extern char * (*yasm_gettext_hook) (char *msgid)
+
+class YasmError(Exception): pass
+
+__errormap = [
+ # Order matters here. Go from most to least specific within a class
+ (YASM_ERROR_ZERO_DIVISION, ZeroDivisionError),
+ # Enable these once there are tests that need them.
+ #(YASM_ERROR_OVERFLOW, OverflowError),
+ #(YASM_ERROR_FLOATING_POINT, FloatingPointError),
+ #(YASM_ERROR_ARITHMETIC, ArithmeticError),
+ #(YASM_ERROR_ASSERTION, AssertionError),
+ #(YASM_ERROR_VALUE, ValueError), # include notabs, notconst, toocomplex
+ #(YASM_ERROR_IO, IOError),
+ #(YASM_ERROR_NOT_IMPLEMENTED, NotImplementedError),
+ #(YASM_ERROR_TYPE, TypeError),
+ #(YASM_ERROR_SYNTAX, SyntaxError), #include parse
+]
+
+cdef void __error_check() except *:
+ cdef yasm_error_class errclass
+ cdef unsigned long xrefline
+ cdef char *errstr, *xrefstr
+
+ # short path for the common case
+ if not yasm_error_occurred(): return
+
+ # look up our preferred python error, fall back to YasmError
+ for error_class, exception in __errormap:
+ if yasm_error_matches(error_class):
+ break
+ else:
+ exception = YasmError
+
+ # retrieve info (clears error)
+ yasm_error_fetch(&errclass, &errstr, &xrefline, &xrefstr)
+
+ if xrefline and xrefstr:
+ PyErr_Format(exception, "%s: %d: %s", errstr, xrefline, xrefstr)
+ else:
+ PyErr_SetString(exception, errstr)
+
+ if xrefstr: free(xrefstr)
+ free(errstr)
diff --git a/tools/python-yasm/expr.pxi b/tools/python-yasm/expr.pxi
new file mode 100644
index 00000000..64b132d6
--- /dev/null
+++ b/tools/python-yasm/expr.pxi
@@ -0,0 +1,205 @@
+# Python bindings for Yasm: Pyrex input file for expr.h
+#
+# Copyright (C) 2006 Michael Urman, Peter Johnson
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+cdef extern from "libyasm/expr.h":
+ cdef struct yasm_expr__item
+
+ cdef yasm_expr *yasm_expr_create(yasm_expr_op op, yasm_expr__item *a,
+ yasm_expr__item *b, unsigned long line)
+ cdef yasm_expr__item *yasm_expr_sym(yasm_symrec *sym)
+ cdef yasm_expr__item *yasm_expr_expr(yasm_expr *e)
+ cdef yasm_expr__item *yasm_expr_int(yasm_intnum *intn)
+ cdef yasm_expr__item *yasm_expr_float(yasm_floatnum *flt)
+ cdef yasm_expr__item *yasm_expr_reg(unsigned long reg)
+ cdef yasm_expr *yasm_expr_create_tree(yasm_expr *l, yasm_expr_op op,
+ yasm_expr *r, unsigned long line)
+ cdef yasm_expr *yasm_expr_create_branch(yasm_expr_op op,
+ yasm_expr *r, unsigned long line)
+ cdef yasm_expr *yasm_expr_create_ident(yasm_expr *r, unsigned long line)
+ cdef yasm_expr *yasm_expr_copy(yasm_expr *e)
+ cdef void yasm_expr_destroy(yasm_expr *e)
+ cdef int yasm_expr_is_op(yasm_expr *e, yasm_expr_op op)
+ ctypedef yasm_expr * (*yasm_expr_xform_func) (yasm_expr *e, void *d)
+
+ cdef struct yasm__exprhead
+ cdef yasm_expr *yasm_expr__level_tree(yasm_expr *e, int fold_const,
+ int simplify_ident, int simplify_reg_mul,
+ yasm_calc_bc_dist_func calc_bc_dist,
+ yasm_expr_xform_func expr_xform_extra,
+ void *expr_xform_extra_data, yasm__exprhead *eh, int *error)
+ cdef yasm_expr *yasm_expr_simplify(yasm_expr *e, yasm_calc_bc_dist_func cbd)
+ cdef yasm_expr *yasm_expr_extract_segoff(yasm_expr **ep)
+ cdef yasm_expr *yasm_expr_extract_wrt(yasm_expr **ep)
+ cdef yasm_intnum *yasm_expr_get_intnum(yasm_expr **ep,
+ yasm_calc_bc_dist_func calc_bc_dist)
+ cdef yasm_symrec *yasm_expr_get_symrec(yasm_expr **ep, int simplify)
+ cdef unsigned long *yasm_expr_get_reg(yasm_expr **ep, int simplify)
+ cdef void yasm_expr_print(yasm_expr *e, FILE *f)
+
+cdef extern from "libyasm/expr-int.h":
+ cdef enum yasm_expr__type:
+ YASM_EXPR_NONE
+ YASM_EXPR_REG
+ YASM_EXPR_INT
+ YASM_EXPR_FLOAT
+ YASM_EXPR_SYM
+ YASM_EXPR_SYMEXP
+ YASM_EXPR_EXPR
+
+ cdef union yasm_expr__type_data:
+ yasm_symrec *sym
+ yasm_expr *expn
+ yasm_intnum *intn
+ yasm_floatnum *flt
+ unsigned long reg
+
+ cdef struct yasm_expr__item:
+ yasm_expr__type type
+ yasm_expr__type_data data
+
+ cdef struct yasm_expr:
+ yasm_expr_op op
+ unsigned long line
+ int numterms
+ yasm_expr__item terms[2]
+
+ cdef int yasm_expr__traverse_leaves_in_const(yasm_expr *e,
+ void *d, int (*func) (yasm_expr__item *ei, void *d))
+ cdef int yasm_expr__traverse_leaves_in(yasm_expr *e, void *d,
+ int (*func) (yasm_expr__item *ei, void *d))
+
+ cdef void yasm_expr__order_terms(yasm_expr *e)
+
+ cdef yasm_expr *yasm_expr__copy_except(yasm_expr *e, int excpt)
+
+ cdef int yasm_expr__contains(yasm_expr *e, yasm_expr__type t)
+
+import operator
+__op = {}
+for ops, operation in [
+ ((operator.__add__, operator.add, '+'), YASM_EXPR_ADD),
+ ((operator.__and__, operator.and_, '&'), YASM_EXPR_AND),
+ ((operator.__div__, operator.div, '/'), YASM_EXPR_SIGNDIV),
+ ((operator.__floordiv__, operator.floordiv, '//'), YASM_EXPR_SIGNDIV),
+ ((operator.__ge__, operator.ge, '>='), YASM_EXPR_GE),
+ ((operator.__gt__, operator.gt, '>'), YASM_EXPR_GT),
+ ((operator.__inv__, operator.inv, '~'), YASM_EXPR_NOT),
+ ((operator.__invert__, operator.invert), YASM_EXPR_NOT),
+ ((operator.__le__, operator.le, '<='), YASM_EXPR_LE),
+ ((operator.__lt__, operator.lt, '<'), YASM_EXPR_LT),
+ ((operator.__mod__, operator.mod, '%'), YASM_EXPR_SIGNMOD),
+ ((operator.__mul__, operator.mul, '*'), YASM_EXPR_MUL),
+ ((operator.__neg__, operator.neg), YASM_EXPR_NEG),
+ ((operator.__not__, operator.not_, 'not'), YASM_EXPR_LNOT),
+ ((operator.__or__, operator.or_, '|'), YASM_EXPR_OR),
+ ((operator.__sub__, operator.sub, '-'), YASM_EXPR_SUB),
+ ((operator.__xor__, operator.xor, '^'), YASM_EXPR_XOR),
+ ]:
+ for op in ops:
+ __op[op] = operation
+
+del operator, op, ops, operation
+
+cdef object __make_expression(yasm_expr *expr):
+ return Expression(__pass_voidp(expr, Expression))
+
+cdef class Expression:
+ cdef yasm_expr *expr
+
+ def __new__(self, op, *args, **kwargs):
+ self.expr = NULL
+
+ if isinstance(op, Expression):
+ self.expr = yasm_expr_copy((<Expression>op).expr)
+ return
+ if PyCObject_Check(op):
+ self.expr = <yasm_expr *>__get_voidp(op, Expression)
+ return
+
+ cdef size_t numargs
+ cdef unsigned long line
+
+ op = __op.get(op, op)
+ numargs = len(args)
+ line = kwargs.get('line', 0)
+
+ if numargs == 0 or numargs > 2:
+ raise NotImplementedError
+ elif numargs == 2:
+ self.expr = yasm_expr_create(op, self.__new_item(args[0]),
+ self.__new_item(args[1]), line)
+ else:
+ self.expr = yasm_expr_create(op, self.__new_item(args[0]), NULL,
+ line)
+
+ cdef yasm_expr__item* __new_item(self, value) except NULL:
+ cdef yasm_expr__item *retval
+ if isinstance(value, Expression):
+ return yasm_expr_expr(yasm_expr_copy((<Expression>value).expr))
+ #elif isinstance(value, Symbol):
+ # return yasm_expr_sym((<Symbol>value).sym)
+ #elif isinstance(value, Register):
+ # return yasm_expr_reg((<Register>value).reg)
+ elif isinstance(value, FloatNum):
+ return yasm_expr_float(yasm_floatnum_copy((<FloatNum>value).flt))
+ elif isinstance(value, IntNum):
+ return yasm_expr_int(yasm_intnum_copy((<IntNum>value).intn))
+ else:
+ try:
+ intnum = IntNum(value)
+ except:
+ raise ValueError("Invalid item value type '%s'" % type(value))
+ else:
+ retval = yasm_expr_int((<IntNum>intnum).intn)
+ (<IntNum>intnum).intn = NULL
+ return retval
+
+ def __dealloc__(self):
+ if self.expr != NULL: yasm_expr_destroy(self.expr)
+
+ def simplify(self):
+ self.expr = yasm_expr_simplify(self.expr, NULL) # TODO: cbd
+
+ def extract_segoff(self):
+ cdef yasm_expr *retval
+ retval = yasm_expr_extract_segoff(&self.expr)
+ if retval == NULL:
+ raise ValueError("not a SEG:OFF expression")
+ return __make_expression(retval)
+
+ def extract_wrt(self):
+ cdef yasm_expr *retval
+ retval = yasm_expr_extract_wrt(&self.expr)
+ if retval == NULL:
+ raise ValueError("not a WRT expression")
+ return __make_expression(retval)
+
+ def get_intnum(self):
+ cdef yasm_intnum *retval
+ retval = yasm_expr_get_intnum(&self.expr, NULL) # TODO: cbd
+ if retval == NULL:
+ raise ValueError("not an intnum expression")
+ return __make_intnum(yasm_intnum_copy(retval))
+
diff --git a/tools/python-yasm/floatnum.pxi b/tools/python-yasm/floatnum.pxi
new file mode 100644
index 00000000..7e761985
--- /dev/null
+++ b/tools/python-yasm/floatnum.pxi
@@ -0,0 +1,64 @@
+# Python bindings for Yasm: Pyrex input file for floatnum.h
+#
+# Copyright (C) 2006 Michael Urman, Peter Johnson
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+cdef extern from "libyasm/floatnum.h":
+ cdef void yasm_floatnum_initialize()
+ cdef void yasm_floatnum_cleanup()
+ cdef yasm_floatnum* yasm_floatnum_create(char *str)
+ cdef yasm_floatnum* yasm_floatnum_copy(yasm_floatnum *flt)
+ cdef void yasm_floatnum_destroy(yasm_floatnum *flt)
+ cdef void yasm_floatnum_calc(yasm_floatnum *acc, yasm_expr_op op,
+ yasm_floatnum *operand)
+ cdef int yasm_floatnum_get_int(yasm_floatnum *flt, size_t *ret_val)
+ cdef int yasm_floatnum_get_sized(yasm_floatnum *flt, unsigned char *ptr,
+ size_t destsize, size_t valsize, size_t shift, int
+ bigendian, int warn)
+ cdef int yasm_floatnum_check_size(yasm_floatnum *flt, size_t size)
+ cdef void yasm_floatnum_print(yasm_floatnum *flt, FILE *f)
+
+cdef class FloatNum:
+ cdef yasm_floatnum *flt
+ def __new__(self, value):
+ self.flt = NULL
+ if isinstance(value, FloatNum):
+ self.flt = yasm_floatnum_copy((<FloatNum>value).flt)
+ return
+ if PyCObject_Check(value): # should check Desc
+ self.flt = <yasm_floatnum *>PyCObject_AsVoidPtr(value)
+ return
+
+ if isinstance(value, float): string = str(float)
+ else: string = value
+ self.flt = yasm_floatnum_create(string)
+
+ def __dealloc__(self):
+ if self.flt != NULL: yasm_floatnum_destroy(self.flt)
+
+ def __neg__(self):
+ result = FloatNum(self)
+ yasm_floatnum_calc((<FloatNum>result).flt, YASM_EXPR_NEG, NULL)
+ return result
+ def __pos__(self): return self
+
diff --git a/tools/python-yasm/intnum.pxi b/tools/python-yasm/intnum.pxi
new file mode 100644
index 00000000..42db35eb
--- /dev/null
+++ b/tools/python-yasm/intnum.pxi
@@ -0,0 +1,203 @@
+# Python bindings for Yasm: Pyrex input file for intnum.h
+#
+# Copyright (C) 2006 Michael Urman, Peter Johnson
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+cdef extern from "libyasm/intnum.h":
+ cdef void yasm_intnum_initialize()
+ cdef void yasm_intnum_cleanup()
+ cdef yasm_intnum *yasm_intnum_create_dec(char *str)
+ cdef yasm_intnum *yasm_intnum_create_bin(char *str)
+ cdef yasm_intnum *yasm_intnum_create_oct(char *str)
+ cdef yasm_intnum *yasm_intnum_create_hex(char *str)
+ cdef yasm_intnum *yasm_intnum_create_charconst_nasm(char *str)
+ cdef yasm_intnum *yasm_intnum_create_uint(unsigned long i)
+ cdef yasm_intnum *yasm_intnum_create_int(long i)
+ cdef yasm_intnum *yasm_intnum_create_leb128(unsigned char *ptr,
+ int sign, unsigned long *size)
+ cdef yasm_intnum *yasm_intnum_create_sized(unsigned char *ptr, int sign,
+ size_t srcsize, int bigendian)
+ cdef yasm_intnum *yasm_intnum_copy(yasm_intnum *intn)
+ cdef void yasm_intnum_destroy(yasm_intnum *intn)
+ cdef void yasm_intnum_calc(yasm_intnum *acc, yasm_expr_op op,
+ yasm_intnum *operand)
+ cdef void yasm_intnum_zero(yasm_intnum *intn)
+ cdef void yasm_intnum_set_uint(yasm_intnum *intn, unsigned long val)
+ cdef int yasm_intnum_is_zero(yasm_intnum *acc)
+ cdef int yasm_intnum_is_pos1(yasm_intnum *acc)
+ cdef int yasm_intnum_is_neg1(yasm_intnum *acc)
+ cdef int yasm_intnum_sign(yasm_intnum *acc)
+ cdef unsigned long yasm_intnum_get_uint(yasm_intnum *intn)
+ cdef long yasm_intnum_get_int(yasm_intnum *intn)
+ cdef void yasm_intnum_get_sized(yasm_intnum *intn, unsigned char *ptr,
+ size_t destsize, size_t valsize, int shift, int bigendian, int warn)
+ cdef int yasm_intnum_check_size(yasm_intnum *intn, size_t size,
+ size_t rshift, int rangetype)
+ cdef unsigned long yasm_intnum_get_leb128(yasm_intnum *intn,
+ unsigned char *ptr, int sign)
+ cdef unsigned long yasm_intnum_size_leb128(yasm_intnum *intn,
+ int sign)
+ cdef unsigned long yasm_get_sleb128(long v, unsigned char *ptr)
+ cdef unsigned long yasm_size_sleb128(long v)
+ cdef unsigned long yasm_get_uleb128(unsigned long v, unsigned char *ptr)
+ cdef unsigned long yasm_size_uleb128(unsigned long v)
+ cdef void yasm_intnum_print(yasm_intnum *intn, FILE *f)
+
+cdef class IntNum
+
+cdef object __intnum_op_ex(object x, yasm_expr_op op, object y):
+ value = __intnum_op(x, op, y)
+ __error_check()
+ return value
+
+cdef object __intnum_op(object x, yasm_expr_op op, object y):
+ if isinstance(x, IntNum):
+ result = IntNum(x)
+ if y is None:
+ yasm_intnum_calc((<IntNum>result).intn, op, NULL)
+ else:
+ # Coerce to intnum if not already
+ if isinstance(y, IntNum):
+ rhs = y
+ else:
+ rhs = IntNum(y)
+ yasm_intnum_calc((<IntNum>result).intn, op, (<IntNum>rhs).intn)
+ return result
+ elif isinstance(y, IntNum):
+ # Reversed operation - x OP y still, just y is intnum, x isn't.
+ result = IntNum(x)
+ yasm_intnum_calc((<IntNum>result).intn, op, (<IntNum>y).intn)
+ return result
+ else:
+ raise NotImplementedError
+
+cdef object __make_intnum(yasm_intnum *intn):
+ return IntNum(__pass_voidp(intn, IntNum))
+
+cdef class IntNum:
+ cdef yasm_intnum *intn
+
+ def __new__(self, value, base=None):
+ cdef unsigned char buf[16]
+
+ self.intn = NULL
+
+ if isinstance(value, IntNum):
+ self.intn = yasm_intnum_copy((<IntNum>value).intn)
+ return
+ if PyCObject_Check(value):
+ self.intn = <yasm_intnum *>__get_voidp(value, IntNum)
+ return
+
+ val = None
+ if isinstance(value, str):
+ val = long(value, base)
+ elif isinstance(value, (int, long)):
+ val = long(value)
+
+ if val is None:
+ raise ValueError
+
+ _PyLong_AsByteArray(val, buf, 16, 1, 1)
+ self.intn = yasm_intnum_create_sized(buf, 1, 16, 0)
+
+ def __dealloc__(self):
+ if self.intn != NULL: yasm_intnum_destroy(self.intn)
+
+ def __long__(self):
+ cdef unsigned char buf[16]
+ yasm_intnum_get_sized(self.intn, buf, 16, 128, 0, 0, 0)
+ return _PyLong_FromByteArray(buf, 16, 1, 1)
+
+ def __repr__(self):
+ return "IntNum(%d)" % self
+
+ def __int__(self): return int(self.__long__())
+ def __complex__(self): return complex(self.__long__())
+ def __float__(self): return float(self.__long__())
+
+ def __oct__(self): return oct(int(self.__long__()))
+ def __hex__(self): return hex(int(self.__long__()))
+
+ def __add__(x, y): return __intnum_op(x, YASM_EXPR_ADD, y)
+ def __sub__(x, y): return __intnum_op(x, YASM_EXPR_SUB, y)
+ def __mul__(x, y): return __intnum_op(x, YASM_EXPR_MUL, y)
+ def __div__(x, y): return __intnum_op_ex(x, YASM_EXPR_SIGNDIV, y)
+ def __floordiv__(x, y): return __intnum_op_ex(x, YASM_EXPR_SIGNDIV, y)
+ def __mod__(x, y): return __intnum_op_ex(x, YASM_EXPR_SIGNMOD, y)
+ def __neg__(self): return __intnum_op(self, YASM_EXPR_NEG, None)
+ def __pos__(self): return self
+ def __abs__(self):
+ if yasm_intnum_sign(self.intn) >= 0: return self
+ else: return __intnum_op(self, YASM_EXPR_NEG, None)
+ def __nonzero__(self): return not yasm_intnum_is_zero(self.intn)
+ def __invert__(self): return __intnum_op(self, YASM_EXPR_NOT, None)
+ def __lshift__(x, y): return __intnum_op(x, YASM_EXPR_SHL, y)
+ def __rshift__(x, y): return __intnum_op(x, YASM_EXPR_SHR, y)
+ def __and__(x, y): return __intnum_op(x, YASM_EXPR_AND, y)
+ def __or__(x, y): return __intnum_op(x, YASM_EXPR_OR, y)
+ def __xor__(x, y): return __intnum_op(x, YASM_EXPR_XOR, y)
+
+ cdef object __op(self, yasm_expr_op op, object x):
+ if isinstance(x, IntNum):
+ rhs = x
+ else:
+ rhs = IntNum(x)
+ yasm_intnum_calc(self.intn, op, (<IntNum>rhs).intn)
+ return self
+
+ def __iadd__(self, x): return self.__op(YASM_EXPR_ADD, x)
+ def __isub__(self, x): return self.__op(YASM_EXPR_SUB, x)
+ def __imul__(self, x): return self.__op(YASM_EXPR_MUL, x)
+ def __idiv__(self, x): return self.__op(YASM_EXPR_SIGNDIV, x)
+ def __ifloordiv__(self, x): return self.__op(YASM_EXPR_SIGNDIV, x)
+ def __imod__(self, x): return self.__op(YASM_EXPR_MOD, x)
+ def __ilshift__(self, x): return self.__op(YASM_EXPR_SHL, x)
+ def __irshift__(self, x): return self.__op(YASM_EXPR_SHR, x)
+ def __iand__(self, x): return self.__op(YASM_EXPR_AND, x)
+ def __ior__(self, x): return self.__op(YASM_EXPR_OR, x)
+ def __ixor__(self, x): return self.__op(YASM_EXPR_XOR, x)
+
+ def __cmp__(self, x):
+ cdef yasm_intnum *t
+ t = yasm_intnum_copy(self.intn)
+ if isinstance(x, IntNum):
+ rhs = x
+ else:
+ rhs = IntNum(x)
+ yasm_intnum_calc(t, YASM_EXPR_SUB, (<IntNum>rhs).intn)
+ result = yasm_intnum_sign(t)
+ yasm_intnum_destroy(t)
+ return result
+
+ def __richcmp__(x, y, op):
+ cdef yasm_expr_op aop
+ if op == 0: aop = YASM_EXPR_LT
+ elif op == 1: aop = YASM_EXPR_LE
+ elif op == 2: aop = YASM_EXPR_EQ
+ elif op == 3: aop = YASM_EXPR_NE
+ elif op == 4: aop = YASM_EXPR_GT
+ elif op == 5: aop = YASM_EXPR_GE
+ else: raise NotImplementedError
+ v = __intnum_op(x, aop, y)
+ return bool(not yasm_intnum_is_zero((<IntNum>v).intn))
diff --git a/tools/python-yasm/setup.py b/tools/python-yasm/setup.py
new file mode 100644
index 00000000..ffc0e0c0
--- /dev/null
+++ b/tools/python-yasm/setup.py
@@ -0,0 +1,89 @@
+#! /usr/bin/env python
+# Build Python extension with configuration file input
+#
+# Copyright (C) 2006 Peter Johnson
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+from distutils.core import setup
+from distutils.extension import Extension
+from Pyrex.Distutils import build_ext
+from os.path import basename, join, exists
+
+def ReadSetup(filename):
+ """ReadSetup goes through filename and parses out the values stored
+ in the file. Values need to be stored in a
+ \"key=value format\""""
+ return dict(line.split('=', 1) for line in open(filename))
+
+def ParseCPPFlags(flags):
+ """parse the CPPFlags macro"""
+ incl_dir = [x[2:] for x in flags.split() if x.startswith("-I")]
+ cppflags = [x for x in flags.split() if not x.startswith("-I")]
+ return (incl_dir, cppflags)
+
+def ParseSources(src, srcdir):
+ """parse the Sources macro"""
+ # do the dance of detecting if the source file is in the current
+ # directory, and if it's not, prepend srcdir
+ sources = []
+ for tok in src.split():
+ if tok.endswith(".c"):
+ fn = tok
+ elif tok.endswith(".y"):
+ fn = basename(tok)[:-2] + ".c"
+ else:
+ continue
+ if not exists(fn):
+ fn = join(srcdir, fn)
+ sources.append(fn)
+
+ return sources
+
+def RunSetup(incldir, cppflags, sources):
+ setup(
+ name='yasm',
+ version='0.0',
+ description='Python bindings for Yasm',
+ author='Michael Urman, Peter Johnson',
+ url='http://www.tortall.net/projects/yasm',
+ ext_modules=[
+ Extension('yasm',
+ sources=sources,
+ extra_compile_args=cppflags,
+ include_dirs=incldir,
+ library_dirs=['.'],
+ libraries=['yasm'],
+ ),
+ ],
+ cmdclass = dict(build_ext=build_ext),
+ )
+
+if __name__ == "__main__":
+ opts = ReadSetup("python-setup.txt")
+ incldir, cppflags = ParseCPPFlags(opts["includes"])
+ sources = ParseSources(opts["sources"], opts["srcdir"].strip())
+ sources.append('yasm_python.c')
+ if opts["gcc"].strip() == "yes":
+ cppflags.append('-w')
+ RunSetup(incldir, cppflags, sources)
+
diff --git a/tools/python-yasm/symrec.pxi b/tools/python-yasm/symrec.pxi
new file mode 100644
index 00000000..60f7a4d7
--- /dev/null
+++ b/tools/python-yasm/symrec.pxi
@@ -0,0 +1,324 @@
+# Python bindings for Yasm: Pyrex input file for symrec.h
+#
+# Copyright (C) 2006 Michael Urman, Peter Johnson
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+cdef extern from "libyasm/symrec.h":
+ cdef yasm_symtab* yasm_symtab_create()
+ cdef void yasm_symtab_destroy(yasm_symtab *symtab)
+ cdef yasm_symrec* yasm_symtab_use(yasm_symtab *symtab, char *name,
+ unsigned long line)
+ cdef yasm_symrec* yasm_symtab_get(yasm_symtab *symtab, char *name)
+ cdef yasm_symrec* yasm_symtab_define_equ(yasm_symtab *symtab,
+ char *name, yasm_expr *e, unsigned long line)
+ cdef yasm_symrec* yasm_symtab_define_label(yasm_symtab *symtab,
+ char *name, yasm_bytecode *precbc, int in_table, unsigned long line)
+ cdef yasm_symrec* yasm_symtab_define_curpos(yasm_symtab *symtab, char *name,
+ yasm_bytecode *precbc, unsigned long line)
+ cdef yasm_symrec* yasm_symtab_define_special(yasm_symtab *symtab,
+ char *name, yasm_sym_vis vis)
+ cdef yasm_symrec* yasm_symtab_declare(yasm_symtab *symtab,
+ char *name, yasm_sym_vis vis, unsigned long line)
+ cdef void yasm_symrec_declare(yasm_symrec *symrec, yasm_sym_vis vis,
+ unsigned long line)
+
+ ctypedef int (*yasm_symtab_traverse_callback)(yasm_symrec *sym, void *d)
+ cdef int yasm_symtab_traverse(yasm_symtab *symtab, void *d,
+ yasm_symtab_traverse_callback func)
+
+ ctypedef struct yasm_symtab_iter
+ cdef yasm_symtab_iter *yasm_symtab_first(yasm_symtab *symtab)
+ cdef yasm_symtab_iter *yasm_symtab_next(yasm_symtab_iter *prev)
+ cdef yasm_symrec *yasm_symtab_iter_value(yasm_symtab_iter *cur)
+
+ cdef void yasm_symtab_parser_finalize(yasm_symtab *symtab,
+ int undef_extern, yasm_objfmt *objfmt)
+ cdef void yasm_symtab_print(yasm_symtab *symtab, FILE *f, int indent_level)
+ cdef char* yasm_symrec_get_name(yasm_symrec *sym)
+ cdef yasm_sym_vis yasm_symrec_get_visibility(yasm_symrec *sym)
+ cdef yasm_expr* yasm_symrec_get_equ(yasm_symrec *sym)
+
+ ctypedef yasm_bytecode *yasm_symrec_get_label_bytecodep
+
+ cdef int yasm_symrec_get_label(yasm_symrec *sym,
+ yasm_symrec_get_label_bytecodep *precbc)
+ cdef int yasm_symrec_is_special(yasm_symrec *sym)
+ cdef int yasm_symrec_is_curpos(yasm_symrec *sym)
+ cdef void* yasm_symrec_get_data(yasm_symrec *sym,
+ yasm_assoc_data_callback *callback)
+ cdef void yasm_symrec_add_data(yasm_symrec *sym,
+ yasm_assoc_data_callback *callback, void *data)
+ cdef void yasm_symrec_print(yasm_symrec *sym, FILE *f, int indent_level)
+
+cdef class Symbol:
+ cdef yasm_symrec *sym
+
+ def __new__(self, symrec):
+ self.sym = NULL
+ if PyCObject_Check(symrec):
+ self.sym = <yasm_symrec *>__get_voidp(symrec, Symbol)
+ else:
+ raise NotImplementedError
+
+ # no deref or destroy necessary
+
+ property name:
+ def __get__(self): return yasm_symrec_get_name(self.sym)
+
+ property visibility:
+ def __get__(self):
+ cdef yasm_sym_vis vis
+ s = set()
+ vis = yasm_symrec_get_visibility(self.sym)
+ if vis & YASM_SYM_GLOBAL: s.add('global')
+ if vis & YASM_SYM_COMMON: s.add('common')
+ if vis & YASM_SYM_EXTERN: s.add('extern')
+ if vis & YASM_SYM_DLOCAL: s.add('dlocal')
+ return s
+
+ property equ:
+ def __get__(self):
+ cdef yasm_expr *e
+ e = yasm_symrec_get_equ(self.sym)
+ if not e:
+ raise AttributeError("not an EQU")
+ return __make_expression(yasm_expr_copy(e))
+
+ property label:
+ def __get__(self):
+ cdef yasm_symrec_get_label_bytecodep bc
+ if yasm_symrec_get_label(self.sym, &bc):
+ return None #Bytecode(bc)
+ else:
+ raise AttributeError("not a label or not defined")
+
+ property is_special:
+ def __get__(self): return bool(yasm_symrec_is_special(self.sym))
+
+ property is_curpos:
+ def __get__(self): return bool(yasm_symrec_is_curpos(self.sym))
+
+ def get_data(self): pass # TODO
+ #return <object>(yasm_symrec_get_data(self.sym, PyYasmAssocData))
+
+ def set_data(self, data): pass # TODO
+ #yasm_symrec_set_data(self.sym, PyYasmAssocData, data)
+
+#
+# Use associated data mechanism to keep Symbol reference paired with symrec.
+#
+
+cdef class __assoc_data_callback:
+ cdef yasm_assoc_data_callback *cb
+ def __new__(self, destroy, print_):
+ self.cb = <yasm_assoc_data_callback *>malloc(sizeof(yasm_assoc_data_callback))
+ self.cb.destroy = <void (*) (void *)>PyCObject_AsVoidPtr(destroy)
+ self.cb.print_ = <void (*) (void *, FILE *, int)>PyCObject_AsVoidPtr(print_)
+ def __dealloc__(self):
+ free(self.cb)
+
+cdef void __python_symrec_cb_destroy(void *data):
+ Py_DECREF(<object>data)
+cdef void __python_symrec_cb_print(void *data, FILE *f, int indent_level):
+ pass
+__python_symrec_cb = __assoc_data_callback(
+ PyCObject_FromVoidPtr(&__python_symrec_cb_destroy, NULL),
+ PyCObject_FromVoidPtr(&__python_symrec_cb_print, NULL))
+
+cdef object __make_symbol(yasm_symrec *symrec):
+ cdef void *data
+ __error_check()
+ data = yasm_symrec_get_data(symrec,
+ (<__assoc_data_callback>__python_symrec_cb).cb)
+ if data != NULL:
+ return <object>data
+ symbol = Symbol(__pass_voidp(symrec, Symbol))
+ yasm_symrec_add_data(symrec,
+ (<__assoc_data_callback>__python_symrec_cb).cb,
+ <void *>symbol)
+ Py_INCREF(symbol) # We're keeping a reference on the C side!
+ return symbol
+
+cdef class Bytecode
+cdef class SymbolTable
+
+cdef class SymbolTableKeyIterator:
+ cdef yasm_symtab_iter *iter
+
+ def __new__(self, symtab):
+ if not isinstance(symtab, SymbolTable):
+ raise TypeError
+ self.iter = yasm_symtab_first((<SymbolTable>symtab).symtab)
+
+ def __iter__(self):
+ return self
+
+ def __next__(self):
+ if self.iter == NULL:
+ raise StopIteration
+ rv = yasm_symrec_get_name(yasm_symtab_iter_value(self.iter))
+ self.iter = yasm_symtab_next(self.iter)
+ return rv
+
+cdef class SymbolTableValueIterator:
+ cdef yasm_symtab_iter *iter
+
+ def __new__(self, symtab):
+ if not isinstance(symtab, SymbolTable):
+ raise TypeError
+ self.iter = yasm_symtab_first((<SymbolTable>symtab).symtab)
+
+ def __iter__(self):
+ return self
+
+ def __next__(self):
+ if self.iter == NULL:
+ raise StopIteration
+ rv = __make_symbol(yasm_symtab_iter_value(self.iter))
+ self.iter = yasm_symtab_next(self.iter)
+ return rv
+
+cdef class SymbolTableItemIterator:
+ cdef yasm_symtab_iter *iter
+
+ def __new__(self, symtab):
+ if not isinstance(symtab, SymbolTable):
+ raise TypeError
+ self.iter = yasm_symtab_first((<SymbolTable>symtab).symtab)
+
+ def __iter__(self):
+ return self
+
+ def __next__(self):
+ cdef yasm_symrec *sym
+ if self.iter == NULL:
+ raise StopIteration
+ sym = yasm_symtab_iter_value(self.iter)
+ rv = (yasm_symrec_get_name(sym), __make_symbol(sym))
+ self.iter = yasm_symtab_next(self.iter)
+ return rv
+
+cdef yasm_sym_vis __parse_vis(vis) except -1:
+ if not vis or vis == 'local': return YASM_SYM_LOCAL
+ if vis == 'global': return YASM_SYM_GLOBAL
+ if vis == 'common': return YASM_SYM_COMMON
+ if vis == 'extern': return YASM_SYM_EXTERN
+ if vis == 'dlocal': return YASM_SYM_DLOCAL
+ msg = "bad visibility value %r" % vis
+ PyErr_SetString(ValueError, msg)
+ return -1
+
+cdef class SymbolTable:
+ cdef yasm_symtab *symtab
+
+ def __new__(self):
+ self.symtab = yasm_symtab_create()
+
+ def __dealloc__(self):
+ if self.symtab != NULL: yasm_symtab_destroy(self.symtab)
+
+ def use(self, name, line):
+ return __make_symbol(yasm_symtab_use(self.symtab, name, line))
+
+ def define_equ(self, name, expr, line):
+ if not isinstance(expr, Expression):
+ raise TypeError
+ return __make_symbol(yasm_symtab_define_equ(self.symtab, name,
+ yasm_expr_copy((<Expression>expr).expr), line))
+
+ def define_label(self, name, precbc, in_table, line):
+ if not isinstance(precbc, Bytecode):
+ raise TypeError
+ return __make_symbol(yasm_symtab_define_label(self.symtab, name,
+ (<Bytecode>precbc).bc, in_table, line))
+
+ def define_special(self, name, vis):
+ return __make_symbol(yasm_symtab_define_special(self.symtab, name,
+ __parse_vis(vis)))
+
+ def declare(self, name, vis, line):
+ return __make_symbol(yasm_symtab_declare(self.symtab, name,
+ __parse_vis(vis), line))
+
+ #
+ # Methods to make SymbolTable behave like a dictionary of Symbols.
+ #
+
+ def __getitem__(self, key):
+ cdef yasm_symrec *symrec
+ symrec = yasm_symtab_get(self.symtab, key)
+ if symrec == NULL:
+ raise KeyError
+ return __make_symbol(symrec)
+
+ def __contains__(self, key):
+ cdef yasm_symrec *symrec
+ symrec = yasm_symtab_get(self.symtab, key)
+ return symrec != NULL
+
+ def keys(self):
+ cdef yasm_symtab_iter *iter
+ l = []
+ iter = yasm_symtab_first(self.symtab)
+ while iter != NULL:
+ l.append(yasm_symrec_get_name(yasm_symtab_iter_value(iter)))
+ iter = yasm_symtab_next(iter)
+ return l
+
+ def values(self):
+ cdef yasm_symtab_iter *iter
+ l = []
+ iter = yasm_symtab_first(self.symtab)
+ while iter != NULL:
+ l.append(__make_symbol(yasm_symtab_iter_value(iter)))
+ iter = yasm_symtab_next(iter)
+ return l
+
+ def items(self):
+ cdef yasm_symtab_iter *iter
+ cdef yasm_symrec *sym
+ l = []
+ iter = yasm_symtab_first(self.symtab)
+ while iter != NULL:
+ sym = yasm_symtab_iter_value(iter)
+ l.append((yasm_symrec_get_name(sym), __make_symbol(sym)))
+ iter = yasm_symtab_next(iter)
+ return l
+
+ def has_key(self, key):
+ cdef yasm_symrec *symrec
+ symrec = yasm_symtab_get(self.symtab, key)
+ return symrec != NULL
+
+ def get(self, key, x):
+ cdef yasm_symrec *symrec
+ symrec = yasm_symtab_get(self.symtab, key)
+ if symrec == NULL:
+ return x
+ return __make_symbol(symrec)
+
+ def iterkeys(self): return SymbolTableKeyIterator(self)
+ def itervalues(self): return SymbolTableValueIterator(self)
+ def iteritems(self): return SymbolTableItemIterator(self)
+ def __iter__(self): return SymbolTableKeyIterator(self)
+
diff --git a/tools/python-yasm/tests/Makefile.inc b/tools/python-yasm/tests/Makefile.inc
new file mode 100644
index 00000000..19181b9f
--- /dev/null
+++ b/tools/python-yasm/tests/Makefile.inc
@@ -0,0 +1,13 @@
+# $Id$
+
+EXTRA_DIST += tools/python-yasm/tests/python_test.sh
+EXTRA_DIST += tools/python-yasm/tests/__init__.py
+EXTRA_DIST += tools/python-yasm/tests/test_intnum.py
+EXTRA_DIST += tools/python-yasm/tests/test_symrec.py
+
+if HAVE_PYTHON
+
+TESTS_ENVIRONMENT += PYTHON=${PYTHON}
+TESTS += tools/python-yasm/tests/python_test.sh
+
+endif
diff --git a/tools/python-yasm/tests/__init__.py b/tools/python-yasm/tests/__init__.py
new file mode 100644
index 00000000..6d608f28
--- /dev/null
+++ b/tools/python-yasm/tests/__init__.py
@@ -0,0 +1,70 @@
+# Test wrapper from Quod Libet
+# http://www.sacredchao.net/quodlibet/
+# $Id$
+import unittest, sys
+suites = []
+add = registerCase = suites.append
+from unittest import TestCase
+
+class Mock(object):
+ # A generic mocking object.
+ def __init__(self, **kwargs): self.__dict__.update(kwargs)
+
+import test_intnum
+import test_symrec
+import test_bytecode
+import test_expr
+
+class Result(unittest.TestResult):
+
+ separator1 = '=' * 70
+ separator2 = '-' * 70
+
+ def addSuccess(self, test):
+ unittest.TestResult.addSuccess(self, test)
+ sys.stdout.write('.')
+
+ def addError(self, test, err):
+ unittest.TestResult.addError(self, test, err)
+ sys.stdout.write('E')
+
+ def addFailure(self, test, err):
+ unittest.TestResult.addFailure(self, test, err)
+ sys.stdout.write('F')
+
+ def printErrors(self):
+ succ = self.testsRun - (len(self.errors) + len(self.failures))
+ v = "%3d" % succ
+ count = 50 - self.testsRun
+ sys.stdout.write((" " * count) + v + "\n")
+ self.printErrorList('ERROR', self.errors)
+ self.printErrorList('FAIL', self.failures)
+
+ def printErrorList(self, flavour, errors):
+ for test, err in errors:
+ sys.stdout.write(self.separator1 + "\n")
+ sys.stdout.write("%s: %s\n" % (flavour, str(test)))
+ sys.stdout.write(self.separator2 + "\n")
+ sys.stdout.write("%s\n" % err)
+
+class Runner:
+ def run(self, test):
+ suite = unittest.makeSuite(test)
+ pref = '%s (%d): ' % (test.__name__, len(suite._tests))
+ print pref + " " * (25 - len(pref)),
+ result = Result()
+ suite(result)
+ result.printErrors()
+ return bool(result.failures + result.errors)
+
+def unit(run = []):
+ runner = Runner()
+ failures = False
+ for test in suites:
+ if not run or test.__name__ in run:
+ failures |= runner.run(test)
+ return failures
+
+if __name__ == "__main__":
+ raise SystemExit(unit(sys.argv[1:]))
+
diff --git a/tools/python-yasm/tests/python_test.sh b/tools/python-yasm/tests/python_test.sh
new file mode 100755
index 00000000..1f3896d6
--- /dev/null
+++ b/tools/python-yasm/tests/python_test.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+# Based on _sanity.sh from Quod Libet
+# http://www.sacredchao.net/quodlibet/
+# $Id$
+
+set -e
+
+test -n "${srcdir}" || srcdir=.
+test -n "${PYTHON}" || PYTHON=python
+
+if test "$1" = "--help" -o "$1" = "-h"; then
+ echo "Usage: $0 --sanity | [TestName] ..."
+ exit 0
+elif [ "$1" = "--sanity" ]; then
+ echo "Running static sanity checks."
+ grep "except None:" ${srcdir}/tools/python-yasm/tests/*.py
+else
+ ${PYTHON} -c "import sys; import glob; sys.path.insert(0, '${srcdir}/tools/python-yasm'); sys.path.insert(0, glob.glob('build/lib.*')[0]); import tests; raise SystemExit(tests.unit('$*'.split()))"
+fi
+
diff --git a/tools/python-yasm/tests/test_bytecode.py b/tools/python-yasm/tests/test_bytecode.py
new file mode 100644
index 00000000..ff7d7061
--- /dev/null
+++ b/tools/python-yasm/tests/test_bytecode.py
@@ -0,0 +1,11 @@
+# $Id$
+from tests import TestCase, add
+from yasm import Bytecode, ImmVal, Expression
+
+class TImmVal(TestCase):
+ def test_create(self):
+ self.assertRaises(TypeError, ImmVal, "notimmval")
+
+ imm = ImmVal(Expression('+', 2, 3))
+
+add(TImmVal)
diff --git a/tools/python-yasm/tests/test_expr.py b/tools/python-yasm/tests/test_expr.py
new file mode 100644
index 00000000..1fb930d0
--- /dev/null
+++ b/tools/python-yasm/tests/test_expr.py
@@ -0,0 +1,19 @@
+# $Id$
+from tests import TestCase, add
+from yasm import Expression
+import operator
+
+class TExpression(TestCase):
+ def test_create(self):
+ e1 = Expression(operator.add, 1, 2)
+ e2 = Expression('+', 1, 2)
+
+ self.assertEquals(e1.get_intnum(), e1.get_intnum())
+
+ def test_extract(self):
+ e1 = Expression('/', 15, 5)
+ self.assertEquals(e1.get_intnum(), 3)
+ self.assertRaises(ValueError, e1.extract_segoff)
+ self.assertRaises(ValueError, e1.extract_wrt)
+
+add(TExpression)
diff --git a/tools/python-yasm/tests/test_intnum.py b/tools/python-yasm/tests/test_intnum.py
new file mode 100644
index 00000000..1c157f6a
--- /dev/null
+++ b/tools/python-yasm/tests/test_intnum.py
@@ -0,0 +1,66 @@
+# $Id$
+from tests import TestCase, add
+from yasm import IntNum
+
+class TIntNum(TestCase):
+ legal_values = [
+ 0, 1, -1, 2, -2, 17, -17,
+ 2**31-1, -2**31, 2**31, 2**32-1, -2**32,
+ 2**63-1, -2**63-1, 2**63, 2**64, -2**64,
+ 2**127-1, -2**127
+ ]
+ overflow_values = [
+ 2**127, -2**127-1
+ ]
+
+ def test_to_from(self):
+ for i in self.legal_values:
+ self.assertEquals(i, int(IntNum(i)))
+
+ def test_overflow(self):
+ for i in self.overflow_values:
+ self.assertRaises(OverflowError, IntNum, i)
+
+ def test_exceptions(self):
+ self.assertRaises(ZeroDivisionError, IntNum(1).__div__, 0)
+
+ IntNum(1) / 1 # make sure the above error is cleared
+
+ try: IntNum(1) / 0
+ except ZeroDivisionError, err:
+ self.assertEquals('divide by zero', str(err))
+
+ def test_xor(self):
+ a = IntNum(-234)
+ b = IntNum(432)
+ c = a ^ b
+ self.assertEquals(a, -234)
+ self.assertEquals(b, 432)
+ self.assertEquals(c, -234 ^ 432)
+
+ def test_ixor(self):
+ a = IntNum(-234)
+ b = IntNum(432)
+ a ^= b; b ^= a; a ^= b
+ self.assertEquals(a, 432)
+ self.assertEquals(b, -234)
+
+ def test_cmp(self):
+ a = IntNum(-1)
+ b = IntNum(0)
+ c = IntNum(1)
+ self.assert_(a < b < c)
+ self.assert_(a <= b <= c)
+ self.assert_(c >= b >= a)
+ self.assert_(c > b > a)
+ self.assert_(a != b != c)
+
+ def test_abs(self):
+ a = IntNum(-1)
+ b = IntNum(0)
+ c = IntNum(1)
+
+ self.assertEquals(abs(a), abs(c))
+ self.assertEquals(abs(a) - abs(c), abs(b))
+
+add(TIntNum)
diff --git a/tools/python-yasm/tests/test_symrec.py b/tools/python-yasm/tests/test_symrec.py
new file mode 100644
index 00000000..a228eebd
--- /dev/null
+++ b/tools/python-yasm/tests/test_symrec.py
@@ -0,0 +1,81 @@
+# $Id$
+from tests import TestCase, add
+from yasm import SymbolTable, Expression, YasmError
+
+class TSymbolTable(TestCase):
+ def setUp(self):
+ self.symtab = SymbolTable()
+
+ def test_keys(self):
+ self.assertEquals(len(self.symtab.keys()), 0)
+ self.symtab.declare("foo", None, 0)
+ keys = self.symtab.keys()
+ self.assertEquals(len(keys), 1)
+ self.assertEquals(keys[0], "foo")
+
+ def test_contains(self):
+ self.assert_("foo" not in self.symtab)
+ self.symtab.declare("foo", None, 0)
+ self.assert_("foo" in self.symtab)
+
+ def test_exception(self):
+ expr = Expression('+', 1, 2)
+ self.symtab.define_equ("foo", expr, 0)
+ self.assertRaises(YasmError, self.symtab.define_equ, "foo", expr, 0)
+ self.symtab.define_equ("bar", expr, 0) # cleared
+ self.assertRaises(YasmError, self.symtab.define_special, "bar",
+ 'global')
+
+ def test_iters(self):
+ tab = self.symtab
+ tab.declare("foo", None, 0)
+ tab.declare("bar", None, 0)
+ tab.declare("baz", None, 0)
+
+ # while ordering is not known, it must be consistent
+ self.assertEquals(list(tab.keys()), list(tab.iterkeys()))
+ self.assertEquals(list(tab.values()), list(tab.itervalues()))
+ self.assertEquals(list(tab.items()), list(tab.iteritems()))
+ self.assertEquals(list(tab.iteritems()), zip(tab.keys(), tab.values()))
+
+add(TSymbolTable)
+
+class TSymbolAttr(TestCase):
+ def setUp(self):
+ self.symtab = SymbolTable()
+ self.declsym = self.symtab.declare("foo", None, 0)
+
+ def test_visibility(self):
+ sym = self.symtab.declare("local1", None, 0)
+ self.assertEquals(sym.visibility, set())
+ sym = self.symtab.declare("local2", '', 0)
+ self.assertEquals(sym.visibility, set())
+ sym = self.symtab.declare("local3", 'local', 0)
+ self.assertEquals(sym.visibility, set())
+ sym = self.symtab.declare("global", 'global', 0)
+ self.assertEquals(sym.visibility, set(['global']))
+ sym = self.symtab.declare("common", 'common', 0)
+ self.assertEquals(sym.visibility, set(['common']))
+ sym = self.symtab.declare("extern", 'extern', 0)
+ self.assertEquals(sym.visibility, set(['extern']))
+ sym = self.symtab.declare("dlocal", 'dlocal', 0)
+ self.assertEquals(sym.visibility, set(['dlocal']))
+
+ self.assertRaises(ValueError,
+ lambda: self.symtab.declare("extern2", 'foo', 0))
+ def test_name(self):
+ self.assertEquals(self.declsym.name, "foo")
+
+ def test_equ(self):
+ self.assertRaises(AttributeError, lambda: self.declsym.equ)
+
+ def test_label(self):
+ self.assertRaises(AttributeError, lambda: self.declsym.label)
+
+ def test_is_special(self):
+ self.assertEquals(self.declsym.is_special, False)
+
+ def test_is_curpos(self):
+ self.assertEquals(self.declsym.is_curpos, False)
+
+add(TSymbolAttr)
diff --git a/tools/python-yasm/value.pxi b/tools/python-yasm/value.pxi
new file mode 100644
index 00000000..81b1f2df
--- /dev/null
+++ b/tools/python-yasm/value.pxi
@@ -0,0 +1,65 @@
+# Python bindings for Yasm: Pyrex input file for value.h
+#
+# Copyright (C) 2006 Michael Urman, Peter Johnson
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+cdef extern from "libyasm/value.h":
+ cdef void yasm_value_initialize(yasm_value *value, yasm_expr *e,
+ unsigned int size)
+ cdef void yasm_value_init_sym(yasm_value *value, yasm_symrec *sym,
+ unsigned int size)
+ cdef void yasm_value_delete(yasm_value *value)
+ cdef int yasm_value_finalize(yasm_value *value)
+ cdef int yasm_value_finalize_expr(yasm_value *value, yasm_expr *e,
+ unsigned int size)
+ cdef int yasm_value_output_basic(yasm_value *value, unsigned char *buf,
+ size_t destsize, yasm_bytecode *bc, int warn, yasm_arch *arch,
+ yasm_calc_bc_dist_func calc_bc_dist)
+ cdef void yasm_value_print(yasm_value *value, FILE *f, int indent_level)
+
+cdef class Value:
+ cdef yasm_value value
+ def __new__(self, value=None, size=None):
+ cdef unsigned int sz
+ if size is None:
+ sz = 0
+ else:
+ sz = size;
+
+ yasm_value_initialize(&self.value, NULL, sz)
+ if value is None:
+ pass
+ elif isinstance(value, Expression):
+ yasm_value_initialize(&self.value,
+ yasm_expr_copy((<Expression>value).expr), sz)
+ elif isinstance(value, Symbol):
+ yasm_value_init_sym(&self.value, (<Symbol>value).sym, sz)
+ else:
+ raise ValueError("Invalid value type '%s'" % type(value))
+
+ def __dealloc__(self):
+ yasm_value_delete(&self.value)
+
+ def finalize(self):
+ return yasm_value_finalize(&self.value)
+
diff --git a/tools/python-yasm/yasm.pyx b/tools/python-yasm/yasm.pyx
new file mode 100644
index 00000000..f0114d2e
--- /dev/null
+++ b/tools/python-yasm/yasm.pyx
@@ -0,0 +1,131 @@
+# Python bindings for Yasm: Main Pyrex input file
+#
+# Copyright (C) 2006 Michael Urman, Peter Johnson
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+"""Interface to the Yasm library.
+
+The Yasm library (aka libyasm) provides the core functionality of the Yasm
+assembler. Classes in this library provide for manipulation of machine
+instructions and object file constructs such as symbol tables and sections.
+
+Expression objects encapsulate complex expressions containing registers,
+symbols, and operations such as SEG.
+
+Bytecode objects encapsulate data or code objects such as data, reserve,
+align, or instructions.
+
+Section objects encapsulate an object file section, including the section
+name, any Bytecode objects contained within that section, and other
+information.
+
+"""
+
+cdef extern from "Python.h":
+ cdef object PyCObject_FromVoidPtr(void *cobj, void (*destr)(void *))
+ cdef object PyCObject_FromVoidPtrAndDesc(void *cobj, void *desc,
+ void (*destr)(void *, void *))
+ cdef int PyType_Check(object)
+ cdef int PyCObject_Check(object)
+ cdef void *PyCObject_AsVoidPtr(object)
+ cdef void *PyCObject_GetDesc(object)
+
+ cdef object _PyLong_FromByteArray(unsigned char *bytes, unsigned int n,
+ int little_endian, int is_signed)
+ cdef int _PyLong_AsByteArray(object v, unsigned char *bytes, unsigned int n,
+ int little_endian, int is_signed) except -1
+
+ cdef void Py_INCREF(object o)
+ cdef void Py_DECREF(object o)
+
+ cdef void PyErr_SetString(object type, char *message)
+ cdef object PyErr_Format(object type, char *format, ...)
+
+cdef object __pass_voidp(void *obj, object forclass):
+ return PyCObject_FromVoidPtrAndDesc(obj, <void *>forclass, NULL)
+
+cdef void *__get_voidp(object obj, object forclass) except NULL:
+ cdef void* desc
+
+ if not PyCObject_Check(obj):
+ msg = "obj %r is not a CObject" % obj
+ PyErr_SetString(TypeError, msg)
+ return NULL
+
+ desc = PyCObject_GetDesc(obj)
+
+ if desc != <void *>forclass:
+ if desc == NULL:
+ msg = "CObject type is not set (expecting %s)" % forclass
+ elif PyType_Check(<object>desc):
+ msg = "CObject is for %s not %s" % (<object>desc, forclass)
+ else:
+ msg = "CObject is incorrect (expecting %s)" % forclass
+ PyErr_SetString(TypeError, msg)
+ return NULL
+
+ return PyCObject_AsVoidPtr(obj)
+
+cdef extern from "stdlib.h":
+ cdef void *malloc(int n)
+ cdef void free(void *p)
+
+cdef extern from "libyasm/compat-queue.h":
+ pass
+
+cdef class Register:
+ cdef unsigned long reg
+ def __new__(self, reg):
+ self.reg = reg
+
+include "coretype.pxi"
+
+include "errwarn.pxi"
+include "intnum.pxi"
+include "floatnum.pxi"
+include "expr.pxi"
+include "symrec.pxi"
+include "value.pxi"
+
+include "bytecode.pxi"
+
+
+cdef extern from "libyasm/bitvect.h":
+ cdef void BitVector_Boot()
+ cdef void BitVector_Shutdown()
+
+def __initialize():
+ BitVector_Boot()
+ yasm_intnum_initialize()
+ yasm_floatnum_initialize()
+ yasm_errwarn_initialize()
+
+def __cleanup():
+ yasm_floatnum_cleanup()
+ yasm_intnum_cleanup()
+ yasm_errwarn_cleanup()
+ BitVector_Shutdown()
+
+__initialize()
+import atexit
+atexit.register(__cleanup)
+
diff --git a/tools/re2c/main.c b/tools/re2c/main.c
index 034d79af..f0baaf61 100644
--- a/tools/re2c/main.c
+++ b/tools/re2c/main.c
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "globals.h"
#include "parse.h"