1
0
mirror of https://github.com/ksherlock/x65.git synced 2024-06-08 11:32:33 +00:00

Pool labels of even 16ths would be re-reserved due to a left-right bug

- Shifted left when I should have shifted right.
This commit is contained in:
Carl-Henrik Skårstedt 2016-01-28 21:06:41 -08:00
parent 5b9e5f6d46
commit 60780a514a

View File

@ -3982,6 +3982,7 @@ StatusCode Asm::AssignPoolLabel(LabelPool &pool, strref label)
pLabel->reference = false;
MarkLabelLocal(label, true);
LabelAdded(pLabel, !!pool.scopeDepth);
return error;
}
@ -4014,7 +4015,7 @@ StatusCode LabelPool::Reserve(int numBytes, unsigned int &ret_addr)
for (int b = 0; b<numBytes; b++) {
*addr_map |= m;
unsigned int _m = m << 2;
if (!_m) { m <<= 30; addr_map++; } else { m = _m; }
if (!_m) { m >>= 30; addr_map++; } else { m = _m; }
}
ret_addr = addr;
return STATUS_OK;