From owner-svn-src-head@freebsd.org Thu Oct 29 21:25:48 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D7F9A20597; Thu, 29 Oct 2015 21:25:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B20131ACC; Thu, 29 Oct 2015 21:25:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9TLPkfV045521; Thu, 29 Oct 2015 21:25:46 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9TLPkfN045519; Thu, 29 Oct 2015 21:25:46 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201510292125.t9TLPkfN045519@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 29 Oct 2015 21:25:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290164 - in head/sys/i386: i386 include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2015 21:25:48 -0000 Author: jhb Date: Thu Oct 29 21:25:46 2015 New Revision: 290164 URL: https://svnweb.freebsd.org/changeset/base/290164 Log: Use movw instead of movl (or plain mov) when moving segment registers into memory. This is a nop on clang's assembler, but some assemblers complain if the size suffix is incorrect. Submitted by: bde Modified: head/sys/i386/i386/exception.s head/sys/i386/include/asmacros.h Modified: head/sys/i386/i386/exception.s ============================================================================== --- head/sys/i386/i386/exception.s Thu Oct 29 21:12:57 2015 (r290163) +++ head/sys/i386/i386/exception.s Thu Oct 29 21:25:46 2015 (r290164) @@ -158,11 +158,11 @@ IDTVEC(xmm) alltraps: pushal pushl $0 - movl %ds,(%esp) + movw %ds,(%esp) pushl $0 - movl %es,(%esp) + movw %es,(%esp) pushl $0 - movl %fs,(%esp) + movw %fs,(%esp) alltraps_with_regs_pushed: SET_KERNEL_SREGS cld @@ -237,11 +237,11 @@ IDTVEC(lcall_syscall) subl $4,%esp /* skip over tf_trapno */ pushal pushl $0 - movl %ds,(%esp) + movw %ds,(%esp) pushl $0 - movl %es,(%esp) + movw %es,(%esp) pushl $0 - movl %fs,(%esp) + movw %fs,(%esp) SET_KERNEL_SREGS cld FAKE_MCOUNT(TF_EIP(%esp)) @@ -266,11 +266,11 @@ IDTVEC(int0x80_syscall) subl $4,%esp /* skip over tf_trapno */ pushal pushl $0 - movl %ds,(%esp) + movw %ds,(%esp) pushl $0 - movl %es,(%esp) + movw %es,(%esp) pushl $0 - movl %fs,(%esp) + movw %fs,(%esp) SET_KERNEL_SREGS cld FAKE_MCOUNT(TF_EIP(%esp)) @@ -426,15 +426,15 @@ doreti_iret_fault: subl $8,%esp pushal pushl $0 - movl %ds,(%esp) + movw %ds,(%esp) .globl doreti_popl_ds_fault doreti_popl_ds_fault: pushl $0 - movl %es,(%esp) + movw %es,(%esp) .globl doreti_popl_es_fault doreti_popl_es_fault: pushl $0 - movl %fs,(%esp) + movw %fs,(%esp) .globl doreti_popl_fs_fault doreti_popl_fs_fault: sti Modified: head/sys/i386/include/asmacros.h ============================================================================== --- head/sys/i386/include/asmacros.h Thu Oct 29 21:12:57 2015 (r290163) +++ head/sys/i386/include/asmacros.h Thu Oct 29 21:25:46 2015 (r290164) @@ -147,11 +147,11 @@ pushl $0 ; /* dummy trap type */ \ pushal ; /* 8 ints */ \ pushl $0 ; /* save data and extra segments ... */ \ - mov %ds,(%esp) ; \ + movw %ds,(%esp) ; \ pushl $0 ; \ - mov %es,(%esp) ; \ + movw %es,(%esp) ; \ pushl $0 ; \ - mov %fs,(%esp) + movw %fs,(%esp) #define POP_FRAME \ popl %fs ; \