joshuacrotts/littlec-compiler

Temp registers are not being invalidated properly with arrays.

joshuacrotts opened this issue · 1 comments

Storing values into arrays a[i] = X one after another (such as initializing an array with just literals) doesn't work after index 6 or so because it runs out of temporary registers. It seems they're not being deallocated?

The issue was because the idxReg was not being invalidated before the reassignment to modIdxReg (idxReg = modIdxReg).