diff options
author | Aditya Mandaleeka <adityam@microsoft.com> | 2016-01-12 16:50:45 -0800 |
---|---|---|
committer | Aditya Mandaleeka <adityam@microsoft.com> | 2016-01-12 16:50:45 -0800 |
commit | 3223e3af4d14e3ffcb030be90ba6e1d510f46b07 (patch) | |
tree | fc7de8f8d08780cbfbf266b3f8641076ff2a7e6d /src | |
parent | db743bc4103e78484bd0dac54a1b887da63a7059 (diff) | |
download | coreclr-3223e3af4d14e3ffcb030be90ba6e1d510f46b07.tar.gz coreclr-3223e3af4d14e3ffcb030be90ba6e1d510f46b07.tar.bz2 coreclr-3223e3af4d14e3ffcb030be90ba6e1d510f46b07.zip |
Fix usage of floating point state from native contexts.
Diffstat (limited to 'src')
-rw-r--r-- | src/pal/src/include/pal/context.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/pal/src/include/pal/context.h b/src/pal/src/include/pal/context.h index 74ab8f75c7..4a89be02cd 100644 --- a/src/pal/src/include/pal/context.h +++ b/src/pal/src/include/pal/context.h @@ -67,19 +67,19 @@ typedef ucontext_t native_context_t; #define MCREG_R14(mc) ((mc).gregs[REG_R14]) #define MCREG_R15(mc) ((mc).gregs[REG_R15]) -#define FPREG_Xmm(uc, index) *(M128U*)&((uc)->__fpregs_mem._xmm[index]) - -#define FPREG_St(uc, index) *(M128U*)&((uc)->__fpregs_mem._st[index]) - -#define FPREG_ControlWord(uc) ((uc)->__fpregs_mem.cwd) -#define FPREG_StatusWord(uc) ((uc)->__fpregs_mem.swd) -#define FPREG_TagWord(uc) ((uc)->__fpregs_mem.ftw) -#define FPREG_ErrorOffset(uc) *(DWORD*)&((uc)->__fpregs_mem.rip) -#define FPREG_ErrorSelector(uc) *(((WORD*)&((uc)->__fpregs_mem.rip)) + 2) -#define FPREG_DataOffset(uc) *(DWORD*)&((uc)->__fpregs_mem.rdp) -#define FPREG_DataSelector(uc) *(((WORD*)&((uc)->__fpregs_mem.rdp)) + 2) -#define FPREG_MxCsr(uc) ((uc)->__fpregs_mem.mxcsr) -#define FPREG_MxCsr_Mask(uc) ((uc)->__fpregs_mem.mxcr_mask) +#define FPREG_Xmm(uc, index) *(M128U*)&((uc)->uc_mcontext.fpregs->_xmm[index]) + +#define FPREG_St(uc, index) *(M128U*)&((uc)->uc_mcontext.fpregs->_st[index]) + +#define FPREG_ControlWord(uc) ((uc)->uc_mcontext.fpregs->cwd) +#define FPREG_StatusWord(uc) ((uc)->uc_mcontext.fpregs->swd) +#define FPREG_TagWord(uc) ((uc)->uc_mcontext.fpregs->ftw) +#define FPREG_ErrorOffset(uc) *(DWORD*)&((uc)->uc_mcontext.fpregs->rip) +#define FPREG_ErrorSelector(uc) *(((WORD*)&((uc)->uc_mcontext.fpregs->rip)) + 2) +#define FPREG_DataOffset(uc) *(DWORD*)&((uc)->uc_mcontext.fpregs->rdp) +#define FPREG_DataSelector(uc) *(((WORD*)&((uc)->uc_mcontext.fpregs->rdp)) + 2) +#define FPREG_MxCsr(uc) ((uc)->uc_mcontext.fpregs->mxcsr) +#define FPREG_MxCsr_Mask(uc) ((uc)->uc_mcontext.fpregs->mxcr_mask) #else // BIT64 |