OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 2022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2033 ASSERT((pc_ + size) <= (buffer_ + buffer_size_)); | 2033 ASSERT((pc_ + size) <= (buffer_ + buffer_size_)); |
2034 | 2034 |
2035 // TODO(all): Somehow register we have some data here. Then we can | 2035 // TODO(all): Somehow register we have some data here. Then we can |
2036 // disassemble it correctly. | 2036 // disassemble it correctly. |
2037 memcpy(pc_, data, size); | 2037 memcpy(pc_, data, size); |
2038 pc_ += size; | 2038 pc_ += size; |
2039 CheckBuffer(); | 2039 CheckBuffer(); |
2040 } | 2040 } |
2041 | 2041 |
2042 void GrowBuffer(); | 2042 void GrowBuffer(); |
| 2043 void CheckBufferSpace(); |
2043 void CheckBuffer(); | 2044 void CheckBuffer(); |
2044 | 2045 |
2045 // Pc offset of the next constant pool check. | 2046 // Pc offset of the next constant pool check. |
2046 int next_constant_pool_check_; | 2047 int next_constant_pool_check_; |
2047 | 2048 |
2048 // Constant pool generation | 2049 // Constant pool generation |
2049 // Pools are emitted in the instruction stream, preferably after unconditional | 2050 // Pools are emitted in the instruction stream, preferably after unconditional |
2050 // jumps or after returns from functions (in dead code locations). | 2051 // jumps or after returns from functions (in dead code locations). |
2051 // If a long code sequence does not contain unconditional jumps, it is | 2052 // If a long code sequence does not contain unconditional jumps, it is |
2052 // necessary to emit the constant pool before the pool gets too far from the | 2053 // necessary to emit the constant pool before the pool gets too far from the |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2231 // See definition of PatchAdrFar() for details. | 2232 // See definition of PatchAdrFar() for details. |
2232 static const int kAdrFarPatchableNNops = kMovInt64NInstrs - 1; | 2233 static const int kAdrFarPatchableNNops = kMovInt64NInstrs - 1; |
2233 static const int kAdrFarPatchableNInstrs = kAdrFarPatchableNNops + 3; | 2234 static const int kAdrFarPatchableNInstrs = kAdrFarPatchableNNops + 3; |
2234 void PatchAdrFar(Instruction* target); | 2235 void PatchAdrFar(Instruction* target); |
2235 }; | 2236 }; |
2236 | 2237 |
2237 | 2238 |
2238 class EnsureSpace BASE_EMBEDDED { | 2239 class EnsureSpace BASE_EMBEDDED { |
2239 public: | 2240 public: |
2240 explicit EnsureSpace(Assembler* assembler) { | 2241 explicit EnsureSpace(Assembler* assembler) { |
2241 assembler->CheckBuffer(); | 2242 assembler->CheckBufferSpace(); |
2242 } | 2243 } |
2243 }; | 2244 }; |
2244 | 2245 |
2245 } } // namespace v8::internal | 2246 } } // namespace v8::internal |
2246 | 2247 |
2247 #endif // V8_ARM64_ASSEMBLER_ARM64_H_ | 2248 #endif // V8_ARM64_ASSEMBLER_ARM64_H_ |
OLD | NEW |