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] MIPS sim: Implement jr.hb and jalr.hb


Hello All,

I applied the appended patch, it implements the jr.hb and jalr.hb
instructions.


Thiemo


2007-02-19  Thiemo Seufer  <ths@mips.com>
            Nigel Stephens  <nigel@mips.com>

	* mips.igen (jalr.hb, jr.hb): Add decoder for mip32r2/mips64r2
	jumps with hazard barrier.


Index: head/sim/mips/mips.igen
===================================================================
--- head/sim/mips/mips.igen.orig	2007-02-19 14:47:14.000000000 +0000
+++ head/sim/mips/mips.igen	2007-02-19 16:55:32.000000000 +0000
@@ -1945,8 +1945,18 @@
   DELAY_SLOT (temp);
 }
 
+000000,5.RS,00000,5.RD,10000,001001:SPECIAL:32::JALR_HB
+"jalr.hb r<RS>":RD == 31
+"jalr.hb r<RD>, r<RS>"
+*mips32r2:
+*mips64r2:
+{
+  address_word temp = GPR[RS];
+  GPR[RD] = CIA + 8;
+  DELAY_SLOT (temp);
+}
 
-000000,5.RS,000000000000000,001000:SPECIAL:32::JR
+000000,5.RS,0000000000,00000,001000:SPECIAL:32::JR
 "jr r<RS>"
 *mipsI:
 *mipsII:
@@ -1964,6 +1974,13 @@
   DELAY_SLOT (GPR[RS]);
 }
 
+000000,5.RS,0000000000,10000,001000:SPECIAL:32::JR_HB
+"jr.hb r<RS>"
+*mips32r2:
+*mips64r2:
+{
+  DELAY_SLOT (GPR[RS]);
+}
 
 :function:::unsigned_word:do_load:unsigned access, address_word base, address_word offset
 {


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