This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: 64-bit for OS kernel development
- From: "Frank W. Miller" <fwmiller at cornfed dot com>
- To: "'Ian Lance Taylor'" <iant at google dot com>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Fri, 8 Feb 2008 19:54:22 -0700
- Subject: RE: 64-bit for OS kernel development
Thanks, I was able to decipher that from the gcc documentation finally.
Another question, if I want to optimize for core 2 duo, what -mtune should I
use?
Thanks,
FM
-----Original Message-----
From: Ian Lance Taylor [mailto:iant@google.com]
Sent: Friday, February 08, 2008 6:48 PM
To: Frank W. Miller
Cc: gcc-help@gcc.gnu.org
Subject: Re: 64-bit for OS kernel development
"Frank W. Miller" <fwmiller@cornfed.com> writes:
> I am interested in using gcc to extend the development of an OS kernel
> from 32-bit to 64-bit for Intel and AMD processors.
>
> If I use a compiler that is built for a 32-bit Linux distro, and I
> change my types in the kernel code from 32 bit (long and unsigned long)
> to 64 bit (long long and unsigned long long), will the resulting data
> types use the native 64-bit types on the underlying machine?
Only if you compile in 64-bit mode. A compiler for a 32-bit distro
probably compiles in 32-bit mode by default. It may support the -m64
option to generate 64-bit code.
Ian