Browse Source

Be consistent about which param is ECX for CPUID.

It doesn't matter because it's 0 anyway, but still.
Yawning Angel 2 years ago
parent
commit
da0b9cb6d7
3 changed files with 3 additions and 3 deletions
  1. 1 1
      aez_amd64.go
  2. 1 1
      aez_amd64.py
  3. 1 1
      aez_amd64.s

+ 1 - 1
aez_amd64.go

@@ -116,7 +116,7 @@ func supportsAESNI() bool {
 	}
 
 	// Check for AES-NI support.
-	// CPUID.(EAX=01H, ECX=0H):ECX.AESNI[bit 25] = 1
+	// CPUID.(EAX=01H, ECX=0H):ECX.AESNI[bit 25]==1
 	return regs[2]&aesniBit != 0
 }
 

+ 1 - 1
aez_amd64.py

@@ -21,7 +21,7 @@ with Function("cpuidAMD64", (cpuidParams,)):
     LOAD.ARGUMENT(reg_params, cpuidParams)
 
     MOV(registers.eax, [reg_params])
-    MOV(registers.ecx, [reg_params+4])
+    MOV(registers.ecx, [reg_params+8])
 
     CPUID()
 

+ 1 - 1
aez_amd64.s

@@ -6,7 +6,7 @@
 TEXT ·cpuidAMD64(SB),4,$0-8
 	MOVQ cpuidParams+0(FP), R15
 	MOVL 0(R15), AX
-	MOVL 4(R15), CX
+	MOVL 8(R15), CX
 	CPUID
 	MOVL AX, 0(R15)
 	MOVL BX, 4(R15)