struct CPUContextX86
Defined at line 26 of file ../../third_party/crashpad/src/snapshot/cpu_context.h
A context structure carrying 32-bit x86 CPU state.
Public Members
uint32_t eax
uint32_t ebx
uint32_t ecx
uint32_t edx
uint32_t edi
uint32_t esi
uint32_t ebp
uint32_t esp
uint32_t eip
uint32_t eflags
uint16_t cs
uint16_t ds
uint16_t es
uint16_t fs
uint16_t gs
uint16_t ss
Fxsave fxsave
uint32_t dr0
uint32_t dr1
uint32_t dr2
uint32_t dr3
uint32_t dr4
uint32_t dr5
uint32_t dr6
uint32_t dr7
Public Methods
void FxsaveToFsave (const Fxsave & fxsave, Fsave * fsave)
Converts an `fxsave` area to an `fsave` area.
`fsave` state is restricted to the x87 FPU, while `fxsave` state includes
state related to the x87 FPU as well as state specific to SSE.
As the `fxsave` format is a superset of the `fsave` format, this operation
fully populates the `fsave` area. `fsave` uses the full 16-bit form for
the x87 floating-point tag word, so FxsaveToFsaveTagWord() is used to
derive Fsave::ftw from the abridged 8-bit form used by `fxsave`. Reserved
fields in
are set to `0`.
Parameters
void FsaveToFxsave (const Fsave & fsave, Fxsave * fxsave)
Converts an `fsave` area to an `fxsave` area.
`fsave` state is restricted to the x87 FPU, while `fxsave` state includes
state related to the x87 FPU as well as state specific to SSE.
As the `fsave` format is a subset of the `fxsave` format, this operation
cannot fully populate the `fxsave` area. Fields in
that have no
equivalent in
are set to `0`, including Fxsave::mxcsr,
Fxsave::mxcsr_mask, Fxsave::xmm, and Fxsave::available.
FsaveToFxsaveTagWord() is used to derive Fxsave::ftw from the full 16-bit
form used by `fsave`. Reserved fields in
are set to `0`.
Parameters
uint16_t FxsaveToFsaveTagWord (uint16_t fsw, uint8_t fxsave_tag, const X87OrMMXRegister[8] st_mm)
Converts x87 floating-point tag words from `fxsave` (abridged,
8-bit) to `fsave` (full, 16-bit) form.
`fxsave` stores the x87 floating-point tag word in abridged 8-bit form,
and `fsave` stores it in full 16-bit form. Some users, notably
CPUContextX86::Fsave::ftw, require the full 16-bit form, where most other
contemporary code uses `fxsave` and thus the abridged 8-bit form found in
CPUContextX86::Fxsave::ftw.
This function converts an abridged tag word to the full version by using
the abridged tag word and the contents of the registers it describes. See
Intel Software Developer’s Manual, Volume 2A: Instruction Set Reference
A-M (253666-052), 3.2 “FXSAVE”, specifically, the notes on the abridged
FTW and recreating the FSAVE format, and AMD Architecture Programmer’s
Manual, Volume 2: System Programming (24593-3.24), “FXSAVE Format for x87
Tag Word”.
Parameters
Returns
The full FPU tag word.
uint8_t FsaveToFxsaveTagWord (uint16_t fsave_tag)
Converts x87 floating-point tag words from `fsave` (full, 16-bit)
to `fxsave` (abridged, 8-bit) form.
This function performs the inverse operation of FxsaveToFsaveTagWord().
Parameters
Returns
The abridged FPU tag word.