From patchwork Fri Oct 20 23:19:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 116549 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2225278qgn; Fri, 20 Oct 2017 16:28:42 -0700 (PDT) X-Received: by 10.200.15.250 with SMTP id f55mr9910454qtk.249.1508542122579; Fri, 20 Oct 2017 16:28:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508542122; cv=none; d=google.com; s=arc-20160816; b=WmXy17Ad34tr/wGfpO1tXNRBSh4xKkjuzzku0YccCT7sCtJiHs4b/xRBYjl26J5e2O suz4SADWvhmis1IHhm6eTom/x9hHUrYki/4wAFywX1rT6bn1+1B+bXsmRcrz76CDxc89 gnSppEAgLu6XNJ8EiVACLN5S1DH/B5L68ReWKYXC73kVq6CsqlD1t19/nxRK9R3ZhQiV 3CLpSfStq0QAUlBXFG+8fa+qLrS1yEwuXNy9Z2IJwoSerEBm68a+ulfYWOxX80LC9/Yy Jhy7sRtuMP38U96wV3KgUVQuMo6tIJX3q6r3NbvkiWtoiDygWnKa4Ipk7LQE1TRCUQSn 9W0g== 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=UYEi93Wy21wMkuVsLqoO6neMEv+nudmQSqA7P8luoZU=; b=LpwwWfNY5SKXMsLmFXY3vC9cPu4j7vbCFufXn5pfO/vUxmHmuwFZgPDVv5Nko7Usvm 30Pa5nBh0L3wlNj1qupOVaJH3kB8jBOVqEsEsd6yj0GySpBYhjy40+DoJAeQ2GDvFEiQ iSG9wgreWRmB/GocvXN9WZgspKid1Nd+f9oP9HDaONEbLmCH0l8+loGPma6TBVXOotpD ps9DQKF2Y6/x39U32T1k0ZD1Inv1LQmGsXPl42J+oYGOu0Cg9/GskJxz+I04QSlp8TNO f9OxO8+EMKxDWvUSeDAc63KOcIIk5cH/GwigkE4l8eFjUD0Oc3SJouHK+C2hlYabSXpd mGTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=A3wc0FWe; 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 u10si1750930qtf.119.2017.10.20.16.28.42 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 20 Oct 2017 16:28:42 -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=A3wc0FWe; 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]:56012 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5giW-0004hV-9l for patch@linaro.org; Fri, 20 Oct 2017 19:28:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5gax-00060K-Vl for qemu-devel@nongnu.org; Fri, 20 Oct 2017 19:20:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5gav-0007e5-IF for qemu-devel@nongnu.org; Fri, 20 Oct 2017 19:20:51 -0400 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:45632) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e5gav-0007dq-AL for qemu-devel@nongnu.org; Fri, 20 Oct 2017 19:20:49 -0400 Received: by mail-pf0-x241.google.com with SMTP id d28so13077227pfe.2 for ; Fri, 20 Oct 2017 16:20:49 -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=UYEi93Wy21wMkuVsLqoO6neMEv+nudmQSqA7P8luoZU=; b=A3wc0FWeIGqVRuxD1H/VxnOquUB0J+mfnBaPd4usrBsdC8OsSjaG2RKeytmu8S93li peiB4ScEau9Xakesa/hfZydR3teYwkLWARudIsYXSxuBWd5VeNMut88lTQPRgsUVtdT4 1MTF/kJ2fQKDpki4FpVR8/yfFRa55CzbwzG4M= 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=UYEi93Wy21wMkuVsLqoO6neMEv+nudmQSqA7P8luoZU=; b=IrPbPjQTnZ05M7tFRZbrneoUX9N1P5brs6PC0l7mVV7UYuTpnZ7WcXymXheOHTZ7+z 93UHU70NkZLYQCYBnojkLcyiPsKTFap/mzvC7ndBcJk9oisywTF8McGlJsJonHMjYPS0 alISAHtfZk/ivljkpdGeOVhegwtsq4p7s8ZupRCVKUXIsh2miiKHplHigAoXNkpycuoB foXmuGjCBPkI8S+wL+DAEo7pr+QswXq/6Xx2CAl76hQKT7Kh3LD3OeKoqqojuLX8j+nv pVqUV6qQQV2iqzeioaw7tsLAeN6XBwnK2lgDiflAvDITDFUgYuuDSzIkQ1cPrgE+KTTn AHIw== X-Gm-Message-State: AMCzsaVeaOzLa7CNvKbT+meRXPalrfgLDNPkgD3keXPdt20WCsVNFe1i x091tONQp/uEXJKZJMi4Y+HmOOO6k2s= X-Google-Smtp-Source: ABhQp+SPooelt/Y3lpu13I2HSrRqB8dSRJfgDlPhgg6yy0aKbp66U1IyFuDcjyFVzDkzYo/lWcwvVw== X-Received: by 10.99.7.208 with SMTP id 199mr5643577pgh.158.1508541648125; Fri, 20 Oct 2017 16:20:48 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-165-104.tukw.qwest.net. [97.113.165.104]) by smtp.gmail.com with ESMTPSA id a17sm3532594pfk.173.2017.10.20.16.20.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Oct 2017 16:20:47 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 20 Oct 2017 16:19:46 -0700 Message-Id: <20171020232023.15010-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171020232023.15010-1-richard.henderson@linaro.org> References: <20171020232023.15010-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:c00::241 Subject: [Qemu-devel] [PATCH v7 15/52] 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: pbonzini@redhat.com, cota@braap.org, f4bug@amsat.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Emilio G. Cota 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: Philippe Mathieu-Daudé 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 c10e73babe..dac3e06a5b 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;