This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to write pattern for addition with carry operation
"Mohamed Shafi" <shafitvm@gmail.com> writes:
>> You can look into config/i386.md, how i.e. adddi3 is expanded and split in
>> case of !TARGET_64BIT.
>
> But is it scheduling safe?
> I mean you can't have addc executed before add. If i am right there
> will be no dependency between the two instructions. So there can be a
> case where addc gets scheduled before add. Am i right on both counts?
You are right in the sense that you must express the dependency
between the insns in the RTL.
The i386 backend is safe. It expresses this dependency via (reg:CC
FLAGS_REG).
Ian