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

Side by Side Diff: src/mips64/simulator-mips64.cc

Issue 1984313002: MIPS64: Add a check to addiu simulation according to the specification. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <limits.h> 5 #include <limits.h>
6 #include <stdarg.h> 6 #include <stdarg.h>
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <cmath> 8 #include <cmath>
9 9
10 #if V8_TARGET_ARCH_MIPS64 10 #if V8_TARGET_ARCH_MIPS64
(...skipping 4395 matching lines...) Expand 10 before | Expand all | Expand 10 after
4406 if (rs_reg == 0) { // BNEZALC 4406 if (rs_reg == 0) { // BNEZALC
4407 BranchAndLinkCompactHelper(rt != 0, 16); 4407 BranchAndLinkCompactHelper(rt != 0, 16);
4408 } else { // BNEC 4408 } else { // BNEC
4409 BranchCompactHelper(rt != rs, 16); 4409 BranchCompactHelper(rt != rs, 16);
4410 } 4410 }
4411 } 4411 }
4412 } 4412 }
4413 break; 4413 break;
4414 // ------------- Arithmetic instructions. 4414 // ------------- Arithmetic instructions.
4415 case ADDIU: { 4415 case ADDIU: {
4416 DCHECK(is_int32(rs));
4416 int32_t alu32_out = static_cast<int32_t>(rs + se_imm16); 4417 int32_t alu32_out = static_cast<int32_t>(rs + se_imm16);
4417 // Sign-extend result of 32bit operation into 64bit register. 4418 // Sign-extend result of 32bit operation into 64bit register.
4418 SetResult(rt_reg, static_cast<int64_t>(alu32_out)); 4419 SetResult(rt_reg, static_cast<int64_t>(alu32_out));
4419 break; 4420 break;
4420 } 4421 }
4421 case DADDIU: 4422 case DADDIU:
4422 SetResult(rt_reg, rs + se_imm16); 4423 SetResult(rt_reg, rs + se_imm16);
4423 break; 4424 break;
4424 case SLTI: 4425 case SLTI:
4425 SetResult(rt_reg, rs < se_imm16 ? 1 : 0); 4426 SetResult(rt_reg, rs < se_imm16 ? 1 : 0);
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
4937 } 4938 }
4938 4939
4939 4940
4940 #undef UNSUPPORTED 4941 #undef UNSUPPORTED
4941 } // namespace internal 4942 } // namespace internal
4942 } // namespace v8 4943 } // namespace v8
4943 4944
4944 #endif // USE_SIMULATOR 4945 #endif // USE_SIMULATOR
4945 4946
4946 #endif // V8_TARGET_ARCH_MIPS64 4947 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698