@@ -10895,8 +10895,6 @@ static void ConcatInlineString(MacroAssembler& masm, Register lhs, Register rhs,
10895
10895
10896
10896
10897
10897
copyChars(rhs);
10898
-
10899
- masm.ret();
10900
10898
}
10901
10899
10902
10900
void CodeGenerator::visitSubstr(LSubstr* lir) {
@@ -11068,6 +11066,9 @@ JitCode* JitRealm::generateStringConcatStub(JSContext* cx) {
11068
11066
#ifdef JS_USE_LINK_REGISTER
11069
11067
masm.pushReturnAddress();
11070
11068
#endif
11069
+ masm.Push(FramePointer);
11070
+ masm.moveStackPtrTo(FramePointer);
11071
+
11071
11072
11072
11073
Label leftEmpty;
11073
11074
masm.loadStringLength(lhs, temp1);
@@ -11122,29 +11123,37 @@ JitCode* JitRealm::generateStringConcatStub(JSContext* cx) {
11122
11123
11123
11124
11124
11125
masm.storeRopeChildren(lhs, rhs, output);
11126
+ masm.pop(FramePointer);
11125
11127
masm.ret();
11126
11128
11127
11129
masm.bind(&leftEmpty);
11128
11130
masm.mov(rhs, output);
11131
+ masm.pop(FramePointer);
11129
11132
masm.ret();
11130
11133
11131
11134
masm.bind(&rightEmpty);
11132
11135
masm.mov(lhs, output);
11136
+ masm.pop(FramePointer);
11133
11137
masm.ret();
11134
11138
11135
11139
masm.bind(&isInlineTwoByte);
11136
11140
ConcatInlineString(masm, lhs, rhs, output, temp1, temp2, temp3,
11137
11141
initialStringHeap, &failure, CharEncoding::TwoByte);
11142
+ masm.pop(FramePointer);
11143
+ masm.ret();
11138
11144
11139
11145
masm.bind(&isInlineLatin1);
11140
11146
ConcatInlineString(masm, lhs, rhs, output, temp1, temp2, temp3,
11141
11147
initialStringHeap, &failure, CharEncoding::Latin1);
11148
+ masm.pop(FramePointer);
11149
+ masm.ret();
11142
11150
11143
11151
masm.pop(temp2);
11144
11152
masm.pop(temp1);
11145
11153
11146
11154
masm.bind(&failure);
11147
11155
masm.movePtr(ImmPtr(nullptr), output);
11156
+ masm.pop(FramePointer);
11148
11157
masm.ret();
11149
11158
11150
11159
Linker linker(masm);
0 commit comments