← Commit list

89092c61b

Denys Vlasenko
Denys Vlasenko
2022-01-07
SUCCESS Duration: 155s

Subject

powertop: fix cpuid asm: ebx saving/restoring is properly done by gcc

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

procps/powertop.c+1 -4
@@ -506,12 +506,9 @@ static void cpuid(unsigned int *eax, unsigned int *ebx, unsigned int *ecx,
{
/* EAX value specifies what information to return */
asm (
- " pushl %%ebx\n" /* Save EBX */
" cpuid\n"
- " movl %%ebx, %1\n" /* Save content of EBX */
- " popl %%ebx\n" /* Restore EBX */
: "=a"(*eax), /* Output */
- "=r"(*ebx),
+ "=b"(*ebx),
"=c"(*ecx),
"=d"(*edx)
: "0"(*eax), /* Input */