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

Side by Side Diff: runtime/vm/simulator_arm64.cc

Issue 817583003: Process two 32-bit digits as one 64-bit digit in all bigint intrinsics on ARM64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include <setjmp.h> 5 #include <setjmp.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 7
8 #include "vm/globals.h" 8 #include "vm/globals.h"
9 #if defined(TARGET_ARCH_ARM64) 9 #if defined(TARGET_ARCH_ARM64)
10 10
(...skipping 2512 matching lines...) Expand 10 before | Expand all | Expand 10 after
2523 } 2523 }
2524 } else if ((instr->Bits(29, 2) == 0) && (instr->Bits(21, 3) == 2) && 2524 } else if ((instr->Bits(29, 2) == 0) && (instr->Bits(21, 3) == 2) &&
2525 (instr->Bit(15) == 0)) { 2525 (instr->Bit(15) == 0)) {
2526 // Format(instr, "smulh 'rd, 'rn, 'rm"); 2526 // Format(instr, "smulh 'rd, 'rn, 'rm");
2527 const int64_t rn_val = get_register(rn, R31IsZR); 2527 const int64_t rn_val = get_register(rn, R31IsZR);
2528 const int64_t rm_val = get_register(rm, R31IsZR); 2528 const int64_t rm_val = get_register(rm, R31IsZR);
2529 const __int128 res = 2529 const __int128 res =
2530 static_cast<__int128>(rn_val) * static_cast<__int128>(rm_val); 2530 static_cast<__int128>(rn_val) * static_cast<__int128>(rm_val);
2531 const int64_t alu_out = static_cast<int64_t>(res >> 64); 2531 const int64_t alu_out = static_cast<int64_t>(res >> 64);
2532 set_register(instr, rd, alu_out, R31IsZR); 2532 set_register(instr, rd, alu_out, R31IsZR);
2533 } else if ((instr->Bits(29, 2) == 0) && (instr->Bits(21, 3) == 6) &&
2534 (instr->Bit(15) == 0)) {
2535 // Format(instr, "umulh 'rd, 'rn, 'rm");
2536 const uint64_t rn_val = get_register(rn, R31IsZR);
2537 const uint64_t rm_val = get_register(rm, R31IsZR);
2538 const __int128 res =
2539 static_cast<__int128>(rn_val) * static_cast<__int128>(rm_val);
2540 const int64_t alu_out = static_cast<int64_t>(res >> 64);
2541 set_register(instr, rd, alu_out, R31IsZR);
2533 } else if ((instr->Bits(29, 3) == 4) && (instr->Bits(21, 3) == 5) && 2542 } else if ((instr->Bits(29, 3) == 4) && (instr->Bits(21, 3) == 5) &&
2534 (instr->Bit(15) == 0)) { 2543 (instr->Bit(15) == 0)) {
2535 // Format(instr, "umaddl 'rd, 'rn, 'rm, 'ra"); 2544 // Format(instr, "umaddl 'rd, 'rn, 'rm, 'ra");
2536 const uint64_t rn_val = static_cast<uint32_t>(get_wregister(rn, R31IsZR)); 2545 const uint64_t rn_val = static_cast<uint32_t>(get_wregister(rn, R31IsZR));
2537 const uint64_t rm_val = static_cast<uint32_t>(get_wregister(rm, R31IsZR)); 2546 const uint64_t rm_val = static_cast<uint32_t>(get_wregister(rm, R31IsZR));
2538 const uint64_t ra_val = get_register(ra, R31IsZR); 2547 const uint64_t ra_val = get_register(ra, R31IsZR);
2539 const uint64_t alu_out = ra_val + (rn_val * rm_val); 2548 const uint64_t alu_out = ra_val + (rn_val * rm_val);
2540 set_register(instr, rd, alu_out, R31IsZR); 2549 set_register(instr, rd, alu_out, R31IsZR);
2541 } else { 2550 } else {
2542 UnimplementedInstruction(instr); 2551 UnimplementedInstruction(instr);
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
3485 set_register(NULL, kExceptionObjectReg, bit_cast<int64_t>(raw_exception)); 3494 set_register(NULL, kExceptionObjectReg, bit_cast<int64_t>(raw_exception));
3486 set_register(NULL, kStackTraceObjectReg, bit_cast<int64_t>(raw_stacktrace)); 3495 set_register(NULL, kStackTraceObjectReg, bit_cast<int64_t>(raw_stacktrace));
3487 buf->Longjmp(); 3496 buf->Longjmp();
3488 } 3497 }
3489 3498
3490 } // namespace dart 3499 } // namespace dart
3491 3500
3492 #endif // !defined(HOST_ARCH_ARM64) 3501 #endif // !defined(HOST_ARCH_ARM64)
3493 3502
3494 #endif // defined TARGET_ARCH_ARM64 3503 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« runtime/vm/intrinsifier_arm64.cc ('K') | « runtime/vm/intrinsifier_arm64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698