From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8204 invoked by alias); 19 Nov 2006 20:37:52 -0000 Received: (qmail 8196 invoked by uid 22791); 19 Nov 2006 20:37:51 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 19 Nov 2006 20:37:43 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id kAJKbc2V029375; Sun, 19 Nov 2006 15:37:38 -0500 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id kAJKbbXb012261; Sun, 19 Nov 2006 15:37:37 -0500 Received: from touchme.toronto.redhat.com (IDENT:postfix@touchme.toronto.redhat.com [172.16.14.9]) by pobox.toronto.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id kAJKbbBp021483; Sun, 19 Nov 2006 15:37:37 -0500 Received: from ton.toronto.redhat.com (ton.toronto.redhat.com [172.16.14.15]) by touchme.toronto.redhat.com (Postfix) with ESMTP id CB8AE800002; Sun, 19 Nov 2006 15:37:36 -0500 (EST) Received: from ton.toronto.redhat.com (localhost.localdomain [127.0.0.1]) by ton.toronto.redhat.com (8.13.1/8.13.1) with ESMTP id kAJKba2g027041; Sun, 19 Nov 2006 15:37:36 -0500 Received: (from fche@localhost) by ton.toronto.redhat.com (8.13.1/8.13.1/Submit) id kAJKbZKK027038; Sun, 19 Nov 2006 15:37:35 -0500 To: Joel Sherrill Cc: gdb@sourceware.org, Ralf Corsepius Subject: Re: powerpc simulator instruction question References: <455E1337.1050100@oarcorp.com> <20061117195711.GA10810@nevyn.them.org> <455E16C5.9080600@oarcorp.com> From: fche@redhat.com (Frank Ch. Eigler) Date: Sun, 19 Nov 2006 20:37:00 -0000 In-Reply-To: <455E16C5.9080600@oarcorp.com> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-11/txt/msg00141.txt.bz2 Joel Sherrill writes: > >> Is the stfiwx not implemented in the simulator? Not valid? > > Looks unimplemented. GCC didn't generate it until 2005. > I have no idea how to read, modify, or use ppc-instructions > to add it. How can I find the instruction in there? The individual instruction patterns are the lines looking like "0.31,....". The parts before the colons describe the instruction encoding, breaking down the bits into operand fields and opcode numbers. For example: 0.31,6.RT,11./,16./,21.83,31./:X:::Move From Machine State Register means: bits 0..5 contain the value 31 6..10 contain the field "RT" (use the expression *rT in the body) 11..15 contain a don't care field 16..20 likewise 21..30 contains the value 83 31 contains a don't care field *601: PPC_UNIT_IU, PPC_UNIT_IU, 1, 1, 0 *603: PPC_UNIT_SRU, PPC_UNIT_SRU, 1, 1, 0 *603e:PPC_UNIT_SRU, PPC_UNIT_SRU, 1, 1, 0 *604: PPC_UNIT_MCIU, PPC_UNIT_MCIU, 3, 3, 0 These are functional unit utilization/performance numbers. if (IS_PROBLEM_STATE(processor)) program_interrupt(processor, cia, privileged_instruction_program_interrupt); else { *rT = MSR; check_masked_interrupts(processor); } This code actually implements the instruction. - FChE