| 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 | 5 // modification, are permitted provided that the following conditions |
| 6 // are met: | 6 // are 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 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1359 // label reference or kEndOfChain. | 1359 // label reference or kEndOfChain. |
| 1360 int target_at(int pos); | 1360 int target_at(int pos); |
| 1361 | 1361 |
| 1362 // Patch instruction(s) at pos to target target_pos (e.g. branch) | 1362 // Patch instruction(s) at pos to target target_pos (e.g. branch) |
| 1363 void target_at_put(int pos, int target_pos, bool* is_branch = nullptr); | 1363 void target_at_put(int pos, int target_pos, bool* is_branch = nullptr); |
| 1364 | 1364 |
| 1365 // Record reloc info for current pc_ | 1365 // Record reloc info for current pc_ |
| 1366 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); | 1366 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); |
| 1367 | 1367 |
| 1368 private: | 1368 private: |
| 1369 // Avoid overflows for displacements etc. |
| 1370 static const int kMaximalBufferSize = 512 * MB; |
| 1371 |
| 1369 // Code generation | 1372 // Code generation |
| 1370 // The relocation writer's position is at least kGap bytes below the end of | 1373 // The relocation writer's position is at least kGap bytes below the end of |
| 1371 // the generated instructions. This is so that multi-instruction sequences do | 1374 // the generated instructions. This is so that multi-instruction sequences do |
| 1372 // not have to check for overflow. The same is true for writes of large | 1375 // not have to check for overflow. The same is true for writes of large |
| 1373 // relocation info entries. | 1376 // relocation info entries. |
| 1374 static constexpr int kGap = 32; | 1377 static constexpr int kGap = 32; |
| 1375 | 1378 |
| 1376 // Relocation info generation | 1379 // Relocation info generation |
| 1377 // Each relocation is encoded as a variable size value | 1380 // Each relocation is encoded as a variable size value |
| 1378 static constexpr int kMaxRelocSize = RelocInfoWriter::kMaxSize; | 1381 static constexpr int kMaxRelocSize = RelocInfoWriter::kMaxSize; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1475 | 1478 |
| 1476 class EnsureSpace BASE_EMBEDDED { | 1479 class EnsureSpace BASE_EMBEDDED { |
| 1477 public: | 1480 public: |
| 1478 explicit EnsureSpace(Assembler* assembler) { assembler->CheckBuffer(); } | 1481 explicit EnsureSpace(Assembler* assembler) { assembler->CheckBuffer(); } |
| 1479 }; | 1482 }; |
| 1480 | 1483 |
| 1481 } // namespace internal | 1484 } // namespace internal |
| 1482 } // namespace v8 | 1485 } // namespace v8 |
| 1483 | 1486 |
| 1484 #endif // V8_S390_ASSEMBLER_S390_H_ | 1487 #endif // V8_S390_ASSEMBLER_S390_H_ |
| OLD | NEW |