Chromium Code Reviews| Index: runtime/vm/simulator_arm64.cc |
| diff --git a/runtime/vm/simulator_arm64.cc b/runtime/vm/simulator_arm64.cc |
| index 65a2034d1ed8556fcfb59ba790b276dccd071478..c8309cfbd15d5f99677a10968646da0c9960dc33 100644 |
| --- a/runtime/vm/simulator_arm64.cc |
| +++ b/runtime/vm/simulator_arm64.cc |
| @@ -2656,18 +2656,30 @@ void Simulator::DecodeMiscDP3Source(Instr* instr) { |
| // Format(instr, "smulh 'rd, 'rn, 'rm"); |
| const int64_t rn_val = get_register(rn, R31IsZR); |
| const int64_t rm_val = get_register(rm, R31IsZR); |
| +#if defined(TARGET_OS_WINDOWS) |
| + // Visual Studio does not support __int128 |
|
zra
2017/01/13 20:21:07
End comment with '.'.
Florian Schneider
2017/01/13 20:24:15
Done.
|
| + int64_t alu_out; |
| + Multiply128(rn_val, rm_val, &alu_out); |
| +#else |
| const __int128 res = |
| static_cast<__int128>(rn_val) * static_cast<__int128>(rm_val); |
| const int64_t alu_out = static_cast<int64_t>(res >> 64); |
| +#endif |
|
zra
2017/01/13 20:21:07
#endif // defined(TARGET_OS_WINDOWS)
Florian Schneider
2017/01/13 20:24:15
Done.
|
| set_register(instr, rd, alu_out, R31IsZR); |
| } else if ((instr->Bits(29, 2) == 0) && (instr->Bits(21, 3) == 6) && |
| (instr->Bit(15) == 0)) { |
| // Format(instr, "umulh 'rd, 'rn, 'rm"); |
| const uint64_t rn_val = get_register(rn, R31IsZR); |
| const uint64_t rm_val = get_register(rm, R31IsZR); |
| +#if defined(TARGET_OS_WINDOWS) |
| + // Visual Studio does not support __int128 |
|
zra
2017/01/13 20:21:07
ditto
Florian Schneider
2017/01/13 20:24:15
Done.
|
| + int64_t alu_out; |
| + Multiply128(rn_val, rm_val, &alu_out); |
| +#else |
| const __int128 res = |
| static_cast<__int128>(rn_val) * static_cast<__int128>(rm_val); |
| const int64_t alu_out = static_cast<int64_t>(res >> 64); |
| +#endif |
|
zra
2017/01/13 20:21:07
ditto
Florian Schneider
2017/01/13 20:24:15
Done.
|
| set_register(instr, rd, alu_out, R31IsZR); |
| } else if ((instr->Bits(29, 3) == 4) && (instr->Bits(21, 3) == 5) && |
| (instr->Bit(15) == 0)) { |