Skip to contentSkip to conversation

cpuid neatening.

PATCH Rusty Russell 1 participant 1 message Jul 22, 2006 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 16 lines

Review

Quoted 13 lines
(quoted diff) +12 -0
+static inline void __cpuid(unsigned int *eax, unsigned int *ebx,
+			   unsigned int *ecx, unsigned int *edx)
+{
+	/* ecx is often an input as well as an output. */
+	__asm__("cpuid"
+		: "=a" (*eax),
+		  "=b" (*ebx),
+		  "=c" (*ecx),
+		  "=d" (*edx)
+		: "0" (*eax), "2" (*ecx));
+}
+

Shouldn't that be:

Quoted 6 lines

__asm__("cpuid"
: "+a" (*eax),
"=b" (*ebx),
"+c" (*ecx),
"=d" (*edx)
);

Perhaps? I copied the existing code...

Rusty.

Signature · 1 line
Help! Save Australia from the worst of the DMCA: http://linux.org.au/law