From patchwork Fri Jun 24 09:53:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 70809 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp861653qgy; Fri, 24 Jun 2016 03:01:00 -0700 (PDT) X-Received: by 10.55.70.66 with SMTP id t63mr3694111qka.162.1466762460711; Fri, 24 Jun 2016 03:01:00 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id t73si4318185qke.163.2016.06.24.03.01.00 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 24 Jun 2016 03:01:00 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:42270 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGNv2-0000qK-4Y for patch@linaro.org; Fri, 24 Jun 2016 06:01:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGNnw-0000lb-6I for qemu-devel@nongnu.org; Fri, 24 Jun 2016 05:53:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGNnq-0003LI-O8 for qemu-devel@nongnu.org; Fri, 24 Jun 2016 05:53:39 -0400 Received: from mail-lf0-x22c.google.com ([2a00:1450:4010:c07::22c]:34738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGNnq-0003KV-H7 for qemu-devel@nongnu.org; Fri, 24 Jun 2016 05:53:34 -0400 Received: by mail-lf0-x22c.google.com with SMTP id h129so112855170lfh.1 for ; Fri, 24 Jun 2016 02:53:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gxedSK/ELDDi5Qxr1IK1A2n7J3imWsI4osDOiRGg178=; b=WODU43S5/E354N5I6wFpnyvTvmYtEav0wFM2qmaJbDeWrMZQec5ZZOfrMbTUV0DU7O gv85StBbDY9VWD4AtgXJ0fjKS484LKqAAlN+oeuTMCV3NHLfEWo+mnYCG+RFVWAiFaEC 3JQhyR0HEZSjyeUfyzsmPGVP6pLJFxpOJ+fzY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gxedSK/ELDDi5Qxr1IK1A2n7J3imWsI4osDOiRGg178=; b=NIx5TeCvfzDhonqk+lfFun/hxRVDE1hRhreokDi8ZCYvrc6l3SwJhDTIHpMBy3Lsmj O2iYZzhu4LO4MB+TyenjF5EpuYxKwN9BKt8j/RkB7O4WvJXnYuwhihhuvATX6lZIgx09 z4Bl14Tat3QqCvHPPw3mPAC+WbvfzUT1LKiyb8wfG2wj7wBRSmIr0Abrd1zTHG/o0QlQ J3neRVHvB7sCDg7RaT8etbYfzGV6Y23oj9CKfKnYd7AfppPqqkgD5SEg8nZUX+pyHeQ2 MPYf3k8HVEWjDQSe+b/4LLRPsZ3caaO3/SfkeBOhE+iB0jVjHgk/r2KVYh1Pxd775gpQ EQEg== X-Gm-Message-State: ALyK8tKNhGw3rOde1fV1fgzjLL6znbl/qbHM5CqJYSTQdWExORj07eoDFMfXDEhbvSWThKPt X-Received: by 10.25.159.17 with SMTP id i17mr1047789lfe.76.1466762013676; Fri, 24 Jun 2016 02:53:33 -0700 (PDT) Received: from beaming.home (85-76-80-69-nat.elisa-mobile.fi. [85.76.80.69]) by smtp.gmail.com with ESMTPSA id o137sm798203lfe.2.2016.06.24.02.53.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Jun 2016 02:53:32 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Fri, 24 Jun 2016 12:53:03 +0300 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::22c Subject: [Qemu-devel] [PULL 08/24] user-exec: Remove unused code for OSX hosts X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell Since we dropped darwin-user support many years ago, the code in user-exec to support hosts which define __APPLE__ is unused; delete it. Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Signed-off-by: Riku Voipio Signed-off-by: Peter Maydell --- user-exec.c | 47 +---------------------------------------------- 1 file changed, 1 insertion(+), 46 deletions(-) -- 2.1.4 diff --git a/user-exec.c b/user-exec.c index 1e2449e..95f9f97 100644 --- a/user-exec.c +++ b/user-exec.c @@ -117,14 +117,7 @@ static inline int handle_cpu_signal(uintptr_t pc, unsigned long address, #if defined(__i386__) -#if defined(__APPLE__) -#include - -#define EIP_sig(context) (*((unsigned long *)&(context)->uc_mcontext->ss.eip)) -#define TRAP_sig(context) ((context)->uc_mcontext->es.trapno) -#define ERROR_sig(context) ((context)->uc_mcontext->es.err) -#define MASK_sig(context) ((context)->uc_sigmask) -#elif defined(__NetBSD__) +#if defined(__NetBSD__) #include #define EIP_sig(context) ((context)->uc_mcontext.__gregs[_REG_EIP]) @@ -274,44 +267,6 @@ int cpu_signal_handler(int host_signum, void *pinfo, #define TRAP_sig(context) ((context)->uc_mcontext.mc_exc) #endif /* __FreeBSD__|| __FreeBSD_kernel__ */ -#ifdef __APPLE__ -#include -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) -/* Program counter */ -#define IAR_sig(context) REG_sig(srr0, context) -/* Machine State Register (Supervisor) */ -#define MSR_sig(context) REG_sig(srr1, context) -#define CTR_sig(context) REG_sig(ctr, context) -/* Link register */ -#define XER_sig(context) REG_sig(xer, context) -/* User's integer exception register */ -#define LR_sig(context) REG_sig(lr, context) -/* Condition register */ -#define CR_sig(context) REG_sig(cr, context) -/* 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 */ -/* Fault registers for coredump */ -#define DAR_sig(context) EXCEPREG_sig(dar, context) -#define DSISR_sig(context) EXCEPREG_sig(dsisr, context) -/* number of powerpc exception taken */ -#define TRAP_sig(context) EXCEPREG_sig(exception, context) -#endif /* __APPLE__ */ - int cpu_signal_handler(int host_signum, void *pinfo, void *puc) {