On 07 Jun 2010, at 18:40, Martin wrote:

> In this case the result should be the same, and since both cases are using 
> both registers, the 2 registers should in both cases be avail for usage.
> 
> I wonder if in other cases, eax may drop in for edx (or vice versa) where it 
> may cause a proble (data replaced?)
> 
> The question is, should -gt have caused this change?

The register allocator uses a graph colouring algorithm. It can easily produce 
slightly different but equivalent register allocations when the graphs change 
(i.e., when more virtual registers are used, e.g. because of extra 
initialisation code). So yes, it is entirely expected that such changes occur 
with -gt.


Jonas_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to