Bug 1300546: IonMonkey: Make sure the registers of lhs and rhs don't overlap during ALU, r=bbouvier

This commit is contained in:
Hannes Verschore 2016-09-20 14:48:52 +02:00
parent c31b9c2d2e
commit 75ca14183b
3 changed files with 35 additions and 4 deletions

View File

@ -0,0 +1,33 @@
// |jit-test| error: TypeError
load(libdir + "wasm.js");
setJitCompilerOption('wasm.test-mode', 1);
wasmEvalText(`
(module
(type $type0 (func))
(func $func0
(nop)
(f64.load offset=59 align=1 (i32.const 0))
(current_memory)
(current_memory)
(current_memory)
(current_memory)
(current_memory)
(current_memory)
(current_memory)
(current_memory)
(i64.rem_s (i64.const 17) (i64.xor (i64.const 17) (i64.xor (i64.const 17) (i64.xor (i64.xor (i64.const 17) (i64.const 17)) (i64.xor (i64.const 17) (i64.const 17))))))
(i64.rem_s
(i64.const 17)
(i64.xor
(i64.rem_s (i64.const 17) (i64.const 17))
(i64.xor (i64.rem_s (i64.const 17) (i64.const 17)) (i64.xor (i64.const 17) (i64.const 17)))))
)
(memory 1 1)
)
`)(createI64(41));

View File

@ -203,8 +203,7 @@ LIRGeneratorARM::lowerForALUInt64(LInstructionHelper<INT64_PIECES, 2 * INT64_PIE
MDefinition* mir, MDefinition* lhs, MDefinition* rhs)
{
ins->setInt64Operand(0, useInt64RegisterAtStart(lhs));
ins->setInt64Operand(INT64_PIECES,
lhs != rhs ? useInt64OrConstant(rhs) : useInt64OrConstantAtStart(rhs));
ins->setInt64Operand(INT64_PIECES, useInt64OrConstant(rhs));
defineInt64ReuseInput(ins, mir, 0);
}

View File

@ -209,8 +209,7 @@ LIRGeneratorX86::lowerForALUInt64(LInstructionHelper<INT64_PIECES, 2 * INT64_PIE
MDefinition* mir, MDefinition* lhs, MDefinition* rhs)
{
ins->setInt64Operand(0, useInt64RegisterAtStart(lhs));
ins->setInt64Operand(INT64_PIECES,
lhs != rhs ? useInt64OrConstant(rhs) : useInt64OrConstantAtStart(rhs));
ins->setInt64Operand(INT64_PIECES, useInt64OrConstant(rhs));
defineInt64ReuseInput(ins, mir, 0);
}