From patchwork Wed Oct 25 09:34:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 117060 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp641974qgn; Wed, 25 Oct 2017 02:46:51 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Tqi4jWuMwBrZoCanQFpOf88Rj+ljeHs8+kpUlZQ/eTWxzaHcZ04jPUr+W+DhLkGeMCLvnC X-Received: by 10.129.129.198 with SMTP id r189mr14135909ywf.448.1508924811749; Wed, 25 Oct 2017 02:46:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508924811; cv=none; d=google.com; s=arc-20160816; b=Chk4c7jq3yGdqTucVcbJQd7iK4MDIcKd7moR2HQVh53FQNqgRh7TdDtoIDQ44R4ToJ YglcuRj8q5oNaQNhJXf3ZDRHGpdJwQ/IHxRKbYpJT5TmxS9QUepODFicx38U1sT1DNlE 9FXxZzLt9ZeuCNwCHXsR2KDB0HhWlWPzh0Wop9ACve209HHTgS9sEe//WiUdom964ENm 9XAgyW2u/7DGN+PaK26xXuvkjJjFA2qPXCBG9H1y8eXMbm2ycFqPQx0gqyjkvmo7i55W soNAgMUqqeZetj4tQcgH5rhIdH/RrUDi2CeIJOElozMORxCEK/WGnSpGWbwssAK2wxXH +mbw== 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=MeRrip6Xcj5lOKqRWDSc6KtFecgL////P8jhfRvYu4A=; b=hoMxYP8zedd/jkcmHY3SepCKHw1UPCECbc6XrMe7j3WdJHkR/RB3tR7Cz5Spt2+Tet VMUDCNHd/yUQfjGtZ5vsj39GW7YqMm5q7yBpEoBkvVmuH8L/Av/e0x1HuNFLZSfOSJse WRvLBYYNAtoVwAO6fHuuKaYk5t3Nl6EVdGjTOMkasPWkqXzSSGc/fO4rimxyHUjR2b+U 9g24tvDOX0OogY7ah8f+hPsaP+ZyAuIpeXzsLRcccDGaHzB9l8oqA2DX6ZImFsFJFu8M 9Td+2R11nipE34OkfjXSg3Se9UC9dqG4vw8EQgn48Px4/nKdcCHaw3PAbCoRpThIwmKD /t8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=C+erWO5b; 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 z2si365729ybj.637.2017.10.25.02.46.51 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 25 Oct 2017 02:46:51 -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=C+erWO5b; 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]:47352 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7IGx-0000iJ-5w for patch@linaro.org; Wed, 25 Oct 2017 05:46:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7I6S-0008FA-Jy for qemu-devel@nongnu.org; Wed, 25 Oct 2017 05:36:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7I6R-00086d-Ga for qemu-devel@nongnu.org; Wed, 25 Oct 2017 05:36:00 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:53662) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e7I6R-00086F-6q for qemu-devel@nongnu.org; Wed, 25 Oct 2017 05:35:59 -0400 Received: by mail-wm0-x243.google.com with SMTP id r196so643930wmf.2 for ; Wed, 25 Oct 2017 02:35:59 -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 :mime-version:content-transfer-encoding; bh=MeRrip6Xcj5lOKqRWDSc6KtFecgL////P8jhfRvYu4A=; b=C+erWO5b8qT4lSLvDzADNSmazUi4JRQvZdWtXN+1G+aBOn+vB7lvNmebp5HFCeKmEZ DiNDRPW67Xwes+ec9XNWfEEb4OxvQc/tTIWg+0Xh4bUOO6KI67fWIpW1jd3++BfiHmIh OzFkkVSN3TPKKDFxsh0RwXeppdRYen4X1kJhs= 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:mime-version:content-transfer-encoding; bh=MeRrip6Xcj5lOKqRWDSc6KtFecgL////P8jhfRvYu4A=; b=AtlUBcfh8ZLQxDt5Y7MJIzI757gFwu6TTt/O8tBXQUryywaClJCRewN5Kb9cUfb9WT mLzQ/uRSsZzn0PABha8sMYQOQOvQtx3w59imfmLQ7xZOAiqycULY6kZ77tzm9+fuSkGf 6vRtNVVYLD+Q7wpz0PwYFAE5j4dpgHxAanGZs8UKq9YvlS7+MMCBixk0yla2KHGsJ76w rNnA7AweGg6qxlh/+qC26nLCEuAK/1NxPmgtaxDZmS1ARHBfBy5DjngHYy8s1sUb1AQj BQ79GOVXcyeERQBxQERbolR4D9p03uwBffuJPgy1/9rFobiP7RiHiN7COrg3iGAaOlQ7 rMQw== X-Gm-Message-State: AMCzsaVgogV75PducetTMDSDzHMpQbtu7HU1xJq2snYEbyZs6HnHZzcX hEDJqRXGc/m8+elkL773/Hzuk8KqzLA= X-Received: by 10.28.238.148 with SMTP id j20mr1107030wmi.23.1508924158012; Wed, 25 Oct 2017 02:35:58 -0700 (PDT) Received: from cloudburst.twiddle.net ([62.168.35.107]) by smtp.gmail.com with ESMTPSA id v23sm2751025wmh.8.2017.10.25.02.35.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Oct 2017 02:35:57 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 25 Oct 2017 11:34:59 +0200 Message-Id: <20171025093535.10175-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171025093535.10175-1-richard.henderson@linaro.org> References: <20171025093535.10175-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::243 Subject: [Qemu-devel] [PULL 15/51] 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: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Philippe Mathieu-Daudé 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 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;