x86 non-mov指令具有只写目标并且可以在Intel的任何端口上运行?

Bee*_*ope 3 x86 assembly x86-64 intel cpu-architecture

是否有任何整数2操作数x86-64指令将其第一个操作用作目标,而不用作源+目标1或仅源2,并且p0156在Intel Haswell和/或更高版本的CPU上运行?

mov指令不感兴趣,即mov名称中的任何内容。

例如,BMI1 blsi eax, edx是2操作数,目标​​为只写,但只能在Skylake的端口1或端口5上执行。


1大多数指令都属于此类,例如,add eax, ebx代表eax = eax + ebx

2少数2个操作数整数指令仅将其第一个操作数用作源,例如cmp eax, ebx

And*_*bel 5

以下Python脚本在uops.info XML文件(https://uops.info/xml.html)中搜索此类指令:

#!/usr/bin/python
import xml.etree.ElementTree as ET
import re

def main():
   for XMLInstr in ET.parse('instructions.xml').iter('instruction'):
      if len(XMLInstr.findall("./operand[@type='reg']")) != 2:
         continue
      if not any(True for op in XMLInstr.findall("./operand[@type='reg']") if op.attrib.get('w', '0') == '1' and op.attrib.get('r', '0') == '0'):
         continue
      if any(re.search("\A\d*\*p0156\Z", m.attrib.get('ports', '')) for m in XMLInstr.findall("./architecture/measurement")):
         print XMLInstr.attrib['string']

if __name__ == "__main__":
    main()
Run Code Online (Sandbox Code Playgroud)

如果我们从结果中排除了所有指令MOV的名称,仍然存在的唯一指令CBWCWDECDQE。但是,这些指令只有隐式操作数,这可能不是您要查找的。