exits successfully lol
This commit is contained in:
@@ -602,7 +602,8 @@ seljmp(Blk *b, Fn *fn)
|
||||
|
||||
if (b->jmp.type == Jret0
|
||||
|| b->jmp.type == Jjmp
|
||||
|| b->jmp.type == Jhlt)
|
||||
|| b->jmp.type == Jhlt
|
||||
|| b->jmp.type == Jtail)
|
||||
return;
|
||||
assert(b->jmp.type == Jjnz);
|
||||
r = b->jmp.arg;
|
||||
|
||||
14
amd64/sysv.c
14
amd64/sysv.c
@@ -167,7 +167,7 @@ argsclass(Ins *i0, Ins *i1, AClass *ac, int op, AClass *aret, Ref *env)
|
||||
nsse = 8;
|
||||
varc = 0;
|
||||
envc = 0;
|
||||
for (i=i0, a=ac; i<i1; i++, a++)
|
||||
for (i=i0, a=ac; i<i1; i++, a++) {
|
||||
switch (i->op - op + Oarg) {
|
||||
case Oarg:
|
||||
if (KBASE(i->cls) == 0)
|
||||
@@ -211,8 +211,9 @@ argsclass(Ins *i0, Ins *i1, AClass *ac, int op, AClass *aret, Ref *env)
|
||||
varc = 1;
|
||||
break;
|
||||
default:
|
||||
die("unreachable");
|
||||
die("218 unreachable");
|
||||
}
|
||||
}
|
||||
|
||||
if (varc && envc)
|
||||
err("sysv abi does not support variadic env calls");
|
||||
@@ -686,7 +687,7 @@ amd64_sysv_abi(Fn *fn)
|
||||
continue;
|
||||
curi = &insb[NIns];
|
||||
selret(b, fn);
|
||||
for (i=&b->ins[b->nins]; i!=b->ins;)
|
||||
for (i=&b->ins[b->nins]; i!=b->ins;) {
|
||||
switch ((--i)->op) {
|
||||
default:
|
||||
emiti(*i);
|
||||
@@ -706,8 +707,13 @@ amd64_sysv_abi(Fn *fn)
|
||||
break;
|
||||
case Oarg:
|
||||
case Oargc:
|
||||
die("unreachable");
|
||||
if (b->jmp.type != Jtail) {
|
||||
die("710 unreachable");
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if (b == fn->start)
|
||||
for (; ral; ral=ral->link)
|
||||
emiti(ral->i);
|
||||
|
||||
Reference in New Issue
Block a user