From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20611 invoked by alias); 22 Nov 2006 11:04:49 -0000 Received: (qmail 20599 invoked by uid 22791); 22 Nov 2006 11:04:48 -0000 X-Spam-Check-By: sourceware.org Received: from out001.atlarge.net (HELO out001.atlarge.net) (129.41.63.69) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 22 Nov 2006 11:04:41 +0000 Received: from hpmailfe-01.atlarge.net ([10.100.60.156]) by out001.atlarge.net with Microsoft SMTPSVC(6.0.3790.1830); Wed, 22 Nov 2006 05:02:59 -0600 Received: from [172.19.32.122] ([213.250.36.225]) by hpmailfe-01.atlarge.net with Microsoft SMTPSVC(6.0.3790.1830); Wed, 22 Nov 2006 05:02:58 -0600 Message-ID: <45642EC1.2070709@telargo.com> Date: Wed, 22 Nov 2006 11:04:00 -0000 From: Tom Marn Reply-To: tom.marn@telargo.com User-Agent: Thunderbird 1.5.0.7 (X11/20060918) MIME-Version: 1.0 To: gdb-patches@sourceware.org CC: matej.kupljen@telargo.com Subject: PATCH: stfiwx implementation for PowerPC gdb simulator Content-Type: multipart/mixed; boundary="------------080606060509090807060304" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-11/txt/msg00243.txt.bz2 This is a multi-part message in MIME format. --------------080606060509090807060304 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 378 Hi I append new optional instruction "stfiwx" for PowerPC 603/603e/604 needed by gdb inside sim/ppc simulator. GNU gcc already generates binaries with this instruction and the patch is essential for properly running binaries on gdb simulator (target sim). Without this patch you will get: program interrupt - illegal instruction (optional instruction not supported) Tom Marn --------------080606060509090807060304 Content-Type: text/x-patch; name="gdb-sim-ppc-stfiwx-instruction.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="gdb-sim-ppc-stfiwx-instruction.patch" Content-length: 1444 2006-11-22 Tom Marn * ppc-instructions: implementation of optional PowerPC stfiwx instruction for gdb and insight source to avoid illegal instruction code interrupt --- gdb-6.5/sim/ppc/ppc-instructions.orig 2006-11-22 09:25:56.000000000 +0100 +++ gdb-6.5/sim/ppc/ppc-instructions 2006-11-22 09:42:34.000000000 +0100 @@ -3644,6 +3644,18 @@ STORE(EA, 8, *frS); PPC_INSN_INT_FLOAT(0, 0, (RA_BITMASK & ~1) | RB_BITMASK, FRS_BITMASK); +0.31,6.FRS,11.RA,16.RB,21.983,31./:X:f::Store Floating-Point Integer Word Indexed +*603: PPC_UNIT_LSU, PPC_UNIT_LSU, 1, 2, 0 +*603e:PPC_UNIT_LSU, PPC_UNIT_LSU, 1, 2, 0 +*604: PPC_UNIT_LSU, PPC_UNIT_LSU, 1, 3, 0 + unsigned_word b; + unsigned_word EA; + if (RA_is_0) b = 0; + else b = *rA; + EA = b + *rB; + STORE(EA, 4, *frS); + PPC_INSN_INT_FLOAT(0, 0, (RA_BITMASK & ~1) | RB_BITMASK, FRS_BITMASK); + 0.55,6.FRS,11.RA,16.D:D:f::Store Floating-Point Double with Update *601: PPC_UNIT_IU, PPC_UNIT_IU, 1, 1, 0 *603: PPC_UNIT_LSU, PPC_UNIT_LSU, 1, 2, 0 @@ -4682,13 +4694,6 @@ FPSCR |= bit; FPSCR_END(Rc); - -# -# I.A.1.1 Floating-Point Store Instruction -# -0.31,6.FRS,11.RA,16.RB,21.983,31./:X:f,o::Store Floating-Point as Integer Word Indexed - program_interrupt(processor, cia, optional_instruction_program_interrupt); - # # I.A.1.2 Floating-Point Arithmetic Instructions # --------------080606060509090807060304--