From patchwork Mon Sep 2 16:28:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 272000 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A9F572C009F for ; Tue, 3 Sep 2013 02:36:52 +1000 (EST) Received: from localhost ([::1]:41011 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGX7S-0003rx-KI for incoming@patchwork.ozlabs.org; Mon, 02 Sep 2013 12:36:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39898) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGX0a-0002fS-4n for qemu-devel@nongnu.org; Mon, 02 Sep 2013 12:29:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGX0V-0005kz-Ap for qemu-devel@nongnu.org; Mon, 02 Sep 2013 12:29:44 -0400 Received: from mail-pd0-x233.google.com ([2607:f8b0:400e:c02::233]:41443) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGX0V-0005kn-3u for qemu-devel@nongnu.org; Mon, 02 Sep 2013 12:29:39 -0400 Received: by mail-pd0-f179.google.com with SMTP id v10so4909323pde.24 for ; Mon, 02 Sep 2013 09:29:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=YspSFiYXh7fM4DnYF2Qg1883UMKu8PwynqwCw8DNhTs=; b=HYX3aaM+7GyNsOwZAg0EEfMcAeu02Wo1zQhuKWJnPjYM9qtEmiDswnkyD+EQudcbnF v44Ex3/GjjG7lJ6+oTxDGNA3aRl5JA4/ubYLgfI5/vUPBsMwSyanhkMpedVl6SxeyNlo m1K/90n+DDZ43j13gz1LJmJmHgKx27m/4PrdIEm+v/Wr84pK42nhtd9GWvnxWAV4YtAB MizBcVOzkYSjgMrFHbK7Dhx/w6bQKDO/2OUZm2cgYsCD9BAZv0BI5d0F2WvWwyQuu5br lEABQ9k19kg6qogsGqkKZb/nUbc5OPWLCrROhCctegyH4y5/g/f1WpNtmOYkPjCmuN6D nYWA== X-Received: by 10.66.27.43 with SMTP id q11mr26818235pag.97.1378139378283; Mon, 02 Sep 2013 09:29:38 -0700 (PDT) Received: from anchor.twiddle.net (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPSA id ia5sm16821148pbc.42.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 02 Sep 2013 09:29:37 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 2 Sep 2013 09:28:58 -0700 Message-Id: <1378139354-28602-14-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1378139354-28602-1-git-send-email-rth@twiddle.net> References: <1378139354-28602-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c02::233 Cc: aurelien@aurel32.net, anthony@codemonkey.ws Subject: [Qemu-devel] [PULL 13/29] tcg: Change memory offsets to intptr_t X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- tcg/tcg.c | 16 +++++----------- tcg/tcg.h | 8 +++----- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 240e6f4..251d390 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -389,7 +389,7 @@ TCGv_i64 tcg_global_reg_new_i64(int reg, const char *name) } static inline int tcg_global_mem_new_internal(TCGType type, int reg, - tcg_target_long offset, + intptr_t offset, const char *name) { TCGContext *s = &tcg_ctx; @@ -449,21 +449,15 @@ static inline int tcg_global_mem_new_internal(TCGType type, int reg, return idx; } -TCGv_i32 tcg_global_mem_new_i32(int reg, tcg_target_long offset, - const char *name) +TCGv_i32 tcg_global_mem_new_i32(int reg, intptr_t offset, const char *name) { - int idx; - - idx = tcg_global_mem_new_internal(TCG_TYPE_I32, reg, offset, name); + int idx = tcg_global_mem_new_internal(TCG_TYPE_I32, reg, offset, name); return MAKE_TCGV_I32(idx); } -TCGv_i64 tcg_global_mem_new_i64(int reg, tcg_target_long offset, - const char *name) +TCGv_i64 tcg_global_mem_new_i64(int reg, intptr_t offset, const char *name) { - int idx; - - idx = tcg_global_mem_new_internal(TCG_TYPE_I64, reg, offset, name); + int idx = tcg_global_mem_new_internal(TCG_TYPE_I64, reg, offset, name); return MAKE_TCGV_I64(idx); } diff --git a/tcg/tcg.h b/tcg/tcg.h index b7e112e..8fe8069 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -388,7 +388,7 @@ typedef struct TCGTemp { int reg; tcg_target_long val; int mem_reg; - tcg_target_long mem_offset; + intptr_t mem_offset; unsigned int fixed_reg:1; unsigned int mem_coherent:1; unsigned int mem_allocated:1; @@ -533,8 +533,7 @@ int tcg_gen_code_search_pc(TCGContext *s, uint8_t *gen_code_buf, long offset); void tcg_set_frame(TCGContext *s, int reg, intptr_t start, intptr_t size); TCGv_i32 tcg_global_reg_new_i32(int reg, const char *name); -TCGv_i32 tcg_global_mem_new_i32(int reg, tcg_target_long offset, - const char *name); +TCGv_i32 tcg_global_mem_new_i32(int reg, intptr_t offset, const char *name); TCGv_i32 tcg_temp_new_internal_i32(int temp_local); static inline TCGv_i32 tcg_temp_new_i32(void) { @@ -548,8 +547,7 @@ void tcg_temp_free_i32(TCGv_i32 arg); char *tcg_get_arg_str_i32(TCGContext *s, char *buf, int buf_size, TCGv_i32 arg); TCGv_i64 tcg_global_reg_new_i64(int reg, const char *name); -TCGv_i64 tcg_global_mem_new_i64(int reg, tcg_target_long offset, - const char *name); +TCGv_i64 tcg_global_mem_new_i64(int reg, intptr_t offset, const char *name); TCGv_i64 tcg_temp_new_internal_i64(int temp_local); static inline TCGv_i64 tcg_temp_new_i64(void) {