On Jul 11 13:18, Radek Barton via Cygwin-patches wrote:
> >From 434df1dc447ecb7a8cfd08af5219ce0697877fd5 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Radek=20Barto=C5=88?= <radek.bar...@microsoft.com>
> Date: Wed, 4 Jun 2025 14:55:34 +0200
> Subject: [PATCH] Cygwin: signal: make context structures registers handling
>  portable
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
> 
> This patch extracts macros from winsup/cygwin/exceptions.cc serving for 
> portable
> register access to context structures into a separate local header
> winsup/cygwin/local_includes/register.h and implements their AArch64
> counterparts.
> 
> Then, it adds AArch64 declaration of __mcontext structure based on
> mingw-w64-headers/include/winnt.h header to
> winsup/cygwin/include/cygwin/singal.h header.
> 
> Then, it includes the registers.h header and uses the macros where applicable,
> namely at:
>  - winsup/cygwin/exceptions.cc
>  - winsup/cygwin/profil.c
>  - winsup/cygwin/tread.cc
> 
> The motivation is to make usage of the context structures portable without
> unnecessary #if defined(__x86_64__) while implementations of signal handling
> code will be developed later, e.g. implementation of makecontext.
> 
> Signed-off-by: Radek BartoĊˆ <radek.bar...@microsoft.com>
> ---
>  winsup/cygwin/exceptions.cc             | 51 ++++++++--------
>  winsup/cygwin/include/cygwin/signal.h   | 77 ++++++++++++++++++++++++-
>  winsup/cygwin/local_includes/register.h | 25 ++++++++
>  winsup/cygwin/profil.c                  |  7 +--
>  winsup/cygwin/thread.cc                 |  3 +-
>  winsup/utils/profiler.cc                |  7 +--
>  6 files changed, 135 insertions(+), 35 deletions(-)
>  create mode 100644 winsup/cygwin/local_includes/register.h

Pushed.

I like this patch a lot.  Good idea to create job-related register macros!


Thanks,
Corinna

Reply via email to