Bug 702 – inline assembler: "SMSW r32" fails to compile
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2006-12-21T03:08:00Z
Last change time
2014-02-15T13:21:10Z
Keywords
rejects-valid
Assigned to
bugzilla
Creator
thomas-dloop
Comments
Comment #0 by thomas-dloop — 2006-12-21T03:08:34Z
The following code fails to compile with the message
"bad type/size of operands 'smsw'":
asm{ SMSW EAX; }
SMSW r32 is valid i386 assembler:
IA-32 Intel® Architecture Software Developer’s
Manual Volume 2B: Instruction Set Reference, N-Z
4-274 Vol. 2B
Opcode:
0F 01 /4
Instruction:
SMSW r32/m16
Description:
Store machine status word in low-order 16 bits of r32/m16; high-order 16 bits of r32 are undefined.
testcase:
http://dstress.kuehne.cn/run/a/asm_smsw_02_A.d