zoukankan      html  css  js  c++  java
  • eflags 详解

    EFLAGS寄存器介绍,摘自Intel指令集参考,方便大家快速查阅。

         The 32-bit EFLAGS register contains a group of status flags, a control flag, and a group of system flags. Figure 3-8 defines the flags within this register. Following initialization of the processor (either by asserting the RESET pin or the INIT pin), the state of the EFLAGS register is 00000002H. Bits 1, 3, 5, 15, and 22 through 31 of this register are reserved. Software should not use or depend on the states of any of these bits.

          Some of the flags in the EFLAGS register can be modified directly, using specialpurpose instructions (described in the following sections). There are no instructions that allow the whole register to be examined or modified directly.

    The following instructions can be used to move groups of flags to and from the procedure stack or the EAX register: LAHF, SAHF, PUSHF, PUSHFD, POPF, and POPFD. After the contents of the EFLAGS register have been transferred to the procedure stack or EAX register, the flags can be examined and modified using the processor’s bit manipulation instructions (BT, BTS, BTR, and BTC).

        When suspending a task (using the processor’s multitasking facilities), the processor automatically saves the state of the EFLAGS register in the task state segment (TSS) for the task being suspended. When binding itself to a new task, the processor loads the EFLAGS register with data from the new task’s TSS.

        When a call is made to an interrupt or exception handler procedure, the processor automatically saves the state of the EFLAGS registers on the procedure stack. When an interrupt or exception is handled with a task switch, the state of the EFLAGS register is saved in the TSS for the task being suspended.

         As the IA-32 Architecture has evolved, flags have been added to the EFLAGS register, but the function and placement of existing flags have remained the same from one family of the IA-32 processors to the next. As a result, code that accesses or modifies these flags for one family of IA-32 processors works as expected when run on later families of processors.

    IOPL

    控制使用IO指令 如进程

  • 相关阅读:
    java fastjson 设置全局输出name最小化
    Spring MVC同一方法返回JSON/XML格式
    使用Vuejs编写单js组件
    iview使用vue-i18n实现国际化
    WPF usercontrol 自定义依赖属性
    正在尝试解析依赖项“MvvmLightLibs (≥ 5.2.0.0)”。 “MvvmLightLibs”已拥有为“CommonServiceLocator”定义的依赖项
    记第一次的破解经历
    HTML5实现手机QQ表情功能
    TypeScript 基本语法
    WebStorm下使用TypeScript
  • 原文地址:https://www.cnblogs.com/shenlian/p/2053857.html
Copyright © 2011-2022 走看看