MIPS: [compiler] Add relocatable pointer constants for wasm memory references.
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.
Port 52148c41c9
TEST=
BUG=
Review URL: https://codereview.chromium.org/1886723003
Cr-Commit-Position: refs/heads/master@{#35450}
This commit is contained in:
parent
2837cb387b
commit
ec5995a104
src/compiler
@ -1743,7 +1743,11 @@ void CodeGenerator::AssembleMove(InstructionOperand* source,
|
||||
destination->IsRegister() ? g.ToRegister(destination) : kScratchReg;
|
||||
switch (src.type()) {
|
||||
case Constant::kInt32:
|
||||
__ li(dst, Operand(src.ToInt32()));
|
||||
if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) {
|
||||
__ li(dst, Operand(src.ToInt32(), src.rmode()));
|
||||
} else {
|
||||
__ li(dst, Operand(src.ToInt32()));
|
||||
}
|
||||
break;
|
||||
case Constant::kFloat32:
|
||||
__ li(dst, isolate()->factory()->NewNumber(src.ToFloat32(), TENURED));
|
||||
|
@ -2013,7 +2013,11 @@ void CodeGenerator::AssembleMove(InstructionOperand* source,
|
||||
__ li(dst, isolate()->factory()->NewNumber(src.ToFloat32(), TENURED));
|
||||
break;
|
||||
case Constant::kInt64:
|
||||
__ li(dst, Operand(src.ToInt64()));
|
||||
if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) {
|
||||
__ li(dst, Operand(src.ToInt64(), src.rmode()));
|
||||
} else {
|
||||
__ li(dst, Operand(src.ToInt64()));
|
||||
}
|
||||
break;
|
||||
case Constant::kFloat64:
|
||||
__ li(dst, isolate()->factory()->NewNumber(src.ToFloat64(), TENURED));
|
||||
|
Loading…
Reference in New Issue
Block a user