From: Tom Marn <tom.marn@telargo.com>
To: gdb-patches@sourceware.org
Cc: matej.kupljen@telargo.com
Subject: PATCH: stfiwx implementation for PowerPC gdb simulator
Date: Wed, 22 Nov 2006 11:04:00 -0000 [thread overview]
Message-ID: <45642EC1.2070709@telargo.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 378 bytes --]
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
[-- Attachment #2: gdb-sim-ppc-stfiwx-instruction.patch --]
[-- Type: text/x-patch, Size: 1444 bytes --]
2006-11-22 Tom Marn <tom.marn@telargo.com>
* 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
#
next reply other threads:[~2006-11-22 11:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-22 11:04 Tom Marn [this message]
2006-11-28 16:07 ` Daniel Jacobowitz
2006-11-29 8:33 ` Tom Marn
2006-11-29 15:28 ` Andrew Cagney
2006-11-29 15:30 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45642EC1.2070709@telargo.com \
--to=tom.marn@telargo.com \
--cc=gdb-patches@sourceware.org \
--cc=matej.kupljen@telargo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox