From: "Steve Ellcey " <sellcey@mips.com>
To: <gdb-patches@sourceware.org>
Cc: <fu@mips.com>
Subject: [patch, simulator, mips] Add rdhwr instruction to mips simulator
Date: Wed, 03 Oct 2012 19:34:00 -0000 [thread overview]
Message-ID: <78a2b827-659d-4690-a1e8-797217096b9f@EXCHHUB01.MIPS.com> (raw)
While testing GCC with the mips-mti-elf target and using the GNU simulator
I noticed that some tests (like gcc.dg/builtins-64.c) were failing on mips32r2
with synci enabled. This is because the rdhwr instruction was not implemented
in the simulator.
This patch (created by Chao-ying and tested by me) adds the rdhwr instruction
to the mips simulator and fixes the gcc.dg/builtins-64.c failure.
OK to checkin?
Steve Ellcey
sellcey@mips.com
2012-10-04 Chao-ying Fu <fu@mips.com>
Steve Ellcey <sellcey@mips.com>
* mips/mips3264r2.igen (rdhwr): New.
diff --git a/sim/mips/mips3264r2.igen b/sim/mips/mips3264r2.igen
index c52ec3b..e0b6d5b 100644
--- a/sim/mips/mips3264r2.igen
+++ b/sim/mips/mips3264r2.igen
@@ -241,6 +241,17 @@
}
+011111,00000,5.RT,5.RD,00000,111011::32::RDHWR
+"rdhwr r<RT>, r<RD>"
+*mips32r2:
+*mips64r2:
+{
+ // Return 0 for all hardware registers currently
+ GPR[RT] = EXTEND32 (0);
+ TRACE_ALU_RESULT1 (GPR[RT]);
+}
+
+
011111,00000,5.RT,5.RD,00010,100000::32::WSBH
"wsbh r<RD>, r<RT>"
*mips32r2:
next reply other threads:[~2012-10-03 19:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-03 19:34 Steve Ellcey [this message]
2012-10-03 19:41 ` Mike Frysinger
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=78a2b827-659d-4690-a1e8-797217096b9f@EXCHHUB01.MIPS.com \
--to=sellcey@mips.com \
--cc=fu@mips.com \
--cc=gdb-patches@sourceware.org \
/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