[A89] er, addq #0,dx


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

[A89] er, addq #0,dx




> Doesn't the moveq move a value between -128 and 127 into a register and
> sign extends it to a long value?  I know that I have used moveq #0,dx
> plenty of times and it works fine.
>
> Addqs on the other hand are limited from 0 to 8.  So maybe tigcc is using
> this limit also for the moveqs.  It would seem a stupid bug though.

Ooops, you're right here -- it's addq that's limited from 1 to 8 (this time
I'm reading it in the manual while asking the question =)  So does TIGCC
allow "addq #8, d0" in inline ASM?

That's right, it came up in a discussion about restoring the stack after a
ROM Call -- because if you're only adding a value between one and eight to
the stack pointer, addq and lea are the same speed, but addq is smaller -
right?

My bad - sorry 'bout that (I seem to do that a LOT around here =)

    -Scott





Follow-Ups: