- removed atag parameter from GetConstantAddress.

This commit is contained in:
Christoph Oelckers 2017-04-10 15:39:04 +02:00
commit e551ef52f8
6 changed files with 35 additions and 63 deletions

View file

@ -353,34 +353,16 @@ struct VMReturn
*(FString *)Location = val;
}
void SetPointer(void *val, int tag)
{
assert(RegType == REGT_POINTER);
*(void **)Location = val;
if (TagOfs != 0)
{
*((VM_ATAG *)Location + TagOfs) = tag;
}
}
void SetPointer(void *val)
{
assert(RegType == REGT_POINTER);
*(void **)Location = val;
if (TagOfs != 0)
{
*((VM_ATAG *)Location + TagOfs) = ATAG_GENERIC;
}
}
void SetObject(DObject *val)
{
assert(RegType == REGT_POINTER);
*(void **)Location = val;
if (TagOfs != 0)
{
*((VM_ATAG *)Location + TagOfs) = ATAG_OBJECT;
}
}
void IntAt(int *loc)

View file

@ -2021,12 +2021,12 @@ static void SetReturn(const VMRegisters &reg, VMFrame *frame, VMReturn *ret, VM_
if (regtype & REGT_KONST)
{
assert(regnum < func->NumKonstA);
ret->SetPointer(func->KonstA[regnum].v, func->KonstATags()[regnum]);
ret->SetPointer(func->KonstA[regnum].v);
}
else
{
assert(regnum < frame->NumRegA);
ret->SetPointer(reg.a[regnum], reg.atag[regnum]);
ret->SetPointer(reg.a[regnum]);
}
break;
}