Switching back to using Watcom C - this seems to work.

This commit is contained in:
Markus F.X.J. Oberhumer 2007-02-18 03:02:00 +01:00
parent 46009c7658
commit 8a82c259bd
10 changed files with 8053 additions and 8133 deletions

File diff suppressed because it is too large Load Diff

View File

@ -143,7 +143,7 @@ lzma_d_c%.S : lzma_d_c%.i cleanasm.py $(MAKEFILE_LIST)
python cleanasm.py --label-prefix=$(LABEL_PREFIX) $< $@
ifneq ($(wildcard $(UPX_LZMADIR)/C/7zip/.),)
ifneq ($(wildcard $(DM849DIR)/bin/dmc.exe),)
##ifneq ($(wildcard $(DM849DIR)/bin/dmc.exe),)
ifneq ($(wildcard $(WATCOM)/binl/wcl),)
ifneq ($(wildcard /usr/bin/wine),)
@ -170,7 +170,7 @@ ifneq ($(wildcard $(WATCOM)/binl/wcl),)
$(call tc,wdis) tmp/$T_wc.obj | $(RTRIM) > tmp/$T_wc.obj.disasm
endif
# convert
python wdis2gas.py tmp/$T_dm.obj.disasm tmp/$T.S
python wdis2gas.py tmp/$T_wc.obj.disasm tmp/$T.S
$(call tc,gcc) -c -o tmp/$T.o tmp/$T.S
$(call tc,f-objstrip,tmp/$T.o)
$(call tc,objdump) -b elf32-i386 -m i8086 -M intel -dr -j .text.LzmaDecode --no-show -w tmp/$T.o | $(RTRIM) | perl -pe 's/DWORD/dword/g; s/WORD/word/g; s/BYTE/byte/g; s/PTR/ptr/g;' > $@
@ -180,7 +180,7 @@ endif
endif
endif
endif
##endif
endif
lzma_d_cf.% : PP_FLAGS = -DFAST

View File

@ -41,8 +41,12 @@ class opts:
inline_map = {
"__aNNalshl": "M_aNNalshl",
"__aNahdiff": "M_aNahdiff",
"__aNNalshl": ["M_aNNalshl", 1],
"__aNahdiff": ["M_aNahdiff", 1],
"__PIA": ["M_PIA", 999],
"__PTS": ["M_PTS", 999],
"__PTC": ["M_PTC", 999],
"__U4M": ["M_U4M", 999],
}
@ -261,11 +265,11 @@ def main(argv):
if opts.auto_inline and inst == "call":
v = labels[args_label]
if v[:2] == [1, 2]: # external 2-byte
if v[3] == 1: # only one call
x = inline_map.get(v[2])
x = inline_map.get(v[2])
if x and v[3] <= x[1]: # max. number of calls
##print "inline", v, x
if x:
olines[i][1] = x
olines[i][1] = x[0]
olines[i][2] = "/* inlined */"
olines[i][2] = ""
olines[i][3] = None

View File

@ -167,6 +167,28 @@ L2:
section LZMA_DEC99
#if 0
__PIA: M_WCC_PIA
ret
__PTC: M_WCC_PTC
ret
__PTS: ret
__U4M: M_LMUL_dxax_00bx
ret
#else
.macro M_PIA
M_WCC_PIA
.endm
.macro M_PTC
M_WCC_PTC
.endm
.macro M_PTS
.endm
.macro M_U4M
M_LMUL_dxax_00bx
.endm
#endif
/*************************************************************************
//

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -139,7 +139,7 @@
#define __AHINCR (1 << __AHSHIFT) /* 4096 */
#if 0
#if 1
// huge pointer add: dx:ax = dx:ax + cx:bx
.macro M_WCC_PIA
add ax, bx
@ -177,7 +177,7 @@
#endif
#if 0
#if 1
// huge pointer compare: set zero and carry flags: dx:ax cmp cx:bx
.macro M_WCC_PTC
// FIXME: should we normalize the pointers ???

View File

@ -46,25 +46,25 @@ Idx Name Size VMA LMA File off Algn Flags
41 NRV2EEX9 00000004 00000000 00000000 0000029b 2**0 CONTENTS, READONLY
42 LZMA_DEC99 00000000 00000000 00000000 0000029f 2**0 CONTENTS, READONLY
43 LZMA_DEC00 00000043 00000000 00000000 0000029f 2**0 CONTENTS, RELOC, READONLY
44 LZMA_DEC10 00001289 00000000 00000000 000002e2 2**0 CONTENTS, READONLY
45 LZMA_DEC20 00001289 00000000 00000000 0000156b 2**0 CONTENTS, READONLY
46 LZMA_DEC30 00000006 00000000 00000000 000027f4 2**0 CONTENTS, RELOC, READONLY
47 LZMA_DEC31 00000007 00000000 00000000 000027fa 2**0 CONTENTS, RELOC, READONLY
48 EXEMAIN5 00000001 00000000 00000000 00002801 2**0 CONTENTS, READONLY
49 EXEADJUS 00000007 00000000 00000000 00002802 2**0 CONTENTS, READONLY
50 EXENOADJ 00000002 00000000 00000000 00002809 2**0 CONTENTS, READONLY
51 EXERELO1 0000001e 00000000 00000000 0000280b 2**0 CONTENTS, RELOC, READONLY
52 EXEREL9A 00000012 00000000 00000000 00002829 2**0 CONTENTS, RELOC, READONLY
53 EXERELO2 00000004 00000000 00000000 0000283b 2**0 CONTENTS, READONLY
54 EXEREBIG 00000002 00000000 00000000 0000283f 2**0 CONTENTS, RELOC, READONLY
55 EXERELO3 00000002 00000000 00000000 00002841 2**0 CONTENTS, RELOC, READONLY
56 EXEMAIN8 00000003 00000000 00000000 00002843 2**0 CONTENTS, READONLY
57 DEVICEEND 00000013 00000000 00000000 00002846 2**0 CONTENTS, READONLY
58 EXESTACK 00000006 00000000 00000000 00002859 2**0 CONTENTS, RELOC, READONLY
59 EXESTASP 00000003 00000000 00000000 0000285f 2**0 CONTENTS, RELOC, READONLY
60 EXEJUMPF 00000005 00000000 00000000 00002862 2**0 CONTENTS, RELOC, READONLY
61 EXERCSPO 00000004 00000000 00000000 00002867 2**0 CONTENTS, RELOC, READONLY
62 EXERETIP 00000006 00000000 00000000 0000286b 2**0 CONTENTS, RELOC, READONLY
44 LZMA_DEC10 00001267 00000000 00000000 000002e2 2**0 CONTENTS, READONLY
45 LZMA_DEC20 00001267 00000000 00000000 00001549 2**0 CONTENTS, READONLY
46 LZMA_DEC30 00000006 00000000 00000000 000027b0 2**0 CONTENTS, RELOC, READONLY
47 LZMA_DEC31 00000007 00000000 00000000 000027b6 2**0 CONTENTS, RELOC, READONLY
48 EXEMAIN5 00000001 00000000 00000000 000027bd 2**0 CONTENTS, READONLY
49 EXEADJUS 00000007 00000000 00000000 000027be 2**0 CONTENTS, READONLY
50 EXENOADJ 00000002 00000000 00000000 000027c5 2**0 CONTENTS, READONLY
51 EXERELO1 0000001e 00000000 00000000 000027c7 2**0 CONTENTS, RELOC, READONLY
52 EXEREL9A 00000012 00000000 00000000 000027e5 2**0 CONTENTS, RELOC, READONLY
53 EXERELO2 00000004 00000000 00000000 000027f7 2**0 CONTENTS, READONLY
54 EXEREBIG 00000002 00000000 00000000 000027fb 2**0 CONTENTS, RELOC, READONLY
55 EXERELO3 00000002 00000000 00000000 000027fd 2**0 CONTENTS, RELOC, READONLY
56 EXEMAIN8 00000003 00000000 00000000 000027ff 2**0 CONTENTS, READONLY
57 DEVICEEND 00000013 00000000 00000000 00002802 2**0 CONTENTS, READONLY
58 EXESTACK 00000006 00000000 00000000 00002815 2**0 CONTENTS, RELOC, READONLY
59 EXESTASP 00000003 00000000 00000000 0000281b 2**0 CONTENTS, RELOC, READONLY
60 EXEJUMPF 00000005 00000000 00000000 0000281e 2**0 CONTENTS, RELOC, READONLY
61 EXERCSPO 00000004 00000000 00000000 00002823 2**0 CONTENTS, RELOC, READONLY
62 EXERETIP 00000006 00000000 00000000 00002827 2**0 CONTENTS, RELOC, READONLY
SYMBOL TABLE:
00000000 l d DEVICEENTRY 00000000 DEVICEENTRY
00000000 l d EXEENTRY 00000000 EXEENTRY