[Issue 5455] ICE(cgcod.c): Optimization (register allocation?) regression in DMD 1.065

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jan 25 13:09:34 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5455



--- Comment #6 from Don <clugdbug at yahoo.com.au> 2011-01-25 13:07:25 PST ---
I think what's happened, is that a minor change to support 64 bits has
triggered a latent bug in the backend.

Basically, cgreg_assign() in cgreg.c thinks there are enough free registers. 
But allocreg() in cgcod.c can't find one. Although it is called with two
available registers, one of them is EBP, and EBP is disallowed in line 1910.
So these two functions are inconsistent.

I think the problem may be in creg_assign(). It thinks it has freed up a
register (EBX) which is used for 'this'. But (if I've correctly understood what
the code is doing) the same register seems to be used in a double-reg combo.
Seems a bit similar to bug 4443.
If I'm correct, then a solution to this bug would be to check if the register
is also part of a double-reg variable, before marking it as freed-up.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list