Skip to content

Commit dfdc313

Browse files
Junliang YanCommit Bot
authored andcommitted
PPC/s390: [interpreter] correctly advance over debug scaling prefixes.
Port 7a07d74 [email protected], [email protected], [email protected] BUG= LOG=N Change-Id: I99553fde819cbdc8a12df5b82d9d7230ba4ef8b3 Reviewed-on: https://chromium-review.googlesource.com/1042355 Commit-Queue: Junliang Yan <[email protected]> Reviewed-by: Joran Siu <[email protected]> Cr-Commit-Position: refs/heads/master@{#52970}
1 parent e0d2c6c commit dfdc313

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

src/builtins/ppc/builtins-ppc.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -859,9 +859,13 @@ static void AdvanceBytecodeOffsetOrReturn(MacroAssembler* masm,
859859
Label process_bytecode, extra_wide;
860860
STATIC_ASSERT(0 == static_cast<int>(interpreter::Bytecode::kWide));
861861
STATIC_ASSERT(1 == static_cast<int>(interpreter::Bytecode::kExtraWide));
862-
__ cmpi(bytecode, Operand(0x1));
862+
STATIC_ASSERT(2 == static_cast<int>(interpreter::Bytecode::kDebugBreakWide));
863+
STATIC_ASSERT(3 ==
864+
static_cast<int>(interpreter::Bytecode::kDebugBreakExtraWide));
865+
__ cmpi(bytecode, Operand(0x3));
863866
__ bgt(&process_bytecode);
864-
__ beq(&extra_wide);
867+
__ andi(r0, bytecode, Operand(0x1));
868+
__ bne(&extra_wide, cr0);
865869

866870
// Load the next bytecode and update table to the wide scaled table.
867871
__ addi(bytecode_offset, bytecode_offset, Operand(1));

src/builtins/s390/builtins-s390.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,9 +869,14 @@ static void AdvanceBytecodeOffsetOrReturn(MacroAssembler* masm,
869869
Label process_bytecode, extra_wide;
870870
STATIC_ASSERT(0 == static_cast<int>(interpreter::Bytecode::kWide));
871871
STATIC_ASSERT(1 == static_cast<int>(interpreter::Bytecode::kExtraWide));
872-
__ CmpP(bytecode, Operand(0x1));
872+
STATIC_ASSERT(2 == static_cast<int>(interpreter::Bytecode::kDebugBreakWide));
873+
STATIC_ASSERT(3 ==
874+
static_cast<int>(interpreter::Bytecode::kDebugBreakExtraWide));
875+
__ CmpP(bytecode, Operand(0x3));
873876
__ bgt(&process_bytecode);
874877
__ beq(&extra_wide);
878+
__ tmll(bytecode, Operand(0x1));
879+
__ bne(&extra_wide);
875880

876881
// Load the next bytecode and update table to the wide scaled table.
877882
__ AddP(bytecode_offset, bytecode_offset, Operand(1));

0 commit comments

Comments
 (0)