Commit 1250611b authored by Milad Farazmand's avatar Milad Farazmand Committed by Commit Bot

PPC/s390: [regexp] Allow JSRegExpResult allocations in large object space

"Operand(num_saved_registers_)" might be bigger than 16 bits. Using a 32/64 bit load/mov
instruction to overcome the problem.

Port 4c156936

Original Commit Message:

    Large regexp results may exceed kMaxRegularHeapObjectSize and must
    thus be allocated in large object space.

R=jgruber@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: Ibfaf6150a139427f073f5f11873ad5832fc328ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1685027
Auto-Submit: Milad Farazmand <miladfar@ca.ibm.com>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarMilad Farazmand <miladfar@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#62507}
parent 89056f51
......@@ -756,7 +756,7 @@ Handle<HeapObject> RegExpMacroAssemblerPPC::GetCode(Handle<String> source) {
if (num_saved_registers_ > 8) {
// One slot beyond address of register 0.
__ addi(r4, frame_pointer(), Operand(kRegisterZero + kPointerSize));
__ li(r5, Operand(num_saved_registers_));
__ mov(r5, Operand(num_saved_registers_));
__ mtctr(r5);
Label init_loop;
__ bind(&init_loop);
......
......@@ -731,7 +731,7 @@ Handle<HeapObject> RegExpMacroAssemblerS390::GetCode(Handle<String> source) {
if (num_saved_registers_ > 8) {
// One slot beyond address of register 0.
__ lay(r3, MemOperand(frame_pointer(), kRegisterZero + kPointerSize));
__ LoadImmP(r4, Operand(num_saved_registers_));
__ Load(r4, Operand(num_saved_registers_));
Label init_loop;
__ bind(&init_loop);
__ StoreP(r1, MemOperand(r3, -kPointerSize));
......
......@@ -244,7 +244,7 @@
# Test doesn't work on 32-bit architectures (it would require a
# regexp pattern with too many captures).
'regress/regress-976627': [FAIL, ['arch == x64 or arch == arm64 or arch == mips64el', PASS]],
'regress/regress-976627': [FAIL, ['arch == x64 or arch == arm64 or arch == mips64el or arch == ppc64 or arch == s390x', PASS]],
}], # ALWAYS
['novfp3 == True', {
......
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