Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752771AbbDAWOV (ORCPT ); Wed, 1 Apr 2015 18:14:21 -0400 Received: from mail-ig0-f182.google.com ([209.85.213.182]:37798 "EHLO mail-ig0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752119AbbDAWOS (ORCPT ); Wed, 1 Apr 2015 18:14:18 -0400 MIME-Version: 1.0 In-Reply-To: <551C5A73.3050109@redhat.com> References: <1427821211-25099-1-git-send-email-dvlasenk@redhat.com> <1427821211-25099-7-git-send-email-dvlasenk@redhat.com> <551BD241.4060207@redhat.com> <551C5A73.3050109@redhat.com> Date: Wed, 1 Apr 2015 15:14:17 -0700 X-Google-Sender-Auth: ZnjEULlucT9-o3-SJQa5151cq1Q Message-ID: Subject: Re: [PATCH 7/9] x86/asm/entry/32: tidy up some instructions From: Linus Torvalds To: Denys Vlasenko Cc: Brian Gerst , Ingo Molnar , Steven Rostedt , Borislav Petkov , "H. Peter Anvin" , Andy Lutomirski , Oleg Nesterov , Frederic Weisbecker , Alexei Starovoitov , Will Drewry , Kees Cook , "the arch/x86 maintainers" , Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1131 Lines: 28 On Wed, Apr 1, 2015 at 1:52 PM, Denys Vlasenko wrote: > > BTW, AMD64 docs do explicitly say that MOVs from segment registers > to gpregs are zero-extending. Yeah, I think anything even *remotely* recent enough to do 64-bit does zero-extending. Even on the 32-bit side, anything that does register renaming is much better off with zero-extension than with partial register writes. And I found the "push" thing. It's actually documented: "When pushing a segment selector onto the stack, the Pentium 4, Intel Xeon, P6 family, and Intel486 processors decrement the ESP register by the operand size and then write 2 bytes. If the operand size is 32-bits, the upper two bytes of the write are not modified" but I can't find any similar documentation for the "mov Sreg->register" thing. So now I'm starting to doubt my own memory. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/