DynamoRIO API
_dr_mcontext_t Struct Reference

#include <dr_defines.h>

Data Fields

size_t size
 
dr_mcontext_flags_t flags
 
reg_t r0
 
reg_t r1
 
reg_t r2
 
reg_t r3
 
reg_t r4
 
reg_t r5
 
reg_t r6
 
reg_t r7
 
reg_t r8
 
reg_t r9
 
reg_t r10
 
reg_t r11
 
reg_t r12
 
reg_t r13
 
reg_t r14
 
reg_t r15
 
reg_t r16
 
reg_t r17
 
reg_t r18
 
reg_t r19
 
reg_t r20
 
reg_t r21
 
reg_t r22
 
reg_t r23
 
reg_t r24
 
reg_t r25
 
reg_t r26
 
reg_t r27
 
reg_t r28
 
reg_t r29
 
union {
   reg_t   r30
 
   reg_t   lr
 
}; 
 
union {
   reg_t   r31
 
   reg_t   sp
 
   reg_t   xsp
 
}; 
 
byte * pc
 
union {
   uint   xflags
 
   struct {
      uint   nzcv
 
      uint   fpcr
 
      uint   fpsr
 
   } 
 
}; 
 
dr_simd_t simd [MCXT_NUM_SIMD_SLOTS]
 

Detailed Description

Machine context structure.

Field Documentation

union { ... }

The anonymous union of alternative names for r30/lr register.

union { ... }

The anonymous union of alternative names for r31/sp register.

union { ... }

The anonymous union of alternative names for flag registers.

dr_mcontext_flags_t _dr_mcontext_t::flags

The valid fields of this structure. This field must be set prior to filling in the fields. For input requests (dr_get_mcontext()), this indicates which fields should be written. Writing the multimedia fields frequently can incur a performance hit. For output requests (dr_set_mcontext() and dr_redirect_execution()), this indicates which fields will be copied to the actual context.

uint _dr_mcontext_t::fpcr

Floating-Point Control Register.

uint _dr_mcontext_t::fpsr

Floating-Point Status Register.

reg_t _dr_mcontext_t::lr

The link register.

uint _dr_mcontext_t::nzcv

Condition flags (status register).

byte* _dr_mcontext_t::pc

The program counter.

Note
This field is not always set or read by all API routines.
reg_t _dr_mcontext_t::r0

The r0 register.

reg_t _dr_mcontext_t::r1

The r1 register.

reg_t _dr_mcontext_t::r10

The r10 register.

reg_t _dr_mcontext_t::r11

The r11 register.

reg_t _dr_mcontext_t::r12

The r12 register.

reg_t _dr_mcontext_t::r13

The r13 register.

reg_t _dr_mcontext_t::r14

The r14 register.

reg_t _dr_mcontext_t::r15

The r15 register.

reg_t _dr_mcontext_t::r16

The r16 register.

Note
For 64-bit DR builds only.
reg_t _dr_mcontext_t::r17

The r17 register.

Note
For 64-bit DR builds only.
reg_t _dr_mcontext_t::r18

The r18 register.

Note
For 64-bit DR builds only.
reg_t _dr_mcontext_t::r19

The r19 register.

Note
For 64-bit DR builds only.
reg_t _dr_mcontext_t::r2

The r2 register.

reg_t _dr_mcontext_t::r20

The r20 register.

Note
For 64-bit DR builds only.
reg_t _dr_mcontext_t::r21

The r21 register.

Note
For 64-bit DR builds only.
reg_t _dr_mcontext_t::r22

The r22 register.

Note
For 64-bit DR builds only.
reg_t _dr_mcontext_t::r23

The r23 register.

Note
For 64-bit DR builds only.
reg_t _dr_mcontext_t::r24

The r24 register.

Note
For 64-bit DR builds only.
reg_t _dr_mcontext_t::r25

The r25 register.

Note
For 64-bit DR builds only.
reg_t _dr_mcontext_t::r26

The r26 register.

Note
For 64-bit DR builds only.
reg_t _dr_mcontext_t::r27

The r27 register.

Note
For 64-bit DR builds only.
reg_t _dr_mcontext_t::r28

The r28 register.

Note
For 64-bit DR builds only.
reg_t _dr_mcontext_t::r29

The r29 register.

Note
For 64-bit DR builds only.
reg_t _dr_mcontext_t::r3

The r3 register.

reg_t _dr_mcontext_t::r30

The r30 register.

Note
For 64-bit DR builds only.
reg_t _dr_mcontext_t::r31

The r31 register.

Note
For 64-bit DR builds only.
reg_t _dr_mcontext_t::r4

The r4 register.

reg_t _dr_mcontext_t::r5

The r5 register.

reg_t _dr_mcontext_t::r6

The r6 register.

reg_t _dr_mcontext_t::r7

The r7 register.

reg_t _dr_mcontext_t::r8

The r8 register.

reg_t _dr_mcontext_t::r9

The r9 register.

dr_simd_t _dr_mcontext_t::simd[MCXT_NUM_SIMD_SLOTS]

The SIMD registers. We would probably be ok if we did not preserve the callee-saved registers (q4-q7 == d8-d15) but to be safe we preserve them all. We do not need anything more than word alignment for OP_vldm/OP_vstm, and dr_simd_t has no fields larger than 32 bits, so we have no padding.

size_t _dr_mcontext_t::size

The size of this structure. This field must be set prior to filling in the fields to support forward compatibility.

reg_t _dr_mcontext_t::sp

The stack pointer register.

uint _dr_mcontext_t::xflags

The platform-independent name for condition flags.

reg_t _dr_mcontext_t::xsp

The platform-independent name for the stack pointer register.


The documentation for this struct was generated from the following file: