Bug 1233863 - ARM64: Set up pseudo stack pointer in proglogues. r=sstangl

Use the existing masm.initStackPtr() function to set up the x28 register
correctly on entry to jitted code.

This is already done correctly in JitRuntime::generateEnterJIT().
This commit is contained in:
Jakob Stoklund Olesen 2015-12-21 10:11:07 -08:00
parent e54879d3f8
commit 39ed7f94e8
2 changed files with 6 additions and 2 deletions

View File

@ -122,8 +122,7 @@ NativeRegExpMacroAssembler::GenerateCode(JSContext* cx, bool match_only)
#ifdef JS_CODEGEN_ARM64
// ARM64 communicates stack address via sp, but uses a pseudo-sp for addressing.
MOZ_ASSERT(!masm.GetStackPointer64().Is(sp));
masm.Mov(masm.GetStackPointer64(), sp);
masm.initStackPtr();
#endif
// Push non-volatile registers which might be modified by jitcode.

View File

@ -105,6 +105,11 @@ UnboxedLayout::makeConstructorCode(JSContext* cx, HandleObjectGroup group)
newKindReg = IntArgReg1;
#endif
#ifdef JS_CODEGEN_ARM64
// ARM64 communicates stack address via sp, but uses a pseudo-sp for addressing.
masm.initStackPtr();
#endif
MOZ_ASSERT(propertiesReg.volatile_());
MOZ_ASSERT(newKindReg.volatile_());