From patchwork Sat Jun 7 17:03:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 31522 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 38F2E2100A for ; Sat, 7 Jun 2014 17:03:06 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id w8sf15120921qac.2 for ; Sat, 07 Jun 2014 10:03:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=AHh9uDDGxXkatu8W8skWDnQbZLZDY8VGwE8bjq4DLQA=; b=dvG9Y1CtyQChZPlgd6yXZRJxdr/p2HGRUBGU0YC+AUS3RrKelj85zKNs7B6f9tph2C cXj9G8c31HOLoa7KOGW1mSfvlmkTyCQV5buUmsNOBTAfAhr8cjZ1yQadlsOxbnUumuO6 /FpMcENdYWAoUoobz8Kg3+UuRLvVGjEnlg6sgEhJoAgtZjvfOa5aOgXQkxuDOXyjey/8 orumLMLx3xh+00xFc2CAp9SP+D5v2dqyjmvgtZugDIWZhFkUojqN8XyUk0cabXWw03og TLKOocYWn635+Utxu0O8UrfrR6Y/6hq4vU31CK24x3ESHs1x7dGlI/KhRKubRNiLcUZq eZZQ== X-Gm-Message-State: ALoCoQkPIQllAzVN6wei3oSsDRitJqiozZGvruxH5Q6nxjAjr5IDllQ6KXo1joUp4iL97CHlZqtz X-Received: by 10.58.220.4 with SMTP id ps4mr8103615vec.38.1402160586102; Sat, 07 Jun 2014 10:03:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.93.131 with SMTP id d3ls1050183qge.52.gmail; Sat, 07 Jun 2014 10:03:06 -0700 (PDT) X-Received: by 10.221.50.70 with SMTP id vd6mr12288273vcb.51.1402160585986; Sat, 07 Jun 2014 10:03:05 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id gr1si9307969vdc.92.2014.06.07.10.03.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 07 Jun 2014 10:03:05 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id id10so2895242vcb.38 for ; Sat, 07 Jun 2014 10:03:05 -0700 (PDT) X-Received: by 10.52.52.168 with SMTP id u8mr8834413vdo.25.1402160585892; Sat, 07 Jun 2014 10:03:05 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp29882vcb; Sat, 7 Jun 2014 10:03:05 -0700 (PDT) X-Received: by 10.112.17.102 with SMTP id n6mr8894769lbd.39.1402160584557; Sat, 07 Jun 2014 10:03:04 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id c9si14174779lah.10.2014.06.07.10.03.03 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 07 Jun 2014 10:03:04 -0700 (PDT) Received-SPF: none (google.com: pm215@archaic.org.uk does not designate permitted sender hosts) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WtK1G-0003eI-8d; Sat, 07 Jun 2014 18:03:02 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, "Edgar E. Iglesias" Subject: [PATCH 2/2] target-cris/translate.c: Remove _t_gen_mov_TN_env and _t_gen_mov_env_TN Date: Sat, 7 Jun 2014 18:03:02 +0100 Message-Id: <1402160582-13994-3-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1402160582-13994-1-git-send-email-peter.maydell@linaro.org> References: <1402160582-13994-1-git-send-email-peter.maydell@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The wrapper functions _t_gen_mov_TN_env and _t_gen_mov_env_TN are only used via their accompanying non-underscore macros. The check they add on offset is thus pointless, since the compiler will complain if the struct field passed to the macro is not part of the struct. Remove the functions and make the macros directly expand to the appropriate tcg_gen_{ld,st}_tl calls. This conveniently avoids a warning due to _t_gen_mov_TN_env() being unused. Signed-off-by: Peter Maydell --- target-cris/translate.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/target-cris/translate.c b/target-cris/translate.c index eaea633..a10d972 100644 --- a/target-cris/translate.c +++ b/target-cris/translate.c @@ -159,24 +159,9 @@ static int preg_sizes[] = { }; #define t_gen_mov_TN_env(tn, member) \ - _t_gen_mov_TN_env((tn), offsetof(CPUCRISState, member)) + tcg_gen_ld_tl(tn, cpu_env, offsetof(CPUCRISState, member)) #define t_gen_mov_env_TN(member, tn) \ - _t_gen_mov_env_TN(offsetof(CPUCRISState, member), (tn)) - -static inline void _t_gen_mov_TN_env(TCGv tn, int offset) -{ - if (offset > sizeof(CPUCRISState)) { - fprintf(stderr, "wrong load from env from off=%d\n", offset); - } - tcg_gen_ld_tl(tn, cpu_env, offset); -} -static inline void _t_gen_mov_env_TN(int offset, TCGv tn) -{ - if (offset > sizeof(CPUCRISState)) { - fprintf(stderr, "wrong store to env at off=%d\n", offset); - } - tcg_gen_st_tl(tn, cpu_env, offset); -} + tcg_gen_st_tl(tn, cpu_env, offsetof(CPUCRISState, member)) static inline void t_gen_mov_TN_preg(TCGv tn, int r) {