From: Adrian Bunk <bunk@stusta.de>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Harvey Harrison <harvey.harrison@gmail.com>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [2.6 patch] asm-generic/int-ll64.h: always provide __{s,u}64
Date: Tue, 20 May 2008 12:09:49 +0300 [thread overview]
Message-ID: <20080520090949.GI17716@cs181133002.pp.htv.fi> (raw)
In-Reply-To: <4832266D.5010203@zytor.com>
On Mon, May 19, 2008 at 06:16:29PM -0700, H. Peter Anvin wrote:
> Adrian Bunk wrote:
>>>>
>>> This is a valid point. This should be __i486__ for userspace, which
>>> is gcc's way to tell you if you're compiling with -march=i486.
>>
>> This doesn't help if you're compiling with e.g. -march=pentium
>
> Yes, it does. -march=pentium defines __i486__ as well as __i586__, and
> so on.
$ cat test.c
#include <stdio.h>
int main()
{
#ifdef __i486__
printf("foobarbaz\n");
#endif
return 0;
}
$ gcc -O2 -march=i486 -Wall test.c; ./a.out
foobarbaz
$ gcc -O2 -march=pentium -Wall test.c; ./a.out
$ gcc --version
gcc (Debian 4.3.0-4) 4.3.1 20080501 (prerelease)
...
$ /usr/local/DIR/gcc-3.2.3/bin/gcc -O2 -march=i486 -Wall test.c; ./a.out
foobarbaz
$ /usr/local/DIR/gcc-3.2.3/bin/gcc -O2 -march=pentium -Wall test.c; ./a.out
$ /usr/local/DIR/gcc-3.2.3/bin/gcc --version
gcc (GCC) 3.2.3
> -hpa
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
next prev parent reply other threads:[~2008-05-20 9:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-19 21:54 Adrian Bunk
2008-05-19 22:01 ` H. Peter Anvin
2008-05-19 22:27 ` Harvey Harrison
2008-05-19 22:29 ` H. Peter Anvin
2008-05-19 22:32 ` Adrian Bunk
2008-05-19 23:51 ` H. Peter Anvin
2008-05-20 0:13 ` Adrian Bunk
2008-05-20 0:17 ` H. Peter Anvin
2008-05-20 0:33 ` Adrian Bunk
2008-05-20 1:16 ` H. Peter Anvin
2008-05-20 9:09 ` Adrian Bunk [this message]
2008-05-20 14:54 ` H. Peter Anvin
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=20080520090949.GI17716@cs181133002.pp.htv.fi \
--to=bunk@stusta.de \
--cc=akpm@linux-foundation.org \
--cc=harvey.harrison@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®