[Issue 2617] asm silently accepts ambiguous-sized operations

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 26 02:33:10 PST 2009


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


clugdbug at yahoo.com.au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|wrong-code                  |accepts-invalid
            Summary|incorrect code generation   |asm silently accepts
                   |for asm{ inc eax }          |ambiguous-sized operations
            Version|2.022                       |1.00




------- Comment #2 from clugdbug at yahoo.com.au  2009-01-26 04:33 -------
The original bug is not valid. It's certainly not wrong-code. And there is no
'inc eax' involved! (inc [EAX]; is completely different). The Tango code has a
bug; it should be

inc int ptr [EAX];

You can argue that there's an accepts-invalid bug in the assembler. I hate that
it silently accepts ambiguous-sized operations, always assuming 'byte' size.
Applies also to

mul [EBX]; // multiplies AL by byte ptr [EAX].

I've been bitten by this quite a few times, on really ancient versions of DMD.
It's nothing to do with D2.


-- 



More information about the Digitalmars-d-bugs mailing list