All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com
Cc: x86@kernel, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] x86: verify_cpu: use 32-bit arithmetic
Date: Fri, 18 May 2018 00:30:01 +0300	[thread overview]
Message-ID: <20180517213001.GA4047@avx2> (raw)

32-bit instructions are 1 byte shorter than 16-bit instructions.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 arch/x86/kernel/verify_cpu.S |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/arch/x86/kernel/verify_cpu.S
+++ b/arch/x86/kernel/verify_cpu.S
@@ -56,14 +56,14 @@ ENTRY(verify_cpu)
 	cmpl	$0x1,%eax
 	jb	.Lverify_cpu_no_longmode	# no cpuid 1
 
-	xor	%di,%di
+	xor	%edi, %edi
 	cmpl	$0x68747541,%ebx	# AuthenticAMD
 	jnz	.Lverify_cpu_noamd
 	cmpl	$0x69746e65,%edx
 	jnz	.Lverify_cpu_noamd
 	cmpl	$0x444d4163,%ecx
 	jnz	.Lverify_cpu_noamd
-	mov	$1,%di			# cpu is from AMD
+	mov	$1, %edi		# cpu is from AMD
 	jmp	.Lverify_cpu_check
 
 .Lverify_cpu_noamd:
@@ -122,13 +122,13 @@ ENTRY(verify_cpu)
 	andl	$SSE_MASK,%edx
 	cmpl	$SSE_MASK,%edx
 	je	.Lverify_cpu_sse_ok
-	test	%di,%di
+	test	%edi, %edi
 	jz	.Lverify_cpu_no_longmode	# only try to force SSE on AMD
 	movl	$MSR_K7_HWCR,%ecx
 	rdmsr
 	btr	$15,%eax		# enable SSE
 	wrmsr
-	xor	%di,%di			# don't loop
+	xor	%edi, %edi		# don't loop
 	jmp	.Lverify_cpu_sse_test	# try again
 
 .Lverify_cpu_no_longmode:

             reply	other threads:[~2018-05-17 21:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17 21:30 Alexey Dobriyan [this message]
2018-05-17 22:45 ` [PATCH 1/3] x86: verify_cpu: use 32-bit arithmetic hpa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180517213001.GA4047@avx2 \
    --to=adobriyan@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.