Revert "[codegen] Align the code start at 64 byte in x64"
This reverts commit 40af03b8c3
.
Reason for revert: Breaks on win https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Win64%20-%20debug/39151/overview
Original change's description:
> [codegen] Align the code start at 64 byte in x64
>
> In order to make loop header aligned at 64 byte (relative to memory address), code start should also be aligned at 64 byte.
>
> Bug: chromium:1231471
> Change-Id: I95390babd9cc78492e0beb0f1b03901eb481d5d5
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3094167
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Hao A Xu <hao.a.xu@intel.com>
> Cr-Commit-Position: refs/heads/main@{#76484}
Bug: chromium:1231471
Change-Id: I93ad896d40e8bb906a05eab8e03980ce2061b9c0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3118005
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Owners-Override: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#76488}
This commit is contained in:
parent
d7d5b448ee
commit
1acb1cd9ba
@ -590,14 +590,9 @@ constexpr intptr_t kPointerAlignmentMask = kPointerAlignment - 1;
|
||||
constexpr intptr_t kDoubleAlignment = 8;
|
||||
constexpr intptr_t kDoubleAlignmentMask = kDoubleAlignment - 1;
|
||||
|
||||
// Desired alignment for generated code is 64 bytes on x64 (to allow 64-bytes
|
||||
// loop header alignment) and 32 bytes (to improve cache line utilization) on
|
||||
// other architectures.
|
||||
#if V8_TARGET_ARCH_X64
|
||||
constexpr int kCodeAlignmentBits = 6;
|
||||
#else
|
||||
// Desired alignment for generated code is 32 bytes (to improve cache line
|
||||
// utilization).
|
||||
constexpr int kCodeAlignmentBits = 5;
|
||||
#endif
|
||||
constexpr intptr_t kCodeAlignment = 1 << kCodeAlignmentBits;
|
||||
constexpr intptr_t kCodeAlignmentMask = kCodeAlignment - 1;
|
||||
|
||||
|
@ -547,7 +547,7 @@ class Code : public HeapObject {
|
||||
#elif V8_TARGET_ARCH_LOONG64
|
||||
static constexpr int kHeaderPaddingSize = 24;
|
||||
#elif V8_TARGET_ARCH_X64
|
||||
static constexpr int kHeaderPaddingSize = COMPRESS_POINTERS_BOOL ? 12 : 56;
|
||||
static constexpr int kHeaderPaddingSize = COMPRESS_POINTERS_BOOL ? 12 : 24;
|
||||
#elif V8_TARGET_ARCH_ARM
|
||||
static constexpr int kHeaderPaddingSize = 12;
|
||||
#elif V8_TARGET_ARCH_IA32
|
||||
|
@ -65,14 +65,8 @@ void PlatformEmbeddedFileWriterAIX::DeclareSymbolGlobal(const char* name) {
|
||||
}
|
||||
|
||||
void PlatformEmbeddedFileWriterAIX::AlignToCodeAlignment() {
|
||||
#if V8_TARGET_ARCH_X64
|
||||
// On x64 use 64-bytes code alignment to allow 64-bytes loop header alignment.
|
||||
STATIC_ASSERT((1 << 6) >= kCodeAlignment);
|
||||
fprintf(fp_, ".align 6\n");
|
||||
#else
|
||||
STATIC_ASSERT((1 << 5) >= kCodeAlignment);
|
||||
fprintf(fp_, ".align 5\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
void PlatformEmbeddedFileWriterAIX::AlignToDataAlignment() {
|
||||
|
@ -74,14 +74,8 @@ void PlatformEmbeddedFileWriterGeneric::DeclareSymbolGlobal(const char* name) {
|
||||
}
|
||||
|
||||
void PlatformEmbeddedFileWriterGeneric::AlignToCodeAlignment() {
|
||||
#if V8_TARGET_ARCH_X64
|
||||
// On x64 use 64-bytes code alignment to allow 64-bytes loop header alignment.
|
||||
STATIC_ASSERT(64 >= kCodeAlignment);
|
||||
fprintf(fp_, ".balign 64\n");
|
||||
#else
|
||||
STATIC_ASSERT(32 >= kCodeAlignment);
|
||||
fprintf(fp_, ".balign 32\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
void PlatformEmbeddedFileWriterGeneric::AlignToDataAlignment() {
|
||||
|
@ -56,18 +56,12 @@ void PlatformEmbeddedFileWriterMac::DeclareSymbolGlobal(const char* name) {
|
||||
// prevents something along the compilation chain from messing with the
|
||||
// embedded blob. Using .global here causes embedded blob hash verification
|
||||
// failures at runtime.
|
||||
STATIC_ASSERT(32 >= kCodeAlignment);
|
||||
fprintf(fp_, ".private_extern _%s\n", name);
|
||||
}
|
||||
|
||||
void PlatformEmbeddedFileWriterMac::AlignToCodeAlignment() {
|
||||
#if V8_TARGET_ARCH_X64
|
||||
// On x64 use 64-bytes code alignment to allow 64-bytes loop header alignment.
|
||||
STATIC_ASSERT(64 >= kCodeAlignment);
|
||||
fprintf(fp_, ".balign 64\n");
|
||||
#else
|
||||
STATIC_ASSERT(32 >= kCodeAlignment);
|
||||
fprintf(fp_, ".balign 32\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
void PlatformEmbeddedFileWriterMac::AlignToDataAlignment() {
|
||||
|
Loading…
Reference in New Issue
Block a user