From patchwork Fri Aug 19 23:27:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 3584 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 1990523F22 for ; Fri, 19 Aug 2011 23:36:54 +0000 (UTC) Received: from mail-gx0-f180.google.com (mail-gx0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id CF886A182F9 for ; Fri, 19 Aug 2011 23:36:53 +0000 (UTC) Received: by gxk10 with SMTP id 10so3691013gxk.11 for ; Fri, 19 Aug 2011 16:36:53 -0700 (PDT) Received: by 10.151.10.9 with SMTP id n9mr337914ybi.390.1313797012449; Fri, 19 Aug 2011 16:36:52 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.150.157.17 with SMTP id f17cs121507ybe; Fri, 19 Aug 2011 16:36:52 -0700 (PDT) Received: by 10.227.39.83 with SMTP id f19mr184640wbe.112.1313796429468; Fri, 19 Aug 2011 16:27:09 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk [81.2.115.146]) by mx.google.com with ESMTPS id el6si5359993wbb.60.2011.08.19.16.27.07 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 19 Aug 2011 16:27:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1QuYSu-0002cy-An; Sat, 20 Aug 2011 00:27:04 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, "Edgar E. Iglesias" Subject: [PATCH] target-cris/opcode-cris.h: rename REG_PC/SP to CRIS_REG_PC/SP Date: Sat, 20 Aug 2011 00:27:04 +0100 Message-Id: <1313796424-10077-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 The REG_PC constant used in opcode-cris.h can clash with a similar define in system include files. In particular the Ubuntu Lucid SPARC signal.h will define REG_PC, and since qemu-common.h now includes signal.h this was causing compile failures. Rename the constants to avoid this issue. (NB that REG_SP is not actually used within QEMU.) Signed-off-by: Peter Maydell --- You might recall that we had to make a similar renaming in the linux-user code back in April for the same reason. target-cris/opcode-cris.h | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target-cris/opcode-cris.h b/target-cris/opcode-cris.h index 8d4749d..779d4aa 100644 --- a/target-cris/opcode-cris.h +++ b/target-cris/opcode-cris.h @@ -29,8 +29,8 @@ along with this program; if not, see . */ /* Registers. */ #define MAX_REG (15) -#define REG_SP (14) -#define REG_PC (15) +#define CRIS_REG_SP (14) +#define CRIS_REG_PC (15) /* CPU version control of disassembly and assembly of instructions. May affect how the instruction is assembled, at least the size of @@ -138,7 +138,7 @@ extern const struct cris_cond15 cris_conds15[]; #define BDAP_INDIR_OPCODE (BDAP_INDIR_HIGH * 0x0100 + BDAP_INDIR_LOW) #define BDAP_INDIR_Z_BITS (BDAP_INDIR_HIGH_Z * 0x100 + BDAP_INDIR_LOW_Z) -#define BDAP_PC_LOW (BDAP_INDIR_LOW + REG_PC) +#define BDAP_PC_LOW (BDAP_INDIR_LOW + CRIS_REG_PC) #define BDAP_INCR_HIGH (BDAP_INDIR_HIGH + AUTOINCR_BIT) /* No prefix must have this code for its "match" bits in the @@ -192,16 +192,16 @@ extern const char *const cris_cc_strings[]; #define JUMP_INDIR_OPCODE (0x0930) #define JUMP_INDIR_Z_BITS (0xf2c0) #define JUMP_PC_INCR_OPCODE \ - (JUMP_INDIR_OPCODE + AUTOINCR_BIT * 0x0100 + REG_PC) + (JUMP_INDIR_OPCODE + AUTOINCR_BIT * 0x0100 + CRIS_REG_PC) #define MOVE_M_TO_PREG_OPCODE 0x0a30 #define MOVE_M_TO_PREG_ZBITS 0x01c0 /* BDAP.D N,PC. */ #define MOVE_PC_INCR_OPCODE_PREFIX \ - (((BDAP_INCR_HIGH | (REG_PC << 4)) << 8) | BDAP_PC_LOW | (2 << 4)) + (((BDAP_INCR_HIGH | (CRIS_REG_PC << 4)) << 8) | BDAP_PC_LOW | (2 << 4)) #define MOVE_PC_INCR_OPCODE_SUFFIX \ - (MOVE_M_TO_PREG_OPCODE | REG_PC | (AUTOINCR_BIT << 8)) + (MOVE_M_TO_PREG_OPCODE | CRIS_REG_PC | (AUTOINCR_BIT << 8)) #define JUMP_PC_INCR_OPCODE_V32 (0x0DBF)