mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 06:22:25 +00:00
Update bootstrap C sources.
This commit is contained in:
parent
41a239c5aa
commit
1e9c1af8ef
5 changed files with 45 additions and 45 deletions
|
|
@ -248,7 +248,7 @@ static void Heap_ExtendHeap (INT32 blksz)
|
||||||
} else {
|
} else {
|
||||||
j = Heap_heap;
|
j = Heap_heap;
|
||||||
__GET(j, next, INT32);
|
__GET(j, next, INT32);
|
||||||
while ((next != 0 && chnk > next)) {
|
while ((next != 0 && chnk - next > 0)) {
|
||||||
j = next;
|
j = next;
|
||||||
__GET(j, next, INT32);
|
__GET(j, next, INT32);
|
||||||
}
|
}
|
||||||
|
|
@ -345,7 +345,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag)
|
||||||
}
|
}
|
||||||
i = adr + 16;
|
i = adr + 16;
|
||||||
end = adr + blksz;
|
end = adr + blksz;
|
||||||
while (i < end) {
|
while (end - i > 0) {
|
||||||
__PUT(i, 0, INT32);
|
__PUT(i, 0, INT32);
|
||||||
__PUT(i + 4, 0, INT32);
|
__PUT(i + 4, 0, INT32);
|
||||||
__PUT(i + 8, 0, INT32);
|
__PUT(i + 8, 0, INT32);
|
||||||
|
|
@ -442,7 +442,7 @@ static void Heap_Scan (void)
|
||||||
while (chnk != 0) {
|
while (chnk != 0) {
|
||||||
adr = chnk + 12;
|
adr = chnk + 12;
|
||||||
__GET(chnk + 4, end, INT32);
|
__GET(chnk + 4, end, INT32);
|
||||||
while (adr < end) {
|
while (end - adr > 0) {
|
||||||
__GET(adr, tag, INT32);
|
__GET(adr, tag, INT32);
|
||||||
if (__ODD(tag)) {
|
if (__ODD(tag)) {
|
||||||
if (freesize > 0) {
|
if (freesize > 0) {
|
||||||
|
|
@ -533,13 +533,13 @@ static void Heap_MarkCandidates (INT32 n, INT32 *cand, ADDRESS cand__len)
|
||||||
chnk = Heap_heap;
|
chnk = Heap_heap;
|
||||||
i = 0;
|
i = 0;
|
||||||
lim = cand[n - 1];
|
lim = cand[n - 1];
|
||||||
while ((chnk != 0 && chnk < lim)) {
|
while ((chnk != 0 && lim - chnk > 0)) {
|
||||||
adr = chnk + 12;
|
adr = chnk + 12;
|
||||||
__GET(chnk + 4, lim1, INT32);
|
__GET(chnk + 4, lim1, INT32);
|
||||||
if (lim < lim1) {
|
if (lim1 - lim > 0) {
|
||||||
lim1 = lim;
|
lim1 = lim;
|
||||||
}
|
}
|
||||||
while (adr < lim1) {
|
while (lim1 - adr > 0) {
|
||||||
__GET(adr, tag, INT32);
|
__GET(adr, tag, INT32);
|
||||||
if (__ODD(tag)) {
|
if (__ODD(tag)) {
|
||||||
__GET(tag - 1, size, INT32);
|
__GET(tag - 1, size, INT32);
|
||||||
|
|
@ -547,14 +547,14 @@ static void Heap_MarkCandidates (INT32 n, INT32 *cand, ADDRESS cand__len)
|
||||||
} else {
|
} else {
|
||||||
__GET(tag, size, INT32);
|
__GET(tag, size, INT32);
|
||||||
ptr = adr + 4;
|
ptr = adr + 4;
|
||||||
while (cand[i] < ptr) {
|
while (ptr - cand[i] > 0) {
|
||||||
i += 1;
|
i += 1;
|
||||||
}
|
}
|
||||||
if (i == n) {
|
if (i == n) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
next = adr + size;
|
next = adr + size;
|
||||||
if (cand[i] < next) {
|
if (next - cand[i] > 0) {
|
||||||
Heap_Mark(ptr);
|
Heap_Mark(ptr);
|
||||||
}
|
}
|
||||||
adr = next;
|
adr = next;
|
||||||
|
|
@ -632,7 +632,7 @@ static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len)
|
||||||
sp = (ADDRESS)&frame;
|
sp = (ADDRESS)&frame;
|
||||||
stack0 = Heap_ModulesMainStackFrame();
|
stack0 = Heap_ModulesMainStackFrame();
|
||||||
inc = (ADDRESS)&align.p - (ADDRESS)&align;
|
inc = (ADDRESS)&align.p - (ADDRESS)&align;
|
||||||
if (sp > stack0) {
|
if (sp - stack0 > 0) {
|
||||||
inc = -inc;
|
inc = -inc;
|
||||||
}
|
}
|
||||||
while (sp != stack0) {
|
while (sp != stack0) {
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,7 @@ static void Heap_ExtendHeap (INT32 blksz)
|
||||||
} else {
|
} else {
|
||||||
j = Heap_heap;
|
j = Heap_heap;
|
||||||
__GET(j, next, INT32);
|
__GET(j, next, INT32);
|
||||||
while ((next != 0 && chnk > next)) {
|
while ((next != 0 && chnk - next > 0)) {
|
||||||
j = next;
|
j = next;
|
||||||
__GET(j, next, INT32);
|
__GET(j, next, INT32);
|
||||||
}
|
}
|
||||||
|
|
@ -345,7 +345,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag)
|
||||||
}
|
}
|
||||||
i = adr + 16;
|
i = adr + 16;
|
||||||
end = adr + blksz;
|
end = adr + blksz;
|
||||||
while (i < end) {
|
while (end - i > 0) {
|
||||||
__PUT(i, 0, INT32);
|
__PUT(i, 0, INT32);
|
||||||
__PUT(i + 4, 0, INT32);
|
__PUT(i + 4, 0, INT32);
|
||||||
__PUT(i + 8, 0, INT32);
|
__PUT(i + 8, 0, INT32);
|
||||||
|
|
@ -442,7 +442,7 @@ static void Heap_Scan (void)
|
||||||
while (chnk != 0) {
|
while (chnk != 0) {
|
||||||
adr = chnk + 12;
|
adr = chnk + 12;
|
||||||
__GET(chnk + 4, end, INT32);
|
__GET(chnk + 4, end, INT32);
|
||||||
while (adr < end) {
|
while (end - adr > 0) {
|
||||||
__GET(adr, tag, INT32);
|
__GET(adr, tag, INT32);
|
||||||
if (__ODD(tag)) {
|
if (__ODD(tag)) {
|
||||||
if (freesize > 0) {
|
if (freesize > 0) {
|
||||||
|
|
@ -533,13 +533,13 @@ static void Heap_MarkCandidates (INT32 n, INT32 *cand, ADDRESS cand__len)
|
||||||
chnk = Heap_heap;
|
chnk = Heap_heap;
|
||||||
i = 0;
|
i = 0;
|
||||||
lim = cand[n - 1];
|
lim = cand[n - 1];
|
||||||
while ((chnk != 0 && chnk < lim)) {
|
while ((chnk != 0 && lim - chnk > 0)) {
|
||||||
adr = chnk + 12;
|
adr = chnk + 12;
|
||||||
__GET(chnk + 4, lim1, INT32);
|
__GET(chnk + 4, lim1, INT32);
|
||||||
if (lim < lim1) {
|
if (lim1 - lim > 0) {
|
||||||
lim1 = lim;
|
lim1 = lim;
|
||||||
}
|
}
|
||||||
while (adr < lim1) {
|
while (lim1 - adr > 0) {
|
||||||
__GET(adr, tag, INT32);
|
__GET(adr, tag, INT32);
|
||||||
if (__ODD(tag)) {
|
if (__ODD(tag)) {
|
||||||
__GET(tag - 1, size, INT32);
|
__GET(tag - 1, size, INT32);
|
||||||
|
|
@ -547,14 +547,14 @@ static void Heap_MarkCandidates (INT32 n, INT32 *cand, ADDRESS cand__len)
|
||||||
} else {
|
} else {
|
||||||
__GET(tag, size, INT32);
|
__GET(tag, size, INT32);
|
||||||
ptr = adr + 4;
|
ptr = adr + 4;
|
||||||
while (cand[i] < ptr) {
|
while (ptr - cand[i] > 0) {
|
||||||
i += 1;
|
i += 1;
|
||||||
}
|
}
|
||||||
if (i == n) {
|
if (i == n) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
next = adr + size;
|
next = adr + size;
|
||||||
if (cand[i] < next) {
|
if (next - cand[i] > 0) {
|
||||||
Heap_Mark(ptr);
|
Heap_Mark(ptr);
|
||||||
}
|
}
|
||||||
adr = next;
|
adr = next;
|
||||||
|
|
@ -632,7 +632,7 @@ static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len)
|
||||||
sp = (ADDRESS)&frame;
|
sp = (ADDRESS)&frame;
|
||||||
stack0 = Heap_ModulesMainStackFrame();
|
stack0 = Heap_ModulesMainStackFrame();
|
||||||
inc = (ADDRESS)&align.p - (ADDRESS)&align;
|
inc = (ADDRESS)&align.p - (ADDRESS)&align;
|
||||||
if (sp > stack0) {
|
if (sp - stack0 > 0) {
|
||||||
inc = -inc;
|
inc = -inc;
|
||||||
}
|
}
|
||||||
while (sp != stack0) {
|
while (sp != stack0) {
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,7 @@ static void Heap_ExtendHeap (INT64 blksz)
|
||||||
} else {
|
} else {
|
||||||
j = Heap_heap;
|
j = Heap_heap;
|
||||||
__GET(j, next, INT64);
|
__GET(j, next, INT64);
|
||||||
while ((next != 0 && chnk > next)) {
|
while ((next != 0 && chnk - next > 0)) {
|
||||||
j = next;
|
j = next;
|
||||||
__GET(j, next, INT64);
|
__GET(j, next, INT64);
|
||||||
}
|
}
|
||||||
|
|
@ -345,7 +345,7 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag)
|
||||||
}
|
}
|
||||||
i = adr + 32;
|
i = adr + 32;
|
||||||
end = adr + blksz;
|
end = adr + blksz;
|
||||||
while (i < end) {
|
while (end - i > 0) {
|
||||||
__PUT(i, 0, INT64);
|
__PUT(i, 0, INT64);
|
||||||
__PUT(i + 8, 0, INT64);
|
__PUT(i + 8, 0, INT64);
|
||||||
__PUT(i + 16, 0, INT64);
|
__PUT(i + 16, 0, INT64);
|
||||||
|
|
@ -442,7 +442,7 @@ static void Heap_Scan (void)
|
||||||
while (chnk != 0) {
|
while (chnk != 0) {
|
||||||
adr = chnk + 24;
|
adr = chnk + 24;
|
||||||
__GET(chnk + 8, end, INT64);
|
__GET(chnk + 8, end, INT64);
|
||||||
while (adr < end) {
|
while (end - adr > 0) {
|
||||||
__GET(adr, tag, INT64);
|
__GET(adr, tag, INT64);
|
||||||
if (__ODD(tag)) {
|
if (__ODD(tag)) {
|
||||||
if (freesize > 0) {
|
if (freesize > 0) {
|
||||||
|
|
@ -533,13 +533,13 @@ static void Heap_MarkCandidates (INT64 n, INT64 *cand, ADDRESS cand__len)
|
||||||
chnk = Heap_heap;
|
chnk = Heap_heap;
|
||||||
i = 0;
|
i = 0;
|
||||||
lim = cand[n - 1];
|
lim = cand[n - 1];
|
||||||
while ((chnk != 0 && chnk < lim)) {
|
while ((chnk != 0 && lim - chnk > 0)) {
|
||||||
adr = chnk + 24;
|
adr = chnk + 24;
|
||||||
__GET(chnk + 8, lim1, INT64);
|
__GET(chnk + 8, lim1, INT64);
|
||||||
if (lim < lim1) {
|
if (lim1 - lim > 0) {
|
||||||
lim1 = lim;
|
lim1 = lim;
|
||||||
}
|
}
|
||||||
while (adr < lim1) {
|
while (lim1 - adr > 0) {
|
||||||
__GET(adr, tag, INT64);
|
__GET(adr, tag, INT64);
|
||||||
if (__ODD(tag)) {
|
if (__ODD(tag)) {
|
||||||
__GET(tag - 1, size, INT64);
|
__GET(tag - 1, size, INT64);
|
||||||
|
|
@ -547,14 +547,14 @@ static void Heap_MarkCandidates (INT64 n, INT64 *cand, ADDRESS cand__len)
|
||||||
} else {
|
} else {
|
||||||
__GET(tag, size, INT64);
|
__GET(tag, size, INT64);
|
||||||
ptr = adr + 8;
|
ptr = adr + 8;
|
||||||
while (cand[i] < ptr) {
|
while (ptr - cand[i] > 0) {
|
||||||
i += 1;
|
i += 1;
|
||||||
}
|
}
|
||||||
if (i == n) {
|
if (i == n) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
next = adr + size;
|
next = adr + size;
|
||||||
if (cand[i] < next) {
|
if (next - cand[i] > 0) {
|
||||||
Heap_Mark(ptr);
|
Heap_Mark(ptr);
|
||||||
}
|
}
|
||||||
adr = next;
|
adr = next;
|
||||||
|
|
@ -632,7 +632,7 @@ static void Heap_MarkStack (INT64 n, INT64 *cand, ADDRESS cand__len)
|
||||||
sp = (ADDRESS)&frame;
|
sp = (ADDRESS)&frame;
|
||||||
stack0 = Heap_ModulesMainStackFrame();
|
stack0 = Heap_ModulesMainStackFrame();
|
||||||
inc = (ADDRESS)&align.p - (ADDRESS)&align;
|
inc = (ADDRESS)&align.p - (ADDRESS)&align;
|
||||||
if (sp > stack0) {
|
if (sp - stack0 > 0) {
|
||||||
inc = -inc;
|
inc = -inc;
|
||||||
}
|
}
|
||||||
while (sp != stack0) {
|
while (sp != stack0) {
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,7 @@ static void Heap_ExtendHeap (INT32 blksz)
|
||||||
} else {
|
} else {
|
||||||
j = Heap_heap;
|
j = Heap_heap;
|
||||||
__GET(j, next, INT32);
|
__GET(j, next, INT32);
|
||||||
while ((next != 0 && chnk > next)) {
|
while ((next != 0 && chnk - next > 0)) {
|
||||||
j = next;
|
j = next;
|
||||||
__GET(j, next, INT32);
|
__GET(j, next, INT32);
|
||||||
}
|
}
|
||||||
|
|
@ -345,7 +345,7 @@ SYSTEM_PTR Heap_NEWREC (INT32 tag)
|
||||||
}
|
}
|
||||||
i = adr + 16;
|
i = adr + 16;
|
||||||
end = adr + blksz;
|
end = adr + blksz;
|
||||||
while (i < end) {
|
while (end - i > 0) {
|
||||||
__PUT(i, 0, INT32);
|
__PUT(i, 0, INT32);
|
||||||
__PUT(i + 4, 0, INT32);
|
__PUT(i + 4, 0, INT32);
|
||||||
__PUT(i + 8, 0, INT32);
|
__PUT(i + 8, 0, INT32);
|
||||||
|
|
@ -442,7 +442,7 @@ static void Heap_Scan (void)
|
||||||
while (chnk != 0) {
|
while (chnk != 0) {
|
||||||
adr = chnk + 12;
|
adr = chnk + 12;
|
||||||
__GET(chnk + 4, end, INT32);
|
__GET(chnk + 4, end, INT32);
|
||||||
while (adr < end) {
|
while (end - adr > 0) {
|
||||||
__GET(adr, tag, INT32);
|
__GET(adr, tag, INT32);
|
||||||
if (__ODD(tag)) {
|
if (__ODD(tag)) {
|
||||||
if (freesize > 0) {
|
if (freesize > 0) {
|
||||||
|
|
@ -533,13 +533,13 @@ static void Heap_MarkCandidates (INT32 n, INT32 *cand, ADDRESS cand__len)
|
||||||
chnk = Heap_heap;
|
chnk = Heap_heap;
|
||||||
i = 0;
|
i = 0;
|
||||||
lim = cand[n - 1];
|
lim = cand[n - 1];
|
||||||
while ((chnk != 0 && chnk < lim)) {
|
while ((chnk != 0 && lim - chnk > 0)) {
|
||||||
adr = chnk + 12;
|
adr = chnk + 12;
|
||||||
__GET(chnk + 4, lim1, INT32);
|
__GET(chnk + 4, lim1, INT32);
|
||||||
if (lim < lim1) {
|
if (lim1 - lim > 0) {
|
||||||
lim1 = lim;
|
lim1 = lim;
|
||||||
}
|
}
|
||||||
while (adr < lim1) {
|
while (lim1 - adr > 0) {
|
||||||
__GET(adr, tag, INT32);
|
__GET(adr, tag, INT32);
|
||||||
if (__ODD(tag)) {
|
if (__ODD(tag)) {
|
||||||
__GET(tag - 1, size, INT32);
|
__GET(tag - 1, size, INT32);
|
||||||
|
|
@ -547,14 +547,14 @@ static void Heap_MarkCandidates (INT32 n, INT32 *cand, ADDRESS cand__len)
|
||||||
} else {
|
} else {
|
||||||
__GET(tag, size, INT32);
|
__GET(tag, size, INT32);
|
||||||
ptr = adr + 4;
|
ptr = adr + 4;
|
||||||
while (cand[i] < ptr) {
|
while (ptr - cand[i] > 0) {
|
||||||
i += 1;
|
i += 1;
|
||||||
}
|
}
|
||||||
if (i == n) {
|
if (i == n) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
next = adr + size;
|
next = adr + size;
|
||||||
if (cand[i] < next) {
|
if (next - cand[i] > 0) {
|
||||||
Heap_Mark(ptr);
|
Heap_Mark(ptr);
|
||||||
}
|
}
|
||||||
adr = next;
|
adr = next;
|
||||||
|
|
@ -632,7 +632,7 @@ static void Heap_MarkStack (INT32 n, INT32 *cand, ADDRESS cand__len)
|
||||||
sp = (ADDRESS)&frame;
|
sp = (ADDRESS)&frame;
|
||||||
stack0 = Heap_ModulesMainStackFrame();
|
stack0 = Heap_ModulesMainStackFrame();
|
||||||
inc = (ADDRESS)&align.p - (ADDRESS)&align;
|
inc = (ADDRESS)&align.p - (ADDRESS)&align;
|
||||||
if (sp > stack0) {
|
if (sp - stack0 > 0) {
|
||||||
inc = -inc;
|
inc = -inc;
|
||||||
}
|
}
|
||||||
while (sp != stack0) {
|
while (sp != stack0) {
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,7 @@ static void Heap_ExtendHeap (INT64 blksz)
|
||||||
} else {
|
} else {
|
||||||
j = Heap_heap;
|
j = Heap_heap;
|
||||||
__GET(j, next, INT64);
|
__GET(j, next, INT64);
|
||||||
while ((next != 0 && chnk > next)) {
|
while ((next != 0 && chnk - next > 0)) {
|
||||||
j = next;
|
j = next;
|
||||||
__GET(j, next, INT64);
|
__GET(j, next, INT64);
|
||||||
}
|
}
|
||||||
|
|
@ -345,7 +345,7 @@ SYSTEM_PTR Heap_NEWREC (INT64 tag)
|
||||||
}
|
}
|
||||||
i = adr + 32;
|
i = adr + 32;
|
||||||
end = adr + blksz;
|
end = adr + blksz;
|
||||||
while (i < end) {
|
while (end - i > 0) {
|
||||||
__PUT(i, 0, INT64);
|
__PUT(i, 0, INT64);
|
||||||
__PUT(i + 8, 0, INT64);
|
__PUT(i + 8, 0, INT64);
|
||||||
__PUT(i + 16, 0, INT64);
|
__PUT(i + 16, 0, INT64);
|
||||||
|
|
@ -442,7 +442,7 @@ static void Heap_Scan (void)
|
||||||
while (chnk != 0) {
|
while (chnk != 0) {
|
||||||
adr = chnk + 24;
|
adr = chnk + 24;
|
||||||
__GET(chnk + 8, end, INT64);
|
__GET(chnk + 8, end, INT64);
|
||||||
while (adr < end) {
|
while (end - adr > 0) {
|
||||||
__GET(adr, tag, INT64);
|
__GET(adr, tag, INT64);
|
||||||
if (__ODD(tag)) {
|
if (__ODD(tag)) {
|
||||||
if (freesize > 0) {
|
if (freesize > 0) {
|
||||||
|
|
@ -533,13 +533,13 @@ static void Heap_MarkCandidates (INT64 n, INT64 *cand, ADDRESS cand__len)
|
||||||
chnk = Heap_heap;
|
chnk = Heap_heap;
|
||||||
i = 0;
|
i = 0;
|
||||||
lim = cand[n - 1];
|
lim = cand[n - 1];
|
||||||
while ((chnk != 0 && chnk < lim)) {
|
while ((chnk != 0 && lim - chnk > 0)) {
|
||||||
adr = chnk + 24;
|
adr = chnk + 24;
|
||||||
__GET(chnk + 8, lim1, INT64);
|
__GET(chnk + 8, lim1, INT64);
|
||||||
if (lim < lim1) {
|
if (lim1 - lim > 0) {
|
||||||
lim1 = lim;
|
lim1 = lim;
|
||||||
}
|
}
|
||||||
while (adr < lim1) {
|
while (lim1 - adr > 0) {
|
||||||
__GET(adr, tag, INT64);
|
__GET(adr, tag, INT64);
|
||||||
if (__ODD(tag)) {
|
if (__ODD(tag)) {
|
||||||
__GET(tag - 1, size, INT64);
|
__GET(tag - 1, size, INT64);
|
||||||
|
|
@ -547,14 +547,14 @@ static void Heap_MarkCandidates (INT64 n, INT64 *cand, ADDRESS cand__len)
|
||||||
} else {
|
} else {
|
||||||
__GET(tag, size, INT64);
|
__GET(tag, size, INT64);
|
||||||
ptr = adr + 8;
|
ptr = adr + 8;
|
||||||
while (cand[i] < ptr) {
|
while (ptr - cand[i] > 0) {
|
||||||
i += 1;
|
i += 1;
|
||||||
}
|
}
|
||||||
if (i == n) {
|
if (i == n) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
next = adr + size;
|
next = adr + size;
|
||||||
if (cand[i] < next) {
|
if (next - cand[i] > 0) {
|
||||||
Heap_Mark(ptr);
|
Heap_Mark(ptr);
|
||||||
}
|
}
|
||||||
adr = next;
|
adr = next;
|
||||||
|
|
@ -632,7 +632,7 @@ static void Heap_MarkStack (INT64 n, INT64 *cand, ADDRESS cand__len)
|
||||||
sp = (ADDRESS)&frame;
|
sp = (ADDRESS)&frame;
|
||||||
stack0 = Heap_ModulesMainStackFrame();
|
stack0 = Heap_ModulesMainStackFrame();
|
||||||
inc = (ADDRESS)&align.p - (ADDRESS)&align;
|
inc = (ADDRESS)&align.p - (ADDRESS)&align;
|
||||||
if (sp > stack0) {
|
if (sp - stack0 > 0) {
|
||||||
inc = -inc;
|
inc = -inc;
|
||||||
}
|
}
|
||||||
while (sp != stack0) {
|
while (sp != stack0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue