From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22797 invoked by alias); 9 Feb 2004 20:34:30 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 22753 invoked from network); 9 Feb 2004 20:34:28 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 9 Feb 2004 20:34:28 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id i19KYRb17692 for ; Mon, 9 Feb 2004 15:34:27 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i19KYPM27708; Mon, 9 Feb 2004 15:34:26 -0500 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i19KYOX23446; Mon, 9 Feb 2004 12:34:24 -0800 Message-ID: <4027EED0.9050608@redhat.com> Date: Mon, 09 Feb 2004 20:34:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 MIME-Version: 1.0 To: Joern Rennecke CC: joern.rennecke@superh.com, gdb-patches@sources.redhat.com Subject: Re: [RFA] sh-sim: free up some room in jump_table References: <200402071831.i17IVRLD001695@meolyon.local> In-Reply-To: <200402071831.i17IVRLD001695@meolyon.local> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-02/txt/msg00204.txt.bz2 Joern Rennecke wrote: >>! printf (" if (target_dsp && \n"); >>! printf (" (iword & 0xf000) == 0xf000)\n"); >>! printf (" switch (sh_dsp_table[iword & 0xfff]) {\n"); >> gensim_caselist (movsxy_tab); >>! printf (" else switch (jump_table[iword]) {\n"); > > > You have changed a straight dispatch into an if-then-else with > two dispatches, and the integer and fpu arithmetic path goes the long way > round the dsp dispatch; this seems to be a surefire way to make the > simulator slower. > > We don't relly care much about the total size of the simulator, but > we care about its working set size, so why don't you generate two > separate simulator main loops, to be compiler into separate *.o > files, one with the FPU instructions, and the other one with the > dsp instructions? OK, I need to catch up with you here. So, your concern is not with the time it takes to execute the if condition, but with the size and/or distribution of the working set? I'm not very used to programming around such considerations, so I'll look to you for guidance. I can see the sense of making two loops, but why would it be necessary for them to be in two separate compilation units? Would you be willing to specify a performance test that I can use, and a test criterion for me to meet? It might save time, given that we seem to have a 24 hour email cycle.