From owner-freebsd-hackers Sun Sep 1 15:53:48 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA24828 for hackers-outgoing; Sun, 1 Sep 1996 15:53:48 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id PAA24823 for ; Sun, 1 Sep 1996 15:53:44 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id IAA20814; Mon, 2 Sep 1996 08:50:33 +1000 Date: Mon, 2 Sep 1996 08:50:33 +1000 From: Bruce Evans Message-Id: <199609012250.IAA20814@godzilla.zeta.org.au> To: bde@zeta.org.au, staff@kyklopen.ping.dk Subject: Re: movsbw question Cc: freebsd-hackers@freebsd.org Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk [movsbw] >It was the movsx instruction it I was interessted in. The pgcc emits >an instruction sequence that breaks our gas and i was wondering wether >it was the FreeBSD gas that was wrong. It is probably a pessimization to use movsbw, especially on Pentiums. First, movsbl is 1 byte shorter and often (always except on 386's?) 1 cycle faster and is usually equivalent (it trashes the upper 16 bits of the destination, but this doesn't usually matter). Second, `movsbl %al,%eax' takes 3 nonpairable cycles on Pentiums, but the equivalent `shl $24,%eax; shr $24,%eax' takes only 2 U-pairable cycles, so it is at least 3/2 times faster and up to 3 times faster when reordered. Bruce