ego now builds and is used.

This needed lots of refactoring to ego --- not all platforms have ego descr
files, and ego will just crash if you invoke it without one. I think originally
it was never intended that these platforms would be used at -O2 or above.

Plats now only specify the ego descr file if they have one.
This commit is contained in:
David Given
2016-08-21 22:01:19 +02:00
parent 08823a172c
commit 5bae29a00c
19 changed files with 461 additions and 262 deletions

View File

@@ -72,13 +72,26 @@ char* argv[];
* - ddump: the names of all data blocks
*/
FILE* lfile, *dfile, *pfile, *pdump, *ddump;
/* The input file names */
const char* pdump_out = argv[1];
const char* ddump_out = argv[2];
/* The output file names */
const char* pname_out = argv[5];
const char* dname_out = argv[6];
const char* lname_out = argv[7];
FILE* lfile = openfile(lname_out, "w");
FILE* pdump = openfile(pdump_out, "w");
FILE* ddump = openfile(ddump_out, "w");
FILE* dfile;
FILE* pfile;
lfile = openfile(lname2, "w");
pdump = openfile(argv[1], "w");
ddump = openfile(argv[2], "w");
hol0_db = block_of_lab((char*)0);
while (next_file(argc, argv) != NULL)
while (next_file(argc-8, argv+8) != NULL)
{
/* Read all EM input files, process the code
* and concatenate all output.
@@ -104,9 +117,9 @@ char* argv[];
cleanprocs(prochash, NPROCHASH, 0);
cleandblocks(symhash, NSYMHASH, 0);
/* Now write the datablock table and the proctable */
dfile = openfile(dname2, "w");
dfile = openfile(dname_out, "w");
putdtable(fdblock, dfile);
pfile = openfile(pname2, "w");
pfile = openfile(pname_out, "w");
putptable(fproc, pfile, FALSE);
exit(0);
}

View File

@@ -224,7 +224,7 @@ STATIC bool read_hdr()
return 1;
}
STATIC int argcnt = ARGSTART - 1;
STATIC int argcnt = 0;
STATIC short arstate = NO_ARCHIVE;
FILE* next_file(argc, argv) int argc;