diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2016-05-04 09:10:20 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2016-05-04 09:10:20 +0300 |
commit | 2907f2df9e86fe0830659755bb50c6f2b66ed4d1 (patch) | |
tree | 336c2035b154417a604b6bc9b44915f10452e5eb /src/Native/Runtime/PalRedhawkCommon.h | |
parent | 6de337625995e5cacf0954b9bc3e9f7e74f98b0b (diff) |
Modify context related data structures for Unix AMD64 (#1228)
This change modifies PAL_LIMITED_CONTEXT, StackFrameIterator and REGDISPLAY
structs and also all related code accessing registers that are not present
for Unix.
Diffstat (limited to 'src/Native/Runtime/PalRedhawkCommon.h')
-rw-r--r-- | src/Native/Runtime/PalRedhawkCommon.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/Native/Runtime/PalRedhawkCommon.h b/src/Native/Runtime/PalRedhawkCommon.h index 6ce08238a..0b1eb9157 100644 --- a/src/Native/Runtime/PalRedhawkCommon.h +++ b/src/Native/Runtime/PalRedhawkCommon.h @@ -61,14 +61,30 @@ struct PAL_LIMITED_CONTEXT UIntNative GetIp() const { return IP; } UIntNative GetSp() const { return SP; } UIntNative GetFp() const { return R7; } -#elif defined(_ARM64_) +#elif defined(_TARGET_ARM64_) // @TODO: Add ARM64 registers UIntNative IP; UIntNative GetIp() const { PORTABILITY_ASSERT("@TODO: FIXME:ARM64"); } UIntNative GetSp() const { PORTABILITY_ASSERT("@TODO: FIXME:ARM64"); } UIntNative GetFp() const { PORTABILITY_ASSERT("@TODO: FIXME:ARM64"); } -#else // _ARM_ +#elif defined(UNIX_AMD64_ABI) + // Param regs: rdi, rsi, rdx, rcx, r8, r9, scratch: rax, rdx (both return val), preserved: rbp, rbx, r12-r15 + UIntNative IP; + UIntNative Rsp; + UIntNative Rbp; + UIntNative Rax; + UIntNative Rbx; + UIntNative Rdx; + UIntNative R12; + UIntNative R13; + UIntNative R14; + UIntNative R15; + + UIntNative GetIp() const { return IP; } + UIntNative GetSp() const { return Rsp; } + UIntNative GetFp() const { return Rbp; } +#else // _TARGET_ARM_ UIntNative IP; UIntNative Rsp; UIntNative Rbp; @@ -92,12 +108,12 @@ struct PAL_LIMITED_CONTEXT Fp128 Xmm13; Fp128 Xmm14; Fp128 Xmm15; -#endif // _AMD64_ +#endif // _TARGET_AMD64_ UIntNative GetIp() const { return IP; } UIntNative GetSp() const { return Rsp; } UIntNative GetFp() const { return Rbp; } -#endif // _ARM_ +#endif // _TARGET_ARM_ }; void __stdcall RuntimeThreadShutdown(void* thread); |