From patchwork Mon Oct 16 17:25:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 115939 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp3941266qgn; Mon, 16 Oct 2017 10:34:52 -0700 (PDT) X-Received: by 10.237.38.36 with SMTP id z33mr15067996qtc.258.1508175292912; Mon, 16 Oct 2017 10:34:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508175292; cv=none; d=google.com; s=arc-20160816; b=rmA2cK4SkAy3cDMy05pT6sO2/Zo14XGVVmcTaORcL3SJXyQ2Oi3jWS3L+blVVJoIyw EUhkqCn51epmwoZbDvtWXuSsWmkthOnLvKiQDe1uuxNIri7EeT+5kRIrS7jPdfcQ3nNT RtpjGJKm16jMFO/zUe/egBeQkTkEv9q7l5Yn3t6nAdHLAmznHk01ePSdLuhO2wTUkdhm ZSPJo8DGkeVX6b6BMrIlb63FggEhsc9fGUEzSmMIm9WnDBzkbkFhIUaBBX/J/3JR2O+T wKL/vSE2MqTFi70u35q1P3F6X1a1LsMdU6Y27CLOGiriPdOYtb7qhvr/qhVVCJoOiv7v TAIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=1kQwh+6emE+i8dPPDChMVGTTzNWDPNxpy5NPSlnmM1o=; b=Syp1bC4GrA13+TecBzq7dlZwhRd89aFO/8WbTpmzhQi1+7414zWPmEdLFZadPMDlj5 TPvamqP4x9JniTzQ34BiLSZFqlKL3xG9aEozyHL53TJVNvQWAKB3/szAob0ioV1y+jwK wGvPQZQaAO19LVfCzY0p3nwbqWuB0wqY7l4K5hDnL3LO8znsfkHKqze56CoNKRTMBcT/ 5If9v/rIPrP692PLBCVfte63AITccBLI6xE71Fq5UINfFlf7DhVCD4wHI7rzUI/iE5SK 1CTWYWvnc4HWIAA38o1efSb3bjoeRH9zv/6qL082hQiFaVSbw+HTjPNt1K/XqsClYX9l rjXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=X/HKEtsv; 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 sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id q16si2165269qkh.107.2017.10.16.10.34.52 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 16 Oct 2017 10:34:52 -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 header.s=google header.b=X/HKEtsv; 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 sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34326 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e49Hu-0000rH-Lr for patch@linaro.org; Mon, 16 Oct 2017 13:34:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e499y-0002BT-UI for qemu-devel@nongnu.org; Mon, 16 Oct 2017 13:26:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e499x-0003Vb-On for qemu-devel@nongnu.org; Mon, 16 Oct 2017 13:26:38 -0400 Received: from mail-pg0-x22b.google.com ([2607:f8b0:400e:c05::22b]:55271) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e499x-0003Ux-HF for qemu-devel@nongnu.org; Mon, 16 Oct 2017 13:26:37 -0400 Received: by mail-pg0-x22b.google.com with SMTP id l24so7293177pgu.11 for ; Mon, 16 Oct 2017 10:26:37 -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=1kQwh+6emE+i8dPPDChMVGTTzNWDPNxpy5NPSlnmM1o=; b=X/HKEtsv9ob74PHKsPxjnwIOuJpY73hx2B2SAnKwMmWWweYhdeOFtbCpk7My95OEXS VuZTMBn/L006XZ6yctbwKLQbHPDh2tEx6X8o49czo0g/ep5ZzlZAL9f4Bh7PM88qJCC8 HhfrLfrwLHSpT87cbNq2FSJ/pi37XvUP0dprM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1kQwh+6emE+i8dPPDChMVGTTzNWDPNxpy5NPSlnmM1o=; b=Jgkr520HqovN0nuxOom8TvCgSxMKvib8DSfkiAZk8SsbN2Pc3bqV5v9ahjdRZXjfLu RVB2gUKCRrX1fVWCSnHRYQ2+Qi4c6mIDIIMgfQalSlwSkke7fCljbtNj9lzheuBjEGA1 i+JJDR440BiSmjVGief6DuVwVQA0kDYnY1+933/vasqQzC1h7zUdPk5CWwz3AvOcpVRy pL+3Po9yw6DyZF71SP5fHCFj5EP/2m/qat2Onnl5OwIcfaPWXcsRdDOhndCMasE6NWeq ffHCc1GegewJcUMKwJQcmlIQEKkLdjJTB9j7wGNpFUpz+UwzDRb8mcfSH0Vqnz60InIW tFHg== X-Gm-Message-State: AMCzsaXssTUQCV1Of5SvDB3zmmVdIq24OXu7aOKMH7H4oEWtVPJ3kNIb ngjuHIGGC05nz8D/WLVM3zV6jViyGbY= X-Google-Smtp-Source: AOwi7QA9sPfkO84rldd/ohN80hjWUwHxoWQPAF1L9S+E0NxkIFdLdutFN1xPm/Sr7pi/Gw/2FJ4M7Q== X-Received: by 10.159.195.7 with SMTP id bd7mr9773202plb.366.1508174796339; Mon, 16 Oct 2017 10:26:36 -0700 (PDT) Received: from cloudburst.twiddle.net (97-126-104-76.tukw.qwest.net. [97.126.104.76]) by smtp.gmail.com with ESMTPSA id i187sm5594249pfc.96.2017.10.16.10.26.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Oct 2017 10:26:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 16 Oct 2017 10:25:35 -0700 Message-Id: <20171016172609.23422-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171016172609.23422-1-richard.henderson@linaro.org> References: <20171016172609.23422-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::22b Subject: [Qemu-devel] [PATCH v6 16/50] tcg: Push tcg_ctx into tcg_gen_callN 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: cota@braap.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- include/exec/helper-gen.h | 12 ++++++------ tcg/tcg.h | 3 +-- tcg/tcg.c | 4 ++-- 3 files changed, 9 insertions(+), 10 deletions(-) -- 2.13.6 Reviewed-by: Emilio G. Cota diff --git a/include/exec/helper-gen.h b/include/exec/helper-gen.h index 8239ffc77c..476acd9220 100644 --- a/include/exec/helper-gen.h +++ b/include/exec/helper-gen.h @@ -9,7 +9,7 @@ #define DEF_HELPER_FLAGS_0(name, flags, ret) \ static inline void glue(gen_helper_, name)(dh_retvar_decl0(ret)) \ { \ - tcg_gen_callN(&tcg_ctx, HELPER(name), dh_retvar(ret), 0, NULL); \ + tcg_gen_callN(HELPER(name), dh_retvar(ret), 0, NULL); \ } #define DEF_HELPER_FLAGS_1(name, flags, ret, t1) \ @@ -17,7 +17,7 @@ static inline void glue(gen_helper_, name)(dh_retvar_decl(ret) \ dh_arg_decl(t1, 1)) \ { \ TCGArg args[1] = { dh_arg(t1, 1) }; \ - tcg_gen_callN(&tcg_ctx, HELPER(name), dh_retvar(ret), 1, args); \ + tcg_gen_callN(HELPER(name), dh_retvar(ret), 1, args); \ } #define DEF_HELPER_FLAGS_2(name, flags, ret, t1, t2) \ @@ -25,7 +25,7 @@ static inline void glue(gen_helper_, name)(dh_retvar_decl(ret) \ dh_arg_decl(t1, 1), dh_arg_decl(t2, 2)) \ { \ TCGArg args[2] = { dh_arg(t1, 1), dh_arg(t2, 2) }; \ - tcg_gen_callN(&tcg_ctx, HELPER(name), dh_retvar(ret), 2, args); \ + tcg_gen_callN(HELPER(name), dh_retvar(ret), 2, args); \ } #define DEF_HELPER_FLAGS_3(name, flags, ret, t1, t2, t3) \ @@ -33,7 +33,7 @@ static inline void glue(gen_helper_, name)(dh_retvar_decl(ret) \ dh_arg_decl(t1, 1), dh_arg_decl(t2, 2), dh_arg_decl(t3, 3)) \ { \ TCGArg args[3] = { dh_arg(t1, 1), dh_arg(t2, 2), dh_arg(t3, 3) }; \ - tcg_gen_callN(&tcg_ctx, HELPER(name), dh_retvar(ret), 3, args); \ + tcg_gen_callN(HELPER(name), dh_retvar(ret), 3, args); \ } #define DEF_HELPER_FLAGS_4(name, flags, ret, t1, t2, t3, t4) \ @@ -43,7 +43,7 @@ static inline void glue(gen_helper_, name)(dh_retvar_decl(ret) \ { \ TCGArg args[4] = { dh_arg(t1, 1), dh_arg(t2, 2), \ dh_arg(t3, 3), dh_arg(t4, 4) }; \ - tcg_gen_callN(&tcg_ctx, HELPER(name), dh_retvar(ret), 4, args); \ + tcg_gen_callN(HELPER(name), dh_retvar(ret), 4, args); \ } #define DEF_HELPER_FLAGS_5(name, flags, ret, t1, t2, t3, t4, t5) \ @@ -53,7 +53,7 @@ static inline void glue(gen_helper_, name)(dh_retvar_decl(ret) \ { \ TCGArg args[5] = { dh_arg(t1, 1), dh_arg(t2, 2), dh_arg(t3, 3), \ dh_arg(t4, 4), dh_arg(t5, 5) }; \ - tcg_gen_callN(&tcg_ctx, HELPER(name), dh_retvar(ret), 5, args); \ + tcg_gen_callN(HELPER(name), dh_retvar(ret), 5, args); \ } #include "helper.h" diff --git a/tcg/tcg.h b/tcg/tcg.h index 563e7d36aa..0d61932301 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -951,8 +951,7 @@ do {\ bool tcg_op_supported(TCGOpcode op); -void tcg_gen_callN(TCGContext *s, void *func, - TCGArg ret, int nargs, TCGArg *args); +void tcg_gen_callN(void *func, TCGArg ret, int nargs, TCGArg *args); void tcg_op_remove(TCGContext *s, TCGOp *op); TCGOp *tcg_op_insert_before(TCGContext *s, TCGOp *op, TCGOpcode opc, int narg); diff --git a/tcg/tcg.c b/tcg/tcg.c index b39944d42a..113700ccc1 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -974,9 +974,9 @@ bool tcg_op_supported(TCGOpcode op) /* Note: we convert the 64 bit args to 32 bit and do some alignment and endian swap. Maybe it would be better to do the alignment and endian swap in tcg_reg_alloc_call(). */ -void tcg_gen_callN(TCGContext *s, void *func, TCGArg ret, - int nargs, TCGArg *args) +void tcg_gen_callN(void *func, TCGArg ret, int nargs, TCGArg *args) { + TCGContext *s = &tcg_ctx; int i, real_args, nb_rets, pi; unsigned sizemask, flags; TCGHelperInfo *info;