Yet some more Watcom optimizations.

This commit is contained in:
Markus F.X.J. Oberhumer 2007-02-18 05:43:31 +01:00
parent 0323560b49
commit 152f8e92bf
5 changed files with 137 additions and 129 deletions

View File

@ -29,8 +29,8 @@
#define STUB_I086_DOS16_EXE_SIZE 23995
#define STUB_I086_DOS16_EXE_ADLER32 0xd2a2c1f5
#define STUB_I086_DOS16_EXE_CRC32 0x72956215
#define STUB_I086_DOS16_EXE_ADLER32 0xfda7c3dd
#define STUB_I086_DOS16_EXE_CRC32 0xf355001f
unsigned char stub_i086_dos16_exe[23995] = {
127, 69, 76, 70, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */
@ -99,7 +99,7 @@ unsigned char stub_i086_dos16_exe[23995] = {
136,214,136,226,136,196, 48,192,139, 94,166, 9,195,137, 94,250, /* 0x 3f0 */
137, 86,252,139, 70,244,140,194, 64,117, 3,128,198, 16,137, 70, /* 0x 400 */
244,137, 86,246,255, 70,184,131,126,184, 5,125, 26,139, 70,244, /* 0x 410 */
139, 86,246,139, 94,226,139, 78,228, 57,202,117, 2, 57,216,117, /* 0x 420 */
139, 86,246,139, 94,226,139, 78,228, 57,216,117,176, 57,202,117, /* 0x 420 */
172,184, 1, 0,233, 65, 16,139, 70,238, 59, 70, 26,114, 13,116, /* 0x 430 */
3,233,225, 15,139, 70,236, 59, 70, 24,115,245,139, 70,236, 35, /* 0x 440 */
70,168,137, 70,198,177, 5,139, 86,240,211,226, 3, 86,222,209, /* 0x 450 */
@ -126,7 +126,7 @@ unsigned char stub_i086_dos16_exe[23995] = {
180, 48,192,128,228, 1,137, 70,190,209,224,139, 86,242,128,198, /* 0x 5a0 */
2, 1,194,139, 70,230,209,224, 1,194,137, 86,210,129,255, 0, /* 0x 5b0 */
1,115, 87,139, 70,244,139, 86,246,139, 94,226,139, 78,228, 57, /* 0x 5c0 */
202,117, 2, 57,216,117, 3,233, 87,254,185, 8, 0,209,230,209, /* 0x 5d0 */
216,117, 7, 57,202,117, 3,233, 87,254,185, 8, 0,209,230,209, /* 0x 5d0 */
215,226,250,196, 94,244, 38,138, 7,136, 70,166,198, 70,167, 0, /* 0x 5e0 */
139, 70,250,139, 86,252,136,214,136,226,136,196, 48,192,139, 94, /* 0x 5f0 */
166, 9,195,137, 94,250,137, 86,252,139, 70,244,140,194, 64,117, /* 0x 600 */
@ -142,7 +142,7 @@ unsigned char stub_i086_dos16_exe[23995] = {
126,230, 0, 1,125, 3,233,242,254,139, 70,230, 61, 0, 1,124, /* 0x 6a0 */
3,233,228, 0,209,224,139, 94,242, 1,195,137, 94,216,129,255, /* 0x 6b0 */
0, 1,115, 87,139, 70,244,139, 86,246,139, 94,226,139, 78,228, /* 0x 6c0 */
57,202,117, 2, 57,216,117, 3,233, 86,253,185, 8, 0,209,230, /* 0x 6d0 */
57,216,117, 7, 57,202,117, 3,233, 86,253,185, 8, 0,209,230, /* 0x 6d0 */
209,215,226,250,196, 94,244, 38,138, 7,136, 70,166,198, 70,167, /* 0x 6e0 */
0,139, 70,250,139, 86,252,136,214,136,226,136,196, 48,192,139, /* 0x 6f0 */
94,166, 9,195,137, 94,250,137, 86,252,139, 70,244,140,194, 64, /* 0x 700 */
@ -163,7 +163,7 @@ unsigned char stub_i086_dos16_exe[23995] = {
215,139, 70,248, 41, 70,250, 25, 86,252,177, 5,139, 94,242,139, /* 0x 7f0 */
7,211,232, 41, 7,139, 70,240,209,224,139, 86,222,129,194,128, /* 0x 800 */
1, 1,194,137, 86,242,129,255, 0, 1,115, 87,139, 70,244,139, /* 0x 810 */
86,246,139, 94,226,139, 78,228, 57,202,117, 2, 57,216,117, 3, /* 0x 820 */
86,246,139, 94,226,139, 78,228, 57,216,117, 7, 57,202,117, 3, /* 0x 820 */
233,254,251,185, 8, 0,209,230,209,215,226,250,196, 94,244, 38, /* 0x 830 */
138, 7,136, 70,166,198, 70,167, 0,139, 70,250,139, 86,252,136, /* 0x 840 */
214,136,226,136,196, 48,192,139, 94,166, 9,195,137, 94,250,137, /* 0x 850 */
@ -180,8 +180,8 @@ unsigned char stub_i086_dos16_exe[23995] = {
233,107, 4, 43,118,248, 25,215,139, 70,248, 41, 70,250, 25, 86, /* 0x 900 */
252,177, 5,139, 94,242,139, 7,211,232, 41, 7,139, 86,240,209, /* 0x 910 */
226,139, 70,222, 5,152, 1, 1,208,137, 70,242,129,255, 0, 1, /* 0x 920 */
115, 87,139, 70,244,139, 86,246,139, 94,226,139, 78,228, 57,202, /* 0x 930 */
117, 2, 57,216,117, 3,233,232,250,185, 8, 0,209,230,209,215, /* 0x 940 */
115, 87,139, 70,244,139, 86,246,139, 94,226,139, 78,228, 57,216, /* 0x 930 */
117, 7, 57,202,117, 3,233,232,250,185, 8, 0,209,230,209,215, /* 0x 940 */
226,250,196, 94,244, 38,138, 7,136, 70,166,198, 70,167, 0,139, /* 0x 950 */
70,250,139, 86,252,136,214,136,226,136,196, 48,192,139, 94,166, /* 0x 960 */
9,195,137, 94,250,137, 86,252,139, 70,244,140,194, 64,117, 3, /* 0x 970 */
@ -194,8 +194,8 @@ unsigned char stub_i086_dos16_exe[23995] = {
248,139,126,162,184, 0, 8,139, 94,242, 43, 7,177, 5,211,232, /* 0x 9e0 */
1, 7,139, 70,240,211,224,139, 86,222,129,194,224, 1, 1,194, /* 0x 9f0 */
139, 70,198,209,224, 1,194,137, 86,242,129,255, 0, 1,115, 86, /* 0x a00 */
139, 70,244,139, 86,246,139, 94,226,139, 78,228, 57,202,117, 2, /* 0x a10 */
57,216,117, 3,233, 10,250,137,240,185, 8, 0,209,224,209,215, /* 0x a20 */
139, 70,244,139, 86,246,139, 94,226,139, 78,228, 57,216,117, 7, /* 0x a10 */
57,202,117, 3,233, 10,250,137,240,185, 8, 0,209,224,209,215, /* 0x a20 */
226,250,137,198,196, 94,244, 38,138, 7,136, 70,166,198, 70,167, /* 0x a30 */
0,139, 70,250,139, 86,252,136,214,136,226,136,196, 48,192,139, /* 0x a40 */
94,166, 9,195,137, 94,250,137, 86,252,139, 94,174,137, 94,244, /* 0x a50 */
@ -217,8 +217,8 @@ unsigned char stub_i086_dos16_exe[23995] = {
126,162,139, 70,248, 41, 70,250,139, 70,162, 25, 70,252,177, 5, /* 0x b50 */
139, 94,242,139, 7,211,232, 41, 7,139, 70,240,209,224,139, 86, /* 0x b60 */
222,129,194,176, 1, 1,194,137, 86,242,129,255, 0, 1,115, 82, /* 0x b70 */
139, 70,244,139, 86,246,139, 94,226,139, 78,228, 57,202,117, 2, /* 0x b80 */
57,216,117, 3,233,154,248,185, 8, 0,209,230,209,215,226,250, /* 0x b90 */
139, 70,244,139, 86,246,139, 94,226,139, 78,228, 57,216,117, 7, /* 0x b80 */
57,202,117, 3,233,154,248,185, 8, 0,209,230,209,215,226,250, /* 0x b90 */
196, 94,244, 38,138, 7,136, 70,166,198, 70,167, 0,139, 70,250, /* 0x ba0 */
139, 86,252,136,214,136,226,136,196, 48,192,139, 94,166, 9,195, /* 0x bb0 */
137, 94,250,137, 86,252,139, 94,174,137, 94,244,139, 70,176,137, /* 0x bc0 */
@ -231,7 +231,7 @@ unsigned char stub_i086_dos16_exe[23995] = {
25,215,139, 70,248, 41, 70,250, 25, 86,252,177, 5,139, 94,242, /* 0x c30 */
139, 7,211,232, 41, 7,139, 86,240,209,226,139, 70,222, 5,200, /* 0x c40 */
1, 1,208,137, 70,242,129,255, 0, 1,115, 87,139, 70,244,139, /* 0x c50 */
86,246,139, 94,226,139, 78,228, 57,202,117, 2, 57,216,117, 3, /* 0x c60 */
86,246,139, 94,226,139, 78,228, 57,216,117, 7, 57,202,117, 3, /* 0x c60 */
233,190,247,185, 8, 0,209,230,209,215,226,250,196, 94,244, 38, /* 0x c70 */
138, 7,136, 70,166,198, 70,167, 0,139, 70,250,139, 86,252,136, /* 0x c80 */
214,136,226,136,196, 48,192,139, 94,166, 9,195,137, 94,250,137, /* 0x c90 */
@ -249,7 +249,7 @@ unsigned char stub_i086_dos16_exe[23995] = {
137, 70,154,137, 78,156,131,126,240, 7,125, 5,184, 8, 0,235, /* 0x d50 */
3,184, 11, 0,137, 70,240,139, 94,222,129,195,104, 10,137, 94, /* 0x d60 */
242,139, 94,242,137, 94,234,129,255, 0, 1,115, 87,139, 70,244, /* 0x d70 */
139, 86,246,139, 94,226,139, 78,228, 57,202,117, 2, 57,216,117, /* 0x d80 */
139, 86,246,139, 94,226,139, 78,228, 57,216,117, 7, 57,202,117, /* 0x d80 */
3,233,157,246,185, 8, 0,209,230,209,215,226,250,196, 94,244, /* 0x d90 */
38,138, 7,136, 70,166,198, 70,167, 0,139, 70,250,139, 86,252, /* 0x da0 */
136,214,136,226,136,196, 48,192,139, 94,166, 9,195,137, 94,250, /* 0x db0 */
@ -264,7 +264,7 @@ unsigned char stub_i086_dos16_exe[23995] = {
3, 0,233, 24, 1, 43,118,248, 25,215,139, 70,248, 41, 70,250, /* 0x e40 */
25, 86,252,177, 5,139, 94,234,139, 7,211,232, 41, 7,139, 94, /* 0x e50 */
242, 67, 67,137, 94,234,129,255, 0, 1,115, 87,139, 70,244,139, /* 0x e60 */
86,246,139, 94,226,139, 78,228, 57,202,117, 2, 57,216,117, 3, /* 0x e70 */
86,246,139, 94,226,139, 78,228, 57,216,117, 7, 57,202,117, 3, /* 0x e70 */
233,174,245,185, 8, 0,209,230,209,215,226,250,196, 94,244, 38, /* 0x e80 */
138, 7,136, 70,166,198, 70,167, 0,139, 70,250,139, 86,252,136, /* 0x e90 */
214,136,226,136,196, 48,192,139, 94,166, 9,195,137, 94,250,137, /* 0x ea0 */
@ -281,7 +281,7 @@ unsigned char stub_i086_dos16_exe[23995] = {
137, 94,234,199, 70,186, 16, 0,199, 70,196, 8, 0,139, 70,196, /* 0x f50 */
137, 70,194,199, 70,232, 1, 0,139, 70,232,209,224,139, 94,234, /* 0x f60 */
1,195,137, 94,218,129,255, 0, 1,115, 87,139, 70,244,139, 86, /* 0x f70 */
246,139, 94,226,139, 78,228, 57,202,117, 2, 57,216,117, 3,233, /* 0x f80 */
246,139, 94,226,139, 78,228, 57,216,117, 7, 57,202,117, 3,233, /* 0x f80 */
159,244,185, 8, 0,209,230,209,215,226,250,196, 94,244, 38,138, /* 0x f90 */
7,136, 70,166,198, 70,167, 0,139, 70,250,139, 86,252,136,214, /* 0x fa0 */
136,226,136,196, 48,192,139, 94,166, 9,195,137, 94,250,137, 86, /* 0x fb0 */
@ -300,7 +300,7 @@ unsigned char stub_i086_dos16_exe[23995] = {
211,226,139, 70,222, 5, 96, 3, 1,208,137, 70,242,199, 70,164, /* 0x1080 */
6, 0,199, 70,224, 1, 0,139, 70,224,209,224,139, 94,242, 1, /* 0x1090 */
195,137, 94,214,129,255, 0, 1,115, 87,139, 70,244,139, 86,246, /* 0x10a0 */
139, 94,226,139, 78,228, 57,202,117, 2, 57,216,117, 3,233,112, /* 0x10b0 */
139, 94,226,139, 78,228, 57,216,117, 7, 57,202,117, 3,233,112, /* 0x10b0 */
243,185, 8, 0,209,230,209,215,226,250,196, 94,244, 38,138, 7, /* 0x10c0 */
136, 70,166,198, 70,167, 0,139, 70,250,139, 86,252,136,214,136, /* 0x10d0 */
226,136,196, 48,192,139, 94,166, 9,195,137, 94,250,137, 86,252, /* 0x10e0 */
@ -319,8 +319,8 @@ unsigned char stub_i086_dos16_exe[23995] = {
102,154,209, 86,156,226,248,139, 86,154,209,226,139, 70,222, 5, /* 0x11b0 */
96, 5, 1,194,139, 70,224,209,224, 41,194, 74, 74,137, 86,242, /* 0x11c0 */
233,168, 0,233,168, 1,131,110,220, 4,129,255, 0, 1,115, 87, /* 0x11d0 */
139, 70,244,139, 86,246,139, 94,226,139, 78,228, 57,202,117, 2, /* 0x11e0 */
57,216,117, 3,233, 58,242,185, 8, 0,209,230,209,215,226,250, /* 0x11f0 */
139, 70,244,139, 86,246,139, 94,226,139, 78,228, 57,216,117, 7, /* 0x11e0 */
57,202,117, 3,233, 58,242,185, 8, 0,209,230,209,215,226,250, /* 0x11f0 */
196, 94,244, 38,138, 7,136, 70,166,198, 70,167, 0,139, 70,250, /* 0x1200 */
139, 86,252,136,214,136,226,136,196, 48,192,139, 94,166, 9,195, /* 0x1210 */
137, 94,250,137, 86,252,139, 70,244,140,194, 64,117, 3,128,198, /* 0x1220 */
@ -331,7 +331,7 @@ unsigned char stub_i086_dos16_exe[23995] = {
154,209, 86,156,226,248,199, 70,220, 4, 0,184, 1, 0,137, 70, /* 0x1270 */
192,137, 70,208,139, 70,208,209,224,139, 94,242, 1,195,137, 94, /* 0x1280 */
212,129,255, 0, 1,115, 87,139, 70,244,139, 86,246,139, 94,226, /* 0x1290 */
139, 78,228, 57,202,117, 2, 57,216,117, 3,233,131,241,185, 8, /* 0x12a0 */
139, 78,228, 57,216,117, 7, 57,202,117, 3,233,131,241,185, 8, /* 0x12a0 */
0,209,230,209,215,226,250,196, 94,244, 38,138, 7,136, 70,166, /* 0x12b0 */
198, 70,167, 0,139, 70,250,139, 86,252,136,214,136,226,136,196, /* 0x12c0 */
48,192,139, 94,166, 9,195,137, 94,250,137, 86,252,139, 70,244, /* 0x12d0 */
@ -356,7 +356,7 @@ unsigned char stub_i086_dos16_exe[23995] = {
142,194,138, 70,254, 38,136, 7,131,126,232, 0,117, 3,233, 38, /* 0x1400 */
240,139, 70,238, 59, 70, 26,114,152,117,243,139, 70,236, 59, 70, /* 0x1410 */
24,114,142,235,233,129,255, 0, 1,115, 41,139, 70,244,139, 86, /* 0x1420 */
246,139, 94,226,139, 78,228, 57,202,117, 2, 57,216,117, 3,233, /* 0x1430 */
246,139, 94,226,139, 78,228, 57,216,117, 7, 57,202,117, 3,233, /* 0x1430 */
239,239,139, 70,244,139, 86,246, 64,117, 3,128,198, 16,137, 70, /* 0x1440 */
244,137, 86,246,139, 70,244,139, 86,246,139, 94, 10,139, 78, 12, /* 0x1450 */
139, 94, 18,137, 7,137, 87, 2,139, 70,236,139, 94, 28,137, 7, /* 0x1460 */
@ -381,8 +381,8 @@ unsigned char stub_i086_dos16_exe[23995] = {
250,139, 86,252,136,214,136,226,136,196, 48,192,139, 94,166, 9, /* 0x1590 */
195,137, 94,250,137, 86,252,139, 70,244,140,194, 64,117, 3,128, /* 0x15a0 */
198, 16,137, 70,244,137, 86,246,255, 70,184,131,126,184, 5,125, /* 0x15b0 */
26,139, 70,244,139, 86,246,139, 94,226,139, 78,228, 57,202,117, /* 0x15c0 */
2, 57,216,117,172,184, 1, 0,233, 65, 16,139, 70,238, 59, 70, /* 0x15d0 */
26,139, 70,244,139, 86,246,139, 94,226,139, 78,228, 57,216,117, /* 0x15c0 */
176, 57,202,117,172,184, 1, 0,233, 65, 16,139, 70,238, 59, 70, /* 0x15d0 */
26,114, 13,116, 3,233,225, 15,139, 70,236, 59, 70, 24,115,245, /* 0x15e0 */
139, 70,236, 35, 70,168,137, 70,198,177, 5,139, 86,240,211,226, /* 0x15f0 */
3, 86,222,209,224, 1,194,137, 86,242,129,255, 0, 1,115, 84, /* 0x1600 */
@ -408,7 +408,7 @@ unsigned char stub_i086_dos16_exe[23995] = {
102,180,139, 70,180, 48,192,128,228, 1,137, 70,190,209,224,139, /* 0x1740 */
86,242,128,198, 2, 1,194,139, 70,230,209,224, 1,194,137, 86, /* 0x1750 */
210,129,255, 0, 1,115, 87,139, 70,244,139, 86,246,139, 94,226, /* 0x1760 */
139, 78,228, 57,202,117, 2, 57,216,117, 3,233, 87,254,185, 8, /* 0x1770 */
139, 78,228, 57,216,117, 7, 57,202,117, 3,233, 87,254,185, 8, /* 0x1770 */
0,209,230,209,215,226,250,196, 94,244, 38,138, 7,136, 70,166, /* 0x1780 */
198, 70,167, 0,139, 70,250,139, 86,252,136,214,136,226,136,196, /* 0x1790 */
48,192,139, 94,166, 9,195,137, 94,250,137, 86,252,139, 70,244, /* 0x17a0 */
@ -424,7 +424,7 @@ unsigned char stub_i086_dos16_exe[23995] = {
0,116, 10,129,126,230, 0, 1,125, 3,233,242,254,139, 70,230, /* 0x1840 */
61, 0, 1,124, 3,233,228, 0,209,224,139, 94,242, 1,195,137, /* 0x1850 */
94,216,129,255, 0, 1,115, 87,139, 70,244,139, 86,246,139, 94, /* 0x1860 */
226,139, 78,228, 57,202,117, 2, 57,216,117, 3,233, 86,253,185, /* 0x1870 */
226,139, 78,228, 57,216,117, 7, 57,202,117, 3,233, 86,253,185, /* 0x1870 */
8, 0,209,230,209,215,226,250,196, 94,244, 38,138, 7,136, 70, /* 0x1880 */
166,198, 70,167, 0,139, 70,250,139, 86,252,136,214,136,226,136, /* 0x1890 */
196, 48,192,139, 94,166, 9,195,137, 94,250,137, 86,252,139, 70, /* 0x18a0 */
@ -445,8 +445,8 @@ unsigned char stub_i086_dos16_exe[23995] = {
43,118,248, 25,215,139, 70,248, 41, 70,250, 25, 86,252,177, 5, /* 0x1990 */
139, 94,242,139, 7,211,232, 41, 7,139, 70,240,209,224,139, 86, /* 0x19a0 */
222,129,194,128, 1, 1,194,137, 86,242,129,255, 0, 1,115, 87, /* 0x19b0 */
139, 70,244,139, 86,246,139, 94,226,139, 78,228, 57,202,117, 2, /* 0x19c0 */
57,216,117, 3,233,254,251,185, 8, 0,209,230,209,215,226,250, /* 0x19d0 */
139, 70,244,139, 86,246,139, 94,226,139, 78,228, 57,216,117, 7, /* 0x19c0 */
57,202,117, 3,233,254,251,185, 8, 0,209,230,209,215,226,250, /* 0x19d0 */
196, 94,244, 38,138, 7,136, 70,166,198, 70,167, 0,139, 70,250, /* 0x19e0 */
139, 86,252,136,214,136,226,136,196, 48,192,139, 94,166, 9,195, /* 0x19f0 */
137, 94,250,137, 86,252,139, 70,244,140,194, 64,117, 3,128,198, /* 0x1a00 */
@ -463,7 +463,7 @@ unsigned char stub_i086_dos16_exe[23995] = {
70,250, 25, 86,252,177, 5,139, 94,242,139, 7,211,232, 41, 7, /* 0x1ab0 */
139, 86,240,209,226,139, 70,222, 5,152, 1, 1,208,137, 70,242, /* 0x1ac0 */
129,255, 0, 1,115, 87,139, 70,244,139, 86,246,139, 94,226,139, /* 0x1ad0 */
78,228, 57,202,117, 2, 57,216,117, 3,233,232,250,185, 8, 0, /* 0x1ae0 */
78,228, 57,216,117, 7, 57,202,117, 3,233,232,250,185, 8, 0, /* 0x1ae0 */
209,230,209,215,226,250,196, 94,244, 38,138, 7,136, 70,166,198, /* 0x1af0 */
70,167, 0,139, 70,250,139, 86,252,136,214,136,226,136,196, 48, /* 0x1b00 */
192,139, 94,166, 9,195,137, 94,250,137, 86,252,139, 70,244,140, /* 0x1b10 */
@ -477,7 +477,7 @@ unsigned char stub_i086_dos16_exe[23995] = {
177, 5,211,232, 1, 7,139, 70,240,211,224,139, 86,222,129,194, /* 0x1b90 */
224, 1, 1,194,139, 70,198,209,224, 1,194,137, 86,242,129,255, /* 0x1ba0 */
0, 1,115, 86,139, 70,244,139, 86,246,139, 94,226,139, 78,228, /* 0x1bb0 */
57,202,117, 2, 57,216,117, 3,233, 10,250,137,240,185, 8, 0, /* 0x1bc0 */
57,216,117, 7, 57,202,117, 3,233, 10,250,137,240,185, 8, 0, /* 0x1bc0 */
209,224,209,215,226,250,137,198,196, 94,244, 38,138, 7,136, 70, /* 0x1bd0 */
166,198, 70,167, 0,139, 70,250,139, 86,252,136,214,136,226,136, /* 0x1be0 */
196, 48,192,139, 94,166, 9,195,137, 94,250,137, 86,252,139, 94, /* 0x1bf0 */
@ -500,7 +500,7 @@ unsigned char stub_i086_dos16_exe[23995] = {
70,252,177, 5,139, 94,242,139, 7,211,232, 41, 7,139, 70,240, /* 0x1d00 */
209,224,139, 86,222,129,194,176, 1, 1,194,137, 86,242,129,255, /* 0x1d10 */
0, 1,115, 82,139, 70,244,139, 86,246,139, 94,226,139, 78,228, /* 0x1d20 */
57,202,117, 2, 57,216,117, 3,233,154,248,185, 8, 0,209,230, /* 0x1d30 */
57,216,117, 7, 57,202,117, 3,233,154,248,185, 8, 0,209,230, /* 0x1d30 */
209,215,226,250,196, 94,244, 38,138, 7,136, 70,166,198, 70,167, /* 0x1d40 */
0,139, 70,250,139, 86,252,136,214,136,226,136,196, 48,192,139, /* 0x1d50 */
94,166, 9,195,137, 94,250,137, 86,252,139, 94,174,137, 94,244, /* 0x1d60 */
@ -513,8 +513,8 @@ unsigned char stub_i086_dos16_exe[23995] = {
1, 43,118,248, 25,215,139, 70,248, 41, 70,250, 25, 86,252,177, /* 0x1dd0 */
5,139, 94,242,139, 7,211,232, 41, 7,139, 86,240,209,226,139, /* 0x1de0 */
70,222, 5,200, 1, 1,208,137, 70,242,129,255, 0, 1,115, 87, /* 0x1df0 */
139, 70,244,139, 86,246,139, 94,226,139, 78,228, 57,202,117, 2, /* 0x1e00 */
57,216,117, 3,233,190,247,185, 8, 0,209,230,209,215,226,250, /* 0x1e10 */
139, 70,244,139, 86,246,139, 94,226,139, 78,228, 57,216,117, 7, /* 0x1e00 */
57,202,117, 3,233,190,247,185, 8, 0,209,230,209,215,226,250, /* 0x1e10 */
196, 94,244, 38,138, 7,136, 70,166,198, 70,167, 0,139, 70,250, /* 0x1e20 */
139, 86,252,136,214,136,226,136,196, 48,192,139, 94,166, 9,195, /* 0x1e30 */
137, 94,250,137, 86,252,139, 70,244,140,194, 64,117, 3,128,198, /* 0x1e40 */
@ -531,8 +531,8 @@ unsigned char stub_i086_dos16_exe[23995] = {
156,137, 86,206,137, 70,154,137, 78,156,131,126,240, 7,125, 5, /* 0x1ef0 */
184, 8, 0,235, 3,184, 11, 0,137, 70,240,139, 94,222,129,195, /* 0x1f00 */
104, 10,137, 94,242,139, 94,242,137, 94,234,129,255, 0, 1,115, /* 0x1f10 */
87,139, 70,244,139, 86,246,139, 94,226,139, 78,228, 57,202,117, /* 0x1f20 */
2, 57,216,117, 3,233,157,246,185, 8, 0,209,230,209,215,226, /* 0x1f30 */
87,139, 70,244,139, 86,246,139, 94,226,139, 78,228, 57,216,117, /* 0x1f20 */
7, 57,202,117, 3,233,157,246,185, 8, 0,209,230,209,215,226, /* 0x1f30 */
250,196, 94,244, 38,138, 7,136, 70,166,198, 70,167, 0,139, 70, /* 0x1f40 */
250,139, 86,252,136,214,136,226,136,196, 48,192,139, 94,166, 9, /* 0x1f50 */
195,137, 94,250,137, 86,252,139, 70,244,140,194, 64,117, 3,128, /* 0x1f60 */
@ -546,8 +546,8 @@ unsigned char stub_i086_dos16_exe[23995] = {
186,199, 70,196, 3, 0,233, 24, 1, 43,118,248, 25,215,139, 70, /* 0x1fe0 */
248, 41, 70,250, 25, 86,252,177, 5,139, 94,234,139, 7,211,232, /* 0x1ff0 */
41, 7,139, 94,242, 67, 67,137, 94,234,129,255, 0, 1,115, 87, /* 0x2000 */
139, 70,244,139, 86,246,139, 94,226,139, 78,228, 57,202,117, 2, /* 0x2010 */
57,216,117, 3,233,174,245,185, 8, 0,209,230,209,215,226,250, /* 0x2020 */
139, 70,244,139, 86,246,139, 94,226,139, 78,228, 57,216,117, 7, /* 0x2010 */
57,202,117, 3,233,174,245,185, 8, 0,209,230,209,215,226,250, /* 0x2020 */
196, 94,244, 38,138, 7,136, 70,166,198, 70,167, 0,139, 70,250, /* 0x2030 */
139, 86,252,136,214,136,226,136,196, 48,192,139, 94,166, 9,195, /* 0x2040 */
137, 94,250,137, 86,252,139, 70,244,140,194, 64,117, 3,128,198, /* 0x2050 */
@ -563,8 +563,8 @@ unsigned char stub_i086_dos16_exe[23995] = {
129,195, 4, 2,137, 94,234,199, 70,186, 16, 0,199, 70,196, 8, /* 0x20f0 */
0,139, 70,196,137, 70,194,199, 70,232, 1, 0,139, 70,232,209, /* 0x2100 */
224,139, 94,234, 1,195,137, 94,218,129,255, 0, 1,115, 87,139, /* 0x2110 */
70,244,139, 86,246,139, 94,226,139, 78,228, 57,202,117, 2, 57, /* 0x2120 */
216,117, 3,233,159,244,185, 8, 0,209,230,209,215,226,250,196, /* 0x2130 */
70,244,139, 86,246,139, 94,226,139, 78,228, 57,216,117, 7, 57, /* 0x2120 */
202,117, 3,233,159,244,185, 8, 0,209,230,209,215,226,250,196, /* 0x2130 */
94,244, 38,138, 7,136, 70,166,198, 70,167, 0,139, 70,250,139, /* 0x2140 */
86,252,136,214,136,226,136,196, 48,192,139, 94,166, 9,195,137, /* 0x2150 */
94,250,137, 86,252,139, 70,244,140,194, 64,117, 3,128,198, 16, /* 0x2160 */
@ -582,7 +582,7 @@ unsigned char stub_i086_dos16_exe[23995] = {
177, 7,137,194,211,226,139, 70,222, 5, 96, 3, 1,208,137, 70, /* 0x2220 */
242,199, 70,164, 6, 0,199, 70,224, 1, 0,139, 70,224,209,224, /* 0x2230 */
139, 94,242, 1,195,137, 94,214,129,255, 0, 1,115, 87,139, 70, /* 0x2240 */
244,139, 86,246,139, 94,226,139, 78,228, 57,202,117, 2, 57,216, /* 0x2250 */
244,139, 86,246,139, 94,226,139, 78,228, 57,216,117, 7, 57,202, /* 0x2250 */
117, 3,233,112,243,185, 8, 0,209,230,209,215,226,250,196, 94, /* 0x2260 */
244, 38,138, 7,136, 70,166,198, 70,167, 0,139, 70,250,139, 86, /* 0x2270 */
252,136,214,136,226,136,196, 48,192,139, 94,166, 9,195,137, 94, /* 0x2280 */
@ -602,7 +602,7 @@ unsigned char stub_i086_dos16_exe[23995] = {
139, 70,222, 5, 96, 5, 1,194,139, 70,224,209,224, 41,194, 74, /* 0x2360 */
74,137, 86,242,233,168, 0,233,168, 1,131,110,220, 4,129,255, /* 0x2370 */
0, 1,115, 87,139, 70,244,139, 86,246,139, 94,226,139, 78,228, /* 0x2380 */
57,202,117, 2, 57,216,117, 3,233, 58,242,185, 8, 0,209,230, /* 0x2390 */
57,216,117, 7, 57,202,117, 3,233, 58,242,185, 8, 0,209,230, /* 0x2390 */
209,215,226,250,196, 94,244, 38,138, 7,136, 70,166,198, 70,167, /* 0x23a0 */
0,139, 70,250,139, 86,252,136,214,136,226,136,196, 48,192,139, /* 0x23b0 */
94,166, 9,195,137, 94,250,137, 86,252,139, 70,244,140,194, 64, /* 0x23c0 */
@ -613,7 +613,7 @@ unsigned char stub_i086_dos16_exe[23995] = {
4, 0,209,102,154,209, 86,156,226,248,199, 70,220, 4, 0,184, /* 0x2410 */
1, 0,137, 70,192,137, 70,208,139, 70,208,209,224,139, 94,242, /* 0x2420 */
1,195,137, 94,212,129,255, 0, 1,115, 87,139, 70,244,139, 86, /* 0x2430 */
246,139, 94,226,139, 78,228, 57,202,117, 2, 57,216,117, 3,233, /* 0x2440 */
246,139, 94,226,139, 78,228, 57,216,117, 7, 57,202,117, 3,233, /* 0x2440 */
131,241,185, 8, 0,209,230,209,215,226,250,196, 94,244, 38,138, /* 0x2450 */
7,136, 70,166,198, 70,167, 0,139, 70,250,139, 86,252,136,214, /* 0x2460 */
136,226,136,196, 48,192,139, 94,166, 9,195,137, 94,250,137, 86, /* 0x2470 */
@ -638,8 +638,8 @@ unsigned char stub_i086_dos16_exe[23995] = {
1,218,137,195,142,194,138, 70,254, 38,136, 7,131,126,232, 0, /* 0x25a0 */
117, 3,233, 38,240,139, 70,238, 59, 70, 26,114,152,117,243,139, /* 0x25b0 */
70,236, 59, 70, 24,114,142,235,233,129,255, 0, 1,115, 41,139, /* 0x25c0 */
70,244,139, 86,246,139, 94,226,139, 78,228, 57,202,117, 2, 57, /* 0x25d0 */
216,117, 3,233,239,239,139, 70,244,139, 86,246, 64,117, 3,128, /* 0x25e0 */
70,244,139, 86,246,139, 94,226,139, 78,228, 57,216,117, 7, 57, /* 0x25d0 */
202,117, 3,233,239,239,139, 70,244,139, 86,246, 64,117, 3,128, /* 0x25e0 */
198, 16,137, 70,244,137, 86,246,139, 70,244,139, 86,246,139, 94, /* 0x25f0 */
10,139, 78, 12,139, 94, 18,137, 7,137, 87, 2,139, 70,236,139, /* 0x2600 */
94, 28,137, 7,139, 70,238,137, 71, 2, 49,192,137,236, 93, 95, /* 0x2610 */

View File

@ -105,7 +105,12 @@ def main(argv):
return k
olines = []
def omatch(pos, m):
def omatch(pos, mlen, m, debug=0):
assert len(m) >= abs(mlen)
def sgn(x):
if x < 0: return -1
if x > 0: return 1
return 0
def match(a, b):
if b is None:
return False
@ -114,23 +119,31 @@ def main(argv):
return re.search(a, b.lower())
else:
return a.lower() == b.lower()
i = 0
dpos = []
while i < len(m):
mpos = []
while len(mpos) != abs(mlen):
if pos < 0 or pos >= len(olines):
return []
o = olines[pos][1:3]
o = olines[pos]
if o[1] != "*DEL*":
mpos.append(pos)
pos += sgn(mlen)
if mlen < 0:
mpos.reverse()
if debug and 1: print mlen, m, [olines[x] for x in mpos]
dpos = []
i = -abs(mlen)
while i < 0:
pos = mpos[i]
o = olines[pos]
assert o[1] != "*DEL*"
assert len(m[i]) == 2, (i, m)
if o[1] == "*DEL*":
pos += 1
continue
m0 = match(m[i][0], o[0])
m1 = match(m[i][1], o[1])
m0 = match(m[i][0], o[1])
m1 = match(m[i][1], o[2])
if not m0 or not m1:
return []
dpos.append([pos, m0, m1])
pos += 1
i += 1
assert len(dpos) == abs(mlen)
return dpos
def orewrite_inst(i, inst, args, dpos):
for pos, m0, m1 in dpos:
@ -187,11 +200,11 @@ def main(argv):
["mov", "bx,word ptr [bx]"],
["xor", "cx,cx"],
]
dpos = omatch(i - 2, s[-2:])
dpos = omatch(i-1, -2, s, debug=0)
if 0 and dpos:
orewrite_inst(i, "M_LMUL_dxax_00bx_ptr", "", dpos)
continue
dpos = omatch(i - 1, s[-1:])
dpos = omatch(i-1, -1, s)
if dpos:
orewrite_inst(i, "M_LMUL_dxax_00bx", "", dpos)
continue
@ -202,7 +215,7 @@ def main(argv):
["push", "word ptr [bp-66]"],
["push", "word ptr [bp-68]"],
]
dpos = omatch(i - 4, s[-4:])
dpos = omatch(i-1, -4, s)
if dpos:
orewrite_inst(i, "*DEL*", "", dpos)
continue
@ -211,17 +224,27 @@ def main(argv):
["mov", "bx,0x1"],
["xor", "cx,cx"],
]
dpos = omatch(i - 2, s[-2:])
dpos = omatch(i-1, -2, s)
if dpos:
orewrite_inst(i, "M_PIA1", "", dpos)
continue
if k == "__PTC":
s = [
["jne", "(.*)"],
]
dpos = omatch(i+1, 1, s)
if dpos:
olines[i][1] = "M_PTC_JNE"
k, v = parse_label("jne", dpos[0][2].group(1))
orewrite_call(i, k, v, dpos)
continue
if opts.loop_rewrite and inst in ["loop"]:
s = [
["mov", r"^c[lx],0xb$"],
["shr", "dx,1"],
["rcr", "ax,1"],
]
dpos = omatch(i - 3, s[-3:])
dpos = omatch(i-1, -3, s)
if dpos:
orewrite_inst(i, "M_shrd_11", "", dpos)
continue
@ -230,7 +253,7 @@ def main(argv):
["shl", "ax,1"],
["rcl", "dx,1"],
]
dpos = omatch(i - 3, s[-3:])
dpos = omatch(i-1, -3, s)
if dpos:
orewrite_inst(i, "M_shld_8", "", dpos)
continue
@ -247,9 +270,9 @@ def main(argv):
["mov", r"^ax,word ptr"],
["mov", r"^dx,word ptr"],
]
dpos1 = omatch(i - 3, s1[-3:])
dpos2 = omatch(i + 1, s2)
dpos3 = omatch(i + 1, s3)
dpos1 = omatch(i-1, -3, s1)
dpos2 = omatch(i+1, 2, s2)
dpos3 = omatch(i+1, 2, s3)
if dpos1 and (dpos2 or dos3):
bp_dx, bp_ax = dpos1[-1][2].group(1), dpos1[-2][2].group(1)
m = "M_shld_8_bp %s %s" % (bp_dx, bp_ax)
@ -268,8 +291,8 @@ def main(argv):
["mov", r"^ax,word ptr \[bp([+-]\d+)\]$"],
["mov", r"^dx,word ptr \[bp([+-]\d+)\]$"],
]
dpos1 = omatch(i - 5, s1[-5:])
dpos2 = omatch(i + 1, s2)
dpos1 = omatch(i-1, -5, s1)
dpos2 = omatch(i+1, 4, s2)
if dpos1 and dpos2:
bp_dx, bp_ax = dpos1[-2][2].group(1), dpos1[-1][2].group(1)
bp_di, bp_si = dpos1[-4][2].group(1), dpos1[-5][2].group(1)

View File

@ -60,7 +60,19 @@
mul bx // dx:ax := ax * bx
// add high-word
add dx, cx // add high-word result
//xor cx, cx // FIXME - do we need this ?
.endm
// umul32: dx:ax = dx:ax * word ptr [bx]
.macro M_LMUL_dxax_00bx_ptr
// mult high-word
mov cx, ax // save ax
mov ax, dx
mul word ptr [bx]
xchg ax, cx // save high-word result, get saved ax
// mult low-word
mul word ptr [bx]
// add high-word
add dx, cx // add high-word result
.endm
@ -73,7 +85,6 @@
mul bx
// add high-word
add dx, cx // add high-word result
//xor cx, cx // FIXME - do we need this ?
.endm
@ -83,7 +94,6 @@
mov dl, ah
mov ah, al
xor al, al
//xor cx, cx // FIXME - do we need this ?
.endm
.macro M_shld_8_bp h l
@ -118,7 +128,6 @@
shl bx, cl
or ax, bx
#endif
//xor cx, cx // FIXME - do we need this ?
.endm
.macro M_shrd_11_bp h l
@ -202,6 +211,12 @@ L1:
.macro M_PTC
M_WCC_PTC
.endm
.macro M_PTC_JNE l
cmp ax, bx
jnes l
cmp dx, cx
jnes l
.endm
.macro M_PTS
.endm

View File

@ -116,8 +116,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Lf005
M_PTC_JNE .Lf005
.Lf007:
mov ax,0x1
jmp .Lf139
@ -264,8 +263,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Lf021
M_PTC_JNE .Lf021
jmp .Lf007
.Lf021:
mov cx,0x8
@ -353,8 +351,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Lf029
M_PTC_JNE .Lf029
jmp .Lf007
.Lf029:
mov cx,0x8
@ -470,8 +467,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Lf038
M_PTC_JNE .Lf038
jmp .Lf007
.Lf038:
mov cx,0x8
@ -564,8 +560,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Lf045
M_PTC_JNE .Lf045
jmp .Lf007
.Lf045:
mov cx,0x8
@ -635,8 +630,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Lf051
M_PTC_JNE .Lf051
jmp .Lf007
.Lf051:
mov ax,si
@ -758,8 +752,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Lf061
M_PTC_JNE .Lf061
jmp .Lf007
.Lf061:
mov cx,0x8
@ -831,8 +824,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Lf066
M_PTC_JNE .Lf066
jmp .Lf007
.Lf066:
mov cx,0x8
@ -932,8 +924,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Lf077
M_PTC_JNE .Lf077
jmp .Lf007
.Lf077:
mov cx,0x8
@ -1013,8 +1004,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Lf083
M_PTC_JNE .Lf083
jmp .Lf007
.Lf083:
mov cx,0x8
@ -1102,8 +1092,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Lf090
M_PTC_JNE .Lf090
jmp .Lf007
.Lf090:
mov cx,0x8
@ -1209,8 +1198,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Lf100
M_PTC_JNE .Lf100
jmp .Lf007
.Lf100:
mov cx,0x8
@ -1324,8 +1312,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Lf112
M_PTC_JNE .Lf112
jmp .Lf007
.Lf112:
mov cx,0x8
@ -1394,8 +1381,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Lf121
M_PTC_JNE .Lf121
jmp .Lf007
.Lf121:
mov cx,0x8
@ -1537,8 +1523,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Lf137
M_PTC_JNE .Lf137
jmp .Lf007
.Lf137:
mov ax,word ptr [bp-12]

View File

@ -116,8 +116,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Ls005
M_PTC_JNE .Ls005
.Ls007:
mov ax,0x1
jmp .Ls139
@ -264,8 +263,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Ls021
M_PTC_JNE .Ls021
jmp .Ls007
.Ls021:
mov cx,0x8
@ -353,8 +351,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Ls029
M_PTC_JNE .Ls029
jmp .Ls007
.Ls029:
mov cx,0x8
@ -470,8 +467,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Ls038
M_PTC_JNE .Ls038
jmp .Ls007
.Ls038:
mov cx,0x8
@ -564,8 +560,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Ls045
M_PTC_JNE .Ls045
jmp .Ls007
.Ls045:
mov cx,0x8
@ -635,8 +630,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Ls051
M_PTC_JNE .Ls051
jmp .Ls007
.Ls051:
mov ax,si
@ -758,8 +752,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Ls061
M_PTC_JNE .Ls061
jmp .Ls007
.Ls061:
mov cx,0x8
@ -831,8 +824,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Ls066
M_PTC_JNE .Ls066
jmp .Ls007
.Ls066:
mov cx,0x8
@ -932,8 +924,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Ls077
M_PTC_JNE .Ls077
jmp .Ls007
.Ls077:
mov cx,0x8
@ -1013,8 +1004,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Ls083
M_PTC_JNE .Ls083
jmp .Ls007
.Ls083:
mov cx,0x8
@ -1102,8 +1092,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Ls090
M_PTC_JNE .Ls090
jmp .Ls007
.Ls090:
mov cx,0x8
@ -1209,8 +1198,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Ls100
M_PTC_JNE .Ls100
jmp .Ls007
.Ls100:
mov cx,0x8
@ -1324,8 +1312,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Ls112
M_PTC_JNE .Ls112
jmp .Ls007
.Ls112:
mov cx,0x8
@ -1394,8 +1381,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Ls121
M_PTC_JNE .Ls121
jmp .Ls007
.Ls121:
mov cx,0x8
@ -1537,8 +1523,7 @@
mov dx,word ptr [bp-10]
mov bx,word ptr [bp-30]
mov cx,word ptr [bp-28]
M_PTC
jne .Ls137
M_PTC_JNE .Ls137
jmp .Ls007
.Ls137:
mov ax,word ptr [bp-12]