[Issue 701] Inline asm using incorrect offsets when used in inner function

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jan 23 04:05:13 PST 2007


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





------- Comment #2 from thomas-dloop at kuehne.cn  2007-01-23 06:05 -------
> mov [EAX], 42;

This should be 

> mov int ptr [EAX], 42;

I don't think there is a way to use a single "lea" to solve your problem, 
however lea seems to be broken:

# asm{
#    lea EAX, [EBP-24] + 1; 
#    lea EBX, 1 - [EBP-24];
# }

results in

> 8d 45 e9 lea eax, [ebp-23]
> 8d 5d 19 lea ebx, [ebp+25]

I'm not a master of all x86 addressing modes but it seems odd.


-- 



More information about the Digitalmars-d-bugs mailing list