有没有办法以编程方式获取我的 CPU 支持的所有指令?
或者有适合这种工作的工具吗?
我还想获得每条指令相应的机器代码。
Or is there a tool for this kind of job?
I want also get the corresponding machine code for each instruction.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
CPUID 指令报告 CPU 支持 x86 处理器的功能。
http://www.intel.com/assets/pdf/appnote/241618.pdf
您必须参考指令参考手册来了解操作码,CPU 不可能告诉你“操作码 0x?”是以编程方式表示“XYZ 指令”。
The CPUID instruction reports what functionality the CPU supports for x86 processors.
http://www.intel.com/assets/pdf/appnote/241618.pdf
You'll have to refer to the Instruction Reference Manuals for the opcodes, there's no way the CPU can tell you that 'opcode 0x?? is the XYZ instruction' programatically.
您正在寻找的是有关指令集的信息。对于英特尔处理器,您可以在这里查看:http://www.intel.com/products/processor /手册/。
对于 x86-64 和 Itanium,请参阅本 PDF 中的第 3 章:http:// www.intel.com/Assets/PDF/manual/325383.pdf
我足够关心并深入了解的每个架构都有类似的手册。
What you are looking for is information on the instruction set. For Intel processesors, you can look here: http://www.intel.com/products/processor/manuals/.
For x86-64 and Itanium, refer to chapter 3 in this PDF: http://www.intel.com/Assets/PDF/manual/325383.pdf
Every architecture I've cared enough to learn that deeply has a similar manual.
我想不会,因为这是 CPU 必须支持的。谷歌你的处理器。
I would imagine not, as that is something that the CPU would have to support. Google your processor.
CPU-Z 是一个免费软件程序,它将返回支持的指令。
要通过代码获取此信息,我想您需要深入了解 ASM 汇编。
CPU-Z is a freeware program that will return the Instructions supported.
To get this information by code I would imagine you would need deep knowledge of ASM Assembly.