ChangeLog 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749
  1. 21-Jun-90 Ceriel Jacobs (ceriel) at ceriel
  2. fixed bug in FEF: did not work on 0.0
  3. 20-Jun-90 Remco Feenstra & Peter Boersma
  4. Implemented model 3 (intelligent calls)
  5. Fixed bug in INN and SET
  6. 31-Jan-90 Ceriel Jacobs (ceriel) at ceriel
  7. Fixed getpid() version of MON.
  8. 26-Jan-90 Ceriel Jacobs (ceriel) at ceriel
  9. Fixed check in COM instruction.
  10. 26-Jan-90 Ceriel Jacobs (ceriel) at ceriel
  11. Fixed so that two consecutive SIG's have no effect.
  12. 8-Dec-89 Ceriel Jacobs (ceriel) at ceriel
  13. Bug fix: one of the many ZRL encodings was decoded wrong.
  14. 22-Nov-89 Ceriel Jacobs (ceriel) at ceriel
  15. Some more speed-up changes, resulting in another 5%.
  16. 13-Nov-89 Ceriel Jacobs (ceriel) at ceriel
  17. Many changes for speed-up (resulting speed-up: 20-25%).
  18. Also fixed serious problem in floating point handling: the existing
  19. code assumed that the low order 4 bytes of a double could be used as
  20. a float (4 bytes). This is NOT true for most floating point
  21. implementations, notably IEEE ones.
  22. 3-Oct-88 Dick Grune (dick) at dick
  23. Since the definitions of VERSION and MAGIC are now available from
  24. standard include files, e.out.h can be simplified.
  25. 27-May-88 Dick Grune (dick) at dick
  26. Testing with the UNIX system call tester by Leonie van der Voort
  27. revealed a few errors: when length was negative in a call of read
  28. or write, funny values were passed to Malloc; the size of the
  29. elements in the mtime/atime array passed to a call of utime was
  30. wsize rather than INT4SIZE, as it probably should have been.
  31. 25-May-88 Dick Grune (dick) at dick
  32. It is just too much of a drag to be able to unstack even the last
  33. RSB, the one that contains the initial setting of the machine.
  34. newLB has to be patched, and now it seems that also newPC has to
  35. make an exeception for this case. We now don't unstack the
  36. original RSB.
  37. 19-May-88 Dick Grune (dick) at dick
  38. We now also dump the Function Return Area, when giving a stack
  39. dump.
  40. 17-May-88 Dick Grune (dick) at dick
  41. Segment checking for pointers should also be done for subtraction,
  42. and give a different warning.
  43. 16-May-88 Dick Grune (dick) at dick
  44. The implementation of the MON call 'exec' was sloppy about the
  45. buffers used: all strings were assumed to have a maximum length of
  46. 128, and the maximum number of args or environ entries was built
  47. in. We now scan the whole works to determine the size.
  48. 16-May-88 Dick Grune (dick) at dick
  49. A stack dump with given size would look funny if the size was large
  50. than the original stack, or when the dump happened to start in the
  51. middle of a RSB.
  52. 14-May-88 Dick Grune (dick) at dick
  53. Rethinking the start-up procedure has resulted in the removal of the
  54. flag LB_def and the RSB is now stacked and unstacked in one blow.
  55. LB = ML + 1 is now a special case.
  56. 11-May-88 Dick Grune (dick) at dick
  57. Code handling the Function Return Area was spread over a number of
  58. files; since there was already an include file fra.h, I made a file
  59. fra.c. Likewise for alloc.[ch]
  60. 10-May-88 Dick Grune (dick) at dick
  61. The whole segment-checking stuff is now concentrated in segment.c
  62. (and made correct!)
  63. 9-May-88 Dick Grune (dick) at dick
  64. Things would be a lot simpler if LB and AB and SP could start from
  65. ML+1, but they cannot because ML+1 gives overflow. So we now set ML
  66. to the highest word boundary minus 1.
  67. 8-May-88 Dick Grune (dick) at dick
  68. The whole business of deriving AB from LB every time you need it is
  69. unnatural: it is a separate register in its own right and
  70. recalculation is only possible since we happen to have a linear
  71. stack implementation. -> a normal register in the EM machine, set
  72. in newLB().
  73. 7-May-88 Dick Grune (dick) at dick
  74. In the non-checking version it did not even check for bad proc
  75. idfs, actions on double words with wsize == 4, etc., in text.h. It
  76. now checks.
  77. 7-May-88 Dick Grune (dick) at dick
  78. When a trap occurs it is often not at all clear why it happened;
  79. e.g., the trap ESTACK may have several causes except stack
  80. overflow: setting SP to an odd value, setting LB to a place where
  81. there is no RSB, and so on. Now all such traps are preceded by a
  82. warning; the combined action is written as wtrap(W..., E...)
  83. with W... the warning number and E... the trap number.
  84. 6-May-88 Dick Grune (dick) at dick
  85. The offsets in the RSB and its size were recalculated every time;
  86. this was especially ridiculous in accessing a formal parameter
  87. based on AB; they are now precalculated as soon as psize and wsize
  88. are known.
  89. 6-May-88 Dick Grune (dick) at dick
  90. The one-bit register HaltOnTrap is not powerful enough; it has to
  91. have a special value during loading the EM file (for floating
  92. overflow in calculations). We now have OnTrap with three values.
  93. 3-May-88 Dick Grune (dick) at dick
  94. If we want to check that PC does not jump from procedure to
  95. procedure, we have to know which procedure is running. Introduced
  96. an EM register PI for Procedure Identifier. We also need the limits
  97. for each procedure; for this purpose, the procedure descriptor
  98. table is now preprocessed on start-up. New files: proctab.[ch].
  99. 3-May-88 Dick Grune (dick) at dick
  100. There was still a considerable confusion between ignorable and
  101. non-ignorable traps. All ignorable traps are now handled on the
  102. spot and the procedure trap() is not called if the trap is ignored.
  103. This means that arm_trap() has disappeared.
  104. 2-May-88 Dick Grune (dick) at dick
  105. The GTO was done by a rude store in LB, SP and PC; now it properly
  106. unwinds the stack.
  107. 25-Apr-88 Dick Grune (dick) at dick
  108. With the advent of the Sun 4 RISC machine, the use of variable length
  109. argument lists has become a liability. The answer is the include file
  110. <varargs.h>. It appears that _doprnt() is sufficiently universal,
  111. fortunately.
  112. 24-Apr-88 Dick Grune (dick) at dick
  113. There are two levels to stack dumping, the RSB list and the whole
  114. contents; we now control the first by d1 and the rest by d2.
  115. 24-Apr-88 Dick Grune (dick) at dick
  116. Dumping the GDA and heap is under control of the GDA= and HEAP=
  117. parameters rather than under d3 or d4. Changed their id-s to +1
  118. and *1, so they can be set in the program but not from the
  119. LOGMASK=.
  120. 24-Apr-88 Dick Grune (dick) at dick
  121. Now that the Logging Machine has been baptized, time has come to
  122. call the controlling define LOGGING again. Sorry for the confusion.
  123. 24-Apr-88 Dick Grune (dick) at dick
  124. Trying to have the interpreter interpret itself has given rise to
  125. many small improvements, and a considerable correction to npush() and
  126. st_lds(). We are again trying.
  127. 15-Apr-88 Dick Grune (dick) at dick
  128. The tallying does in no way belong to the logging machine, so I
  129. removed the dependency on the flag CHECKING (see 15-Feb-88).
  130. 15-Apr-88 Dick Grune (dick) at dick
  131. The instruction counter inr is properly speaking no part of the
  132. EM machine, but belongs to the logging machine.
  133. 15-Apr-88 Dick Grune (dick) at dick
  134. It is unnatural for the logging machine to derive the values of its
  135. variables from shell variables. Shell variables are very global
  136. and represent a setting in which the user wishes to work. The
  137. values of the logging variables change from moment to moment. They
  138. are now derived from make-like assignments in the command line.
  139. 14-Apr-88 Dick Grune (dick) at dick
  140. To allow testing routines that handle heap and stack overflow, two
  141. command line parameters have been added, -hN and -sN, that limit
  142. the heap and stack size.
  143. 14-Apr-88 Dick Grune (dick) at dick
  144. The EM Manual provides two traps for undefined integers and floats.
  145. Since the interpreter does not have special values for undefined;
  146. since it relies on the shadow bytes to give a warning; and in view
  147. of the frequent occurrence of such undefined values, the
  148. interpreter just gives a warning.
  149. It would be nice if the interpreter could also, on request, exhibit
  150. the formally correct behaviour of giving a trap. This is, however,
  151. impossible, since such a trap would have to rely on the shadow bits
  152. and the shadow bits are only present in the checking version.
  153. The conclusion is that we do not give a trap on use of undefined,
  154. ever.
  155. 2-Apr-88 Dick Grune (dick) at dick
  156. The warnings about type T expected left one in the dark as to what
  157. *was* there. Now it prints a continued warning telling about the
  158. type found. To this end, warningcont() prints a chained warning.
  159. 1-Apr-88 Dick Grune (dick) at dick
  160. When a pointer is needed and it turns out to be an integer, a test
  161. is done to see if it happens to be zero, in which case all is well.
  162. This was, however, a rather weird test; it is much simpler, when
  163. storing a zero value, to switch on both the SH_INT bit and the
  164. SH_DATAP bit.
  165. 31-Mar-88 Dick Grune (dick) at dick
  166. The logging machine has now been separated from the EM machine as
  167. much as is reasonably possible. Weak points are still forking and
  168. the handling of the abbreviations AT= and L= .
  169. 29-Mar-88 Dick Grune (dick) at dick
  170. On many systems it is inappropriate to grab file descriptors 19 and
  171. 18 for messages and logging. It now finds the highest ones (with a
  172. limit of 99, for systems that have an unlimited supply of them).
  173. 29-Mar-88 Dick Grune (dick) at dick
  174. There were some terminological inaccuracies about the difference
  175. between a procedure identifier and a procedure descriptor.
  176. 29-Mar-88 Dick Grune (dick) at dick
  177. Since the disassembler is in no way involved in the logging machine,
  178. it seems inappropriate to use LOG(()) to produce the text. Just
  179. using printf() is much cleaner.
  180. 28-Mar-88 Dick Grune (dick) at dick
  181. Although trap handling had a file for itself, trap.c, warning
  182. handling was still done inside io.c. Introduced a new file,
  183. warn.c, to handle the warnings.
  184. 26-Mar-88 Dick Grune (dick) at dick
  185. Providing a good dump of a 2/4 machine is not easy; it is not clear
  186. where a pointer may be found. This was solved by just printing
  187. words everywhere, which was unsatisfactory. Now pointers are
  188. printed wherever the shadow bits indicate that there might be a
  189. pointer there, i.e. when the address is a word multiple and the 4
  190. bytes all have the pointer bit on. This is less unsatisfactory,
  191. though not good.
  192. 23-Mar-88 Dick Grune (dick) at dick
  193. Adapted to the new u flag in ip_spec.t; this cleared up the text
  194. segment access in text.h.
  195. 21-Mar-88 Dick Grune (dick) at dick
  196. Implemented the requirement that, when doing an RET or RTT, the stack
  197. pointer must be back where it started. This required the proc.
  198. idf to be recorded in the Return Status Block.
  199. 20-Mar-88 Dick Grune (dick) at dick
  200. Likewise (see below) for the text of the trap messages.
  201. 20-Mar-88 Dick Grune (dick) at dick
  202. Having the text, defines and numerical values in three different
  203. files is kind of inconvenient. They are now centralized in
  204. ../doc/appA (Appendix A of the manual) where they appear with
  205. explanations. The files warn_msg (with texts) and warn.h (with
  206. defines) are generated from it through M.warn_msg and M.warn_h,
  207. resp.
  208. 20-Mar-88 Dick Grune (dick) at dick
  209. Introduced the use of $(EM)/h/em_abs.h to include the trap numbers
  210. and the positions of LIN and FIL (although this seems a funny place
  211. to find them).
  212. 20-Mar-88 Dick Grune (dick) at dick
  213. Concentrated all e.out.h defines in e.out.h; this should probably
  214. go into $(EM)/h one of these days.
  215. 20-Mar-88 Dick Grune (dick) at dick
  216. The interpreter in the EM Manual does not use EBADLIN; we now decide
  217. that it is raised if the line number is larger than that mentioned
  218. in the EM header, part 2.
  219. 19-Mar-88 Dick Grune (dick) at dick
  220. The EM Manual states that a number of overflow tests need not be done
  221. if the FB_TEST bit in the second header word is not on.
  222. Experimental implementation of this shows a speed-up of 16%, so it
  223. is probably worth while.
  224. 18-Mar-88 Dick Grune (dick) at dick
  225. Reading the opcode and the argument bytes from the text segment was
  226. done by a procedure call, but the procedure call (newPC()) did not
  227. test for running out of the text segment. Replaced by a macro + a
  228. number of other similar speed-ups.
  229. 18-Mar-88 Dick Grune (dick) at dick
  230. Reraising the signal is not really useful; it is more useful never
  231. to catch a synchronous trap. UNIX then automatically does what it
  232. has to do.
  233. 17-Mar-88 Dick Grune (dick) at dick
  234. Redoing the trap mechanism lead to looking at the RTT vs RET
  235. instruction; it is nice to know where a Return Status Block
  236. originated: start-up, call, trap, non-restartable trap. We now
  237. push this info as topmost item on the stack. Values etc. in rsb.h
  238. 15-Mar-88 Dick Grune (dick) at dick
  239. I finally found out why the interpreter was spending 30% of
  240. its time in the system: it did a setjmp for each and every EM
  241. instruction, and IT does a call of signal(). Redoing this lead to
  242. considerable hacking in the trap handling mechanism. See the
  243. chapter in the documentation.
  244. 11-Mar-88 Dick Grune (dick) at dick
  245. Not all C compilers provide floating point operations. Installed a
  246. file nofloat.h with a flag NOFLOAT, which, if defined, suppresses
  247. the use of fp operations. The resulting interpreter will load EM
  248. files with floats in the GDA (but ignore them) but will give a
  249. fatal error upon attempt to execute a fp instruction.
  250. 10-Mar-88 Dick Grune (dick) at dick
  251. Added procedure identifier indications in the disassembly output,
  252. which helps in reading it.
  253. 8-Mar-88 Dick Grune (dick) at dick
  254. Implemented the other half of the type checking on ptr; this involved
  255. a macro i2p() to convert from index to pointer.
  256. 6-Mar-88 Dick Grune (dick) at dick
  257. Officially C does not have a type 'unsigned long', but the
  258. interpreter uses it heavily. Now it would be nice if we could make
  259. a version that does not use unsigned long. The main difficulty is
  260. the file do_unsar.c for doing unsigned arithmetic; for the rest it
  261. is possible and partway done. Most sizes are now of the type size.
  262. 4-Mar-88 Dick Grune (dick) at dick
  263. The list of warnings was fixed and contiguous, which was a nuisance
  264. when adding warnings. Now there is a mapping from warning numbers
  265. to the corresponding strings through a routine which does the
  266. lookup.
  267. 3-Mar-88 Dick Grune (dick) at dick
  268. The whole address testing for system calls in MON was shaky; most
  269. of them just produced traps. Corrected; they now return -1 and set
  270. errno to 14 (EFAULT).
  271. 1-Mar-88 Dick Grune (dick) at dick
  272. Some compilers use V7 ioctl request codes, some use the local
  273. codes. To accommodate both, we have a compile-time flag, V7IOCTL,
  274. which, if defined, causes the ioctl requests to be interpreted as
  275. V7 requests (of the form 't'<<8 | x)
  276. 1-Mar-88 Dick Grune (dick) at dick
  277. String arguments to system calls were, for the most part, just
  278. picked up, without any serious testing. Corrected in moncalls.c;
  279. violation results in errno == 14 (EFAULT) as it should.
  280. 29-Feb-88 Dick Grune (dick) at dick
  281. Concentrates all exits in a function close_down() which does
  282. calls to fclose() on the opened files, may reraise a caught signal
  283. and exits with the given return code.
  284. 26-Feb-88 Dick Grune (dick) at dick
  285. The type ptr was used very loosely; tightened up the code in many,
  286. many places. Introduced a macro p2i(p) which converts a "pointer"
  287. (EM address) to an index in the machine array. This modification
  288. necessitated a great many small changes and allowed some
  289. considerable simplifications.
  290. 22-Feb-88 Dick Grune (dick) at dick
  291. The format of a procedure identifier was a pointer in places and a
  292. long in others. It is now a psize unsigned integer.
  293. 16-Feb-88 Dick Grune (dick) at dick
  294. The code for calculating the sizes of the environ strings and the
  295. argument strings was unreadable. Rewritten in init.c.
  296. 15-Feb-88 Dick Grune (dick) at dick
  297. The tallying is not likely to be used by a user of the non-logging
  298. version, so it may as well be absent then, to save space. Made all
  299. tallying dependent on CHECKING.
  300. 15-Feb-88 Dick Grune (dick) at dick
  301. When allocating space for the stack and the global data area, the
  302. shadow bytes were not set to SH_UNDEF. Since the undef-ing of the
  303. shadow bytes occurs in several places, I introduced two routines,
  304. st_clear_area() and dt_clear_area() for the purpose.
  305. 12-Feb-88 Dick Grune (dick) at dick
  306. The dumping format of the text segment (just bytes in decimal) was
  307. unsatisfactory. It turned out quite easy to use the mkswitch from
  308. the switch directory to hack together a simple disassembler, which
  309. produced readable EM instructions.
  310. Moreover, text does not change while the program runs, so dumping
  311. it at a given instruction is quite meaningless. We now dump it
  312. right at the beginning, when the -T option is given.
  313. 4-Feb-88 Dick Grune (dick) at dick
  314. The whole idea of a driver (int.c) is superfluous now. Moreover
  315. there were naming problems all the time. Removed references to the
  316. driver.
  317. 1-Feb-88 Dick Grune (dick) at dick
  318. Measurements have shown that a checking but not logging interpreter
  319. is only a few percents faster that one that does both, at the
  320. expense of considerably lower functionality. So I merged logging and
  321. checking in the file checking.h. Made testing for logging more
  322. efficient by having a single variable logging which is set as
  323. soon as must_log && inr >= log_start is true. This is faster
  324. and much leaner code. Exit the function interesting().
  325. 1-Feb-88 Dick Grune (dick) at dick
  326. Removed the warning about switched-off warnings and traps; they
  327. were a nuisance.
  328. 29-Jan-88 Dick Grune (dick) at dick
  329. The zero pointer arithmetic check was implemented incorrectly.
  330. While correcting this, I cleaned up all the checking and warning
  331. mechanisms, up to a point. There is much more one can do.
  332. Unfortunately this involved renumbering the warnings, so we hack
  333. the manual to match.
  334. 27-Jan-88 Dick Grune (dick) at dick
  335. Line number and file name also in last line of stack dump, for
  336. uniformity with RSB descriptions.
  337. 25-Jan-88 Dick Grune (dick) at dick
  338. The default log mask is better at A-Z9d4twx9 than at A-Z9d1twx9.
  339. 23-Jan-88 Dick Grune (dick) at dick
  340. Warnings are now tallied not only by warning number, but also by
  341. file name and line number. Used simple linked lists in io.c.
  342. 23-Jan-88 Dick Grune (dick) at dick
  343. Having an address space of 2**32 is absurd; it will have to be 2**31
  344. to implement uninitialized pointers. Just to be able to give a
  345. good example in "How To Use the Interpreter", I changed MAX_ADR4 to
  346. I_MAXS4 (was I_MAXU4).
  347. 22-Jan-88 Dick Grune (dick) at dick
  348. The grammar of a float in the manual, the grammar of an UnsignedReal
  349. in the Pascal manual and the implementation in read.c were all
  350. slightly different. I made a clear distinction between the Pascal
  351. version (OK), the more loose implementation of "acceptable float"
  352. (with warning) and just garbage (with fatal error). ".e3" is an
  353. acceptable float.
  354. 21-Jan-88 Dick Grune (dick) at dick
  355. The interpreter did not catch stores at location 0. Changed this
  356. by making the LIN and FIL locations ROM. Introduced macros for
  357. protecting the data space (analogous to protecting the RSB in the
  358. stack). Moved all shadow byte handling to shadow.h. LIN, LNI and FIL
  359. are implemented by first lifting the write ban by dt_unprot, writing
  360. and then restoring it by dt_prot.
  361. 8-Jan-88 Dick Grune (dick) at dick
  362. The AT shell variable stopped one instruction too late. Corrected
  363. in main.c.
  364. 8-Dec-87 Dick Grune (dick) at dick
  365. I was explained that there is a subtle difference between the trap
  366. routine address being 0 and the default action upon trap. It says
  367. in the beginning of chapter 9 (Traps and Interrupts) of IR-81:
  368. Initially the pointer used is zero and all traps halt the program
  369. with ... The meaning of the SIG instruction is stated as: Trap
  370. errors to proc identifier on top of stack, -2 resets default. This
  371. means, I am told, that SIG with -2 restores the "pointer used" to
  372. zero and "directs all traps to halt the program ...", and that SIG
  373. with 0 just registers proc 0 as the trap routine.
  374. Although I think this raises more questions than it answers (how
  375. can I see if the previous trap routine was 0 or default?) I
  376. implemented it by adding an EM machine register HaltOnTrap, which
  377. is set in the non-default case.
  378. 1-Dec-87 Dick Grune (dick) at dick
  379. When debugging with the interpreter one often uses a call like
  380. LOG=123455 STOP=123457 int .....
  381. Added a shell variable AT which effects the above:
  382. AT=123456 int ...
  383. 27-Nov-87 Dick Grune (dick) at dick
  384. The shift distance in shifts and rotates must be in the range 0
  385. to object size in bits - 1, as it says in IR-81. This introduced a
  386. lot of inline code in DoSLI .. DoROR that should maybe go into
  387. subroutines.
  388. 23-Nov-87 Dick Grune (dick) at dick
  389. It turned out that LOG(("@S was a prefix both in do_store.c and in
  390. do_sets.c. Changed to @Y in the latter.
  391. 23-Nov-87 Dick Grune (dick) at dick
  392. SLI (shift left int) did an incorrect overflow test (failed on
  393. negative shift argument).
  394. 22-Nov-87 Dick Grune (dick) at dick
  395. Reformatted the output of the dump of the text and of the
  396. procedure descriptors. The latter is now more or less
  397. readable.
  398. 22-Nov-87 Dick Grune (dick) at dick
  399. Took all the direct memory access actions together in memdirect.h.
  400. This allows more readable code in dump.c and in a few other places.
  401. 10-Nov-87 Dick Grune (dick) at dick
  402. The stack dump is too unstructured and does not give enough
  403. information. Moreover, the position reporting in the various dump
  404. lines is erratic. Changed the routine do_log() to have two
  405. variants, one in which the format starts with @, which causes the
  406. position to be reported, and one in which the format starts with a
  407. blank, which is printed as is.
  408. Added two routines st_raw() and st_rsb() to print the raw and
  409. Return Status Block portions of the stack, resp., and displ_fil(),
  410. to print the name of the file, if at all possible. The stack
  411. parsing can be switched off with the -r option.
  412. 9-Nov-87 Dick Grune (dick) at dick
  413. Redressed the treatment of the Return Status Block, to give a
  414. better dump.
  415. 1-Nov-87 Dick Grune (dick) at dick
  416. The present segment checking is not very informative and produces
  417. complaints about intermediate results, which is annoying.
  418. This is not easily corrected. For each pointer, one should keep
  419. track where it originated, and when it is dereferenced a check
  420. should be made to see if it is applied to the original segment.
  421. This is kind of stiff to implement.
  422. For the time being, I have made the whole segment checking subject
  423. to a compile-time flag, SEGCHECK, to be kept in segcheck.h. The
  424. flag will normally be off, which saves time, space and
  425. inappropriate warnings.
  426. 28-Oct-87 Dick Grune (dick) at dick
  427. Small changes:
  428. - put Malloc etc in a header file: alloc.h
  429. - removed dt_ldf() (unused)
  430. - make static routines and data PRIVATE, to allow both
  431. static and extern
  432. 25-Oct-87 Dick Grune (dick) at dick
  433. arg_lae() should not check against HB but against max_addr, for
  434. funny address calculations as performed by e.g. lex.
  435. 14-Oct-87 Dick Grune (dick) at dick
  436. Exece in moncalls.c cannot succeed (if it succeeds, it's gone!)
  437. Corresponding code removed and rest straightened out.
  438. 13-Oct-87 Dick Grune (dick) at dick
  439. Brought the interpreter under RCS and CVS.
  440. 12-Oct-87 Dick Grune (dick) at dick
  441. Added a -t option in main.c to switch the tallying on.
  442. 11-Oct-87 Dick Grune (dick) at dick
  443. Added two routines, tally() and out_tally() for (you guessed it)
  444. tallying. out_tally() produces a readable file with for each
  445. source file the name followed by a number of lines, each
  446. containing a line number, the number of times that line was
  447. entered and the number of instructions executed on that line.
  448. Somebody should write a program to merge this with the original
  449. files.
  450. 3-Oct-87 Dick Grune (dick) at dick
  451. Added routines for fabs(), pow() and floor() to avoid having to
  452. invoke -lm.
  453. 2-Oct-87 Dick Grune (dick) at dick
  454. Floating point constants that started with a . were read
  455. incorrectly, as the mantissa was not initialized in that case.
  456. 25-Sep-87 Dick Grune (dick) at tjalk
  457. All access to the LIN and FIL information has been brought
  458. together in a header file linfil.h, which contains #defines for
  459. putLIN(), getLIN(), putFIL() and getFIL().
  460. 20-Sep-87 Dick Grune (dick) at tjalk
  461. Added a routine core_dump() which dumps core after a fatal error.
  462. The core image consists of the values of the EM parameters and
  463. registers, by name; ie.
  464. wsize=4
  465. psize=4
  466. ML=4294967295
  467. HB=816
  468. etc., one to a line, followed by
  469. fwrite(text, 1, DB, core_file);
  470. fwrite(FRA, 1, FRALimit, core_file);
  471. fwrite(data, 1, HL, core_file);
  472. fwrite(stack, 1, ML+1-SL, core_file);
  473. possibly followed by
  474. fwrite(FRA_sh, 1, FRALimit, core_file);
  475. fwrite(data_sh, 1, HL, core_file);
  476. fwrite(stack_sh, 1, ML+1-SL, core_file);
  477. so somebody could write a formatter for it.
  478. 18-Sep-87 Dick Grune (dick) at tjalk
  479. The function return area was a fixed-size array. Now it is
  480. allocated through Malloc(), like the other memory constituents of
  481. the EM machine. This introduced the -R-option, to set the size of
  482. the return area (default is 8).
  483. 13-Sep-87 Dick Grune (dick) at tjalk
  484. Restructured global.h to better reflect what are EM registers and
  485. what are implementation variables. This introduced read.h to
  486. concentrate the EM header quantities.
  487. 10-Sep-87 Dick Grune (dick) at tjalk
  488. Implemented a shell-variable STOP= more or less analogous to LOG=
  489. such that a call of the interpreter
  490. STOP=321456 int ...
  491. will stop the interpreter after an instruction count of 321456, to
  492. avoid run-away interpreters.
  493. 27-Aug-87 Dick Grune (dick) at tjalk
  494. The idea has been raised to let int read the default values of
  495. LOG, LOGMASK, etc., for a file in the working directory, e.g.
  496. .em_intrc or so. I have not done so since only for the LOGMASK
  497. a reasonable default can be given; the others are case-specific.
  498. So I gave LOGMASK the default value "A-Z9d1twx9" instead.
  499. 25-Aug-87 Dick Grune (dick) at tjalk
  500. Changed the name of the instruction counter from ino to inr, to
  501. avoid confusion with "inode numbers".
  502. 20-Aug-87 Dick Grune (dick) at tjalk
  503. The EM report specifies a list of UNIX Version 7 -like system
  504. calls, not full access to the system calls on the underlying
  505. machine. Therefore an attempt has been made to use or emulate
  506. the Version 7 system calls on the various machines.
  507. 18-Aug-87 Dick Grune (dick) at tjalk
  508. Introduced a file sysidf.h which holds the #define for the
  509. present system: BSD4_1, BSD4_2 or SYS_V0. Based on these, it
  510. defines generic #defines: BSD_X and SYS_V . Added various
  511. #ifdefs for the various systems, guided by cc, acc and lint.
  512. 16-Aug-87 Dick Grune (dick) at tjalk
  513. There were some portability problems with dup2 .
  514. Since dup2 is not available on all UNIX systems, and since
  515. it was a kludge in the first place, I implemented a routine
  516. move_file_descriptor, again with slightly different semantics:
  517. it closes the original file descriptor. (io.c)
  518. 13-Aug-87 Dick Grune (dick) at tjalk
  519. Renamed set_log to set_lmask and set_log_file to set_lfile, all in
  520. the name of System V compatibility. Perhaps we should rename
  521. everything, to SetLogMask, SetLogFile, etc., Modula-2 style.
  522. 13-Aug-87 Dick Grune (dick) at tjalk
  523. And changed names like do_LAEl4 to DoLAEl4, to get them through
  524. the assembler in System V.
  525. 11-Aug-87 Dick Grune (dick) at tjalk
  526. Changed names like do_LAEl4 to do_lae_l4, to keep within 8
  527. characters.
  528. 10-Jul-87 Dick Grune (dick) at tjalk
  529. Introduced monstruct.h and monstruct.c, to contain the code for
  530. copying UNIX system call structures to and from EM MON call
  531. structures.
  532. 9-Jul-87 Dick Grune (dick) at tjalk
  533. Made -W option always available.
  534. 8-Jul-87 Dick Grune (dick) at tjalk
  535. Why is the -W option available only when CHECKING is on? What am I
  536. missing?
  537. 6-Jul-87 Dick Grune (dick) at tjalk
  538. It turned out that emsig.h is included in m_sigtrp.c only and
  539. contains only definitions of functions from same m_sigtrp.c.
  540. Eliminated emsig.h.
  541. Better identification of the position from where a message is
  542. given, through the new routine position().
  543. 3-Jul-87 Dick Grune (dick) at tjalk
  544. Did the rest of dump.c (and found an error in the administration
  545. of the undefineds in hp_dump).
  546. Changed LOG to LOGGING, and log(( to LOG((, just for
  547. readability and uniformity.
  548. 2-Jul-87 Dick Grune (dick) at tjalk
  549. Changed switch.c to be a normal file in this directory; it now
  550. includes the cases in the switch from ../switch/cases , which
  551. allows greater freedom in programming the rest of switch.c.
  552. 1-Jul-87 Dick Grune (dick) at tjalk
  553. Read.c nested to excessive length. Isolated a function rd_descr()
  554. which reads one descriptor.
  555. There were many almost similar #defines for setting bits in
  556. 'trapped'. Concentrated them in arm_trap(ENUMBER).
  557. 30-Jun-87 Dick Grune (dick) at tjalk
  558. Handling of failure of ftime (moncalls.c) was wrong. Corrected.
  559. Corrected many lint gripes.
  560. 28-Jun-87 Dick Grune (dick) at tjalk
  561. The routine st_dump in dump.c does nothing but testing whether
  562. or not to log at level d1. Why not test so right at the
  563. beginning? So I did: the same test now runs in 7 sec. See macro
  564. interesting() in dump.c.
  565. 25-Jun-87 Dick Grune (dick) at tjalk
  566. Restructured the file dump.c, because of excessive nesting depth.
  567. The result, however, was an efficiency loss of 50 % (from 65 sec.
  568. to 96 sec.!). The restructuring will have to be rethought!
  569. 24-Jun-87 Dick Grune (dick) at tjalk
  570. The shadow-byte checking macro's are used only in data.c, dump.c
  571. and stack.c. They are brought into a new header file, shadow.h,
  572. which reduces the weight of mem.h.
  573. 22-Jun-87 Dick Grune (dick) at tjalk
  574. Removed or changed macros that assign to their parameters; these
  575. introduce a parameter mechanism that is alien to C and is misleading.
  576. Made testing calls of malloc and realloc into functions Malloc and
  577. Realloc in init.c.
  578. 21-Jun-87 Dick Grune (dick) at tjalk
  579. Created global.c to contain the actual definitions from
  580. global.h. The declarations stay behind in global.h , thus
  581. avoiding multiple definitions.
  582. Removed io.h altogether. All handling of the EM object file is
  583. now concentrated in read.c (fopen was in io.c, fclose in init.c).
  584. 21-Jun-87 Dick Grune (dick) at tjalk
  585. Renamed def.h global.h (in anticipation of global.c ).
  586. Removed test if (warnmark) from init.c. Here warnmark is an
  587. array, an error not caught by the VAX C compiler.
  588. 20-Jun-87 Dick Grune (dick) at tjalk
  589. Removed initializations from .h files. This resulted in the
  590. complete removal of trapmess.h and warnmess.h. Concentrated data
  591. about the return area in return.h. Slimmed down io.h considerably.
  592. 19-Jun-87 Dick Grune (dick) at tjalk
  593. Moved contents of ../include to here (src) since a separate
  594. include directory is only meaningful if it is referenced in other
  595. places as well. Updated Makefile and all #include's.
  596. Replaced SECUNDAIR by SECONDARY and TERTIAIR by TERTIARY.
  597. All files included log.h and nocheck.h , which contain compile
  598. time flags. This is not logical; only the files that use LOG and
  599. NOCHECK should have any business of knowing about them.
  600. Reorganized the files in this sense. Dependencies recalculated by
  601. $(EM)/bin/mkdep.
  602. 18-Jun-87 Dick Grune (dick) at tjalk
  603. More reformatting, especially the complicated #define's.
  604. Established a small test environment.
  605. 17-Jun-87 Dick Grune (dick) at tjalk
  606. Made all indentation conform to tabulation scheme.
  607. Replaced register by register int where appropriate.
  608. 16-Jun-87 Dick Grune (dick) at tjalk
  609. Received the directory from Eddo de Groot and Leo van den Berge.
  610. $Id$