Reviewers: paul.l..., akos.palfi.imgtec, balazs.kilvady,
Description:
MIPS64: Fix MULT in simulator to conform the spec.
TEST=mjsunit/numops-fuzz-part4
BUG=
Please review this at https://codereview.chromium.org/756073003/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+5, -6 lines):
M src/mips64/simulator-mips64.cc
Index: src/mips64/simulator-mips64.cc
diff --git a/src/mips64/simulator-mips64.cc b/src/mips64/simulator-mips64.cc
index
3351ac179fff73aee571e3a3042b1441e4f8d761..9899d47a0e5ec940d99bf1514827f6f57f2187f9
100644
--- a/src/mips64/simulator-mips64.cc
+++ b/src/mips64/simulator-mips64.cc
@@ -2080,13 +2080,12 @@ void Simulator::ConfigureTypeRegister(Instruction*
instr,
case MFLO:
*alu_out = get_register(LO);
break;
- case MULT: // MULT == D_MUL_MUH.
- // TODO(plind) - Unify MULT/DMULT with single set of 64-bit HI/Lo
- // regs.
- // TODO(plind) - make the 32-bit MULT ops conform to spec
regarding
- // checking of 32-bit input values, and un-define operations
of HW.
- *i64hilo = rs * rt;
+ case MULT: { // MULT == D_MUL_MUH.
+ int32_t rs_lo = static_cast<int32_t>(rs);
+ int32_t rt_lo = static_cast<int32_t>(rt);
+ *i64hilo = static_cast<int64_t>(rs_lo) *
static_cast<int64_t>(rt_lo);
break;
+ }
case MULTU:
*u64hilo = static_cast<uint64_t>(rs_u & 0xffffffff) *
static_cast<uint64_t>(rt_u & 0xffffffff);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.