Merge pull request #5 from Arthur2e5/patch-1

README: Recognizing code segments
This commit is contained in:
Artur K. 2015-10-20 06:18:10 +00:00
commit 3561de6e12

View File

@ -3,14 +3,14 @@ I've fixed many issues in this codebase, among other things - memory reallocatio
To reflect those fixes, I've edited the original readme a bit. To reflect those fixes, I've edited the original readme a bit.
* * * * * *
dcc Distribution dcc Distribution
================ ================
The code provided in this distribution is (C) by their authors: The code provided in this distribution is (C) by their authors:
- Cristina Cifuentes (most of dcc code) - Cristina Cifuentes (most of dcc code)
- Mike van Emmerik (signatures and prototype code) - Mike van Emmerik (signatures and prototype code)
- Jeff Ledermann (some disassembly code) - Jeff Ledermann (some disassembly code)
and is provided "as is". Additional contributor list is available and is provided "as is". Additional contributor list is available
[on GitHub](https://github.com/nemerle/dcc/graphs/contributors). [on GitHub](https://github.com/nemerle/dcc/graphs/contributors).
@ -44,19 +44,19 @@ broken in some cases, and we do not have the time to work in this
project at present so we cannot provide any changes. project at present so we cannot provide any changes.
Comments on individual files: Comments on individual files:
- fibo (fibonacci): the small model (fibos.exe) decompiles correctly, - fibo (fibonacci): the small model (fibos.exe) decompiles correctly,
the large model (fibol.exe) expects an extra argument for scanf(). the large model (fibol.exe) expects an extra argument for
This argument is the segment and is not displayed. `scanf()`. This argument is the segment and is not displayed.
- benchsho: the first scanf() takes loc0 as an argument. This is - benchsho: the first `scanf()` takes loc0 as an argument. This is
part of a long variable, but dcc does not have any clue at that part of a long variable, but dcc does not have any clue at that
stage that the stack offset pushed on the stack is to be used stage that the stack offset pushed on the stack is to be used
as a long variable rather than an integer variable. as a long variable rather than an integer variable.
- benchlng: as part of the main() code, LO(loc1) | HI(loc1) should - benchlng: as part of the `main()` code, `LO(loc1) | HI(loc1)` should
be displayed instead of loc3 | loc9. These two integer variables be displayed instead of `loc3 | loc9`. These two integer variables
are equivalent to the one long loc1 variable. are equivalent to the one long loc1 variable.
- benchfn: see benchsho. - benchfn: see benchsho.
- benchmul: see benchsho. - benchmul: see benchsho.
- byteops: decompiles correctly. - byteops: decompiles correctly.
- intops: the du analysis for DIV and MOD is broken. dcc currently - intops: the du analysis for `DIV` and `MOD` is broken. dcc currently
generates code for a long and an integer temporary register that generates code for a long and an integer temporary register that
were used as part of the analysis. were used as part of the analysis.
- longops: decompiles correctly. - longops: decompiles correctly.
@ -77,12 +77,12 @@ Comments on individual files:
- dhamp: this program has far more data types than what dcc recognizes - dhamp: this program has far more data types than what dcc recognizes
at present. at present.
Our thanks to Gary Shaffstall for some debugging work. Current bugs Our thanks to Gary Shaffstall for some debugging work. Current bugs
are: are:
- [ ] if the code generated in the one line is too long, the (static) - [ ] if the code generated in the one line is too long, the (static)
buffer used for that line is clobbered. Solution: make the buffer buffer used for that line is clobbered. Solution: make the buffer
larger (currently 200 chars). larger (currently 200 chars).
- [ ] the large memory model problem & scanf() - [ ] the large memory model problem & `scanf()`
- [ ] dcc's error message shows a p option available which doesn't - [ ] dcc's error message shows a p option available which doesn't
exist, and doesn't show an i option which exists. exist, and doesn't show an i option which exists.
- [x] there is a nasty problem whereby some arrays can get reallocated - [x] there is a nasty problem whereby some arrays can get reallocated
@ -104,24 +104,24 @@ Using dcc
Here is a very brief summary of switches for dcc: Here is a very brief summary of switches for dcc:
* a1, a2: assembler output, before and after re-ordering of input code * `a1`, `a2`: assembler output, before and after re-ordering of input code
* c: Attempt to follow control through indirect call instructions * `c`: Attempt to follow control through indirect call instructions
* i: Enter interactive disassembler * `i`: Enter interactive disassembler
* m: Memory map * `m`: Memory map
* s: Statistics summary * `s`: Statistics summary
* v, V: verbose (and Very verbose) * `v`, `V`: verbose (and Very verbose)
* o filename: Use filename as assembler output file * `o` filename: Use filename as assembler output file
If dcc encounters illegal instructions, it will attempt to enter the so called If dcc encounters illegal instructions, it will attempt to enter the so called
interactive disassembler. The idea of this was to allow commands to fix the interactive disassembler. The idea of this was to allow commands to fix the
problem so that dcc could continue, but no such changes are implemented problem so that dcc could continue, but no such changes are implemented
as yet. (Note: the Unix versions do not have the interactive disassembler). If as yet. (Note: the Unix versions do not have the interactive disassembler). If
you get into this, you can get out of it by pressing ^X (control-X). Once dcc you get into this, you can get out of it by pressing `^X` (control-X). Once dcc
has entered the interactive disassembler, however, there is little chance that has entered the interactive disassembler, however, there is little chance that
it will recover and produce useful output. it will recover and produce useful output.
If dcc loads the signature file dccxxx.sig, this means that it has not If dcc loads the signature file `dccxxx.sig`, this means that it has not
recognised the compiler library used. You can place the signatures in a recognised the compiler library used. You can place the signatures in a
different direcory to where you are working if you set the DCC environment different direcory to where you are working if you set the DCC environment
variable to point to their path. Note that if dcc can't find its signature files, it variable to point to their path. Note that if dcc can't find its signature
will be severely handicapped. files, it will be severely handicapped.