Huw Davies : ntdll: Remove unnecessary casts on macOS registers.

Alexandre Julliard julliard at winehq.org
Fri Aug 27 15:03:32 CDT 2021


Module: wine
Branch: master
Commit: dd37c3c4a04ef783ada136f561c0d4884a698713
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=dd37c3c4a04ef783ada136f561c0d4884a698713

Author: Huw Davies <huw at codeweavers.com>
Date:   Fri Aug 27 07:48:53 2021 +0100

ntdll: Remove unnecessary casts on macOS registers.

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/unix/signal_i386.c   | 4 ++--
 dlls/ntdll/unix/signal_x86_64.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/ntdll/unix/signal_i386.c b/dlls/ntdll/unix/signal_i386.c
index e033a3987ee..1c1022886fc 100644
--- a/dlls/ntdll/unix/signal_i386.c
+++ b/dlls/ntdll/unix/signal_i386.c
@@ -313,8 +313,8 @@ static inline int set_thread_area( struct modify_ldt_s *ptr )
 #define GS_sig(context)      ((context)->uc_mcontext->__ss.__gs)
 #define SS_sig(context)      ((context)->uc_mcontext->__ss.__ss)
 #define EFL_sig(context)     ((context)->uc_mcontext->__ss.__eflags)
-#define EIP_sig(context)     (*((unsigned long*)&(context)->uc_mcontext->__ss.__eip))
-#define ESP_sig(context)     (*((unsigned long*)&(context)->uc_mcontext->__ss.__esp))
+#define EIP_sig(context)     ((context)->uc_mcontext->__ss.__eip)
+#define ESP_sig(context)     ((context)->uc_mcontext->__ss.__esp)
 #define TRAP_sig(context)    ((context)->uc_mcontext->__es.__trapno)
 #define ERROR_sig(context)   ((context)->uc_mcontext->__es.__err)
 #define FPU_sig(context)     NULL
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
index 8065f1b8220..a9bdbf62929 100644
--- a/dlls/ntdll/unix/signal_x86_64.c
+++ b/dlls/ntdll/unix/signal_x86_64.c
@@ -229,8 +229,8 @@ __ASM_GLOBAL_FUNC( alloc_fs_sel,
 #define FS_sig(context)      ((context)->uc_mcontext->__ss.__fs)
 #define GS_sig(context)      ((context)->uc_mcontext->__ss.__gs)
 #define EFL_sig(context)     ((context)->uc_mcontext->__ss.__rflags)
-#define RIP_sig(context)     (*((unsigned long*)&(context)->uc_mcontext->__ss.__rip))
-#define RSP_sig(context)     (*((unsigned long*)&(context)->uc_mcontext->__ss.__rsp))
+#define RIP_sig(context)     ((context)->uc_mcontext->__ss.__rip)
+#define RSP_sig(context)     ((context)->uc_mcontext->__ss.__rsp)
 #define TRAP_sig(context)    ((context)->uc_mcontext->__es.__trapno)
 #define ERROR_sig(context)   ((context)->uc_mcontext->__es.__err)
 #define FPU_sig(context)     ((XMM_SAVE_AREA32 *)&(context)->uc_mcontext->__fs.__fpu_fcw)




More information about the wine-cvs mailing list