Re: A89: Re: evaluating expressions


[Prev][Next][Index][Thread]

Re: A89: Re: evaluating expressions




> > Btw, is lea "better" than addq when adjusting the stack pointer?
> Yes, because addq.l #8,a7
> does not exist (a first argument of addq is limited to 0-7, because
> 3 bits are reserved for it). So, I used

Guess again - Scott caught an error in TIGCC that I bet most all of us - me
and you included - would also make in our  ASM code.

Read the Motorola 68k UM, section 4-11 (addq) - since there would be no
reason to use addq with zero, if the chip detects #%000 as the 3-bit data
field it takes it as eight - therefore, addq is from ONE to EIGHT!  I've
read over that section like 6 straight times now, both lea and add will take
8 cycles but addq will be 2 bytes smaller.

    -Scott




References: