Page 1 of 1

Dest address calculating bug?

Posted: Thu Mar 03, 2016 1:39 pm
by Dr. MefistO

Code: Select all

lea     -1(a2,d1.w),a3
a2 = 0x00FF0000
d1 = 0x4000F801

a3 => 0x00FEF800

How is it possible?

If it is possible, then this comparing will be true? (a4 = 0x00FFF800)

Code: Select all

cmpa.l  a4,a3

Re: Dest address calculating bug?

Posted: Thu Mar 03, 2016 2:08 pm
by Stef
For address calculation you used d1.w so only word part (lower 16 bits) of D1 register, in which case it consider signed 16 bits indexing.
So internally D1 is *signed* extended to 32 bits before being added to A2, that explains the result.