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

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') | runtime/vm/assembler_mips.cc » ('J')
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 // Clobbers TMP.
512 // Clobbers T9 if rd, rs, rt are the same register.
513 void AdduDetectOverflow(Register rd, Register rs, Register rt, Register ro);
514
515 // Loads the immediate value into T8, and calls AdduDetectOverflow.
516 void AddiuDetectOverflow(Register rt, Register rs, const Immediate& imm,
517 Register ro);
518
509 void Branch(const ExternalLabel* label) { 519 void Branch(const ExternalLabel* label) {
510 LoadImmediate(TMP, label->address()); 520 LoadImmediate(TMP, label->address());
511 jr(TMP); 521 jr(TMP);
512 } 522 }
513 523
514 void BranchPatchable(const ExternalLabel* label) { 524 void BranchPatchable(const ExternalLabel* label) {
515 const uint16_t low = Utils::Low16Bits(label->address()); 525 const uint16_t low = Utils::Low16Bits(label->address());
516 const uint16_t high = Utils::High16Bits(label->address()); 526 const uint16_t high = Utils::High16Bits(label->address());
517 lui(TMP, Immediate(high)); 527 lui(TMP, Immediate(high));
518 ori(TMP, TMP, Immediate(low)); 528 ori(TMP, TMP, Immediate(low));
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 delay_slot_available_ = true; 739 delay_slot_available_ = true;
730 } 740 }
731 741
732 DISALLOW_ALLOCATION(); 742 DISALLOW_ALLOCATION();
733 DISALLOW_COPY_AND_ASSIGN(Assembler); 743 DISALLOW_COPY_AND_ASSIGN(Assembler);
734 }; 744 };
735 745
736 } // namespace dart 746 } // namespace dart
737 747
738 #endif // VM_ASSEMBLER_MIPS_H_ 748 #endif // VM_ASSEMBLER_MIPS_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/assembler_mips.cc » ('j') | runtime/vm/assembler_mips.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698