From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26518 invoked by alias); 30 Mar 2004 00:38:25 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 26511 invoked from network); 30 Mar 2004 00:38:24 -0000 Received: from unknown (HELO mta6.wss.scd.yahoo.com) (66.218.85.37) by sources.redhat.com with SMTP; 30 Mar 2004 00:38:24 -0000 Received: from specifixinc.com (24.7.123.142) by mta6.wss.scd.yahoo.com (7.0.016) (authenticated as jim@tuliptree.org) id 405C545E004A0A0F; Mon, 29 Mar 2004 16:38:21 -0800 Message-ID: <4068C184.4050307@specifixinc.com> Date: Tue, 30 Mar 2004 02:10:00 -0000 From: Jim Wilson User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030716 MIME-Version: 1.0 To: Scott Robert Ladd CC: gcc@gcc.gnu.org Subject: Re: 128-bit long long? References: <405DB46B.80208@coyotegulch.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03/txt/msg01689.txt.bz2 Scott Robert Ladd wrote: > On a 64-bit AMD64 architecture, GCC defines long long as 64 bits, the > same as a long. > Given that certain 64-bit instructions (multiply) produce 128-bit > results, doesn't it seem logical the long long be defined as 128 bits? Part of the reason here is historical accident. Early 64-bit targets had to be supported via cross compilation from 32-bit hosts. Gcc internally represents tree and rtl values as 2 HOST_WIDE_INT values. This was before most compilers had long long support, so HOST_WIDE_INT had to be long. Thus a 32-bit host could support at most a 64-bit integer type. So all early 64-bit ports had to limit long long to 64-bits. This restriction was removed relatively recently, between 3.3 and 3.4. So it wasn't until 3.4 that we can have a 128-bit long long type and still support cross compilation from a 32-bit host. However, by now, 64-bit long long assumptions have been written into so much software that changing it would be too painful. -- Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com