From 4a2aa4af61e653a89f88d776dcdc55f6c7ca05f2 Mon Sep 17 00:00:00 2001 From: Mark Mendell Date: Mon, 27 Jul 2015 16:13:10 -0400 Subject: Optimizing: Use more X86 3 operand multiplies The X86_64 code generator generated 3 operand multiplies for long multiplication only. Add support for 3 operand multiplication for int as well for both X86 and X86_64. Note that the RHS operand must be a 32 bit constant, and that it is possible for the constant to end up in a register (!) due to a previous use by another instruction. Handle this case by checking the operand, otherwise the first input might not be the same as the output, due to the use of Any(). Also allow stack operands for multiplication. Change-Id: I8f3d14cc01e9a91210f418258aa18065ee87979d Signed-off-by: Mark Mendell --- compiler/utils/x86/assembler_x86.h | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/utils/x86/assembler_x86.h') diff --git a/compiler/utils/x86/assembler_x86.h b/compiler/utils/x86/assembler_x86.h index e2abcde624..71c24b26f2 100644 --- a/compiler/utils/x86/assembler_x86.h +++ b/compiler/utils/x86/assembler_x86.h @@ -409,6 +409,7 @@ class X86Assembler FINAL : public Assembler { void imull(Register dst, Register src); void imull(Register reg, const Immediate& imm); + void imull(Register dst, Register src, const Immediate& imm); void imull(Register reg, const Address& address); void imull(Register reg); -- cgit v1.2.3-59-g8ed1b