From patchwork Wed May 6 18:30:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 186274 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp2411643ill; Wed, 6 May 2020 11:36:06 -0700 (PDT) X-Google-Smtp-Source: APiQypKXDQa5uGejjJd0sFpedII+3HytzL3uPTFeidiB8vNXjl1OufwSdyZMl++Jezw67x6IuPyq X-Received: by 2002:aed:2f25:: with SMTP id l34mr9600578qtd.339.1588790166068; Wed, 06 May 2020 11:36:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588790166; cv=none; d=google.com; s=arc-20160816; b=rZEbkCc3KKEVBT/bw0AJGLN6hTTyQUoh9a1cIre8/GP9EovSz/ANmxT+XqGhHuWdf3 wpREzNFDy6fB+0hUlUG7rtDG1G6ryi2PzaMhwVlJEH4ZE3GpXPJTaDCehFpNZS1ERmne 4zDc4ttA5imSmvkMJH5mN3yEfCL6PM0Bg5omHmHV7Yk764FW3uRFO4ZMCAdLiBm0Mgeq XGURZYg08MFsYbBH0ZKi9vrPKFRed9HLeZFcHFOl0KhLYU+QivOVizdPDNZHC/D3uU+d vO8lG7f2LYxWK0f0AQhOiW+UOauj4aZHw5bwcdAUWL7U44hqR0lkCIqDqWAFSVF3S9fe 4ndg== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=3YIgXvNnlKZZkRJjIa1yeZKpwFFnxkASkY1Nv08qCiQ=; b=fRQHF4hoRESGh5ddBQ6S7y1k3Dmx6BqejRtnfuBN46u4nloA9gyElz/H1kzwFfTiS/ xXErnZaVTxRRUz90u8xQlExVwiInOdH2uO04ShVzUomZYpbqcqd+r9jUUKY+Rl2vcbmi WEhr9ktFPAu6CB1mN5ifgI9XjV5Pbxn9QjmHURcP2pj9Xono/1WVY58eUx98O3op79g9 F5V+5rvnpK1M16X0bID3f6YFUFuF2fjjlRLwniy+ZQYX7yRJaHgQOjMyHlHHGXFyLKMo qxJpPYAVAsYylbG7cJj8XiJEOe4m8xZMmX4fmYVZqClPQJKXKq5GzCRJkCWUdbrAAGkN 0eqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=CAj6yL6R; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 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:470:142::17]) by mx.google.com with ESMTPS id k7si1409018qkf.165.2020.05.06.11.36.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 May 2020 11:36:06 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) client-ip=2001:470:142::17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=CAj6yL6R; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 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]:37270 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWOtp-0003A9-F7 for patch@linaro.org; Wed, 06 May 2020 14:36:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWOoF-0004cE-9u for qemu-devel@nongnu.org; Wed, 06 May 2020 14:30:19 -0400 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:37780) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jWOoE-00034I-9I for qemu-devel@nongnu.org; Wed, 06 May 2020 14:30:18 -0400 Received: by mail-pg1-x529.google.com with SMTP id r4so1491509pgg.4 for ; Wed, 06 May 2020 11:30:17 -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=3YIgXvNnlKZZkRJjIa1yeZKpwFFnxkASkY1Nv08qCiQ=; b=CAj6yL6Rk2C3GDzJbBsrdQG4Hwbw0IPpTwMbBG0BMSRO1eTYLuF+8tTwm/ez4SEo48 AYMrShKUoi1OkpsUwugvZtKDhX2yQnpeOt9qrJ1u6w50udVrbvzCneaIQwYPOp0ET8CA GMRxUcJYjXuvXXAvL8qJc4XLDVIrsh+bOaw1zwlpZryBIaYKQKyGqZpwLTfVBd92elBQ Hf2zwk+ftvEMIRRr6/9knY5PWCnSE7q/BBvIduQ3CMBZdZVVN8I/yNIoGH1Do5EaXcaw +LoJmiTQxgyzstYI6+F9GOXFgZZO+hhvJ8o8d8SvQ51TSv/P7cWrXvPgT+roOqO/w07b +Qxw== 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=3YIgXvNnlKZZkRJjIa1yeZKpwFFnxkASkY1Nv08qCiQ=; b=BioVnH52ozPDBvfVkalHvXlF91Z0VTEbuGKv0wQpx1UW39kfTXhFBmqH12YyZVm9vQ viDsRkQ2s+Kk87cL1ID3st5PxRw+5+AwoYyAdOAhyMiKJw4mn6unS0uity793uYJe4Ip xoPIhJg2mEIR9PSTOZNMAQJoIPJE9lUkEEVH0SnDD8oSinkZE2ubeMyZIFE6D0VOLHYQ URpK7JPEJ7eB4eUO/ivgW0ceKk1N2OomrmIJmzDgUtvuJ2Ciu3JR3cit6azMxjb7A8hg 9XQxhO2mg+NVkw3npMQd86o3njvWJD9jHIq/+rRv9xkduB+ABo9qjfIuiRcwGxoiIaVz KEmA== X-Gm-Message-State: AGi0PuY/TsqTMXUckXaG3sJzkupV/AGLYtJdGnWRbTaVcN6kum+kHHul iPbiAaQIBwiMuRuNsEQa9VBpIwgHMuM= X-Received: by 2002:a62:888a:: with SMTP id l132mr5424303pfd.125.1588789816525; Wed, 06 May 2020 11:30:16 -0700 (PDT) Received: from localhost.localdomain (174-21-149-226.tukw.qwest.net. [174.21.149.226]) by smtp.gmail.com with ESMTPSA id w11sm2572589pfq.100.2020.05.06.11.30.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2020 11:30:15 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 10/10] tcg: Fix integral argument type to tcg_gen_rot[rl]i_i{32, 64} Date: Wed, 6 May 2020 11:30:02 -0700 Message-Id: <20200506183002.3192-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200506183002.3192-1-richard.henderson@linaro.org> References: <20200506183002.3192-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::529; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x529.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" For the benefit of compatibility of function pointer types, we have standardized on int32_t and int64_t as the integral argument to tcg expanders. We converted most of them in 474b2e8f0f7, but missed the rotates. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/tcg-op.h | 8 ++++---- tcg/tcg-op.c | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) -- 2.20.1 diff --git a/include/tcg/tcg-op.h b/include/tcg/tcg-op.h index 230db6e022..e3399d6a5e 100644 --- a/include/tcg/tcg-op.h +++ b/include/tcg/tcg-op.h @@ -297,9 +297,9 @@ void tcg_gen_ctzi_i32(TCGv_i32 ret, TCGv_i32 arg1, uint32_t arg2); void tcg_gen_clrsb_i32(TCGv_i32 ret, TCGv_i32 arg); void tcg_gen_ctpop_i32(TCGv_i32 a1, TCGv_i32 a2); void tcg_gen_rotl_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2); -void tcg_gen_rotli_i32(TCGv_i32 ret, TCGv_i32 arg1, unsigned arg2); +void tcg_gen_rotli_i32(TCGv_i32 ret, TCGv_i32 arg1, int32_t arg2); void tcg_gen_rotr_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2); -void tcg_gen_rotri_i32(TCGv_i32 ret, TCGv_i32 arg1, unsigned arg2); +void tcg_gen_rotri_i32(TCGv_i32 ret, TCGv_i32 arg1, int32_t arg2); void tcg_gen_deposit_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2, unsigned int ofs, unsigned int len); void tcg_gen_deposit_z_i32(TCGv_i32 ret, TCGv_i32 arg, @@ -493,9 +493,9 @@ void tcg_gen_ctzi_i64(TCGv_i64 ret, TCGv_i64 arg1, uint64_t arg2); void tcg_gen_clrsb_i64(TCGv_i64 ret, TCGv_i64 arg); void tcg_gen_ctpop_i64(TCGv_i64 a1, TCGv_i64 a2); void tcg_gen_rotl_i64(TCGv_i64 ret, TCGv_i64 arg1, TCGv_i64 arg2); -void tcg_gen_rotli_i64(TCGv_i64 ret, TCGv_i64 arg1, unsigned arg2); +void tcg_gen_rotli_i64(TCGv_i64 ret, TCGv_i64 arg1, int64_t arg2); void tcg_gen_rotr_i64(TCGv_i64 ret, TCGv_i64 arg1, TCGv_i64 arg2); -void tcg_gen_rotri_i64(TCGv_i64 ret, TCGv_i64 arg1, unsigned arg2); +void tcg_gen_rotri_i64(TCGv_i64 ret, TCGv_i64 arg1, int64_t arg2); void tcg_gen_deposit_i64(TCGv_i64 ret, TCGv_i64 arg1, TCGv_i64 arg2, unsigned int ofs, unsigned int len); void tcg_gen_deposit_z_i64(TCGv_i64 ret, TCGv_i64 arg, diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c index e2e25ebf7d..e60b74fb82 100644 --- a/tcg/tcg-op.c +++ b/tcg/tcg-op.c @@ -540,9 +540,9 @@ void tcg_gen_rotl_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2) } } -void tcg_gen_rotli_i32(TCGv_i32 ret, TCGv_i32 arg1, unsigned arg2) +void tcg_gen_rotli_i32(TCGv_i32 ret, TCGv_i32 arg1, int32_t arg2) { - tcg_debug_assert(arg2 < 32); + tcg_debug_assert(arg2 >= 0 && arg2 < 32); /* some cases can be optimized here */ if (arg2 == 0) { tcg_gen_mov_i32(ret, arg1); @@ -580,9 +580,9 @@ void tcg_gen_rotr_i32(TCGv_i32 ret, TCGv_i32 arg1, TCGv_i32 arg2) } } -void tcg_gen_rotri_i32(TCGv_i32 ret, TCGv_i32 arg1, unsigned arg2) +void tcg_gen_rotri_i32(TCGv_i32 ret, TCGv_i32 arg1, int32_t arg2) { - tcg_debug_assert(arg2 < 32); + tcg_debug_assert(arg2 >= 0 && arg2 < 32); /* some cases can be optimized here */ if (arg2 == 0) { tcg_gen_mov_i32(ret, arg1); @@ -1962,9 +1962,9 @@ void tcg_gen_rotl_i64(TCGv_i64 ret, TCGv_i64 arg1, TCGv_i64 arg2) } } -void tcg_gen_rotli_i64(TCGv_i64 ret, TCGv_i64 arg1, unsigned arg2) +void tcg_gen_rotli_i64(TCGv_i64 ret, TCGv_i64 arg1, int64_t arg2) { - tcg_debug_assert(arg2 < 64); + tcg_debug_assert(arg2 >= 0 && arg2 < 64); /* some cases can be optimized here */ if (arg2 == 0) { tcg_gen_mov_i64(ret, arg1); @@ -2001,9 +2001,9 @@ void tcg_gen_rotr_i64(TCGv_i64 ret, TCGv_i64 arg1, TCGv_i64 arg2) } } -void tcg_gen_rotri_i64(TCGv_i64 ret, TCGv_i64 arg1, unsigned arg2) +void tcg_gen_rotri_i64(TCGv_i64 ret, TCGv_i64 arg1, int64_t arg2) { - tcg_debug_assert(arg2 < 64); + tcg_debug_assert(arg2 >= 0 && arg2 < 64); /* some cases can be optimized here */ if (arg2 == 0) { tcg_gen_mov_i64(ret, arg1);