Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 287455 Details for
Bug 384129
sys-devel/gcc-4.5.3-r1 uses -mtune=generic instead of -mtune=core2 when using -march=native
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
cpuid.c
cpuid.c (text/plain), 882 bytes, created by
SpanKY
on 2011-09-22 23:05:39 UTC
(
hide
)
Description:
cpuid.c
Filename:
MIME Type:
Creator:
SpanKY
Created:
2011-09-22 23:05:39 UTC
Size:
882 bytes
patch
obsolete
>#include <stdio.h> >static inline void cpuid (unsigned int info, unsigned int *eax, unsigned int *ebx, > unsigned int *ecx, unsigned int *edx) >{ > unsigned int _eax = info, _ebx, _ecx, _edx; > asm volatile ("mov %%ebx, %%edi;" // save ebx (for PIC) > "cpuid;" > "mov %%ebx, %%esi;" // pass to caller > "mov %%edi, %%ebx;" // restore ebx > :"+a" (_eax), "=S" (_ebx), "=c" (_ecx), "=d" (_edx) > : /* inputs: eax is handled above */ > :"edi" /* clobbers: we hit edi directly */); > if (eax) *eax = _eax; > if (ebx) *ebx = _ebx; > if (ecx) *ecx = _ecx; > if (edx) *edx = _edx; >} >foo(int i) { >unsigned int a,b,c,d; >cpuid(i, &a,&b,&c,&d); >printf("%#x: %#x %#x %#x %#x\n", i, a,b,c,d); >} >main() {foo(1);foo(0x80000000);foo(0x80000001);foo(0x80000002);}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 384129
: 287455 |
287457