Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/i386/cpuid.h @ 63:b7f97abdc517 gcc-4.6-20100522
update gcc from gcc-4.5.0 to gcc-4.6
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 24 May 2010 12:47:05 +0900 |
parents | 77e2b8dfacca |
children | f6334be47118 |
comparison
equal
deleted
inserted
replaced
56:3c8a44c06a95 | 63:b7f97abdc517 |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. | 2 * Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
3 * | 3 * |
4 * This file is free software; you can redistribute it and/or modify it | 4 * This file is free software; you can redistribute it and/or modify it |
5 * under the terms of the GNU General Public License as published by the | 5 * under the terms of the GNU General Public License as published by the |
6 * Free Software Foundation; either version 3, or (at your option) any | 6 * Free Software Foundation; either version 3, or (at your option) any |
7 * later version. | 7 * later version. |
115 __get_cpuid_max (unsigned int __ext, unsigned int *__sig) | 115 __get_cpuid_max (unsigned int __ext, unsigned int *__sig) |
116 { | 116 { |
117 unsigned int __eax, __ebx, __ecx, __edx; | 117 unsigned int __eax, __ebx, __ecx, __edx; |
118 | 118 |
119 #ifndef __x86_64__ | 119 #ifndef __x86_64__ |
120 /* See if we can use cpuid. On AMD64 we always can. */ | |
120 #if __GNUC__ >= 3 | 121 #if __GNUC__ >= 3 |
121 /* See if we can use cpuid. On AMD64 we always can. */ | |
122 __asm__ ("pushf{l|d}\n\t" | 122 __asm__ ("pushf{l|d}\n\t" |
123 "pushf{l|d}\n\t" | 123 "pushf{l|d}\n\t" |
124 "pop{l}\t%0\n\t" | 124 "pop{l}\t%0\n\t" |
125 "mov{l}\t{%0, %1|%1, %0}\n\t" | 125 "mov{l}\t{%0, %1|%1, %0}\n\t" |
126 "xor{l}\t{%2, %0|%0, %2}\n\t" | 126 "xor{l}\t{%2, %0|%0, %2}\n\t" |