D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7388 - Inline assembler shouldn't assume operand size
Summary: Inline assembler shouldn't assume operand size
Status: RESOLVED DUPLICATE of issue 2617
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 All
: P2 normal
Assignee: No Owner
URL:
Keywords: iasm
Depends on:
Blocks:
 
Reported: 2012-01-28 06:07 UTC by Vladimir Panteleev
Modified: 2015-06-09 05:12 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Vladimir Panteleev 2012-01-28 06:07:52 UTC
This assembler instruction compiles fine:

    inc [EAX];

However, the code makes no indication of the memory size. DMD just assumes "byte ptr".

The severity of this is increased by that at least one other inline assembler (Delphi's) makes an incompatible assumption (it assumes "dword ptr").

I suggest that this behavior is made deprecated, and code compiled without -d should be forced to disambiguate operand size.
Comment 1 yebblies 2012-01-29 22:04:33 UTC

*** This issue has been marked as a duplicate of issue 2617 ***