[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lousy code generation
ST2975@SIUCVMB.SIU.EDU writes:
>Isn't it more appropriate that cmp is useful for signed
>integers and that sbc is more appropriate for unsigned
>integers?
Actually, it's the other way around. SBC sets the V flag, CMP does
not. For general-case signed comparisons, you need to use SBC.
Special cases (ie. you know one of the values) can sometimes be
handled with CMP.
--
Jerry Penner jpenne@ee.ualberta.ca or jjp@myrias.ab.ca