AVX-512 指令编码 - {er} 含义

AVX-512 Instruction Encoding - {er} Meaning

在 Intel x86 指令集参考中,有许多 AVX-512 指令在指令中有一个可选的 {er}。例如,一种形式的 VADDPD 定义为

EVEX.NDS.512.66.0F.W1 58 /r
VADDPD zmm1 {k1}{z}, zmm2,
zmm3/m512/m64bcst{er}

{er} 是什么意思?

来自英特尔 SDM 第 2A 卷,3.1.1.3“操作码摘要中的指令列 Table”:

{er} — Indicates support for embedded rounding control, which is only applicable to the register-register form of the instruction. This also implies support for SAE (Suppress All Exceptions).

前面的 2.6.8 节指出 {er} 在适用时可以编码为 EVEX.L´L:

Static rounding control embedded in the EVEX encoding system applies only to register-to-register flavor of floating-point instructions with rounding semantic at two distinct vector lengths: (i) scalar, (ii) 512-bit. In both cases, the field EVEX.L’L expresses rounding mode control overriding MXCSR.RC if EVEX.b is set. When EVEX.b is set, “suppress all exceptions” is implied. The processor behaves as if all MXCSR masking controls are set.