Jump tables for switch now go in ROM (required by the EM spec). Forward gotos
now work.
This commit is contained in:
parent
8b8910595a
commit
62bc2ab97a
|
@ -759,13 +759,13 @@ pswitch(void)
|
|||
deflab = brklab;
|
||||
|
||||
C_df_dlb(swlab);
|
||||
C_con_ilb(deflab);
|
||||
C_con_cst(swp - sswp);
|
||||
C_rom_ilb(deflab);
|
||||
C_rom_cst(swp - sswp);
|
||||
|
||||
while (swp > sswp && swp > swtab) {
|
||||
--swp;
|
||||
C_con_cst(swp->swval);
|
||||
C_con_ilb(swp->swlab);
|
||||
C_rom_cst(swp->swval);
|
||||
C_rom_ilb(swp->swlab);
|
||||
}
|
||||
|
||||
C_df_ilb(brklab);
|
||||
|
@ -812,6 +812,8 @@ stmt:
|
|||
case GOTO:
|
||||
if ((o = symbol()) != NAME)
|
||||
goto syntax;
|
||||
if (bsym->offset == 0)
|
||||
bsym->offset = isn++;
|
||||
jump(bsym->offset);
|
||||
goto semi;
|
||||
|
||||
|
@ -913,7 +915,8 @@ stmt:
|
|||
goto stmt;
|
||||
}
|
||||
bsym->class = INTERN;
|
||||
bsym->offset = isn++;
|
||||
if (bsym->offset == 0)
|
||||
bsym->offset = isn++;
|
||||
fnlabel(bsym->offset);
|
||||
goto stmt;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue