Sender: nate AT cartsys DOT com Message-ID: <36BA705B.3F0D8C68@cartsys.com> Date: Thu, 04 Feb 1999 20:15:23 -0800 From: Nate Eldredge X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.0.36 i586) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: Question about long long math on intel archs References: <3 DOT 0 DOT 6 DOT 32 DOT 19990202153421 DOT 0091a590 AT pop DOT netaddress DOT com> <3 DOT 0 DOT 6 DOT 32 DOT 19990204025117 DOT 008ee990 AT pop DOT netaddress DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Paul Derbyshire wrote: > > At 05:18 PM 2/2/99 -0800, you wrote: > >movl y, %eax > >addl %eax, x > >movl y+4, %eax > >adcl %eax, x+4 > > I assume adcl uses the carry from the first add? Correct. > This leaves one question. If the result of the adds is left in eax it never > gets saved and the second add clobbers the result of the first one. Or does > addl/adcl put the result in the address at right, x and then x+4? Yes. Move a long from y to eax, then add it to x. eax is just a scratch register since we have no mem-to-mem adds. -- Nate Eldredge nate AT cartsys DOT com