From owner-freebsd-hackers Fri Apr 5 12: 2:43 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from web11403.mail.yahoo.com (web11403.mail.yahoo.com [216.136.131.233]) by hub.freebsd.org (Postfix) with SMTP id 8FA8137B416 for ; Fri, 5 Apr 2002 12:02:37 -0800 (PST) Message-ID: <20020405200237.59784.qmail@web11403.mail.yahoo.com> Received: from [199.246.40.54] by web11403.mail.yahoo.com via HTTP; Fri, 05 Apr 2002 12:02:37 PST Date: Fri, 5 Apr 2002 12:02:37 -0800 (PST) From: Rayson Ho Subject: Re: 64-bit compiling on a 32-bit FreeBSD machine To: Jason Borkowsky , freebsd-hackers@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This is gcc question, you can also try gcc@gcc.gnu.org. main() { long long ll; ll = 1234567890123456LL; printf("%lld\n", ll); } % ./a.out 1234567890123456 I looked at the assembly dump, it looks OK: main: pushl %ebp movl %esp,%ebp subl $8,%esp movl $1015724736,-8(%ebp) movl $287445,-4(%ebp) movl -8(%ebp),%eax movl -4(%ebp),%edx pushl %edx pushl %eax pushl $.LC0 call printf addl $12,%esp Rayson --- Jason Borkowsky wrote: > I have a FreeBSD 4.5-RELEASE box that I recently installed gcc-3.0.4. > Is there any support for compiling 64-bit source code on this 32-bit > set-up? > (ie, a sort of emulation mode in that if the compiler sees a "long > long > int", it creates 2 32-bit registers for it instead of a 64-bit > register). > Currently gcc-3.0.4 understands "long long int", but if you try to > assign > it a 64-bit value, it just gets set to the largest 32-bit value (4 > billion). > If gcc cannot handle this, are there any other compilers that can > made > 64-bit code work on a 32-bit machine? > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message __________________________________________________ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message