From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id 47A9D2FF41 for ; Tue, 26 Sep 2000 23:17:29 -0400 (EDT) Received: (from mail@localhost) by mail.redhat.com (8.8.7/8.8.7) id XAA09450 for axp-list@listman.redhat.com; Tue, 26 Sep 2000 23:17:29 -0400 Received: from piglet.twiddle.net (piglet.twiddle.net [207.104.6.26]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id XAA09446 for ; Tue, 26 Sep 2000 23:17:28 -0400 Received: (from rth@localhost) by piglet.twiddle.net (8.9.3/8.9.3) id UAA10670 for axp-list@redhat.com; Tue, 26 Sep 2000 20:17:34 -0700 Date: Tue, 26 Sep 2000 20:17:34 -0700 From: Richard Henderson To: axp-list@redhat.com Subject: Re: Weird Compaq CCC / GCC interaction ? Message-ID: <20000926201734.A10667@twiddle.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre3us In-Reply-To: X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0beta4 Precedence: bulk Reply-To: axp-list@redhat.com List-Id: Linux and Red Hat on Alpha processors On Tue, Sep 26, 2000 at 01:25:47PM -0400, Larry Sendlosky wrote: > MAGIC is an unsigned int (32bits) with value 0xc00fc00f. The compiler > should generate 0x00000000c00fc00f for the register value. This is > "sign extending" an unsigned int (there is no sign bit or it's > "inferred" to be zero). Incorrect. The calling conventions specify that bit 31 of a 32-bit value should be replicated up. We choose this form because this is what the 32-bit arithmetic and memory load instructions do, so oft times we need perform no extra work. Basicly, one should choose *some* canonical form for 32-bit data in your 64-bit registers. Sign extending happens to be easiest on Alpha. Failure to do so results in catastrophic failure in the face of missing or incorrect prototypes -- all too common in source code even today. Anyway, the gcc problem was brought to my attention by Steve Hobbes from the Compaq compiler group back in January. It's been fixed since, though I guess that's well after 2.95 was released. r~