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

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

Issue 1367973002: VM: Initialize Instruction objects with break instructions instead of null. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « runtime/vm/assembler_ia32.h ('k') | runtime/vm/assembler_x64.h » ('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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 } 497 }
498 498
499 // Branch if not equal, likely taken. 499 // Branch if not equal, likely taken.
500 // Delay slot executed only when branch taken. 500 // Delay slot executed only when branch taken.
501 void bnel(Register rs, Register rt, Label* l) { 501 void bnel(Register rs, Register rt, Label* l) {
502 ASSERT(!in_delay_slot_); // Jump within a delay slot is not supported. 502 ASSERT(!in_delay_slot_); // Jump within a delay slot is not supported.
503 EmitBranch(BNEL, rs, rt, l); 503 EmitBranch(BNEL, rs, rt, l);
504 EmitBranchDelayNop(); 504 EmitBranchDelayNop();
505 } 505 }
506 506
507 static int32_t BreakEncoding(int32_t code) {
508 ASSERT(Utils::IsUint(20, code));
509 return SPECIAL << kOpcodeShift |
510 code << kBreakCodeShift |
511 BREAK << kFunctionShift;
512 }
513
514
507 void break_(int32_t code) { 515 void break_(int32_t code) {
508 ASSERT(Utils::IsUint(20, code)); 516 Emit(BreakEncoding(code));
509 Emit(SPECIAL << kOpcodeShift | 517 }
510 code << kBreakCodeShift | 518
511 BREAK << kFunctionShift); 519 static uword GetBreakInstructionFiller() {
520 return BreakEncoding(0);
512 } 521 }
513 522
514 // FPU compare, always false. 523 // FPU compare, always false.
515 void cfd(DRegister ds, DRegister dt) { 524 void cfd(DRegister ds, DRegister dt) {
516 FRegister fs = static_cast<FRegister>(ds * 2); 525 FRegister fs = static_cast<FRegister>(ds * 2);
517 FRegister ft = static_cast<FRegister>(dt * 2); 526 FRegister ft = static_cast<FRegister>(dt * 2);
518 EmitFpuRType(COP1, FMT_D, ft, fs, F0, COP1_C_F); 527 EmitFpuRType(COP1, FMT_D, ft, fs, F0, COP1_C_F);
519 } 528 }
520 529
521 // FPU compare, true if unordered, i.e. one is NaN. 530 // FPU compare, true if unordered, i.e. one is NaN.
(...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 Register value, 1741 Register value,
1733 Label* no_update); 1742 Label* no_update);
1734 1743
1735 DISALLOW_ALLOCATION(); 1744 DISALLOW_ALLOCATION();
1736 DISALLOW_COPY_AND_ASSIGN(Assembler); 1745 DISALLOW_COPY_AND_ASSIGN(Assembler);
1737 }; 1746 };
1738 1747
1739 } // namespace dart 1748 } // namespace dart
1740 1749
1741 #endif // VM_ASSEMBLER_MIPS_H_ 1750 #endif // VM_ASSEMBLER_MIPS_H_
OLDNEW
« no previous file with comments | « runtime/vm/assembler_ia32.h ('k') | runtime/vm/assembler_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698