digitalmars.D.bugs - [Issue 5564] New: [64-bit] loading of wrong constant byte value
- d-bugmail puremagic.com (36/36) Feb 11 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5564
- d-bugmail puremagic.com (13/13) Feb 13 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5564
http://d.puremagic.com/issues/show_bug.cgi?id=5564 Summary: [64-bit] loading of wrong constant byte value Product: D Version: D2 Platform: x86_64 OS/Version: FreeBSD Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: dawg dawgfoto.de --- Comment #0 from dawg dawgfoto.de 2011-02-11 18:36:08 PST --- struct Temp { bool value; this(int, bool value) { this.value = value; } }; enum asserting = 255; //!<- anything below 256 will assert enum working = 256; //!<- anything above is fine void main() { assert(Temp(asserting, false).value == false); } --- In the constructor the bool is loaded from SIL which contains a non-zero value. I wonder why movregconst at cgen.c(610): if (r < 4 && ((regcon.immed.value[r] >> 8) & 0xFF) == value) { c = genregs(c,0x8A,reg,r | 4); // MOV regL,rH goto L2; } is generating a MOV dh, dh before calling the constructor. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 11 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5564 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla digitalmars.com Resolution| |FIXED --- Comment #1 from Walter Bright <bugzilla digitalmars.com> 2011-02-13 19:39:32 PST --- https://github.com/D-Programming-Language/dmd/commit/95428dfeb286027541a60ca2afeeaecc673a48ec https://github.com/D-Programming-Language/dmd/commit/4325d7adca02853cd1eb94b6469db7d8e9d2fdcc -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 13 2011