From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12458 invoked by alias); 26 Aug 2004 22:17:28 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 12376 invoked from network); 26 Aug 2004 22:17:23 -0000 Received: from unknown (HELO evtexc09.relay.danahertm.com) (129.196.229.156) by sourceware.org with SMTP; 26 Aug 2004 22:17:23 -0000 Received: from EVTEXC07.na.flukecorp.com ([129.196.128.100]) by evtexc09.relay.danahertm.com with Microsoft SMTPSVC(6.0.3790.0); Thu, 26 Aug 2004 15:20:07 -0700 Received: by evtexc07.tc.fluke.com with Internet Mail Service (5.5.2657.72) id ; Thu, 26 Aug 2004 15:17:21 -0700 Message-ID: <732BE51FE9901143AE04411A11CC46560484AAB5@evtexc02.tc.fluke.com> From: "Zvilius, Mark" To: "'gcc-help@gcc.gnu.org'" Subject: asm constraints Date: Fri, 27 Aug 2004 06:58:00 -0000 MIME-Version: 1.0 Content-Type: text/plain X-OriginalArrivalTime: 26 Aug 2004 22:20:07.0843 (UTC) FILETIME=[D811A730:01C48BBA] X-SW-Source: 2004-08/txt/msg00246.txt.bz2 For a PowerPC architecture I'm using the following asm statement in C source to read a time base register: unsigned int tbl; __asm__("mftbl %0" : "=r" (tbl)); The code this generates is: mftb r0 mr r9,r0 stw r9,0x18(r31) I'm wondering why it's wasting a register. Am I specifying the constraint incorrectly? Mark Z.