Skip to content

Commit

Permalink
Merge pull request #2272 from WalterBright/shpost
Browse files Browse the repository at this point in the history
eliminate unnecessary instruction
  • Loading branch information
yebblies committed Jun 29, 2013
2 parents fba440c + d57df12 commit 5a97c27
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/backend/cod2.c
Expand Up @@ -1068,7 +1068,8 @@ code *cdmul(elem *e,regm_t *pretregs)
gen2(cg,0x03,grex | modregrmx(3,DX,reg)); // ADD EDX,R1
genmovreg(cg, AX, reg); // MOV EAX,R1
genc2(cg,0xC1,grex | modregrm(3,7,AX),sz * 8 - 1); // SAR EAX,31
genc2(cg,0xC1,grex | modregrm(3,7,DX),shpost); // SAR EDX,shpost
if (shpost)
genc2(cg,0xC1,grex | modregrm(3,7,DX),shpost); // SAR EDX,shpost
if (neg && oper == OPdiv)
{ gen2(cg,0x2B,grex | modregrm(3,AX,DX)); // SUB EAX,EDX
r3 = AX;
Expand Down

0 comments on commit 5a97c27

Please sign in to comment.