History

match jumps/ops with il text

Quentin Carbonneaux committed 10 years ago

Commit 657c3fa1 parent b7debc411 files · +509 −509Browse files

Showing the changes to parse.c (1 of 11 files). Show all

Unified · Split

parse.c+114−114
@@ -11,72 +11,72 @@ OpDesc opdesc[NOp] = { · 10 unmodified lines
1111 #define A(a,b,c,d) {[Kw]=K##a, [Kl]=K##b, [Ks]=K##c, [Kd]=K##d}
1212
1313 /* NAME NM ARGCLS0 ARGCLS1 SF LF FLD*/
14− [OAdd] = { "add", 2, {A(w,l,s,d), A(w,l,s,d)}, 1, 0, 1 },
15− [OSub] = { "sub", 2, {A(w,l,s,d), A(w,l,s,d)}, 1, 0, 1 },
16− [ODiv] = { "div", 2, {A(w,l,s,d), A(w,l,s,d)}, 0, 0, 1 },
17− [ORem] = { "rem", 2, {A(w,l,e,e), A(w,l,e,e)}, 0, 0, 1 },
18− [OUDiv] = { "udiv", 2, {A(w,l,e,e), A(w,l,e,e)}, 0, 0, 1 },
19− [OURem] = { "urem", 2, {A(w,l,e,e), A(w,l,e,e)}, 0, 0, 1 },
20− [OMul] = { "mul", 2, {A(w,l,s,d), A(w,l,s,d)}, 0, 0, 1 },
21− [OAnd] = { "and", 2, {A(w,l,e,e), A(w,l,e,e)}, 1, 0, 1 },
22− [OOr] = { "or", 2, {A(w,l,e,e), A(w,l,e,e)}, 1, 0, 1 },
23− [OXor] = { "xor", 2, {A(w,l,e,e), A(w,l,e,e)}, 1, 0, 1 },
24− [OSar] = { "sar", 1, {A(w,l,e,e), A(w,w,e,e)}, 1, 0, 1 },
25− [OShr] = { "shr", 1, {A(w,l,e,e), A(w,w,e,e)}, 1, 0, 1 },
26− [OShl] = { "shl", 1, {A(w,l,e,e), A(w,w,e,e)}, 1, 0, 1 },
27− [OStored] = { "stored", 0, {A(d,d,d,d), A(m,m,m,m)}, 0, 1, 0 },
28− [OStores] = { "stores", 0, {A(s,s,s,s), A(m,m,m,m)}, 0, 1, 0 },
29− [OStorel] = { "storel", 0, {A(l,l,l,l), A(m,m,m,m)}, 0, 1, 0 },
30− [OStorew] = { "storew", 0, {A(w,w,w,w), A(m,m,m,m)}, 0, 1, 0 },
31− [OStoreh] = { "storeh", 0, {A(w,w,w,w), A(m,m,m,m)}, 0, 1, 0 },
32− [OStoreb] = { "storeb", 0, {A(w,w,w,w), A(m,m,m,m)}, 0, 1, 0 },
33− [OLoad] = { "load", 0, {A(m,m,m,m), A(x,x,x,x)}, 0, 1, 0 },
34− [OLoadsw] = { "loadsw", 0, {A(m,m,e,e), A(x,x,e,e)}, 0, 1, 0 },
35− [OLoaduw] = { "loaduw", 0, {A(m,m,e,e), A(x,x,e,e)}, 0, 1, 0 },
36− [OLoadsh] = { "loadsh", 0, {A(m,m,e,e), A(x,x,e,e)}, 0, 1, 0 },
37− [OLoaduh] = { "loaduh", 0, {A(m,m,e,e), A(x,x,e,e)}, 0, 1, 0 },
38− [OLoadsb] = { "loadsb", 0, {A(m,m,e,e), A(x,x,e,e)}, 0, 1, 0 },
39− [OLoadub] = { "loadub", 0, {A(m,m,e,e), A(x,x,e,e)}, 0, 1, 0 },
40− [OExtsw] = { "extsw", 0, {A(e,w,e,e), A(e,x,e,e)}, 0, 1, 1 },
41− [OExtuw] = { "extuw", 0, {A(e,w,e,e), A(e,x,e,e)}, 0, 1, 1 },
42− [OExtsh] = { "extsh", 0, {A(w,w,e,e), A(x,x,e,e)}, 0, 1, 1 },
43− [OExtuh] = { "extuh", 0, {A(w,w,e,e), A(x,x,e,e)}, 0, 1, 1 },
44− [OExtsb] = { "extsb", 0, {A(w,w,e,e), A(x,x,e,e)}, 0, 1, 1 },
45− [OExtub] = { "extub", 0, {A(w,w,e,e), A(x,x,e,e)}, 0, 1, 1 },
46− [OExts] = { "exts", 0, {A(e,e,e,s), A(e,e,e,x)}, 0, 1, 1 },
47− [OTruncd] = { "truncd", 0, {A(e,e,d,e), A(e,e,x,e)}, 0, 1, 1 },
48− [OFtosi] = { "ftosi", 0, {A(s,d,e,e), A(x,x,e,e)}, 0, 1, 1 },
49− [OSitof] = { "sitof", 0, {A(e,e,w,l), A(e,e,x,x)}, 0, 1, 1 },
50− [OCast] = { "cast", 0, {A(s,d,w,l), A(x,x,x,x)}, 0, 1, 1 },
51− [OCopy] = { "copy", 1, {A(w,l,s,d), A(x,x,x,x)}, 0, 1, 0 },
52− [ONop] = { "nop", 0, {A(x,x,x,x), A(x,x,x,x)}, 0, 1, 0 },
53− [OSwap] = { "swap", 2, {A(w,l,s,d), A(w,l,s,d)}, 0, 0, 0 },
54− [OSign] = { "sign", 0, {A(w,l,e,e), A(x,x,e,e)}, 0, 0, 0 },
55− [OSAlloc] = { "salloc", 0, {A(e,l,e,e), A(e,x,e,e)}, 0, 0, 0 },
56− [OXIDiv] = { "xidiv", 1, {A(w,l,e,e), A(x,x,e,e)}, 0, 0, 0 },
57− [OXDiv] = { "xdiv", 1, {A(w,l,e,e), A(x,x,e,e)}, 0, 0, 0 },
58− [OXCmp] = { "xcmp", 1, {A(w,l,s,d), A(w,l,s,d)}, 1, 0, 0 },
59− [OXTest] = { "xtest", 1, {A(w,l,e,e), A(w,l,e,e)}, 1, 0, 0 },
60− [OAddr] = { "addr", 0, {A(m,m,e,e), A(x,x,e,e)}, 0, 1, 0 },
61− [OPar] = { "parn", 0, {A(x,x,x,x), A(x,x,x,x)}, 0, 0, 0 },
62− [OParc] = { "parc", 0, {A(e,x,e,e), A(e,x,e,e)}, 0, 0, 0 },
63− [OArg] = { "arg", 0, {A(w,l,s,d), A(x,x,x,x)}, 0, 0, 0 },
64− [OArgc] = { "argc", 0, {A(e,x,e,e), A(e,l,e,e)}, 0, 0, 0 },
65− [OCall] = { "call", 0, {A(m,m,m,m), A(x,x,x,x)}, 0, 0, 0 },
66− [OXSetnp] = { "xsetnp", 0, {A(x,x,e,e), A(x,x,e,e)}, 0, 0, 0 },
67− [OXSetp] = { "xsetp", 0, {A(x,x,e,e), A(x,x,e,e)}, 0, 0, 0 },
68− [OAlloc] = { "alloc4", 1, {A(e,l,e,e), A(e,x,e,e)}, 0, 0, 0 },
69− [OAlloc+1] = { "alloc8", 1, {A(e,l,e,e), A(e,x,e,e)}, 0, 0, 0 },
70− [OAlloc+2] = { "alloc16", 1, {A(e,l,e,e), A(e,x,e,e)}, 0, 0, 0 },
14+ [Oadd] = { "add", 2, {A(w,l,s,d), A(w,l,s,d)}, 1, 0, 1 },
15+ [Osub] = { "sub", 2, {A(w,l,s,d), A(w,l,s,d)}, 1, 0, 1 },
16+ [Odiv] = { "div", 2, {A(w,l,s,d), A(w,l,s,d)}, 0, 0, 1 },
17+ [Orem] = { "rem", 2, {A(w,l,e,e), A(w,l,e,e)}, 0, 0, 1 },
18+ [Oudiv] = { "udiv", 2, {A(w,l,e,e), A(w,l,e,e)}, 0, 0, 1 },
19+ [Ourem] = { "urem", 2, {A(w,l,e,e), A(w,l,e,e)}, 0, 0, 1 },
20+ [Omul] = { "mul", 2, {A(w,l,s,d), A(w,l,s,d)}, 0, 0, 1 },
21+ [Oand] = { "and", 2, {A(w,l,e,e), A(w,l,e,e)}, 1, 0, 1 },
22+ [Oor] = { "or", 2, {A(w,l,e,e), A(w,l,e,e)}, 1, 0, 1 },
23+ [Oxor] = { "xor", 2, {A(w,l,e,e), A(w,l,e,e)}, 1, 0, 1 },
24+ [Osar] = { "sar", 1, {A(w,l,e,e), A(w,w,e,e)}, 1, 0, 1 },
25+ [Oshr] = { "shr", 1, {A(w,l,e,e), A(w,w,e,e)}, 1, 0, 1 },
26+ [Oshl] = { "shl", 1, {A(w,l,e,e), A(w,w,e,e)}, 1, 0, 1 },
27+ [Ostored] = { "stored", 0, {A(d,d,d,d), A(m,m,m,m)}, 0, 1, 0 },
28+ [Ostores] = { "stores", 0, {A(s,s,s,s), A(m,m,m,m)}, 0, 1, 0 },
29+ [Ostorel] = { "storel", 0, {A(l,l,l,l), A(m,m,m,m)}, 0, 1, 0 },
30+ [Ostorew] = { "storew", 0, {A(w,w,w,w), A(m,m,m,m)}, 0, 1, 0 },
31+ [Ostoreh] = { "storeh", 0, {A(w,w,w,w), A(m,m,m,m)}, 0, 1, 0 },
32+ [Ostoreb] = { "storeb", 0, {A(w,w,w,w), A(m,m,m,m)}, 0, 1, 0 },
33+ [Oload] = { "load", 0, {A(m,m,m,m), A(x,x,x,x)}, 0, 1, 0 },
34+ [Oloadsw] = { "loadsw", 0, {A(m,m,e,e), A(x,x,e,e)}, 0, 1, 0 },
35+ [Oloaduw] = { "loaduw", 0, {A(m,m,e,e), A(x,x,e,e)}, 0, 1, 0 },
36+ [Oloadsh] = { "loadsh", 0, {A(m,m,e,e), A(x,x,e,e)}, 0, 1, 0 },
37+ [Oloaduh] = { "loaduh", 0, {A(m,m,e,e), A(x,x,e,e)}, 0, 1, 0 },
38+ [Oloadsb] = { "loadsb", 0, {A(m,m,e,e), A(x,x,e,e)}, 0, 1, 0 },
39+ [Oloadub] = { "loadub", 0, {A(m,m,e,e), A(x,x,e,e)}, 0, 1, 0 },
40+ [Oextsw] = { "extsw", 0, {A(e,w,e,e), A(e,x,e,e)}, 0, 1, 1 },
41+ [Oextuw] = { "extuw", 0, {A(e,w,e,e), A(e,x,e,e)}, 0, 1, 1 },
42+ [Oextsh] = { "extsh", 0, {A(w,w,e,e), A(x,x,e,e)}, 0, 1, 1 },
43+ [Oextuh] = { "extuh", 0, {A(w,w,e,e), A(x,x,e,e)}, 0, 1, 1 },
44+ [Oextsb] = { "extsb", 0, {A(w,w,e,e), A(x,x,e,e)}, 0, 1, 1 },
45+ [Oextub] = { "extub", 0, {A(w,w,e,e), A(x,x,e,e)}, 0, 1, 1 },
46+ [Oexts] = { "exts", 0, {A(e,e,e,s), A(e,e,e,x)}, 0, 1, 1 },
47+ [Otruncd] = { "truncd", 0, {A(e,e,d,e), A(e,e,x,e)}, 0, 1, 1 },
48+ [Oftosi] = { "ftosi", 0, {A(s,d,e,e), A(x,x,e,e)}, 0, 1, 1 },
49+ [Ositof] = { "sitof", 0, {A(e,e,w,l), A(e,e,x,x)}, 0, 1, 1 },
50+ [Ocast] = { "cast", 0, {A(s,d,w,l), A(x,x,x,x)}, 0, 1, 1 },
51+ [Ocopy] = { "copy", 1, {A(w,l,s,d), A(x,x,x,x)}, 0, 1, 0 },
52+ [Onop] = { "nop", 0, {A(x,x,x,x), A(x,x,x,x)}, 0, 1, 0 },
53+ [Oswap] = { "swap", 2, {A(w,l,s,d), A(w,l,s,d)}, 0, 0, 0 },
54+ [Osign] = { "sign", 0, {A(w,l,e,e), A(x,x,e,e)}, 0, 0, 0 },
55+ [Osalloc] = { "salloc", 0, {A(e,l,e,e), A(e,x,e,e)}, 0, 0, 0 },
56+ [Oxidiv] = { "xidiv", 1, {A(w,l,e,e), A(x,x,e,e)}, 0, 0, 0 },
57+ [Oxdiv] = { "xdiv", 1, {A(w,l,e,e), A(x,x,e,e)}, 0, 0, 0 },
58+ [Oxcmp] = { "xcmp", 1, {A(w,l,s,d), A(w,l,s,d)}, 1, 0, 0 },
59+ [Oxtest] = { "xtest", 1, {A(w,l,e,e), A(w,l,e,e)}, 1, 0, 0 },
60+ [Oaddr] = { "addr", 0, {A(m,m,e,e), A(x,x,e,e)}, 0, 1, 0 },
61+ [Opar] = { "parn", 0, {A(x,x,x,x), A(x,x,x,x)}, 0, 0, 0 },
62+ [Oparc] = { "parc", 0, {A(e,x,e,e), A(e,x,e,e)}, 0, 0, 0 },
63+ [Oarg] = { "arg", 0, {A(w,l,s,d), A(x,x,x,x)}, 0, 0, 0 },
64+ [Oargc] = { "argc", 0, {A(e,x,e,e), A(e,l,e,e)}, 0, 0, 0 },
65+ [Ocall] = { "call", 0, {A(m,m,m,m), A(x,x,x,x)}, 0, 0, 0 },
66+ [Oxsetnp] = { "xsetnp", 0, {A(x,x,e,e), A(x,x,e,e)}, 0, 0, 0 },
67+ [Oxsetp] = { "xsetp", 0, {A(x,x,e,e), A(x,x,e,e)}, 0, 0, 0 },
68+ [Oalloc] = { "alloc4", 1, {A(e,l,e,e), A(e,x,e,e)}, 0, 0, 0 },
69+ [Oalloc+1] = { "alloc8", 1, {A(e,l,e,e), A(e,x,e,e)}, 0, 0, 0 },
70+ [Oalloc+2] = { "alloc16", 1, {A(e,l,e,e), A(e,x,e,e)}, 0, 0, 0 },
7171 #define X(c) \
72− [OCmpw+IC##c] = { "c" #c "w", 0, {A(w,w,e,e), A(w,w,e,e)}, 1, 0, 1 }, \
73− [OCmpl+IC##c] = { "c" #c "l", 0, {A(l,l,e,e), A(l,l,e,e)}, 1, 0, 1 }, \
74− [OXSet+IC##c] = { "xset" #c, 0, {A(x,x,e,e), A(x,x,e,e)}, 0, 1, 0 },
72+ [Ocmpw+IC##c] = { "c" #c "w", 0, {A(w,w,e,e), A(w,w,e,e)}, 1, 0, 1 }, \
73+ [Ocmpl+IC##c] = { "c" #c "l", 0, {A(l,l,e,e), A(l,l,e,e)}, 1, 0, 1 }, \
74+ [Oxset+IC##c] = { "xset" #c, 0, {A(x,x,e,e), A(x,x,e,e)}, 0, 1, 0 },
7575 ICMPS(X)
7676 #undef X
7777 #define X(c) \
78− [OCmps+FC##c] = { "c" #c "s", 0, {A(s,s,e,e), A(s,s,e,e)}, 1, 0, 1 }, \
79− [OCmpd+FC##c] = { "c" #c "d", 0, {A(d,d,e,e), A(d,d,e,e)}, 1, 0, 1 },
78+ [Ocmps+FC##c] = { "c" #c "s", 0, {A(s,s,e,e), A(s,s,e,e)}, 1, 0, 1 }, \
79+ [Ocmpd+FC##c] = { "c" #c "d", 0, {A(d,d,e,e), A(d,d,e,e)}, 1, 0, 1 },
8080 FCMPS(X)
8181 #undef X
8282
@@ -191,12 +191,12 @@ lex() · 108 unmodified lines
191191 { "d", TD },
192192 { "s", TS },
193193 { "z", TZ },
194− { "loadw", OLoad }, /* for convenience */
195− { "loadl", OLoad },
196− { "loads", OLoad },
197− { "loadd", OLoad },
198− { "alloc1", OAlloc },
199− { "alloc2", OAlloc },
194+ { "loadw", Oload }, /* for convenience */
195+ { "loadl", Oload },
196+ { "loads", Oload },
197+ { "loadd", Oload },
198+ { "alloc1", Oalloc },
199+ { "alloc2", Oalloc },
200200 { 0, TXXX }
201201 };
202202 static char tok[NString];
@@ -453,14 +453,14 @@ parserefl(int arg) · 250 unmodified lines
453453 err("invalid function parameter");
454454 if (k == 4)
455455 if (arg)
456− *curi = (Ins){OArgc, R, {TYPE(ty), r}, Kl};
456+ *curi = (Ins){Oargc, R, {TYPE(ty), r}, Kl};
457457 else
458− *curi = (Ins){OParc, r, {TYPE(ty)}, Kl};
458+ *curi = (Ins){Oparc, r, {TYPE(ty)}, Kl};
459459 else
460460 if (arg)
461− *curi = (Ins){OArg, R, {r}, k};
461+ *curi = (Ins){Oarg, R, {r}, k};
462462 else
463− *curi = (Ins){OPar, r, {R}, k};
463+ *curi = (Ins){Opar, r, {R}, k};
464464 curi++;
465465 if (peek() == TRParen)
466466 break;
@@ -522,12 +522,12 @@ parseline(PState ps) · 55 unmodified lines
522522 break;
523523 case TLbl:
524524 b = findblk(tokval.str);
525− if (curb && curb->jmp.type == JXXX) {
525+ if (curb && curb->jmp.type == Jxxx) {
526526 closeblk();
527− curb->jmp.type = JJmp;
527+ curb->jmp.type = Jjmp;
528528 curb->s1 = b;
529529 }
530− if (b->jmp.type != JXXX)
530+ if (b->jmp.type != Jxxx)
531531 err("multiple definitions of block @%s", b->name);
532532 *blink = b;
533533 curb = b;
@@ -536,9 +536,9 @@ parseline(PState ps) · 2 unmodified lines
536536 return PPhi;
537537 case TRet:
538538 curb->jmp.type = (int[]){
539− JRetw, JRetl,
540− JRets, JRetd,
541− JRetc, JRet0
539+ Jretw, Jretl,
540+ Jrets, Jretd,
541+ Jretc, Jret0
542542 }[rcls];
543543 if (rcls < 5) {
544544 r = parseref();
@@ -548,10 +548,10 @@ parseline(PState ps) · 3 unmodified lines
548548 }
549549 goto Close;
550550 case TJmp:
551− curb->jmp.type = JJmp;
551+ curb->jmp.type = Jjmp;
552552 goto Jump;
553553 case TJnz:
554− curb->jmp.type = JJnz;
554+ curb->jmp.type = Jjnz;
555555 r = parseref();
556556 if (req(r, R))
557557 err("invalid argument for jnz jump");
@@ -560,7 +560,7 @@ parseline(PState ps) · 2 unmodified lines
560560 Jump:
561561 expect(TLbl);
562562 curb->s1 = findblk(tokval.str);
563− if (curb->jmp.type != JJmp) {
563+ if (curb->jmp.type != Jjmp) {
564564 expect(TComma);
565565 expect(TLbl);
566566 curb->s2 = findblk(tokval.str);
@@ -586,7 +586,7 @@ DoOp: · 19 unmodified lines
586586 arg[0] = parseref();
587587 parserefl(1);
588588 expect(TNL);
589− op = OCall;
589+ op = Ocall;
590590 if (k == 4) {
591591 k = Kl;
592592 arg[1] = TYPE(ty);
@@ -721,19 +721,19 @@ typecheck(Fn *fn) · 128 unmodified lines
721721 }
722722 r = b->jmp.arg;
723723 if (isret(b->jmp.type)) {
724− if (b->jmp.type == JRetc) {
724+ if (b->jmp.type == Jretc) {
725725 if (!usecheck(r, Kl, fn))
726726 goto JErr;
727− } else if (!usecheck(r, b->jmp.type-JRetw, fn))
727+ } else if (!usecheck(r, b->jmp.type-Jretw, fn))
728728 goto JErr;
729729 }
730− if (b->jmp.type == JJnz && !usecheck(r, Kw, fn))
730+ if (b->jmp.type == Jjnz && !usecheck(r, Kw, fn))
731731 JErr:
732732 err("invalid type for jump argument %%%s in block @%s",
733733 fn->tmp[r.val].name, b->name);
734− if (b->s1 && b->s1->jmp.type == JXXX)
734+ if (b->s1 && b->s1->jmp.type == Jxxx)
735735 err("block @%s is used undefined", b->s1->name);
736− if (b->s2 && b->s2->jmp.type == JXXX)
736+ if (b->s2 && b->s2->jmp.type == Jxxx)
737737 err("block @%s is used undefined", b->s2->name);
738738 }
739739 }
@@ -775,7 +775,7 @@ parsefn(int export) · 35 unmodified lines
775775 while (ps != PEnd);
776776 if (!curb)
777777 err("empty function");
778− if (curb->jmp.type == JXXX)
778+ if (curb->jmp.type == Jxxx)
779779 err("last block misses jump");
780780 curf->mem = vnew(0, sizeof curf->mem[0]);
781781 curf->nmem = 0;
@@ -1086,26 +1086,26 @@ void · 304 unmodified lines
10861086 printfn(Fn *fn, FILE *f)
10871087 {
10881088 static char *jtoa[NJmp] = {
1089− [JRet0] = "ret",
1090− [JRetw] = "retw",
1091− [JRetl] = "retl",
1092− [JRetc] = "retc",
1093− [JRets] = "rets",
1094− [JRetd] = "retd",
1095− [JJnz] = "jnz",
1096− [JXJnp] = "xjnp",
1097− [JXJp] = "xjp",
1098− #define X(c) [JXJc+IC##c] = "xj" #c,
1089+ [Jret0] = "ret",
1090+ [Jretw] = "retw",
1091+ [Jretl] = "retl",
1092+ [Jretc] = "retc",
1093+ [Jrets] = "rets",
1094+ [Jretd] = "retd",
1095+ [Jjnz] = "jnz",
1096+ [Jxjnp] = "xjnp",
1097+ [Jxjp] = "xjp",
1098+ #define X(c) [Jxjc+IC##c] = "xj" #c,
10991099 ICMPS(X)
11001100 #undef X
11011101 };
11021102 static char prcls[NOp] = {
1103− [OArg] = 1,
1104− [OSwap] = 1,
1105− [OXCmp] = 1,
1106− [OXTest] = 1,
1107− [OXDiv] = 1,
1108− [OXIDiv] = 1,
1103+ [Oarg] = 1,
1104+ [Oswap] = 1,
1105+ [Oxcmp] = 1,
1106+ [Oxtest] = 1,
1107+ [Oxdiv] = 1,
1108+ [Oxidiv] = 1,
11091109 };
11101110 static char ktoc[] = "wlsd";
11111111 Blk *b;
@@ -1154,28 +1154,28 @@ printfn(Fn *fn, FILE *f) · 42 unmodified lines
11541154 fprintf(f, "\n");
11551155 }
11561156 switch (b->jmp.type) {
1157− case JRet0:
1158− case JRetw:
1159− case JRetl:
1160− case JRets:
1161− case JRetd:
1162− case JRetc:
1157+ case Jret0:
1158+ case Jretw:
1159+ case Jretl:
1160+ case Jrets:
1161+ case Jretd:
1162+ case Jretc:
11631163 fprintf(f, "\t%s", jtoa[b->jmp.type]);
1164− if (b->jmp.type != JRet0 || !req(b->jmp.arg, R)) {
1164+ if (b->jmp.type != Jret0 || !req(b->jmp.arg, R)) {
11651165 fprintf(f, " ");
11661166 printref(b->jmp.arg, fn, f);
11671167 }
1168− if (b->jmp.type == JRetc)
1168+ if (b->jmp.type == Jretc)
11691169 fprintf(f, ", :%s", typ[fn->retty].name);
11701170 fprintf(f, "\n");
11711171 break;
1172− case JJmp:
1172+ case Jjmp:
11731173 if (b->s1 != b->link)
11741174 fprintf(f, "\tjmp @%s\n", b->s1->name);
11751175 break;
11761176 default:
11771177 fprintf(f, "\t%s ", jtoa[b->jmp.type]);
1178− if (b->jmp.type == JJnz) {
1178+ if (b->jmp.type == Jjnz) {
11791179 printref(b->jmp.arg, fn, f);
11801180 fprintf(f, ", ");
11811181 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t