Skip to content

Commit

Permalink
Merge pull request #4666 from WalterBright/fix14587
Browse files Browse the repository at this point in the history
fix Issue 14587 - generated 64 bit code for switch jump tables is wrong
  • Loading branch information
andralex authored and WalterBright committed May 17, 2015
1 parent 5f29da8 commit 51185a8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/backend/cod3.c
Expand Up @@ -1393,6 +1393,8 @@ void doswitch(block *b)
if (vmax - vmin != REGMASK) /* if there is a maximum */
{ /* CMP reg,vmax-vmin */
c = genc2(c,0x81,modregrm(3,7,reg),vmax-vmin);
if (I64)
code_orrex(c, REX_W);
genjmp(c,JA,FLblock,list_block(b->Bsucc)); /* JA default */
}
if (I64)
Expand Down

0 comments on commit 51185a8

Please sign in to comment.