Commit ded75f69 authored by mbrandy's avatar mbrandy Committed by Commit bot

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

Port eb5fe0df

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, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

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