Commit 8af03419 authored by Richard Townsend's avatar Richard Townsend Committed by Commit Bot

[arm64][msvc] Implement missing functions in mksnapshot

Because this code is compile-time gated, it's bit-rotted as new
functions have come along. This patch brings things back to
parity with x86/x64.

Bug: v8:10012
Change-Id: Iba4cd1155a1ae46742ecddbed96f36938a10db48
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066973Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Richard Townsend <richard.townsend@arm.com>
Cr-Commit-Position: refs/heads/master@{#66419}
parent b89f8514
......@@ -484,6 +484,39 @@ void PlatformEmbeddedFileWriterWin::SectionRoData() {
ARM64_DATA_ALIGNMENT_POWER);
}
void PlatformEmbeddedFileWriterWin::StartPdataSection() {
fprintf(fp_, " AREA |.pdata|, DATA, ALIGN=%d, READONLY\n",
ARM64_DATA_ALIGNMENT_POWER);
}
void PlatformEmbeddedFileWriterWin::EndPdataSection() {}
void PlatformEmbeddedFileWriterWin::StartXdataSection() {
fprintf(fp_, " AREA |.xdata|, DATA, ALIGN=%d, READONLY\n",
ARM64_DATA_ALIGNMENT_POWER);
}
void PlatformEmbeddedFileWriterWin::EndXdataSection() {}
void PlatformEmbeddedFileWriterWin::DeclareRvaToSymbol(const char* name,
uint64_t offset) {
if (offset > 0) {
fprintf(fp_, " DCD %s + %llu\n", name, offset);
} else {
fprintf(fp_, " DCD %s\n", name);
}
// The default relocation entry generated by MSVC armasm64.exe for DCD
// directive is IMAGE_REL_ARM64_ADDR64 which represents relocation for
// 64-bit pointer instead of 32-bit RVA. Append RELOC with
// IMAGE_REL_ARM64_ADDR32NB(2) to generate correct relocation entry for
// 32-bit RVA.
fprintf(fp_, " RELOC 2\n");
}
void PlatformEmbeddedFileWriterWin::DeclareExternalFunction(const char* name) {
fprintf(fp_, " EXTERN %s\n", name);
}
void PlatformEmbeddedFileWriterWin::DeclareUint32(const char* name,
uint32_t value) {
DeclareSymbolGlobal(name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment