
marcus.brinkmann at ruhr-uni-bochum
Jan 21, 2008, 9:02 AM
Post #2 of 2
(975 views)
Permalink
|
At Mon, 21 Jan 2008 01:04:00 +0200, Ismail Dönmez <ismail [at] pardus> wrote: > Jakub Jelinek of gcc and glibc fame fixed inline asm in padlock support code. > His patch and explanation is available at > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34725#c4 . > > I tested the patch and it works. Yes, but it leaves a superfluous %0 which is not used. So, I put in a slightly simpler fix: asm volatile ("pushl %%ebx\n\t" /* Save GOT register. */ "xorl %%eax, %%eax\n\t" /* 0 -> EAX. */ "cpuid\n\t" /* Get vendor ID. */ "movl %%ebx, (%0)\n\t" /* EBX,EDX,ECX -> VENDOR_ID. */ "movl %%edx, 4(%0)\n\t" "movl %%ecx, 8(%0)\n\t" "popl %%ebx\n" : : "S" (&vendor_id[0]) : "%eax", "%ecx", "%edx", "cc" ); Thanks, Marcus _______________________________________________ Gcrypt-devel mailing list Gcrypt-devel [at] gnupg http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
|