From owner-cvs-src@FreeBSD.ORG Thu Sep 28 19:38:03 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2982716A407; Thu, 28 Sep 2006 19:38:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EDFC443D4C; Thu, 28 Sep 2006 19:38:02 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k8SJc2kH038373; Thu, 28 Sep 2006 19:38:02 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k8SJc238038372; Thu, 28 Sep 2006 19:38:02 GMT (envelope-from jhb) Message-Id: <200609281938.k8SJc238038372@repoman.freebsd.org> From: John Baldwin Date: Thu, 28 Sep 2006 19:38:02 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/boot/i386/btx/btx btx.S X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Sep 2006 19:38:03 -0000 jhb 2006-09-28 19:38:02 UTC FreeBSD src repository Modified files: sys/boot/i386/btx/btx btx.S Log: Optimize the int 15/87 handler for space to shave another 16 bytes off of BTX (and thus boot2): - Don't bother saving %eax, %ebx, or %ecx as it is not necessary. - Use a more compact sequence to load the base value out of a GDT entry by loading the contiguous low 24 bits into the upper 24 bits of %eax, loading the high 8 bits into %al, and using a ror to rotate the bits (2 mov's and a ror) rather than loading the pieces in smaller chunks (3 mov's and a shl). - Use movzwl + leal instead of movl + movw + shll + addl. - Use 'xchgl %eax,%foo' rather than 'movl %eax,%foo' for cases where it's ok to trash %eax. xchgl %eax, foo is a 1-byte opcode whereas the mov is a 2-byte opcode. - Use movzwl rather than xorl + movw. MFC after: 1 week Revision Changes Path 1.41 +17 -31 src/sys/boot/i386/btx/btx/btx.S