ICE using const as offset in inline assembly

Thomas Kuehne thomas-dloop at kuehne.cn
Thu Jun 29 06:35:26 PDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

pmoore schrieb am 2006-06-21:
> The following code crashes the compiler (DMD 0.160 and 0.161)
>
> #const int CONST_OFFSET = 10;
> #
> #void main()
> #{
> #	asm
> #	{
> #		mov EDI, 10;
> #		mov EAX, [EDI + CONST_OFFSET];
> #	}
> #}
>
> It's the use of the const as an offset that causes the crash. Remove the '+
> CONST_OFFSET' and it works ok.
>
> This code works in DMD 0.158. Not sure about 0.159 (I don't have 0.159 and I
> need to go to sleep now:) )

Added to DStress as
http://dstress.kuehne.cn/compile/a/asm_offset_02_A.d
http://dstress.kuehne.cn/compile/a/asm_offset_02_B.d

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFEo6z13w+/yD4P9tIRAltXAKDBVLEfQs71siLESv9Wn8IOwmumzwCgiPOg
8Ixy2O2s9Q7Em4X/k+NUi8g=
=zyXj
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-bugs mailing list