OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1969 | 1969 |
1970 void EmitForbiddenSlotInstruction() { | 1970 void EmitForbiddenSlotInstruction() { |
1971 if (IsPrevInstrCompactBranch()) { | 1971 if (IsPrevInstrCompactBranch()) { |
1972 nop(); | 1972 nop(); |
1973 } | 1973 } |
1974 } | 1974 } |
1975 | 1975 |
1976 inline void CheckTrampolinePoolQuick(int extra_instructions = 0); | 1976 inline void CheckTrampolinePoolQuick(int extra_instructions = 0); |
1977 | 1977 |
1978 private: | 1978 private: |
| 1979 // Avoid overflows for displacements etc. |
| 1980 static const int kMaximalBufferSize = 512 * MB; |
| 1981 |
1979 // Buffer size and constant pool distance are checked together at regular | 1982 // Buffer size and constant pool distance are checked together at regular |
1980 // intervals of kBufferCheckInterval emitted bytes. | 1983 // intervals of kBufferCheckInterval emitted bytes. |
1981 static constexpr int kBufferCheckInterval = 1 * KB / 2; | 1984 static constexpr int kBufferCheckInterval = 1 * KB / 2; |
1982 | 1985 |
1983 // Code generation. | 1986 // Code generation. |
1984 // The relocation writer's position is at least kGap bytes below the end of | 1987 // The relocation writer's position is at least kGap bytes below the end of |
1985 // the generated instructions. This is so that multi-instruction sequences do | 1988 // the generated instructions. This is so that multi-instruction sequences do |
1986 // not have to check for overflow. The same is true for writes of large | 1989 // not have to check for overflow. The same is true for writes of large |
1987 // relocation info entries. | 1990 // relocation info entries. |
1988 static constexpr int kGap = 32; | 1991 static constexpr int kGap = 32; |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2260 public: | 2263 public: |
2261 explicit EnsureSpace(Assembler* assembler) { | 2264 explicit EnsureSpace(Assembler* assembler) { |
2262 assembler->CheckBuffer(); | 2265 assembler->CheckBuffer(); |
2263 } | 2266 } |
2264 }; | 2267 }; |
2265 | 2268 |
2266 } // namespace internal | 2269 } // namespace internal |
2267 } // namespace v8 | 2270 } // namespace v8 |
2268 | 2271 |
2269 #endif // V8_ARM_ASSEMBLER_MIPS_H_ | 2272 #endif // V8_ARM_ASSEMBLER_MIPS_H_ |
OLD | NEW |