All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thiemo Seufer <ths@networkno.de>
To: Pierre d'Herbemont <pdherbemont@free.fr>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] siginfo fix for Darwin/Mac OS X on PowerPC and cleanup
Date: Thu, 18 Jan 2007 22:57:29 +0000	[thread overview]
Message-ID: <20070118225729.GD23469@networkno.de> (raw)
In-Reply-To: <CC6D420F-ECA8-43AE-B76F-D72B4467D262@free.fr>

Pierre d'Herbemont wrote:
> Hi,
> 
> This patch addresses cpu-exec.c compilation on Mac OS X/ppc. It also  
> cleans up unused Macro definition.
> 
> Pierre.

> Index: cpu-exec.c
> ===================================================================
> RCS file: /sources/qemu/qemu/cpu-exec.c,v
> retrieving revision 1.88
> diff -u -r1.88 cpu-exec.c
> --- cpu-exec.c	7 Dec 2006 18:28:42 -0000	1.88
> +++ cpu-exec.c	18 Jan 2007 12:30:04 -0000
> @@ -1334,51 +1334,30 @@
>  /* All Registers access - only for local access */
>  # define REG_sig(reg_name, context)		((context)->uc_mcontext.regs->reg_name)
>  /* Gpr Registers access  */
> -# define GPR_sig(reg_num, context)		REG_sig(gpr[reg_num], context)
>  # define IAR_sig(context)			REG_sig(nip, context)	/* Program counter */
> -# define MSR_sig(context)			REG_sig(msr, context)   /* Machine State Register (Supervisor) */
> -# define CTR_sig(context)			REG_sig(ctr, context)   /* Count register */
> -# define XER_sig(context)			REG_sig(xer, context) /* User's integer exception register */
> -# define LR_sig(context)			REG_sig(link, context) /* Link register */
> -# define CR_sig(context)			REG_sig(ccr, context) /* Condition register */
> -/* Float Registers access  */
> -# define FLOAT_sig(reg_num, context)		(((double*)((char*)((context)->uc_mcontext.regs+48*4)))[reg_num])
>  # define FPSCR_sig(context)			(*(int*)((char*)((context)->uc_mcontext.regs+(48+32*2)*4)))
>  /* Exception Registers access */
> -# define DAR_sig(context)			REG_sig(dar, context)
>  # define DSISR_sig(context)			REG_sig(dsisr, context)
>  # define TRAP_sig(context)			REG_sig(trap, context)
>  #endif /* linux */
>  
>  #ifdef __APPLE__
>  # include <sys/ucontext.h>
> -typedef struct ucontext SIGCONTEXT;
>  /* All Registers access - only for local access */
>  # define REG_sig(reg_name, context)		((context)->uc_mcontext->ss.reg_name)
> -# define FLOATREG_sig(reg_name, context)	((context)->uc_mcontext->fs.reg_name)
>  # define EXCEPREG_sig(reg_name, context)	((context)->uc_mcontext->es.reg_name)
> -# define VECREG_sig(reg_name, context)		((context)->uc_mcontext->vs.reg_name)
>  /* Gpr Registers access */
> -# define GPR_sig(reg_num, context)		REG_sig(r##reg_num, context)
>  # define IAR_sig(context)			REG_sig(srr0, context)	/* Program counter */
> -# define MSR_sig(context)			REG_sig(srr1, context)  /* Machine State Register (Supervisor) */
> -# define CTR_sig(context)			REG_sig(ctr, context)
> -# define XER_sig(context)			REG_sig(xer, context) /* Link register */
> -# define LR_sig(context)			REG_sig(lr, context)  /* User's integer exception register */
> -# define CR_sig(context)			REG_sig(cr, context)  /* Condition register */
> -/* Float Registers access */
> -# define FLOAT_sig(reg_num, context)		FLOATREG_sig(fpregs[reg_num], context)
> -# define FPSCR_sig(context)			((double)FLOATREG_sig(fpscr, context))
>  /* Exception Registers access */
> -# define DAR_sig(context)			EXCEPREG_sig(dar, context)     /* Fault registers for coredump */
>  # define DSISR_sig(context)			EXCEPREG_sig(dsisr, context)
>  # define TRAP_sig(context)			EXCEPREG_sig(exception, context) /* number of powerpc exception taken */
>  #endif /* __APPLE__ */

It might be better to keep the full set around for documentation.

> -int cpu_signal_handler(int host_signum, struct siginfo *info, 
> +int cpu_signal_handler(int host_signum, struct siginfo *pinfo, 
>                         void *puc)
>  {
>      struct ucontext *uc = puc;
> +    siginfo_t *info = pinfo;
>      unsigned long pc;
>      int is_write;

Why does this make a difference?


Thiemo

  reply	other threads:[~2007-01-18 22:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-18 12:43 [Qemu-devel] [PATCH] siginfo fix for Darwin/Mac OS X on PowerPC and cleanup Pierre d'Herbemont
2007-01-18 22:57 ` Thiemo Seufer [this message]
2007-01-18 23:15   ` Pierre d'Herbemont

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070118225729.GD23469@networkno.de \
    --to=ths@networkno.de \
    --cc=pdherbemont@free.fr \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.