Commit 53780c06 authored by Jiayao Lin's avatar Jiayao Lin Committed by Commit Bot

[wasm] Fix PC not aligned on s390 debug test case

 DCHECK(IsAligned(addr, alignof(T))) is false on s390 debug simulator test
 case. So copy to an aligned buffer and we can relocate the serialized code.

Change-Id: I8e4ad9ff25fd9a9e5478831250ff741c3e72a86f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1822860Reviewed-by: 's avatarJunliang Yan <jyan@ca.ibm.com>
Reviewed-by: 's avatarClemens Backes [né Hammacher] <clemensb@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#63990}
parent 6d32f869
......@@ -359,7 +359,7 @@ void NativeModuleSerializer::WriteCode(const WasmCode* code, Writer* writer) {
writer->WriteVector(code->source_positions());
writer->WriteVector(Vector<byte>::cast(code->protected_instructions()));
#if V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_ARM || \
V8_TARGET_ARCH_PPC
V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_S390X
// On platforms that don't support misaligned word stores, copy to an aligned
// buffer if necessary so we can relocate the serialized code.
std::unique_ptr<byte[]> aligned_buffer;
......
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