Joe Chou

Opcode of  sub.l

Discussion created by Joe Chou on Mar 26, 2009
Latest reply on May 16, 2009 by Harjit Singh

I am running into a weird problem. The result of a ubtraction is supposed to be positive, but I got

negative value. It looks to me that the Compiler might havegenerated wrong assembly code, or the

assembler might have generated wrong Opcode.

 

Need ColdFire experts to teach us how the following Opcode works.


0x91AEFFE0    ub.l    d0,-32(a6)



Opcode is:    0x91AEFFE0


Assembly issub.l   d0,-32(a6)


 

Is it doing

 

-32(a6) =  -32(a6) - d0


OR,


-32(a6) = d0 - ( -32(a6) )


OR, it is doing something else ?



Regards,

Joe

Outcomes