From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24693 invoked by alias); 13 May 2011 03:35:40 -0000 Received: (qmail 24627 invoked by uid 22791); 13 May 2011 03:35:39 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,TW_NW,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from csmailer.cs.nctu.edu.tw (HELO csmailer.cs.nctu.edu.tw) (140.113.235.130) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 13 May 2011 03:35:07 +0000 Received: from csmailer.cs.nctu.edu.tw (localhost [127.0.0.1]) by csmailer.cs.nctu.edu.tw (Postfix) with ESMTP id 2C574D11; Fri, 13 May 2011 11:35:59 +0800 (CST) Received: from alumni.cs.nctu.edu.tw (alumni.cs.nctu.edu.tw [140.113.235.116]) by csmailer.cs.nctu.edu.tw (Postfix) with ESMTP id 2564BD10; Fri, 13 May 2011 11:35:59 +0800 (CST) Received: (from chenwj@localhost) by alumni.cs.nctu.edu.tw (8.14.4/8.14.4/Submit) id p4D3Z58J080206; Fri, 13 May 2011 11:35:05 +0800 (CST) (envelope-from chenwj) Date: Fri, 13 May 2011 03:35:00 -0000 From: =?utf-8?B?6Zmz6Z+L5Lu7?= To: Ian Lance Taylor Cc: gcc-help@gcc.gnu.org Subject: Re: Generate annotations for a binary translator Message-ID: <20110513033505.GA79308@cs.nctu.edu.tw> References: <20110512094304.GA60454@cs.nctu.edu.tw> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-05/txt/msg00173.txt.bz2 Hi, Ian > I'm not sure exactly what you are asking. gcc does not generate these > kinds of annotations today. It is possible for it to generate them in > the future, if there is some way to make use of them. I assume you know a liitle bit about what a binary translator does, or you can think what it does is like QEMU. Take basic block (bb) register usage as an example. It good to a binary translator to know that a basic block register usage information. Say, bb A whose binary address starts from 0x100 to 0x120 does NOT use R1, then the binary translator can use R1 for free. I know there is a data structure for basic block. But in order to let a binary translator use the basic block register usage information, each basic block must be associated with its corresponding binary (virtual) address. If it is possible to generating such information, which part of gcc should I look into first? Thanks!=20 Regards, chenwj --=20 Wei-Ren Chen (=E9=99=B3=E9=9F=8B=E4=BB=BB) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667