Skip to content

Commit

Permalink
Remove redundant REX prefix on 64 bit register clear
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterWaldron committed Apr 22, 2015
1 parent 043221f commit c81bdb9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/backend/cod1.c
Expand Up @@ -659,8 +659,6 @@ code *loadea(elem *e,code *cs,unsigned op,unsigned reg,targ_size_t offset,
}
else if (reg == 6) // if DIV
{ cd = genregs(cd,0x33,DX,DX); // XOR DX,DX
if (I64 && sz == 8)
code_orrex(cd, REX_W);
}
}

Expand Down
6 changes: 0 additions & 6 deletions src/backend/cod3.c
Expand Up @@ -2648,8 +2648,6 @@ code *movregconst(code *c,unsigned reg,targ_size_t value,regm_t flags)
switch (value)
{ case 0:
c = genclrreg(c,reg);
if (flags & 64)
code_orrex(c, REX_W);
break;
case 1:
if (I64)
Expand Down Expand Up @@ -2713,8 +2711,6 @@ code *movregconst(code *c,unsigned reg,targ_size_t value,regm_t flags)
}
if (value == 0 && !(flags & 8) && config.target_cpu >= TARGET_80486)
{ c = genclrreg(c,reg); // CLR reg
if (flags & 64)
code_orrex(c, REX_W);
goto done;
}

Expand Down Expand Up @@ -2751,8 +2747,6 @@ code *movregconst(code *c,unsigned reg,targ_size_t value,regm_t flags)

if (value == 0 && !(flags & 8))
{ c = genclrreg(c,reg); // CLR reg
if (flags & 64)
code_orrex(c, REX_W);
}
else
{ /* See if we can just load a byte */
Expand Down

0 comments on commit c81bdb9

Please sign in to comment.