From: Rafał Długołęcki Date: Sun, 21 Jul 2013 21:03:17 +0000 (+0200) Subject: vlp-10 using coding style in execute.c X-Git-Tag: 3.1~25 X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=0dbb34f21ea58261b6c6b8bf88246a947c105292;p=vlp.git vlp-10 using coding style in execute.c --- diff --git a/src/int/execute.c b/src/int/execute.c index f1fe9e9..f9d0f91 100644 --- a/src/int/execute.c +++ b/src/int/execute.c @@ -42,570 +42,616 @@ or Andrzej Salwicki void execute() { - word t1, t2; - int i; - real r; - virtaddr virt1, virt2, virt3; - switch (opcode) - { - case 1 : /* LOPENRC */ + word t1, t2; + int i; + real r; + virtaddr virt1, virt2, virt3; + switch (opcode) { + /* LOPENRC */ + case 1: openrc(a3, &virt2, &t2); storevirt(virt2, a1); - M[ a2 ] = t2; + M[a2] = t2; break; - - case 2 : /* LBACKADDR */ + /* LBACKADDR */ + case 2: storevirt(thisp->backobj, a1); - M[ a2 ] = M[ temporary ]; - break; - - case 3 : /* LRAISE */ - ic++; /* skip the address */ - raise_signal(a3, M[ ic-1 ], &t1, &t2); - M[ a1 ] = t1; - M[ a2 ] = t2; - break; - - case 4 : /* LOPEN */ - openobj(M[ a3 ], &t1, &t2); - M[ a1 ] = t1; - M[ a2 ] = t2; - break; - - case 5 : /* LSLOPEN */ + M[a2] = M[temporary]; + break; + /* LRAISE */ + case 3: + /* skip the address */ + ic++; + raise_signal(a3, M[ic - 1], &t1, &t2); + M[a1] = t1; + M[a2] = t2; + break; + /* LOPEN */ + case 4: + openobj(M[a3], &t1, &t2); + M[a1] = t1; + M[a2] = t2; + break; + /* LSLOPEN */ + case 5: loadvirt(virt3, a3); - slopen(M[ a3+APREF ], &virt3, &t1, &t2); - M[ a1 ] = t1; - M[ a2 ] = t2; - break; - - case 15 : /* LTHIS */ - virt1.addr = M[ display2+a2 ]; - virt1.mark = M[ virt1.addr+1 ]; + slopen(M[a3 + APREF], &virt3, &t1, &t2); + M[a1] = t1; + M[a2] = t2; + break; + /* LTHIS */ + case 15: + virt1.addr = M[display2 + a2]; + virt1.mark = M[virt1.addr + 1]; storevirt(virt1, a1); break; - - case 20 : /* LVIRTDISPL */ - t2 = M[ display+a2 ]; - t1 = M[ t2+PROTNUM ]; - M[ a1 ] = M[ prototype[ t1 ]->virtlist+a3 ]; - break; - - case 21 : /* LSTATTYPE */ - M[ a1 ] = a2; - M[ a1+1 ] = a3; - break; - - case 23 : /* LIPAROUT */ - M[ a1 ] = param[ a3 ].xword; - break; - - case 24 : /* LRPAROUT */ - MR(a1) = param[ a3 ].xreal; - break; - - case 25 : /* LVPAROUT */ - storevirt(param[ a3 ].xvirt, a1); - break; - - case 31 : /* LSIGN */ - if (M[ a2 ] == 0) M[ a1 ] = 0; + /* LVIRTDISPL */ + case 20: + t2 = M[display + a2]; + t1 = M[t2 + PROTNUM]; + M[a1] = M[prototype[t1]->virtlist + a3]; + break; + /* LSTATTYPE */ + case 21: + M[a1] = a2; + M[a1 + 1] = a3; + break; + /* LIPAROUT */ + case 23: + M[a1] = param[a3].xword; + break; + /* LRPAROUT */ + case 24: + MR(a1) = param[a3].xreal; + break; + /* LVPAROUT */ + case 25: + storevirt(param[a3].xvirt, a1); + break; + /* LSIGN */ + case 31: + if (M[a2] == 0) + M[a1] = 0; + else if (M[a2] < 0) + M[a1] = -1; else - if (M[ a2 ] < 0) M[ a1 ] = -1; - else M[ a1 ] = 1; + M[a1] = 1; break; - - case 33 : /* LLOWER */ - case 34 : + /* LLOWER */ + case 33: + case 34: loadvirt(virt2, a2); - if (member(&virt2, &t1)) - { - switch ((int) M[ t1+PROTNUM ]) - { - case AINT : t2 = APINT; break; - case AREAL : t2 = APREAL; break; - case AVIRT : t2 = APREF; break; - } - M[ a1 ] = (M[ t1+2 ]+3)/t2; + if (member(&virt2, &t1)) { + switch ((int) M[t1 + PROTNUM]) { + case AINT: + t2 = APINT; + break; + case AREAL: + t2 = APREAL; + break; + case AVIRT: + t2 = APREF; + break; + } + M[a1] = (M[t1 + 2 ] + 3) / t2; } - else errsignal(RTEREFTN); + else + errsignal(RTEREFTN); break; - - case 35 : /* LUPPER */ - case 36 : + /* LUPPER */ + case 35: + case 36: loadvirt(virt2, a2); - if (member(&virt2, &t1)) - { - switch ((int) M[ t1+PROTNUM ]) - { - case AINT : t2 = APINT; break; - case AREAL : t2 = APREAL; break; - case AVIRT : t2 = APREF; break; - } - M[ a1 ] = (M[ t1+2 ]+M[ t1 ])/t2-1; + if (member(&virt2, &t1)) { + switch ((int) M[t1 + PROTNUM]) { + case AINT: + t2 = APINT; + break; + case AREAL: + t2 = APREAL; + break; + case AVIRT: + t2 = APREF; + break; + } + M[a1] = (M[t1 + 2] + M[t1]) / t2 - 1; } - else errsignal(RTEREFTN); + else + errsignal(RTEREFTN); break; - - case 40 : /* LGETTYPE */ - typep(M[ a2 ], a3, &virt1.addr, &virt1.mark); + /* LGETTYPE */ + case 40: + typep(M[a2], a3, &virt1.addr, &virt1.mark); storevirt(virt1, a1); break; - - case 41 : /* LCOPY */ + /* LCOPY */ + case 41: loadvirt(virt2, a2); copy(&virt2, &virt1); storevirt(virt1, a1); break; - - case 42 : /* LNOT */ - M[ a1 ] = ~ M[ a2 ]; + /* LNOT */ + case 42: + M[a1] = ~M[a2]; break; - - case 43 : /* LRCVAVIRT */ /* recover virtual address from ah */ - virt1.addr = M[ a2 ]; - virt1.mark = M[ virt1.addr+1 ]; + /* LRCVAVIRT */ /* recover virtual address from ah */ + case 43: + virt1.addr = M[a2]; + virt1.mark = M[virt1.addr + 1]; storevirt(virt1, a1); break; - - case 44 : /* LVIRTDOT */ - case 45 : - M[ a1 ] = M[ prototype[ M[ temporary ] ]->virtlist+a2 ]; + /* LVIRTDOT */ + case 44: + case 45: + M[a1] = M[prototype[M[temporary]]->virtlist + a2]; break; - - case 46 : /* LADDRPH */ - case 47 : /* LADDRPH2 */ - /* fprintf(stderr, "co ja tu robie?"); */ + /* LADDRPH */ + case 46: + /* LADDRPH2 */ + case 47: + /* fprintf(stderr, "co ja tu robie?"); */ loadvirt(virt2, a2); - if (!member(&virt2, &M[ a1 ])) errsignal(RTEREFTN); + if (!member(&virt2, &M[a1])) + errsignal(RTEREFTN); break; - - case 48 : /* LIABS */ - t2 = M[ a2 ]; - M[ a1 ] = absolute(t2); + /* LIABS */ + case 48: + t2 = M[a2]; + M[a1] = absolute(t2); break; - - case 49 : /* LINEG */ - M[ a1 ] = -M[ a2 ]; + /* LINEG */ + case 49: + M[a1] = -M[a2]; break; - - case 50 : /* LRABS */ + /* LRABS */ + case 50: r = MR(a2); - if( r < (real)0.0 ) - r=(real)0.0-r; + if(r < (real)0.0) + r = (real)0.0 - r; MR(a1) = r; break; - - case 51 : /* LRNEG */ + /* LRNEG */ + case 51: MR(a1) = -MR(a2); break; - - case 52 : /* LPARAMADDR */ - t2 = M[ a2 ]; - M[ a1 ] = t2+M[ prototype[ M[ t2+PROTNUM ] ]->parlist+a3 ]; - break; - - case 54 : /* LLOADT */ - t1 = M[ ic++ ]; /* offset */ - t2 = t1+loadt(M[ M[ a2 ] ], a3); /* object address */ + /* LPARAMADDR */ + case 52: + t2 = M[a2]; + M[a1] = t2 + M[prototype[M[t2 + PROTNUM]]->parlist + a3]; + break; + /* LLOADT */ + case 54: + /* offset */ + t1 = M[ic++]; + /* object address */ + t2 = t1 + loadt(M[M[a2]], a3); loadvirt(virt1, t2); storevirt(virt1, a1); break; - - case 55 : /* LIS */ + /* LIS */ + case 55: loadvirt(virt2, a2); - M[ a1 ] = lbool(is(&virt2, a3)); + M[a1] = lbool(is(&virt2, a3)); break; - - case 56 : /* LIN */ + /* LIN */ + case 56: loadvirt(virt2, a2); - M[ a1 ] = lbool(inl(&virt2, a3)); + M[a1] = lbool(inl(&virt2, a3)); break; - - case 57 : /* LQUA */ + /* LQUA */ + case 57: loadvirt(virt2, a2); - if (member(&virt2, &M[ a1 ])) - qua(&virt2, a3); - else errsignal(RTEREFTN); + if (member(&virt2, &M[a1])) + qua(&virt2, a3); + else + errsignal(RTEREFTN); break; - - case 58 : /* LIFIX */ - M[ a1 ] = (word)( MR(a2) ); + /* LIFIX */ + case 58: + M[a1] = (word)(MR(a2)); break; - - case 59 : /* LFLOAT */ - MR(a1) = (real)( M[ a2 ] ); + /* LFLOAT */ + case 59: + MR(a1) = (real)(M[a2]); break; - - case 60 : /* LIMOVE */ - M[ a1 ] = M[ a2 ]; + /* LIMOVE */ + case 60: + M[a1] = M[a2]; break; - - case 61 : /* LVMOVE */ + /* LVMOVE */ + case 61: loadvirt(virt1, a2); storevirt(virt1, a1); break; - - case 62 : /* LRMOVE */ /* WARNING: these areas may overlap! */ + /* LRMOVE + WARNING: these areas may overlap! */ + case 62: r = MR(a2); MR(a1) = r; break; - - case 63 : /* LFPMOVE */ /* WARNING: these areas may overlap! */ - loadvirt(virt1, a2); /* MACHINE DEPENDENT */ - t1 = M[ a2+2 ]; + /* LFPMOVE + WARNING: these areas may overlap!*/ + case 63: + /* MACHINE DEPENDENT */ + loadvirt(virt1, a2); + t1 = M[a2 + 2]; storevirt(virt1, a1); - M[ a1+2 ] = t1; + M[a1 + 2] = t1; break; - - case 82 : /* LEQNONE */ - M[ a1 ] = lbool(M[ a2+1 ] != M[ M[ a2 ]+1 ]); + /* LEQNONE */ + case 82: + M[a1] = lbool(M[a2 + 1] != M[M[a2] + 1]); break; - - case 83 : /* LNENONE */ - M[ a1 ] = lbool(M[ a2+1 ] == M[ M[ a2 ]+1 ]); + /* LNENONE */ + case 83: + M[a1] = lbool(M[a2+1] == M[M[a2] + 1]); break; - - case 87 : /* LMDFTYPE */ /* modify the formal type */ + /* LMDFTYPE */ + /* modify the formal type */ + case 87: loadvirt(virt1, a2); - virt1.addr += a3; /* number of "arrayof" */ + /* number of "arrayof" */ + virt1.addr += a3; storevirt(virt1, a1); break; - - case 100 : /* LOR */ - M[ a1 ] = M[ a2 ] | M[ a3 ]; + /* LOR */ + case 100: + M[a1] = M[a2] | M[a3]; break; - - case 101 : /* LAND */ - M[ a1 ] = M[ a2 ] & M[ a3 ]; + /* LAND */ + case 101: + M[a1] = M[a2] & M[a3]; break; - - case 102 : /* LARRAY */ - case 103 : - case 104 : + /* LARRAY */ + case 102: + case 103: + case 104: loadvirt(virt2, a2); - if (member(&virt2, &t2)) - { - t1 = M[ a3 ]-M[ t2+2 ]; /* index-lower+3 */ - if (t1 < 3 || t1 >= M[ t2 ]) errsignal(RTEINVIN); - else M[ a1 ] = t2+t1; + if (member(&virt2, &t2)) { + /* index-lower+3 */ + t1 = M[a3] - M[t2 + 2]; + if (t1 < 3 || t1 >= M[t2]) + errsignal(RTEINVIN); + else + M[a1] = t2+t1; } - else errsignal(RTEREFTN); - break; - - case 105 : /* LFARRAY */ /* without any tests */ - t1 = M[ M[ a2 ] ]; /* physical address */ - M[ a1 ] = t1+M[ a3 ]-M[ t1+2 ]; + else + errsignal(RTEREFTN); break; - case 106 : /* LIEQUAL */ - M[ a1 ] = lbool(M[ a2 ] == M[ a3 ]); - break; - - case 107 : /* LINEQUAL */ - M[ a1 ] = lbool(M[ a2 ] != M[ a3 ]); - break; - - case 108 : /* LILT */ - M[ a1 ] = lbool(M[ a2 ] < M[ a3 ]); - break; - - case 109 : /* LILE */ - M[ a1 ] = lbool(M[ a2 ] <= M[ a3 ]); - break; - - case 110 : /* LIGT */ - M[ a1 ] = lbool(M[ a2 ] > M[ a3 ]); - break; - - case 111 : /* LIGE */ - M[ a1 ] = lbool(M[ a2 ] >= M[ a3 ]); - break; - - case 112 : /* LCOMBINE */ + /* LFARRAY + without any tests */ + case 105: + /* physical address */ + t1 = M[M[a2]]; + M[a1] = t1 + M[a3] - M[t1 + 2]; + break; + /* LIEQUAL */ + case 106: + M[a1] = lbool(M[a2] == M[a3]); + break; + /* LINEQUAL */ + case 107: + M[a1] = lbool(M[a2] != M[a3]); + break; + /* LILT */ + case 108: + M[a1] = lbool(M[a2] < M[a3]); + break; + /* LILE */ + case 109: + M[a1] = lbool(M[a2] <= M[a3]); + break; + /* LIGT */ + case 110: + M[a1] = lbool(M[a2] > M[a3]); + break; + /* LIGE */ + case 111: + M[a1] = lbool(M[a2] >= M[a3]); + break; + /* LCOMBINE */ + case 112: loadvirt(virt2, a2); - t1 = M[ a3 ]; + t1 = M[a3]; storevirt(virt2, a1); - M[ a1+APREF ] = t1; + M[a1 + APREF] = t1; break; - - case 113 : /* LIADD */ - M[ a1 ] = M[ a2 ]+M[ a3 ]; + /* LIADD */ + case 113: + M[a1] = M[a2] + M[a3]; break; - - case 114 : /* LISUB */ - M[ a1 ] = M[ a2 ]-M[ a3 ]; + /* LISUB */ + case 114: + M[a1] = M[a2]-M[a3]; break; - - case 115 : /* LIMULT */ - M[ a1 ] = M[ a2 ] * M[ a3 ]; + /* LIMULT */ + case 115: + M[a1] = M[a2] * M[a3]; break; - - case 116 : /* LSHIFT */ - M[ a1 ] = shift(M[ a2 ], M[ a3 ]); + /* LSHIFT */ + case 116: + M[a1] = shift(M[a2], M[a3]); break; - case 117 : /* LIDIVE */ - if (M[ a3 ] == 0) errsignal(RTEDIVBZ); - else M[ a1 ] = M[ a2 ] / M[ a3 ]; + case 117:/* LIDIVE */ + if (M[a3] == 0) + errsignal(RTEDIVBZ); + else + M[a1] = M[a2] / M[a3]; break; - - case 118 : /* LIMODE */ - if (M[ a3 ] == 0) errsignal(RTEDIVBZ); - else M[ a1 ] = M[ a2 ] % M[ a3 ]; + /* LIMODE */ + case 118: + if (M[a3] == 0) + errsignal(RTEDIVBZ); + else + M[a1] = M[a2] % M[a3]; break; - - case 119 : /* LRADD */ - MR(a1) = MR(a2)+MR(a3); + /* LRADD */ + case 119: + MR(a1) = MR(a2) + MR(a3); break; - - case 120 : /* LRSUB */ - MR(a1) = MR(a2)-MR(a3); + /* LRSUB */ + case 120: + MR(a1) = MR(a2) - MR(a3); break; - - case 121 : /* LRMULT */ + /* LRMULT */ + case 121: MR(a1) = MR(a2) * MR(a3); break; - - case 122 : /* LRDIVE */ - if (MR(a3) == (real)0.0) errsignal(RTEDIVBZ); - else MR(a1) = MR(a2) / MR(a3); + /* LRDIVE */ + case 122: + if (MR(a3) == (real)0.0) + errsignal(RTEDIVBZ); + else + MR(a1) = MR(a2) / MR(a3); break; - - case 123 : /* LEQREF */ + /* LEQREF */ + case 123: loadvirt(virt2, a2); loadvirt(virt3, a3); if (member(&virt2, &t1)) - M[ a1 ] = lbool(member(&virt3, &t2) && t1 == t2); - else M[ a1 ] = lbool(!member(&virt3, &t2)); + M[a1] = lbool(member(&virt3, &t2) && t1 == t2); + else + M[a1] = lbool(!member(&virt3, &t2)); break; - - case 124 : /* LNEREF */ + /* LNEREF */ + case 124: loadvirt(virt2, a2); loadvirt(virt3, a3); if (member(&virt2, &t1)) - M[ a1 ] = lbool(!member(&virt3, &t2) || t1 != t2); - else M[ a1 ] = lbool(member(&virt3, &t2)); + M[a1] = lbool(!member(&virt3, &t2) || t1 != t2); + else + M[a1] = lbool(member(&virt3, &t2)); break; - - case 125 : /* LREQ */ - M[ a1 ] = lbool(MR(a2) == MR(a3)); + /* LREQ */ + case 125: + M[a1] = lbool(MR(a2) == MR(a3)); break; - - case 126 : /* LRNE */ - M[ a1 ] = lbool(MR(a2) != MR(a3)); + /* LRNE */ + case 126: + M[a1] = lbool(MR(a2) != MR(a3)); break; - - case 127 : /* LRLT */ - M[ a1 ] = lbool(MR(a2) < MR(a3)); + /* LRLT */ + case 127: + M[a1] = lbool(MR(a2) < MR(a3)); break; - - case 128 : /* LRLE */ - M[ a1 ] = lbool(MR(a2) <= MR(a3)); + /* LRLE */ + case 128: + M[a1] = lbool(MR(a2) <= MR(a3)); break; - - case 129 : /* LRGT */ - M[ a1 ] = lbool(MR(a2) > MR(a3)); + /* LRGT */ + case 129: + M[a1] = lbool(MR(a2) > MR(a3)); break; - - case 130 : /* LRGE */ - M[ a1 ] = lbool(MR(a2) >= MR(a3)); + /* LRGE */ + case 130: + M[a1] = lbool(MR(a2) >= MR(a3)); break; - - case 131 : /* LXOR */ - M[ a1 ] = M[ a2 ] ^ M[ a3 ]; + /* LXOR */ + case 131: + M[a1] = M[a2] ^ M[a3]; break; - - case 132 : /* LCALLPROCSTAND */ + /* LCALLPROCSTAND */ + case 132: #if USE_ALARM - alarm(0); /* reschedule forced so alarm may be switched off */ + /* reschedule forced so alarm may be switched off */ + alarm(0); #endif - reschedule=TRUE; + reschedule = TRUE; standard(a1); break; - - case 143 : /* LKILL */ + /* LKILL */ + case 143: loadvirt(virt1, a1); disp(&virt1); break; - - case 144 : /* LHEADS */ + /* LHEADS */ + case 144: loadvirt(virt1, a1); heads(&virt1, a2); break; - - case 145 : /* LIPARINP */ - param[ a3 ].xword = M[ a1 ]; + /* LIPARINP */ + case 145: + param[a3].xword = M[a1]; break; - - case 146 : /* LGKILL */ + /* LGKILL */ + case 146: loadvirt(virt1, a1); gkill(&virt1); break; - - case 147 : /* LVPARINP */ - loadvirt(param[ a3 ].xvirt, a1); + /* LVPARINP */ + case 147: + loadvirt(param[a3].xvirt, a1); break; - - case 148 : /* LRPARINP */ - param[ a3 ].xreal = MR(a1); + /* LRPARINP */ + case 148: + param[a3].xreal = MR(a1); break; - - case 149 : /* LQUATEST */ + /* LQUATEST */ + case 149: loadvirt(virt1, a1); qua(&virt1, a2); break; - - case 150 : /* LSTYPE */ + /* LSTYPE */ + case 150: loadvirt(virt1, a1); typref(&virt1, a2); break; - - case 151 : /* LIFFALSE */ - if (M[ a1 ] == LFALSE) ic = a2; + /* LIFFALSE */ + case 151: + if (M[a1] == LFALSE) + ic = a2; break; - - case 152 : /* LIFTRUE */ - if (M[ a1 ] == LTRUE) ic = a2; + /* LIFTRUE */ + case 152: + if (M[a1] == LTRUE) + ic = a2; break; - - case 159 : /* LGO */ - go(M[ a2 ], M[ a1 ]); + /* LGO */ + case 159: + go(M[a2], M[a1]); break; - - case 160 : /* LGOLOCAL */ - goloc(M[ a2 ], M[ a1 ]); + /* LGOLOCAL */ + case 160: + goloc(M[a2], M[a1]); break; - - case 170 : /* LDTYPE */ - loadvirt(virt1, a1); /* left side type */ + /* LDTYPE */ + case 170: + /* left side type */ + loadvirt(virt1, a1); loadvirt(virt2, a2); - loadvirt(virt3, a3); /* right side type */ + /* right side type */ + loadvirt(virt3, a3); typed(virt1.addr, virt1.mark, virt3.addr, virt3.mark, &virt2); break; - - case 172 : /* LTERMINATE */ + /* LTERMINATE */ + case 172: term(); break; - - case 173 : /* LWIND */ + /* LWIND */ + case 173: wind(); break; - - case 174 : /* LBLOCK2 */ + /* LBLOCK2 */ + case 174: goloc(thisp->blck1, thisp->blck2); break; - - case 176 : /* LBLOCK3 */ + /* LBLOCK3 */ + case 176: disp(&thisp->backobj); break; - - case 177 : /* LTRACE */ + /* LTRACE */ + case 177: trace(a1); break; - - case 178 : /* LINNER */ + /* LINNER */ + case 178: inner(a1); break; - - case 180 : /* LBACKHD */ - backhd(&thisp->backobj, &M[ temporary ]); + /* LBACKHD */ + case 180: + backhd(&thisp->backobj, &M[temporary]); break; - - case 182 : /* LJUMP */ + /* LJUMP */ + case 182: ic = a1; break; - - case 186 : /* LBLOCK1 */ + /* LBLOCK1 */ + case 186: openobj(a1, &thisp->blck1, &thisp->blck2); break; - - case 187 : /* LDETACH */ + /* LDETACH */ + case 187: detach(); break; - - case 188 : /* LATTACH */ + /* LATTACH */ + case 188: loadvirt(virt1, a1); attach(&virt1); break; - - case 191 : /* LBACKBL */ - backbl(&thisp->backobj, &M[ temporary ]); + /* LBACKBL */ + case 191: + backbl(&thisp->backobj, &M[temporary]); break; - - case 192 : /* LBACKPR */ - /* backpr(&thisp->backobj, &M[ temporary ]); */ - back(&thisp->backobj, &M[ temporary ], (word) 0); + /* LBACKPR */ + case 192: + /* backpr(&thisp->backobj, &M[temporary]); */ + back(&thisp->backobj, &M[temporary], (word) 0); break; - - case 193 : /* LBACK */ - back(&thisp->backobj, &M[ temporary ], (word) 0); + /* LBACK */ + case 193: + back(&thisp->backobj, &M[temporary], (word) 0); break; - - case 194 : /* LFIN */ - fin(ic-APOPCODE, &thisp->backobj, &M[ temporary ]); + /* LFIN */ + case 194: + fin(ic - APOPCODE, &thisp->backobj, &M[temporary]); break; - - case 195 : /* LCASE */ + /* LCASE */ + case 195: /* a2 = address of case description : */ /* minimal value, number of branches, */ /* remaining branches followed by "otherwise" code */ - t1 = M[ a1 ]-M[ a2 ]; /* in 0..number of branches-1 */ - if (t1 < 0 || t1 >= M[ a2+1 ]) - ic = a2+2+M[ a2+1 ]; /* otherwise */ + /* in 0..number of branches-1 */ + t1 = M[a1] - M[a2]; + if (t1 < 0 || t1 >= M[a2 + 1]) + /* otherwise */ + ic = a2 + 2 + M[a2 + 1]; else - ic = M[ a2+2+t1 ]; /* indirect jump */ + /* indirect jump */ + ic = M[a2 + 2 + t1]; break; - - case 220 : /* LRESUME */ + /* LRESUME */ + case 220: loadvirt(virt1, a1); resume(&virt1); break; - - case 221 : /* LSTOP */ + /* LSTOP */ + case 221: passivate(STOPPED); break; - - case 222 : /* LKILLTEMP */ + /* LKILLTEMP */ + case 222: disp(&thisp->template); break; - - case 223 : /* LENABLE */ - for (i = 0; i < a1; i++) - enable(thispix, virtprot(M[ ic++ ])); - evaluaterpc(thispix); + /* LENABLE */ + case 223: + for (i = 0; i < a1; i++) + enable(thispix, virtprot(M[ic++])); + evaluaterpc(thispix); break; - - case 224 : /* LDISABLE */ - for (i = 0; i < a1; i++) - disable(thispix, virtprot(M[ ic++ ])); + /* LDISABLE */ + case 224: + for (i = 0; i < a1; i++) + disable(thispix, virtprot(M[ic++])); break; - - case 225 : /* LACCEPT1 */ - rpc_accept(a1); + /* LACCEPT1 */ + case 225: + rpc_accept(a1); break; - - case 226 : /* LACCEPT2 */ + /* LACCEPT2 */ + case 226: popmask(thispix); rpc3(); break; - - case 227 : /* LBACKRPC */ - back(&thisp->backobj, &M[ temporary ], a1); + /* LBACKRPC */ + case 227: + back(&thisp->backobj, &M[temporary], a1); break; - - case 228 : /* LASKPROT */ + /* LASKPROT */ + case 228: loadvirt(virt1, a1); askprot(&virt1); break; - - case 240 : /* LSTEP */ - if (M[ a1 ] < 0) errsignal(RTENEGST); + /* LSTEP */ + case 240: + if (M[a1] < 0) + errsignal(RTENEGST); break; - default : + default: break; - } + } }