diff --git a/src/snapshot/embedded-file-writer.cc b/src/snapshot/embedded-file-writer.cc index 639428783477..4fc6ad18bb52 100644 --- a/src/snapshot/embedded-file-writer.cc +++ b/src/snapshot/embedded-file-writer.cc @@ -553,13 +553,11 @@ void PlatformDependentEmbeddedFileWriter::AlignToCodeAlignment() { } void PlatformDependentEmbeddedFileWriter::AlignToDataAlignment() { -#if defined(V8_OS_WIN) && defined(V8_TARGET_ARCH_ARM64) - // On Windows ARM64, instruction "ldr xt,[xn,v8_Default_embedded_blob_]" is - // generated by clang-cl to load elements in v8_Default_embedded_blob_. - // The generated instruction has scale 3 which requires the load target to be - // aligned at 8 bytes (2^3). + // On Windows ARM64, s390, PPC and possibly more platforms, aligned load + // instructions are used to retrieve v8_Default_embedded_blob_ and/or + // v8_Default_embedded_blob_size_. The generated instructions require the + // load target to be aligned at 8 bytes (2^3). fprintf(fp_, ".balign 8\n"); -#endif } void PlatformDependentEmbeddedFileWriter::Comment(const char* string) { diff --git a/src/snapshot/embedded-file-writer.h b/src/snapshot/embedded-file-writer.h index 55e134cd47f6..8323c4d53b78 100644 --- a/src/snapshot/embedded-file-writer.h +++ b/src/snapshot/embedded-file-writer.h @@ -286,6 +286,7 @@ class EmbeddedFileWriter : public EmbeddedFileWriterInterface { w->Comment("The size of the embedded blob in bytes."); w->SectionRoData(); + w->AlignToDataAlignment(); w->DeclareUint32(embedded_blob_size_symbol, blob->size()); w->Newline(); }