diff options
author | Aditya Mandaleeka <adityamandaleeka@users.noreply.github.com> | 2016-01-13 12:02:02 -0800 |
---|---|---|
committer | Aditya Mandaleeka <adityamandaleeka@users.noreply.github.com> | 2016-01-13 12:02:02 -0800 |
commit | 1629c98ddae092464478d8c272eedf29b58cbc5e (patch) | |
tree | a9bf0dc104ebfee70022599fb75d322f2f1e1b85 /src | |
parent | 0ea65f4d7039b9cbbbf8d80d6416185709cf44b2 (diff) | |
parent | 3223e3af4d14e3ffcb030be90ba6e1d510f46b07 (diff) | |
download | coreclr-1629c98ddae092464478d8c272eedf29b58cbc5e.tar.gz coreclr-1629c98ddae092464478d8c272eedf29b58cbc5e.tar.bz2 coreclr-1629c98ddae092464478d8c272eedf29b58cbc5e.zip |
Merge pull request #2631 from adityamandaleeka/floatingPointCxtFix
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 |