This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch, sim] Add isel instruction


Hi,
This patch adds support for isel instruction in the ppc simulator. Tested manually by running a small assembly file through the simulator. Is this ok?

Regards,
Abid

sim/ChangeLog:
2013-04-19  Nathan Froyd  <froydnj@codesourcery.com>

	* ppc-instructions (isel): New instruction.

diff --git a/sim/ppc/ppc-instructions b/sim/ppc/ppc-instructions
index 1b8fd89..d76a765 100644
--- a/sim/ppc/ppc-instructions
+++ b/sim/ppc/ppc-instructions
@@ -3455,6 +3455,19 @@ void::function::invalid_zero_divide_operation:cpu *processor, unsigned_word cia,
 	PPC_INSN_MFCR(RT_BITMASK);

 #
+# I.3.3.15 Fixed-Point Select
+#
+
+0.31,6.RT,11.RA,16.RB,21.BF,26.15,31./:A::isel:Integer Select
+	unsigned_word a;
+	if (RA_is_0) a = 0;
+	else         a = *rA;
+	if (CR & (1 << (31 - BF)))
+	  *rT = a;
+	else
+	  *rT = *rB;
+
+#

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]