From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27725 invoked by alias); 9 Dec 2012 13:50:17 -0000 Received: (qmail 27712 invoked by uid 22791); 9 Dec 2012 13:50:15 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-ob0-f175.google.com (HELO mail-ob0-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 09 Dec 2012 13:50:12 +0000 Received: by mail-ob0-f175.google.com with SMTP id vb8so1706707obc.20 for ; Sun, 09 Dec 2012 05:50:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.212.2 with SMTP id ng2mr1838967obc.81.1355061010274; Sun, 09 Dec 2012 05:50:10 -0800 (PST) Received: by 10.182.153.201 with HTTP; Sun, 9 Dec 2012 05:50:10 -0800 (PST) Date: Sun, 09 Dec 2012 13:50:00 -0000 Message-ID: Subject: Re: [PATCH i386]: Enable push/pop in pro/epilogue for modern CPUs From: Uros Bizjak To: gcc-patches@gcc.gnu.org Cc: Xinliang David Li Content-Type: text/plain; charset=ISO-8859-1 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-12/txt/msg00577.txt.bz2 Hello! > I noticed in prologue/epilogue, GCC prefers to use MOVs followed by a > SP adjustment instead of a sequence of pushes/pops. The preference to > the MOVs are good for old CPU micro-architectures (before pentium-4, > K10), because it breaks the data dependency. In modern > micro-architecture, push/pop is implemented using a mechanism called > stack engine. The data dependency is removed by the hardware, and > push/pop becomes very cheap (1 uOp, 1 cycle latency), and they are > smaller. There is no longer the need to avoid using them. This is > also what ICC does. > 2012-12-08 Xinliang David Li > * config/i386/i386.c: Eanble push/pop in pro/epilogue for moderen CPUs. s/moderen/modern OK for mainline SVN. Thanks, Uros.