• isharipo's avatar
    cmd/compile/internal/ssa: emit IMUL3{L/Q} for MUL{L/Q}const on x86 · 85a8d25d
    isharipo authored
    cmd/asm now supports three-operand form of IMUL,
    so instead of using IMUL with resultInArg0, emit IMUL3 instruction.
    
    This results in less redundant MOVs where SSA assigns
    different registers to input[0] and dst arguments.
    
    Note: these have exactly the same encoding when reg0=reg1:
          IMUL3x $const, reg0, reg1
          IMULx $const, reg
    Two-operand IMULx is like a crippled IMUL3x, with dst fixed to input[0].
    This is why we don't bother to generate IMULx for the case where
    dst is the same as input[0].
    
    Change-Id: I4becda475b3dffdd07b6fdf1c75bacc82af654e4
    Reviewed-on: https://go-review.googlesource.com/99656
    Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarGiovanni Bajo <rasky@develer.com>
    Reviewed-by: 's avatarKeith Randall <khr@golang.org>
    85a8d25d
Name
Last commit
Last update
..
387.go Loading commit data...
galign.go Loading commit data...
ggen.go Loading commit data...
ssa.go Loading commit data...