Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(543)

Unified Diff: src/mips/simulator-mips.cc

Issue 1545013002: Add assembler test. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips/simulator-mips.h ('k') | src/mips64/assembler-mips64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/simulator-mips.cc
diff --git a/src/mips/simulator-mips.cc b/src/mips/simulator-mips.cc
index 79706f998fc0341f23165c58a6cecb9cd26d55a4..27989146787f1281c398ab096a33c2bd2c43080c 100644
--- a/src/mips/simulator-mips.cc
+++ b/src/mips/simulator-mips.cc
@@ -3514,9 +3514,19 @@ void Simulator::DecodeTypeRegisterSPECIAL() {
SetResult(rd_reg(), static_cast<int32_t>(alu_out));
break;
case SRAV:
- alu_out = rt() >> rs();
- SetResult(rd_reg(), static_cast<int32_t>(alu_out));
+ SetResult(rd_reg(), rt() >> rs());
+ break;
+ case LSA: {
+ DCHECK(IsMipsArchVariant(kMips32r6));
+ int8_t sa = lsa_sa() + 1;
+ int32_t _rt = rt();
+ int32_t _rs = rs();
+ int32_t res = _rs << sa;
+ res += _rt;
+ DCHECK_EQ(res, (rs() << (lsa_sa() + 1)) + rt());
+ SetResult(rd_reg(), (rs() << (lsa_sa() + 1)) + rt());
break;
+ }
case MFHI: // MFHI == CLZ on R6.
if (!IsMipsArchVariant(kMips32r6)) {
DCHECK(sa() == 0);
« no previous file with comments | « src/mips/simulator-mips.h ('k') | src/mips64/assembler-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698