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

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

Issue 14246039: Implements features to run "Hello, world!" on simulated MIPS. (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
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_CONSTANTS_MIPS_H_ 5 #ifndef VM_CONSTANTS_MIPS_H_
6 #define VM_CONSTANTS_MIPS_H_ 6 #define VM_CONSTANTS_MIPS_H_
7 7
8 namespace dart { 8 namespace dart {
9 9
10 enum Register { 10 enum Register {
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 public: 393 public:
394 enum { 394 enum {
395 kInstrSize = 4, 395 kInstrSize = 4,
396 }; 396 };
397 397
398 static const int32_t kBreakPointInstruction = 398 static const int32_t kBreakPointInstruction =
399 (SPECIAL << kOpcodeShift) | (BREAK << kFunctionShift); 399 (SPECIAL << kOpcodeShift) | (BREAK << kFunctionShift);
400 static const int32_t kNopInstruction = 0; 400 static const int32_t kNopInstruction = 0;
401 static const int32_t kStopMessageCode = 1; 401 static const int32_t kStopMessageCode = 1;
402 static const int32_t kRedirectCode = 2; 402 static const int32_t kRedirectCode = 2;
403 static const int32_t kMsgMessageCode = 3;
403 404
404 // Get the raw instruction bits. 405 // Get the raw instruction bits.
405 inline int32_t InstructionBits() const { 406 inline int32_t InstructionBits() const {
406 return *reinterpret_cast<const int32_t*>(this); 407 return *reinterpret_cast<const int32_t*>(this);
407 } 408 }
408 409
409 // Set the raw instruction bits to value. 410 // Set the raw instruction bits to value.
410 inline void SetInstructionBits(int32_t value) { 411 inline void SetInstructionBits(int32_t value) {
411 *reinterpret_cast<int32_t*>(this) = value; 412 *reinterpret_cast<int32_t*>(this) = value;
412 } 413 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } 503 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); }
503 504
504 private: 505 private:
505 DISALLOW_ALLOCATION(); 506 DISALLOW_ALLOCATION();
506 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); 507 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr);
507 }; 508 };
508 509
509 } // namespace dart 510 } // namespace dart
510 511
511 #endif // VM_CONSTANTS_MIPS_H_ 512 #endif // VM_CONSTANTS_MIPS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698