From patchwork Tue Jun 28 19:12:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 71153 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp1765805qgy; Tue, 28 Jun 2016 12:31:25 -0700 (PDT) X-Received: by 10.55.203.73 with SMTP id d70mr4802893qkj.116.1467142285367; Tue, 28 Jun 2016 12:31:25 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id a89si23688848qkj.207.2016.06.28.12.31.24 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 28 Jun 2016 12:31:25 -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]:39075 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHyjE-0005z2-CI for patch@linaro.org; Tue, 28 Jun 2016 15:31:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHyRf-0001uM-8L for qemu-devel@nongnu.org; Tue, 28 Jun 2016 15:13:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHyRc-0006rR-UK for qemu-devel@nongnu.org; Tue, 28 Jun 2016 15:13:15 -0400 Received: from mail-lf0-x231.google.com ([2a00:1450:4010:c07::231]:34543) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHyRc-0006rI-Lg for qemu-devel@nongnu.org; Tue, 28 Jun 2016 15:13:12 -0400 Received: by mail-lf0-x231.google.com with SMTP id h129so18186307lfh.1 for ; Tue, 28 Jun 2016 12:13:12 -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=Tb/ZAzNkUvYPeEdlRcRriCOPps7VFf4krJssdZzFIyL8zMf58Vgf/7InzmVeij0k1D 0ZZv4PHJ0npHa86+gjNavp2UqZnq3OG73ctKkpsloAfTUmcNG5Lvdyp/yxw3wYv2I8FV hN2wZG/ZvfuaiNa0186vi7LL0mRKMCsg7dBGI= 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=TU27fN9auVS/tGT0wGk2S+1p8DaHJTMCwBx2O9OxWJKHXZNDr+RIOviK8pTGccST48 wa4tnAct9i1jeTUQ/KmVQL7GwAm9TZH9DH4RwavVNrmZN0VgHWD26f9k3EOKl3cEewxU vfux26YYih3IY9PBt8DAl+gzaRWg331ibky83T8nvxPEjIkaS9EvZoe/jv6cEJJbLgKM Ulpp+zZcV+ki6rlXiQnSzIpUecIiabZpOU5mVZ7Do7e3As9KNqusR9Exf1JOPzRUp3wS xJ25esIGJkWgmHDcsSEDuUFC2MS7lZais0xsBZiOR6ueqMoy6BJDvbyBLPBP9gjTx6Mo DEWA== X-Gm-Message-State: ALyK8tI0EIauRmFyFwFVMHj/TZcNhxdeUekKWVXIgkR3ocL9H3pHMVR07amYkWhF8r+tfAUx X-Received: by 10.25.91.76 with SMTP id p73mr1480294lfb.181.1467141192002; Tue, 28 Jun 2016 12:13:12 -0700 (PDT) Received: from beaming.home (91-157-170-157.elisa-laajakaista.fi. [91.157.170.157]) by smtp.gmail.com with ESMTPSA id h10sm4262823ljh.38.2016.06.28.12.13.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Jun 2016 12:13:11 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Tue, 28 Jun 2016 22:12:42 +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::231 Subject: [Qemu-devel] [PULL v2 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) {