Skip to content

Commit

Permalink
enable OPremquo for 64 bits
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Aug 3, 2011
1 parent d1110ff commit c39217e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/backend/cgelem.c
Expand Up @@ -1887,7 +1887,7 @@ STATIC elem * eldiv(elem *e)
{ int sz = tysize(tym);

// See if we can replace with OPremquo
if (sz == REGSIZE && !I64) // need cent and ucent working for I64 to work
if (sz == REGSIZE /*&& !I64*/) // need cent and ucent working for I64 to work
{
// Don't do it if there are special code sequences in the
// code generator (see cdmul())
Expand All @@ -1900,15 +1900,15 @@ STATIC elem * eldiv(elem *e)
;
else
{
assert(sz == 2 || sz == 4);
assert(sz == 2 || sz == 4 || sz == 8);
int op = OPmsw;
if (e->Eoper == OPdiv)
{
op = (sz == 2) ? OP32_16 : OP64_32;
op = (sz == 2) ? OP32_16 : (sz == 4) ? OP64_32 : OP128_64;
}
e->Eoper = OPremquo;
e = el_una(op, tym, e);
e->E1->Ety = (sz == 2) ? TYlong : TYllong;
e->E1->Ety = (sz == 2) ? TYlong : (sz == 4) ? TYllong : TYcent;
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/backend/evalu8.c
Expand Up @@ -1479,6 +1479,10 @@ elem * evalu8(elem *e)
case 4:
e->EV.Vllong = (rem << 32) | (quo & 0xFFFFFFFF);
break;
case 8:
e->EV.Vcent.lsw = quo;
e->EV.Vcent.msw = rem;
break;
default:
assert(0);
break;
Expand Down

0 comments on commit c39217e

Please sign in to comment.