Skip to content

Commit

Permalink
Merge pull request #4960 from WalterBright/hdiff
Browse files Browse the repository at this point in the history
backend: eliminate use of SYMBOLY from cgelem.c
  • Loading branch information
yebblies committed Aug 26, 2015
2 parents d217de8 + 1e2c4ee commit b658b37
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/backend/cgelem.c
Expand Up @@ -1126,14 +1126,20 @@ STATIC elem * elmin(elem *e, goal_t goal)
#if TX86 && !(MARS)
if (tybasic(e2->Ety) == TYhptr && tybasic(e->E1->Ety) == TYhptr)
{ // Convert to _aNahdiff(e1,e2)
static symbol hdiff = SYMBOLY(FLfunc,mBX|mCX|mSI|mDI|mBP|mES,"_aNahdiff",0);

if (LARGECODE)
hdiff.Sident[2] = 'F';
hdiff.Stype = tsclib;
static symbol *hdiff;
if (!hdiff)
{
symbol *s = symbol_calloc(LARGECODE ? "_aFahdiff" : "_aNahdiff");
s->Stype = tsclib;
s->Sclass = SCextern;
s->Sfl = FLfunc;
s->Ssymnum = 0;
s->Sregsaved = mBX|mCX|mSI|mDI|mBP|mES;
hdiff = s;
}
e->Eoper = OPcall;
e->E2 = el_bin(OPparam,TYint,e2,e->E1);
e->E1 = el_var(&hdiff);
e->E1 = el_var(hdiff);
return e;
}
#endif
Expand Down

0 comments on commit b658b37

Please sign in to comment.