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

Side by Side Diff: runtime/vm/assembler_mips.h

Issue 13722022: Adds macros to the MIPS assembler for detecting overflow. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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
« no previous file with comments | « no previous file | runtime/vm/assembler_mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 #ifndef VM_ASSEMBLER_MIPS_H_ 5 #ifndef VM_ASSEMBLER_MIPS_H_
6 #define VM_ASSEMBLER_MIPS_H_ 6 #define VM_ASSEMBLER_MIPS_H_
7 7
8 #ifndef VM_ASSEMBLER_H_ 8 #ifndef VM_ASSEMBLER_H_
9 #error Do not include assembler_mips.h directly; use assembler.h instead. 9 #error Do not include assembler_mips.h directly; use assembler.h instead.
10 #endif 10 #endif
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 void sw(Register rt, const Address& addr) { 499 void sw(Register rt, const Address& addr) {
500 EmitLoadStore(SW, rt, addr); 500 EmitLoadStore(SW, rt, addr);
501 } 501 }
502 502
503 void xor_(Register rd, Register rs, Register rt) { 503 void xor_(Register rd, Register rs, Register rt) {
504 EmitRType(SPECIAL, rs, rt, rd, 0, XOR); 504 EmitRType(SPECIAL, rs, rt, rd, 0, XOR);
505 } 505 }
506 506
507 // Macros in alphabetical order. 507 // Macros in alphabetical order.
508 508
509 // Addition of rs and rt with the result placed in rd.
510 // After, ro < 0 if there was signed overflow, ro >= 0 otherwise.
511 // A scratch register is needed when rd, rs, and rt are the same
512 // register. The scratch register may not be TMP.
513 // ro must be different from all the other registers.
514 void AdduDetectOverflow(Register rd, Register rs, Register rt, Register ro,
515 Register scratch = kNoRegister);
516
509 void Branch(const ExternalLabel* label) { 517 void Branch(const ExternalLabel* label) {
510 LoadImmediate(TMP, label->address()); 518 LoadImmediate(TMP, label->address());
511 jr(TMP); 519 jr(TMP);
512 } 520 }
513 521
514 void BranchPatchable(const ExternalLabel* label) { 522 void BranchPatchable(const ExternalLabel* label) {
515 const uint16_t low = Utils::Low16Bits(label->address()); 523 const uint16_t low = Utils::Low16Bits(label->address());
516 const uint16_t high = Utils::High16Bits(label->address()); 524 const uint16_t high = Utils::High16Bits(label->address());
517 lui(TMP, Immediate(high)); 525 lui(TMP, Immediate(high));
518 ori(TMP, TMP, Immediate(low)); 526 ori(TMP, TMP, Immediate(low));
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 delay_slot_available_ = true; 737 delay_slot_available_ = true;
730 } 738 }
731 739
732 DISALLOW_ALLOCATION(); 740 DISALLOW_ALLOCATION();
733 DISALLOW_COPY_AND_ASSIGN(Assembler); 741 DISALLOW_COPY_AND_ASSIGN(Assembler);
734 }; 742 };
735 743
736 } // namespace dart 744 } // namespace dart
737 745
738 #endif // VM_ASSEMBLER_MIPS_H_ 746 #endif // VM_ASSEMBLER_MIPS_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/assembler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698