From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7346 invoked by alias); 18 Apr 2003 00:06:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 7328 invoked by uid 71); 18 Apr 2003 00:06:00 -0000 Resent-Date: 18 Apr 2003 00:06:00 -0000 Resent-Message-ID: <20030418000600.7326.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, aaron@cs.wisc.edu Received: (qmail 7179 invoked by uid 48); 18 Apr 2003 00:04:42 -0000 Message-Id: <20030418000442.7178.qmail@sources.redhat.com> Date: Fri, 18 Apr 2003 00:06:00 -0000 From: aaron@cs.wisc.edu Reply-To: aaron@cs.wisc.edu To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c/10430: converting double word to quad word, cltd, cdq, 3.2.2 X-SW-Source: 2003-04/txt/msg00820.txt.bz2 List-Id: >Number: 10430 >Category: c >Synopsis: converting double word to quad word, cltd, cdq, 3.2.2 >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Fri Apr 18 00:06:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Aaron Wegner >Release: unknown-1.0 >Organization: >Environment: i686-pc-linux-gnu >Description: ------- Problem ------- The problem is that cldt will replace whatever is in %edx with zeros or ones. Correct code omits cldt. -------- C Source -------- main() { foo((unsigned long long int) bar()); } ------------------------- Generated Assember Source ------------------------- .file "test.c" .text .globl main .type main,@function main: pushl %ebp movl %esp, %ebp subl $8, %esp andl $-16, %esp movl $0, %eax subl %eax, %esp call bar cltd movl %eax, (%esp) movl %edx, 4(%esp) call foo leave ret .Lfe1: .size main,.Lfe1-main .ident "GCC: (GNU) 3.2.2" >How-To-Repeat: gcc -S test.c >Fix: Unsure still. >Release-Note: >Audit-Trail: >Unformatted: