The order of getVal2 and getVal1 is reverse in the DOUBLE_MUL(r, r) rule in IA32_SSE2.rule

Description

The orginal rule is like this:
r: DOUBLE_MUL(r, r)
p.child1.isREGISTERNode() ? 11 : 13
EMIT_INSTRUCTION
SSE2_COP(IA32_MULSD, P(p), Binary.getResult(P(p)), Binary.getVal2(P(p)), Binary.getVal1(P(p)));

The order of getVal2 and getVal1 is reverse. It should be:
r: DOUBLE_MUL(r, r)
p.child1.isREGISTERNode() ? 11 : 13
EMIT_INSTRUCTION
SSE2_COP(IA32_MULSD, P(p), Binary.getResult(P(p)), Binary.getVal1(P(p)), Binary.getVal2(P(p)));

and add another rule:

r: DOUBLE_MUL(r, r)
p.child2.isREGISTERNode() ? 11 : 13
EMIT_INSTRUCTION
SSE2_COP(IA32_MULSD, P(p), Binary.getResult(P(p)), Binary.getVal2(P(p)), Binary.getVal1(P(p)));

Environment

None

Assignee

Ian Rogers

Reporter

Imported User 13

Labels

None

Affects versions

Priority

Medium
Configure