Compare commits
645 Commits
saniya_dat
...
default
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
52ad82f8b9 | ||
|
|
b1d1b5e1f8 | ||
|
|
8c94b1316c | ||
|
|
56e13e24e0 | ||
|
|
1b8df04e58 | ||
|
|
95ad06849b | ||
|
|
de2f99dc1a | ||
|
|
ea4142daee | ||
|
|
ff9bf5b08a | ||
|
|
de7023dd61 | ||
|
|
f67c98e239 | ||
|
|
612e38f1c6 | ||
|
|
96e7447bfa | ||
|
|
2b6d251dec | ||
|
|
2a95b1c5e3 | ||
|
|
5bae29a00c | ||
|
|
08823a172c | ||
|
|
84ee7c9cc4 | ||
|
|
2b2bd93e44 | ||
|
|
44b6421519 | ||
|
|
671bf250f5 | ||
|
|
918f300513 | ||
|
|
1b66b63eae | ||
|
|
3584ddb6e9 | ||
|
|
a4f136f999 | ||
|
|
03a0b182c4 | ||
|
|
1a7b4f8729 | ||
|
|
53c9731036 | ||
|
|
856eb120b3 | ||
|
|
edee22510b | ||
|
|
52eaf753b6 | ||
|
|
f561b94b49 | ||
|
|
204f932ed2 | ||
|
|
23e8d5af5a | ||
|
|
46bd70380c | ||
|
|
420c47c386 | ||
|
|
7b8d9e2d0e | ||
|
|
870489c8b0 | ||
|
|
53f043ff40 | ||
|
|
38c6a87ed5 | ||
|
|
8b24b0247b | ||
|
|
a42939df50 | ||
|
|
2dab95eced | ||
|
|
4d24666432 | ||
|
|
38fa6941d5 | ||
|
|
fb2a42a2db | ||
|
|
3df4906d52 | ||
|
|
b549980af2 | ||
|
|
f253b6a169 | ||
|
|
262c5fedcf | ||
|
|
10746f8b97 | ||
|
|
e0b8bd221d | ||
|
|
e770d09dc8 | ||
|
|
00c67fcc0e | ||
|
|
dbf8332bf0 | ||
|
|
8e869b56e7 | ||
|
|
08b7c4aaae | ||
|
|
7c60c27302 | ||
|
|
b592c88bdf | ||
|
|
a200a2fb53 | ||
|
|
3ce4e53aa9 | ||
|
|
c213602a02 | ||
|
|
0d77cb8279 | ||
|
|
b50dc4214a | ||
|
|
5e84be70fd | ||
|
|
b2bb4ce3b2 | ||
|
|
363d13cc2f | ||
|
|
c6292642c6 | ||
|
|
f9c77fca03 | ||
|
|
cdeea836f2 | ||
|
|
a8a9d1bbfa | ||
|
|
bff5c4019c | ||
|
|
2770a83837 | ||
|
|
1fdc69fb97 | ||
|
|
05e3cf286f | ||
|
|
b7720c298b | ||
|
|
2d2497c318 | ||
|
|
523374c36b | ||
|
|
bcf3408e36 | ||
|
|
cdbd605803 | ||
|
|
f70c12fad5 | ||
|
|
60edd08390 | ||
|
|
90764320bb | ||
|
|
c8711628ab | ||
|
|
7f7005bac5 | ||
|
|
d805052205 | ||
|
|
1978867fd2 | ||
|
|
2af8568cc3 | ||
|
|
09554cb324 | ||
|
|
605651776e | ||
|
|
a04dbf33f3 | ||
|
|
015804afce | ||
|
|
f47bb49c1f | ||
|
|
fcc5a878ae | ||
|
|
8082ef16a7 | ||
|
|
f4449e3f97 | ||
|
|
79f7c0ad23 | ||
|
|
b7d2b9c3cf | ||
|
|
14ccf7151e | ||
|
|
cb0111b290 | ||
|
|
df1372ab35 | ||
|
|
d0bfee142b | ||
|
|
ffc03090ea | ||
|
|
059073e56c | ||
|
|
45f0cb3c0d | ||
|
|
6db95dc81e | ||
|
|
ca981a2f6a | ||
|
|
73ade9cbcf | ||
|
|
82399d86ae | ||
|
|
88bd7ce126 | ||
|
|
9d620ad1c2 | ||
|
|
4b3c1a2d07 | ||
|
|
f24658181d | ||
|
|
7ee4dcde7b | ||
|
|
ef8e6e25e0 | ||
|
|
fd7e9f9046 | ||
|
|
391cb0f2cd | ||
|
|
863b610144 | ||
|
|
b7b449cec3 | ||
|
|
7e964dd25e | ||
|
|
88e13ecce3 | ||
|
|
e85991ec86 | ||
|
|
436db46f48 | ||
|
|
ff0c78cc78 | ||
|
|
4c5eb9a602 | ||
|
|
5e9f79db05 | ||
|
|
f07c6e4d6a | ||
|
|
ff774212be | ||
|
|
171f16d7b8 | ||
|
|
62cc636f10 | ||
|
|
44b5d01525 | ||
|
|
b146d2641c | ||
|
|
98ea849d03 | ||
|
|
9f23fbbe6a | ||
|
|
c5018d7088 | ||
|
|
3d5e72e20b | ||
|
|
2271bcd0a7 | ||
|
|
6a340ea1bd | ||
|
|
e36d739fa4 | ||
|
|
8b6951dac0 | ||
|
|
edb174da8d | ||
|
|
29af6f1adb | ||
|
|
2b3f95de0b | ||
|
|
c72eaef8ee | ||
|
|
d94c1c8150 | ||
|
|
2be811bac2 | ||
|
|
fd2360be0f | ||
|
|
55be35a68a | ||
|
|
052dd9bfc0 | ||
|
|
eaf4339cd6 | ||
|
|
bbd4b46850 | ||
|
|
ed6c4a85d1 | ||
|
|
3e0123ca03 | ||
|
|
aacabba165 | ||
|
|
86c6fa2f1e | ||
|
|
d5a112dbfd | ||
|
|
2054618e75 | ||
|
|
d273497077 | ||
|
|
074b42aa97 | ||
|
|
f522aba4af | ||
|
|
69953d016c | ||
|
|
d3e3e72860 | ||
|
|
6fff2d45fe | ||
|
|
e0c121d6e6 | ||
|
|
1f36370d87 | ||
|
|
ae993b1eb2 | ||
|
|
38e4726f5c | ||
|
|
ef25c53c9c | ||
|
|
e01f00e320 | ||
|
|
366cd10194 | ||
|
|
510888e6d5 | ||
|
|
6284512b37 | ||
|
|
bd9497be77 | ||
|
|
308d41e083 | ||
|
|
e299cc3bcf | ||
|
|
8c21a2ef9b | ||
|
|
6a672d5e96 | ||
|
|
3b07fee160 | ||
|
|
b6680a48cc | ||
|
|
d7efb0a32c | ||
|
|
2ee79ab0b2 | ||
|
|
ec25fec145 | ||
|
|
472f778342 | ||
|
|
98e745d04c | ||
|
|
98a51732ab | ||
|
|
2c7ee27206 | ||
|
|
6cbe6e1c4e | ||
|
|
8f338f9b44 | ||
|
|
7537c85e0a | ||
|
|
b5e5df4a63 | ||
|
|
cdce394b6c | ||
|
|
9e556d8b7b | ||
|
|
0068952bd1 | ||
|
|
6b5316dcfa | ||
|
|
08c4334224 | ||
|
|
72542288cd | ||
|
|
f904465e9c | ||
|
|
5e9102955c | ||
|
|
1312fe298b | ||
|
|
92817a6ad7 | ||
|
|
877e06ed89 | ||
|
|
6cdea73e84 | ||
|
|
d6565f4d5b | ||
|
|
e5341e4167 | ||
|
|
970f2bae62 | ||
|
|
5082b2a5d7 | ||
|
|
11890026db | ||
|
|
76ba0bf6b3 | ||
|
|
61bff18082 | ||
|
|
80f85001fa | ||
|
|
a46ee91859 | ||
|
|
4f15423d63 | ||
|
|
80afe75c9b | ||
|
|
febe8ca937 | ||
|
|
fc2833d456 | ||
|
|
fc1b3672a3 | ||
|
|
c18a82ec40 | ||
|
|
26877d3c4f | ||
|
|
5378e3fe53 | ||
|
|
5b4aa07dee | ||
|
|
9a513e8ef3 | ||
|
|
e7c2029c9c | ||
|
|
32ebc502c8 | ||
|
|
e5f6d5acfa | ||
|
|
f70f78b6e4 | ||
|
|
84f81a442c | ||
|
|
24ef1627ec | ||
|
|
11377070fd | ||
|
|
8fbce949f5 | ||
|
|
aaa3f14a79 | ||
|
|
e9233b4712 | ||
|
|
f6c43b95ef | ||
|
|
66aebcdd91 | ||
|
|
a6ebaeabd0 | ||
|
|
d5f0107746 | ||
|
|
a68b117e96 | ||
|
|
07453d184a | ||
|
|
442306d557 | ||
|
|
81778b603f | ||
|
|
af0dedeb6e | ||
|
|
b0c238eb5d | ||
|
|
c1aca7dae5 | ||
|
|
d89f172841 | ||
|
|
d91a1dc1a6 | ||
|
|
b9b808e01a | ||
|
|
99d7f513f2 | ||
|
|
bcfb3d802f | ||
|
|
8e2d027c49 | ||
|
|
8d0261473d | ||
|
|
c93cb69959 | ||
|
|
c8fdcff960 | ||
|
|
dccecc5d45 | ||
|
|
0fc7fd5d33 | ||
|
|
4349d702fa | ||
|
|
2beb3646a7 | ||
|
|
7ef9b79c11 | ||
|
|
3dcc3bd1cf | ||
|
|
e7c79415b5 | ||
|
|
0131ca4d46 | ||
|
|
be234ea759 | ||
|
|
8bf34937f1 | ||
|
|
99eb12a282 | ||
|
|
96ea0a5903 | ||
|
|
800d4ae032 | ||
|
|
6ea172d0d9 | ||
|
|
1072a8797e | ||
|
|
2483e5723d | ||
|
|
58613009f8 | ||
|
|
b6dfaefeff | ||
|
|
eb0b730607 | ||
|
|
45ee287136 | ||
|
|
075cb488a3 | ||
|
|
a33473e0a5 | ||
|
|
7292b538bc | ||
|
|
a8ecb11013 | ||
|
|
085f346f8c | ||
|
|
c326f3c6a3 | ||
|
|
a0c67da261 | ||
|
|
293f34fa9b | ||
|
|
da6111328d | ||
|
|
7273130b4c | ||
|
|
9d2d5606ea | ||
|
|
5147166810 | ||
|
|
e537bcc321 | ||
|
|
5a872eed38 | ||
|
|
51b41f72f8 | ||
|
|
ee72886e54 | ||
|
|
2c54f8c742 | ||
|
|
481bcd8a8b | ||
|
|
fc44fe2185 | ||
|
|
4dd1ff6d80 | ||
|
|
58e5e12ead | ||
|
|
54ce3f451b | ||
|
|
663f4f2fb5 | ||
|
|
78777e802b | ||
|
|
df088c184b | ||
|
|
868b8c5075 | ||
|
|
eb4ea1e761 | ||
|
|
494d9a3e4a | ||
|
|
6127ddf024 | ||
|
|
9d0f0a8fdd | ||
|
|
c9d7f7ef23 | ||
|
|
a7323e1a8b | ||
|
|
3a4147a37d | ||
|
|
be8baf3da6 | ||
|
|
013f58f94e | ||
|
|
0d8578410c | ||
|
|
7f266d6b4e | ||
|
|
440d6faadd | ||
|
|
24ea8aee3d | ||
|
|
bc5ccee8d5 | ||
|
|
bfeb736c35 | ||
|
|
740940c9fc | ||
|
|
f6085fb234 | ||
|
|
b8e1348f2a | ||
|
|
413880c52d | ||
|
|
ae9ac25f45 | ||
|
|
f471d2e618 | ||
|
|
67c4f3de87 | ||
|
|
9b920e59cb | ||
|
|
9710c14c93 | ||
|
|
921c55968c | ||
|
|
1c83baa702 | ||
|
|
b66d66b597 | ||
|
|
2a367fa192 | ||
|
|
f4e37e1319 | ||
|
|
400c475c03 | ||
|
|
b500b1a7b7 | ||
|
|
201c66879d | ||
|
|
04860c08a8 | ||
|
|
daee8da3c4 | ||
|
|
4428647786 | ||
|
|
d77b4ce97c | ||
|
|
2d80c1d2c8 | ||
|
|
6a0dd9377d | ||
|
|
a4e52740bb | ||
|
|
8da0d38b6d | ||
|
|
17b0c36f69 | ||
|
|
040151dd76 | ||
|
|
9170d09462 | ||
|
|
415e7e14fc | ||
|
|
d85e045ae6 | ||
|
|
b046c21d7f | ||
|
|
3dd11c674d | ||
|
|
b611731ec3 | ||
|
|
6d58210806 | ||
|
|
0f16e7540d | ||
|
|
903796a817 | ||
|
|
0974fa0e28 | ||
|
|
6e509e22dd | ||
|
|
f6a41864cf | ||
|
|
f05f9de3ed | ||
|
|
877dc01422 | ||
|
|
880e3eade8 | ||
|
|
681e2e0432 | ||
|
|
d2c505ad6b | ||
|
|
26a9b76507 | ||
|
|
5c5f711cbb | ||
|
|
809cd2ef0b | ||
|
|
5165f0b11f | ||
|
|
39689a4de9 | ||
|
|
e4292486a3 | ||
|
|
08431edbdb | ||
|
|
611bc73043 | ||
|
|
f9ddb860a9 | ||
|
|
94a7b315e3 | ||
|
|
c40a44b52e | ||
|
|
478d0b1d8a | ||
|
|
df153ba299 | ||
|
|
1c7bb87041 | ||
|
|
c21ba9ed0f | ||
|
|
02a2876821 | ||
|
|
30b980bf7e | ||
|
|
c0ecde554a | ||
|
|
47e1c27c05 | ||
|
|
12683dd8c6 | ||
|
|
dbe10d2c19 | ||
|
|
708a83ef22 | ||
|
|
1e4ca91a8b | ||
|
|
606012371e | ||
|
|
1efe7422d3 | ||
|
|
9bcefaafa8 | ||
|
|
45b4fef7d6 | ||
|
|
d3b557e0db | ||
|
|
67733b9d3c | ||
|
|
c1725577a7 | ||
|
|
e6f856e795 | ||
|
|
7826e03427 | ||
|
|
c5acfe7919 | ||
|
|
5a8968ae4f | ||
|
|
f3a9a3bc40 | ||
|
|
d29b1ef7d0 | ||
|
|
1caa63775f | ||
|
|
4c65324e11 | ||
|
|
e5e66bf27d | ||
|
|
2cfb9afac8 | ||
|
|
30e34f493f | ||
|
|
4fd0f0dba4 | ||
|
|
c65c560acd | ||
|
|
2d2ee38770 | ||
|
|
26b17074a1 | ||
|
|
bbd94dc2dc | ||
|
|
3494ffb302 | ||
|
|
8558656665 | ||
|
|
dc5d08b2a3 | ||
|
|
ec254c30c1 | ||
|
|
3435e8d6ed | ||
|
|
b3b2ec567f | ||
|
|
7068d0d301 | ||
|
|
f756747414 | ||
|
|
b24e1f5aae | ||
|
|
6ebe928712 | ||
|
|
1799cb0706 | ||
|
|
f39d595f98 | ||
|
|
014be56fb0 | ||
|
|
babe9eafad | ||
|
|
ec8788ce7d | ||
|
|
05d3be79cd | ||
|
|
345f4c8978 | ||
|
|
eed5d461e4 | ||
|
|
dc4606aa21 | ||
|
|
f1386f3aa5 | ||
|
|
2dbc112117 | ||
|
|
e6ddd5be27 | ||
|
|
7af0c5696d | ||
|
|
558a1ef405 | ||
|
|
8499270aef | ||
|
|
aa2dab31cf | ||
|
|
113383e31c | ||
|
|
f232b4dc29 | ||
|
|
304c0e21a0 | ||
|
|
f8e168adcd | ||
|
|
fdcdaadcb8 | ||
|
|
744d0ca7be | ||
|
|
1a037b9685 | ||
|
|
78ff773233 | ||
|
|
2e48c1b80d | ||
|
|
f371b251d2 | ||
|
|
d220081198 | ||
|
|
86e20aa483 | ||
|
|
03e34d0e2a | ||
|
|
3afd3e4cb4 | ||
|
|
c0c8695ea4 | ||
|
|
154b23cd39 | ||
|
|
34ae7c4634 | ||
|
|
70218cfeed | ||
|
|
db0b628497 | ||
|
|
685e85002e | ||
|
|
a1ba8c6d3f | ||
|
|
097c640a6c | ||
|
|
ea8f3fe1ff | ||
|
|
22db34a460 | ||
|
|
cf461cd82f | ||
|
|
35f2f8b043 | ||
|
|
cf4417431f | ||
|
|
6717b9e700 | ||
|
|
4f1a4b30f7 | ||
|
|
e34b2fefba | ||
|
|
db11db0cac | ||
|
|
6073ee934e | ||
|
|
4b79248af9 | ||
|
|
b6757337b3 | ||
|
|
e859ef2491 | ||
|
|
4cb0ab8a63 | ||
|
|
57084134e5 | ||
|
|
87e91b4766 | ||
|
|
d722986e66 | ||
|
|
1ed24cab9b | ||
|
|
9ca41cf4b6 | ||
|
|
cd09c29949 | ||
|
|
f5bbc20093 | ||
|
|
4c0a0e6119 | ||
|
|
8ea67498ed | ||
|
|
1eb1cb6f62 | ||
|
|
4f6fff6b1f | ||
|
|
2aca7fbaf4 | ||
|
|
13a9ff3379 | ||
|
|
423368e42f | ||
|
|
45ed0df6d0 | ||
|
|
454bdae81f | ||
|
|
5cb054f106 | ||
|
|
e864bf235e | ||
|
|
953a565a10 | ||
|
|
dd57d79b1b | ||
|
|
71a92846dd | ||
|
|
c39e85da63 | ||
|
|
4c0b3bb40f | ||
|
|
4fdd9b83fc | ||
|
|
26889d3762 | ||
|
|
e0846f63be | ||
|
|
35bd1df1aa | ||
|
|
4ed4d8423f | ||
|
|
cf1a80ecb6 | ||
|
|
e8b47b4745 | ||
|
|
5c8a5ed523 | ||
|
|
754267f0bd | ||
|
|
adb3cc5523 | ||
|
|
dd400ca720 | ||
|
|
f2046954e6 | ||
|
|
779fe568fc | ||
|
|
9bc8c07deb | ||
|
|
70ef6fe52e | ||
|
|
9bd955e4f6 | ||
|
|
a56d81ea51 | ||
|
|
b1632b8060 | ||
|
|
8f69a0ca44 | ||
|
|
e8fdf4fcda | ||
|
|
1e32788ad1 | ||
|
|
053ba2d164 | ||
|
|
daa34d0fe6 | ||
|
|
ee2c7069e4 | ||
|
|
4556d261d8 | ||
|
|
df46c5e165 | ||
|
|
910316cfde | ||
|
|
55dbc99000 | ||
|
|
6ca98e7102 | ||
|
|
f0a7a313fc | ||
|
|
384c4bc698 | ||
|
|
91cb060d10 | ||
|
|
d6e0e461f7 | ||
|
|
1840829928 | ||
|
|
298f8c8b0f | ||
|
|
495dce5d6c | ||
|
|
8a2a3fd74b | ||
|
|
4ec7d8bf7f | ||
|
|
f8fd2aa273 | ||
|
|
e38b178317 | ||
|
|
cebde164bb | ||
|
|
6db931eee6 | ||
|
|
2c66222509 | ||
|
|
2382ef1a27 | ||
|
|
99ac23b4b4 | ||
|
|
8ea5d257c4 | ||
|
|
664d3fc8d3 | ||
|
|
13fea7102b | ||
|
|
c2607fdf0f | ||
|
|
a44875cf00 | ||
|
|
ae0cde301d | ||
|
|
9f61a33c9f | ||
|
|
3b3ec3a2af | ||
|
|
63e0b36b41 | ||
|
|
56033dc0c1 | ||
|
|
ea09125e30 | ||
|
|
a44bbb3977 | ||
|
|
322c1c1b4c | ||
|
|
d0587ef3ab | ||
|
|
150db958da | ||
|
|
efacd02ffd | ||
|
|
1592c3638c | ||
|
|
7f7f5f187f | ||
|
|
740f1d5f75 | ||
|
|
6ec3dd7ebd | ||
|
|
73b54a2326 | ||
|
|
3895a59e03 | ||
|
|
67cb729554 | ||
|
|
d0288b673b | ||
|
|
7442852cad | ||
|
|
4baa1312a8 | ||
|
|
cdb362b628 | ||
|
|
e5894e0f5a | ||
|
|
6576498776 | ||
|
|
d224889b8d | ||
|
|
a6ea80436b | ||
|
|
0ea8200a57 | ||
|
|
4a5e3f42d3 | ||
|
|
2358a2f5e2 | ||
|
|
6e2fe89c61 | ||
|
|
583130b79b | ||
|
|
550095a5d0 | ||
|
|
f7157ca24c | ||
|
|
ddc1751296 | ||
|
|
0a643bb9d0 | ||
|
|
812b6f2158 | ||
|
|
6d39052c12 | ||
|
|
d4abf57904 | ||
|
|
a9df108116 | ||
|
|
39011a99c5 | ||
|
|
c97f79454d | ||
|
|
2985469116 | ||
|
|
c1738933d7 | ||
|
|
4565576021 | ||
|
|
0bf45ac757 | ||
|
|
a8b1f8e347 | ||
|
|
29e457c381 | ||
|
|
71da2cdda9 | ||
|
|
8b3437dd24 | ||
|
|
b766e2beab | ||
|
|
71913a9d1d | ||
|
|
3ad37ef26b | ||
|
|
b9a67e72ca | ||
|
|
1aa9149ff9 | ||
|
|
4c73887050 | ||
|
|
7b207deeb7 | ||
|
|
53eb117563 | ||
|
|
0dc2d5a625 | ||
|
|
b7396a7cd4 | ||
|
|
0509996f7f | ||
|
|
c3855160fb | ||
|
|
acdb874527 | ||
|
|
a96a9107c8 | ||
|
|
e41c75c1bc | ||
|
|
32bcf11ab9 | ||
|
|
f8cbcf1b4f | ||
|
|
65cd309c08 | ||
|
|
f8d6337862 | ||
|
|
f34bf4b487 | ||
|
|
7c086b1710 | ||
|
|
c587ca287e | ||
|
|
525eb1f1a4 | ||
|
|
7b6d8fbe56 | ||
|
|
bf6f4f8a6e | ||
|
|
5a6d5d877f | ||
|
|
2624e5d05c | ||
|
|
ef30bb3398 | ||
|
|
41d0c898e5 | ||
|
|
1bcd59df35 | ||
|
|
c9153e6b9b | ||
|
|
4978d19bff | ||
|
|
34b3d1fb52 | ||
|
|
5e03b1bebb | ||
|
|
3883860106 | ||
|
|
c833d93d2d | ||
|
|
a0bd098f98 | ||
|
|
15d2949b88 | ||
|
|
5edfb9eccf | ||
|
|
fdc0e2efdb | ||
|
|
34f7036b87 | ||
|
|
06b0d3775f | ||
|
|
f069cba449 | ||
|
|
86cb2d66d7 | ||
|
|
d801356f1e | ||
|
|
bcb4a75630 | ||
|
|
e4fd4fce8e | ||
|
|
b71c0ca9a3 | ||
|
|
32c692d93b | ||
|
|
87d67255d9 | ||
|
|
404d86d544 | ||
|
|
911b0a43d8 | ||
|
|
d5505f2f02 | ||
|
|
d1435f4fc6 | ||
|
|
65353b1417 | ||
|
|
0ae5288ab7 | ||
|
|
68cebfb733 | ||
|
|
2b0a61d143 | ||
|
|
dc2a339e09 |
11
.clang-format
Normal file
11
.clang-format
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
BasedOnStyle: WebKit
|
||||||
|
AllowShortLoopsOnASingleLine: 'false'
|
||||||
|
AlwaysBreakAfterDefinitionReturnType: false
|
||||||
|
BreakBeforeBraces: Allman
|
||||||
|
IndentCaseLabels: 'true'
|
||||||
|
PointerAlignment: Left
|
||||||
|
TabWidth: '4'
|
||||||
|
UseTab: ForIndentation
|
||||||
|
|
||||||
|
...
|
||||||
77
.distr
77
.distr
@@ -1,21 +1,62 @@
|
|||||||
Action
|
|
||||||
Copyright
|
|
||||||
NEW
|
|
||||||
README
|
README
|
||||||
TakeAction
|
CHANGES
|
||||||
bin
|
Copyright
|
||||||
doc
|
Makefile
|
||||||
emtest
|
|
||||||
etc
|
|
||||||
fast
|
|
||||||
fcc
|
|
||||||
first
|
|
||||||
h
|
h
|
||||||
include
|
modules/h
|
||||||
modules
|
|
||||||
lang
|
first
|
||||||
lib
|
util/data
|
||||||
mach
|
util/LLgen
|
||||||
|
|
||||||
|
modules/src/alloc
|
||||||
|
#modules/src/assert
|
||||||
|
modules/src/system
|
||||||
|
modules/src/string
|
||||||
|
modules/src/read_em
|
||||||
|
modules/src/em_code
|
||||||
|
modules/src/em_mes
|
||||||
|
modules/src/print
|
||||||
|
modules/src/object
|
||||||
|
modules/src/idf
|
||||||
|
modules/src/input
|
||||||
|
modules/src/flt_arith
|
||||||
|
|
||||||
|
util/amisc
|
||||||
|
util/cmisc
|
||||||
|
util/ack
|
||||||
|
lib/descr/fe
|
||||||
|
util/arch
|
||||||
|
#util/cpp
|
||||||
|
#util/cgg
|
||||||
|
util/ncgg
|
||||||
|
util/misc
|
||||||
|
util/opt
|
||||||
|
util/ego
|
||||||
|
util/topgen
|
||||||
|
util/led
|
||||||
|
|
||||||
|
lang/cem
|
||||||
|
lang/pc
|
||||||
|
lang/m2
|
||||||
|
#lang/occam
|
||||||
|
lang/basic
|
||||||
|
|
||||||
|
mach/proto
|
||||||
|
mach/i80
|
||||||
|
mach/i86
|
||||||
|
mach/i386
|
||||||
|
mach/m68020
|
||||||
|
mach/vc4
|
||||||
|
|
||||||
|
plat
|
||||||
|
plat/cpm
|
||||||
|
plat/pc86
|
||||||
|
plat/linux
|
||||||
|
plat/linux386
|
||||||
|
plat/linux68k
|
||||||
|
plat/rpi
|
||||||
|
|
||||||
|
examples
|
||||||
man
|
man
|
||||||
util
|
|
||||||
Versions
|
|
||||||
|
|||||||
6
.travis.yml
Normal file
6
.travis.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
before_install:
|
||||||
|
- sudo apt-get install ed lua5.1 liblua5.1-posix1 ninja-build
|
||||||
|
language: c
|
||||||
|
script:
|
||||||
|
- make PREFIX=/tmp/acki -j4
|
||||||
|
|
||||||
8
Action
8
Action
@@ -30,10 +30,10 @@ name "Modules"
|
|||||||
dir modules/src
|
dir modules/src
|
||||||
indir
|
indir
|
||||||
end
|
end
|
||||||
name "LL(1) Parser generator"
|
! name "LL(1) Parser generator"
|
||||||
dir util/LLgen
|
! dir util/LLgen
|
||||||
action "make firstinstall && make clean"
|
! action "make firstinstall && make clean"
|
||||||
end
|
! end
|
||||||
name "C preprocessor"
|
name "C preprocessor"
|
||||||
dir util/cpp
|
dir util/cpp
|
||||||
end
|
end
|
||||||
|
|||||||
40
CHANGES
Normal file
40
CHANGES
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# $Source$
|
||||||
|
# $State$
|
||||||
|
# $Revision$
|
||||||
|
|
||||||
|
6.1pre1
|
||||||
|
|
||||||
|
Threw away the make-based build system, because it just didn't work. Wrote
|
||||||
|
ackbuilder. Many, many little bugfixes and cleanups, too many to remember.
|
||||||
|
|
||||||
|
6.0pre4
|
||||||
|
|
||||||
|
Fixed some minor bit-rotting issues that were preventing compilation on
|
||||||
|
modern Linux systems.
|
||||||
|
|
||||||
|
6.0pre3
|
||||||
|
|
||||||
|
Added the cpm platform. Made some optimisations to the i80 code generator,
|
||||||
|
including getting topgen up and running and adding some peephole optimiser
|
||||||
|
rules. Fixed loads of bugs in ego so that it now works on platforms that
|
||||||
|
support it (pc86 and linux386). Made the floating point work on platforms
|
||||||
|
that support it (pc86 and linux386 again). Made stdint.h work. Lots and lots
|
||||||
|
of bugfixes and tweaks everywhere.
|
||||||
|
|
||||||
|
6.0pre2
|
||||||
|
|
||||||
|
Much simplified the syscall interface by disabling libmon and instead
|
||||||
|
calling the syscalls directly. Disabled the K&R C compiler and libc because
|
||||||
|
it doesn't actually gain us anything and has a high maintenance load --- the
|
||||||
|
ANSI C compiler works fine with K&R C. Adapted the rest of the system to
|
||||||
|
build with the ANSI C compiler. Rewrote the pc86 syscall interface and added
|
||||||
|
linux386 support, using the i386 code generator. Lots and lots of bugfixes
|
||||||
|
and tweaks everywhere.
|
||||||
|
|
||||||
|
6.0pre1
|
||||||
|
|
||||||
|
First working version of the 6.0 release stream. Working frontends: both C
|
||||||
|
compilers, Pascal, Modula-2, Basic and Occam. Working backends: i86. Working
|
||||||
|
platforms: pc86, the very noddy testbed setup that produces floppy disk
|
||||||
|
images.
|
||||||
|
|
||||||
49
Copyright
49
Copyright
@@ -1,17 +1,32 @@
|
|||||||
/*
|
Copyright (c) 1987, 1990, 1993, 2005 Vrije Universiteit, Amsterdam, The Netherlands.
|
||||||
* A M S T E R D A M C O M P I L E R K I T
|
All rights reserved.
|
||||||
*
|
|
||||||
* Copyright (c) 1987, 1991, 1993 by the Vrije Universiteit, Amsterdam,
|
Redistribution and use of the Amsterdam Compiler Kit in source and
|
||||||
* The Netherlands.
|
binary forms, with or without modification, are permitted provided
|
||||||
*
|
that the following conditions are met:
|
||||||
* Permission to use, sell, duplicate or disclose this software must be
|
|
||||||
* obtained in writing. Requests for such permissions may be sent to
|
* Redistributions of source code must retain the above copyright
|
||||||
*
|
notice, this list of conditions and the following disclaimer.
|
||||||
* Dr. Andrew S. Tanenbaum
|
|
||||||
* Wiskundig Seminarium
|
* Redistributions in binary form must reproduce the above
|
||||||
* Vrije Universiteit
|
copyright notice, this list of conditions and the following
|
||||||
* De Boelelaan 1081a
|
disclaimer in the documentation and/or other materials provided
|
||||||
* 1081 HV Amsterdam
|
with the distribution.
|
||||||
* The Netherlands
|
|
||||||
*
|
* Neither the name of Vrije Universiteit nor the names of the
|
||||||
*/
|
software authors or contributors may be used to endorse or
|
||||||
|
promote products derived from this software without specific
|
||||||
|
prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS, AUTHORS, AND
|
||||||
|
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 VRIJE UNIVERSITEIT OR ANY AUTHORS OR 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.
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
p=/proj/em/Work
|
|
||||||
sh TakeAction 'make distr' $p/distr/Action
|
|
||||||
sh TakeAction 'make distr' $p/distr/Action1
|
|
||||||
131
Makefile
131
Makefile
@@ -1,35 +1,104 @@
|
|||||||
cmp: # compile everything and compare
|
# ======================================================================= #
|
||||||
(cd etc ; make cmp )
|
# ACK CONFIGURATION #
|
||||||
(cd util ; make cmp )
|
# (Edit this before building) #
|
||||||
(cd lang ; make cmp )
|
# ======================================================================= #
|
||||||
(cd mach ; make cmp )
|
|
||||||
|
|
||||||
install: # compile everything to machine code
|
# What platform to build for by default?
|
||||||
(cd etc ; make install )
|
|
||||||
(cd util ; make install )
|
|
||||||
(cd lang/cem ; make install )
|
|
||||||
(cd mach ; make install )
|
|
||||||
(cd lang/pc ; make install )
|
|
||||||
|
|
||||||
clean: # remove all non-sources, except boot-files
|
DEFAULT_PLATFORM = pc86
|
||||||
(cd doc ; make clean )
|
|
||||||
(cd man ; make clean )
|
|
||||||
(cd h ; make clean )
|
|
||||||
(cd etc ; make clean )
|
|
||||||
(cd util ; make clean )
|
|
||||||
(cd lang ; make clean )
|
|
||||||
(cd mach ; make clean )
|
|
||||||
|
|
||||||
opr: # print all sources
|
# Where should the ACK put its temporary files?
|
||||||
make pr | opr
|
|
||||||
|
ACK_TEMP_DIR = /tmp
|
||||||
|
|
||||||
|
# Where is the ACK going to be installed, eventually? If you don't want to
|
||||||
|
# install it and just want to run the ACK from the build directory
|
||||||
|
# (/tmp/ack-build/staging, by default), leave this as $(INSDIR).
|
||||||
|
|
||||||
|
#PREFIX = /usr/local
|
||||||
|
PREFIX = $(INSDIR)
|
||||||
|
|
||||||
|
# Where do you want to put the object files used when building?
|
||||||
|
|
||||||
|
BUILDDIR = $(ACK_TEMP_DIR)/ack-build
|
||||||
|
|
||||||
|
# What build flags do you want to use?
|
||||||
|
|
||||||
|
CFLAGS = -g
|
||||||
|
LDFLAGS =
|
||||||
|
|
||||||
|
# Various commands.
|
||||||
|
|
||||||
|
AR = ar
|
||||||
|
CC = gcc
|
||||||
|
|
||||||
|
# Which build system to use; use 'ninja' or 'make' (in lower case). Leave
|
||||||
|
# blank to autodetect.
|
||||||
|
|
||||||
|
BUILDSYSTEM =
|
||||||
|
|
||||||
|
# Build flags for ninja.
|
||||||
|
|
||||||
|
NINJAFLAGS =
|
||||||
|
|
||||||
|
# Build flags for make.
|
||||||
|
|
||||||
|
MAKEFLAGS = -r
|
||||||
|
|
||||||
|
# ======================================================================= #
|
||||||
|
# END OF CONFIGURATION #
|
||||||
|
# ======================================================================= #
|
||||||
|
|
||||||
|
# You shouldn't need to change anything below this point unless you are
|
||||||
|
# actually developing ACK.
|
||||||
|
|
||||||
|
OBJDIR = $(abspath $(BUILDDIR)/obj)
|
||||||
|
BINDIR = $(abspath $(BUILDDIR)/bin)
|
||||||
|
LIBDIR = $(abspath $(BUILDDIR)/lib)
|
||||||
|
INCDIR = $(abspath $(BUILDDIR)/include)
|
||||||
|
INSDIR = $(abspath $(BUILDDIR)/staging)
|
||||||
|
|
||||||
|
PLATIND = $(INSDIR)/share/ack
|
||||||
|
PLATDEP = $(INSDIR)/lib/ack
|
||||||
|
|
||||||
|
MAKECMDGOALS ?= +ack
|
||||||
|
BUILD_FILES = $(shell find * -name '*.lua')
|
||||||
|
|
||||||
|
ifneq ($(shell which ninja),)
|
||||||
|
BUILDSYSTEM = ninja
|
||||||
|
BUILDFLAGS = $(NINJAFLAGS)
|
||||||
|
else
|
||||||
|
BUILDSYSTEM = make
|
||||||
|
BUILDFLAGS = $(MAKEFLAGS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(findstring +, $(MAKECMDGOALS)),)
|
||||||
|
|
||||||
|
$(MAKECMDGOALS): $(BUILDDIR)/build.$(BUILDSYSTEM)
|
||||||
|
@$(BUILDSYSTEM) $(BUILDFLAGS) -f $^ $(MAKECMDGOALS)
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(BUILDDIR)/build.$(BUILDSYSTEM): first/ackbuilder.lua Makefile $(BUILD_FILES)
|
||||||
|
@mkdir -p $(BUILDDIR)
|
||||||
|
@lua5.1 first/ackbuilder.lua \
|
||||||
|
first/build.lua build.lua \
|
||||||
|
--$(BUILDSYSTEM) \
|
||||||
|
OBJDIR=$(OBJDIR) \
|
||||||
|
BINDIR=$(BINDIR) \
|
||||||
|
LIBDIR=$(LIBDIR) \
|
||||||
|
INCDIR=$(INCDIR) \
|
||||||
|
INSDIR=$(INSDIR) \
|
||||||
|
PLATIND=$(PLATIND) \
|
||||||
|
PLATDEP=$(PLATDEP) \
|
||||||
|
AR=$(AR) \
|
||||||
|
CC=$(CC) \
|
||||||
|
> $(BUILDDIR)/build.$(BUILDSYSTEM)
|
||||||
|
|
||||||
|
install:
|
||||||
|
mkdir -p $(PREFIX)
|
||||||
|
tar cf - -C $(INSDIR) . | tar xvf - -C $(PREFIX)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@rm -rf $(BUILDDIR)
|
||||||
|
|
||||||
pr: # print all sources
|
|
||||||
@( pr Makefile ; \
|
|
||||||
(cd doc ; make pr ) ; \
|
|
||||||
(cd man ; make pr ) ; \
|
|
||||||
(cd h ; make pr ) ; \
|
|
||||||
(cd etc ; make pr ) ; \
|
|
||||||
(cd lang ; make pr ) ; \
|
|
||||||
(cd util ; make pr ) ; \
|
|
||||||
(cd mach ; make pr ) \
|
|
||||||
)
|
|
||||||
|
|||||||
13
NEW
13
NEW
@@ -1,4 +1,15 @@
|
|||||||
This is ACK distribution 5.2.
|
This is ACK distribution 5.6.
|
||||||
|
|
||||||
|
This is a minor update of 5.5, the last public release from Vrije University.
|
||||||
|
Only minor changes have been made to make the system build on modern
|
||||||
|
platforms.
|
||||||
|
|
||||||
|
The NEW document from the previous release follows.
|
||||||
|
|
||||||
|
David Given
|
||||||
|
dg@cowlark.com 2005-06-24
|
||||||
|
|
||||||
|
-----------------------------------------------------------------------------
|
||||||
|
|
||||||
The only addition with respect to the 5th ACK distribution is the support
|
The only addition with respect to the 5th ACK distribution is the support
|
||||||
for Solaris 2 on SPARCs. It also contains many bug fixes.
|
for Solaris 2 on SPARCs. It also contains many bug fixes.
|
||||||
|
|||||||
184
README
184
README
@@ -1,2 +1,182 @@
|
|||||||
Before starting installation you should read
|
THE AMSTERDAM COMPILER KIT V6.1pre1
|
||||||
the file doc/install.pr
|
===================================
|
||||||
|
|
||||||
|
© 1987-2005 Vrije Universiteit, Amsterdam
|
||||||
|
2016-08-02
|
||||||
|
|
||||||
|
|
||||||
|
INTRODUCTION
|
||||||
|
============
|
||||||
|
|
||||||
|
The Amsterdam Compiler Kit is a complete compiler toolchain consisting of
|
||||||
|
front end compilers for a number of different languages, code generators,
|
||||||
|
support libraries, and all the tools necessary to go from source code to
|
||||||
|
executable on any of the platforms it supports.
|
||||||
|
|
||||||
|
This is an early prerelease of the apocryphal version 6.1 release. Not a
|
||||||
|
lot is supported, the build mechanism needs work, and a lot of things are
|
||||||
|
probably broken. However, what's there should be sufficient to get things
|
||||||
|
done and to evaluate how the full 6.1 release should work.
|
||||||
|
|
||||||
|
|
||||||
|
SUPPORT
|
||||||
|
=======
|
||||||
|
|
||||||
|
Languages:
|
||||||
|
|
||||||
|
ANSI C, Pascal, Modula 2, Basic. K&R is supported via the ANSI C compiler.
|
||||||
|
|
||||||
|
Platforms:
|
||||||
|
|
||||||
|
pc86 produces bootable floppy disk images for 8086 PCs
|
||||||
|
linux386 produces ELF executables for PC Linux systems
|
||||||
|
linux68k produces ELF executables for m68020 Linux systems
|
||||||
|
cpm produces i80 CP/M .COM files
|
||||||
|
rpi produces Raspberry Pi GPU binaries
|
||||||
|
|
||||||
|
|
||||||
|
INSTALLATION
|
||||||
|
============
|
||||||
|
|
||||||
|
The version 5.0 build mechanism has been completely rewritten. Installation
|
||||||
|
ought to be fairly straightforward.
|
||||||
|
|
||||||
|
Requirements:
|
||||||
|
|
||||||
|
- an ANSI C compiler. This defaults to gcc. You can change this by setting
|
||||||
|
the CC make variable.
|
||||||
|
|
||||||
|
- flex and yacc.
|
||||||
|
|
||||||
|
- GNU make.
|
||||||
|
|
||||||
|
- Lua 5.1 and the luaposix library (used by the build system).
|
||||||
|
|
||||||
|
- (optionally) ninja; if you've got this, this will be autodetected and give
|
||||||
|
you faster builds.
|
||||||
|
|
||||||
|
- about 40MB free in /tmp (or some other temporary directory).
|
||||||
|
|
||||||
|
- about 6MB in the target directory.
|
||||||
|
|
||||||
|
Instructions:
|
||||||
|
|
||||||
|
- edit the Makefile. There's a small section at the top where you can change
|
||||||
|
the configuration. Probably the only one you may want to edit is PREFIX,
|
||||||
|
which changes where the ACK installs to.
|
||||||
|
|
||||||
|
- Run:
|
||||||
|
|
||||||
|
make
|
||||||
|
|
||||||
|
...from the command line. This will do the build.
|
||||||
|
|
||||||
|
The make system is fully parallelisable. If you have a multicore system,
|
||||||
|
install ninja and it'll use all your cores. If you don't have ninja, you
|
||||||
|
can still use make for parallel builds with:
|
||||||
|
|
||||||
|
make MAKEFLAGS='-r -j8' # or however many cores you have
|
||||||
|
|
||||||
|
...but frankly, I recommend ninja.
|
||||||
|
|
||||||
|
- Run:
|
||||||
|
|
||||||
|
sudo make install
|
||||||
|
|
||||||
|
...from the command line. This will install the ACK in your PREFIX
|
||||||
|
directory (by default, /usr/local).
|
||||||
|
|
||||||
|
The ACK should now be ready to use.
|
||||||
|
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
=====
|
||||||
|
|
||||||
|
Currently I haven't sorted out all the documentation --- it's supplied in the
|
||||||
|
distribution, but not all of it gets installed yet --- so here is a quickstart
|
||||||
|
guide.
|
||||||
|
|
||||||
|
The main command to use is 'ack'. This invokes the compiler and the linker.
|
||||||
|
Some useful options include:
|
||||||
|
|
||||||
|
-m<platform> build for the specified platform
|
||||||
|
-o <file> specifies the output file
|
||||||
|
-c produce a .o file
|
||||||
|
-c.s produce a .s assembly file
|
||||||
|
-O enable optimisation (optimisation levels go up to 6)
|
||||||
|
-ansi compile ANSI C (when using the C compiler)
|
||||||
|
-v be more verbose (repeatable)
|
||||||
|
<file> build file
|
||||||
|
|
||||||
|
ack figures out which language to use from the file extension:
|
||||||
|
|
||||||
|
.c C (ANSI or K&R)
|
||||||
|
.b Basic
|
||||||
|
.mod Modula-2
|
||||||
|
.ocm Occam 1
|
||||||
|
.p Pascal
|
||||||
|
.o object files
|
||||||
|
.s assembly files
|
||||||
|
.e ACK intermediate code assembly files
|
||||||
|
|
||||||
|
For further information, see the man page (which actually does get
|
||||||
|
installed, but is rather out of date).
|
||||||
|
|
||||||
|
There are some (known working) example programs in the 'examples' directory.
|
||||||
|
A sample command line is:
|
||||||
|
|
||||||
|
ack -mlinux386 -O examples/paranoia.c
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
GOTCHAS
|
||||||
|
=======
|
||||||
|
|
||||||
|
There are some things you should be aware of.
|
||||||
|
|
||||||
|
- Look at plat/<PLATFORMNAME>/README for information about the supported
|
||||||
|
platforms.
|
||||||
|
|
||||||
|
- The library support is fairly limited; for C, it's at roughly the ANSI C
|
||||||
|
level, and for the other languages it's similar.
|
||||||
|
|
||||||
|
- When compiling languages other than C, the ACK will usually look at the
|
||||||
|
first character of the file. If it's a #, then the file will be run through
|
||||||
|
the C preprocessor anyway.
|
||||||
|
|
||||||
|
- BSD systems may need to up the number of file descriptors (e.g.
|
||||||
|
'ulimit -n 200') before the ACK will compile.
|
||||||
|
|
||||||
|
- The ACK uses its own .o format. You won't be able to mix the ACK's object
|
||||||
|
files and another compiler's.
|
||||||
|
|
||||||
|
- The distribution contains *everything*, including the weird, ancient,
|
||||||
|
archaic stuff that doesn't work any more and never will, such as the int EM
|
||||||
|
interpreter and the assembler-linkers. Only some of it builds. Look for
|
||||||
|
build.lua files.
|
||||||
|
|
||||||
|
DISCLAIMER
|
||||||
|
==========
|
||||||
|
|
||||||
|
The ACK is mature, well-tested software, but the environment in which it was
|
||||||
|
developed for and tested under is rather different from that available on
|
||||||
|
today's machines. There will probably be little in the way of logical bugs,
|
||||||
|
but there may be many compilation and API bugs.
|
||||||
|
|
||||||
|
If you wish to use the ACK, *please* join the mailing list. We are interested
|
||||||
|
in any reports of success and particularly, failure. If it does fail for you,
|
||||||
|
we would love to know why, in as much detail as possible. Bug fixes are even
|
||||||
|
more welcome.
|
||||||
|
|
||||||
|
The ACK is licensed under a BSD-like license. Please see the 'Copyright' file
|
||||||
|
for the full text.
|
||||||
|
|
||||||
|
You can find the mailing list on the project's web site:
|
||||||
|
|
||||||
|
http://tack.sourceforge.net/
|
||||||
|
|
||||||
|
Please enjoy.
|
||||||
|
|
||||||
|
David Given (dtrg on Sourceforge)
|
||||||
|
dg@cowlark.com
|
||||||
|
2016-08-02
|
||||||
|
|||||||
20
TODO
Normal file
20
TODO
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# $Source$
|
||||||
|
# $State$
|
||||||
|
|
||||||
|
This file contains things that I have noticed need fixing, but have not
|
||||||
|
yet been fixed. Everything here should be reasonably low priority. Some
|
||||||
|
bugs have been bodged around to make things work; these are all marked in
|
||||||
|
the source with FIXME tags.
|
||||||
|
|
||||||
|
|
||||||
|
* util/int needs to be rewritten to emulate sgtty with termios; look for
|
||||||
|
FIXMEs.
|
||||||
|
|
||||||
|
* mach/i80/dl/nascom.c needs to be rewritten to use termios, not sgtty.
|
||||||
|
|
||||||
|
|
||||||
|
# Revision history
|
||||||
|
# $Log$
|
||||||
|
# Revision 2.1 2005-06-24 23:20:41 dtrg
|
||||||
|
# Added some new readmes at the top level.
|
||||||
|
#
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
case $# in
|
case $# in
|
||||||
0) PAR='make install && make clean' ; CMD=Action ;;
|
0) PAR='make install && make clean' ; CMD=Action ;;
|
||||||
1) PAR="$1" ; CMD=Action ;;
|
1) PAR="$1" ; CMD=Action ;;
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
cc-and-mkdep.ack
|
|
||||||
cc-and-mkdep.all
|
|
||||||
cc-and-mkdep.sun
|
|
||||||
do_deps
|
|
||||||
do_resolve
|
|
||||||
lint-lib.ack
|
|
||||||
lint-lib.unix
|
|
||||||
mk_manpage
|
|
||||||
rm_deps
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
: '$Id$'
|
: '$Id$'
|
||||||
|
|
||||||
: Compile and make dependencies. First argument is the file on which the
|
: Compile and make dependencies. First argument is the file on which the
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
: '$Id$'
|
: '$Id$'
|
||||||
|
|
||||||
: Compile and make dependencies. First argument is the file on which the
|
: Compile and make dependencies. First argument is the file on which the
|
||||||
@@ -16,5 +17,5 @@ do
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
$UTIL_HOME/lib.bin/cpp -d -m $cpp_args > $n
|
$UTIL_HOME/lib.bin/cpp -d -m $cpp_args > $n 2>/dev/null
|
||||||
exec $CC $*
|
exec $CC $*
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
: '$Id$'
|
: '$Id$'
|
||||||
|
|
||||||
: Compile and make dependencies. First argument is the file on which the
|
: Compile and make dependencies. First argument is the file on which the
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
: '$Id$'
|
: '$Id$'
|
||||||
|
|
||||||
: Produce dependencies for all argument files
|
: Produce dependencies for all argument files
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
: '$Id$'
|
: '$Id$'
|
||||||
|
|
||||||
: Resolve name clashes in the files on the argument list. If these
|
: Resolve name clashes in the files on the argument list. If these
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
exec /usr/em/doc/em/int/em /usr/em/doc/em/int/tables ${1-e.out} core
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
: '$Id$'
|
: '$Id$'
|
||||||
|
|
||||||
: Create a lint library file. The name of the library file is constructed
|
: Create a lint library file. The name of the library file is constructed
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
: '$Id$'
|
: '$Id$'
|
||||||
|
|
||||||
: Create a lint library file. The name of the library file is constructed
|
: Create a lint library file. The name of the library file is constructed
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
num=`expr $1 : '.*\.\([1-8]\)'`
|
num=`expr $1 : '.*\.\([1-8]\)'`
|
||||||
|
|
||||||
if [ -d $2/man ] ; then : ; else mkdir $2/man ; fi
|
if [ -d $2/man ] ; then : ; else mkdir $2/man ; fi
|
||||||
@@ -15,4 +17,4 @@ if [ -f $2/man/head ] ; then : ; else cat > $2/man/head <<'EOF'
|
|||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
if [ -d $2/man/man$num ] ; then : ; else mkdir $2/man/man$num ; fi
|
if [ -d $2/man/man$num ] ; then : ; else mkdir $2/man/man$num ; fi
|
||||||
cat $2/man/head $1 > $2/man/man$num/`expr //$1 : '.*/\([^/]*\)'`
|
cat $2/man/head $1 | sed "s!TARGETHOME!$2!" > $2/man/man$num/`expr //$1 : '.*/\([^/]*\)'`
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
: $Id$
|
: $Id$
|
||||||
|
|
||||||
: remove dependencies from a makefile, write result on standard output.
|
: remove dependencies from a makefile, write result on standard output.
|
||||||
|
|||||||
38
build.lua
Normal file
38
build.lua
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
vars.cflags = {
|
||||||
|
"-g", "-O"
|
||||||
|
}
|
||||||
|
vars.ackcflags = {
|
||||||
|
"-O6"
|
||||||
|
}
|
||||||
|
vars.plats = {
|
||||||
|
"cpm",
|
||||||
|
"linux386",
|
||||||
|
"linux68k",
|
||||||
|
"pc86",
|
||||||
|
"rpi",
|
||||||
|
}
|
||||||
|
|
||||||
|
local plat_packages = {}
|
||||||
|
for _, p in ipairs(vars.plats) do
|
||||||
|
plat_packages[#plat_packages+1] = "plat/"..p.."+pkg"
|
||||||
|
end
|
||||||
|
|
||||||
|
installable {
|
||||||
|
name = "ack",
|
||||||
|
map = {
|
||||||
|
"lang/basic/src+pkg",
|
||||||
|
"lang/cem/cemcom.ansi+pkg",
|
||||||
|
"lang/m2/comp+pkg",
|
||||||
|
"lang/pc/comp+pkg",
|
||||||
|
"util/ack+pkg",
|
||||||
|
"util/amisc+pkg",
|
||||||
|
"util/arch+pkg",
|
||||||
|
"util/ego+pkg",
|
||||||
|
"util/led+pkg",
|
||||||
|
"util/misc+pkg",
|
||||||
|
"util/opt+pkg",
|
||||||
|
"examples+pkg",
|
||||||
|
plat_packages
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
71
config.pm
Normal file
71
config.pm
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
-- ======================================================================= --
|
||||||
|
-- ACK CONFIGURATION --
|
||||||
|
-- (Edit this before building) --
|
||||||
|
-- ======================================================================= --
|
||||||
|
|
||||||
|
-- What platform to build for by default?
|
||||||
|
|
||||||
|
DEFAULT_PLATFORM = "pc86"
|
||||||
|
|
||||||
|
-- Where should the ACK put its temporary files?
|
||||||
|
|
||||||
|
ACK_TEMP_DIR = "/tmp"
|
||||||
|
|
||||||
|
-- Where is the ACK going to be installed, eventually?
|
||||||
|
|
||||||
|
PREFIX = "/tmp/ack-temp/staging"
|
||||||
|
|
||||||
|
-- ======================================================================= --
|
||||||
|
-- BROKEN ACK CONFIGURATION --
|
||||||
|
-- (Currently not editable) --
|
||||||
|
-- ======================================================================= --
|
||||||
|
|
||||||
|
-- FIXME: the following two variables must be set to their Minix variants
|
||||||
|
-- due to hard-coded references in the descr files.
|
||||||
|
|
||||||
|
-- Name of the platform-independent library directory; 'share' on modern
|
||||||
|
-- systems, 'lib' on Minix-like systems.
|
||||||
|
|
||||||
|
PLATIND = "lib"
|
||||||
|
|
||||||
|
-- Name of the platform-dependent library directory; 'lib' on modern
|
||||||
|
-- systems, 'lib.bin' on Minix-like systems.
|
||||||
|
|
||||||
|
PLATDEP = "lib.bin"
|
||||||
|
|
||||||
|
-- ======================================================================= --
|
||||||
|
-- BUILD SYSTEM CONFIGURATION --
|
||||||
|
-- (Not user servicable) --
|
||||||
|
-- ======================================================================= --
|
||||||
|
|
||||||
|
-- Absolute path to the ACK source directory.
|
||||||
|
|
||||||
|
ROOTDIR = posix.getcwd().."/"
|
||||||
|
|
||||||
|
-- Temporary directory used during the build process.
|
||||||
|
|
||||||
|
TEMPDIR = "/tmp/ack-temp/"
|
||||||
|
|
||||||
|
-- Directory in which dynamically generated header files will go during
|
||||||
|
-- the build process.
|
||||||
|
|
||||||
|
HEADERDIR = TEMPDIR.."headers/"
|
||||||
|
|
||||||
|
-- Directory in which tools used by the build process but which not actually
|
||||||
|
-- deployed with the ACK will go.
|
||||||
|
|
||||||
|
TOOLDIR = TEMPDIR.."tools/"
|
||||||
|
|
||||||
|
-- Directory in which the libraries used to build the ACK tools but which are
|
||||||
|
-- not actually deployed with the ACK will go.
|
||||||
|
|
||||||
|
LIBDIR = TEMPDIR.."lib/"
|
||||||
|
|
||||||
|
-- Staging area where the installation will be built before actually copying
|
||||||
|
-- it.
|
||||||
|
|
||||||
|
BINDIR = TEMPDIR.."staging/"
|
||||||
|
|
||||||
|
-- Directory that the pm cache goes in.
|
||||||
|
|
||||||
|
pm.intermediate_cache_dir = TEMPDIR.."pmcache/"
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
name "EM tables"
|
|
||||||
dir etc
|
|
||||||
end
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
name "m68k2/cg bootstrap files"
|
|
||||||
dir mach/m68k2/cg
|
|
||||||
action "make EMHOME=/proj/em/Work distr"
|
|
||||||
end
|
|
||||||
name "vax4/cg bootstrap files"
|
|
||||||
dir mach/vax4/cg
|
|
||||||
action "make EMHOME=/proj/em/Work distr"
|
|
||||||
end
|
|
||||||
name "m68020/ncg bootstrap files"
|
|
||||||
dir mach/m68020/ncg
|
|
||||||
action "make EMHOME=/proj/em/Work distr"
|
|
||||||
end
|
|
||||||
name "m68k4/cg bootstrap files"
|
|
||||||
dir mach/m68k4/cg
|
|
||||||
action "make EMHOME=/proj/em/Work distr"
|
|
||||||
end
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
++ ./doc/proto.make made
|
|
||||||
++ ./doc/int/.distr made
|
|
||||||
++ ./h/em_mnem.h not present
|
|
||||||
++ ./h/em_pseu.h not present
|
|
||||||
++ ./h/em_spec.h not present
|
|
||||||
++ ./lang/cem/cemcom.ansi/Version.c made
|
|
||||||
++ ./lang/cem/libcc.ansi/stdlib/malloc.c made
|
|
||||||
++ ./lang/cem/cemcom/Version.c made
|
|
||||||
++ ./lang/pc/comp/Version.c made
|
|
||||||
++ ./lang/m2/comp/Version.c made
|
|
||||||
++ ./lang/m2/m2mm/Version.c made
|
|
||||||
++ ./mach/sparc/ce/EM_table made
|
|
||||||
++ ./mach/sparc_solaris/libem/LIST made
|
|
||||||
++ ./util/LLgen/src/LLgen.c.dist made
|
|
||||||
++ ./util/cpp/Version.c made
|
|
||||||
++ ./util/data/em_flag.c not present
|
|
||||||
++ ./util/data/em_mnem.c not present
|
|
||||||
++ ./util/data/em_pseu.c not present
|
|
||||||
++ ./util/ego/share/pop_push.h made
|
|
||||||
++ ./util/grind/ops.c made
|
|
||||||
65
distr/How_To
65
distr/How_To
@@ -1,65 +0,0 @@
|
|||||||
How to make a fresh distribution:
|
|
||||||
For a distribution you need ".distr" files and RCS files.
|
|
||||||
The EM home directory contains a file called ".distr". It contains
|
|
||||||
the names of all the files and directories you want to have in the distribution.
|
|
||||||
The directories should contain .distr files, the other files should
|
|
||||||
be placed under CVS.
|
|
||||||
There are files that derive from other files and yet should be placed
|
|
||||||
in the distribution.
|
|
||||||
These files should not be placed under RCS or CVS.
|
|
||||||
The file "Exceptions" in this directory contains the current list of
|
|
||||||
these files.
|
|
||||||
|
|
||||||
When all this is correct, use the shell script mktree the extract
|
|
||||||
the distribution from the EM tree.
|
|
||||||
sh mktree destination_tree repository_tree > destination_tree/Versions 2>f.attf
|
|
||||||
Make sure that the destination tree exists and is empty!
|
|
||||||
Failing to do that will almost certainly result in a welter of
|
|
||||||
error messages.
|
|
||||||
The file f.attf contains mktree error messages and should be compared
|
|
||||||
to Exceptions.
|
|
||||||
The actions of mktree are quite complicated. It starts in the current
|
|
||||||
directory creating a version in the destination directory.
|
|
||||||
Then it reads the .distr file.
|
|
||||||
For each file mentioned there it performes certain actions:
|
|
||||||
1- Directory Change to that directory and call yourself recursively.
|
|
||||||
2- File
|
|
||||||
a- Does a file LIST exist in this directory AND
|
|
||||||
is the first line of LIST equal to the name of the
|
|
||||||
destination file? If so, try to extract all the files
|
|
||||||
named in the rest of the LIST file and call the program
|
|
||||||
arch to create a library "arch cDr `cat LIST`".
|
|
||||||
In this manner libraries can be distributed whose members
|
|
||||||
have their own RCS file.
|
|
||||||
else
|
|
||||||
b- Try to run 'make distr'
|
|
||||||
else
|
|
||||||
c- Try to run 'make <filename>'
|
|
||||||
else
|
|
||||||
d- give message that says "not present" (or some such).
|
|
||||||
|
|
||||||
Now, the tree contains all the files in the distribution, but it also contains
|
|
||||||
files that should not be in the distribution, especially the files created
|
|
||||||
by CVS.
|
|
||||||
That is why we now give the command:
|
|
||||||
dtar cdf distr5 .
|
|
||||||
The file distr5 is the one you should put on tape!
|
|
||||||
But,.... before doing that: Try it out!
|
|
||||||
Repeat the process described in the installation manual.
|
|
||||||
Only if that succeeds you are sure that you included the files needed.
|
|
||||||
Good Luck,
|
|
||||||
Ed Keizer, 85/4/15.
|
|
||||||
|
|
||||||
Updated for 3rd distribution by Ceriel Jacobs, 87/3/11.
|
|
||||||
And again,
|
|
||||||
Good Luck!
|
|
||||||
|
|
||||||
Updated for 4th distribution by Ceriel Jacobs, 88/4/08.
|
|
||||||
And again,
|
|
||||||
Good Luck!
|
|
||||||
Updated for 5th distribution by Ceriel Jacobs, 91/19/12.
|
|
||||||
And again,
|
|
||||||
Good Luck!
|
|
||||||
Updated for 1st upgrade to 5th distribution by Ceriel Jacobs, 91/12/11.
|
|
||||||
And again,
|
|
||||||
Good Luck!
|
|
||||||
30
distr/dwalk
30
distr/dwalk
@@ -1,30 +0,0 @@
|
|||||||
: ${CDIR=.}
|
|
||||||
if [ $# = 1 ]
|
|
||||||
then
|
|
||||||
${DD-:} $CDIR $1
|
|
||||||
else
|
|
||||||
${DD-:} $CDIR
|
|
||||||
fi
|
|
||||||
${DF-:} $CDIR .distr
|
|
||||||
if test ! -r $DESTDIR/$CDIR/.distr
|
|
||||||
then
|
|
||||||
echo ++ no .distr in $CDIR 1>&2
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
for i in `cat $DESTDIR/$CDIR/.distr`
|
|
||||||
do
|
|
||||||
if test -d $i
|
|
||||||
then
|
|
||||||
( if cd $i
|
|
||||||
then
|
|
||||||
CDIR=$CDIR/$i
|
|
||||||
export CDIR
|
|
||||||
exec $DDIR/dwalk $*
|
|
||||||
else
|
|
||||||
echo ++ Could not access $CDIR/$i 1>&2
|
|
||||||
fi
|
|
||||||
)
|
|
||||||
else
|
|
||||||
${DF-:} $CDIR $i
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
echo $1
|
|
||||||
26
distr/f.attf
26
distr/f.attf
@@ -1,26 +0,0 @@
|
|||||||
-- ./doc/install.pr no RCS file
|
|
||||||
-- ./h/em_mnem.h no RCS file
|
|
||||||
-- ./h/em_pseu.h no RCS file
|
|
||||||
-- ./h/em_spec.h no RCS file
|
|
||||||
-- ./lang/basic/src/y.tab.c no RCS file
|
|
||||||
-- ./lang/basic/src/y.tab.h no RCS file
|
|
||||||
-- ./lang/pc/pem/pem22.m no RCS file
|
|
||||||
-- ./lang/pc/pem/pem24.m no RCS file
|
|
||||||
-- ./lang/pc/pem/pem44.m no RCS file
|
|
||||||
-- ./lib/LLgen/incl no RCS file
|
|
||||||
-- ./lib/LLgen/rec no RCS file
|
|
||||||
-- ./mach/m68k2/cg/tables1.c no RCS file
|
|
||||||
-- ./mach/m68k2/cg/tables1.h no RCS file
|
|
||||||
-- ./mach/m68020/ncg/tables1.c no RCS file
|
|
||||||
-- ./mach/m68020/ncg/tables1.h no RCS file
|
|
||||||
-- ./mach/vax4/cg/tables1.c no RCS file
|
|
||||||
-- ./mach/vax4/cg/tables1.h no RCS file
|
|
||||||
-- ./util/LLgen/src/parser no RCS file
|
|
||||||
-- ./util/LLgen/src/LLgen.c no RCS file
|
|
||||||
-- ./util/LLgen/src/Lpars.c no RCS file
|
|
||||||
-- ./util/LLgen/src/Lpars.h no RCS file
|
|
||||||
-- ./util/LLgen/src/tokens.c no RCS file
|
|
||||||
-- ./util/data/em_flag.c no RCS file
|
|
||||||
-- ./util/data/em_mnem.c no RCS file
|
|
||||||
-- ./util/data/em_pseu.c no RCS file
|
|
||||||
-- ./util/ego/share/pop_push.h no RCS file
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
case $# in
|
|
||||||
0) DESTDIR=. ;;
|
|
||||||
1) DESTDIR=$1 ;;
|
|
||||||
*) echo $0 [directory] ; exit 1 ;;
|
|
||||||
esac
|
|
||||||
DD=`pwd`/listall.d
|
|
||||||
DW=`pwd`/dwalk
|
|
||||||
export DD DESTDIR
|
|
||||||
cd $DESTDIR
|
|
||||||
$DW
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
echo "<$1>"
|
|
||||||
ls -bCdx `cat .distr`
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
case $# in
|
|
||||||
0) DIR=. ;;
|
|
||||||
1) DIR=$1 ;;
|
|
||||||
*) echo $0 [directory] ; exit 1 ;;
|
|
||||||
esac
|
|
||||||
DD=`pwd`/echod
|
|
||||||
DW=`pwd`/dwalk
|
|
||||||
export DD
|
|
||||||
cd $DIR
|
|
||||||
$DW
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
: Utility to make a tree of symbolic links to source tree.
|
|
||||||
: Mount the source tree read-only, use this script, and then try installation.
|
|
||||||
case $# in
|
|
||||||
2) ;;
|
|
||||||
*) echo "Usage: $0 <source-tree> <symlink-tree>" 1>&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
if [ -f $1/.distr ]
|
|
||||||
then
|
|
||||||
for i in `cat $1/.distr`
|
|
||||||
do
|
|
||||||
if [ -d $1/$i ]
|
|
||||||
then
|
|
||||||
if mkdir $2/$i && $0 $1/$i $2/$i
|
|
||||||
then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if [ -f $1/$i ]
|
|
||||||
then
|
|
||||||
if ln -s $1/$i $2/$i
|
|
||||||
then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
exit 3
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "Missing file $1/$i" 1>&2
|
|
||||||
exit 4
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
else
|
|
||||||
echo "No .distr file in $1" 1>&2
|
|
||||||
exit 5
|
|
||||||
fi
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
set -e
|
|
||||||
for i in `tail +2 $DESTDIR/$1/LIST`
|
|
||||||
do
|
|
||||||
${DF-false} $1 $i
|
|
||||||
done
|
|
||||||
cd $DESTDIR/$1
|
|
||||||
arch cDr `cat LIST`
|
|
||||||
: I do not remove the files constituating the library, because
|
|
||||||
: they might be present in .distr
|
|
||||||
27
distr/mkd
27
distr/mkd
@@ -1,27 +0,0 @@
|
|||||||
case $1 in
|
|
||||||
.) ;;
|
|
||||||
*) mkdir $DESTDIR/$1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
p=$REPDIR/$1
|
|
||||||
dir=$1
|
|
||||||
if [ $# = 2 ]
|
|
||||||
then
|
|
||||||
if [ -f $2 ]
|
|
||||||
then
|
|
||||||
set `fgrep "$dir " $2`
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
cd $DESTDIR/$dir
|
|
||||||
if [ $# = 2 ]
|
|
||||||
then
|
|
||||||
RV $p $2 > /dev/null 2>&1
|
|
||||||
echo "$dir $2"
|
|
||||||
else
|
|
||||||
if `CV $p > /dev/null 2>&1`
|
|
||||||
then
|
|
||||||
echo "$dir `RC -i`"
|
|
||||||
else
|
|
||||||
echo "-- $dir CV failed for some reason" 1>&2
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
17
distr/mkf
17
distr/mkf
@@ -1,17 +0,0 @@
|
|||||||
if [ -f $DESTDIR/$1/$2 ]
|
|
||||||
then
|
|
||||||
:
|
|
||||||
elif grep LIST $DESTDIR/$1/.distr >/dev/null 2>&1 &&
|
|
||||||
(test "$2" = "`head -1 $DESTDIR/$1/LIST`") >/dev/null 2>&1 &&
|
|
||||||
${DA-false} "$1" "$2"
|
|
||||||
then
|
|
||||||
: Fetched library contents one by one and put them together
|
|
||||||
elif ( cd $DESTDIR/$1 ; make distr ) > /dev/null 2>&1
|
|
||||||
then
|
|
||||||
echo ++ $1/$2 made 1>&2
|
|
||||||
elif ( cd $DESTDIR/$1 ; make $2 ) > /dev/null 2>&1
|
|
||||||
then
|
|
||||||
echo ++ $1/$2 made 1>&2
|
|
||||||
else
|
|
||||||
echo ++ $1/$2 not present 1>&2
|
|
||||||
fi
|
|
||||||
28
distr/mktree
28
distr/mktree
@@ -1,28 +0,0 @@
|
|||||||
case $# in
|
|
||||||
2|3) ;;
|
|
||||||
*) echo Usage: $0 directory repdir [ SVrecord ] 1>&2 ; exit 1 ;;
|
|
||||||
esac
|
|
||||||
case $0 in
|
|
||||||
/*) DDIR=`dirname $0`
|
|
||||||
;;
|
|
||||||
*) DDIR=`pwd`/`dirname $0`
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
case $1 in
|
|
||||||
/*) DESTDIR=$1 ;;
|
|
||||||
*) DESTDIR=`pwd`/$1 ;;
|
|
||||||
esac
|
|
||||||
case $2 in
|
|
||||||
/*) REPDIR=$2 ;;
|
|
||||||
*) REPDIR=`pwd`/$2 ;;
|
|
||||||
esac
|
|
||||||
cd $REPDIR
|
|
||||||
DD=$DDIR/mkd
|
|
||||||
DF=$DDIR/mkf
|
|
||||||
DA=$DDIR/mka
|
|
||||||
export DDIR DESTDIR DD DF DA REPDIR
|
|
||||||
$DDIR/dwalk $3
|
|
||||||
|
|
||||||
cd $DESTDIR
|
|
||||||
find . -type d -print | xargs chmod "uog+rx"
|
|
||||||
chmod -R "og-w,u+w,uog+r" .
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
REV=
|
|
||||||
FILE=
|
|
||||||
while :
|
|
||||||
do
|
|
||||||
case $# in
|
|
||||||
0) break ;;
|
|
||||||
esac
|
|
||||||
ARG="$1"
|
|
||||||
shift
|
|
||||||
case "$ARG" in
|
|
||||||
-r*) REV=`echo "$ARG"| sed s/-r//` ;;
|
|
||||||
-*) FLAGS="$FLAGS $ARG" ;;
|
|
||||||
*) case x$FILE in
|
|
||||||
x) FILE="$ARG" ;;
|
|
||||||
*) echo todistr can only be done on one file at the time
|
|
||||||
exit 1 ;;
|
|
||||||
esac
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
case x$REV in
|
|
||||||
x) REV=`rlog -h "$FILE"|sed -n -e '/head/s/^head:[ ]*//p'` ;;
|
|
||||||
esac
|
|
||||||
case x$REV in
|
|
||||||
x) exit 2 ;;
|
|
||||||
esac
|
|
||||||
rcs -ndistr4:$REV $FLAGS $FILE
|
|
||||||
32
doc/.distr
32
doc/.distr
@@ -1,32 +0,0 @@
|
|||||||
READ_ME
|
|
||||||
Makefile
|
|
||||||
proto.make
|
|
||||||
ack.doc
|
|
||||||
basic.doc
|
|
||||||
cg.doc
|
|
||||||
crefman.doc
|
|
||||||
ansi_C.doc
|
|
||||||
em
|
|
||||||
install.doc
|
|
||||||
install.pr
|
|
||||||
ncg.doc
|
|
||||||
pcref.doc
|
|
||||||
peep.doc
|
|
||||||
regadd.doc
|
|
||||||
toolkit.doc
|
|
||||||
v7bugs.doc
|
|
||||||
val.doc
|
|
||||||
LLgen
|
|
||||||
6500.doc
|
|
||||||
i80.doc
|
|
||||||
z80.doc
|
|
||||||
m68020.doc
|
|
||||||
m2ref.doc
|
|
||||||
nopt.doc
|
|
||||||
top
|
|
||||||
ego
|
|
||||||
occam
|
|
||||||
int
|
|
||||||
ceg
|
|
||||||
sparc
|
|
||||||
lint
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
LLgen.n
|
|
||||||
LLgen.refs
|
|
||||||
proto.make
|
|
||||||
@@ -338,7 +338,12 @@ grammar rule.
|
|||||||
.PP
|
.PP
|
||||||
In order to facilitate communication between the actions and
|
In order to facilitate communication between the actions and
|
||||||
\fILLparse\fR,
|
\fILLparse\fR,
|
||||||
the parsing routines can be given C-like parameters. So, for example
|
the parsing routines can be given C-like parameters.
|
||||||
|
Each parameter must be declared separately, and each of these declarations must
|
||||||
|
end with a semicolon.
|
||||||
|
For the last parameter, the semicolon is optional.
|
||||||
|
.PP
|
||||||
|
So, for example
|
||||||
.nf
|
.nf
|
||||||
.ft CW
|
.ft CW
|
||||||
.sp 1
|
.sp 1
|
||||||
@@ -921,7 +926,7 @@ stat { int ident, val; } :
|
|||||||
| '\en'
|
| '\en'
|
||||||
;
|
;
|
||||||
|
|
||||||
expr(int level, int *val;) { int expr; } :
|
expr(int level; int *val;) { int expr; } :
|
||||||
factor(val)
|
factor(val)
|
||||||
[ %while (prio(tok.t_tokno) >= level)
|
[ %while (prio(tok.t_tokno) >= level)
|
||||||
/* Swallow operators as long as their priority is
|
/* Swallow operators as long as their priority is
|
||||||
|
|||||||
2712
doc/LLgen/LLgen_NCER.n
Normal file
2712
doc/LLgen/LLgen_NCER.n
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,15 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
|
GRAP=grap
|
||||||
|
PIC=pic
|
||||||
EQN=eqn
|
EQN=eqn
|
||||||
REFER=refer
|
REFER=refer
|
||||||
TBL=tbl
|
TBL=tbl
|
||||||
TARGET=-Tlp
|
|
||||||
|
all: ../LLgen.doc ../LLgen_NCER.doc
|
||||||
|
|
||||||
../LLgen.doc: LLgen.n LLgen.refs
|
../LLgen.doc: LLgen.n LLgen.refs
|
||||||
$(REFER) -sA+T -p LLgen.refs LLgen.n | $(EQN) $(TARGET) | $(TBL) > $@
|
$(REFER) -sA+T -p LLgen.refs LLgen.n | $(EQN) | $(TBL) > $@
|
||||||
|
|
||||||
|
../LLgen_NCER.doc: LLgen_NCER.n
|
||||||
|
$(GRAP) LLgen_NCER.n | pic | eqn > $@
|
||||||
|
|||||||
@@ -4,9 +4,17 @@
|
|||||||
|
|
||||||
SRC_DIR = $(SRC_HOME)/doc/LLgen
|
SRC_DIR = $(SRC_HOME)/doc/LLgen
|
||||||
|
|
||||||
|
GRAP=grap
|
||||||
|
PIC=pic
|
||||||
EQN=eqn
|
EQN=eqn
|
||||||
REFER=refer
|
REFER=refer
|
||||||
TBL=tbl
|
TBL=tbl
|
||||||
|
|
||||||
|
all: $(TARGET_HOME)/doc/LLgen.doc $(TARGET_HOME)/doc/LLgen_NCER.doc
|
||||||
|
|
||||||
$(TARGET_HOME)/doc/LLgen.doc: $(SRC_DIR)/LLgen.n $(SRC_DIR)/LLgen.refs
|
$(TARGET_HOME)/doc/LLgen.doc: $(SRC_DIR)/LLgen.n $(SRC_DIR)/LLgen.refs
|
||||||
$(REFER) -sA+T -p $(SRC_DIR)/LLgen.refs $(SRC_DIR)/LLgen.n | $(EQN) | $(TBL) > $@
|
$(REFER) -sA+T -p $(SRC_DIR)/LLgen.refs $(SRC_DIR)/LLgen.n | $(EQN) | $(TBL) > $@
|
||||||
|
|
||||||
|
$(TARGET_HOME)/doc/LLgen_NCER.doc: $(SRC_DIR)/LLgen_NCER.n
|
||||||
|
$(GRAP) $(SRC_DIR)/LLgen_NCER.n | pic | eqn > $@
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ OPR=dip
|
|||||||
RESFILES= \
|
RESFILES= \
|
||||||
toolkit.$(SUF) install.$(SUF) em.$(SUF) ack.$(SUF) v7bugs.$(SUF) \
|
toolkit.$(SUF) install.$(SUF) em.$(SUF) ack.$(SUF) v7bugs.$(SUF) \
|
||||||
peep.$(SUF) cg.$(SUF) ncg.$(SUF) regadd.$(SUF) LLgen.$(SUF) \
|
peep.$(SUF) cg.$(SUF) ncg.$(SUF) regadd.$(SUF) LLgen.$(SUF) \
|
||||||
basic.$(SUF) crefman.$(SUF) pcref.$(SUF) val.$(SUF) ansi_C.$(SUF) \
|
basic.$(SUF) crefman.$(SUF) pascal.$(SUF) pcref.$(SUF) val.$(SUF) \
|
||||||
|
ansi_C.$(SUF) \
|
||||||
6500.$(SUF) i80.$(SUF) z80.$(SUF) top.$(SUF) ego.$(SUF) \
|
6500.$(SUF) i80.$(SUF) z80.$(SUF) top.$(SUF) ego.$(SUF) \
|
||||||
m68020.$(SUF) occam.$(SUF) m2ref.$(SUF) ceg.$(SUF) nopt.$(SUF) \
|
m68020.$(SUF) occam.$(SUF) m2ref.$(SUF) ceg.$(SUF) nopt.$(SUF) \
|
||||||
sparc.$(SUF) int.$(SUF) lint.$(SUF)
|
sparc.$(SUF) int.$(SUF) lint.$(SUF)
|
||||||
@@ -78,4 +79,4 @@ clean:
|
|||||||
# It makes a version of the installation manual, suitable for a simple
|
# It makes a version of the installation manual, suitable for a simple
|
||||||
# line printer.
|
# line printer.
|
||||||
distr: install.doc
|
distr: install.doc
|
||||||
tbl install.doc | nroff -Tlpr $(MS) >install.pr
|
tbl install.doc | nroff -Tlp $(MS) >install.pr
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
proto.make
|
|
||||||
ceg.ref
|
|
||||||
ceg.tr
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
PIC=pic
|
|
||||||
TBL=tbl
|
|
||||||
REFER=refer
|
|
||||||
|
|
||||||
../ceg.doc: ceg.tr ceg.ref
|
|
||||||
$(PIC) ceg.tr | $(REFER) -e -p ceg.ref | $(TBL) > $@
|
|
||||||
@@ -1,284 +0,0 @@
|
|||||||
.TL
|
|
||||||
|
|
||||||
Code Expander
|
|
||||||
.br
|
|
||||||
(proposal)
|
|
||||||
|
|
||||||
.SH
|
|
||||||
Introduction
|
|
||||||
.LP
|
|
||||||
The \fBcode expander\fR, \fBce\fR, is a program that translates EM-code to
|
|
||||||
objectcode. The main goal is to translate very fast. \fBce\fR is an instance
|
|
||||||
of the EM_CODE(3L)-interface. During execution of \fBce\fR, \fBce\fR will build
|
|
||||||
in core a machine independent objectfile ( NEW A.OUT(5L)). With \fBcv\fR or
|
|
||||||
with routines supplied by the user the machine independent objectcode will
|
|
||||||
be converted to a machine dependent object code. \fBce\fR needs
|
|
||||||
information about the targetmachine (e.g. the opcode's). We divide the
|
|
||||||
information into two parts:
|
|
||||||
.IP
|
|
||||||
- The description in assembly instructions of EM-code instructions.
|
|
||||||
.IP
|
|
||||||
- The description in objectcode of assembly instructions.
|
|
||||||
.LP
|
|
||||||
With these two tables we can make a \fBcode expander generator\fR which
|
|
||||||
generates a \fBce\fR. It is possible to put the information in one table
|
|
||||||
but that will probably introduce (propable) more bugs in the table. So we
|
|
||||||
divide and conquer. With this approach it is also possible to generate
|
|
||||||
assembly code ( rather yhan objectcode), wich is useful for debugging.
|
|
||||||
There is of course a link between the two tables, the link
|
|
||||||
consist of a restriction on the assembly format. Every assembly
|
|
||||||
instruction must have the following format:
|
|
||||||
.sp
|
|
||||||
INSTR ::= LABEL : MNEMONIC [ OPERAND ( "," OPERAND)* ]
|
|
||||||
.sp
|
|
||||||
.LP
|
|
||||||
\fBCeg\fR uses the following algorithm:
|
|
||||||
.IP \0\0a)
|
|
||||||
The assembly table will be converted to a (C-)routine assemble().
|
|
||||||
assemble() gets as argument a string, the assembler instruction,
|
|
||||||
and can use the MNEMONIC to execute the corresponding action in the
|
|
||||||
assembly table.
|
|
||||||
.IP \0\0b)
|
|
||||||
The routine assemble() can now be used to convert the EM-code table to
|
|
||||||
a set of C-routines, wich together form an instance of the
|
|
||||||
EM_CODE(3L).
|
|
||||||
.SH
|
|
||||||
The EM-instruction table
|
|
||||||
.LP
|
|
||||||
We use the following grammar:
|
|
||||||
.sp
|
|
||||||
.TS
|
|
||||||
center box ;
|
|
||||||
l.
|
|
||||||
TABLE ::= (ROW)*
|
|
||||||
ROW ::= C_instr ( SPECIAL | SIMPLE)
|
|
||||||
SPECIAL ::= ( CONDITION SIMPLE)+ 'default' SIMPLE
|
|
||||||
SIMPLE ::= '==>' ACTIONLIST | '::=' ACTIONLIST
|
|
||||||
ACTIONLIST ::= [ ACTION ( ';' ACTION)* ] '.'
|
|
||||||
ACTION ::= function-call | assembly-instruction
|
|
||||||
.TE
|
|
||||||
.LP
|
|
||||||
An example for the 8086:
|
|
||||||
.LP
|
|
||||||
.DS
|
|
||||||
C_lxl
|
|
||||||
$arg1 == 0 ==> "push bp".
|
|
||||||
$arg1 == 1 ==> "push EM_BSIZE(bp)".
|
|
||||||
default ==> "mov cx, $arg1";
|
|
||||||
"mov si, bp";
|
|
||||||
"1: mov si, EM_BSIZE(si);
|
|
||||||
"loop 1b"
|
|
||||||
"push si".
|
|
||||||
.DE
|
|
||||||
.sp
|
|
||||||
Some remarks:
|
|
||||||
.sp
|
|
||||||
* The C_instr is a function indentifier in the EM_CODE(3L)-interface.
|
|
||||||
.LP
|
|
||||||
* CONDITION is a "boolean" C-expression.
|
|
||||||
.LP
|
|
||||||
* The arguments of an EM-instruction can be used in CONDITION and in assembly
|
|
||||||
instructions. They are referred by $arg\fIi\fR. \fBceg\fR modifies the
|
|
||||||
arguments as follows:
|
|
||||||
.IP \0\0-
|
|
||||||
For local variables at positive offsets it increases this offset by EM_BSIZE
|
|
||||||
.IP \0\0-
|
|
||||||
It makes names en labels unique. The user must supply the formats (see mach.h).
|
|
||||||
.LP
|
|
||||||
* function-call is allowed to implement e.g. push/pop optimization.
|
|
||||||
For example:
|
|
||||||
.LP
|
|
||||||
.DS
|
|
||||||
C_adi
|
|
||||||
$arg1 == 2 ==> combine( "pop ax");
|
|
||||||
combine( "pop bx");
|
|
||||||
"add ax, bx";
|
|
||||||
save( "push ax").
|
|
||||||
default ==> arg_error( "C_adi", $arg1).
|
|
||||||
.DE
|
|
||||||
.LP
|
|
||||||
* The C-functions called in the EM-instructions table have to use the routine
|
|
||||||
assemble()/gen?(). "assembler-instr" is in fact assemble( "assembler-instr").
|
|
||||||
.LP
|
|
||||||
* \fBceg\fR takes care not only about the conversions of arguments but also
|
|
||||||
about
|
|
||||||
changes between segments. There are situation when one doesn't want
|
|
||||||
conversion of arguments. This can be done by using ::= in stead of ==>.
|
|
||||||
This is usefull when two C_instr are equivalent. For example:
|
|
||||||
.IP
|
|
||||||
C_slu ::= C_sli( $arg1)
|
|
||||||
.LP
|
|
||||||
* There are EM-CODE instructions wich are machine independent (e.g. C_open()).
|
|
||||||
For these EM_CODE instructions \fBceg\fR will generate \fIdefault\fR-
|
|
||||||
instructions. There is one exception: in the case of C_pro() the tablewriter
|
|
||||||
has to supply a function prolog().
|
|
||||||
.LP
|
|
||||||
* Also the EM-pseudoinstructions C_bss_\fIcstp\fR(), C_hol_\fIcstp\fR(),
|
|
||||||
C_con_\fIcstp\fR() and C_rom_\fIcstp\fR can be translated automaticly.
|
|
||||||
\fBceg\fR only has to know how to interpretate string-constants:
|
|
||||||
.DS
|
|
||||||
\&..icon $arg2 == 1 ==> gen1( (char) atoi( $arg1))
|
|
||||||
$arg2 == 2 ==> gen2( atoi( $arg1))
|
|
||||||
$arg2 == 4 ==> gen4( atol( $arg1))
|
|
||||||
\&..ucon $arg2 == 1 ==> gen1( (char) atoi( $arg1))
|
|
||||||
$arg2 == 2 ==> gen2( atoi( $arg1))
|
|
||||||
$arg2 == 4 ==> gen4( atol( $arg1))
|
|
||||||
\&..fcon ::= not_implemented( "..fcon")
|
|
||||||
.DE
|
|
||||||
.LP
|
|
||||||
* Still, life can be made easier for the tablewriter; For the routines wich
|
|
||||||
he/she didn't implement \fBceg\fR will generate a default instruction wich
|
|
||||||
generates an error-message. \fBceg\fR seems to generate :
|
|
||||||
.IP
|
|
||||||
C_xxx ::= not_implemented( "C_xxx")
|
|
||||||
.SH
|
|
||||||
The assembly table
|
|
||||||
.LP
|
|
||||||
How to map assembly on objectcode.
|
|
||||||
.LP
|
|
||||||
Each row in the table consists of two fields, one field for the assembly
|
|
||||||
instruction, the other field for the corresponding objectcode. The tablewriter
|
|
||||||
can use the following primitives to generate code for the machine
|
|
||||||
instructions :
|
|
||||||
.IP "\0\0gen1( b)\0\0:" 17
|
|
||||||
generates one byte in de machine independent objectfile.
|
|
||||||
.IP "\0\0gen2( w)\0\0:" 17
|
|
||||||
generates one word ( = two bytes), the table writer can change the byte
|
|
||||||
order by setting the flag BYTES_REVERSED.
|
|
||||||
.IP "\0\0gen4( l)\0\0:" 17
|
|
||||||
generates two words ( = four bytes), the table writer can change the word
|
|
||||||
order by setting the flag WORDS_REVERSED.
|
|
||||||
.IP "\0\0reloc( n, o, r)\0\0:" 17
|
|
||||||
generates relocation information for a label ( = name + offset +
|
|
||||||
relocationtype).
|
|
||||||
.LP
|
|
||||||
Besides these primitives the table writer may use his self written
|
|
||||||
C-functions. This allows the table writer e.g. to write functions to set
|
|
||||||
bitfields within a byte.
|
|
||||||
.LP
|
|
||||||
There are more or less two methods to encode the assembly instructions:
|
|
||||||
.IP \0\0a)
|
|
||||||
MNEMONIC and OPERAND('s) are encoded independently of each other. This can be
|
|
||||||
done when the target machine has an orthogonal instruction set (e.g. pdp-11).
|
|
||||||
.IP \0\0b)
|
|
||||||
MNEMONIC and OPERAND('s) together determine the opcode. In this case the
|
|
||||||
assembler often uses overloading: one MNEMONIC is used for several
|
|
||||||
different machine-instructions. For example : (8086)
|
|
||||||
.br
|
|
||||||
mov ax, bx
|
|
||||||
.br
|
|
||||||
mov ax, variable
|
|
||||||
.br
|
|
||||||
These instructions have different opcodes.
|
|
||||||
.LP
|
|
||||||
As the transformation MNEMONIC-OPCODE is not one to
|
|
||||||
one the table writer must be allowed to put restrictions on the operands.
|
|
||||||
This can be done with type declarations. For example:
|
|
||||||
.LP
|
|
||||||
.DS
|
|
||||||
mov dst:REG, src:MEM ==>
|
|
||||||
gen1( 0x8b);
|
|
||||||
modRM( op2.reg, op1);
|
|
||||||
.DE
|
|
||||||
.DS
|
|
||||||
mov dst:REG, src:REG ==>
|
|
||||||
gen1( 0x89);
|
|
||||||
modRM( op2.reg, op1);
|
|
||||||
.DE
|
|
||||||
.LP
|
|
||||||
modRM() is a function written by the tablewriter and is used to encode
|
|
||||||
the operands. This frees the table writer of endless typing.
|
|
||||||
.LP
|
|
||||||
The table writer has to do the "typechecking" by himself. But typechecking
|
|
||||||
is almost the same as operand decoding. So it's more efficient to do this
|
|
||||||
in one function. We now have all the tools to describe the function
|
|
||||||
assemble().
|
|
||||||
.IP
|
|
||||||
assemble() first calls the function
|
|
||||||
decode_operand() ( by the table writer written), with two arguments: a
|
|
||||||
string ( the operand) and a
|
|
||||||
pointer to a struct. The struct is declared by the table writer and must
|
|
||||||
consist of at least a field called type. ( the other fields in the struct can
|
|
||||||
be used to remember information about the decoded operand.) Now assemble()
|
|
||||||
fires a row wich is selected by mapping the MNEMONIC and the type of the
|
|
||||||
operands.
|
|
||||||
.br
|
|
||||||
In the second field of a row there may be references to other
|
|
||||||
fields in the struct (e.g. op2.reg in the example above).
|
|
||||||
.LP
|
|
||||||
We ignored one problem. It's possible when the operands are encoded, that
|
|
||||||
not everything is known. For example $arg\fIi\fR arguments in the
|
|
||||||
EM-instruction table get their value at runtime. This problem is solved by
|
|
||||||
introducing a function eval(). eval() has a string as argument and returns
|
|
||||||
an arith. The string consists of constants and/or $arg\fIi\fR's and the value
|
|
||||||
returned by eval() is the value of the string. To encode the $arg\fIi\fR's
|
|
||||||
in as few bytes as possible the table writer can use the statements %if,
|
|
||||||
%else and %endif. They can be used in the same manner as #if, #else and
|
|
||||||
#endif in C and result in a runtime test. An example :
|
|
||||||
.LP
|
|
||||||
.DS
|
|
||||||
-- Some rows of the assembly table
|
|
||||||
|
|
||||||
mov dst:REG, src:DATA ==>
|
|
||||||
%if sfit( eval( src), 8) /* does the immediate-data fit in 1 byte? */
|
|
||||||
R53( 0x16 , op1.reg);
|
|
||||||
gen1( eval( src));
|
|
||||||
%else
|
|
||||||
R53( 0x17 , op1.reg);
|
|
||||||
gen2( eval( src));
|
|
||||||
%endif
|
|
||||||
.LD
|
|
||||||
|
|
||||||
mov dst:REG, src:REG ==>
|
|
||||||
gen1( 0x8b);
|
|
||||||
modRM( op1.reg, op2);
|
|
||||||
|
|
||||||
.DE
|
|
||||||
.DS
|
|
||||||
-- The corresponding part in the function assemble() :
|
|
||||||
|
|
||||||
case MNEM_mov :
|
|
||||||
decode_operand( arg1, &op1);
|
|
||||||
decode_operand( arg2, &op2);
|
|
||||||
if ( REG( op1.type) && DATA( op2.type)) {
|
|
||||||
printf( "if ( sfit( %s, 8)) {\\\\n", eval( src));
|
|
||||||
R53( 0x16 , op1.reg);
|
|
||||||
printf( "gen1( %s)\\\\n", eval( arg2));
|
|
||||||
printf( "}\\\\nelse {\\\\n");
|
|
||||||
R53( 0x17 , op1.reg);
|
|
||||||
printf( "gen2( %s)\\\\n", eval( arg2));
|
|
||||||
printf( "}\\\\n");
|
|
||||||
}
|
|
||||||
else if ( REG( op1.type) && REG( op2.type)) {
|
|
||||||
gen1( 0x8b);
|
|
||||||
modRM( op1.reg, op2);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.DE
|
|
||||||
.DS
|
|
||||||
-- Some rows of the right part of the EM-instruction table are translated
|
|
||||||
-- in the following C-functions.
|
|
||||||
|
|
||||||
"mov ax, $arg1" ==>
|
|
||||||
if ( sfit( w, 8)) { /* w is the actual argument of C_xxx( w) */
|
|
||||||
gen1( 176); /* R53() */
|
|
||||||
gen1( w);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
gen1( 184);
|
|
||||||
gen2( w);
|
|
||||||
}
|
|
||||||
.LD
|
|
||||||
|
|
||||||
"mov ax, bx" ==>
|
|
||||||
gen1( 138);
|
|
||||||
gen1( 99); /* modRM() */
|
|
||||||
.DE
|
|
||||||
.SH
|
|
||||||
Restrictions
|
|
||||||
.LP
|
|
||||||
.IP \0\01)
|
|
||||||
The EM-instructions C_exc() is not implemented.
|
|
||||||
.IP \0\03)
|
|
||||||
All messages are ignored.
|
|
||||||
@@ -1,276 +0,0 @@
|
|||||||
.TL
|
|
||||||
A prototype Code expander
|
|
||||||
.NH
|
|
||||||
Introduction
|
|
||||||
.PP
|
|
||||||
A program to be compiled with ACK is first fed into the preprocessor.
|
|
||||||
The output of the preprocessor goes into the appropiate front end,
|
|
||||||
whose job it is to produce EM. The EM code generated is
|
|
||||||
fed into the peephole optimizer, wich scans it with a window of few
|
|
||||||
instructions, replacing certain inefficient code sequences by better
|
|
||||||
ones. Following the peephole optimizer follows a backend wich produces
|
|
||||||
good assembly code. The assembly code goes into the assembler and the objectcode
|
|
||||||
then goes into the loader/linker, the final component in the pipeline.
|
|
||||||
.PP
|
|
||||||
For various applications this scheme is too slow. For example for testing
|
|
||||||
programs; In this case the program has to be translated fast and the
|
|
||||||
runtime of the objectcode may be slower. A solution is to build a code
|
|
||||||
expander ( \fBce\fR) wich translates EM code to objectcode. Of course this
|
|
||||||
has to
|
|
||||||
be done automaticly by a code expander generator, but to get some feeling
|
|
||||||
for the problem we started out to build prototypes.
|
|
||||||
We built two types of ce's. One wich tranlated EM to assembly, one
|
|
||||||
wich translated EM to objectcode.
|
|
||||||
.NH
|
|
||||||
EM to assembly
|
|
||||||
.PP
|
|
||||||
We made one for the 8086 and one for the vax4. These ce's are instances of the
|
|
||||||
EM_CODE(3L)-interface and produce for a single EM instruction a set
|
|
||||||
of assembly instruction wich are semantic equivalent.
|
|
||||||
We implemented in the 8086-ce push/pop-optimalization.
|
|
||||||
.NH
|
|
||||||
EM to objectcode
|
|
||||||
.PP
|
|
||||||
Instead of producing assembly code we tried to produce vax4-objectcode.
|
|
||||||
During execution of ce, ce builds in core a machine independent
|
|
||||||
objectfile ( NEW A.OUT(5L)) and just before dumping the tables this
|
|
||||||
objectfile is converted to a Berkly 4.2BSD a.out-file. We build two versions;
|
|
||||||
One with static memory allocation and one with dynamic memory allocation.
|
|
||||||
If the first one runs out of memory it will give an error message and stop,
|
|
||||||
the second one will allocate more memory and proceed with producing
|
|
||||||
objectcode.
|
|
||||||
.PP
|
|
||||||
The C-frontend calls the EM_CODE-interface. So after linking the frontend
|
|
||||||
and the ce we have a pipeline in a program saving a lot of i/o.
|
|
||||||
It is interesting to compare this C-compiler ( called fcemcom) with "cc -c".
|
|
||||||
fcemcom1 (the dynamic variant of fcemcom) is tuned in such a way, that
|
|
||||||
alloc() won't be called.
|
|
||||||
.NH 2
|
|
||||||
Compile time
|
|
||||||
.PP
|
|
||||||
fac.c is a small program that produces n! ( see below). foo.c is small program
|
|
||||||
that loops a lot.
|
|
||||||
.TS
|
|
||||||
center, box, tab(:);
|
|
||||||
c | c | c | c | c | c
|
|
||||||
c | c | n | n | n | n.
|
|
||||||
compiler : program : real : user : sys : object size
|
|
||||||
=
|
|
||||||
fcemcom : sort.c : 31.0 : 17.5 : 1.8 : 23824
|
|
||||||
fcemcom1 : : 59.0 : 21.2 : 3.3 :
|
|
||||||
cc -c : : 50.0 : 38.0 : 3.5 : 6788
|
|
||||||
_
|
|
||||||
fcemcom : ed.c : 37.0 : 23.6 : 2.3 : 41744
|
|
||||||
fcemcom1 : : 1.16.0 : 28.3 : 4.6 :
|
|
||||||
cc -c : : 1.19.0 : 54.8 : 4.3 : 11108
|
|
||||||
_
|
|
||||||
fcemcom : cp.c : 4.0 : 2.4 : 0.8 : 4652
|
|
||||||
fcemcom1 : : 9.0 : 3.0 : 1.0 :
|
|
||||||
cc -c : : 8.0 : 5.2 : 1.6 : 1048
|
|
||||||
_
|
|
||||||
fcemcom : uniq.c : 5.0 : 2.5 : 0.8 : 5568
|
|
||||||
fcemcom1 : : 9.0 : 2.9 : 0.8 :
|
|
||||||
cc -c : : 13.0 : 5.4 : 2.0 : 3008
|
|
||||||
_
|
|
||||||
fcemcom : btlgrep.c : 24.0 : 7.2 : 1.4 : 12968
|
|
||||||
fcemcom1 : : 23.0 : 8.1 : 1.2 :
|
|
||||||
cc -c : : 1.20.0 : 15.3 : 3.8 : 2392
|
|
||||||
_
|
|
||||||
fcemcom : fac.c : 1.0 : 0.1 : 0.5 : 216
|
|
||||||
fecmcom1 : : 2.0 : 0.2 : 0.5 :
|
|
||||||
cc -c : : 3.0 : 0.7 : 1.3 : 92
|
|
||||||
_
|
|
||||||
fcemcom : foo.c : 4.0 : 0.2 : 0.5 : 272
|
|
||||||
fcemcom1 : : 11.0 : 0.3 : 0.5 :
|
|
||||||
cc -c : : 7.0 : 0.8 : 1.6 : 108
|
|
||||||
.TE
|
|
||||||
.NH 2
|
|
||||||
Run time
|
|
||||||
.LP
|
|
||||||
Is the runtime very bad?
|
|
||||||
.TS
|
|
||||||
tab(:), box, center;
|
|
||||||
c | c | c | c | c
|
|
||||||
c | c | n | n | n.
|
|
||||||
compiler : program : real : user : system
|
|
||||||
=
|
|
||||||
fcem : sort.c : 22.0 : 17.5 : 1.5
|
|
||||||
cc : : 5.0 : 2.4 : 1.1
|
|
||||||
_
|
|
||||||
fcem : btlgrep.c : 1.58.0 : 27.2 : 4.2
|
|
||||||
cc : : 12.0 : 3.6 : 1.1
|
|
||||||
_
|
|
||||||
fcem : foo.c : 1.0 : 0.7 : 0.1
|
|
||||||
cc : : 1.0 : 0.4 : 0.1
|
|
||||||
_
|
|
||||||
fcem : uniq.c : 2.0 : 0.5 : 0.3
|
|
||||||
cc : : 1.0 : 0.1 : 0.2
|
|
||||||
.TE
|
|
||||||
.NH 2
|
|
||||||
quality object code
|
|
||||||
.LP
|
|
||||||
The runtime is very bad so its interesting to have look at the code which is
|
|
||||||
produced by fcemcom and by cc -c. I took a program which computes recursively
|
|
||||||
n!.
|
|
||||||
.DS
|
|
||||||
long fac();
|
|
||||||
|
|
||||||
main()
|
|
||||||
{
|
|
||||||
int n;
|
|
||||||
|
|
||||||
scanf( "%D", &n);
|
|
||||||
printf( "fac is %D\\\\n", fac( n));
|
|
||||||
}
|
|
||||||
|
|
||||||
long fac( n)
|
|
||||||
int n;
|
|
||||||
{
|
|
||||||
if ( n == 0)
|
|
||||||
return( 1);
|
|
||||||
else
|
|
||||||
return( n * fac( n-1));
|
|
||||||
}
|
|
||||||
.DE
|
|
||||||
.br
|
|
||||||
.br
|
|
||||||
.br
|
|
||||||
.br
|
|
||||||
.LP
|
|
||||||
"cc -c fac.c" produces :
|
|
||||||
.DS
|
|
||||||
fac: tstl 4(ap)
|
|
||||||
bnequ 7f
|
|
||||||
movl $1, r0
|
|
||||||
ret
|
|
||||||
7f: subl3 $1, 4(ap), r0
|
|
||||||
pushl r0
|
|
||||||
call $1, fac
|
|
||||||
movl r0, -4(fp)
|
|
||||||
mull3 -4(fp), 4(ap), r0
|
|
||||||
ret
|
|
||||||
.DE
|
|
||||||
.br
|
|
||||||
.br
|
|
||||||
.LP
|
|
||||||
"fcem fac.c fac.o" produces :
|
|
||||||
.DS
|
|
||||||
_fac: 0
|
|
||||||
42: jmp be
|
|
||||||
48: pushl 4(ap)
|
|
||||||
4e: pushl $0
|
|
||||||
54: subl2 (sp)+,(sp)
|
|
||||||
57: tstl (sp)+
|
|
||||||
59: bnequ 61
|
|
||||||
5b: jmp 67
|
|
||||||
61: jmp 79
|
|
||||||
67: pushl $1
|
|
||||||
6d: jmp ba
|
|
||||||
73: jmp b9
|
|
||||||
79: pushl 4(ap)
|
|
||||||
7f: pushl $1
|
|
||||||
85: subl2 (sp)+,(sp)
|
|
||||||
88: calls $0,_fac
|
|
||||||
8f: addl2 $4,sp
|
|
||||||
96: pushl r0
|
|
||||||
98: pushl 4(ap)
|
|
||||||
9e: pushl $4
|
|
||||||
a4: pushl $4
|
|
||||||
aa: jsb .cii
|
|
||||||
b0: mull2 (sp)+,(sp)
|
|
||||||
b3: jmp ba
|
|
||||||
b9: ret
|
|
||||||
ba: movl (sp)+,r0
|
|
||||||
bd: ret
|
|
||||||
be: jmp 48
|
|
||||||
.DE
|
|
||||||
.NH 1
|
|
||||||
Conclusions
|
|
||||||
.PP
|
|
||||||
comparing "cc -c" with "fcemcom"
|
|
||||||
.LP
|
|
||||||
.TS
|
|
||||||
center, box, tab(:);
|
|
||||||
c | c s | c | c s
|
|
||||||
^ | c s | ^ | c s
|
|
||||||
^ | c | c | ^ | c | c
|
|
||||||
l | n | n | n | n | n.
|
|
||||||
program : compile time : object size : runtime
|
|
||||||
:_::_
|
|
||||||
: user : sys :: user : sys
|
|
||||||
=
|
|
||||||
sort.c : 0.47 : 0.5 : 3.5 : 7.3 : 1.4
|
|
||||||
_
|
|
||||||
ed.c : 0.46 : 0.5 : 3.8 : : :
|
|
||||||
_
|
|
||||||
cp.c : 0.46 : 0.5 : 4.4 : : :
|
|
||||||
_
|
|
||||||
uniq.c : 0.46 : 0.4 : 1.8 : : :
|
|
||||||
_
|
|
||||||
btlgrep.c : 0.47 : 0.3 : 5.4 : 7.5 : 3.8
|
|
||||||
_
|
|
||||||
fac.c : 0.14 : 0.4 : 2.3 : 1.8 : 1.0
|
|
||||||
_
|
|
||||||
foo.c : 0.25 : 0.3 : 2.5 : 5.0 : 1.5
|
|
||||||
.TE
|
|
||||||
.PP
|
|
||||||
The results for fcemcom1 are almost identical; The only thing that changes
|
|
||||||
is that fcemcom1 is 1.2 slower than fcemcom. ( compile time) This is due to
|
|
||||||
to an another datastructure . In the static version we use huge array's for
|
|
||||||
the text- and
|
|
||||||
data-segment, the relocation information, the symboltable and stringarea.
|
|
||||||
In the dynamic version we use linked lists, wich makes it expensive to get
|
|
||||||
and to put a byte on a abritrary memory location. So it is probably better
|
|
||||||
to use realloc(), because in the most cases there will be enough memory.
|
|
||||||
.PP
|
|
||||||
The quality of the objectcode is very bad. The reason is that the frontend
|
|
||||||
generates bad code and expects the peephole-optimizer to improve the code.
|
|
||||||
This is also one of the main reasons that the runtime is very bad.
|
|
||||||
(e.g. the expensive "cii" with arguments 4 and 4 could be deleted.)
|
|
||||||
So its seems a good
|
|
||||||
idea to put a new peephole-optimizer between the frontend and the ce.
|
|
||||||
.PP
|
|
||||||
Using the peephole optimizer the ce would produce :
|
|
||||||
.DS
|
|
||||||
_fac: 0
|
|
||||||
pushl 4(ap)
|
|
||||||
tstl (sp)+
|
|
||||||
beqlu 1f
|
|
||||||
jmp 3f
|
|
||||||
1 : pushl $1
|
|
||||||
jmp 2f
|
|
||||||
3 : pushl 4(ap)
|
|
||||||
decl (sp)
|
|
||||||
calls $0,_fac
|
|
||||||
addl2 $4,sp
|
|
||||||
pushl r0
|
|
||||||
pushl 4(ap)
|
|
||||||
mull2 (sp)+,(sp)
|
|
||||||
movl (sp)+,r0
|
|
||||||
2 : ret
|
|
||||||
.DE
|
|
||||||
.PP
|
|
||||||
Bruce McKenzy already implemented it and made some improvements in the
|
|
||||||
source code of the ce. The compile-time is two to two and a half times better
|
|
||||||
and the
|
|
||||||
size of the objectcode is two to three times bigger.(comparing with "cc -c")
|
|
||||||
Still we could do better.
|
|
||||||
.PP
|
|
||||||
Using peephole- and push/pop-optimization ce could produce :
|
|
||||||
.DS
|
|
||||||
_fac: 0
|
|
||||||
tstl 4(ap)
|
|
||||||
beqlu 1f
|
|
||||||
jmp 2f
|
|
||||||
1 : pushl $1
|
|
||||||
jmp 3f
|
|
||||||
2 : decl 4(ap)
|
|
||||||
calls $0,_fac
|
|
||||||
addl2 $4,sp
|
|
||||||
mull3 4(ap), r0, -(sp)
|
|
||||||
movl (sp)+, r0
|
|
||||||
3 : ret
|
|
||||||
.DE
|
|
||||||
.PP
|
|
||||||
prof doesn't cooperate, so no profile information.
|
|
||||||
.PP
|
|
||||||
323
doc/cref.doc
323
doc/cref.doc
@@ -1,323 +0,0 @@
|
|||||||
.\" $Header$
|
|
||||||
.nr ID 4
|
|
||||||
.de hd
|
|
||||||
'sp 2
|
|
||||||
'tl ''-%-''
|
|
||||||
'sp 3
|
|
||||||
..
|
|
||||||
.de fo
|
|
||||||
'bp
|
|
||||||
..
|
|
||||||
.tr ~
|
|
||||||
. TITLE
|
|
||||||
.de TL
|
|
||||||
.sp 15
|
|
||||||
.ce
|
|
||||||
\\fB\\$1\\fR
|
|
||||||
..
|
|
||||||
. AUTHOR
|
|
||||||
.de AU
|
|
||||||
.sp 15
|
|
||||||
.ce
|
|
||||||
by
|
|
||||||
.sp 2
|
|
||||||
.ce
|
|
||||||
\\$1
|
|
||||||
..
|
|
||||||
. DATE
|
|
||||||
.de DA
|
|
||||||
.sp 3
|
|
||||||
.ce
|
|
||||||
( Dated \\$1 )
|
|
||||||
..
|
|
||||||
. INSTITUTE
|
|
||||||
.de VU
|
|
||||||
.sp 3
|
|
||||||
.ce 4
|
|
||||||
Wiskundig Seminarium
|
|
||||||
Vrije Universteit
|
|
||||||
De Boelelaan 1081
|
|
||||||
Amsterdam
|
|
||||||
..
|
|
||||||
. PARAGRAPH
|
|
||||||
.de PP
|
|
||||||
.sp
|
|
||||||
.ti +\n(ID
|
|
||||||
..
|
|
||||||
.nr CH 0 1
|
|
||||||
. CHAPTER
|
|
||||||
.de CH
|
|
||||||
.nr SH 0 1
|
|
||||||
.bp
|
|
||||||
.in 0
|
|
||||||
\\fB\\n+(CH.~\\$1\\fR
|
|
||||||
.PP
|
|
||||||
..
|
|
||||||
. SUBCHAPTER
|
|
||||||
.de SH
|
|
||||||
.sp 3
|
|
||||||
.in 0
|
|
||||||
\\fB\\n(CH.\\n+(SH.~\\$1\\fR
|
|
||||||
.PP
|
|
||||||
..
|
|
||||||
. INDENT START
|
|
||||||
.de IS
|
|
||||||
.sp
|
|
||||||
.in +\n(ID
|
|
||||||
..
|
|
||||||
. INDENT END
|
|
||||||
.de IE
|
|
||||||
.in -\n(ID
|
|
||||||
.sp
|
|
||||||
..
|
|
||||||
.de PT
|
|
||||||
.ti -\n(ID
|
|
||||||
.ta \n(ID
|
|
||||||
.fc " @
|
|
||||||
"\\$1@"\c
|
|
||||||
.fc
|
|
||||||
..
|
|
||||||
. DOUBLE INDENT START
|
|
||||||
.de DS
|
|
||||||
.sp
|
|
||||||
.in +\n(ID
|
|
||||||
.ll -\n(ID
|
|
||||||
..
|
|
||||||
. DOUBLE INDENT END
|
|
||||||
.de DE
|
|
||||||
.ll +\n(ID
|
|
||||||
.in -\n(ID
|
|
||||||
.sp
|
|
||||||
..
|
|
||||||
. EQUATION START
|
|
||||||
.de EQ
|
|
||||||
.sp
|
|
||||||
.nf
|
|
||||||
..
|
|
||||||
. EQUATION END
|
|
||||||
.de EN
|
|
||||||
.fi
|
|
||||||
.sp
|
|
||||||
..
|
|
||||||
. ITEM
|
|
||||||
.de IT
|
|
||||||
.sp
|
|
||||||
.in 0
|
|
||||||
\\fB~\\$1\\fR
|
|
||||||
.ti +5
|
|
||||||
..
|
|
||||||
.de CS
|
|
||||||
.br
|
|
||||||
~-~\\
|
|
||||||
..
|
|
||||||
.br
|
|
||||||
.fi
|
|
||||||
.TL "Ack-C reference manual"
|
|
||||||
.AU "Ed Keizer"
|
|
||||||
.DA "September 12, 1983"
|
|
||||||
.VU
|
|
||||||
.wh 0 hd
|
|
||||||
.wh 60 fo
|
|
||||||
.CH "Introduction"
|
|
||||||
The C frontend included in the Amsterdam Compiler Kit
|
|
||||||
translates UNIX-V7 C into compact EM code [1].
|
|
||||||
The language accepted is described in [2] and [3].
|
|
||||||
This document describes which implementation dependent choices were
|
|
||||||
made in the Ack-C frontend and
|
|
||||||
some restrictions and additions.
|
|
||||||
.CH "The language"
|
|
||||||
.PP
|
|
||||||
Under the same heading as used in [2] we describe the
|
|
||||||
properties of the Ack-C frontend.
|
|
||||||
.IT "2.2 Identifiers"
|
|
||||||
External identifiers are unique up to 7 characters and allow
|
|
||||||
both upper and lower case.
|
|
||||||
.IT "2.3 Keywords"
|
|
||||||
The word \fBvoid\fP is also reserved as a keyword.
|
|
||||||
.IT "2.4.3 Character constants"
|
|
||||||
The ASCII-mapping is used when a character is converted to an
|
|
||||||
integer.
|
|
||||||
.IT "2.4.4 Floating constants"
|
|
||||||
To prevent loss of precision the compiler does not perform
|
|
||||||
floating point constant folding.
|
|
||||||
.IT "2.6 Hardware characteristics"
|
|
||||||
The size of objects of the several arithmetic types and
|
|
||||||
pointers depend on the EM-implementation used.
|
|
||||||
The ranges of the arithmetic types depend on the size used,
|
|
||||||
the C-frontend assumes two's complement representation for the
|
|
||||||
integral types.
|
|
||||||
All sizes are multiples of bytes.
|
|
||||||
The calling program \fIack\fP[4] passes information about the
|
|
||||||
size of the types to the compiler proper.
|
|
||||||
.br
|
|
||||||
However, a few general remarks must be made:
|
|
||||||
.sp 1
|
|
||||||
.IS
|
|
||||||
.PT (a)
|
|
||||||
The size of pointers is a multiple of
|
|
||||||
(or equal to) the size of an \fIint\fP.
|
|
||||||
.PT (b)
|
|
||||||
The following relations exist for the sizes of the types
|
|
||||||
mentioned:
|
|
||||||
.br
|
|
||||||
.ti +5
|
|
||||||
\fIchar<=short<=int<=long\fP
|
|
||||||
.PT (c)
|
|
||||||
Objects of type \fIchar\fP use one 8-bit byte of storage,
|
|
||||||
although several bytes are allocated sometimes.
|
|
||||||
.PT (d)
|
|
||||||
All sizes are in multiples of bytes.
|
|
||||||
.PT (e)
|
|
||||||
Most EM implementations use 4 bytes for floats and 8 bytes
|
|
||||||
for doubles, but exceptions to this rule occur.
|
|
||||||
.IE
|
|
||||||
.IT "4 What's in a name"
|
|
||||||
The type \fIvoid\fP is added.
|
|
||||||
Objects of type void do not exist.
|
|
||||||
Functions declared as returning void, do not return a value at all.
|
|
||||||
.IT "6.1 Characters and integers"
|
|
||||||
Objects of type \fIchar\fP are unsigned and do not cause
|
|
||||||
sign-extension when converted to \fIint\fP.
|
|
||||||
The range of characters values is from 0 to 255.
|
|
||||||
.IT "6.3 Floating and integral"
|
|
||||||
Floating point numbers are truncated towards zero when
|
|
||||||
converted to the integral types.
|
|
||||||
.IT "6.4 Pointers and integers"
|
|
||||||
When a \fIlong\fP is added to or subtracted from a pointer and
|
|
||||||
longs are larger then pointers the \fIlong\fP is converted to an
|
|
||||||
\fIint\fP before the operation is performed.
|
|
||||||
.IT "7.2 Unary operators"
|
|
||||||
It is allowed to cast any expression to the type \fIvoid\fP.
|
|
||||||
.IT "8.2 Type specifiers"
|
|
||||||
One type is added to the type-specifiers:
|
|
||||||
.br
|
|
||||||
.IS
|
|
||||||
void
|
|
||||||
.IE
|
|
||||||
.IT "8.5 Structure and union declarations"
|
|
||||||
The only type allowed for fields is \fIint\fP.
|
|
||||||
Fields with exactly the size of \fIint\fP are signed,
|
|
||||||
all other fields are unsigned.
|
|
||||||
.br
|
|
||||||
The size of any single structure must be less then 4096 bytes.
|
|
||||||
.IT "8.6 Initialization"
|
|
||||||
Initialization of structures containing bit fields is not
|
|
||||||
allowed.
|
|
||||||
There is one restriction when using an 'address expression' to initialize
|
|
||||||
an integral variable.
|
|
||||||
The integral variable must have the same size as a pointer.
|
|
||||||
Conversions altering the size of the address expression are not allowed.
|
|
||||||
.IT "9.10 Return statement"
|
|
||||||
Return statements of the form:
|
|
||||||
.IS
|
|
||||||
return ;
|
|
||||||
.IE
|
|
||||||
are the only form of return statement allowed in a function of type
|
|
||||||
function returning void.
|
|
||||||
.IT "10.1 External function definitions"
|
|
||||||
The total amount for storage used for parameters
|
|
||||||
in any function must be less then 4096 bytes.
|
|
||||||
The same holds for the total amount of storage occupied by the
|
|
||||||
automatic variables declared inside any function.
|
|
||||||
.sp
|
|
||||||
Using formal parameters whose size is smaller the the size of an int
|
|
||||||
is less efficient on several machines.
|
|
||||||
At procedure entry these parameters are converted from integer to the
|
|
||||||
declared type, because the compiler doesn't know where the least
|
|
||||||
significant bytes are stored in the int.
|
|
||||||
.IT "11.2 Scope of externals"
|
|
||||||
Most C compilers are rather lax in enforcing the restriction
|
|
||||||
that only one external definition without the keyword
|
|
||||||
\fIextern\fP is allowed in a program.
|
|
||||||
The Ack-C frontend is very strict in this.
|
|
||||||
The only exception is that declarations of arrays with a
|
|
||||||
missing first array bounds expression are regarded to have an
|
|
||||||
explicit keyword \fIextern\fP.
|
|
||||||
.IT "14.4 Explicit pointer conversions"
|
|
||||||
Pointers may be larger the ints, thus assigning a pointer to an
|
|
||||||
int and back will not always result in the same pointer.
|
|
||||||
The process mentioned above works with integrals
|
|
||||||
of the same size or larger as pointers in all EM implementations
|
|
||||||
having such integrals.
|
|
||||||
When converting pointers to an integral type or vice-versa,
|
|
||||||
the pointers is seen as an unsigned int.
|
|
||||||
.br
|
|
||||||
EM guarantees that any object can be placed at a word boundary,
|
|
||||||
this allows the C-programs to use \fIint\fP pointers
|
|
||||||
as pointers to objects of any type not smaller than an \fIint\fP.
|
|
||||||
.CH "Frontend options"
|
|
||||||
The C-frontend has a few options, these are controlled
|
|
||||||
by flags:
|
|
||||||
.IS
|
|
||||||
.PT -V
|
|
||||||
This flag is followed by a sequence of letters each followed by
|
|
||||||
positive integers. Each letter indicates a
|
|
||||||
certain type, the integer following it specifies the size of
|
|
||||||
objects of that type. One letter indicates the wordsize used.
|
|
||||||
.IS
|
|
||||||
.sp 1
|
|
||||||
.TS
|
|
||||||
center tab(:);
|
|
||||||
l l16 l l.
|
|
||||||
letter:type:letter:type
|
|
||||||
|
|
||||||
w:wordsize:i:int
|
|
||||||
s:short:l:long
|
|
||||||
f:float:d:double
|
|
||||||
p:pointer::
|
|
||||||
.TE
|
|
||||||
.sp 1
|
|
||||||
All existing implementations use an integer size equal to the
|
|
||||||
wordsize.
|
|
||||||
.IE
|
|
||||||
The calling program \fIack\fP[4] provides the frontend with
|
|
||||||
this flag, with values depending on the machine used.
|
|
||||||
.sp 1
|
|
||||||
.PT -l
|
|
||||||
The frontend normally generates code to keep track of the line
|
|
||||||
number and source file name at runtime for debugging purposes.
|
|
||||||
Currently a pointer to a
|
|
||||||
string containing the filename is stored at a fixed place in
|
|
||||||
memory at each function
|
|
||||||
entry and the line number at the start of every expression.
|
|
||||||
At the return from a function these memory locations are not reset to
|
|
||||||
the values they had before the call.
|
|
||||||
Most library routines do not use this feature and thus do not
|
|
||||||
ruin the current line number and filename when called.
|
|
||||||
However, you are really unlucky when your program crashes due
|
|
||||||
to a bug in such a library function, because the line number
|
|
||||||
and filename do not indicate that something went wrong inside
|
|
||||||
the library function.
|
|
||||||
.br
|
|
||||||
Providing the flag -l to the frontend tells it not to generate
|
|
||||||
the code updating line number and file name.
|
|
||||||
This is, for example, used when translating the stdio library.
|
|
||||||
.br
|
|
||||||
When the \fIack\fP[4] is called with the -L flag it provides
|
|
||||||
the frontend with this flag.
|
|
||||||
.sp 1
|
|
||||||
.PT -Xp
|
|
||||||
When this flag is present the frontend generates a call to
|
|
||||||
the function \fBprocentry\fP at each function entry and a
|
|
||||||
call to \fBprocexit\fP at each function exit.
|
|
||||||
Both functions are provided with one parameter,
|
|
||||||
a pointer to a string containing the function name.
|
|
||||||
.br
|
|
||||||
When \fIack\fP is called with the -p flag it provides the
|
|
||||||
frontend with this flag.
|
|
||||||
.IE
|
|
||||||
.CH References
|
|
||||||
.IS
|
|
||||||
.PT [1]
|
|
||||||
A.S. Tanenbaum, Hans van Staveren, Ed Keizer and Johan
|
|
||||||
Stevenson \fIDescription of a machine architecture for use with
|
|
||||||
block structured languages\fP Informatica report IR-81.
|
|
||||||
.sp 1
|
|
||||||
.PT [2]
|
|
||||||
B.W. Kernighan and D.M. Ritchie, \fIThe C Programming
|
|
||||||
language\fP, Prentice-Hall, 1978
|
|
||||||
.PT [3]
|
|
||||||
D.M. Ritchie, \fIC Reference Manual\fP
|
|
||||||
.sp
|
|
||||||
.PT [4]
|
|
||||||
UNIX manual ack(I).
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
proto.make
|
|
||||||
bo
|
|
||||||
ca
|
|
||||||
cf
|
|
||||||
cj
|
|
||||||
cs
|
|
||||||
ic
|
|
||||||
il
|
|
||||||
intro
|
|
||||||
lv
|
|
||||||
ov
|
|
||||||
ra
|
|
||||||
refs.gen
|
|
||||||
refs.opt
|
|
||||||
refs.stat
|
|
||||||
sp
|
|
||||||
sr
|
|
||||||
ud
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
REFS=-p refs.opt -p refs.stat -p refs.gen
|
|
||||||
INTRO=intro/intro?
|
|
||||||
OV=ov/ov?
|
|
||||||
IC=ic/ic?
|
|
||||||
CF=cf/cf?
|
|
||||||
IL=il/il?
|
|
||||||
SR=sr/sr?
|
|
||||||
CS=cs/cs?
|
|
||||||
SP=sp/sp?
|
|
||||||
UD=ud/ud?
|
|
||||||
LV=lv/lv?
|
|
||||||
CJ=cj/cj?
|
|
||||||
BO=bo/bo?
|
|
||||||
RA=ra/ra?
|
|
||||||
CA=ca/ca?
|
|
||||||
EGO=$(INTRO) $(OV) $(IC) $(CF) $(IL) $(SR) $(CS) $(SP) $(CJ) $(BO) \
|
|
||||||
$(UD) $(LV) $(RA) $(CA)
|
|
||||||
REFER=refer
|
|
||||||
TROFF=troff
|
|
||||||
TBL=tbl
|
|
||||||
TARGET=-Tlp
|
|
||||||
|
|
||||||
../ego.doc: refs.opt refs.stat refs.gen intro/head intro/tail $(EGO)
|
|
||||||
$(REFER) -sA+T -l4,2 $(REFS) intro/head $(EGO) intro/tail | $(TBL) > ../ego.doc
|
|
||||||
|
|
||||||
ego.f: refs.opt refs.stat refs.gen intro/head intro/tail $(EGO)
|
|
||||||
$(REFER) -sA+T -l4,2 $(REFS) intro/head $(EGO) intro/tail | $(TBL) | $(TROFF) $(TARGET) -ms > ego.f
|
|
||||||
intro.f: refs.opt refs.stat refs.gen intro/head intro/tail $(INTRO)
|
|
||||||
$(REFER) -sA+T -l4,2 $(REFS) intro/head $(INTRO) intro/tail | $(TBL) | $(TROFF) $(TARGET) -ms > intro.f
|
|
||||||
ov.f: refs.opt refs.stat refs.gen intro/head intro/tail $(OV)
|
|
||||||
$(REFER) -sA+T -l4,2 $(REFS) intro/head $(OV) intro/tail | $(TBL) | $(TROFF) $(TARGET) -ms > ov.f
|
|
||||||
ic.f: refs.opt refs.stat refs.gen intro/head intro/tail $(IC)
|
|
||||||
$(REFER) -sA+T -l4,2 $(REFS) intro/head $(IC) intro/tail | $(TBL) | $(TROFF) $(TARGET) -ms > ic.f
|
|
||||||
cf.f: refs.opt refs.stat refs.gen intro/head intro/tail $(CF)
|
|
||||||
$(REFER) -sA+T -l4,2 $(REFS) intro/head $(CF) intro/tail | $(TBL) | $(TROFF) $(TARGET) -ms > cf.f
|
|
||||||
il.f: refs.opt refs.stat refs.gen intro/head intro/tail $(IL)
|
|
||||||
$(REFER) -sA+T -l4,2 $(REFS) intro/head $(IL) intro/tail | $(TBL) | $(TROFF) $(TARGET) -ms > il.f
|
|
||||||
sr.f: refs.opt refs.stat refs.gen intro/head intro/tail $(SR)
|
|
||||||
$(REFER) -sA+T -l4,2 $(REFS) intro/head $(SR) intro/tail | $(TBL) | $(TROFF) $(TARGET) -ms > sr.f
|
|
||||||
cs.f: refs.opt refs.stat refs.gen intro/head intro/tail $(CS)
|
|
||||||
$(REFER) -sA+T -l4,2 $(REFS) intro/head $(CS) intro/tail | $(TBL) | $(TROFF) $(TARGET) -ms > cs.f
|
|
||||||
sp.f: refs.opt refs.stat refs.gen intro/head intro/tail $(SP)
|
|
||||||
$(REFER) -sA+T -l4,2 $(REFS) intro/head $(SP) intro/tail | $(TBL) | $(TROFF) $(TARGET) -ms > sp.f
|
|
||||||
cj.f: refs.opt refs.stat refs.gen intro/head intro/tail $(CJ)
|
|
||||||
$(REFER) -sA+T -l4,2 $(REFS) intro/head $(CJ) intro/tail | $(TBL) | $(TROFF) $(TARGET) -ms > cj.f
|
|
||||||
bo.f: refs.opt refs.stat refs.gen intro/head intro/tail $(BO)
|
|
||||||
$(REFER) -sA+T -l4,2 $(REFS) intro/head $(BO) intro/tail | $(TBL) | $(TROFF) $(TARGET) -ms > bo.f
|
|
||||||
ud.f: refs.opt refs.stat refs.gen intro/head intro/tail $(UD)
|
|
||||||
$(REFER) -sA+T -l4,2 $(REFS) intro/head $(UD) intro/tail | $(TBL) | $(TROFF) $(TARGET) -ms > ud.f
|
|
||||||
lv.f: refs.opt refs.stat refs.gen intro/head intro/tail $(LV)
|
|
||||||
$(REFER) -sA+T -l4,2 $(REFS) intro/head $(LV) intro/tail | $(TBL) | $(TROFF) $(TARGET) -ms > lv.f
|
|
||||||
ra.f: refs.opt refs.stat refs.gen intro/head intro/tail $(RA)
|
|
||||||
$(REFER) -sA+T -l4,2 $(REFS) intro/head $(RA) intro/tail | $(TBL) | $(TROFF) $(TARGET) -ms > ra.f
|
|
||||||
ca.f: refs.opt refs.stat refs.gen intro/head intro/tail $(CA)
|
|
||||||
$(REFER) -sA+T -l4,2 $(REFS) intro/head $(CA) intro/tail | $(TBL) | $(TROFF) $(TARGET) -ms > ca.f
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
bo1
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
ca1
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
cf1
|
|
||||||
cf2
|
|
||||||
cf3
|
|
||||||
cf4
|
|
||||||
cf5
|
|
||||||
cf6
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
cj1
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
cs1
|
|
||||||
cs2
|
|
||||||
cs3
|
|
||||||
cs4
|
|
||||||
cs5
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
ic1
|
|
||||||
ic2
|
|
||||||
ic3
|
|
||||||
ic4
|
|
||||||
ic5
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
il1
|
|
||||||
il2
|
|
||||||
il3
|
|
||||||
il4
|
|
||||||
il5
|
|
||||||
il6
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
head
|
|
||||||
intro1
|
|
||||||
tail
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
lv1
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
ov1
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
ra1
|
|
||||||
ra2
|
|
||||||
ra3
|
|
||||||
ra4
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
sp1
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
sr1
|
|
||||||
sr2
|
|
||||||
sr3
|
|
||||||
sr4
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
ud1
|
|
||||||
ud2
|
|
||||||
ud3
|
|
||||||
ud4
|
|
||||||
ud5
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
proto.make
|
|
||||||
READ_ME
|
|
||||||
app.codes.nr
|
|
||||||
app.exam.nr
|
|
||||||
assem.nr
|
|
||||||
cont.nr
|
|
||||||
descr.nr
|
|
||||||
dspace.nr
|
|
||||||
em.i
|
|
||||||
env.nr
|
|
||||||
even.c
|
|
||||||
exam.e
|
|
||||||
exam.p
|
|
||||||
int
|
|
||||||
intro.nr
|
|
||||||
ip.awk
|
|
||||||
ispace.nr
|
|
||||||
mach.nr
|
|
||||||
macr.nr
|
|
||||||
mapping.nr
|
|
||||||
mem.nr
|
|
||||||
title.nr
|
|
||||||
traps.nr
|
|
||||||
types.nr
|
|
||||||
mkdispatch.c
|
|
||||||
dispat1.sed
|
|
||||||
dispat2.sed
|
|
||||||
dispat3.sed
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
HOME=../..
|
|
||||||
|
|
||||||
TBL=tbl
|
|
||||||
NROFF=nroff
|
|
||||||
SUF=pr
|
|
||||||
TARGET=-Tlp
|
|
||||||
|
|
||||||
head: ../em.$(SUF)
|
|
||||||
|
|
||||||
FILES = macr.nr title.nr intro.nr mem.nr ispace.nr dspace.nr mapping.nr \
|
|
||||||
types.nr descr.nr env.nr traps.nr mach.nr assem.nr \
|
|
||||||
app.int.nr app.codes.nr app.exam.nr cont.nr
|
|
||||||
|
|
||||||
IOP=$(HOME)/etc/ip_spec.t# # to construct itables from
|
|
||||||
|
|
||||||
../em.$(SUF): $(FILES) itables dispatdummy em.i Makefile
|
|
||||||
$(TBL) $(FILES) | $(NROFF) -mkun $(TARGET) > ../em.$(SUF)
|
|
||||||
|
|
||||||
app.codes.pr: app.codes.nr itables dispatdummy
|
|
||||||
|
|
||||||
itables: $(IOP) ip.awk
|
|
||||||
awk -f ip.awk $(IOP) | sed 's/-/\\-/g' | $(TBL) >itables
|
|
||||||
|
|
||||||
dispatdummy: $(IOP) mkdispatch
|
|
||||||
mkdispatch < $(IOP) > dispatdummy
|
|
||||||
sed -f dispat1.sed < dispatdummy | $(TBL) > dispat1
|
|
||||||
sed -f dispat2.sed < dispatdummy | $(TBL) > dispat2
|
|
||||||
sed -f dispat3.sed < dispatdummy | $(TBL) > dispat3
|
|
||||||
|
|
||||||
mkdispatch: mkdispatch.c
|
|
||||||
$(CC) -I$(HOME)/h -o mkdispatch mkdispatch.c $(HOME)/lib.bin/em_data.a
|
|
||||||
|
|
||||||
.SUFFIXES : .pr .nr
|
|
||||||
.nr.pr: ; $(TBL) macr.nr $*.nr | $(NROFF) -mkun >$@
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.pr itables *.out dispatdummy dispat? *.o mkdispatch
|
|
||||||
1122
doc/em/addend.n
1122
doc/em/addend.n
File diff suppressed because it is too large
Load Diff
@@ -1,11 +0,0 @@
|
|||||||
.BP
|
|
||||||
.AP "EM INTERPRETER"
|
|
||||||
.nf
|
|
||||||
.ft CW
|
|
||||||
.lg 0
|
|
||||||
.nr x \w' '
|
|
||||||
.ta \nxu +\nxu +\nxu +\nxu +\nxu +\nxu +\nxu +\nxu +\nxu +\nxu
|
|
||||||
.so em.i
|
|
||||||
.ft P
|
|
||||||
.lg 1
|
|
||||||
.fi
|
|
||||||
488
doc/em/app.nr
488
doc/em/app.nr
@@ -1,488 +0,0 @@
|
|||||||
.BP
|
|
||||||
.AP "EM INTERPRETER"
|
|
||||||
.nf
|
|
||||||
.ta 8 16 24 32 40 48 56 64 72 80
|
|
||||||
.so em.i
|
|
||||||
.fi
|
|
||||||
.BP
|
|
||||||
.AP "EM CODE TABLES"
|
|
||||||
The following table is used by the assembler for EM machine
|
|
||||||
language.
|
|
||||||
It specifies the opcodes used for each instruction and
|
|
||||||
how arguments are mapped to machine language arguments.
|
|
||||||
The table is presented in three columns,
|
|
||||||
each line in each column contains three or four fields.
|
|
||||||
Each line describes a range of interpreter opcodes by
|
|
||||||
specifying for which instruction the range is used, the type of the
|
|
||||||
opcodes (mini, shortie, etc..) and range for the instruction
|
|
||||||
argument.
|
|
||||||
.A
|
|
||||||
The first field on each line gives the EM instruction mnemonic,
|
|
||||||
the second field gives some flags.
|
|
||||||
If the opcodes are minis or shorties the third field specifies
|
|
||||||
how many minis/shorties are used.
|
|
||||||
The last field gives the number of the (first) interpreter
|
|
||||||
opcode.
|
|
||||||
.N 1
|
|
||||||
Flags :
|
|
||||||
.IS 3
|
|
||||||
.N 1
|
|
||||||
Opcode type, only one of the following may be specified.
|
|
||||||
.PS - 5 " "
|
|
||||||
.PT -
|
|
||||||
opcode without argument
|
|
||||||
.PT m
|
|
||||||
mini
|
|
||||||
.PT s
|
|
||||||
shortie
|
|
||||||
.PT 2
|
|
||||||
opcode with 2-byte signed argument
|
|
||||||
.PT 4
|
|
||||||
opcode with 4-byte signed argument
|
|
||||||
.PT 8
|
|
||||||
opcode with 8-byte signed argument
|
|
||||||
.PE
|
|
||||||
Secondary (escaped) opcodes.
|
|
||||||
.PS - 5 " "
|
|
||||||
.PT e
|
|
||||||
The opcode thus marked is in the secondary opcode group instead
|
|
||||||
of the primary
|
|
||||||
.PE
|
|
||||||
restrictions on arguments
|
|
||||||
.PS - 5 " "
|
|
||||||
.PT N
|
|
||||||
Negative arguments only
|
|
||||||
.PT P
|
|
||||||
Positive and zero arguments only
|
|
||||||
.PE
|
|
||||||
mapping of arguments
|
|
||||||
.PS - 5 " "
|
|
||||||
.PT w
|
|
||||||
argument must be divisible by the wordsize and is divided by the
|
|
||||||
wordsize before use as opcode argument.
|
|
||||||
.PT o
|
|
||||||
argument ( possibly after division ) must be >= 1 and is
|
|
||||||
decremented before use as opcode argument
|
|
||||||
.PE
|
|
||||||
.IE
|
|
||||||
If the opcode type is 2,4 or 8 the resulting argument is used as
|
|
||||||
opcode argument (least significant byte first).
|
|
||||||
.N
|
|
||||||
If the opcode type is mini, the argument is added
|
|
||||||
to the first opcode - if in range - .
|
|
||||||
If the argument is negative, the absolute value minus one is
|
|
||||||
used in the algorithm above.
|
|
||||||
.N
|
|
||||||
For shorties with positive arguments the first opcode is used
|
|
||||||
for arguments in the range 0..255, the second for the range
|
|
||||||
256..511, etc..
|
|
||||||
For shorties with negative arguments the first opcode is used
|
|
||||||
for arguments in the range -1..-256, the second for the range
|
|
||||||
-257..-512, etc..
|
|
||||||
The byte following the opcode contains the least significant
|
|
||||||
byte of the argument.
|
|
||||||
First some examples of these specifications.
|
|
||||||
.PS - 5
|
|
||||||
.PT "aar mwPo 1 34"
|
|
||||||
Indicates that opcode 34 is used as a mini for Positive
|
|
||||||
instruction arguments only.
|
|
||||||
The w and o indicate division and decrementing of the
|
|
||||||
instruction argument.
|
|
||||||
Because the resulting argument must be zero ( only opcode 34 may be used
|
|
||||||
), this mini can only be used for instruction argument 2.
|
|
||||||
Conclusion: opcode 34 is for "AAR 2".
|
|
||||||
.PT "adp sP 1 41"
|
|
||||||
Opcode 41 is used as shortie for ADP with arguments in the range
|
|
||||||
0..255.
|
|
||||||
.PT "bra sN 2 60"
|
|
||||||
Opcode 60 is used as shortie for BRA with arguments -1..-256,
|
|
||||||
61 is used for arguments -257..-512.
|
|
||||||
.PT "zer e- 145"
|
|
||||||
Escaped opcode 145 is used for ZER.
|
|
||||||
.PE
|
|
||||||
The interpreter opcode table:
|
|
||||||
.N 1
|
|
||||||
.IS 3
|
|
||||||
.DS B
|
|
||||||
.so itables
|
|
||||||
.DE 0
|
|
||||||
.IE
|
|
||||||
.P
|
|
||||||
The table above results in the following dispatch tables.
|
|
||||||
Dispatch tables are used by interpreters to jump to the
|
|
||||||
routines implementing the EM instructions, indexed by the next opcode.
|
|
||||||
Each line of the dispatch tables gives the routine names
|
|
||||||
of eight consecutive opcodes, preceded by the first opcode number
|
|
||||||
on that line.
|
|
||||||
Routine names consist of an EM mnemonic followed by a suffix.
|
|
||||||
The suffices show the encoding used for each opcode.
|
|
||||||
.N
|
|
||||||
The following suffices exist:
|
|
||||||
.N 1
|
|
||||||
.VS 1 0
|
|
||||||
.IS 4
|
|
||||||
.PS - 11
|
|
||||||
.PT .z
|
|
||||||
no arguments
|
|
||||||
.PT .l
|
|
||||||
16-bit argument
|
|
||||||
.PT .lw
|
|
||||||
16-bit argument divided by the wordsize
|
|
||||||
.PT .p
|
|
||||||
positive 16-bit argument
|
|
||||||
.PT .pw
|
|
||||||
positive 16-bit argument divided by the wordsize
|
|
||||||
.PT .n
|
|
||||||
negative 16-bit argument
|
|
||||||
.PT .nw
|
|
||||||
negative 16-bit argument divided by the wordsize
|
|
||||||
.PT .s<num>
|
|
||||||
shortie with <num> as high order argument byte
|
|
||||||
.PT .sw<num>
|
|
||||||
shortie with argument divided by the wordsize
|
|
||||||
.PT .<num>
|
|
||||||
mini with <num> as argument
|
|
||||||
.PT .<num>W
|
|
||||||
mini with <num>*wordsize as argument
|
|
||||||
.PE 3
|
|
||||||
<num> is a possibly negative integer.
|
|
||||||
.VS 1 1
|
|
||||||
.IE
|
|
||||||
The dispatch table for the 256 primary opcodes:
|
|
||||||
.DS B
|
|
||||||
0 loc.0 loc.1 loc.2 loc.3 loc.4 loc.5 loc.6 loc.7
|
|
||||||
8 loc.8 loc.9 loc.10 loc.11 loc.12 loc.13 loc.14 loc.15
|
|
||||||
16 loc.16 loc.17 loc.18 loc.19 loc.20 loc.21 loc.22 loc.23
|
|
||||||
24 loc.24 loc.25 loc.26 loc.27 loc.28 loc.29 loc.30 loc.31
|
|
||||||
32 loc.32 loc.33 aar.1W adf.s0 adi.1W adi.2W adp.l adp.1
|
|
||||||
40 adp.2 adp.s0 adp.s-1 ads.1W and.1W asp.1W asp.2W asp.3W
|
|
||||||
48 asp.4W asp.5W asp.w0 beq.l beq.s0 bge.s0 bgt.s0 ble.s0
|
|
||||||
56 blm.s0 blt.s0 bne.s0 bra.l bra.s-1 bra.s-2 bra.s0 bra.s1
|
|
||||||
64 cal.1 cal.2 cal.3 cal.4 cal.5 cal.6 cal.7 cal.8
|
|
||||||
72 cal.9 cal.10 cal.11 cal.12 cal.13 cal.14 cal.15 cal.16
|
|
||||||
80 cal.17 cal.18 cal.19 cal.20 cal.21 cal.22 cal.23 cal.24
|
|
||||||
88 cal.25 cal.26 cal.27 cal.28 cal.s0 cff.z cif.z cii.z
|
|
||||||
96 cmf.s0 cmi.1W cmi.2W cmp.z cms.s0 csa.1W csb.1W dec.z
|
|
||||||
104 dee.w0 del.w-1 dup.1W dvf.s0 dvi.1W fil.l inc.z ine.lw
|
|
||||||
112 ine.w0 inl.-1W inl.-2W inl.-3W inl.w-1 inn.s0 ior.1W ior.s0
|
|
||||||
120 lae.l lae.w0 lae.w1 lae.w2 lae.w3 lae.w4 lae.w5 lae.w6
|
|
||||||
128 lal.p lal.n lal.0 lal.-1 lal.w0 lal.w-1 lal.w-2 lar.W
|
|
||||||
136 ldc.0 lde.lw lde.w0 ldl.0 ldl.w-1 lfr.1W lfr.2W lfr.s0
|
|
||||||
144 lil.w-1 lil.w0 lil.0 lil.1W lin.l lin.s0 lni.z loc.l
|
|
||||||
152 loc.-1 loc.s0 loc.s-1 loe.lw loe.w0 loe.w1 loe.w2 loe.w3
|
|
||||||
160 loe.w4 lof.l lof.1W lof.2W lof.3W lof.4W lof.s0 loi.l
|
|
||||||
168 loi.1 loi.1W loi.2W loi.3W loi.4W loi.s0 lol.pw lol.nw
|
|
||||||
176 lol.0 lol.1W lol.2W lol.3W lol.-1W lol.-2W lol.-3W lol.-4W
|
|
||||||
184 lol.-5W lol.-6W lol.-7W lol.-8W lol.w0 lol.w-1 lxa.1 lxl.1
|
|
||||||
192 lxl.2 mlf.s0 mli.1W mli.2W rck.1W ret.0 ret.1W ret.s0
|
|
||||||
200 rmi.1W sar.1W sbf.s0 sbi.1W sbi.2W sdl.w-1 set.s0 sil.w-1
|
|
||||||
208 sil.w0 sli.1W ste.lw ste.w0 ste.w1 ste.w2 stf.l stf.W
|
|
||||||
216 stf.2W stf.s0 sti.1 sti.1W sti.2W sti.3W sti.4W sti.s0
|
|
||||||
224 stl.pw stl.nw stl.0 stl.1W stl.-1W stl.-2W stl.-3W stl.-4W
|
|
||||||
232 stl.-5W stl.w-1 teq.z tgt.z tlt.z tne.z zeq.l zeq.s0
|
|
||||||
240 zeq.s1 zer.s0 zge.s0 zgt.s0 zle.s0 zlt.s0 zne.s0 zne.s-1
|
|
||||||
248 zre.lw zre.w0 zrl.-1W zrl.-2W zrl.w-1 zrl.nw escape1 escape2
|
|
||||||
.DE 2
|
|
||||||
The list of secondary opcodes (escape1):
|
|
||||||
.N 1
|
|
||||||
.DS B
|
|
||||||
0 aar.l aar.z adf.l adf.z adi.l adi.z ads.l ads.z
|
|
||||||
8 adu.l adu.z and.l and.z asp.lw ass.l ass.z bge.l
|
|
||||||
16 bgt.l ble.l blm.l bls.l bls.z blt.l bne.l cai.z
|
|
||||||
24 cal.l cfi.z cfu.z ciu.z cmf.l cmf.z cmi.l cmi.z
|
|
||||||
32 cms.l cms.z cmu.l cmu.z com.l com.z csa.l csa.z
|
|
||||||
40 csb.l csb.z cuf.z cui.z cuu.z dee.lw del.pw del.nw
|
|
||||||
48 dup.l dus.l dus.z dvf.l dvf.z dvi.l dvi.z dvu.l
|
|
||||||
56 dvu.z fef.l fef.z fif.l fif.z inl.pw inl.nw inn.l
|
|
||||||
64 inn.z ior.l ior.z lar.l lar.z ldc.l ldf.l ldl.pw
|
|
||||||
72 ldl.nw lfr.l lil.pw lil.nw lim.z los.l los.z lor.s0
|
|
||||||
80 lpi.l lxa.l lxl.l mlf.l mlf.z mli.l mli.z mlu.l
|
|
||||||
88 mlu.z mon.z ngf.l ngf.z ngi.l ngi.z nop.z rck.l
|
|
||||||
96 rck.z ret.l rmi.l rmi.z rmu.l rmu.z rol.l rol.z
|
|
||||||
104 ror.l ror.z rtt.z sar.l sar.z sbf.l sbf.z sbi.l
|
|
||||||
112 sbi.z sbs.l sbs.z sbu.l sbu.z sde.l sdf.l sdl.pw
|
|
||||||
120 sdl.nw set.l set.z sig.z sil.pw sil.nw sim.z sli.l
|
|
||||||
128 sli.z slu.l slu.z sri.l sri.z sru.l sru.z sti.l
|
|
||||||
136 sts.l sts.z str.s0 tge.z tle.z trp.z xor.l xor.z
|
|
||||||
144 zer.l zer.z zge.l zgt.l zle.l zlt.l zne.l zrf.l
|
|
||||||
152 zrf.z zrl.pw dch.z exg.s0 exg.l exg.z lpb.z gto.l
|
|
||||||
.DE 2
|
|
||||||
Finally, the list of opcodes with four byte arguments (escape2).
|
|
||||||
.DS
|
|
||||||
|
|
||||||
0 loc
|
|
||||||
.DE 0
|
|
||||||
.BP
|
|
||||||
.AP "AN EXAMPLE PROGRAM"
|
|
||||||
.DS B
|
|
||||||
1 program example(output);
|
|
||||||
2 {This program just demonstrates typical EM code.}
|
|
||||||
3 type rec = record r1: integer; r2:real; r3: boolean end;
|
|
||||||
4 var mi: integer; mx:real; r:rec;
|
|
||||||
5
|
|
||||||
6 function sum(a,b:integer):integer;
|
|
||||||
7 begin
|
|
||||||
8 sum := a + b
|
|
||||||
9 end;
|
|
||||||
10
|
|
||||||
11 procedure test(var r: rec);
|
|
||||||
12 label 1;
|
|
||||||
13 var i,j: integer;
|
|
||||||
14 x,y: real;
|
|
||||||
15 b: boolean;
|
|
||||||
16 c: char;
|
|
||||||
17 a: array[1..100] of integer;
|
|
||||||
18
|
|
||||||
19 begin
|
|
||||||
20 j := 1;
|
|
||||||
21 i := 3 * j + 6;
|
|
||||||
22 x := 4.8;
|
|
||||||
23 y := x/0.5;
|
|
||||||
24 b := true;
|
|
||||||
25 c := 'z';
|
|
||||||
26 for i:= 1 to 100 do a[i] := i * i;
|
|
||||||
27 r.r1 := j+27;
|
|
||||||
28 r.r3 := b;
|
|
||||||
29 r.r2 := x+y;
|
|
||||||
30 i := sum(r.r1, a[j]);
|
|
||||||
31 while i > 0 do begin j := j + r.r1; i := i - 1 end;
|
|
||||||
32 with r do begin r3 := b; r2 := x+y; r1 := 0 end;
|
|
||||||
33 goto 1;
|
|
||||||
34 1: writeln(j, i:6, x:9:3, b)
|
|
||||||
35 end; {test}
|
|
||||||
36 begin {main program}
|
|
||||||
37 mx := 15.96;
|
|
||||||
38 mi := 99;
|
|
||||||
39 test(r)
|
|
||||||
40 end.
|
|
||||||
.DE 0
|
|
||||||
.BP
|
|
||||||
The EM code as produced by the Pascal-VU compiler is given below. Comments
|
|
||||||
have been added manually. Note that this code has already been optimized.
|
|
||||||
.DS B
|
|
||||||
mes 2,2,2 ; wordsize 2, pointersize 2
|
|
||||||
.1
|
|
||||||
rom 't.p\e000' ; the name of the source file
|
|
||||||
hol 552,-32768,0 ; externals and buf occupy 552 bytes
|
|
||||||
exp $sum ; sum can be called from other modules
|
|
||||||
pro $sum,2 ; procedure sum; 2 bytes local storage
|
|
||||||
lin 8 ; code from source line 8
|
|
||||||
ldl 0 ; load two locals ( a and b )
|
|
||||||
adi 2 ; add them
|
|
||||||
ret 2 ; return the result
|
|
||||||
end 2 ; end of procedure ( still two bytes local storage )
|
|
||||||
.2
|
|
||||||
rom 1,99,2 ; descriptor of array a[]
|
|
||||||
exp $test ; the compiler exports all level 0 procedures
|
|
||||||
pro $test,226 ; procedure test, 226 bytes local storage
|
|
||||||
.3
|
|
||||||
rom 4.8F8 ; assemble Floating point 4.8 (8 bytes) in
|
|
||||||
.4 ; global storage
|
|
||||||
rom 0.5F8 ; same for 0.5
|
|
||||||
mes 3,-226,2,2 ; compiler temporary not referenced by address
|
|
||||||
mes 3,-24,2,0 ; the same is true for i, j, b and c in test
|
|
||||||
mes 3,-22,2,0
|
|
||||||
mes 3,-4,2,0
|
|
||||||
mes 3,-2,2,0
|
|
||||||
mes 3,-20,8,0 ; and for x and y
|
|
||||||
mes 3,-12,8,0
|
|
||||||
lin 20 ; maintain source line number
|
|
||||||
loc 1
|
|
||||||
stl -4 ; j := 1
|
|
||||||
lni ; lin 21 prior to optimization
|
|
||||||
lol -4
|
|
||||||
loc 3
|
|
||||||
mli 2
|
|
||||||
loc 6
|
|
||||||
adi 2
|
|
||||||
stl -2 ; i := 3 * j + 6
|
|
||||||
lni ; lin 22 prior to optimization
|
|
||||||
lae .3
|
|
||||||
loi 8
|
|
||||||
lal -12
|
|
||||||
sti 8 ; x := 4.8
|
|
||||||
lni ; lin 23 prior to optimization
|
|
||||||
lal -12
|
|
||||||
loi 8
|
|
||||||
lae .4
|
|
||||||
loi 8
|
|
||||||
dvf 8
|
|
||||||
lal -20
|
|
||||||
sti 8 ; y := x / 0.5
|
|
||||||
lni ; lin 24 prior to optimization
|
|
||||||
loc 1
|
|
||||||
stl -22 ; b := true
|
|
||||||
lni ; lin 25 prior to optimization
|
|
||||||
loc 122
|
|
||||||
stl -24 ; c := 'z'
|
|
||||||
lni ; lin 26 prior to optimization
|
|
||||||
loc 1
|
|
||||||
stl -2 ; for i:= 1
|
|
||||||
2
|
|
||||||
lol -2
|
|
||||||
dup 2
|
|
||||||
mli 2 ; i*i
|
|
||||||
lal -224
|
|
||||||
lol -2
|
|
||||||
lae .2
|
|
||||||
sar 2 ; a[i] :=
|
|
||||||
lol -2
|
|
||||||
loc 100
|
|
||||||
beq *3 ; to 100 do
|
|
||||||
inl -2 ; increment i and loop
|
|
||||||
bra *2
|
|
||||||
3
|
|
||||||
lin 27
|
|
||||||
lol -4
|
|
||||||
loc 27
|
|
||||||
adi 2 ; j + 27
|
|
||||||
sil 0 ; r.r1 :=
|
|
||||||
lni ; lin 28 prior to optimization
|
|
||||||
lol -22 ; b
|
|
||||||
lol 0
|
|
||||||
stf 10 ; r.r3 :=
|
|
||||||
lni ; lin 29 prior to optimization
|
|
||||||
lal -20
|
|
||||||
loi 16
|
|
||||||
adf 8 ; x + y
|
|
||||||
lol 0
|
|
||||||
adp 2
|
|
||||||
sti 8 ; r.r2 :=
|
|
||||||
lni ; lin 23 prior to optimization
|
|
||||||
lal -224
|
|
||||||
lol -4
|
|
||||||
lae .2
|
|
||||||
lar 2 ; a[j]
|
|
||||||
lil 0 ; r.r1
|
|
||||||
cal $sum ; call now
|
|
||||||
asp 4 ; remove parameters from stack
|
|
||||||
lfr 2 ; get function result
|
|
||||||
stl -2 ; i :=
|
|
||||||
4
|
|
||||||
lin 31
|
|
||||||
lol -2
|
|
||||||
zle *5 ; while i > 0 do
|
|
||||||
lol -4
|
|
||||||
lil 0
|
|
||||||
adi 2
|
|
||||||
stl -4 ; j := j + r.r1
|
|
||||||
del -2 ; i := i - 1
|
|
||||||
bra *4 ; loop
|
|
||||||
5
|
|
||||||
lin 32
|
|
||||||
lol 0
|
|
||||||
stl -226 ; make copy of address of r
|
|
||||||
lol -22
|
|
||||||
lol -226
|
|
||||||
stf 10 ; r3 := b
|
|
||||||
lal -20
|
|
||||||
loi 16
|
|
||||||
adf 8
|
|
||||||
lol -226
|
|
||||||
adp 2
|
|
||||||
sti 8 ; r2 := x + y
|
|
||||||
loc 0
|
|
||||||
sil -226 ; r1 := 0
|
|
||||||
lin 34 ; note the abscence of the unnecesary jump
|
|
||||||
lae 22 ; address of output structure
|
|
||||||
lol -4
|
|
||||||
cal $_wri ; write integer with default width
|
|
||||||
asp 4 ; pop parameters
|
|
||||||
lae 22
|
|
||||||
lol -2
|
|
||||||
loc 6
|
|
||||||
cal $_wsi ; write integer width 6
|
|
||||||
asp 6
|
|
||||||
lae 22
|
|
||||||
lal -12
|
|
||||||
loi 8
|
|
||||||
loc 9
|
|
||||||
loc 3
|
|
||||||
cal $_wrf ; write fixed format real, width 9, precision 3
|
|
||||||
asp 14
|
|
||||||
lae 22
|
|
||||||
lol -22
|
|
||||||
cal $_wrb ; write boolean, default width
|
|
||||||
asp 4
|
|
||||||
lae 22
|
|
||||||
cal $_wln ; writeln
|
|
||||||
asp 2
|
|
||||||
ret 0 ; return, no result
|
|
||||||
end 226
|
|
||||||
exp $_main
|
|
||||||
pro $_main,0 ; main program
|
|
||||||
.6
|
|
||||||
con 2,-1,22 ; description of external files
|
|
||||||
.5
|
|
||||||
rom 15.96F8
|
|
||||||
fil .1 ; maintain source file name
|
|
||||||
lae .6 ; description of external files
|
|
||||||
lae 0 ; base of hol area to relocate buffer addresses
|
|
||||||
cal $_ini ; initialize files, etc...
|
|
||||||
asp 4
|
|
||||||
lin 37
|
|
||||||
lae .5
|
|
||||||
loi 8
|
|
||||||
lae 2
|
|
||||||
sti 8 ; mx := 15.96
|
|
||||||
lni ; lin 38 prior to optimization
|
|
||||||
loc 99
|
|
||||||
ste 0 ; mi := 99
|
|
||||||
lni ; lin 39 prior to optimization
|
|
||||||
lae 10 ; address of r
|
|
||||||
cal $test
|
|
||||||
asp 2
|
|
||||||
loc 0 ; normal exit
|
|
||||||
cal $_hlt ; cleanup and finish
|
|
||||||
asp 2
|
|
||||||
end 0
|
|
||||||
mes 5 ; reals were used
|
|
||||||
.DE 0
|
|
||||||
The compact code corresponding to the above program is listed below.
|
|
||||||
Read it horizontally, line by line, not column by column.
|
|
||||||
Each number represents a byte of compact code, printed in decimal.
|
|
||||||
The first two bytes form the magic word.
|
|
||||||
.N 1
|
|
||||||
.IS 3
|
|
||||||
.DS B
|
|
||||||
173 0 159 122 122 122 255 242 1 161 250 124 116 46 112 0
|
|
||||||
255 156 245 40 2 245 0 128 120 155 249 123 115 117 109 160
|
|
||||||
249 123 115 117 109 122 67 128 63 120 3 122 88 122 152 122
|
|
||||||
242 2 161 121 219 122 255 155 249 124 116 101 115 116 160 249
|
|
||||||
124 116 101 115 116 245 226 0 242 3 161 253 128 123 52 46
|
|
||||||
56 255 242 4 161 253 128 123 48 46 53 255 159 123 245 30
|
|
||||||
255 122 122 255 159 123 96 122 120 255 159 123 98 122 120 255
|
|
||||||
159 123 116 122 120 255 159 123 118 122 120 255 159 123 100 128
|
|
||||||
120 255 159 123 108 128 120 255 67 140 69 121 113 116 68 73
|
|
||||||
116 69 123 81 122 69 126 3 122 113 118 68 57 242 3 72
|
|
||||||
128 58 108 112 128 68 58 108 72 128 57 242 4 72 128 44
|
|
||||||
128 58 100 112 128 68 69 121 113 98 68 69 245 122 0 113
|
|
||||||
96 68 69 121 113 118 182 73 118 42 122 81 122 58 245 32
|
|
||||||
255 73 118 57 242 2 94 122 73 118 69 220 10 123 54 118
|
|
||||||
18 122 183 67 147 73 116 69 147 3 122 104 120 68 73 98
|
|
||||||
73 120 111 130 68 58 100 72 136 2 128 73 120 4 122 112
|
|
||||||
128 68 58 245 32 255 73 116 57 242 2 59 122 65 120 20
|
|
||||||
249 123 115 117 109 8 124 64 122 113 118 184 67 151 73 118
|
|
||||||
128 125 73 116 65 120 3 122 113 116 41 118 18 124 185 67
|
|
||||||
152 73 120 113 245 30 255 73 98 73 245 30 255 111 130 58
|
|
||||||
100 72 136 2 128 73 245 30 255 4 122 112 128 69 120 104
|
|
||||||
245 30 255 67 154 57 142 73 116 20 249 124 95 119 114 105
|
|
||||||
8 124 57 142 73 118 69 126 20 249 124 95 119 115 105 8
|
|
||||||
126 57 142 58 108 72 128 69 129 69 123 20 249 124 95 119
|
|
||||||
114 102 8 134 57 142 73 98 20 249 124 95 119 114 98 8
|
|
||||||
124 57 142 20 249 124 95 119 108 110 8 122 88 120 152 245
|
|
||||||
226 0 155 249 125 95 109 97 105 110 160 249 125 95 109 97
|
|
||||||
105 110 120 242 6 151 122 119 142 255 242 5 161 253 128 125
|
|
||||||
49 53 46 57 54 255 50 242 1 57 242 6 57 120 20 249
|
|
||||||
124 95 105 110 105 8 124 67 157 57 242 5 72 128 57 122
|
|
||||||
112 128 68 69 219 110 120 68 57 130 20 249 124 116 101 115
|
|
||||||
116 8 122 69 120 20 249 124 95 104 108 116 8 122 152 120
|
|
||||||
159 124 160 255 159 125 255
|
|
||||||
.DE 0
|
|
||||||
.IE
|
|
||||||
.MS T A 0
|
|
||||||
.ME
|
|
||||||
.BP
|
|
||||||
.MS B A 0
|
|
||||||
.ME
|
|
||||||
.CT
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
proto.make
|
|
||||||
READ_ME
|
|
||||||
em.p
|
|
||||||
emdmp.c
|
|
||||||
mktables.c
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
CFLAGS=-O
|
|
||||||
HOME=../../..
|
|
||||||
|
|
||||||
install \
|
|
||||||
all: em emdmp tables
|
|
||||||
|
|
||||||
tables: mktables $(HOME)/etc/ip_spec.t
|
|
||||||
mktables $(HOME)/etc/ip_spec.t tables
|
|
||||||
|
|
||||||
mktables: mktables.c $(HOME)/h/em_spec.h $(HOME)/h/em_flag.h \
|
|
||||||
$(HOME)/lib.bin/em_data.a $(HOME)/h/ip_spec.h
|
|
||||||
$(CC) -I$(HOME)/h -O -o mktables mktables.c $(HOME)/lib.bin/em_data.a
|
|
||||||
|
|
||||||
em.out: em.p
|
|
||||||
apc -mint -O em.p >emerrs ; mv e.out em.out
|
|
||||||
|
|
||||||
em: em.p
|
|
||||||
apc -O -i em.p >emerrs ; mv a.out em
|
|
||||||
|
|
||||||
nem.p: em.p
|
|
||||||
sed -e '/maxadr = t16/s//maxadr =t15/' -e '/maxdata = 8191; /s//maxdata = 14335;/' -e '/ adr=.*long/s// adr= 0..maxadr/' <em.p >nem.p
|
|
||||||
|
|
||||||
nem: nem.p
|
|
||||||
apc -O -i nem.p >emerrs ; mv a.out nem
|
|
||||||
|
|
||||||
emdmp: emdmp.c
|
|
||||||
$(CC) -I$(HOME)/h -I$(HOME)/config -o emdmp -O emdmp.c
|
|
||||||
|
|
||||||
cmp:
|
|
||||||
|
|
||||||
pr:
|
|
||||||
@pr em.p mktables.c emdmp.c
|
|
||||||
@@ -10,10 +10,10 @@ all: em emdmp tables
|
|||||||
tables: mktables $(SRC_HOME)/etc/ip_spec.t
|
tables: mktables $(SRC_HOME)/etc/ip_spec.t
|
||||||
mktables $(SRC_HOME)/etc/ip_spec.t tables
|
mktables $(SRC_HOME)/etc/ip_spec.t tables
|
||||||
|
|
||||||
mktables: mktables.c $(TARGET_HOME)/h/em_spec.h \
|
mktables: $(SRC_DIR)/mktables.c $(TARGET_HOME)/h/em_spec.h \
|
||||||
$(TARGET_HOME)/h/em_flag.h \
|
$(TARGET_HOME)/h/em_flag.h \
|
||||||
$(TARGET_HOME)/lib.bin/em_data.$(LIBSUF) $(TARGET_HOME)/h/ip_spec.h
|
$(TARGET_HOME)/lib.bin/em_data.$(LIBSUF) $(TARGET_HOME)/h/ip_spec.h
|
||||||
$(CC) -I$(TARGET_HOME)/h -O -o mktables mktables.c $(TARGET_HOME)/lib.bin/em_data.$(LIBSUF)
|
$(CC) -I$(TARGET_HOME)/h -O -o mktables $(SRC_DIR)/mktables.c $(TARGET_HOME)/lib.bin/em_data.$(LIBSUF)
|
||||||
|
|
||||||
em: $(SRC_DIR)/em.p
|
em: $(SRC_DIR)/em.p
|
||||||
apc -O $(SRC_DIR)/em.p >emerrs ; mv a.out em
|
apc -O $(SRC_DIR)/em.p >emerrs ; mv a.out em
|
||||||
|
|||||||
376
doc/em/iotrap.nr
376
doc/em/iotrap.nr
@@ -1,376 +0,0 @@
|
|||||||
.SN 8
|
|
||||||
.VS 1 0
|
|
||||||
.BP
|
|
||||||
.S1 "ENVIRONMENT INTERACTIONS"
|
|
||||||
EM programs can interact with their environment in three ways.
|
|
||||||
Two, starting/stopping and monitor calls, are dealt with in this chapter.
|
|
||||||
The remaining way to interact, interrupts, will be treated
|
|
||||||
together with traps in chapter 9.
|
|
||||||
.S2 "Program starting and stopping"
|
|
||||||
EM user programs start with a call to a procedure called
|
|
||||||
m_a_i_n.
|
|
||||||
The assembler and backends look for the definition of a procedure
|
|
||||||
with this name in their input.
|
|
||||||
The call passes three parameters to the procedure.
|
|
||||||
The parameters are similar to the parameters supplied by the
|
|
||||||
UNIX
|
|
||||||
.FS
|
|
||||||
UNIX is a Trademark of Bell Laboratories.
|
|
||||||
.FE
|
|
||||||
operating system to C programs.
|
|
||||||
These parameters are often called
|
|
||||||
.BW argc ,
|
|
||||||
.B argv
|
|
||||||
and
|
|
||||||
.BW envp .
|
|
||||||
Argc is the parameter nearest to LB and is a wordsized integer.
|
|
||||||
The other two are pointers to the first element of an array of
|
|
||||||
string pointers.
|
|
||||||
.N
|
|
||||||
The
|
|
||||||
.B argv
|
|
||||||
array contains
|
|
||||||
.B argc
|
|
||||||
strings, the first of which contains the program call name.
|
|
||||||
The other strings in the
|
|
||||||
.B argv
|
|
||||||
array are the program parameters.
|
|
||||||
.P
|
|
||||||
The
|
|
||||||
.B envp
|
|
||||||
array contains strings in the form "name=string", where 'name'
|
|
||||||
is the name of an environment variable and string its value.
|
|
||||||
The
|
|
||||||
.B envp
|
|
||||||
is terminated by a zero pointer.
|
|
||||||
.P
|
|
||||||
An EM user program stops if the program returns from the first
|
|
||||||
invocation of m_a_i_n.
|
|
||||||
The contents of the function return area are used to procure a
|
|
||||||
wordsized program return code.
|
|
||||||
EM programs also stop when traps and interrupts occur that are
|
|
||||||
not caught and when the exit monitor call is executed.
|
|
||||||
.S2 "Input/Output and other monitor calls"
|
|
||||||
EM differs from most conventional machines in that it has high level i/o
|
|
||||||
instructions.
|
|
||||||
Typical instructions are OPEN FILE and READ FROM FILE instead
|
|
||||||
of low level instructions such as setting and clearing
|
|
||||||
bits in device registers.
|
|
||||||
By providing such high level i/o primitives, the task of implementing
|
|
||||||
EM on various non EM machines is made considerably easier.
|
|
||||||
.P
|
|
||||||
I/O is initiated by the MON instruction, which expects an iocode on top
|
|
||||||
of the stack.
|
|
||||||
Often there are also parameters which are pushed on the
|
|
||||||
stack in reverse order, that is: last
|
|
||||||
parameter first.
|
|
||||||
Some i/o functions also provide results, which are returned on the stack.
|
|
||||||
In the list of monitor calls we use several types of parameters and results,
|
|
||||||
these types consist of integers and unsigneds of varying sizes, but never
|
|
||||||
smaller than the wordsize, and the two pointer types.
|
|
||||||
.N 1
|
|
||||||
The names of the types used are:
|
|
||||||
.IS 4
|
|
||||||
.PS - 10
|
|
||||||
.PT int
|
|
||||||
an integer of wordsize
|
|
||||||
.PT int2
|
|
||||||
an integer whose size is the maximum of the wordsize and 2
|
|
||||||
bytes
|
|
||||||
.PT int4
|
|
||||||
an integer whose size is the maximum of the wordsize and 4
|
|
||||||
bytes
|
|
||||||
.PT intp
|
|
||||||
an integer with the size of a pointer
|
|
||||||
.PT uns2
|
|
||||||
an unsigned integer whose size is the maximum of the wordsize and 2
|
|
||||||
.PT unsp
|
|
||||||
an unsigned integer with the size of a pointer
|
|
||||||
.PT ptr
|
|
||||||
a pointer into data space
|
|
||||||
.PE 1
|
|
||||||
.IE 0
|
|
||||||
The table below lists the i/o codes with their results and
|
|
||||||
parameters.
|
|
||||||
This list is similar to the system calls of the UNIX Version 7
|
|
||||||
operating system.
|
|
||||||
.BP
|
|
||||||
.A
|
|
||||||
To execute a monitor call, proceed as follows:
|
|
||||||
.IS 2
|
|
||||||
.N 1
|
|
||||||
.PS a 4 "" )
|
|
||||||
.PT
|
|
||||||
Stack the parameters, in reverse order, last parameter first.
|
|
||||||
.PT
|
|
||||||
Push the monitor call number (iocode) onto the stack.
|
|
||||||
.PT
|
|
||||||
Execute the MON instruction.
|
|
||||||
.PE 1
|
|
||||||
.IE
|
|
||||||
An error code is present on the top of the stack after
|
|
||||||
execution of most monitor calls.
|
|
||||||
If this error code is zero, the call performed the action
|
|
||||||
requested and the results are available on top of the stack.
|
|
||||||
Non-zero error codes indicate a failure, in this case no
|
|
||||||
results are available and the error code has been pushed twice.
|
|
||||||
This construction enables programs to test for failure with a
|
|
||||||
single instruction (~TEQ or TNE~) and still find out the cause of
|
|
||||||
the failure.
|
|
||||||
The result name 'e' is reserved for the error code.
|
|
||||||
.N 1
|
|
||||||
List of monitor calls.
|
|
||||||
.DS B
|
|
||||||
number name parameters results function
|
|
||||||
|
|
||||||
1 Exit status:int Terminate this process
|
|
||||||
2 Fork e,flag,pid:int Spawn new process
|
|
||||||
3 Read fildes:int;buf:ptr;nbytes:unsp
|
|
||||||
e:int;rbytes:unsp Read from file
|
|
||||||
4 Write fildes:int;buf:ptr;nbytes:unsp
|
|
||||||
e:int;wbytes:unsp Write on a file
|
|
||||||
5 Open string:ptr;flag:int
|
|
||||||
e,fildes:int Open file for read and/or write
|
|
||||||
6 Close fildes:int e:int Close a file
|
|
||||||
7 Wait e:int;status,pid:int2
|
|
||||||
Wait for child
|
|
||||||
8 Creat string:ptr;mode:int
|
|
||||||
e,fildes:int Create a new file
|
|
||||||
9 Link string1,string2:ptr
|
|
||||||
e:int Link to a file
|
|
||||||
10 Unlink string:ptr e:int Remove directory entry
|
|
||||||
12 Chdir string:ptr e:int Change default directory
|
|
||||||
14 Mknod string:ptr;mode,addr:int2
|
|
||||||
e:int Make a special file
|
|
||||||
15 Chmod string:ptr;mode:int2
|
|
||||||
e:int Change mode of file
|
|
||||||
16 Chown string:ptr;owner,group:int2
|
|
||||||
e:int Change owner/group of a file
|
|
||||||
18 Stat string,statbuf:ptr
|
|
||||||
e:int Get file status
|
|
||||||
19 Lseek fildes:int;off:int4;whence:int
|
|
||||||
e:int;oldoff:int4 Move read/write pointer
|
|
||||||
20 Getpid pid:int2 Get process identification
|
|
||||||
21 Mount special,string:ptr;rwflag:int
|
|
||||||
e:int Mount file system
|
|
||||||
22 Umount special:ptr e:int Unmount file system
|
|
||||||
23 Setuid userid:int2 e:int Set user ID
|
|
||||||
24 Getuid e_uid,r_uid:int2 Get user ID
|
|
||||||
25 Stime time:int4 e:int Set time and date
|
|
||||||
26 Ptrace request:int;pid:int2;addr:ptr;data:int
|
|
||||||
e,value:int Process trace
|
|
||||||
27 Alarm seconds:uns2 previous:uns2 Schedule signal
|
|
||||||
28 Fstat fildes:int;statbuf:ptr
|
|
||||||
e:int Get file status
|
|
||||||
29 Pause Stop until signal
|
|
||||||
30 Utime string,timep:ptr
|
|
||||||
e:int Set file times
|
|
||||||
33 Access string,mode:int e:int Determine file accessibility
|
|
||||||
34 Nice incr:int Set program priority
|
|
||||||
35 Ftime bufp:ptr e:int Get date and time
|
|
||||||
36 Sync Update filesystem
|
|
||||||
37 Kill pid:int2;sig:int
|
|
||||||
e:int Send signal to a process
|
|
||||||
41 Dup fildes,newfildes:int
|
|
||||||
e,fildes:int Duplicate a file descriptor
|
|
||||||
42 Pipe e,w_des,r_des:int Create a pipe
|
|
||||||
43 Times buffer:ptr Get process times
|
|
||||||
44 Profil buff:ptr;bufsiz,offset,scale:intp Execution time profile
|
|
||||||
46 Setgid gid:int2 e:int Set group ID
|
|
||||||
47 Getgid e_gid,r_gid:int Get group ID
|
|
||||||
48 Sigtrp trapno,signo:int
|
|
||||||
e,prevtrap:int See below
|
|
||||||
51 Acct file:ptr e:int Turn accounting on or off
|
|
||||||
53 Lock flag:int e:int Lock a process
|
|
||||||
54 Ioctl fildes,request:int;argp:ptr
|
|
||||||
e:int Control device
|
|
||||||
56 Mpxcall cmd:int;vec:ptr e:int Multiplexed file handling
|
|
||||||
59 Exece name,argv,envp:ptr
|
|
||||||
e:int Execute a file
|
|
||||||
60 Umask complmode:int2 oldmask:int2 Set file creation mode mask
|
|
||||||
61 Chroot string:ptr e:int Change root directory
|
|
||||||
.DE 1
|
|
||||||
Codes 0, 11, 13, 17, 31, 32, 38, 39, 40, 45, 49, 50, 52,
|
|
||||||
55, 57, 58, 62, and 63 are
|
|
||||||
not used.
|
|
||||||
.P
|
|
||||||
All monitor calls, except fork and sigtrp
|
|
||||||
are the same as the UNIX version 7 system calls.
|
|
||||||
.P
|
|
||||||
The sigtrp entry maps UNIX signals onto EM interrupts.
|
|
||||||
Normally, trapno is in the range 0 to 252.
|
|
||||||
In that case it requests that signal signo
|
|
||||||
will cause trap trapno to occur.
|
|
||||||
When given trap number -2, default signal handling is reset, and when given
|
|
||||||
trap number -3, the signal is ignored.
|
|
||||||
.P
|
|
||||||
The flag returned by fork is 1 in the child process and 0 in
|
|
||||||
the parent.
|
|
||||||
The pid returned is the process-id of the other process.
|
|
||||||
.BP
|
|
||||||
.S1 "TRAPS AND INTERRUPTS"
|
|
||||||
EM provides a means for the user program to catch all traps
|
|
||||||
generated by the program itself, the hardware, or external conditions.
|
|
||||||
This mechanism uses five instructions: LIM, SIM, SIG, TRP and RTT.
|
|
||||||
This section of the manual may be omitted on the first reading since it
|
|
||||||
presupposes knowledge of the EM instruction set.
|
|
||||||
.P
|
|
||||||
The action taken when a trap occures is determined by the value
|
|
||||||
of an internal EM trap register.
|
|
||||||
This register contains a pointer to a procedure.
|
|
||||||
Initially the pointer used is zero and all traps halt the
|
|
||||||
program with, hopefully, a useful message to the outside world.
|
|
||||||
The SIG instruction can be used to alter the trap register,
|
|
||||||
it pops a procedure pointer from the
|
|
||||||
stack into the trap register.
|
|
||||||
When a trap occurs after storing a nonzero value in the trap
|
|
||||||
register, the procedure pointed to by the trap register
|
|
||||||
is called with the trap number
|
|
||||||
as the only parameter (see below).
|
|
||||||
SIG returns the previous value of the trap register on the
|
|
||||||
stack.
|
|
||||||
Two consecutive SIGs are a no-op.
|
|
||||||
When a trap occurs, the trap register is reset to its initial
|
|
||||||
condition, to prevent recursive traps from hanging the machine up,
|
|
||||||
e.g. stack overflow in the stack overflow handling procedure.
|
|
||||||
.P
|
|
||||||
The runtime systems for some languages need to ignore some EM
|
|
||||||
traps.
|
|
||||||
EM offers a feature called the ignore mask.
|
|
||||||
It contains one bit for each of the lowest 16 trap numbers.
|
|
||||||
The bits are numbered 0 to 15, with the least significant bit
|
|
||||||
having number 0.
|
|
||||||
If a certain bit is 1 the corresponding trap never
|
|
||||||
occurs and processing simply continues.
|
|
||||||
The actions performed by the offending instruction are
|
|
||||||
described by the Pascal program in appendix A.
|
|
||||||
.N
|
|
||||||
If the bit is 0, traps are not ignored.
|
|
||||||
The instructions LIM and SIM allow copying and replacement of
|
|
||||||
the ignore mask.~
|
|
||||||
.P
|
|
||||||
The TRP instruction generates a trap, the trap number being found on the
|
|
||||||
stack.
|
|
||||||
This is, among other things,
|
|
||||||
useful for library procedures and runtime systems.
|
|
||||||
It can also be used by a low level trap procedure to pass the trap to a
|
|
||||||
higher level one (see example below).
|
|
||||||
.P
|
|
||||||
The RTT instruction returns from the trap procedure and continues after the
|
|
||||||
trap.
|
|
||||||
In the list below all traps marked with an asterisk ('*') are
|
|
||||||
considered to be fatal and it is explicitly undefined what happens if
|
|
||||||
you try to restart after the trap.
|
|
||||||
.P
|
|
||||||
The way a trap procedure is called is completely compatible
|
|
||||||
with normal calling conventions. The only way a trap procedure
|
|
||||||
differs from normal procedures is the return. It has to use RTT instead
|
|
||||||
of RET. This is necessary because the complete runtime status is saved on the
|
|
||||||
stack before calling the procedure and all this status has to be reloaded.
|
|
||||||
Error numbers are in the range 0 to 252.
|
|
||||||
The trap numbers are divided into three categories:
|
|
||||||
.IS 4
|
|
||||||
.N 1
|
|
||||||
.PS - 10
|
|
||||||
.PT ~~0-~63
|
|
||||||
EM machine errors, e.g. illegal instruction.
|
|
||||||
.PS - 8
|
|
||||||
.PT ~0-15
|
|
||||||
maskable
|
|
||||||
.PT 16-63
|
|
||||||
not maskable
|
|
||||||
.PE
|
|
||||||
.PT ~64-127
|
|
||||||
Reserved for use by compilers, run time systems, etc.
|
|
||||||
.PT 128-252
|
|
||||||
Available for user programs.
|
|
||||||
.PE 1
|
|
||||||
.IE
|
|
||||||
EM machine errors are numbered as follows:
|
|
||||||
.DS I 5
|
|
||||||
.TS
|
|
||||||
tab(@);
|
|
||||||
n l l.
|
|
||||||
0@EARRAY@Array bound error
|
|
||||||
1@ERANGE@Range bound error
|
|
||||||
2@ESET@Set bound error
|
|
||||||
3@EIOVFL@Integer overflow
|
|
||||||
4@EFOVFL@Floating overflow
|
|
||||||
5@EFUNFL@Floating underflow
|
|
||||||
6@EIDIVZ@Divide by 0
|
|
||||||
7@EFDIVZ@Divide by 0.0
|
|
||||||
8@EIUND@Undefined integer
|
|
||||||
9@EFUND@Undefined float
|
|
||||||
10@ECONV@Conversion error
|
|
||||||
16*@ESTACK@Stack overflow
|
|
||||||
17*@EHEAP@Heap overflow
|
|
||||||
18*@EILLINS@Illegal instruction
|
|
||||||
19*@EODDZ@Illegal size argument
|
|
||||||
20*@ECASE@Case error
|
|
||||||
21*@EMEMFLT@Addressing non existent memory
|
|
||||||
22*@EBADPTR@Bad pointer used
|
|
||||||
23*@EBADPC@Program counter out of range
|
|
||||||
24@EBADLAE@Bad argument of LAE
|
|
||||||
25@EBADMON@Bad monitor call
|
|
||||||
26@EBADLIN@Argument of LIN too high
|
|
||||||
27@EBADGTO@GTO descriptor error
|
|
||||||
.TE
|
|
||||||
.DE 0
|
|
||||||
.P
|
|
||||||
As an example,
|
|
||||||
suppose a subprocedure has to be written to do a numeric
|
|
||||||
calculation.
|
|
||||||
When an overflow occurs the computation has to be stopped and
|
|
||||||
the higher level procedure must be resumed.
|
|
||||||
This can be programmed as follows using the mechanism described above:
|
|
||||||
.DS B
|
|
||||||
mes 2,2,2 ; set sizes
|
|
||||||
ersave
|
|
||||||
bss 2,0,0 ; Room to save previous value of trap procedure
|
|
||||||
msave
|
|
||||||
bss 2,0,0 ; Room to save previous value of trap mask
|
|
||||||
|
|
||||||
pro calcule,0 ; entry point
|
|
||||||
lxl 0 ; fill in non-local goto descriptor with LB
|
|
||||||
ste jmpbuf+4
|
|
||||||
lor 1 ; and SP
|
|
||||||
ste jmpbuf+2
|
|
||||||
lim ; get current ignore mask
|
|
||||||
ste msave ; save it
|
|
||||||
lim
|
|
||||||
loc 16 ; bit for EFOVFL
|
|
||||||
ior 2 ; set in mask
|
|
||||||
sim ; ignore EFOVFL from now on
|
|
||||||
lpi $catch ; load procedure identifier
|
|
||||||
sig ; catch wil get all traps now
|
|
||||||
ste ersave ; save previous trap procedure identifier
|
|
||||||
; perform calculation now, possibly generating overflow
|
|
||||||
1 ; label jumped to by catch procedure
|
|
||||||
loe ersave ; get old trap procedure
|
|
||||||
sig ; refer all following trap to old procedure
|
|
||||||
asp 2 ; remove result of sig
|
|
||||||
loe msave ; restore previous mask
|
|
||||||
sim ; done now
|
|
||||||
; load result of calculation
|
|
||||||
ret 2 ; return result
|
|
||||||
jmpbuf
|
|
||||||
con *1,0,0
|
|
||||||
end
|
|
||||||
.DE 0
|
|
||||||
.VS 1 1
|
|
||||||
.DS
|
|
||||||
Example of catch procedure
|
|
||||||
pro catch,0 ; Local procedure that must catch the overflow trap
|
|
||||||
lol 2 ; Load trap number
|
|
||||||
loc 4 ; check for overflow
|
|
||||||
bne *1 ; if other trap, call higher trap procedure
|
|
||||||
gto jmpbuf ; return to procedure calcule
|
|
||||||
1 ; other trap has occurred
|
|
||||||
loe ersave ; previous trap procedure
|
|
||||||
sig ; other procedure will get the traps now
|
|
||||||
asp 2 ; remove the result of sig
|
|
||||||
lol 2 ; stack trap number
|
|
||||||
trp ; call other trap procedure
|
|
||||||
rtt ; if other procedure returns, do the same
|
|
||||||
end
|
|
||||||
.DE
|
|
||||||
2922
doc/em/itables
2922
doc/em/itables
File diff suppressed because it is too large
Load Diff
@@ -1,5 +0,0 @@
|
|||||||
|
|
||||||
case $# in
|
|
||||||
1) make "$1".t ; ntlp "$1".t^lpr ;;
|
|
||||||
*) echo $0 heeft een argument nodig ;;
|
|
||||||
esac
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
case $# in
|
|
||||||
1) make $1.t ; ntout $1.t ;;
|
|
||||||
*) echo $0 heeft een argument nodig ;;
|
|
||||||
esac
|
|
||||||
@@ -1084,7 +1084,7 @@ directory "first".
|
|||||||
Em_path.h also specifies which directory should be used for
|
Em_path.h also specifies which directory should be used for
|
||||||
temporary files.
|
temporary files.
|
||||||
Most programs from the Kit do indeed use that directory
|
Most programs from the Kit do indeed use that directory
|
||||||
although some remain stubborn and use /tmp or /usr/tmp.
|
although some remain stubborn and use /tmp.
|
||||||
.LP
|
.LP
|
||||||
The shape of the tree should not be altered lightly because
|
The shape of the tree should not be altered lightly because
|
||||||
most Makefiles and the
|
most Makefiles and the
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
proto.make
|
|
||||||
abstract
|
|
||||||
appendix_A
|
|
||||||
appendix_B
|
|
||||||
chap1
|
|
||||||
chap2
|
|
||||||
chap3
|
|
||||||
chap4
|
|
||||||
chap5
|
|
||||||
chap6
|
|
||||||
chap7
|
|
||||||
chap8
|
|
||||||
chap9
|
|
||||||
contents
|
|
||||||
frontpage
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# $Header$
|
|
||||||
|
|
||||||
FP = frontpage
|
|
||||||
|
|
||||||
DOC = abstract contents chap1 chap2 chap3 chap4 chap5 chap6 chap7\
|
|
||||||
chap8 chap9 appendix_A appendix_B
|
|
||||||
|
|
||||||
../lint.doc: $(FP) $(DOC)
|
|
||||||
cat $(FP) $(DOC) > ../lint.doc
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
proto.make
|
|
||||||
ctot
|
|
||||||
p0
|
|
||||||
p1
|
|
||||||
p2
|
|
||||||
p3
|
|
||||||
p4
|
|
||||||
p5
|
|
||||||
p6
|
|
||||||
p7
|
|
||||||
p8
|
|
||||||
p9
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
EMHOME=../..
|
|
||||||
FILES= p0 p1 p2 p3 p4 p5 p6 p7 p8 p9
|
|
||||||
|
|
||||||
PIC=pic
|
|
||||||
EQN=eqn
|
|
||||||
TBL=tbl
|
|
||||||
TARGET=-Tlp
|
|
||||||
../occam.doc: p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 channel.h.t channel.c.t
|
|
||||||
soelim $(FILES) | $(PIC) $(TARGET) | $(TBL) | $(EQN) $(TARGET) > $@
|
|
||||||
|
|
||||||
channel.h.t: $(EMHOME)/h/ocm_chan.h
|
|
||||||
ctot <$(EMHOME)/h/ocm_chan.h >channel.h.t
|
|
||||||
|
|
||||||
channel.c.t: channel.c
|
|
||||||
ctot <channel.c >channel.c.t
|
|
||||||
|
|
||||||
channel.c: $(EMHOME)/lang/occam/lib/tail_ocm.a
|
|
||||||
arch x $(EMHOME)/lang/occam/lib/tail_ocm.a channel.c
|
|
||||||
28
doc/pascal/proto.make
Normal file
28
doc/pascal/proto.make
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# $Id$
|
||||||
|
|
||||||
|
#PARAMS do not remove this line!
|
||||||
|
|
||||||
|
SRC_DIR = $(SRC_HOME)/doc/pascal
|
||||||
|
|
||||||
|
PIC = pic
|
||||||
|
|
||||||
|
SRC = \
|
||||||
|
$(SRC_DIR)/ab+intro.doc \
|
||||||
|
$(SRC_DIR)/internal.doc \
|
||||||
|
$(SRC_DIR)/transpem.doc \
|
||||||
|
$(SRC_DIR)/conf.doc \
|
||||||
|
$(SRC_DIR)/options.doc \
|
||||||
|
$(SRC_DIR)/extensions.doc \
|
||||||
|
$(SRC_DIR)/deviations.doc \
|
||||||
|
$(SRC_DIR)/hints.doc \
|
||||||
|
$(SRC_DIR)/test.doc \
|
||||||
|
$(SRC_DIR)/compar.doc \
|
||||||
|
$(SRC_DIR)/improv.doc \
|
||||||
|
$(SRC_DIR)/his.doc \
|
||||||
|
$(SRC_DIR)/reference.doc \
|
||||||
|
$(SRC_DIR)/syntax.doc \
|
||||||
|
$(SRC_DIR)/rtl.doc \
|
||||||
|
$(SRC_DIR)/example.doc
|
||||||
|
|
||||||
|
$(TARGET_HOME)/doc/pascal.doc: $(SRC)
|
||||||
|
$(PIC) $(SRC) > $@
|
||||||
@@ -6,6 +6,7 @@ TBL=tbl
|
|||||||
EQN=eqn
|
EQN=eqn
|
||||||
PIC=pic
|
PIC=pic
|
||||||
REFER=refer
|
REFER=refer
|
||||||
|
GRAP=grap
|
||||||
|
|
||||||
RESFILES= \
|
RESFILES= \
|
||||||
$(TARGET_HOME)/doc/toolkit.doc \
|
$(TARGET_HOME)/doc/toolkit.doc \
|
||||||
@@ -18,6 +19,8 @@ RESFILES= \
|
|||||||
$(TARGET_HOME)/doc/ncg.doc \
|
$(TARGET_HOME)/doc/ncg.doc \
|
||||||
$(TARGET_HOME)/doc/regadd.doc \
|
$(TARGET_HOME)/doc/regadd.doc \
|
||||||
$(TARGET_HOME)/doc/LLgen.doc \
|
$(TARGET_HOME)/doc/LLgen.doc \
|
||||||
|
$(TARGET_HOME)/doc/LLgen_NCER.doc \
|
||||||
|
$(TARGET_HOME)/doc/pascal.doc \
|
||||||
$(TARGET_HOME)/doc/basic.doc \
|
$(TARGET_HOME)/doc/basic.doc \
|
||||||
$(TARGET_HOME)/doc/crefman.doc \
|
$(TARGET_HOME)/doc/crefman.doc \
|
||||||
$(TARGET_HOME)/doc/ansi_C.doc \
|
$(TARGET_HOME)/doc/ansi_C.doc \
|
||||||
@@ -72,7 +75,11 @@ $(TARGET_HOME)/doc/regadd.doc: $(SRC_HOME)/doc/regadd.doc
|
|||||||
|
|
||||||
$(TARGET_HOME)/doc/LLgen.doc: LLgen.X
|
$(TARGET_HOME)/doc/LLgen.doc: LLgen.X
|
||||||
LLgen.X:
|
LLgen.X:
|
||||||
cd LLgen; make "EQN="$(EQN) "TBL="$(TBL) "REFER="$(REFER)
|
cd LLgen; make "EQN="$(EQN) "TBL="$(TBL) "REFER="$(REFER) "GRAP="$(GRAP)
|
||||||
|
|
||||||
|
$(TARGET_HOME)/doc/LLgen_NCER.doc: LLgen_NCER.X
|
||||||
|
LLgen_NCER.X:
|
||||||
|
cd LLgen; make "EQN="$(EQN) "TBL="$(TBL) "REFER="$(REFER) "GRAP="$(GRAP)
|
||||||
|
|
||||||
$(TARGET_HOME)/doc/basic.doc: $(SRC_HOME)/doc/basic.doc
|
$(TARGET_HOME)/doc/basic.doc: $(SRC_HOME)/doc/basic.doc
|
||||||
cat $(SRC_HOME)/doc/basic.doc >$@
|
cat $(SRC_HOME)/doc/basic.doc >$@
|
||||||
@@ -105,6 +112,10 @@ $(TARGET_HOME)/doc/sparc.doc: sparc.X
|
|||||||
sparc.X:
|
sparc.X:
|
||||||
cd sparc; make "PIC="$(PIC) "TBL="$(TBL)
|
cd sparc; make "PIC="$(PIC) "TBL="$(TBL)
|
||||||
|
|
||||||
|
$(TARGET_HOME)/doc/pascal.doc: pascal.X
|
||||||
|
pascal.X:
|
||||||
|
cd pascal; make "PIC="$(PIC)
|
||||||
|
|
||||||
$(TARGET_HOME)/doc/top.doc: top.X
|
$(TARGET_HOME)/doc/top.doc: top.X
|
||||||
top.X:
|
top.X:
|
||||||
cd top; make "EQN="$(EQN) "TBL="$(TBL) "REFER="$(REFER)
|
cd top; make "EQN="$(EQN) "TBL="$(TBL) "REFER="$(REFER)
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
5
|
|
||||||
A
|
|
||||||
B
|
|
||||||
init
|
|
||||||
intro
|
|
||||||
note_on_reg_wins
|
|
||||||
refs
|
|
||||||
timing
|
|
||||||
title
|
|
||||||
proto.make
|
|
||||||
pics
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# $Header$
|
|
||||||
|
|
||||||
REFER=refer
|
|
||||||
TBL=tbl
|
|
||||||
TARGET=-Tlp
|
|
||||||
PIC=pic
|
|
||||||
GRAP=grap
|
|
||||||
|
|
||||||
../sparc.doc: refs title intro 1 2 3 4 5 A B init
|
|
||||||
$(REFER) -sA+T '-l\", ' -p refs title intro 1 2 3 4 5 A B | $(GRAP) | $(PIC) | $(TBL) | soelim > $@
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
EM_stack.orig
|
|
||||||
EM_stack.ours
|
|
||||||
compile_bars
|
|
||||||
mem_config
|
|
||||||
perf
|
|
||||||
perf.comp
|
|
||||||
perf.d
|
|
||||||
perf.dhry
|
|
||||||
reg_layout
|
|
||||||
run-time_bars
|
|
||||||
run-time_bars.bup
|
|
||||||
signal_stack
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
proto.make
|
|
||||||
refs.top
|
|
||||||
top.n
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
# $Header$
|
|
||||||
|
|
||||||
REFER=refer
|
|
||||||
TBL=tbl
|
|
||||||
TARGET=-Tlp
|
|
||||||
|
|
||||||
../top.doc: top.n refs.top
|
|
||||||
$(REFER) -sA+T -l4,2 -p refs.top top.n | $(TBL) > $@
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
Makefile
|
|
||||||
READ_ME
|
|
||||||
ok
|
|
||||||
select.c
|
|
||||||
test.h
|
|
||||||
tests
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
0
|
|
||||||
@@ -32,9 +32,9 @@ int high = 999;
|
|||||||
FILE *file1;
|
FILE *file1;
|
||||||
FILE *file2;
|
FILE *file2;
|
||||||
FILE *file3;
|
FILE *file3;
|
||||||
char name1[] = "/usr/tmp/f1XXXXXX";
|
char name1[] = "/tmp/f1XXXXXX";
|
||||||
char name2[] = "/usr/tmp/f2XXXXXX";
|
char name2[] = "/tmp/f2XXXXXX";
|
||||||
char name3[] = "/usr/tmp/f3XXXXXX";
|
char name3[] = "/tmp/f3XXXXXX";
|
||||||
|
|
||||||
char *to3dig();
|
char *to3dig();
|
||||||
|
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
#define WS EM_WSIZE
|
|
||||||
#define PS EM_PSIZE
|
|
||||||
#include "test.h"
|
|
||||||
mes 2,WS,PS
|
|
||||||
mes 1
|
|
||||||
mes 4,300
|
|
||||||
.000
|
|
||||||
con "tst000"
|
|
||||||
exp $m_a_i_n
|
|
||||||
pro $m_a_i_n,0
|
|
||||||
loc 123
|
|
||||||
loc -98
|
|
||||||
; TEST 000: empty
|
|
||||||
fil .000
|
|
||||||
loc -98
|
|
||||||
bne *1
|
|
||||||
loc 123
|
|
||||||
bne *1
|
|
||||||
lin 0
|
|
||||||
nop
|
|
||||||
loc 0
|
|
||||||
ret WS
|
|
||||||
1
|
|
||||||
lin 1
|
|
||||||
nop
|
|
||||||
loc 1
|
|
||||||
ret WS
|
|
||||||
end
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user