VirtualBox

Changeset 9926 in vbox


Ignore:
Timestamp:
Jun 25, 2008 2:45:58 PM (17 years ago)
Author:
vboxsync
Message:

32 bits register updates clear the upper dword of the 64 bits register.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Disassembler/DisasmReg.cpp

    r9923 r9926  
    110110 */
    111111#define DIS_READ_REG32(p, idx)       (*(uint32_t *)((char *)(p) + g_aReg32Index[idx]))
    112 #define DIS_WRITE_REG32(p, idx, val) (*(uint32_t *)((char *)(p) + g_aReg32Index[idx]) = val)
     112/* From http://www.cs.cmu.edu/~fp/courses/15213-s06/misc/asm64-handout.pdf:
     113 * ``Perhaps unexpectedly, instructions that move or generate 32-bit register
     114 *   values also set the upper 32 bits of the register to zero. Consequently
     115 *   there is no need for an instruction movzlq.''
     116 */
     117#define DIS_WRITE_REG32(p, idx, val) (*(uint64_t *)((char *)(p) + g_aReg32Index[idx]) = (uint32_t)val)
    113118#define DIS_PTR_REG32(p, idx)        ( (uint32_t *)((char *)(p) + g_aReg32Index[idx]))
    114119
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette