Skip to content

Commit

Permalink
Win64 varargs and reg usage tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Sep 27, 2012
1 parent 396025f commit 462fcc1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/backend/cod1.c
Expand Up @@ -1288,8 +1288,11 @@ code *getlvalue(code *pcs,elem *e,regm_t keepmsk)
reg_t preg = s->Spreg;
if (e->EV.sp.Voffset == REGSIZE)
preg = s->Spreg2;
assert(preg != NOREG);
if (regcon.params & mask[preg])
/* preg could be NOREG if it's a variadic function and we're
* in Win64 shadow regs and we're offsetting to get to the start
* of the variadic args.
*/
if (preg != NOREG && regcon.params & mask[preg])
{
pcs->Irm = modregrm(3,0,preg & 7);
if (preg & 8)
Expand Down

0 comments on commit 462fcc1

Please sign in to comment.