Commit 0cbbb88d authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

[regexp] Disable regexp peephole optimization on Big-Endian

Disable because it's not yet supported on BE

Bug: v8:9330
Change-Id: Ia850801d410d3eeaccf9933dd2669f6077e2919c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1834904Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#64141}
parent 35e73840
......@@ -1266,13 +1266,18 @@ DEFINE_UINT(serialization_chunk_size, 4096,
DEFINE_BOOL(regexp_optimization, true, "generate optimized regexp code")
DEFINE_BOOL(regexp_mode_modifiers, false, "enable inline flags in regexp.")
DEFINE_BOOL(regexp_interpret_all, false, "interpret all regexp code")
#ifdef V8_TARGET_BIG_ENDIAN
#define REGEXP_PEEPHOLE_OPTIMIZATION_BOOL false
#else
#define REGEXP_PEEPHOLE_OPTIMIZATION_BOOL true
#endif
DEFINE_BOOL(regexp_tier_up, true,
"enable regexp interpreter and tier up to the compiler after the "
"number of executions set by the tier up ticks flag")
DEFINE_INT(regexp_tier_up_ticks, 1,
"set the number of executions for the regexp interpreter before "
"tiering-up to the compiler")
DEFINE_BOOL(regexp_peephole_optimization, true,
DEFINE_BOOL(regexp_peephole_optimization, REGEXP_PEEPHOLE_OPTIMIZATION_BOOL,
"enable peephole optimization for regexp bytecode")
DEFINE_BOOL(trace_regexp_peephole_optimization, false,
"trace regexp bytecode peephole optimization")
......
......@@ -955,7 +955,8 @@ void RegExpBytecodePeephole::EmitArgument(int start_pc, const byte* bytecode,
//
// We load 4 bytes from position - 1 and shift out the bytecode.
#ifdef V8_TARGET_BIG_ENDIAN
#error Big-endian support is not yet implemented.
UNIMPLEMENTED();
int32_t val = 0;
#else
int32_t val = GetValue<int32_t>(bytecode, arg_pos - 1) >> kBitsPerByte;
#endif // V8_TARGET_BIG_ENDIAN
......@@ -970,7 +971,8 @@ void RegExpBytecodePeephole::EmitArgument(int start_pc, const byte* bytecode,
GetValue<int32_t>(&(*optimized_bytecode_buffer_.begin()),
Length() - sizeof(uint32_t));
#ifdef V8_TARGET_BIG_ENDIAN
#error Big-endian support is not yet implemented.
UNIMPLEMENTED();
USE(prev_val);
#else
DCHECK_EQ(prev_val & 0xFFFFFF00, 0);
OverwriteValue<uint32_t>(pc() - sizeof(uint32_t),
......
......@@ -229,6 +229,7 @@
# operations.
'test-run-wasm-atomics/*': [SKIP],
'test-run-wasm-atomics64/*': [SKIP],
'test-regexp/Peephole*': [SKIP],
}], # 'byteorder == big'
##############################################################################
......
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