From patchwork Wed May 9 15:48:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 135300 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp5805325lji; Wed, 9 May 2018 08:54:30 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqXuanErpr7+p+i3qxunUfizgD0ujBKUUCPmvX5mYfQjBAEDyxFkpubsozESGGGAXXRA8r1 X-Received: by 2002:a0c:d207:: with SMTP id m7-v6mr39681073qvh.179.1525881270063; Wed, 09 May 2018 08:54:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525881270; cv=none; d=google.com; s=arc-20160816; b=HxcIojxYpbc96m+QeHVA6IICjw1mE52ddQMjfOGoIVRn8rlvPAPXj1HsJiEgxbHRCq g45CGybLzEAeFMqpS15R1ivVd8JvfVC9qrNSaaT4tOiXYYLMgMUC3MABTh4LDnPzLrGk biItYUAowD7pfW40tMJ0SLiljJdL8uJPjk6NqrI9wp/BXaRcwGGCQKqW9HoXrNpD5+jc 0Ma3P3KInhzPA8dp23ebS4mBtSxhXmFnMuhuwkGy28mKyGzN4UBB8xzQ7EoKHypP41zz +6AznYfR2SnTlrHUdMK9C3n5FEv+jN+Rncn+tceXnWtiZJYkSoXGamH7Id1fsbwaZzjv vdYw== 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=r/7uV1Bl2SYuznx6rfMiwpEENtRjBk3YUGzerdwBCV4=; b=uM30PnUf/Vt1H1k95OasfwF1VFaYawSF5G9Ecbvw5SoMj0nwKzN3VgivjJt+9m8FdG zpOYfsx5VCr3TxeavkcNR+EqeQAflbviL0L+Ufw7O4BylLLQaKDz0Z2TYJcInXr3tnIg ycBxHA6HBsVjKzSrBN9b4jdOuARLKV22vWlWbk2viF7+BtR741/Vuc1XIU0b+AxtVdJN Qu7gfGtFU9i65Dapw+vUGUwgk9gNGnYxu73Mlqa/a/Jt8OO3umz/vyWkoR7XevnbYfhQ ouVQZUNXXOGxD3hc5Ml/0xRZ11VCDy0U1I61ifAFBPmoC3ccHlhzhAK8y3SDFdoZCEPp XSgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=erm0gS/z; 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 j12si443854qkm.29.2018.05.09.08.54.29 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 09 May 2018 08:54:30 -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=erm0gS/z; 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]:57216 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGRQD-0006hE-Ft for patch@linaro.org; Wed, 09 May 2018 11:54:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGRKq-0000uD-MK for qemu-devel@nongnu.org; Wed, 09 May 2018 11:48:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGRKo-0006wB-Er for qemu-devel@nongnu.org; Wed, 09 May 2018 11:48:56 -0400 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]:44949) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGRKo-0006um-9Z for qemu-devel@nongnu.org; Wed, 09 May 2018 11:48:54 -0400 Received: by mail-pg0-x244.google.com with SMTP id x145-v6so2592092pgx.11 for ; Wed, 09 May 2018 08:48:54 -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=r/7uV1Bl2SYuznx6rfMiwpEENtRjBk3YUGzerdwBCV4=; b=erm0gS/zGrPL25OVuBDvrUhFfw+KExMpZGdkRztNjOU+EJlmnHSzKL61l8v0pSgjPN WhLJU1akG6GASvKjnPE3/XWp9UOP4VJX3Q/bAexqj3nc1fQD0FdBD0UUNW0QoMbzGXVg 7PeQAQ1X+mOLpzr4Kym9OTGqwWNmw6tgEnrPE= 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=r/7uV1Bl2SYuznx6rfMiwpEENtRjBk3YUGzerdwBCV4=; b=J20T5GuQPZSkST1An49GSOSRUgjXbS5I4XSwPeLpgHXgTSPFyh5zfHXrkHJO3ov+hM 3UkBUhZJkb5mtTlV3dWg+58YN9yYYoybdbTSKvAx6+9pm9v+lUp0kQmG+6A11YKVNc+T 10unVi36ftIyNbsy5cpslKSwTgRL32sEM0/T7FnFF0xE1zot3b2zGcydbPmE1aYrQfeP QcnTsR5DaDBhTUpet39471SsC/qFiigm21jVaxZFJGKzRHkPxUik0czKwrT7I/5aujkE /eaCgfVt1jGFxWZuGq/fIOZfJW67zcUU24NU15d8p6Q/6+HuKEBXwnUIVgQz3INv54O8 w0oA== X-Gm-Message-State: ALQs6tAYDoSmnIkKS2iyqYFHxtF/AV/Ix7tAkIT/pZhxTLOjpAwar5G6 n457T+6GT2cHLSIi1RHC+Mai4X7H3LM= X-Received: by 10.98.75.139 with SMTP id d11mr44531383pfj.244.1525880932892; Wed, 09 May 2018 08:48:52 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-2-170.tukw.qwest.net. [97.113.2.170]) by smtp.gmail.com with ESMTPSA id d3-v6sm44058794pgc.12.2018.05.09.08.48.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 May 2018 08:48:51 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 9 May 2018 08:48:48 -0700 Message-Id: <20180509154849.27979-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180509154849.27979-1-richard.henderson@linaro.org> References: <20180509154849.27979-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::244 Subject: [Qemu-devel] [PULL 1/2] tcg/i386: Fix dup_vec in non-AVX2 codepath 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, qemu-stable@nongnu.org, Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell The VPUNPCKLD* instructions are all "non-destructive source", indicated by "NDS" in the encoding string in the x86 ISA manual. This means that they take two source operands, one of which is encoded in the VEX.vvvv field. We were incorrectly treating them as if they were destructive-source and passing 0 as the 'v' argument of tcg_out_vex_modrm(). This meant we were always using %xmm0 as one of the source operands, causing incorrect results if the register allocator happened to want to use something else. For instance the input AArch64 insn: DUP v26.16b, w21 which becomes TCG IR ops: dup_vec v128,e8,tmp2,x21 st_vec v128,e8,tmp2,env,$0xa40 was assembled to: 0x607c568c: c4 c1 7a 7e 86 e8 00 00 vmovq 0xe8(%r14), %xmm0 0x607c5694: 00 0x607c5695: c5 f9 60 c8 vpunpcklbw %xmm0, %xmm0, %xmm1 0x607c5699: c5 f9 61 c9 vpunpcklwd %xmm1, %xmm0, %xmm1 0x607c569d: c5 f9 70 c9 00 vpshufd $0, %xmm1, %xmm1 0x607c56a2: c4 c1 7a 7f 8e 40 0a 00 vmovdqu %xmm1, 0xa40(%r14) 0x607c56aa: 00 when the vpunpcklwd insn should be "%xmm1, %xmm1, %xmm1". This resulted in our incorrectly setting the output vector to q26=0000320000003200:0000320000003200 when given an input of x21 == 0000000002803200 rather than the expected all-zeroes. Pass the correct source register number to tcg_out_vex_modrm() for these insns. Fixes: 770c2fc7bb70804a Cc: qemu-stable@nongnu.org Signed-off-by: Peter Maydell Message-Id: <20180504153431.5169-1-peter.maydell@linaro.org> Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.inc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.17.0 diff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/tcg-target.inc.c index d7e59e79c5..5357909fff 100644 --- a/tcg/i386/tcg-target.inc.c +++ b/tcg/i386/tcg-target.inc.c @@ -854,11 +854,11 @@ static void tcg_out_dup_vec(TCGContext *s, TCGType type, unsigned vece, switch (vece) { case MO_8: /* ??? With zero in a register, use PSHUFB. */ - tcg_out_vex_modrm(s, OPC_PUNPCKLBW, r, 0, a); + tcg_out_vex_modrm(s, OPC_PUNPCKLBW, r, a, a); a = r; /* FALLTHRU */ case MO_16: - tcg_out_vex_modrm(s, OPC_PUNPCKLWD, r, 0, a); + tcg_out_vex_modrm(s, OPC_PUNPCKLWD, r, a, a); a = r; /* FALLTHRU */ case MO_32: @@ -867,7 +867,7 @@ static void tcg_out_dup_vec(TCGContext *s, TCGType type, unsigned vece, tcg_out8(s, 0); break; case MO_64: - tcg_out_vex_modrm(s, OPC_PUNPCKLQDQ, r, 0, a); + tcg_out_vex_modrm(s, OPC_PUNPCKLQDQ, r, a, a); break; default: g_assert_not_reached(); From patchwork Wed May 9 15:48:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 135301 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp5807858lji; Wed, 9 May 2018 08:56:58 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpG1kd5RvA0wQKZS5uLkWvn3um7BwgPS6xulMPExCKNCm8rGiPoVFmfwDIXZtk4wn6hCMre X-Received: by 2002:a0c:8abc:: with SMTP id 57-v6mr26156164qvv.147.1525881418246; Wed, 09 May 2018 08:56:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525881418; cv=none; d=google.com; s=arc-20160816; b=Sq9BKHpwI1BrP49GSmAi+qfp4wBRXDQUdZvoHbSV+cmJnjiTInPKwLiUuSxR3lFQtH pVKEXvJrIOqJhBYosBhSYqmwJWknEgFGez8OLnjJLrI64Aek40bsVHFNJk4sYC5Ox/9v +cNv5Np/4oywpUmzgeqMEZvL2xzn2C0FZZvRqEpoPfg+H6vDpFMrxzrnfOW4NdywWUsF LlS6TgL0eGxeg7n22I3ctHWEZLN0n/Ycq80qJGX8OQ09ZhDu5O4BI2H4yTyc/FZvss++ /7xn8rItKbGSNdElZzd2QOp5cl7B09DgVlBLNGxtOLmxzUufFAykhg1uq6l8cWJVP8dy 4MwA== 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=Jvfnq0w+xnpwr6tpohC7wpgDXHKzpW6j9smwRxzLQAg=; b=WSvMIdiaRwiDn7dX8NRXBcGodoTh3uKvsK8n8jgEukxE4hFlUuBGP6azIhLWVV+fDC U/52ddrksrrnamEKQQDNEiV3ZdlT2z4+/WRy4SGg0tJHQ2kUZ4oLTpfr5y3FTqxnDBGo Z9HoqZeppuF1OLRrCBgpaFzXx8bDVYDWjTqWqHZ6iXg/5Om6IBWAj8i8f4Sa7AqYpn1v 6b9TktsjmRi2O5upBXL/5y6Ishann8+m7y3Z+Vb+TUXrnsNmJIt5qLhqjeROX34GbYpw vY1If6kbSyQbP2v6Em62vHEg6n46FGNdSaK/DhiZmhO08u8PB0DNLnEJtvGT1sDSvau4 EX+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Yao78RRF; 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 p129si4419534qke.188.2018.05.09.08.56.58 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 09 May 2018 08:56:58 -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=Yao78RRF; 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]:57246 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGRSb-00015D-Pk for patch@linaro.org; Wed, 09 May 2018 11:56:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGRKr-0000uV-0N for qemu-devel@nongnu.org; Wed, 09 May 2018 11:49:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGRKp-00070H-Qr for qemu-devel@nongnu.org; Wed, 09 May 2018 11:48:57 -0400 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]:35578) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGRKp-0006zR-L3 for qemu-devel@nongnu.org; Wed, 09 May 2018 11:48:55 -0400 Received: by mail-pg0-x244.google.com with SMTP id n1-v6so343535pgs.2 for ; Wed, 09 May 2018 08:48:55 -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=Jvfnq0w+xnpwr6tpohC7wpgDXHKzpW6j9smwRxzLQAg=; b=Yao78RRFn9SrKNqPVLcg/RiVq7AlOtY/KB5CbLZwWg3Mm0gruEl4M1+kdeyIpE+/vB mrJyuKB+mrBbSZN38f+zGaoY0qN55Lsbm7+DUcBpkgA+3wF79ua0oMZtyWl94VztLD7Z 73RjXOnbRtBmR3J+wlHg3PHrkVlXmhdMQWobk= 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=Jvfnq0w+xnpwr6tpohC7wpgDXHKzpW6j9smwRxzLQAg=; b=m73DtQxx8fVUoQzwoU6dmeEFg5MfeZQjilRszkaYn1a3OyRSqgJ7AT/MAFrhrkamGw JqCs+Ya/GQZkcb1rNB2KXECKvvUPAgHJcLb3YP+KzFdqqgy//wPhVNVsgr6efQ819YrA XPXUHVrjuPGS60ARr0TXWsIhU75ifVgzeCxWgAbZ/fo7RuKeJAqxKkjVgYSF/Rz348e+ SXkixCQC3+6Bmn4+l0zXxf+RoYbLCQhjVlgIiXlAj1j3wRr8J9dbMatGeBGFoD/LILr6 WuPNqApa1d6HBr1kp5qkN1IoTKCyl+OluWm/pYtLg4Oy+ogskLAiM/Fr4h/0BzKWEx+s 9hZA== X-Gm-Message-State: ALQs6tBda39T0WAszpFt3wmfRaLrtnxyPnJq5iLqnohee7AV8kbq0+9R Z/1EYfjZGuamoNo332BtCbgHJMkW9Ao= X-Received: by 10.98.34.24 with SMTP id i24mr27931900pfi.53.1525880934269; Wed, 09 May 2018 08:48:54 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-2-170.tukw.qwest.net. [97.113.2.170]) by smtp.gmail.com with ESMTPSA id d3-v6sm44058794pgc.12.2018.05.09.08.48.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 May 2018 08:48:53 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 9 May 2018 08:48:49 -0700 Message-Id: <20180509154849.27979-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180509154849.27979-1-richard.henderson@linaro.org> References: <20180509154849.27979-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: 2607:f8b0:400e:c05::244 Subject: [Qemu-devel] [PULL 2/2] tcg: Limit the number of ops in a TB 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, qemu-stable@nongnu.org, Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" In 6001f7729e12 we partially attempt to address the branch displacement overflow caused by 15fa08f845. However, gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vqtbX.c is a testcase that contains a TB so large as to overflow anyway. The limit here of 8000 ops produces a maximum output TB size of 24112 bytes on a ppc64le host with that test case. This is still much less than the maximum forward branch distance of 32764 bytes. Cc: qemu-stable@nongnu.org Fixes: 15fa08f845 ("tcg: Dynamically allocate TCGOps") Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tcg.h | 8 +++++++- tcg/tcg.c | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) -- 2.17.0 diff --git a/tcg/tcg.h b/tcg/tcg.h index 75fbad128b..88378be310 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -655,6 +655,7 @@ struct TCGContext { int nb_globals; int nb_temps; int nb_indirects; + int nb_ops; /* goto_tb support */ tcg_insn_unit *code_buf; @@ -844,7 +845,12 @@ static inline TCGOp *tcg_last_op(void) /* Test for whether to terminate the TB for using too many opcodes. */ static inline bool tcg_op_buf_full(void) { - return false; + /* This is not a hard limit, it merely stops translation when + * we have produced "enough" opcodes. We want to limit TB size + * such that a RISC host can reasonably use a 16-bit signed + * branch within the TB. + */ + return tcg_ctx->nb_ops >= 8000; } /* pool based memory allocation */ diff --git a/tcg/tcg.c b/tcg/tcg.c index 551caf1c53..6eeebe0624 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -866,6 +866,7 @@ void tcg_func_start(TCGContext *s) /* No temps have been previously allocated for size or locality. */ memset(s->free_temps, 0, sizeof(s->free_temps)); + s->nb_ops = 0; s->nb_labels = 0; s->current_frame_offset = s->frame_start; @@ -1956,6 +1957,7 @@ void tcg_op_remove(TCGContext *s, TCGOp *op) { QTAILQ_REMOVE(&s->ops, op, link); QTAILQ_INSERT_TAIL(&s->free_ops, op, link); + s->nb_ops--; #ifdef CONFIG_PROFILER atomic_set(&s->prof.del_op_count, s->prof.del_op_count + 1); @@ -1975,6 +1977,7 @@ static TCGOp *tcg_op_alloc(TCGOpcode opc) } memset(op, 0, offsetof(TCGOp, link)); op->opc = opc; + s->nb_ops++; return op; }