Help wanted with converting 1 line asm i386->x86_64

Michal Jaegermann michal at harddata.com
Fri Apr 29 19:03:45 UTC 2005


On Fri, Apr 29, 2005 at 02:22:52PM +0200, Hans de Goede wrote:
> 
> Now the questions are:
> -what symbol gets defined instead of __i386__ for x86_64

Hm, I used 'gcc -dumpspecs' for that in the past; in particular
'*cpp_cpu' section.  Now with gcc 3.4.3  I see there things which
are not particularly informative.  Does somebody know how to make
gcc more forthcoming?

It is always possible to try to guess if you do not have some other
sources handy where such conditional compilation was already used.
A short program which is using '#if defined(__x86_64__)' will show
pretty quickly if such thing is really defined or not.  Quite likely

#if !defined(__x86_64__)
#error "this is not defined"
#endif

may be good enough.  Admittedly such "shoot-and-miss" approach is
not the best one.

> -is the asm code correct for x86_64

I do not think so but I do not really know.

   Michal




More information about the fedora-extras-list mailing list