public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jim Wilson <wilson@specifixinc.com>
To: Scott Robert Ladd <coyote@coyotegulch.com>
Cc: gcc@gcc.gnu.org
Subject: Re: 128-bit long long?
Date: Tue, 30 Mar 2004 02:10:00 -0000	[thread overview]
Message-ID: <4068C184.4050307@specifixinc.com> (raw)
In-Reply-To: <405DB46B.80208@coyotegulch.com>

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

      parent reply	other threads:[~2004-03-30  0:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-21 17:34 Scott Robert Ladd
2004-03-21 17:37 ` Andreas Jaeger
2004-03-21 18:02   ` Paolo Carlini
2004-03-21 20:27   ` Erik Trulsson
2004-03-21 20:52 ` Zack Weinberg
2004-03-21 21:11   ` Joseph S. Myers
2004-03-21 21:20   ` Scott Robert Ladd
2004-03-22  0:12     ` Paolo Carlini
2004-03-24  5:38       ` Richard B. Kreckel
2004-03-24  5:57         ` Paolo Carlini
2004-03-30  2:10 ` Jim Wilson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4068C184.4050307@specifixinc.com \
    --to=wilson@specifixinc.com \
    --cc=coyote@coyotegulch.com \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).