zoukankan      html  css  js  c++  java
  • CPUID

    CPUID是一条指令,在任何level都可执行。用来获取当前处理器的信息,比如它的功能等。

    The CPUID instruction makes implicit use of the EAX, EBX, ECX, and EDX registers. Software loads a function code into EAX and, for some function codes, a sub-function code in ECX, executes the CPUID instruction, and then reads the associated processor-feature information in EAX, EBX, ECX, and EDX.

    Some processor implementations may not support the CPUID instruction. Support for the CPUID instruction is determined by testing the RFLAGS.ID bit. If software can write this bit, then the CPUID instruction is supported by the processor implementation. Otherwise, execution of CPUID results in an invalid-opcode exception.

    The CPUID instruction provides information about the processor implementation and its capabilities. Software operating at any privilege level can execute the CPUID instruction to collect this information. After the information is collected, software can select procedures that optimize performance for a particular hardware implementation.

    Support for the CPUID instruction is implementation-dependent, as determined by software’s ability to write the RFLAGS.ID bit. After software has determined that the processor implementation supports the CPUID instruction, software can test for support for a specific feature by loading the appropriate function number into the EAX register and executing the CPUID instruction. Processor feature information is returned in the EAX, EBX, ECX, and EDX registers.

    0000_xxxxh: standard function;
    8000_xxxxh: extended function.

  • 相关阅读:
    改变this指向的三个函数call, apply, bind的实现
    vscode 前端常用插件推荐
    Java SPI详解
    数据技术分享
    深入SpringMVC视图解析器
    .gitignore文件失效的解决方案
    Spring的事件监听机制
    Spring MVC 配置类 WebMvcConfigurerAdapter
    一起来读Netty In Action之传输(三)
    Tomcat性能调优参数简介
  • 原文地址:https://www.cnblogs.com/yanli0302/p/11574975.html
Copyright © 2011-2022 走看看