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

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

Issue 14854010: On MIPS, keeps Object::null() in a register. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 } 567 }
568 568
569 void xor_(Register rd, Register rs, Register rt) { 569 void xor_(Register rd, Register rs, Register rt) {
570 EmitRType(SPECIAL, rs, rt, rd, 0, XOR); 570 EmitRType(SPECIAL, rs, rt, rd, 0, XOR);
571 } 571 }
572 572
573 // Macros in alphabetical order. 573 // Macros in alphabetical order.
574 574
575 // Addition of rs and rt with the result placed in rd. 575 // Addition of rs and rt with the result placed in rd.
576 // After, ro < 0 if there was signed overflow, ro >= 0 otherwise. 576 // After, ro < 0 if there was signed overflow, ro >= 0 otherwise.
577 // rd and ro must not be TMP1 or TMP2. 577 // rd and ro must not be TMP1.
578 // ro must be different from all the other registers. 578 // ro must be different from all the other registers.
579 void AdduDetectOverflow(Register rd, Register rs, Register rt, Register ro); 579 // If rd, rs, and rt are the same register, then a scratch register different
580 // from the other registers is needed.
581 void AdduDetectOverflow(Register rd, Register rs, Register rt, Register ro,
582 Register scratch = kNoRegister);
580 583
581 // ro must be different from rd and rs. 584 // ro must be different from rd and rs.
582 // rd and ro must not be TMP1 or TMP2 585 // rd and ro must not be TMP1.
586 // If rd and rs are the same, a scratch register different from the other
587 // registers is needed.
583 void AddImmediateDetectOverflow(Register rd, Register rs, int32_t imm, 588 void AddImmediateDetectOverflow(Register rd, Register rs, int32_t imm,
584 Register ro) { 589 Register ro, Register scratch = kNoRegister) {
585 LoadImmediate(rd, imm); 590 LoadImmediate(rd, imm);
586 AdduDetectOverflow(rd, rs, rd, ro); 591 AdduDetectOverflow(rd, rs, rd, ro, scratch);
587 } 592 }
588 593
589 // Subtraction of rt from rs (rs - rt) with the result placed in rd. 594 // Subtraction of rt from rs (rs - rt) with the result placed in rd.
590 // After, ro < 0 if there was signed overflow, ro >= 0 otherwise. 595 // After, ro < 0 if there was signed overflow, ro >= 0 otherwise.
591 // None of rd, rs, rt, or ro may be TMP1. 596 // None of rd, rs, rt, or ro may be TMP1.
592 // ro must be different from the other registers. 597 // ro must be different from the other registers.
593 void SubuDetectOverflow(Register rd, Register rs, Register rt, Register ro); 598 void SubuDetectOverflow(Register rd, Register rs, Register rt, Register ro);
594 599
595 // ro must be different from rd and rs. 600 // ro must be different from rd and rs.
596 // None of rd, rs, rt, or ro may be TMP1. 601 // None of rd, rs, rt, or ro may be TMP1.
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 void StoreIntoObjectNoBarrier(Register object, 846 void StoreIntoObjectNoBarrier(Register object,
842 const Address& dest, 847 const Address& dest,
843 const Object& value); 848 const Object& value);
844 849
845 void CallRuntime(const RuntimeEntry& entry); 850 void CallRuntime(const RuntimeEntry& entry);
846 851
847 // Set up a Dart frame on entry with a frame pointer and PC information to 852 // Set up a Dart frame on entry with a frame pointer and PC information to
848 // enable easy access to the RawInstruction object of code corresponding 853 // enable easy access to the RawInstruction object of code corresponding
849 // to this frame. 854 // to this frame.
850 void EnterDartFrame(intptr_t frame_size); 855 void EnterDartFrame(intptr_t frame_size);
851 void LeaveDartFrame(); 856 void LeaveDartFrameAndReturn();
852 857
853 private: 858 private:
854 AssemblerBuffer buffer_; 859 AssemblerBuffer buffer_;
855 GrowableObjectArray& object_pool_; // Objects and patchable jump targets. 860 GrowableObjectArray& object_pool_; // Objects and patchable jump targets.
856 int prologue_offset_; 861 int prologue_offset_;
857 862
858 bool delay_slot_available_; 863 bool delay_slot_available_;
859 bool in_delay_slot_; 864 bool in_delay_slot_;
860 865
861 int32_t AddObject(const Object& obj); 866 int32_t AddObject(const Object& obj);
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 Register value, 1009 Register value,
1005 Label* no_update); 1010 Label* no_update);
1006 1011
1007 DISALLOW_ALLOCATION(); 1012 DISALLOW_ALLOCATION();
1008 DISALLOW_COPY_AND_ASSIGN(Assembler); 1013 DISALLOW_COPY_AND_ASSIGN(Assembler);
1009 }; 1014 };
1010 1015
1011 } // namespace dart 1016 } // namespace dart
1012 1017
1013 #endif // VM_ASSEMBLER_MIPS_H_ 1018 #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