www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2941] New: asm fstsw AX; generates incorrect opcode

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2941

           Summary: asm fstsw AX;  generates incorrect opcode
           Product: D
           Version: 1.00
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: clugdbug yahoo.com.au


fstsw AX;
should be producing fwait; fnstsw AX;  (9B DF E0).

Instead, it simply produces fnstsw AX; (DF E0).


-- 
May 05 2009
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2941


clugdbug yahoo.com.au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |major





I've found the cause: iasm.c, line 1650-1651 is:
        else if ((ptb.pptb0->usFlags & _fwait) &&
            config.target_cpu >= TARGET_80386) {

Turns out that at this point, config.target_cpu is uninitialized! It's 0!
It doesn't get initialized until much later. (In obj_start() in glue.c).
I suspect that there should be a call to out_config_init() (in msc.c) at a very
much earlier point, possibly even in mars.c.

As this could be causing all sorts of problems elsewhere, I'm raising the
severity.


-- 
May 06 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2941


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED



15:07:18 PDT ---
https://github.com/D-Programming-Language/dmd/commit/ad979f369e0c3d0d8fdb1fd3aa2d3a5805204b1b

https://github.com/D-Programming-Language/dmd/commit/c9938a9d88574be2b74eedb964f15633f9847d2b

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