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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 // Using blx may yield better code, so use it when required or when available | 78 // Using blx may yield better code, so use it when required or when available |
79 #if defined(USE_THUMB_INTERWORK) || defined(CAN_USE_ARMV5_INSTRUCTIONS) | 79 #if defined(USE_THUMB_INTERWORK) || defined(CAN_USE_ARMV5_INSTRUCTIONS) |
80 #define USE_BLX 1 | 80 #define USE_BLX 1 |
81 #endif | 81 #endif |
82 | 82 |
83 namespace v8 { | 83 namespace v8 { |
84 namespace internal { | 84 namespace internal { |
85 | 85 |
86 // Constant pool marker. | 86 // Constant pool marker. |
87 const int kConstantPoolMarkerMask = 0xffe00000; | 87 // Use UDF, the permanently undefined instruction. |
88 const int kConstantPoolMarker = 0x0c000000; | 88 const int kConstantPoolMarkerMask = 0xfff000f0; |
89 const int kConstantPoolLengthMask = 0x001ffff; | 89 const int kConstantPoolMarker = 0xe7f000f0; |
| 90 const int kConstantPoolLengthMaxMask = 0xffff; |
| 91 inline int EncodeConstantPoolLength(int length) { |
| 92 ASSERT((length & kConstantPoolLengthMaxMask) == length); |
| 93 return ((length & 0xfff0) << 4) | (length & 0xf); |
| 94 } |
| 95 inline int DecodeConstantPoolLength(int instr) { |
| 96 ASSERT((instr & kConstantPoolMarkerMask) == kConstantPoolMarker); |
| 97 return ((instr >> 4) & 0xfff0) | (instr & 0xf); |
| 98 } |
90 | 99 |
91 // Number of registers in normal ARM mode. | 100 // Number of registers in normal ARM mode. |
92 const int kNumRegisters = 16; | 101 const int kNumRegisters = 16; |
93 | 102 |
94 // VFP support. | 103 // VFP support. |
95 const int kNumVFPSingleRegisters = 32; | 104 const int kNumVFPSingleRegisters = 32; |
96 const int kNumVFPDoubleRegisters = 16; | 105 const int kNumVFPDoubleRegisters = 16; |
97 const int kNumVFPRegisters = kNumVFPSingleRegisters + kNumVFPDoubleRegisters; | 106 const int kNumVFPRegisters = kNumVFPSingleRegisters + kNumVFPDoubleRegisters; |
98 | 107 |
99 // PC is register 15. | 108 // PC is register 15. |
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 static int Number(const char* name, bool* is_double); | 774 static int Number(const char* name, bool* is_double); |
766 | 775 |
767 private: | 776 private: |
768 static const char* names_[kNumVFPRegisters]; | 777 static const char* names_[kNumVFPRegisters]; |
769 }; | 778 }; |
770 | 779 |
771 | 780 |
772 } } // namespace v8::internal | 781 } } // namespace v8::internal |
773 | 782 |
774 #endif // V8_ARM_CONSTANTS_ARM_H_ | 783 #endif // V8_ARM_CONSTANTS_ARM_H_ |
OLD | NEW |