imul (sm4 - asm)

Signed integer multiply.

imul destHI[.mask], destLO[.mask], [-]src0[.swizzle], [-]src1[.swizzle]

 

ItemDescription

destHI

[in] The address of the high 32 bits of the result.

destLO

[in] The address of the low 32 bits of the result.

src0

[in] The value to multiply with src1.

src1

[in] The value to multiply with src0.

 

Remarks

Component-wise multiply of 32-bit operands src0 and src1 (both are signed), producing the correct full 64-bit (per component) result. The low 32 bits (per component) are placed in destLO. The high 32 bits (per component) are placed in destHI.

Either destHI or destLO may be specified as NULL instead of specifying a register, if the high or low 32 bits of the 64-bit result are not needed.

Optional negate modifier on source operands takes 2's complement before performing arithmetic operation.

This instruction applies to the following shader stages:

Vertex ShaderGeometry ShaderPixel Shader
xxx

 

Minimum Shader Model

This function is supported in the following shader models.

Shader ModelSupported
Shader Model 5 yes
Shader Model 4.1 yes
Shader Model 4 yes
Shader Model 3 (DirectX HLSL) no
Shader Model 2 (DirectX HLSL) no
Shader Model 1 (DirectX HLSL) no

 

Related topics

Shader Model 4 Assembly (DirectX HLSL)

 

 

Show: