From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Plantz Subject: Re: cltq. Date: Wed, 14 Mar 2007 18:01:34 -0700 Message-ID: <1173920494.5641.3.camel@ubuntu> References: Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-assembly-owner@vger.kernel.org List-Id: Content-Type: text/plain; charset="us-ascii" To: ninjaboy Cc: linux-assembly@vger.kernel.org I do not see this in my manual. So a google search turned up: http://gcc.gnu.org/ml/gcc/2007-01/msg00613.html, which says it's the same as the cdqe instruction. Perhaps I can anticipate your next question. cdqe converts the doubleword in eax to a quadword in rax with the same numerical value. On Thu, 2007-03-15 at 01:17 +0100, ninjaboy wrote: > hello, > what does cltq do? > > 0x0000000000400500 : movl $0x0,0xfffffffffffffffc(%rbp) > 0x0000000000400507 : jmp 0x40051b > 0x0000000000400509 : mov 0xfffffffffffffffc(%rbp),%eax > 0x000000000040050c : mov $0x4004e8,%edx > 0x0000000000400511 : cltq > 0x0000000000400513 : mov %rdx,0xffffffffffffffa0(%rbp,%rax,8) > 0x0000000000400518 : incl 0xfffffffffffffffc(%rbp) > 0x000000000040051b : cmpl $0xc,0xfffffffffffffffc(%rbp) > 0x000000000040051f : jle 0x400509 > > what compares? > Thanks in advance,