It appears that the parameter to lol technically has to be word aligned; having

a non-word aligned parameter is illegal (but most of the toolchain accepts it).
So, word align data structures for em22.
This commit is contained in:
David Given 2018-06-12 20:54:15 +09:00
parent 4a249b1bdb
commit 6ae38887a7
4 changed files with 10 additions and 11 deletions

View file

@ -5,5 +5,6 @@ return installable {
map = {
["$(PLATIND)/descr/em22"] = "./descr",
"util/opt+pkg",
"util/ass+pkg",
}
}

View file

@ -1,17 +1,17 @@
var w=2
var wa=1
var wa=2
var p=2
var pa=1
var pa=2
var s=2
var sa=1
var sa=2
var l=4
var la=1
var la=2
var f=4
var fa=1
var fa=2
var d=8
var da=1
var da=2
var x=8
var xa=1
var xa=2
var ARCH=em22
var PLATFORM=em22
var PLATFORMDIR={EM}/share/ack/{PLATFORM}
@ -19,7 +19,7 @@ var CPP_F=-D__unix
var ALIGN=-a0:2 -a1:2 -a2:2 -a3:2
var MACHOPT_F=-m8
var EGO_PLAT_FLAGS=-M{EM}/share/ack/ego/{ARCH}.descr
var SIZE_FLAG=-sl
var SIZE_FLAG=-sx
# Override the setting in fe so that files compiled for this platform can see
# the platform-specific headers.

View file

@ -148,7 +148,6 @@ char *findfit(instr,val) int instr ; cons_t val ; {
int found, flags, number ;
char *opc ;
fprintf(stderr, "findfit(%d)\n", instr);
endc = opindex[instr+1] ;
for ( currc=opindex[instr], found=0 ;
!found && currc<endc ; currc++ ) {
@ -170,7 +169,6 @@ fprintf(stderr, "findfit(%d)\n", instr);
char *findnop(instr) int instr ; {
register char *currc,*endc ;
fprintf(stderr, "findnop(%d)\n", instr);
endc = opindex[instr+1] ;
for ( currc=opindex[instr] ; currc<endc ; currc++ ) {
switch ( ctrunc(*currc)&OPTYPE ) {

View file

@ -265,7 +265,7 @@ writeout() {
elem[sp_lmnem-sp_fmnem+1]=nch ;
printf("0 } ;\n\nchar *opindex[] = {\n");
for ( i=0 ; i<=sp_lmnem-sp_fmnem+1 ; i++ ) {
printf(" &opchoice[%d],\n",elem[i]) ;
printf(" &opchoice[%d], /* %d = %s */\n",elem[i], i, em_mnem[i]) ;
}
printf("} ;\n") ;
}