OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
740 return Bits(kImm16Shift + kImm16Bits - 1, kImm16Shift); | 740 return Bits(kImm16Shift + kImm16Bits - 1, kImm16Shift); |
741 } | 741 } |
742 | 742 |
743 inline int32_t Imm26Value() const { | 743 inline int32_t Imm26Value() const { |
744 ASSERT(InstructionType() == kJumpType); | 744 ASSERT(InstructionType() == kJumpType); |
745 return Bits(kImm26Shift + kImm26Bits - 1, kImm26Shift); | 745 return Bits(kImm26Shift + kImm26Bits - 1, kImm26Shift); |
746 } | 746 } |
747 | 747 |
748 // Say if the instruction should not be used in a branch delay slot. | 748 // Say if the instruction should not be used in a branch delay slot. |
749 bool IsForbiddenInBranchDelay() const; | 749 bool IsForbiddenInBranchDelay() const; |
750 // Say if the instruction 'links'. eg: jal, bal. | 750 // Say if the instruction 'links'. e.g. jal, bal. |
751 bool IsLinkingInstruction() const; | 751 bool IsLinkingInstruction() const; |
752 // Say if the instruction is a break or a trap. | 752 // Say if the instruction is a break or a trap. |
753 bool IsTrap() const; | 753 bool IsTrap() const; |
754 | 754 |
755 // Instructions are read of out a code stream. The only way to get a | 755 // Instructions are read of out a code stream. The only way to get a |
756 // reference to an instruction is to convert a pointer. There is no way | 756 // reference to an instruction is to convert a pointer. There is no way |
757 // to allocate or create instances of class Instruction. | 757 // to allocate or create instances of class Instruction. |
758 // Use the At(pc) function to create references to Instruction. | 758 // Use the At(pc) function to create references to Instruction. |
759 static Instruction* At(byte* pc) { | 759 static Instruction* At(byte* pc) { |
760 return reinterpret_cast<Instruction*>(pc); | 760 return reinterpret_cast<Instruction*>(pc); |
(...skipping 19 matching lines...) Expand all Loading... |
780 const int kBranchReturnOffset = 2 * Instruction::kInstrSize; | 780 const int kBranchReturnOffset = 2 * Instruction::kInstrSize; |
781 | 781 |
782 const int kDoubleAlignmentBits = 3; | 782 const int kDoubleAlignmentBits = 3; |
783 const int kDoubleAlignment = (1 << kDoubleAlignmentBits); | 783 const int kDoubleAlignment = (1 << kDoubleAlignmentBits); |
784 const int kDoubleAlignmentMask = kDoubleAlignment - 1; | 784 const int kDoubleAlignmentMask = kDoubleAlignment - 1; |
785 | 785 |
786 | 786 |
787 } } // namespace v8::internal | 787 } } // namespace v8::internal |
788 | 788 |
789 #endif // #ifndef V8_MIPS_CONSTANTS_H_ | 789 #endif // #ifndef V8_MIPS_CONSTANTS_H_ |
OLD | NEW |