Commit 949d3226 authored by jyan's avatar jyan Committed by Commit bot

S390: [compiler] Add relocatable pointer constants for wasm memory references.

port 52148c41

Original Commit Message:
    Add relocatable pointers for wasm memory references that need to be updated when wasm GrowMemory is used. Code generator changes to accept relocatable constants as immediates.

R=gdeepti@google.com, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com, bjaideep@ca.ibm.com, mbrandy@us.ibm.com
BUG=

Review URL: https://codereview.chromium.org/1884573003

Cr-Commit-Position: refs/heads/master@{#35426}
parent a8b02cbc
......@@ -1906,10 +1906,26 @@ void CodeGenerator::AssembleMove(InstructionOperand* source,
destination->IsRegister() ? g.ToRegister(destination) : kScratchReg;
switch (src.type()) {
case Constant::kInt32:
#if !V8_TARGET_ARCH_S390X
if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) {
__ mov(dst, Operand(src.ToInt32(), src.rmode()));
} else {
__ mov(dst, Operand(src.ToInt32()));
}
#else
__ mov(dst, Operand(src.ToInt32()));
#endif // V8_TARGET_ARCH_S390X
break;
case Constant::kInt64:
#if V8_TARGET_ARCH_S390X
if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) {
__ mov(dst, Operand(src.ToInt64(), src.rmode()));
} else {
__ mov(dst, Operand(src.ToInt64()));
}
#else
__ mov(dst, Operand(src.ToInt64()));
#endif // V8_TARGET_ARCH_S390X
break;
case Constant::kFloat32:
__ Move(dst,
......
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