From patchwork Mon Dec 16 22:11:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181799 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4925850ile; Mon, 16 Dec 2019 14:12:21 -0800 (PST) X-Google-Smtp-Source: APXvYqyqsON26t/YnC5gwRdrmz3GbAyxIx4S5gscQo+AE62liX8/zXat6cqFl6FIF8z12lfOxAbK X-Received: by 2002:a05:6830:160c:: with SMTP id g12mr33343519otr.82.1576534341608; Mon, 16 Dec 2019 14:12:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576534341; cv=none; d=google.com; s=arc-20160816; b=E3dhX89kUeHs302kEYKpQVtVj/m+z8c6xRr7wvrcYQxOQtpXSSFgkLV0ToCACWMQbs GVbvItibeGKlBRfidTKLJg8HXPTmLCsNz75b+Aowzl6mI00anavF68P+VQ+nblfiTiVe k69Gn8zJfuEho/11d36vI8ubXWXMj7kj7XTjgxLH3GD33UG/1JMLA7ekdn7PDdxhR/r3 Jqx7sRrAvi4Umx7mv+ode9Pmg1MSuKot2nRLIyFwYTNj0onuzytpuPFbLobMLOXmOjQl rouFJVR5a1voGrlsbaRfcFnWQCC79Yt+hKXlR9YbDBvvgR0PNmjPGDXUmBfO93icW91j V8Mw== 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=mkGQo9JLGR6e+tkSUmklU8FYrD77VgZJcPg0K42unB0=; b=LpJ9+IbGg1uqD2BM9Obd/Qp2AKiTW4Ek8jcIy4Y8FAZlep6Ilh2GVllNinqi/6zHP2 ohgzs/zQVlKbmm0JrM5dHlDOb6inEsRKZ0hj4yBIzxP6dh1TlNQuZycG7r2QuK8ujL8x pAeoUz+JOIsIAEgtp9miAyI8yRZcGl+L9eLoG2wggSNupD9djrMhMAbTUTbzn4UR6qkh 35FkL2JExq4d7nya1XUvcQsYLjoe8A+Uyzg6tgv4gR1u3zUlN3xOb+6Dam670qzSrsqg lf97L3NEk+Tie7ftD53lIj+A59UTD9WPVMyAxNDFE4u63/q3VJQGpoS+zK3r70M75s99 XNUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZBNnvLPc; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b20si11001384otl.159.2019.12.16.14.12.21 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:12:21 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZBNnvLPc; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybE-0004lF-FD for patch@linaro.org; Mon, 16 Dec 2019 17:12:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36573) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igyb0-0004l7-84 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igyaz-0006ux-56 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:05 -0500 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:33246) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igyaz-0006uM-09 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:05 -0500 Received: by mail-pf1-x442.google.com with SMTP id y206so6391479pfb.0 for ; Mon, 16 Dec 2019 14:12:04 -0800 (PST) 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=mkGQo9JLGR6e+tkSUmklU8FYrD77VgZJcPg0K42unB0=; b=ZBNnvLPc3i/1x2D21xmEqk2Y0xOIwQ3QoZVxwjkpg6uHJmNsz6ogUhm5qgovjNao2Q DuUDp++WaI7lviLQ7EfApsaKyDjkR/9Ssvs40eXPUaRBALOWQI1KkGr8EZjf7QoqwYUz TJNEv0ZONze7XUVmIY3qRh9Nw1DL3VICtzJ370oWEO+Fo0BOs6If7GvWJK5fH+UuD9BG CcVoiRtge2De1DpEdINLVi5b7gByoJAUWniEjAJH437teDQ/dp0Xqswxm1SZ+4Tj2nCe mA1BNr8RLamBHLnBLPy6JGb6slR30DjJqibQJ2u4CKpwEEjp5RHY9qoY7Cqlw5DrxZ5P 8krg== 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=mkGQo9JLGR6e+tkSUmklU8FYrD77VgZJcPg0K42unB0=; b=DPZYeW1wq1zfr48iOT5qWbgMgMzVGeU7zo6cleBRhJNsqdmA88GkoOYQ9+J8Gkg+KE yL4ndgTPy8XVNmdfQJY+9G/H9rZ3iKjw3aRKy08koyo5xCiPSMMyInP1Qs2VY8enbpbP O0GzNpeDw5ocOxmIbId1/j5unEl7UyIAUHbquNGRKyDNORdyflwWIbFoTb+UBorH72Ht RF48yGq9MPYjtZJXO0WClna6p3hUpRirruIJ7rSet9s9EvG+a9Hl+ELaZbKrMrCVBUA5 ni0vWTJ3y8xm7jllqxfXpPdfFa9L0HUCbVAojYbdNzJx+yxvxG24PVxV8AcYA02p7uv8 UvXQ== X-Gm-Message-State: APjAAAURLRWOkgKru1a430DAXgumkSC6ykKa9BvXbhVjPqIdLt1Fflv9 0tL7PJhVQBqY+3Ee/f5kwfkiNpnrQXg= X-Received: by 2002:aa7:8a88:: with SMTP id a8mr18783531pfc.224.1576534323719; Mon, 16 Dec 2019 14:12:03 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:03 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 01/28] target/xtensa: Use probe_access for itlb_hit_test Date: Mon, 16 Dec 2019 12:11:31 -1000 Message-Id: <20191216221158.29572-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::442 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: Max Filippov Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We don't actually need the result of the read, only to probe that the memory mapping exists. This is exactly what probe_access does. This is also the only user of any cpu_ld*_code_ra function. Removing this allows the interface to be removed shortly. Acked-by: Max Filippov Signed-off-by: Richard Henderson --- target/xtensa/mmu_helper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée diff --git a/target/xtensa/mmu_helper.c b/target/xtensa/mmu_helper.c index f15bff306f..b01ff9399a 100644 --- a/target/xtensa/mmu_helper.c +++ b/target/xtensa/mmu_helper.c @@ -63,10 +63,11 @@ void HELPER(itlb_hit_test)(CPUXtensaState *env, uint32_t vaddr) { /* - * Attempt the memory load; we don't care about the result but + * Probe the memory; we don't care about the result but * only the side-effects (ie any MMU or other exception) */ - cpu_ldub_code_ra(env, vaddr, GETPC()); + probe_access(env, vaddr, 1, MMU_INST_FETCH, + cpu_mmu_index(env, true), GETPC()); } void HELPER(wsr_rasid)(CPUXtensaState *env, uint32_t v) From patchwork Mon Dec 16 22:11:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181800 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4925954ile; Mon, 16 Dec 2019 14:12:27 -0800 (PST) X-Google-Smtp-Source: APXvYqyiFC+1jCoA0jGlOu/Zhg08P1MPtxOgafcMgdjv4Ahv/uFgtS5tpkhukUrFFiteKthLkqvr X-Received: by 2002:a05:6808:4c7:: with SMTP id a7mr713404oie.83.1576534347643; Mon, 16 Dec 2019 14:12:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576534347; cv=none; d=google.com; s=arc-20160816; b=Llml/AVKudsut2dykkFwPrCTPGa7Tc2rIHXSa3NHwNSgawEnm4gti4u+KeLBzEq3k0 uVaK7/9reUrZZoNswLhP3czwthgM0KzUx4fU2ZDonlN29AEzqIRqIaSRE0NuqL/OwRgO 9PuvOBubWQttiM+YHcxPgyt3MaHRbZNieuOPu6m4fCdlNGLkWIA++NFdbYzoT6XBtADS ieAVyhN5P2Pe69qQ43Xc9Npnrt4d25EpmitiOtwkTlIBHAuuM5ptc1xB3T+6f0YoxC83 vAC/xyT50pk+hpr4bE/A+Can+ZuKoupxa/XAnyP7ZxTQQ9DQdmbJ6aLIX894Qr5la3A/ aV4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=L1jHeOFQAeKhXPKxXaTdBBGGRizQ9egD6BUcKiL091Y=; b=O2GM7sJnRwitkHKIuCNEi/ttwpegh5tI5Ci+OP/KXBUo5EoDbm6lqlk9Oppjd10H7q wN2C8g3TmvVyaQS0KblKR5SKsLpMMKWNWpfms6nIp1zk67Am3ab0g1DWzEXxtb0zAf5G CEXt60AJSoy3g248Bv+Ifxp+1KIjXss6cVtD75hQahWkpoZndUXm0hyAmsIk6KBaeFmT zR07Wwus3Y2Ql+eNIKf8oKUa7tUV/Hl0CLHGAAWar3qb5UVYafT/+oxKcnmTJtxa9E+g diiMwaf4z6FwpIs5BDsS2IMpSKqALQN4E69Hu1EAd79KMUCD5yn3Z/cKhyg3ENpag3gJ s7jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eifVvz6e; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k126si11707064oib.43.2019.12.16.14.12.27 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:12:27 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eifVvz6e; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybK-0004nk-IU for patch@linaro.org; Mon, 16 Dec 2019 17:12:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36597) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igyb2-0004lE-Ea for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igyb1-0006ve-3I for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:08 -0500 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:36998) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igyb0-0006vF-Te for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:07 -0500 Received: by mail-pl1-x62f.google.com with SMTP id c23so5121793plz.4 for ; Mon, 16 Dec 2019 14:12:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=L1jHeOFQAeKhXPKxXaTdBBGGRizQ9egD6BUcKiL091Y=; b=eifVvz6eHqww7voesCY7JTeZsXZHcK2Zo15G/oQBKE7qX2LkmRwuVv0yNpv1gdVwd9 XDFNP2jdfl/WrZ/0C+64+vbbe7pX2IR8KcY5OUMny3XJxbx4891BomgIaNQ4T30EcVHp s3gOQkol14QT1UL8kC+V5fTZR0i6JooCi8Np1A/D4yF6wtKnL8bRg0rrj3R7kOVZcX64 Xzvxdk9x3M0w+s87kwN3hbYbGIgwgC4+eJk7v6TG1/dfkcP0wK7GsqTxAM+Or1LNz+W1 7ZOrlDfCrhDn31I2HfxvKnLIS8iQbni0rnhXEfu+6l8D1XVUJ3KMb7zpqZbIN4xqSMkl 2URQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=L1jHeOFQAeKhXPKxXaTdBBGGRizQ9egD6BUcKiL091Y=; b=njLxPFo2j5TsTvpTxaWQvgVEpC+BdOsKy0gSylTCngRza55JiagaXEPuL+3i9ZAbxf 0gQ9GDytK0slPvJgTcBZUoURMUWe5uJuiDIZMUAGctJnTcHnDY3+9HSm9nCdzze6qQmL a9DYuEKaphzyGWP8FyjAzpqXxDJNRZM4sf6tBGziR+5xTUhzwHKUWDqW0YBffl2laOnI bEvKvZLNFhmB/PePbyR2wvR+oyqFVOD5FzI4lxpYmP1xvxJw/iIHixtV/0uh5yZxtVmy BkfK1VOEMnC2GmyxePPtIezib/5d1qj13PJ9rd8UGWZPxheKpKTMyIqpkjC6WRURKv3Q +HQQ== X-Gm-Message-State: APjAAAU/nLqyr6NeT7tangyvt8u1qb+buxTTIwTNsyEb9H0aWfMztxLs jyvfsi4nQu+N0LyVOeF6PpuC9nDh79w= X-Received: by 2002:a17:90a:c697:: with SMTP id n23mr1873320pjt.37.1576534325190; Mon, 16 Dec 2019 14:12:05 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:04 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 02/28] cputlb: Use trace_mem_get_info instead of trace_mem_build_info Date: Mon, 16 Dec 2019 12:11:32 -1000 Message-Id: <20191216221158.29572-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::62f 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" In the cpu_ldst templates, we already require a MemOp, and it is cleaner and clearer to pass that instead of 3 separate arguments describing the memory operation. Signed-off-by: Richard Henderson --- include/exec/cpu_ldst_template.h | 22 +++++++++++----------- include/exec/cpu_ldst_useronly_template.h | 12 ++++++------ 2 files changed, 17 insertions(+), 17 deletions(-) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée diff --git a/include/exec/cpu_ldst_template.h b/include/exec/cpu_ldst_template.h index 54b5e858ce..0ad5de3ef9 100644 --- a/include/exec/cpu_ldst_template.h +++ b/include/exec/cpu_ldst_template.h @@ -86,9 +86,9 @@ glue(glue(glue(cpu_ld, USUFFIX), MEMSUFFIX), _ra)(CPUArchState *env, RES_TYPE res; target_ulong addr; int mmu_idx = CPU_MMU_INDEX; - TCGMemOpIdx oi; + MemOp op = MO_TE | SHIFT; #if !defined(SOFTMMU_CODE_ACCESS) - uint16_t meminfo = trace_mem_build_info(SHIFT, false, MO_TE, false, mmu_idx); + uint16_t meminfo = trace_mem_get_info(op, mmu_idx, false); trace_guest_mem_before_exec(env_cpu(env), ptr, meminfo); #endif @@ -96,9 +96,9 @@ glue(glue(glue(cpu_ld, USUFFIX), MEMSUFFIX), _ra)(CPUArchState *env, entry = tlb_entry(env, mmu_idx, addr); if (unlikely(entry->ADDR_READ != (addr & (TARGET_PAGE_MASK | (DATA_SIZE - 1))))) { - oi = make_memop_idx(SHIFT, mmu_idx); + TCGMemOpIdx oi = make_memop_idx(op, mmu_idx); res = glue(glue(helper_ret_ld, URETSUFFIX), MMUSUFFIX)(env, addr, - oi, retaddr); + oi, retaddr); } else { uintptr_t hostaddr = addr + entry->addend; res = glue(glue(ld, USUFFIX), _p)((uint8_t *)hostaddr); @@ -125,9 +125,9 @@ glue(glue(glue(cpu_lds, SUFFIX), MEMSUFFIX), _ra)(CPUArchState *env, int res; target_ulong addr; int mmu_idx = CPU_MMU_INDEX; - TCGMemOpIdx oi; -#if !defined(SOFTMMU_CODE_ACCESS) - uint16_t meminfo = trace_mem_build_info(SHIFT, true, MO_TE, false, mmu_idx); + MemOp op = MO_TE | MO_SIGN | SHIFT; +#ifndef SOFTMMU_CODE_ACCESS + uint16_t meminfo = trace_mem_get_info(op, mmu_idx, false); trace_guest_mem_before_exec(env_cpu(env), ptr, meminfo); #endif @@ -135,7 +135,7 @@ glue(glue(glue(cpu_lds, SUFFIX), MEMSUFFIX), _ra)(CPUArchState *env, entry = tlb_entry(env, mmu_idx, addr); if (unlikely(entry->ADDR_READ != (addr & (TARGET_PAGE_MASK | (DATA_SIZE - 1))))) { - oi = make_memop_idx(SHIFT, mmu_idx); + TCGMemOpIdx oi = make_memop_idx(op & ~MO_SIGN, mmu_idx); res = (DATA_STYPE)glue(glue(helper_ret_ld, SRETSUFFIX), MMUSUFFIX)(env, addr, oi, retaddr); } else { @@ -167,9 +167,9 @@ glue(glue(glue(cpu_st, SUFFIX), MEMSUFFIX), _ra)(CPUArchState *env, CPUTLBEntry *entry; target_ulong addr; int mmu_idx = CPU_MMU_INDEX; - TCGMemOpIdx oi; + MemOp op = MO_TE | SHIFT; #if !defined(SOFTMMU_CODE_ACCESS) - uint16_t meminfo = trace_mem_build_info(SHIFT, false, MO_TE, true, mmu_idx); + uint16_t meminfo = trace_mem_get_info(op, mmu_idx, true); trace_guest_mem_before_exec(env_cpu(env), ptr, meminfo); #endif @@ -177,7 +177,7 @@ glue(glue(glue(cpu_st, SUFFIX), MEMSUFFIX), _ra)(CPUArchState *env, entry = tlb_entry(env, mmu_idx, addr); if (unlikely(tlb_addr_write(entry) != (addr & (TARGET_PAGE_MASK | (DATA_SIZE - 1))))) { - oi = make_memop_idx(SHIFT, mmu_idx); + TCGMemOpIdx oi = make_memop_idx(op, mmu_idx); glue(glue(helper_ret_st, SUFFIX), MMUSUFFIX)(env, addr, v, oi, retaddr); } else { diff --git a/include/exec/cpu_ldst_useronly_template.h b/include/exec/cpu_ldst_useronly_template.h index dbdc7a845d..e5a3d1983a 100644 --- a/include/exec/cpu_ldst_useronly_template.h +++ b/include/exec/cpu_ldst_useronly_template.h @@ -70,8 +70,8 @@ glue(glue(cpu_ld, USUFFIX), MEMSUFFIX)(CPUArchState *env, abi_ptr ptr) ret = glue(glue(ld, USUFFIX), _p)(g2h(ptr)); clear_helper_retaddr(); #else - uint16_t meminfo = trace_mem_build_info(SHIFT, false, MO_TE, false, - MMU_USER_IDX); + MemOp op = MO_TE | SHIFT; + uint16_t meminfo = trace_mem_get_info(op, MMU_USER_IDX, false); trace_guest_mem_before_exec(env_cpu(env), ptr, meminfo); ret = glue(glue(ld, USUFFIX), _p)(g2h(ptr)); #endif @@ -102,8 +102,8 @@ glue(glue(cpu_lds, SUFFIX), MEMSUFFIX)(CPUArchState *env, abi_ptr ptr) ret = glue(glue(lds, SUFFIX), _p)(g2h(ptr)); clear_helper_retaddr(); #else - uint16_t meminfo = trace_mem_build_info(SHIFT, true, MO_TE, false, - MMU_USER_IDX); + MemOp op = MO_TE | MO_SIGN | SHIFT; + uint16_t meminfo = trace_mem_get_info(op, MMU_USER_IDX, false); trace_guest_mem_before_exec(env_cpu(env), ptr, meminfo); ret = glue(glue(lds, SUFFIX), _p)(g2h(ptr)); qemu_plugin_vcpu_mem_cb(env_cpu(env), ptr, meminfo); @@ -131,8 +131,8 @@ static inline void glue(glue(cpu_st, SUFFIX), MEMSUFFIX)(CPUArchState *env, abi_ptr ptr, RES_TYPE v) { - uint16_t meminfo = trace_mem_build_info(SHIFT, false, MO_TE, true, - MMU_USER_IDX); + MemOp op = MO_TE | SHIFT; + uint16_t meminfo = trace_mem_get_info(op, MMU_USER_IDX, true); trace_guest_mem_before_exec(env_cpu(env), ptr, meminfo); glue(glue(st, SUFFIX), _p)(g2h(ptr), v); qemu_plugin_vcpu_mem_cb(env_cpu(env), ptr, meminfo); From patchwork Mon Dec 16 22:11:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181801 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4926012ile; Mon, 16 Dec 2019 14:12:30 -0800 (PST) X-Google-Smtp-Source: APXvYqwTzlt9x6JX5+e0rTJ6yio136+IITQ22iYUUH4UCgB2IJUFeZ70byum3cm/cROxVC7D5++H X-Received: by 2002:a9d:6647:: with SMTP id q7mr32664047otm.269.1576534350250; Mon, 16 Dec 2019 14:12:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576534350; cv=none; d=google.com; s=arc-20160816; b=v7nT+Q90h3Ez3+YbOX/ePdA0n4ilUi/p9eZoMzxswmm9UIPL7pnblnmyP9RfxZlDBh so4tfOauNHnfFNEhHUPqxgxsVG0SKjmtQnvp5qgPxdCq2xuK2qYjxx4dX92INwngMCxA o0HKmVZcwht8dx+/1aEXEsenhTjW3hgJ7HZSRXb/uYUG2j16fe4bMsjZB4E87BUw2cbk ShgEAUwmf6igx1ALUzqy64GOTspP6ZjyyH6B46ht2LFsrxOrtj0qnHdabPS3BGA537/U EQrGdWpbQ+aBkPhSYjfd54o9mQ//PAWmmgqL0NlVa62EI8gVZWJQbr24H7ytwExx8W9N MnPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=RS/kUrwws8zXejELfRCwC8ziQ//v3quP81JyrfoDA60=; b=NkQub+1ogNjvLGYYIxqXfUJt5Ocvdy/EGl9aparhmVDsVca9hPgkfvp9kb8EQxUSmJ vzPX/zofWfianO5+01MUTdoeWJ9fgZ5XVTAmDeqKMjNyWkKNqk2mGM4CJzjW8X4spuLi EW3OSs6mx6zvGIioCTDNrrBJoY7K7dx/C8C7RJoAQ+2zLz65rb7j9yLI/Bux1KKLGAtJ NSjghDpThoyuefvjXhjAZZ4Xl83QjcDJllNOllXsulwVeU+hFIxD4v3qQYM8nGsG/wGj ZK9k2fGcaAKPL6Sy6RhenwFQN4AXA1YpkHEHh+ukfjzwFkPFU2I+MSQdGCi0jUzhOQ68 zCvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BtctEVPB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r6si11012559otn.216.2019.12.16.14.12.30 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:12:30 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BtctEVPB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybM-0004qE-RW for patch@linaro.org; Mon, 16 Dec 2019 17:12:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36617) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igyb3-0004mC-S4 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igyb2-0006wW-Dq for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:09 -0500 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]:40472) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igyb2-0006wL-5j for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:08 -0500 Received: by mail-pl1-x62c.google.com with SMTP id g6so5111448plp.7 for ; Mon, 16 Dec 2019 14:12:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=RS/kUrwws8zXejELfRCwC8ziQ//v3quP81JyrfoDA60=; b=BtctEVPBfOrzanvikFEs/BY2dC9eQw7rbaheEolEp09XX20azf9Ut/VIMfEw+wF4zj 4rdjfzd7uXoKUMcsZFEvmaLe1muItu6uQ2eRUpS3m4v3IDU3sp5mSb4nUNRrpTdbBbZm 2Ob1bSldsD7xqmZL1V/dX09o8ZdjK6jxSuJQtjRHI95F4pfi6/utScoTx5NO3D0OuoRd TdMYTtyN2tkZCN41wWRlfimdcTR6PXWqGyMWF+Cf+Xy03UCROI/TDgP2JzAkKnXyS36c jm/jfEw2vP8BepnctywdRrQg6m7owMz3H5woln2md2Ihtm/cyn8Eod/6UnjrvBIl8n2l +JBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RS/kUrwws8zXejELfRCwC8ziQ//v3quP81JyrfoDA60=; b=V/FxHGlRACbN/DPU6OPp4Uu33Z7kOsLgILRar9v94/sLpF63+hxoKfrifTjZp0DW7/ XpxDOhf2+pyG2enyOtv3+pYuAUyBTCsP3905cXjb7YvTb+lsk38W/V4pzRSmtaWwJSMa 7d9wpI0+s9URSvU2qcNedW/5FUZKSWY3x/4z595db68tNJEoV7tsnK1EYqOWR7sB8ix8 ffTnJM9H7uw+hrAKUBK4Rgdc/FGQ33jGfzhZXFjULVDfhSWZ/JB0OtptHFu9cpd1NP06 Db30aSUNIEyduBmyEg/DJaAp6kcW/tubLi/xWunFpl2FTtlfqN67q9ugOP8HVPo6ZqNh mC8g== X-Gm-Message-State: APjAAAXYYkHCG1CCXl6GkhrgPvQWdZb7tuQXSDruDsV3SlVReCRIDGE1 3LRHjZ83WYbScxWjMYCqlZdzsPNYGQ0= X-Received: by 2002:a17:90a:fb87:: with SMTP id cp7mr1978705pjb.56.1576534326518; Mon, 16 Dec 2019 14:12:06 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:05 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 03/28] trace: Remove trace_mem_build_info_no_se_[bl]e Date: Mon, 16 Dec 2019 12:11:33 -1000 Message-Id: <20191216221158.29572-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::62c 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" It is easy for the atomic helpers to use trace_mem_build_info directly, without resorting to symbol pasting. For this usage, we cannot use trace_mem_get_info, because the MemOp does not support 16-byte accesses. Signed-off-by: Richard Henderson --- accel/tcg/atomic_template.h | 67 +++++++++++++------------------------ trace/mem-internal.h | 17 ---------- 2 files changed, 24 insertions(+), 60 deletions(-) -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/accel/tcg/atomic_template.h b/accel/tcg/atomic_template.h index 837676231f..26969487d6 100644 --- a/accel/tcg/atomic_template.h +++ b/accel/tcg/atomic_template.h @@ -64,13 +64,10 @@ the ATOMIC_NAME macro, and redefined below. */ #if DATA_SIZE == 1 # define END -# define MEND _be /* either le or be would be fine */ #elif defined(HOST_WORDS_BIGENDIAN) # define END _be -# define MEND _be #else # define END _le -# define MEND _le #endif ABI_TYPE ATOMIC_NAME(cmpxchg)(CPUArchState *env, target_ulong addr, @@ -79,8 +76,8 @@ ABI_TYPE ATOMIC_NAME(cmpxchg)(CPUArchState *env, target_ulong addr, ATOMIC_MMU_DECLS; DATA_TYPE *haddr = ATOMIC_MMU_LOOKUP; DATA_TYPE ret; - uint16_t info = glue(trace_mem_build_info_no_se, MEND)(SHIFT, false, - ATOMIC_MMU_IDX); + uint16_t info = trace_mem_build_info(SHIFT, false, 0, false, + ATOMIC_MMU_IDX); atomic_trace_rmw_pre(env, addr, info); #if DATA_SIZE == 16 @@ -99,8 +96,8 @@ ABI_TYPE ATOMIC_NAME(ld)(CPUArchState *env, target_ulong addr EXTRA_ARGS) { ATOMIC_MMU_DECLS; DATA_TYPE val, *haddr = ATOMIC_MMU_LOOKUP; - uint16_t info = glue(trace_mem_build_info_no_se, MEND)(SHIFT, false, - ATOMIC_MMU_IDX); + uint16_t info = trace_mem_build_info(SHIFT, false, 0, false, + ATOMIC_MMU_IDX); atomic_trace_ld_pre(env, addr, info); val = atomic16_read(haddr); @@ -114,8 +111,8 @@ void ATOMIC_NAME(st)(CPUArchState *env, target_ulong addr, { ATOMIC_MMU_DECLS; DATA_TYPE *haddr = ATOMIC_MMU_LOOKUP; - uint16_t info = glue(trace_mem_build_info_no_se, MEND)(SHIFT, true, - ATOMIC_MMU_IDX); + uint16_t info = trace_mem_build_info(SHIFT, false, 0, true, + ATOMIC_MMU_IDX); atomic_trace_st_pre(env, addr, info); atomic16_set(haddr, val); @@ -130,8 +127,8 @@ ABI_TYPE ATOMIC_NAME(xchg)(CPUArchState *env, target_ulong addr, ATOMIC_MMU_DECLS; DATA_TYPE *haddr = ATOMIC_MMU_LOOKUP; DATA_TYPE ret; - uint16_t info = glue(trace_mem_build_info_no_se, MEND)(SHIFT, false, - ATOMIC_MMU_IDX); + uint16_t info = trace_mem_build_info(SHIFT, false, 0, false, + ATOMIC_MMU_IDX); atomic_trace_rmw_pre(env, addr, info); ret = atomic_xchg__nocheck(haddr, val); @@ -147,10 +144,8 @@ ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, target_ulong addr, \ ATOMIC_MMU_DECLS; \ DATA_TYPE *haddr = ATOMIC_MMU_LOOKUP; \ DATA_TYPE ret; \ - uint16_t info = glue(trace_mem_build_info_no_se, MEND)(SHIFT, \ - false, \ - ATOMIC_MMU_IDX); \ - \ + uint16_t info = trace_mem_build_info(SHIFT, false, 0, false, \ + ATOMIC_MMU_IDX); \ atomic_trace_rmw_pre(env, addr, info); \ ret = atomic_##X(haddr, val); \ ATOMIC_MMU_CLEANUP; \ @@ -183,10 +178,8 @@ ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, target_ulong addr, \ ATOMIC_MMU_DECLS; \ XDATA_TYPE *haddr = ATOMIC_MMU_LOOKUP; \ XDATA_TYPE cmp, old, new, val = xval; \ - uint16_t info = glue(trace_mem_build_info_no_se, MEND)(SHIFT, \ - false, \ - ATOMIC_MMU_IDX); \ - \ + uint16_t info = trace_mem_build_info(SHIFT, false, 0, false, \ + ATOMIC_MMU_IDX); \ atomic_trace_rmw_pre(env, addr, info); \ smp_mb(); \ cmp = atomic_read__nocheck(haddr); \ @@ -213,7 +206,6 @@ GEN_ATOMIC_HELPER_FN(umax_fetch, MAX, DATA_TYPE, new) #endif /* DATA SIZE >= 16 */ #undef END -#undef MEND #if DATA_SIZE > 1 @@ -221,10 +213,8 @@ GEN_ATOMIC_HELPER_FN(umax_fetch, MAX, DATA_TYPE, new) within the ATOMIC_NAME macro. */ #ifdef HOST_WORDS_BIGENDIAN # define END _le -# define MEND _le #else # define END _be -# define MEND _be #endif ABI_TYPE ATOMIC_NAME(cmpxchg)(CPUArchState *env, target_ulong addr, @@ -233,9 +223,8 @@ ABI_TYPE ATOMIC_NAME(cmpxchg)(CPUArchState *env, target_ulong addr, ATOMIC_MMU_DECLS; DATA_TYPE *haddr = ATOMIC_MMU_LOOKUP; DATA_TYPE ret; - uint16_t info = glue(trace_mem_build_info_no_se, MEND)(SHIFT, - false, - ATOMIC_MMU_IDX); + uint16_t info = trace_mem_build_info(SHIFT, false, MO_BSWAP, false, + ATOMIC_MMU_IDX); atomic_trace_rmw_pre(env, addr, info); #if DATA_SIZE == 16 @@ -254,9 +243,8 @@ ABI_TYPE ATOMIC_NAME(ld)(CPUArchState *env, target_ulong addr EXTRA_ARGS) { ATOMIC_MMU_DECLS; DATA_TYPE val, *haddr = ATOMIC_MMU_LOOKUP; - uint16_t info = glue(trace_mem_build_info_no_se, MEND)(SHIFT, - false, - ATOMIC_MMU_IDX); + uint16_t info = trace_mem_build_info(SHIFT, false, MO_BSWAP, false, + ATOMIC_MMU_IDX); atomic_trace_ld_pre(env, addr, info); val = atomic16_read(haddr); @@ -270,9 +258,8 @@ void ATOMIC_NAME(st)(CPUArchState *env, target_ulong addr, { ATOMIC_MMU_DECLS; DATA_TYPE *haddr = ATOMIC_MMU_LOOKUP; - uint16_t info = glue(trace_mem_build_info_no_se, MEND)(SHIFT, - true, - ATOMIC_MMU_IDX); + uint16_t info = trace_mem_build_info(SHIFT, false, MO_BSWAP, true, + ATOMIC_MMU_IDX); val = BSWAP(val); atomic_trace_st_pre(env, addr, info); @@ -289,9 +276,8 @@ ABI_TYPE ATOMIC_NAME(xchg)(CPUArchState *env, target_ulong addr, ATOMIC_MMU_DECLS; DATA_TYPE *haddr = ATOMIC_MMU_LOOKUP; ABI_TYPE ret; - uint16_t info = glue(trace_mem_build_info_no_se, MEND)(SHIFT, - false, - ATOMIC_MMU_IDX); + uint16_t info = trace_mem_build_info(SHIFT, false, MO_BSWAP, false, + ATOMIC_MMU_IDX); atomic_trace_rmw_pre(env, addr, info); ret = atomic_xchg__nocheck(haddr, BSWAP(val)); @@ -307,10 +293,8 @@ ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, target_ulong addr, \ ATOMIC_MMU_DECLS; \ DATA_TYPE *haddr = ATOMIC_MMU_LOOKUP; \ DATA_TYPE ret; \ - uint16_t info = glue(trace_mem_build_info_no_se, MEND)(SHIFT, \ - false, \ - ATOMIC_MMU_IDX); \ - \ + uint16_t info = trace_mem_build_info(SHIFT, false, MO_BSWAP, \ + false, ATOMIC_MMU_IDX); \ atomic_trace_rmw_pre(env, addr, info); \ ret = atomic_##X(haddr, BSWAP(val)); \ ATOMIC_MMU_CLEANUP; \ @@ -341,10 +325,8 @@ ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, target_ulong addr, \ ATOMIC_MMU_DECLS; \ XDATA_TYPE *haddr = ATOMIC_MMU_LOOKUP; \ XDATA_TYPE ldo, ldn, old, new, val = xval; \ - uint16_t info = glue(trace_mem_build_info_no_se, MEND)(SHIFT, \ - false, \ - ATOMIC_MMU_IDX); \ - \ + uint16_t info = trace_mem_build_info(SHIFT, false, MO_BSWAP, \ + false, ATOMIC_MMU_IDX); \ atomic_trace_rmw_pre(env, addr, info); \ smp_mb(); \ ldn = atomic_read__nocheck(haddr); \ @@ -378,7 +360,6 @@ GEN_ATOMIC_HELPER_FN(add_fetch, ADD, DATA_TYPE, new) #endif /* DATA_SIZE >= 16 */ #undef END -#undef MEND #endif /* DATA_SIZE > 1 */ #undef BSWAP diff --git a/trace/mem-internal.h b/trace/mem-internal.h index 0a32aa22ca..8b72b678fa 100644 --- a/trace/mem-internal.h +++ b/trace/mem-internal.h @@ -47,21 +47,4 @@ static inline uint16_t trace_mem_get_info(MemOp op, mmu_idx); } -/* Used by the atomic helpers */ -static inline -uint16_t trace_mem_build_info_no_se_be(int size_shift, bool store, - TCGMemOpIdx oi) -{ - return trace_mem_build_info(size_shift, false, MO_BE, store, - get_mmuidx(oi)); -} - -static inline -uint16_t trace_mem_build_info_no_se_le(int size_shift, bool store, - TCGMemOpIdx oi) -{ - return trace_mem_build_info(size_shift, false, MO_LE, store, - get_mmuidx(oi)); -} - #endif /* TRACE__MEM_INTERNAL_H */ From patchwork Mon Dec 16 22:11:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181804 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4928553ile; Mon, 16 Dec 2019 14:14:50 -0800 (PST) X-Google-Smtp-Source: APXvYqzxIwOOKdAqwEYPOHCSs62xIag7Bmn9jEdjsUz32meJ8NFZRXBcIkQmOYKRqsxrIHkPzMUb X-Received: by 2002:ac8:787:: with SMTP id l7mr1543977qth.99.1576534490809; Mon, 16 Dec 2019 14:14:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576534490; cv=none; d=google.com; s=arc-20160816; b=v+dp3qEd4OrrkctXitZRCtpQRJHRPDh/Sm3IKvrQutsOvtwIdd1ILCfTmd7qmOIrP/ xHK8D9xGWN1syn8o6FG+FbuWjdAifOhs4PUr2Lb+UsxJOrj9b14vAg3izzG3tXEXZ+rT i629w743aXrZpGLu2q9yf6CJ0w4UpBDYThakS/eZYmfbl1u8O+u/qycJ76ba/mJMCY88 SRgktpDJn2x5HlI+rhWTtbhuiCB0ElUUrsslKZDz0FPn/y76GUISCsZSHIP9vXSrJH5W q1pJWM3zWQy1RKf0OqvyDS0hnz0BgeFiY49MSIrpmieIF6ZTzSsaAGjyk9bA+lLtgx2n C9hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=NbXcHmPvccOg4ApdYdFLAPaKmhXfD3r1GQk/f9IlktA=; b=gBo2peYiHh5lVrtJjmn/nRjM4rGYAy3Kh+yaZw6/97JJWGU61IRjGxwwC30ig6F3g3 U6vlxsG2Sa0JyjguP91TfuC8rWd4QMYfXBMRllsIeoRV6PZHr/Fel5hk6QT95BzEKbS2 m2vbSYi30/lRPEz1I+WzJl9UXsCeSRZVy/KbKLsPW2y/sWfWhgcJZS/qEnpsfFcpsxdV STmRBkN7NUvBXvHdoFzYNpFZOSn3iUEhHJXzKioPIP9QFkaAiHlC1qJAg3dtpkEyeM0z eLMmKAn2pOte6fgyv1YEhMIcQiZwQ+P64UUxiyZYmmELQRUN+oGIdFDHgYJUL214ENaw rPvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RXqunFBH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r14si11055426qtn.259.2019.12.16.14.14.50 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:14:50 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RXqunFBH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igydd-0008HA-HB for patch@linaro.org; Mon, 16 Dec 2019 17:14:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36634) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igyb5-0004oy-Qs for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igyb3-0006y5-Pp for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:11 -0500 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:41189) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igyb3-0006wk-Hj for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:09 -0500 Received: by mail-pf1-x443.google.com with SMTP id s18so6375020pfd.8 for ; Mon, 16 Dec 2019 14:12:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=NbXcHmPvccOg4ApdYdFLAPaKmhXfD3r1GQk/f9IlktA=; b=RXqunFBH/hWJW+YR1NpAkTmn/s5ZVCPMAOkp/Y79IjYrfEJjzFBJloY9yb3ORi0CHY JQ3U5E2Dw0Kxgt9HKBG6Z2uJvg3MhtTf0bbbyOHr6Mgrceobyt0WrM81Pvx6+6UkHib9 em5A9ac173AYr1eAiLPs+inUqd3zHq6nDauBT1T/X+NDU5g8p6li854Zc6WiUNCaq7Zh 62PF72ej6LPIxjnJdAgVEsouZ4QftSCtqgDUS3DJ+v0c0xB3wj4TuLC6hz5cxKF1soBX 2DrkAwUQaYmIrvJ1+xLqSUdlHSFr/lrjzUfNMZ5/jeSi/Osa/I9uUZJekvsOwQUAeVDU 88VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NbXcHmPvccOg4ApdYdFLAPaKmhXfD3r1GQk/f9IlktA=; b=Aby9PTKjiXG3cXZgGToaZg4Ec+0xCTP28axMp1WlMHiNfVMI93vpqj1a9WfSkYl58F 2XdaVjktyvlWHRrWa/NuLLL5QBN0k8m96vWbnYJ4Flm+vT8qlBYUqE48ScoeTxkUXTIa w/1xNdDebKp9fQd56OCMK2TWFsUN6kJw45aQbw6Ys/B0n4+3lNHmh8c1icNQ3u1dOrPI wSAtzMlW5s6PUkZlvy5FCvkuhJmmH0X7J8uBSTMtvAMy3g/Qh11e0WR3vgRN+1LyxwpA TdSbn17mKyHWXgrQ4bmxyRJICTg3dvKTEKyhJXJYK/kKD8InykQo4NnceOMk3RwGBZxu AMrw== X-Gm-Message-State: APjAAAVF8Qr6sRvxkWhx+kEYp8JtQx8LMppAn7Rx4UEyFKnJeeDvdQBE OGTAuTpEjFpm71ZDX36nkpnueNQXIxg= X-Received: by 2002:a63:f814:: with SMTP id n20mr20920041pgh.318.1576534328037; Mon, 16 Dec 2019 14:12:08 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:07 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 04/28] cputlb: Move body of cpu_ldst_template.h out of line Date: Mon, 16 Dec 2019 12:11:34 -1000 Message-Id: <20191216221158.29572-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::443 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" With the tracing hooks, the inline functions are no longer so simple. Once out-of-line, the current tlb_entry lookup is redundant with the one in the main load/store_helper. This also begins the introduction of a new target facing interface, with suffix *_mmuidx_ra. This is not yet official because the interface is not done for user-only. Use abi_ptr instead of target_ulong in preparation for user-only; the two types are identical for softmmu. What remains in cpu_ldst_template.h are the expansions for _code, _data, and MMU_MODE_SUFFIX. Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 25 ++++++- include/exec/cpu_ldst_template.h | 125 +++++++------------------------ accel/tcg/cputlb.c | 116 ++++++++++++++++++++++++++++ 3 files changed, 166 insertions(+), 100 deletions(-) -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index fd499f7e2f..cf8af36dbc 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -152,7 +152,7 @@ static inline void clear_helper_retaddr(void) #else -/* The memory helpers for tcg-generated code need tcg_target_long etc. */ +/* Needed for TCG_OVERSIZED_GUEST */ #include "tcg.h" static inline target_ulong tlb_addr_write(const CPUTLBEntry *entry) @@ -185,6 +185,29 @@ static inline CPUTLBEntry *tlb_entry(CPUArchState *env, uintptr_t mmu_idx, return &env_tlb(env)->f[mmu_idx].table[tlb_index(env, mmu_idx, addr)]; } +uint32_t cpu_ldub_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra); +uint32_t cpu_lduw_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra); +uint32_t cpu_ldl_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra); +uint64_t cpu_ldq_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra); + +int cpu_ldsb_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra); +int cpu_ldsw_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra); + +void cpu_stb_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, + int mmu_idx, uintptr_t retaddr); +void cpu_stw_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, + int mmu_idx, uintptr_t retaddr); +void cpu_stl_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, + int mmu_idx, uintptr_t retaddr); +void cpu_stq_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint64_t val, + int mmu_idx, uintptr_t retaddr); + #ifdef MMU_MODE0_SUFFIX #define CPU_MMU_INDEX 0 #define MEMSUFFIX MMU_MODE0_SUFFIX diff --git a/include/exec/cpu_ldst_template.h b/include/exec/cpu_ldst_template.h index 0ad5de3ef9..ea39e29c19 100644 --- a/include/exec/cpu_ldst_template.h +++ b/include/exec/cpu_ldst_template.h @@ -24,13 +24,6 @@ * License along with this library; if not, see . */ -#if !defined(SOFTMMU_CODE_ACCESS) -#include "trace-root.h" -#endif - -#include "qemu/plugin.h" -#include "trace/mem.h" - #if DATA_SIZE == 8 #define SUFFIX q #define USUFFIX q @@ -63,56 +56,40 @@ #define RES_TYPE uint32_t #endif +/* generic load/store macros */ + #ifdef SOFTMMU_CODE_ACCESS -#define ADDR_READ addr_code -#define MMUSUFFIX _cmmu -#define URETSUFFIX USUFFIX -#define SRETSUFFIX glue(s, SUFFIX) -#else -#define ADDR_READ addr_read -#define MMUSUFFIX _mmu -#define URETSUFFIX USUFFIX -#define SRETSUFFIX glue(s, SUFFIX) + +static inline RES_TYPE +glue(glue(cpu_ld, USUFFIX), _code)(CPUArchState *env, target_ulong ptr) +{ + TCGMemOpIdx oi = make_memop_idx(MO_TE | SHIFT, CPU_MMU_INDEX); + return glue(glue(helper_ret_ld, USUFFIX), _cmmu)(env, ptr, oi, 0); +} + +#if DATA_SIZE <= 2 +static inline int +glue(glue(cpu_lds, SUFFIX), _code)(CPUArchState *env, target_ulong ptr) +{ + return (DATA_STYPE)glue(glue(cpu_ld, USUFFIX), _code)(env, ptr); +} #endif -/* generic load/store macros */ +#else static inline RES_TYPE glue(glue(glue(cpu_ld, USUFFIX), MEMSUFFIX), _ra)(CPUArchState *env, target_ulong ptr, uintptr_t retaddr) { - CPUTLBEntry *entry; - RES_TYPE res; - target_ulong addr; - int mmu_idx = CPU_MMU_INDEX; - MemOp op = MO_TE | SHIFT; -#if !defined(SOFTMMU_CODE_ACCESS) - uint16_t meminfo = trace_mem_get_info(op, mmu_idx, false); - trace_guest_mem_before_exec(env_cpu(env), ptr, meminfo); -#endif - - addr = ptr; - entry = tlb_entry(env, mmu_idx, addr); - if (unlikely(entry->ADDR_READ != - (addr & (TARGET_PAGE_MASK | (DATA_SIZE - 1))))) { - TCGMemOpIdx oi = make_memop_idx(op, mmu_idx); - res = glue(glue(helper_ret_ld, URETSUFFIX), MMUSUFFIX)(env, addr, - oi, retaddr); - } else { - uintptr_t hostaddr = addr + entry->addend; - res = glue(glue(ld, USUFFIX), _p)((uint8_t *)hostaddr); - } -#ifndef SOFTMMU_CODE_ACCESS - qemu_plugin_vcpu_mem_cb(env_cpu(env), ptr, meminfo); -#endif - return res; + return glue(glue(cpu_ld, USUFFIX), _mmuidx_ra)(env, ptr, CPU_MMU_INDEX, + retaddr); } static inline RES_TYPE glue(glue(cpu_ld, USUFFIX), MEMSUFFIX)(CPUArchState *env, target_ulong ptr) { - return glue(glue(glue(cpu_ld, USUFFIX), MEMSUFFIX), _ra)(env, ptr, 0); + return glue(glue(cpu_ld, USUFFIX), _mmuidx_ra)(env, ptr, CPU_MMU_INDEX, 0); } #if DATA_SIZE <= 2 @@ -121,42 +98,17 @@ glue(glue(glue(cpu_lds, SUFFIX), MEMSUFFIX), _ra)(CPUArchState *env, target_ulong ptr, uintptr_t retaddr) { - CPUTLBEntry *entry; - int res; - target_ulong addr; - int mmu_idx = CPU_MMU_INDEX; - MemOp op = MO_TE | MO_SIGN | SHIFT; -#ifndef SOFTMMU_CODE_ACCESS - uint16_t meminfo = trace_mem_get_info(op, mmu_idx, false); - trace_guest_mem_before_exec(env_cpu(env), ptr, meminfo); -#endif - - addr = ptr; - entry = tlb_entry(env, mmu_idx, addr); - if (unlikely(entry->ADDR_READ != - (addr & (TARGET_PAGE_MASK | (DATA_SIZE - 1))))) { - TCGMemOpIdx oi = make_memop_idx(op & ~MO_SIGN, mmu_idx); - res = (DATA_STYPE)glue(glue(helper_ret_ld, SRETSUFFIX), - MMUSUFFIX)(env, addr, oi, retaddr); - } else { - uintptr_t hostaddr = addr + entry->addend; - res = glue(glue(lds, SUFFIX), _p)((uint8_t *)hostaddr); - } -#ifndef SOFTMMU_CODE_ACCESS - qemu_plugin_vcpu_mem_cb(env_cpu(env), ptr, meminfo); -#endif - return res; + return glue(glue(cpu_lds, SUFFIX), _mmuidx_ra)(env, ptr, CPU_MMU_INDEX, + retaddr); } static inline int glue(glue(cpu_lds, SUFFIX), MEMSUFFIX)(CPUArchState *env, target_ulong ptr) { - return glue(glue(glue(cpu_lds, SUFFIX), MEMSUFFIX), _ra)(env, ptr, 0); + return glue(glue(cpu_lds, SUFFIX), _mmuidx_ra)(env, ptr, CPU_MMU_INDEX, 0); } #endif -#ifndef SOFTMMU_CODE_ACCESS - /* generic store macro */ static inline void @@ -164,36 +116,15 @@ glue(glue(glue(cpu_st, SUFFIX), MEMSUFFIX), _ra)(CPUArchState *env, target_ulong ptr, RES_TYPE v, uintptr_t retaddr) { - CPUTLBEntry *entry; - target_ulong addr; - int mmu_idx = CPU_MMU_INDEX; - MemOp op = MO_TE | SHIFT; -#if !defined(SOFTMMU_CODE_ACCESS) - uint16_t meminfo = trace_mem_get_info(op, mmu_idx, true); - trace_guest_mem_before_exec(env_cpu(env), ptr, meminfo); -#endif - - addr = ptr; - entry = tlb_entry(env, mmu_idx, addr); - if (unlikely(tlb_addr_write(entry) != - (addr & (TARGET_PAGE_MASK | (DATA_SIZE - 1))))) { - TCGMemOpIdx oi = make_memop_idx(op, mmu_idx); - glue(glue(helper_ret_st, SUFFIX), MMUSUFFIX)(env, addr, v, oi, - retaddr); - } else { - uintptr_t hostaddr = addr + entry->addend; - glue(glue(st, SUFFIX), _p)((uint8_t *)hostaddr, v); - } -#ifndef SOFTMMU_CODE_ACCESS - qemu_plugin_vcpu_mem_cb(env_cpu(env), ptr, meminfo); -#endif + glue(glue(cpu_st, SUFFIX), _mmuidx_ra)(env, ptr, v, CPU_MMU_INDEX, + retaddr); } static inline void glue(glue(cpu_st, SUFFIX), MEMSUFFIX)(CPUArchState *env, target_ulong ptr, RES_TYPE v) { - glue(glue(glue(cpu_st, SUFFIX), MEMSUFFIX), _ra)(env, ptr, v, 0); + glue(glue(cpu_st, SUFFIX), _mmuidx_ra)(env, ptr, v, CPU_MMU_INDEX, 0); } #endif /* !SOFTMMU_CODE_ACCESS */ @@ -204,8 +135,4 @@ glue(glue(cpu_st, SUFFIX), MEMSUFFIX)(CPUArchState *env, target_ulong ptr, #undef SUFFIX #undef USUFFIX #undef DATA_SIZE -#undef MMUSUFFIX -#undef ADDR_READ -#undef URETSUFFIX -#undef SRETSUFFIX #undef SHIFT diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 98221948d6..ddd19718bf 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -34,6 +34,9 @@ #include "qemu/atomic.h" #include "qemu/atomic128.h" #include "translate-all.h" +#include "trace-root.h" +#include "qemu/plugin.h" +#include "trace/mem.h" #ifdef CONFIG_PLUGIN #include "qemu/plugin-memory.h" #endif @@ -1625,6 +1628,75 @@ tcg_target_ulong helper_be_ldsl_mmu(CPUArchState *env, target_ulong addr, return (int32_t)helper_be_ldul_mmu(env, addr, oi, retaddr); } +/* + * Load helpers for cpu_ldst.h. + */ + +static inline uint64_t cpu_load_helper(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t retaddr, + MemOp op, FullLoadHelper *full_load) +{ + uint16_t meminfo; + TCGMemOpIdx oi; + uint64_t ret; + + meminfo = trace_mem_get_info(op, mmu_idx, false); + trace_guest_mem_before_exec(env_cpu(env), addr, meminfo); + + op &= ~MO_SIGN; + oi = make_memop_idx(op, mmu_idx); + ret = full_load(env, addr, oi, retaddr); + + qemu_plugin_vcpu_mem_cb(env_cpu(env), addr, meminfo); + + return ret; +} + +uint32_t cpu_ldub_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + return cpu_load_helper(env, addr, mmu_idx, ra, MO_UB, full_ldub_mmu); +} + +int cpu_ldsb_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + return (int8_t)cpu_load_helper(env, addr, mmu_idx, ra, MO_SB, + full_ldub_mmu); +} + +uint32_t cpu_lduw_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + return cpu_load_helper(env, addr, mmu_idx, ra, MO_TEUW, + MO_TE == MO_LE + ? full_le_lduw_mmu : full_be_lduw_mmu); +} + +int cpu_ldsw_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + return (int16_t)cpu_load_helper(env, addr, mmu_idx, ra, MO_TESW, + MO_TE == MO_LE + ? full_le_lduw_mmu : full_be_lduw_mmu); +} + +uint32_t cpu_ldl_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + return cpu_load_helper(env, addr, mmu_idx, ra, MO_TEUL, + MO_TE == MO_LE + ? full_le_ldul_mmu : full_be_ldul_mmu); +} + +uint64_t cpu_ldq_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + return cpu_load_helper(env, addr, mmu_idx, ra, MO_TEQ, + MO_TE == MO_LE + ? helper_le_ldq_mmu : helper_be_ldq_mmu); +} + /* * Store Helpers */ @@ -1854,6 +1926,50 @@ void helper_be_stq_mmu(CPUArchState *env, target_ulong addr, uint64_t val, store_helper(env, addr, val, oi, retaddr, MO_BEQ); } +/* + * Store Helpers for cpu_ldst.h + */ + +static inline void QEMU_ALWAYS_INLINE +cpu_store_helper(CPUArchState *env, target_ulong addr, uint64_t val, + int mmu_idx, uintptr_t retaddr, MemOp op) +{ + TCGMemOpIdx oi; + uint16_t meminfo; + + meminfo = trace_mem_get_info(op, mmu_idx, true); + trace_guest_mem_before_exec(env_cpu(env), addr, meminfo); + + oi = make_memop_idx(op, mmu_idx); + store_helper(env, addr, val, oi, retaddr, op); + + qemu_plugin_vcpu_mem_cb(env_cpu(env), addr, meminfo); +} + +void cpu_stb_mmuidx_ra(CPUArchState *env, target_ulong addr, uint32_t val, + int mmu_idx, uintptr_t retaddr) +{ + cpu_store_helper(env, addr, val, mmu_idx, retaddr, MO_UB); +} + +void cpu_stw_mmuidx_ra(CPUArchState *env, target_ulong addr, uint32_t val, + int mmu_idx, uintptr_t retaddr) +{ + cpu_store_helper(env, addr, val, mmu_idx, retaddr, MO_TEUW); +} + +void cpu_stl_mmuidx_ra(CPUArchState *env, target_ulong addr, uint32_t val, + int mmu_idx, uintptr_t retaddr) +{ + cpu_store_helper(env, addr, val, mmu_idx, retaddr, MO_TEUL); +} + +void cpu_stq_mmuidx_ra(CPUArchState *env, target_ulong addr, uint64_t val, + int mmu_idx, uintptr_t retaddr) +{ + cpu_store_helper(env, addr, val, mmu_idx, retaddr, MO_TEQ); +} + /* First set of helpers allows passing in of OI and RETADDR. This makes them callable from other helpers. */ From patchwork Mon Dec 16 22:11:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181807 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4931811ile; Mon, 16 Dec 2019 14:17:56 -0800 (PST) X-Google-Smtp-Source: APXvYqx8AkxyadR0GNjQmdWVxv8Sp1bCAwlGekKyETHMmiTo28+jZmqPXs9eCOwZR6FeMwmbAejd X-Received: by 2002:aca:c645:: with SMTP id w66mr703334oif.43.1576534676288; Mon, 16 Dec 2019 14:17:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576534676; cv=none; d=google.com; s=arc-20160816; b=aQVcwqMOfm4n5/1ZGgultbjkuXS7kR7oymdI3Tc/sSGMbQW2e31aeYjT87ZFUeD85Q uJUXIyZhTtbtACG50SJRO/BPzstKgKzkb0n3QH9+0pjnFOkVECxnA4zwvTuBJK35U9il yjy1iyL6EQVEKIxoj5BEy6oEf/qk6vjmJ3U/FQoYDoi30FJWSPgjMvez7FCplupOPN1F JQ1XgqgfSWmdHc37cFbq5XsU7R4hdcuZa04y1JhfIz50zuR07bjxuwy2vQ8zicxZDCy4 AKhTVKOV9HPiyT+rnRojdmU91DrDtDcO0yjqIdy8Y9tbI99NvcZkIgqU9TDZR6ea+9rZ iX5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=LZjfj7f7LiMXr9N5B8njH/lhRDK1JnIrdikl5tdqwbU=; b=hgeEzj+MZgac8I2J3z99vU+YU83GJHYCAtdlu0hOm0n8dBkW1sSVSkm/Edbtd9OiII DaPAoV7ivv1aEzHa1lArdfchhT323wG7w0BTsTXX2TI8t+ccZF+yORs6MsLk456pZrzA Y4+bYzuueTUYRPgjodrbblRRG25dIoE+kGhwnJoxsW9EmFnwt6Srov9o0rZS5q9EmrZs mWSbh+abuEc373v1sDLq2bDju3Fh/bxdmUZ7m2zkdha8IMj4ngHwy4hw9fRuy9H5lxGO SmJxPoQPorMVeLwWw20DI1T7eevCKgydArMTnUOPTTWVcddCnGPZR3CkOpD4pm0APeUc 3KeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tBtwE3Lu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x7si11308277oia.165.2019.12.16.14.17.56 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:17:56 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tBtwE3Lu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igygc-0003IL-Th for patch@linaro.org; Mon, 16 Dec 2019 17:17:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36641) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igyb6-0004qL-I4 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igyb5-0006zU-8n for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:12 -0500 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:38442) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igyb5-0006zM-30 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:11 -0500 Received: by mail-pg1-x543.google.com with SMTP id a33so4500417pgm.5 for ; Mon, 16 Dec 2019 14:12:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=LZjfj7f7LiMXr9N5B8njH/lhRDK1JnIrdikl5tdqwbU=; b=tBtwE3Luzpx99iyXa1B18fGUgCPrg1ftkjeQ8PHIDqiOc6Zbh716zAL7gEeLtx1fAO fB5k5pF6eLsNxcTdaGqGdpafX2uRyYNagaO08Ea7ghtVoIHaR7c7E2l4VvU3Y93tCcPx 47V08FW/4EkQqMmHfZ2epFhrN1KZp7PumR79OihzCFHl3nEYtKfVKMpcN+x0Hvl3yrGK wKwnJJey2a4RmQ7BOJR5AKvG4Dg9WGy0W4tn4LS6G12BDSDjsvH8VsrMjFV2Lyfdd4bh eMEE7E2jxKb0U+hk9WObnp/8WESuroPCl4Np3o4sabr5i1HTDWnEIcf80VSRj9CpDo+E ERCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LZjfj7f7LiMXr9N5B8njH/lhRDK1JnIrdikl5tdqwbU=; b=o012W0CnY0d6PK482iIkZWXt2yS44SshXnzn1/LPh2eE4f+g89d6oHNz7SmQTTbQuk vHQw+mv9d3gc6ewpYuli1y90ShAo9dE7pLqp6Bb8CzHFW1QfHUaaF0a2e8LUQL28DbOX bArmLkYMfZFumq7d9dkscR7+L1ZQOZzKzb407SfEjZsOlD82ctCoOd9rhbTcPz3/6PME ATSLtUZX1zY/cpZ2iR9JRqENqNnljVstjsFpMDI1vbhLNICjnRy8tZScg+xwfCHVvWGE aLXQpnVxTvD1cFsuIQoJ5qVpSKgl46RVPgdssb7O5ShIx1uNB7VzATrSPhwptOkg0DUn rowQ== X-Gm-Message-State: APjAAAUho4DQTXa4vQwzIjL5HHpeEzVqM6gxVbUhD9kdF0NQHX/Ifpdw W04IW1WpQi3AzkRT8OrPMnTDVjm52OA= X-Received: by 2002:a65:530d:: with SMTP id m13mr21246848pgq.351.1576534329663; Mon, 16 Dec 2019 14:12:09 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:08 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 05/28] translator: Use cpu_ld*_code instead of open-coding Date: Mon, 16 Dec 2019 12:11:35 -1000 Message-Id: <20191216221158.29572-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::543 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The DO_LOAD macros replicate the distinction already performed by the cpu_ldst.h functions. Use them. Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 11 --------- include/exec/translator.h | 48 +++++++++++---------------------------- 2 files changed, 13 insertions(+), 46 deletions(-) -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index cf8af36dbc..399ff6c3da 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -129,11 +129,6 @@ static inline void clear_helper_retaddr(void) #include "exec/cpu_ldst_useronly_template.h" #undef MEMSUFFIX -/* - * Code access is deprecated in favour of translator_ld* functions - * (see translator.h). However there are still users that need to - * converted so for now these stay. - */ #define MEMSUFFIX _code #define CODE_ACCESS #define DATA_SIZE 1 @@ -455,12 +450,6 @@ void cpu_stq_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint64_t val, #undef CPU_MMU_INDEX #undef MEMSUFFIX -/* - * Code access is deprecated in favour of translator_ld* functions - * (see translator.h). However there are still users that need to - * converted so for now these stay. - */ - #define CPU_MMU_INDEX (cpu_mmu_index(env, true)) #define MEMSUFFIX _code #define SOFTMMU_CODE_ACCESS diff --git a/include/exec/translator.h b/include/exec/translator.h index 459dd72aab..638e1529c5 100644 --- a/include/exec/translator.h +++ b/include/exec/translator.h @@ -148,41 +148,19 @@ void translator_loop_temp_check(DisasContextBase *db); /* * Translator Load Functions * - * These are intended to replace the old cpu_ld*_code functions and - * are mandatory for front-ends that have been migrated to the common - * translator_loop. These functions are only intended to be called - * from the translation stage and should not be called from helper - * functions. Those functions should be converted to encode the - * relevant information at translation time. + * These are intended to replace the direct usage of the cpu_ld*_code + * functions and are mandatory for front-ends that have been migrated + * to the common translator_loop. These functions are only intended + * to be called from the translation stage and should not be called + * from helper functions. Those functions should be converted to encode + * the relevant information at translation time. */ -#ifdef CONFIG_USER_ONLY - -#define DO_LOAD(type, name, shift) \ - do { \ - set_helper_retaddr(1); \ - ret = name ## _p(g2h(pc)); \ - clear_helper_retaddr(); \ - } while (0) - -#else - -#define DO_LOAD(type, name, shift) \ - do { \ - int mmu_idx = cpu_mmu_index(env, true); \ - TCGMemOpIdx oi = make_memop_idx(shift, mmu_idx); \ - ret = helper_ret_ ## name ## _cmmu(env, pc, oi, 0); \ - } while (0) - -#endif - -#define GEN_TRANSLATOR_LD(fullname, name, type, shift, swap_fn) \ +#define GEN_TRANSLATOR_LD(fullname, type, load_fn, swap_fn) \ static inline type \ fullname ## _swap(CPUArchState *env, abi_ptr pc, bool do_swap) \ { \ - type ret; \ - DO_LOAD(type, name, shift); \ - \ + type ret = load_fn(env, pc); \ if (do_swap) { \ ret = swap_fn(ret); \ } \ @@ -195,11 +173,11 @@ void translator_loop_temp_check(DisasContextBase *db); return fullname ## _swap(env, pc, false); \ } -GEN_TRANSLATOR_LD(translator_ldub, ldub, uint8_t, 0, /* no swap */ ) -GEN_TRANSLATOR_LD(translator_ldsw, ldsw, int16_t, 1, bswap16) -GEN_TRANSLATOR_LD(translator_lduw, lduw, uint16_t, 1, bswap16) -GEN_TRANSLATOR_LD(translator_ldl, ldl, uint32_t, 2, bswap32) -GEN_TRANSLATOR_LD(translator_ldq, ldq, uint64_t, 3, bswap64) +GEN_TRANSLATOR_LD(translator_ldub, uint8_t, cpu_ldub_code, /* no swap */) +GEN_TRANSLATOR_LD(translator_ldsw, int16_t, cpu_ldsw_code, bswap16) +GEN_TRANSLATOR_LD(translator_lduw, uint16_t, cpu_lduw_code, bswap16) +GEN_TRANSLATOR_LD(translator_ldl, uint32_t, cpu_ldl_code, bswap32) +GEN_TRANSLATOR_LD(translator_ldq, uint64_t, cpu_ldq_code, bswap64) #undef GEN_TRANSLATOR_LD #endif /* EXEC__TRANSLATOR_H */ From patchwork Mon Dec 16 22:11:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181805 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4928619ile; Mon, 16 Dec 2019 14:14:53 -0800 (PST) X-Google-Smtp-Source: APXvYqyuTREsu+yiaSyXNlPb9SuWkuEegrTZ2zalrPM3sTa6M6p7/oF/ZPGXNpgp3zEc6xzDVCY7 X-Received: by 2002:a0c:fa4b:: with SMTP id k11mr1671776qvo.55.1576534493806; Mon, 16 Dec 2019 14:14:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576534493; cv=none; d=google.com; s=arc-20160816; b=MabxNaUCGRALpeG06IsNf7lA/58zAnRgWFx0w6oNiCGEWh480beEKZrySYv74VYxBp cjMXoTgfC6vZp59yqU1FQj1Ykn1sk2GL+/q9jTUpAUAuwffRMNtzxbaujFxyclLUL8Sk lGiXBKjJESp0O04jpsY9EVNEP9JXp0djY3P50dtHBYQzujTVBwJjByvxmOspU11oCn2A wSuHZYPjqqNaSX3tUA9RqRx2B2ViWrpdjPHY5CO30KriuwVc/OPRTTADPYBjAIRa+1yF 28kNFpifSOYpBZofLxX8VmSxEIR5ZGvTKPLEqLaSmhVMcPkrzuGudWY19U5GNFyAAoLp a72w== 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=uB1yLwtWzwXzHBHtzMIQQis21sgQatB5l68T1HO/TXw=; b=OsF4tnHNINhg1ibOYd7sOLq3fRDGRErPcZhxGJuJR3GwQH5BYl+IDTQP0knRNfRGje JYxtxl6MCWCwDrJ1jw3sCm/kbySzObqlRsKzTkcA3WCJ+XJlgMV66LDkxXn9HA+ZV5es 4p0VMfjkZVnhoXEi71ieihfn7E84siZXp8RAyCjc44TWCKyddV9N2l8yX1v/DHjySLEa mZ4NIwVqY6kN4VCl1XHWrQJC72BT0sCrK8K2qKup+zQqCN7j5Chk5WgFprylPi7PzTdH iIUl9K9AU2vhnzM/SUh3qMmDbiiFRPVjywX6m22unbrLMEN+xJGodoCwqXAFH+t4glZf qTrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uMBhtMfd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c1si10697926qtm.165.2019.12.16.14.14.53 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:14:53 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uMBhtMfd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igydg-0008Oh-Sv for patch@linaro.org; Mon, 16 Dec 2019 17:14:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36666) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igyb8-0004t9-Q1 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igyb6-00070N-Vc for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:14 -0500 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:41848) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igyb6-0006zy-Ne for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:12 -0500 Received: by mail-pg1-x541.google.com with SMTP id x8so4494282pgk.8 for ; Mon, 16 Dec 2019 14:12:12 -0800 (PST) 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=uB1yLwtWzwXzHBHtzMIQQis21sgQatB5l68T1HO/TXw=; b=uMBhtMfd8rigRwDaQd0LZZZ1zMBdx6bCQ3JDEPqM5IbmHb3xCnPQZMFmKPWIPWdJ7m 5m/qsKmAVXC6pPSglsD/dg0aDpr8wX/cSXvL3knCoiXzXA1rHhwoR6IT3Tab+emR1bhi 1UXicdCE+YV97aw8V1iN+ro9LZvgrqhaI8geqiCLMUW3kAHtpCpzdHF6ldNBnjBAx+Xq MAnQekIKmM9D23+X3lY3CEHB6x+Wp44kWDLDZ/t3re5yBIzdYLLfWdas3WKfo+12rVin lqP1JIqPmbcLRhI5WmtpIBXbevGk6+LxlTKchQMugssmNM45b6xpiBKhh19cTxA5kCBT f9Aw== 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=uB1yLwtWzwXzHBHtzMIQQis21sgQatB5l68T1HO/TXw=; b=hFn/O5HjlsIcpO9eeBxnxH+jBGn9kNvLvOIsU6Pu2esorH8fgo9Nhi75z9F6sEOVzA 9a+5xRQ+J6axBvG2xmSBahXMCfnr0kz0RhB9NsbZ8hODVxApO6OW/QyBQFDBSvVE9bnh Nsm2xD9bpAcRxf14XmzFBIgg3nOb3gnihOoAsf1NNX/htaG0fvbIv6aekmYurSXK0nsX FeKjySGKELf3D1kB8SDhpdf4BMHY2lq6l9EZy4KcN2gUOCaUAEqnxln3G4Qm6WNPoF66 ZkUc5ReVlawKLgEVjQA1ro8bwrgbVVolWLBh5WhdPTMrbrhZdNoqlwV1UKOVMwYHE9kP WE7g== X-Gm-Message-State: APjAAAW5pguKvXogTdd0xQjRgsXjh1lcomVdv6Cw7AfnvkYUKN6yr29q lgIKvaSDkUKGgtX3sduJ+gtGmWahOs8= X-Received: by 2002:a63:f844:: with SMTP id v4mr20627254pgj.71.1576534331237; Mon, 16 Dec 2019 14:12:11 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:10 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 06/28] cputlb: Rename helper_ret_ld*_cmmu to cpu_ld*_code Date: Mon, 16 Dec 2019 12:11:36 -1000 Message-Id: <20191216221158.29572-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::541 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: Aleksandar Markovic Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" There are no uses of the *_cmmu names other than the bare wrapping within the *_code inlines. Therefore rename the functions so we can drop the inlines. Use abi_ptr instead of target_ulong in preparation for user-only; the two types are identical for softmmu. Reviewed-by: Aleksandar Markovic Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 29 ++++------ include/exec/cpu_ldst_template.h | 21 ------- tcg/tcg.h | 29 ---------- accel/tcg/cputlb.c | 94 ++++++++------------------------ docs/devel/loads-stores.rst | 4 +- 5 files changed, 36 insertions(+), 141 deletions(-) -- 2.20.1 diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index 399ff6c3da..ef59ed61e4 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -450,25 +450,20 @@ void cpu_stq_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint64_t val, #undef CPU_MMU_INDEX #undef MEMSUFFIX -#define CPU_MMU_INDEX (cpu_mmu_index(env, true)) -#define MEMSUFFIX _code -#define SOFTMMU_CODE_ACCESS +uint32_t cpu_ldub_code(CPUArchState *env, abi_ptr addr); +uint32_t cpu_lduw_code(CPUArchState *env, abi_ptr addr); +uint32_t cpu_ldl_code(CPUArchState *env, abi_ptr addr); +uint64_t cpu_ldq_code(CPUArchState *env, abi_ptr addr); -#define DATA_SIZE 1 -#include "exec/cpu_ldst_template.h" +static inline int cpu_ldsb_code(CPUArchState *env, abi_ptr addr) +{ + return (int8_t)cpu_ldub_code(env, addr); +} -#define DATA_SIZE 2 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 4 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 8 -#include "exec/cpu_ldst_template.h" - -#undef CPU_MMU_INDEX -#undef MEMSUFFIX -#undef SOFTMMU_CODE_ACCESS +static inline int cpu_ldsw_code(CPUArchState *env, abi_ptr addr) +{ + return (int16_t)cpu_lduw_code(env, addr); +} #endif /* defined(CONFIG_USER_ONLY) */ diff --git a/include/exec/cpu_ldst_template.h b/include/exec/cpu_ldst_template.h index ea39e29c19..e400979f23 100644 --- a/include/exec/cpu_ldst_template.h +++ b/include/exec/cpu_ldst_template.h @@ -58,25 +58,6 @@ /* generic load/store macros */ -#ifdef SOFTMMU_CODE_ACCESS - -static inline RES_TYPE -glue(glue(cpu_ld, USUFFIX), _code)(CPUArchState *env, target_ulong ptr) -{ - TCGMemOpIdx oi = make_memop_idx(MO_TE | SHIFT, CPU_MMU_INDEX); - return glue(glue(helper_ret_ld, USUFFIX), _cmmu)(env, ptr, oi, 0); -} - -#if DATA_SIZE <= 2 -static inline int -glue(glue(cpu_lds, SUFFIX), _code)(CPUArchState *env, target_ulong ptr) -{ - return (DATA_STYPE)glue(glue(cpu_ld, USUFFIX), _code)(env, ptr); -} -#endif - -#else - static inline RES_TYPE glue(glue(glue(cpu_ld, USUFFIX), MEMSUFFIX), _ra)(CPUArchState *env, target_ulong ptr, @@ -127,8 +108,6 @@ glue(glue(cpu_st, SUFFIX), MEMSUFFIX)(CPUArchState *env, target_ulong ptr, glue(glue(cpu_st, SUFFIX), _mmuidx_ra)(env, ptr, v, CPU_MMU_INDEX, 0); } -#endif /* !SOFTMMU_CODE_ACCESS */ - #undef RES_TYPE #undef DATA_TYPE #undef DATA_STYPE diff --git a/tcg/tcg.h b/tcg/tcg.h index 92ca10dffc..3b4f79301c 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -1290,27 +1290,6 @@ void helper_be_stl_mmu(CPUArchState *env, target_ulong addr, uint32_t val, void helper_be_stq_mmu(CPUArchState *env, target_ulong addr, uint64_t val, TCGMemOpIdx oi, uintptr_t retaddr); -uint8_t helper_ret_ldub_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr); -int8_t helper_ret_ldsb_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr); -uint16_t helper_le_lduw_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr); -int16_t helper_le_ldsw_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr); -uint32_t helper_le_ldl_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr); -uint64_t helper_le_ldq_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr); -uint16_t helper_be_lduw_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr); -int16_t helper_be_ldsw_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr); -uint32_t helper_be_ldl_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr); -uint64_t helper_be_ldq_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr); - /* Temporary aliases until backends are converted. */ #ifdef TARGET_WORDS_BIGENDIAN # define helper_ret_ldsw_mmu helper_be_ldsw_mmu @@ -1322,10 +1301,6 @@ uint64_t helper_be_ldq_cmmu(CPUArchState *env, target_ulong addr, # define helper_ret_stw_mmu helper_be_stw_mmu # define helper_ret_stl_mmu helper_be_stl_mmu # define helper_ret_stq_mmu helper_be_stq_mmu -# define helper_ret_lduw_cmmu helper_be_lduw_cmmu -# define helper_ret_ldsw_cmmu helper_be_ldsw_cmmu -# define helper_ret_ldl_cmmu helper_be_ldl_cmmu -# define helper_ret_ldq_cmmu helper_be_ldq_cmmu #else # define helper_ret_ldsw_mmu helper_le_ldsw_mmu # define helper_ret_lduw_mmu helper_le_lduw_mmu @@ -1336,10 +1311,6 @@ uint64_t helper_be_ldq_cmmu(CPUArchState *env, target_ulong addr, # define helper_ret_stw_mmu helper_le_stw_mmu # define helper_ret_stl_mmu helper_le_stl_mmu # define helper_ret_stq_mmu helper_le_stq_mmu -# define helper_ret_lduw_cmmu helper_le_lduw_cmmu -# define helper_ret_ldsw_cmmu helper_le_ldsw_cmmu -# define helper_ret_ldl_cmmu helper_le_ldl_cmmu -# define helper_ret_ldq_cmmu helper_le_ldq_cmmu #endif uint32_t helper_atomic_cmpxchgb_mmu(CPUArchState *env, target_ulong addr, diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index ddd19718bf..f0e4b0aee4 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -2028,98 +2028,50 @@ void cpu_stq_mmuidx_ra(CPUArchState *env, target_ulong addr, uint64_t val, /* Code access functions. */ -static uint64_t full_ldub_cmmu(CPUArchState *env, target_ulong addr, +static uint64_t full_ldub_code(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi, uintptr_t retaddr) { - return load_helper(env, addr, oi, retaddr, MO_8, true, full_ldub_cmmu); + return load_helper(env, addr, oi, retaddr, MO_8, true, full_ldub_code); } -uint8_t helper_ret_ldub_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr) +uint32_t cpu_ldub_code(CPUArchState *env, abi_ptr addr) { - return full_ldub_cmmu(env, addr, oi, retaddr); + TCGMemOpIdx oi = make_memop_idx(MO_UB, cpu_mmu_index(env, true)); + return full_ldub_code(env, addr, oi, 0); } -int8_t helper_ret_ldsb_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr) +static uint64_t full_lduw_code(CPUArchState *env, target_ulong addr, + TCGMemOpIdx oi, uintptr_t retaddr) { - return (int8_t) full_ldub_cmmu(env, addr, oi, retaddr); + return load_helper(env, addr, oi, retaddr, MO_TEUW, true, full_lduw_code); } -static uint64_t full_le_lduw_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr) +uint32_t cpu_lduw_code(CPUArchState *env, abi_ptr addr) { - return load_helper(env, addr, oi, retaddr, MO_LEUW, true, - full_le_lduw_cmmu); + TCGMemOpIdx oi = make_memop_idx(MO_TEUW, cpu_mmu_index(env, true)); + return full_lduw_code(env, addr, oi, 0); } -uint16_t helper_le_lduw_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr) +static uint64_t full_ldl_code(CPUArchState *env, target_ulong addr, + TCGMemOpIdx oi, uintptr_t retaddr) { - return full_le_lduw_cmmu(env, addr, oi, retaddr); + return load_helper(env, addr, oi, retaddr, MO_TEUL, true, full_ldl_code); } -int16_t helper_le_ldsw_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr) +uint32_t cpu_ldl_code(CPUArchState *env, abi_ptr addr) { - return (int16_t) full_le_lduw_cmmu(env, addr, oi, retaddr); + TCGMemOpIdx oi = make_memop_idx(MO_TEUL, cpu_mmu_index(env, true)); + return full_ldl_code(env, addr, oi, 0); } -static uint64_t full_be_lduw_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr) +static uint64_t full_ldq_code(CPUArchState *env, target_ulong addr, + TCGMemOpIdx oi, uintptr_t retaddr) { - return load_helper(env, addr, oi, retaddr, MO_BEUW, true, - full_be_lduw_cmmu); + return load_helper(env, addr, oi, retaddr, MO_TEQ, true, full_ldq_code); } -uint16_t helper_be_lduw_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr) +uint64_t cpu_ldq_code(CPUArchState *env, abi_ptr addr) { - return full_be_lduw_cmmu(env, addr, oi, retaddr); -} - -int16_t helper_be_ldsw_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr) -{ - return (int16_t) full_be_lduw_cmmu(env, addr, oi, retaddr); -} - -static uint64_t full_le_ldul_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr) -{ - return load_helper(env, addr, oi, retaddr, MO_LEUL, true, - full_le_ldul_cmmu); -} - -uint32_t helper_le_ldl_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr) -{ - return full_le_ldul_cmmu(env, addr, oi, retaddr); -} - -static uint64_t full_be_ldul_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr) -{ - return load_helper(env, addr, oi, retaddr, MO_BEUL, true, - full_be_ldul_cmmu); -} - -uint32_t helper_be_ldl_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr) -{ - return full_be_ldul_cmmu(env, addr, oi, retaddr); -} - -uint64_t helper_le_ldq_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr) -{ - return load_helper(env, addr, oi, retaddr, MO_LEQ, true, - helper_le_ldq_cmmu); -} - -uint64_t helper_be_ldq_cmmu(CPUArchState *env, target_ulong addr, - TCGMemOpIdx oi, uintptr_t retaddr) -{ - return load_helper(env, addr, oi, retaddr, MO_BEQ, true, - helper_be_ldq_cmmu); + TCGMemOpIdx oi = make_memop_idx(MO_TEQ, cpu_mmu_index(env, true)); + return full_ldq_code(env, addr, oi, 0); } diff --git a/docs/devel/loads-stores.rst b/docs/devel/loads-stores.rst index c74cd090e6..8a5bc912a5 100644 --- a/docs/devel/loads-stores.rst +++ b/docs/devel/loads-stores.rst @@ -171,8 +171,6 @@ more in line with the other memory access functions. load: ``helper_{endian}_ld{sign}{size}_mmu(env, addr, opindex, retaddr)`` -load (code): ``helper_{endian}_ld{sign}{size}_cmmu(env, addr, opindex, retaddr)`` - store: ``helper_{endian}_st{size}_mmu(env, addr, val, opindex, retaddr)`` ``sign`` @@ -192,7 +190,7 @@ store: ``helper_{endian}_st{size}_mmu(env, addr, val, opindex, retaddr)`` - ``ret`` : target endianness Regexes for git grep - - ``\`` + - ``\`` - ``\`` ``address_space_*`` From patchwork Mon Dec 16 22:11:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181802 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4926222ile; Mon, 16 Dec 2019 14:12:40 -0800 (PST) X-Google-Smtp-Source: APXvYqz4POV7XToAOuQZNVy1WAjuYG0fl1wN8WlvahrYV+GVYhQBhraMzfMyvc2YU6J66veXh7op X-Received: by 2002:a05:6808:197:: with SMTP id w23mr814606oic.46.1576534359998; Mon, 16 Dec 2019 14:12:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576534359; cv=none; d=google.com; s=arc-20160816; b=Co0t7mQYF/AoKQYfsJic7pjgE6fzGDWO3hL2xkihG2IQ+9n0hX0qfQwo7BQ4hoFh3f fL9UDGM42EYoArIIy+fSZyxtnInzY4FFch12gy2cPYmcPQYXFhEU1eslsgpLY4X21HpP WkCTiB+QFad0UP/nb6r71OodNrocEOEKgfrfRlLkp8dbmA0CtpAZKEdaXbVBE+GwDOn3 jewtMLP0iNkNHuHWSx8V0iZQJ4vBn+2X2ojHUkC5v3tHTsbTfwdMKyHXTUT6v+1W34jN L40CpUc/Tvn4x5aC3/0J/EhG4uwlSFNqOVMgqrsl8S1t0oxHcG5cwX1GWYKsD92b7DIg GdxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=IvU8cEi4DBw99OHU9o8JrqkePPDwEm7ICJM03idOP4o=; b=OjZuflBwhJl/vU9onQtWPi5u7mXjDwg91mT+Dgc7DCrM9KHApEc2PKvyIAYEDpeoG5 W8zNpZhMPFcbVrW6aYz7F7++a9bQbLdTha40YjnudEcghyCUBfA180N4PdLoA7czy5Kd cUQHVAeTtZ58rjMP4CyOrhjvZqvTPe2DKdkPSM1OBCBNBsY6Vak7HF6bPHxbHzooBMYM xSgif/dRH91We+J6EBqhYjfCpjldtG2mrTACWZMUC47iA07w8jpyTuAcP5XICNmN0AHt COGmOTSuSZEce6/JlFRtZhLLwF0k7ObefTielOEWGFVvt/8ojV4dB2x3sZ9bUfgbH5Fn 8h4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=X84hW1CB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.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. [209.51.188.17]) by mx.google.com with ESMTPS id p71si11230784oic.138.2019.12.16.14.12.39 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:12:39 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=X84hW1CB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.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]:60508 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybW-00052v-Mw for patch@linaro.org; Mon, 16 Dec 2019 17:12:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36696) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybA-0004wn-QB for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igyb8-000717-HK for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:16 -0500 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]:40699) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igyb8-00070V-9F for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:14 -0500 Received: by mail-pl1-x644.google.com with SMTP id g6so5111554plp.7 for ; Mon, 16 Dec 2019 14:12:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=IvU8cEi4DBw99OHU9o8JrqkePPDwEm7ICJM03idOP4o=; b=X84hW1CBqF/Qt5Tevy/tTF4UA9n7PO0Z3vgmQYrpvy1qKIpCCErsjJMZvQUB5m+r6Z AKHO6B+N1LEh8GeKjRZ6WTbd21BlAJNiQ6KdfvktdCQCvz0SgwuQ/+H8ErZJ9pQ9LVpD r9R0SgFhf6dJ4+QQVM8GbRDctnDi9KX+Il8eHOLDBhgsZM9vwRCpK9SH5cD2xKZANZqm 5dnMwPrnG3qAsI3mjxpCH0yc34vsYrUyL/UtNVj/sAoLIRa4HYehmyCSoFRf+nvWcWKd yO7cn1I17SRlxy7ojxRC7vZXq6dWsS8OEZOEJlpG6j9Pij9eOdE5MgqhPhy/hf7pEHNt 7vAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IvU8cEi4DBw99OHU9o8JrqkePPDwEm7ICJM03idOP4o=; b=sFFTKs8aRaRKe37a37LB9UtFVQCDd6UGHTEKMrI9nKLwB73ZZKZf3LgksKlGPP5Yrg ZtTLFWjkJri3wXDV+c9P1C25OoTmgMTmvPac36qcLPPgxvsO8vRtP1YzHNjFqONhunS9 AZGrXb9x0UnMbx9ukQA34h2jVIOLX5iyhRbw9YidCGs1TyRUkqgCaMrrZwHLb763G7Ft ZS/NRK+XlA3goc9TSPnyKGE+4VPdUI2oJhKZjD4xUv2bHX5ISKvrCf+wqXJBxQ/WYE5u 3ymCgyNIisD1CZXglISkyVhcAhp84KdVkN7GKed5pbboo6mmoEi++xwX2UALe8E0TFCf q0Iw== X-Gm-Message-State: APjAAAWbFxcQF0zNuwj4pmTCh9ILDM2x4fuLbMRLro4buxQ0u9bfGWAp K3S4uzr8lCjURA/1RP1wmtDjWyoaBio= X-Received: by 2002:a17:90a:8a0c:: with SMTP id w12mr1894920pjn.61.1576534332567; Mon, 16 Dec 2019 14:12:12 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:12 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 07/28] cputlb: Provide cpu_(ld, st}*_mmuidx_ra for user-only Date: Mon, 16 Dec 2019 12:11:37 -1000 Message-Id: <20191216221158.29572-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::644 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This finishes the new interface began with the previous patch. Document the interface and deprecate MMU_MODE_SUFFIX. Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 80 +++++++++++++- docs/devel/loads-stores.rst | 211 ++++++++++++++++++++++++++---------- 2 files changed, 230 insertions(+), 61 deletions(-) -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index ef59ed61e4..41b98ba801 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -25,9 +25,13 @@ * * The syntax for the accessors is: * - * load: cpu_ld{sign}{size}_{mmusuffix}(env, ptr) + * load: cpu_ld{sign}{size}_{mmusuffix}(env, ptr) + * cpu_ld{sign}{size}_{mmusuffix}_ra(env, ptr, retaddr) + * cpu_ld{sign}{size}_mmuidx_ra(env, ptr, mmu_idx, retaddr) * - * store: cpu_st{sign}{size}_{mmusuffix}(env, ptr, val) + * store: cpu_st{size}_{mmusuffix}(env, ptr, val) + * cpu_st{size}_{mmusuffix}_ra(env, ptr, val, retaddr) + * cpu_st{size}_mmuidx_ra(env, ptr, val, mmu_idx, retaddr) * * sign is: * (empty): for 32 and 64 bit sizes @@ -40,9 +44,10 @@ * l: 32 bits * q: 64 bits * - * mmusuffix is one of the generic suffixes "data" or "code", or - * (for softmmu configs) a target-specific MMU mode suffix as defined - * in target cpu.h. + * mmusuffix is one of the generic suffixes "data" or "code", or "mmuidx". + * The "mmuidx" suffix carries an extra mmu_idx argument that specifies + * the index to use; the "data" and "code" suffixes take the index from + * cpu_mmu_index(). */ #ifndef CPU_LDST_H #define CPU_LDST_H @@ -145,6 +150,71 @@ static inline void clear_helper_retaddr(void) #undef MEMSUFFIX #undef CODE_ACCESS +/* + * Provide the same *_mmuidx_ra interface as for softmmu. + * The mmu_idx argument is ignored. + */ + +static inline uint32_t cpu_ldub_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + return cpu_ldub_data_ra(env, addr, ra); +} + +static inline uint32_t cpu_lduw_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + return cpu_lduw_data_ra(env, addr, ra); +} + +static inline uint32_t cpu_ldl_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + return cpu_ldl_data_ra(env, addr, ra); +} + +static inline uint64_t cpu_ldq_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + return cpu_ldq_data_ra(env, addr, ra); +} + +static inline int cpu_ldsb_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + return cpu_ldsb_data_ra(env, addr, ra); +} + +static inline int cpu_ldsw_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + return cpu_ldsw_data_ra(env, addr, ra); +} + +static inline void cpu_stb_mmuidx_ra(CPUArchState *env, abi_ptr addr, + uint32_t val, int mmu_idx, uintptr_t ra) +{ + cpu_stb_data_ra(env, addr, val, ra); +} + +static inline void cpu_stw_mmuidx_ra(CPUArchState *env, abi_ptr addr, + uint32_t val, int mmu_idx, uintptr_t ra) +{ + cpu_stw_data_ra(env, addr, val, ra); +} + +static inline void cpu_stl_mmuidx_ra(CPUArchState *env, abi_ptr addr, + uint32_t val, int mmu_idx, uintptr_t ra) +{ + cpu_stl_data_ra(env, addr, val, ra); +} + +static inline void cpu_stq_mmuidx_ra(CPUArchState *env, abi_ptr addr, + uint64_t val, int mmu_idx, uintptr_t ra) +{ + cpu_stq_data_ra(env, addr, val, ra); +} + #else /* Needed for TCG_OVERSIZED_GUEST */ diff --git a/docs/devel/loads-stores.rst b/docs/devel/loads-stores.rst index 8a5bc912a5..03aa9e7ff8 100644 --- a/docs/devel/loads-stores.rst +++ b/docs/devel/loads-stores.rst @@ -72,31 +72,34 @@ Regexes for git grep - ``\`` - ``\`` -``cpu_{ld,st}_*`` -~~~~~~~~~~~~~~~~~ +``cpu_{ld,st}*_mmuidx_ra`` +~~~~~~~~~~~~~~~~~~~~~~~~~~ -These functions operate on a guest virtual address. Be aware -that these functions may cause a guest CPU exception to be -taken (e.g. for an alignment fault or MMU fault) which will -result in guest CPU state being updated and control longjumping -out of the function call. They should therefore only be used -in code that is implementing emulation of the target CPU. +These functions operate on a guest virtual address plus a context, +known as a "mmu index" or ``mmuidx``, which controls how that virtual +address is translated. The meaning of the indexes are target specific, +but specifying a particular index might be necessary if, for instance, +the helper requires an "always as non-privileged" access rather that +the default access for the current state of the guest CPU. -These functions may throw an exception (longjmp() back out -to the top level TCG loop). This means they must only be used -from helper functions where the translator has saved all -necessary CPU state before generating the helper function call. -It's usually better to use the ``_ra`` variants described below -from helper functions, but these functions are the right choice -for calls made from hooks like the CPU do_interrupt hook or -when you know for certain that the translator had to save all -the CPU state that ``cpu_restore_state()`` would restore anyway. +These functions may cause a guest CPU exception to be taken +(e.g. for an alignment fault or MMU fault) which will result in +guest CPU state being updated and control longjmp'ing out of the +function call. They should therefore only be used in code that is +implementing emulation of the guest CPU. + +The ``retaddr`` parameter is used to control unwinding of the +guest CPU state in case of a guest CPU exception. This is passed +to ``cpu_restore_state()``. Therefore the value should either be 0, +to indicate that the guest CPU state is already synchronized, or +the result of ``GETPC()`` from the top level ``HELPER(foo)`` +function, which is a return address into the generated code. Function names follow the pattern: -load: ``cpu_ld{sign}{size}_{mmusuffix}(env, ptr)`` +load: ``cpu_ld{sign}{size}_mmuidx_ra(env, ptr, mmuidx, retaddr)`` -store: ``cpu_st{size}_{mmusuffix}(env, ptr, val)`` +store: ``cpu_st{size}_mmuidx_ra(env, ptr, val, mmuidx, retaddr)`` ``sign`` - (empty) : for 32 or 64 bit sizes @@ -109,56 +112,151 @@ store: ``cpu_st{size}_{mmusuffix}(env, ptr, val)`` - ``l`` : 32 bits - ``q`` : 64 bits -``mmusuffix`` is one of the generic suffixes ``data`` or ``code``, or -(for softmmu configs) a target-specific MMU mode suffix as defined -in the target's ``cpu.h``. +Regexes for git grep: + - ``\`` + - ``\`` -Regexes for git grep - - ``\`` - - ``\`` +``cpu_{ld,st}*_data_ra`` +~~~~~~~~~~~~~~~~~~~~~~~~ -``cpu_{ld,st}_*_ra`` -~~~~~~~~~~~~~~~~~~~~ - -These functions work like the ``cpu_{ld,st}_*`` functions except -that they also take a ``retaddr`` argument. This extra argument -allows for correct unwinding of any exception that is taken, -and should generally be the result of GETPC() called directly -from the top level HELPER(foo) function (i.e. the return address -in the generated code). +These functions work like the ``cpu_{ld,st}_mmuidx_ra`` functions +except that the ``mmuidx`` parameter is taken from the current mode +of the guest CPU, as determined by ``cpu_mmu_index(env, false)``. These are generally the preferred way to do accesses by guest -virtual address from helper functions; see the documentation -of the non-``_ra`` variants for when those would be better. - -Calling these functions with a ``retaddr`` argument of 0 is -equivalent to calling the non-``_ra`` version of the function. +virtual address from helper functions, unless the access should +be performed with a context other than the default. Function names follow the pattern: -load: ``cpu_ld{sign}{size}_{mmusuffix}_ra(env, ptr, retaddr)`` +load: ``cpu_ld{sign}{size}_data_ra(env, ptr, ra)`` -store: ``cpu_st{sign}{size}_{mmusuffix}_ra(env, ptr, val, retaddr)`` +store: ``cpu_st{size}_data_ra(env, ptr, val, ra)`` + +``sign`` + - (empty) : for 32 or 64 bit sizes + - ``u`` : unsigned + - ``s`` : signed + +``size`` + - ``b`` : 8 bits + - ``w`` : 16 bits + - ``l`` : 32 bits + - ``q`` : 64 bits + +Regexes for git grep: + - ``\`` + - ``\`` + +``cpu_{ld,st}*_data`` +~~~~~~~~~~~~~~~~~~~~~ + +These functions work like the ``cpu_{ld,st}_data_ra`` functions +except that the ``retaddr`` parameter is 0, and thus does not +unwind guest CPU state. + +This means they must only be used from helper functions where the +translator has saved all necessary CPU state. These functions are +the right choice for calls made from hooks like the CPU ``do_interrupt`` +hook or when you know for certain that the translator had to save all +the CPU state anyway. + +Function names follow the pattern: + +load: ``cpu_ld{sign}{size}_data(env, ptr)`` + +store: ``cpu_st{size}_data(env, ptr, val)`` + +``sign`` + - (empty) : for 32 or 64 bit sizes + - ``u`` : unsigned + - ``s`` : signed + +``size`` + - ``b`` : 8 bits + - ``w`` : 16 bits + - ``l`` : 32 bits + - ``q`` : 64 bits Regexes for git grep - - ``\`` - - ``\`` + - ``\`` + - ``\`` -``helper_*_{ld,st}*mmu`` -~~~~~~~~~~~~~~~~~~~~~~~~ +``cpu_ld*_code`` +~~~~~~~~~~~~~~~~ + +These functions perform a read for instruction execution. The ``mmuidx`` +parameter is taken from the current mode of the guest CPU, as determined +by ``cpu_mmu_index(env, true)``. The ``retaddr`` parameter is 0, and +thus does not unwind guest CPU state, because CPU state is always +synchronized while translating instructions. Any guest CPU exception +that is raised will indicate an instruction execution fault rather than +a data read fault. + +In general these functions should not be used directly during translation. +There are wrapper functions that are to be used which also take care of +plugins for tracing. + +Function names follow the pattern: + +load: ``cpu_ld{sign}{size}_code(env, ptr)`` + +``sign`` + - (empty) : for 32 or 64 bit sizes + - ``u`` : unsigned + - ``s`` : signed + +``size`` + - ``b`` : 8 bits + - ``w`` : 16 bits + - ``l`` : 32 bits + - ``q`` : 64 bits + +Regexes for git grep: + - ``\`` + +``translator_ld*`` +~~~~~~~~~~~~~~~~~~ + +These functions are a wrapper for ``cpu_ld*_code`` which also perform +any actions required by any tracing plugins. They are only to be +called during the translator callback ``translate_insn``. + +There is a set of functions ending in ``_swap`` which, if the parameter +is true, returns the value in the endianness that is the reverse of +the guest native endianness, as determined by ``TARGET_WORDS_BIGENDIAN``. + +Function names follow the pattern: + +load: ``translator_ld{sign}{size}(env, ptr)`` + +swap: ``translator_ld{sign}{size}_swap(env, ptr, swap)`` + +``sign`` + - (empty) : for 32 or 64 bit sizes + - ``u`` : unsigned + - ``s`` : signed + +``size`` + - ``b`` : 8 bits + - ``w`` : 16 bits + - ``l`` : 32 bits + - ``q`` : 64 bits + +Regexes for git grep + - ``\`` + +``helper_*_{ld,st}*_mmu`` +~~~~~~~~~~~~~~~~~~~~~~~~~ These functions are intended primarily to be called by the code generated by the TCG backend. They may also be called by target -CPU helper function code. Like the ``cpu_{ld,st}_*_ra`` functions -they perform accesses by guest virtual address; the difference is -that these functions allow you to specify an ``opindex`` parameter -which encodes (among other things) the mmu index to use for the -access. This is necessary if your helper needs to make an access -via a specific mmu index (for instance, an "always as non-privileged" -access) rather than using the default mmu index for the current state -of the guest CPU. +CPU helper function code. Like the ``cpu_{ld,st}_mmuidx_ra`` functions +they perform accesses by guest virtual address, with a given ``mmuidx``. -The ``opindex`` parameter should be created by calling ``make_memop_idx()``. +These functions specify an ``opindex`` parameter which encodes +(among other things) the mmu index to use for the access. This parameter +should be created by calling ``make_memop_idx()``. The ``retaddr`` parameter should be the result of GETPC() called directly from the top level HELPER(foo) function (or 0 if no guest CPU state @@ -166,8 +264,9 @@ unwinding is required). **TODO** The names of these functions are a bit odd for historical reasons because they were originally expected to be called only from -within generated code. We should rename them to bring them -more in line with the other memory access functions. +within generated code. We should rename them to bring them more in +line with the other memory access functions. The explicit endianness +is the only feature they have beyond ``*_mmuidx_ra``. load: ``helper_{endian}_ld{sign}{size}_mmu(env, addr, opindex, retaddr)`` From patchwork Mon Dec 16 22:11:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181810 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4934365ile; Mon, 16 Dec 2019 14:20:25 -0800 (PST) X-Google-Smtp-Source: APXvYqx0kBr7fO7glsEqhe7/PfUZo5h4yR/u4uoELiVwvl2TeujjP+M9+vzfH9OoRgIVfNg9mK6S X-Received: by 2002:a05:620a:14a6:: with SMTP id x6mr1939589qkj.206.1576534825449; Mon, 16 Dec 2019 14:20:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576534825; cv=none; d=google.com; s=arc-20160816; b=OdYaty6hBAcjb0QhLGkIFLy7iyGhibJjLRLrC+fqDgahkM/IJWmf/b40DrrheIY4WA Vnd6e+mOJxmkUODMZkrPmxkc8fbQTCcfLtUkzwd+BUALh0Pe6wLY6T1tKJVzxXl29P3N e/LXan27VuxR80TQbgibpzjELfzaKrgqY65aIGgCBVGqF5YZPJzdGlHGXlmtx0NrXO2M ILi/dUBPqDtMR5SJwcgDFlKdxZzdxr6DTWlRyq1/gAkeEDeT2B2FySO/qW+o+QaiUMsi ZK/BCKcy6wPbswh/Z+IKPydjO15dmUj53oOhAialRaNuTvZWAlESQrD9Fq02nW+eRECS VSWQ== 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=lsCNvFrnH2M18XdHCXW5ZamBsqq1c0FHuOYep4yKETk=; b=dTUwbNq9CnFjEgL2j96KOenDCP39ndrq4xKHha7mT4KKm+SkBhCT+6u91JpEIGhV54 501YHdKlbjG/h6Ze2Q35MBO2jZnc6rO9a6WTOODzvWhWv9Ak59RC44oqx2b71kdgx5BR ejvY84eMij+q7M8ITdg2QtyzqAI2M8ljmyXY1gH4fZXCQBQH9VCojRV2OtaMm4Mpsfbu w0nEpKcgTBf3woPjysD9j7PAZ+CzpJCaWCen83cqMzcOjWoVZFvCSqYx5ffA1B3tnktm +BNSD2385YLjS6g/xo8vlMWoc8/vLEUvAHwyKhc9sPGRaypAJOqpXfTziJPsGN+unXAx rmMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=M1OUPrME; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.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. [209.51.188.17]) by mx.google.com with ESMTPS id 67si10452089qtg.124.2019.12.16.14.20.25 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:20:25 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=M1OUPrME; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.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]:60766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igyj2-0006vj-PY for patch@linaro.org; Mon, 16 Dec 2019 17:20:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36702) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybB-0004xZ-8J for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igyb9-00072b-OK for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:17 -0500 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:45680) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igyb9-00072H-J8 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:15 -0500 Received: by mail-pf1-x441.google.com with SMTP id 2so6361575pfg.12 for ; Mon, 16 Dec 2019 14:12:15 -0800 (PST) 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=lsCNvFrnH2M18XdHCXW5ZamBsqq1c0FHuOYep4yKETk=; b=M1OUPrMEEdTWjq9e9kBnv9dRB2o0OsoH21mIPE3FnQ8a2f4PDm1MY6/3FroKZE1lL3 YrJiUTaITQbM9vJg+H0t2SyHJhWGIB0OPdpYWJ2hcCdIKI8iFAPhejlXi6GPQ8Pp8MWB hDcXQ8ErVaMLkOL99Nrj45rng+IU4UKjPVm5shQGlHz+B0l4SChaXF5r8tZQ3zENvuzW cgzQXsHF53XPVMIuwlKj8nFmDi7n0B+8/sULxt92IyT0lhFbLShF8KtD5yKTBSNRSRo0 ySM5b+5R+JuDbZK+S1Mbv9nFKBaCkNmIS3H+r51SFmAf251hRnkPyeIjKd6DzkYAChWs Kfew== 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=lsCNvFrnH2M18XdHCXW5ZamBsqq1c0FHuOYep4yKETk=; b=K93+Pyhr1HkiC6sPEhdceTyN19FIRaX3HWhNSo9+xssjyrcGW+sDAPWMYCPONgzB6G Fc8a/RTkKgZWfDPAjOy2NPSfAtLAXUKSgzEAAtTpDd5t1fK2lkiZY91TzQUUFY5zbHSj v0c/xXyWQt25pkSaGOAytpSgP61y0LQqu5idkFHwansd3IKf8WzyG3bTLF7AiWjPo/h0 t2SF+zwTA+jetayAavqIPVthf9iyvoUUujdptg5DK2KjuxdjmdSlR0eIAZSllvhXBZzt gUeFn7sk3TvncaMySvL/lC1oWMyV6JhGqeJ3d5kMgtnvUfC6uUY3gJkvxtXYUu4ekb9f ecNA== X-Gm-Message-State: APjAAAWNE1RUAbluk3yjj87RaeQ4o7WGmGd9LGFcbXYUwZsxqkKGtVba g7bAHUYO1MuVjtqOMEcOBZR5pQkYP+A= X-Received: by 2002:a63:2ccc:: with SMTP id s195mr20644457pgs.75.1576534334271; Mon, 16 Dec 2019 14:12:14 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:13 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 08/28] target/i386: Use cpu_*_mmuidx_ra instead of templates Date: Mon, 16 Dec 2019 12:11:38 -1000 Message-Id: <20191216221158.29572-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::441 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: Paolo Bonzini , Eduardo Habkost Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Do not use exec/cpu_ldst_{,useronly_}template.h directly, but instead use the functional interface. Cc: Eduardo Habkost Acked-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target/i386/seg_helper.c | 56 ++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 28 deletions(-) -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/target/i386/seg_helper.c b/target/i386/seg_helper.c index 87a627f9dc..b96de068ca 100644 --- a/target/i386/seg_helper.c +++ b/target/i386/seg_helper.c @@ -37,37 +37,37 @@ # define LOG_PCALL_STATE(cpu) do { } while (0) #endif -#ifdef CONFIG_USER_ONLY -#define MEMSUFFIX _kernel -#define DATA_SIZE 1 -#include "exec/cpu_ldst_useronly_template.h" +/* + * TODO: Convert callers to compute cpu_mmu_index_kernel once + * and use *_mmuidx_ra directly. + */ +#define cpu_ldub_kernel_ra(e, p, r) \ + cpu_ldub_mmuidx_ra(e, p, cpu_mmu_index_kernel(e), r) +#define cpu_lduw_kernel_ra(e, p, r) \ + cpu_lduw_mmuidx_ra(e, p, cpu_mmu_index_kernel(e), r) +#define cpu_ldl_kernel_ra(e, p, r) \ + cpu_ldl_mmuidx_ra(e, p, cpu_mmu_index_kernel(e), r) +#define cpu_ldq_kernel_ra(e, p, r) \ + cpu_ldq_mmuidx_ra(e, p, cpu_mmu_index_kernel(e), r) -#define DATA_SIZE 2 -#include "exec/cpu_ldst_useronly_template.h" +#define cpu_stb_kernel_ra(e, p, v, r) \ + cpu_stb_mmuidx_ra(e, p, v, cpu_mmu_index_kernel(e), r) +#define cpu_stw_kernel_ra(e, p, v, r) \ + cpu_stw_mmuidx_ra(e, p, v, cpu_mmu_index_kernel(e), r) +#define cpu_stl_kernel_ra(e, p, v, r) \ + cpu_stl_mmuidx_ra(e, p, v, cpu_mmu_index_kernel(e), r) +#define cpu_stq_kernel_ra(e, p, v, r) \ + cpu_stq_mmuidx_ra(e, p, v, cpu_mmu_index_kernel(e), r) -#define DATA_SIZE 4 -#include "exec/cpu_ldst_useronly_template.h" +#define cpu_ldub_kernel(e, p) cpu_ldub_kernel_ra(e, p, 0) +#define cpu_lduw_kernel(e, p) cpu_lduw_kernel_ra(e, p, 0) +#define cpu_ldl_kernel(e, p) cpu_ldl_kernel_ra(e, p, 0) +#define cpu_ldq_kernel(e, p) cpu_ldq_kernel_ra(e, p, 0) -#define DATA_SIZE 8 -#include "exec/cpu_ldst_useronly_template.h" -#undef MEMSUFFIX -#else -#define CPU_MMU_INDEX (cpu_mmu_index_kernel(env)) -#define MEMSUFFIX _kernel -#define DATA_SIZE 1 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 2 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 4 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 8 -#include "exec/cpu_ldst_template.h" -#undef CPU_MMU_INDEX -#undef MEMSUFFIX -#endif +#define cpu_stb_kernel(e, p, v) cpu_stb_kernel_ra(e, p, v, 0) +#define cpu_stw_kernel(e, p, v) cpu_stw_kernel_ra(e, p, v, 0) +#define cpu_stl_kernel(e, p, v) cpu_stl_kernel_ra(e, p, v, 0) +#define cpu_stq_kernel(e, p, v) cpu_stq_kernel_ra(e, p, v, 0) /* return non zero if error */ static inline int load_segment_ra(CPUX86State *env, uint32_t *e1_ptr, From patchwork Mon Dec 16 22:11:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181812 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4935032ile; Mon, 16 Dec 2019 14:21:00 -0800 (PST) X-Google-Smtp-Source: APXvYqzuE7D+OSMgSWts7r+tqmAZa2/qNE0qTVdeQV0skZ0kBURWZSyQF05/rH17skKAORlpLd7O X-Received: by 2002:a05:6808:658:: with SMTP id z24mr764664oih.91.1576534860771; Mon, 16 Dec 2019 14:21:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576534860; cv=none; d=google.com; s=arc-20160816; b=OFhZ//AGg10ozlSU+VFIYA3a9my9Y7crH+/DwoMX1gKSbLIw4W/MGHrfdzkze7RWtz 50sPAAU1QlhJApMzYHwvu8zamlb9VZNghLVEUi4XHBjvsFDL8uoftL7TIAA8s8liq52e APaYG+hOQqBRC/c8JAEtKmEiwpnEuzIhRfqPXdmfY7VCeV/DodSAcfrUiGQL7eAMf15+ 9oF028917HNqRhQbK2zZuXhN/ihjgUYDLwgRuq6c8drgwsPgMgR6HGHJcMbP0YUSGGbv ZqeJqN2CrIGUuFfwWumYXltJjgDmAkx2q3NgnaTdbDEdm9kGxbGb/CxyH65hSVvXSf5w FdfA== 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=Ze57z0hQRkPeItK9rFzUaBjTkCWGyBz1l0/XVJKtpEA=; b=odzAcamrcRQTlPJtgcqGXSAl6BF2usGZgTqmDjpCoSOkEOBqRU6u5x6TjtwXd7Bcel Si8F1ZgmuPNNCdTzsKa+HiptXn/EySEBQlSwyMxtDlejRsniN8/tDN/Rg7U3a4sigcAi ILwZpB4oqOCtN+1CNrwCfWT04oKWIkWEPftnktAuikZ4ZFkOsH9eVMb9An2y/qMVsOMt TbFe6+CHGscyjqg02miCbClRVe56fMe7rdlsNPNY+57Ez13N12mIXFvVPgg7YCGbIlkR olGm8z0stQ6s8OOyoxkjHpMVgE/IDUybLUhSvxza/qJ6M0wcIl/vceH5LRSmXKvettQx lLUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Hy+f+QRg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l131si11214342oig.120.2019.12.16.14.21.00 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:21:00 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Hy+f+QRg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igyjb-0007CY-MS for patch@linaro.org; Mon, 16 Dec 2019 17:20:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36724) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybC-0004zC-6t for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igybB-00073j-8s for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:18 -0500 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:37530) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igybB-00072y-3j for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:17 -0500 Received: by mail-pl1-x643.google.com with SMTP id c23so5121991plz.4 for ; Mon, 16 Dec 2019 14:12:17 -0800 (PST) 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=Ze57z0hQRkPeItK9rFzUaBjTkCWGyBz1l0/XVJKtpEA=; b=Hy+f+QRgGSc2OUx7cJ6809mCoVGKpGvLx6LOSbFFqqacS7CfrjZF4V9wKnEGvfTLnb UlLN7WGxUjjVeQzSYSRkxNm4jR2MSWH4RxbfdscbK/M3A16PR5SvitUHEpFZmZTDjJpC 8X8zwzTr8FwlCRlCRrmEZoEoVnC1Ik1YdxISCPnQHUWxOUf5idBqzYxIviCtpaQ9cO+I IiKWMg6IV8G4gK+pF8t+azPNnrh/n8Ef6JmaE8nzPM6xtHrL+IKHHb0fvb178ItVtBz7 tTrY3OfLcswHI0EqhXbBBYRZqXh2+Q09GFURnfoiF12leFG/K3DiQnA8hnm3gr4mk8A8 50rA== 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=Ze57z0hQRkPeItK9rFzUaBjTkCWGyBz1l0/XVJKtpEA=; b=FQrY6aEbEKghQMyOD3cRWZQKMtaSbRXO7EnoA1cKcLh/KD3H96Lwxo+28+j8RZ4/yi bjgjoEECrhvFqiQLGKICgvdw16YTdVPhraCyZHQIL0jp4Bk4p1qpMZfAs2mv2O/jsGb6 4eca2HCcmBU4h3U6YrOy+mqyd7o8sghPwQTwS7V4opcT9sa6ZujORFR8zoqrCQIbKHqU zWtFukgyWiL++WCuz0SMYYvRuHKgaTA72nrVNkJUMy7oZFFGIj2Mr+GDQY8dy1AbN7kw qHTvlrwjUwT+cI44W98NsWYmY4PuCrCjxAO9Bfot22Cz4LtPTUjoYA+REA4GplmLZnpk ZhHw== X-Gm-Message-State: APjAAAWmJgL+9zg2mgxW3DuzXHhrqq/W9JBkGaqtmJ39Z37JZzwSnDYc lg+4uXu8qI9ZtE1yTlLe8kA/T7YhcG0= X-Received: by 2002:a17:90b:85:: with SMTP id bb5mr1938113pjb.22.1576534335917; Mon, 16 Dec 2019 14:12:15 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:15 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 09/28] target/s390x: Include tcg.h in mem_helper.c Date: Mon, 16 Dec 2019 12:11:39 -1000 Message-Id: <20191216221158.29572-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::643 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: David Hildenbrand Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Code movement in an upcoming patch will show that this file was implicitly depending on tcg.h being included indirectly. Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 1 + 1 file changed, 1 insertion(+) -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 2325767f17..57ce17c252 100644 --- a/target/s390x/mem_helper.c +++ b/target/s390x/mem_helper.c @@ -27,6 +27,7 @@ #include "exec/cpu_ldst.h" #include "qemu/int128.h" #include "qemu/atomic128.h" +#include "tcg.h" #if !defined(CONFIG_USER_ONLY) #include "hw/s390x/storage-keys.h" From patchwork Mon Dec 16 22:11:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181808 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4931940ile; Mon, 16 Dec 2019 14:18:04 -0800 (PST) X-Google-Smtp-Source: APXvYqzP/XnEGHwaxTu3NbRF+GANYJW6/xTL0TRfONX1w+PnDDU5XYkmLXrP8pLZVvCpBGbUX4jP X-Received: by 2002:a9d:7b4e:: with SMTP id f14mr34982605oto.355.1576534684027; Mon, 16 Dec 2019 14:18:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576534684; cv=none; d=google.com; s=arc-20160816; b=Np9G2oV1PRvXpiICBP1hdmeD1yHt9KgUVV5H787r1LFhbZZyr0xtC0VIm1rq7HZyhN 0CdfR35WwAJVvz3+0KKaT3G2Bf6AUnzapVfO/sovq66hmRBD9vWLZBMsLpuMImpjzMF7 xMGX5Vr4Cmc6XfrA7ptxOyJjnBoEPapFkapBqfd9gzvbTK3LnMHx2cTWQ1Yk5FYkMUge XSKkklvXwBMBzppYEfG3kRWkmASRdkMElTozUHMVLWojxefL3O/PgWyeLIlyQqjV889p LbgI5VJ0xnKS1Q+Hw3W/Fv5LKVW6E6l38zdPdJVyMgIberbgkUdM9G31eion6tHk6yS1 dkRQ== 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=ZD30K4OON5Rr10XGqonKOfQz8NelurszVZDAGc9w8Wk=; b=IynyK0WlWlxiTtQS1LSDtlxnEwAXAbYxi4L9aKt/Vwed6D/XHouneTe6rIr5Z+VPfL nv04d2Z4zeX07/GGl5dy0eyDh7Esc2fXTGCZRmIYbVjqFzBfw5pYzroFaUTLfHa5btlK 7iAUEgcdjYBmS9hcjDz8iK6AcWqgSlkOvHx2lp6MjjcdoiQINRl4tgeoj4caYKDprc84 4TlilDRO6qENhTUvjxHgPilGq8ybFqwUMM2t2OTwG33Yx3Yzuk1KvNa2wuxPhIOdHI9f +kjovmE8tAYgo32d91r0jsaXgsIuJSPCBsHGHKhXe0LklIpOmuc78d01q5jQPupG89BY 3HfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hUewS94v; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a14si13393386otk.2.2019.12.16.14.18.03 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:18:04 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hUewS94v; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igygk-0003Sh-Ne for patch@linaro.org; Mon, 16 Dec 2019 17:18:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36752) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybD-00051r-Mz for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igybC-00076r-Kf for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:19 -0500 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:35600) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igybC-000749-Fc for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:18 -0500 Received: by mail-pf1-x442.google.com with SMTP id b19so6386992pfo.2 for ; Mon, 16 Dec 2019 14:12:18 -0800 (PST) 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=ZD30K4OON5Rr10XGqonKOfQz8NelurszVZDAGc9w8Wk=; b=hUewS94vJaFiLoGTYHAW6I425qQZX8O5Dh0yStRd1pOpftvLaClBLaFzXIwJe/VgGi ENASUAZ2OVz/d/YyA7HDk/JcJd0e+5Q0PWmc4gUVHH3orp8enAEEBFB2wWmRu40Df6TZ dmHb+3jUkvd774DGb1Jp8FNFjONM/U4XJOJr+paLh1Omm+bqogvpqIyG1cZ7ABOiyVnE wZ+01m4dXuM/SZXV/E70No74XZjvLSg/6dr+DMdt+5mkzPh5ykuRw54cunsZOhmgTiAj pvmCoCWaI7mAr7xNMahNYSuMOIBcXMoFJQnoXnps++FAgIArnUG3jf/o0vQxufU9g5bg JkwA== 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=ZD30K4OON5Rr10XGqonKOfQz8NelurszVZDAGc9w8Wk=; b=PJK+f/NqL62hUl91X8NZYMlQ2P3uwlT0g4o9aozwMtoJZ7s8apm3664O8OQehvPW45 vLnJ2Pe/mH4+tmml+8fQW2N/UvQA7JnNp+CNLVdOTzXLlVdnTlBdDgW8mCgXlqoxcvTr U2WweP1+fDJB8syxJROvDW2x7/qrbGX6rjdODj+saZRqbzAZuPrlAm6CcY+iWnoIOrqE DdeAjv/m8VXPJ3rWRWh8eA3GdqnVHMlsvTUiDnGhg/GNKrwrgYzUj64mXDVDQHZ3ko0B drJgBNmMVi87W2iM2pPQjOQbEc0WWnh59oiiYI/IK7j8VhsJna5XkBVEscAN80EaNBMD gdIA== X-Gm-Message-State: APjAAAXdrPHhIN8xWsFFDxteyan5WyUOZ/JV+f06ZbOjHcBMG0uK+sU+ fOHc5129VGE3qgCAVOvBCd7kBR3N9qI= X-Received: by 2002:a62:1488:: with SMTP id 130mr18399171pfu.238.1576534337360; Mon, 16 Dec 2019 14:12:17 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:16 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 10/28] target/arm: Include tcg.h in sve_helper.c Date: Mon, 16 Dec 2019 12:11:40 -1000 Message-Id: <20191216221158.29572-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::442 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 Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Code movement in an upcoming patch will show that this file was implicitly depending on tcg.h being included indirectly. Cc: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/sve_helper.c | 1 + 1 file changed, 1 insertion(+) -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c index fc0c1755d2..83cc7f5bb5 100644 --- a/target/arm/sve_helper.c +++ b/target/arm/sve_helper.c @@ -25,6 +25,7 @@ #include "exec/helper-proto.h" #include "tcg/tcg-gvec-desc.h" #include "fpu/softfloat.h" +#include "tcg.h" /* Note that vector data is stored in host-endian 64-bit chunks, From patchwork Mon Dec 16 22:11:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181813 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4935830ile; Mon, 16 Dec 2019 14:21:45 -0800 (PST) X-Google-Smtp-Source: APXvYqzaCEm/EIDDHQR8RlHk+/NdbSju1LJehAyJeQwK22Px/0Jcn9uqTTvwMCHyKgCG6A1owVRM X-Received: by 2002:a05:6830:110a:: with SMTP id w10mr35290590otq.300.1576534905445; Mon, 16 Dec 2019 14:21:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576534905; cv=none; d=google.com; s=arc-20160816; b=Y6WoZWRWYpLpL6PhhZnq927/J49Axq+YZ8qR7DdsQmo8YQamyz7sCUwVdd6h124GiP BpCY4kpd3B10fyYuzRWzv377SxSD8ycitdFx8nSBx8GVhHfOWIIPIPRbt2atd5XcGlpK J1+6kW4/E/m5bGynsoWAG1XAGnhrf2C8RV4jLkj2EDrT60DU+qYpJaT4e7OR60MmuUyM THAqrRD+1N+bt+e9JP9egQ0WWl5JJ0qbxN9VYDoAery98MexrcKUx51gUgS8Je3qFuZT eqaKjPWo7DRiEUBszO+9CuENVohj+oOEIPmUh9Rpe4g7jOLe0eXm3k/n+ef8hzp4oCvs Dneg== 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=mulTmRahmIOLlqTACfJOIL2mZII2b44d4f9C0tQdiJE=; b=vgW+SRosPvsVKXiPyYsuunoz0us5AnFVJ0Sb6c+czizvUBWJlnNl6uNMoh/CKrJl4S 7Cp8zUwJ/I3RVBBI11dWvWibOuJkkR1sJNe/jlwtMg/HAVKyq3vD+q8Y5MVttsp+8oXf HP2HIkG7Wy55LFuwCsQ+R+Rwyo174llRWQo5UqS3s2KRv+2+UhxVx5o+4dp4qYf4Jp2G edWQCDjO28k0066wfpBnHD/cTWJ/KZaUuK4TMdnUSeOSOjZHgvkZHta6c24j8333mtII 00gzXGIhoeVt4vd9LrXZap2x6+XTf+1WVqqhqW5hFy1g+JgPxveSpqFGA2is7MeK8x5k sAng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="n/bkgiLt"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i11si11475490oto.77.2019.12.16.14.21.45 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:21:45 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="n/bkgiLt"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igykK-0008IG-9W for patch@linaro.org; Mon, 16 Dec 2019 17:21:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36771) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybF-00054h-8V for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igybE-00079k-95 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:21 -0500 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:40699) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igybE-00078L-43 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:20 -0500 Received: by mail-pl1-x643.google.com with SMTP id g6so5111665plp.7 for ; Mon, 16 Dec 2019 14:12:20 -0800 (PST) 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=mulTmRahmIOLlqTACfJOIL2mZII2b44d4f9C0tQdiJE=; b=n/bkgiLtOwKptsu5Yu9ZypFXniYthcB8JwOUGpITS6/I0bEJ6z1+vRkNQXiqHRMR0Z yjQlWuCfd6HiW4SHebq+Adc7dmAVvvtlpabLmZ98E14xHoIALl7ZhBD5UXcBEujkSb45 mVwkwdC4Bi91POt177JnsVWOkIVdydQZ1q5uhCHEZwpQn5Sv+giej9Ir9JGyqggOEYNT WaWehvRr0Q/a2EVbP7QjAUkhy7mXa+Of+51XthfKYCmK6LOoUtzI/IXb9KHiS3mboM7r 0O7zqxQoWXPe0H956pmeKJm+fD5KUNF9FREPzFpy/bE34YnjzniRhCuiXGPRQXkSQp5Y B8Ug== 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=mulTmRahmIOLlqTACfJOIL2mZII2b44d4f9C0tQdiJE=; b=AVXy/UOHE4P24NkFHAFUVl4YoAy9NpD078srq4V7wOx0si5T9MIzKsbWYo2Z7RvdDU sLGpyDMHAgDf7692zizGpNirN7UGbNzkPKTLB1m0GNw/f64u4SVSiOomLDvEhz2K5sgP YCXZPyvMJdwEG32B4yXrgYWi/dT/1RRBV81xMSYAWetH8LX1SqOGKHFoihWK9ukgAPe1 xXM520A0ImZFCEGAORUtTHb6bvQB6VR0HXJU3GO2KQTbUBJCvIBMxa7ZhbfcX904YgPd lOuKVMH+l3ag0gyR13HlhVRR970saiOrzE5j9S4ku7b+qBNIB27FC6PakRD+qSj/yLWz r7bA== X-Gm-Message-State: APjAAAXfQvqEu1qi3m60WTpBT1Lat0rX3gTa54tSMsBFnr/j8CeDU0+k YgibZhIUelge5JxfYR0nCVUuYhXFu6s= X-Received: by 2002:a17:90a:ead5:: with SMTP id ev21mr1833451pjb.139.1576534338813; Mon, 16 Dec 2019 14:12:18 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:18 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 11/28] accel/tcg: Include tcg.h in tcg-runtime.c Date: Mon, 16 Dec 2019 12:11:41 -1000 Message-Id: <20191216221158.29572-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::643 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: =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Code movement in an upcoming patch will show that this file was implicitly depending on tcg.h being included indirectly. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- accel/tcg/tcg-runtime.c | 1 + 1 file changed, 1 insertion(+) -- 2.20.1 diff --git a/accel/tcg/tcg-runtime.c b/accel/tcg/tcg-runtime.c index 8a1e408e31..4ab2cf7f75 100644 --- a/accel/tcg/tcg-runtime.c +++ b/accel/tcg/tcg-runtime.c @@ -30,6 +30,7 @@ #include "exec/tb-lookup.h" #include "disas/disas.h" #include "exec/log.h" +#include "tcg.h" /* 32-bit helpers */ From patchwork Mon Dec 16 22:11:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181817 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4938501ile; Mon, 16 Dec 2019 14:24:08 -0800 (PST) X-Google-Smtp-Source: APXvYqyEcfdAbwLgqOQyiX9pY0iVcutJYSfR+LUO7KZgyYLqqtBWvnR789vqNYq1RvGsAcDWhFdF X-Received: by 2002:ac8:71d7:: with SMTP id i23mr1777837qtp.50.1576535048548; Mon, 16 Dec 2019 14:24:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576535048; cv=none; d=google.com; s=arc-20160816; b=dZsGoIPDdSD7lICQBRDaa3dHG5WfcpvUkTNDsNWMfDkP1kXbmEK/1yKNNCQpWDcnrk CL3NaegAnYUlyCoC1Yb14i9cmBMQ/wuPvmk0kOMNFPwiIF6igVdzif/jZDzk0Ba9d3Mz rgAKGWLsed/LcaI6bpi/5XL3fQj0kkMrV1G+YGgqJ5q10inQe51VHtZXTVnYk0PdLgNm 7iwrAKlQ+Tzgl0rbHbZSiY9zfxUf4rUSrpFGjWDU/mC6WqHB6i4zY+So7y+uw9PfpwvB 2wG4CdcZ/VcxLjMgNjozASC0zKncQz2hmt6QgMhilaukQ7OEDNsEg6PFg1O3RkSR+un3 2KdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=eyI58KOw8f6KjHd513cv2CHH4iBrq42PUmdQAMssFYg=; b=SXMWPv2MEJU8mvrOZlzBE8bZx81GJ2yhYSVB/sMD49HXP3ohkRLb5PHeIggFiiZTy2 7Ky0VNlMfDNiKYk8lFVjhzGpSXfZTABfAwMJCJyoByhmRM9uOrl5LaopReYWVjPMOPFO d2TsKxeXPe8RYwU67dhzIrM8dFp9PG0cEIUkv6fwEkjWDMas3pD7LvjU1elOSXbjDfkk tA8Hz2/oU0LZgK58Dkcs14YEcrWBDHq/4XHGYyJXfP54ci2dvvU/Z1BpLz900drEZLlL nNma14DZSi1H7wvij807ZwbhCAbViFu98Vi/1HoAz+SNdcDF2f0pf8N5onooMyGPhM7v O8Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y0zu4hd2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a23si7671494qvf.173.2019.12.16.14.24.08 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:24:08 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y0zu4hd2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igymd-00038T-Fv for patch@linaro.org; Mon, 16 Dec 2019 17:24:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36794) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybG-00056T-Bq for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igybF-0007BM-BW for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:22 -0500 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:45932) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igybF-0007A9-62 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:21 -0500 Received: by mail-pl1-x641.google.com with SMTP id b22so2172704pls.12 for ; Mon, 16 Dec 2019 14:12:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=eyI58KOw8f6KjHd513cv2CHH4iBrq42PUmdQAMssFYg=; b=y0zu4hd2MvQjbCLfdNsD+C6dYMaWZP37eth0V4UPELQzZbDPlQu96pEDFRSUZaV2aW s3g19xjW0pE4Q6JNNcYXCFEiCTIJFSn7/Lp6GJFarT5bfu5PwKL7iE/svpZCHmL0A6NY IZjhFZDNSmmJiNRNfZDRh4OLf/MjkNRWKfQ/+EG7fFlwT479K8cY8i+stvR2DSIX2iDs 5r0Im6ZFVZqpZUSCb28Mf0ruNqQ+plB7dcLaEuCuxoz9GR47GklxFahABRH9ZQWMLGzb uESNbM7sFkVwfmIeU/SDhc0PBhlC9tzukRZQELHMtARYK3esEQj/1ZPO4EpTIieYwPES yIag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eyI58KOw8f6KjHd513cv2CHH4iBrq42PUmdQAMssFYg=; b=V/4FfQOgfWoMZPQ8pVf5HX+uz7sP/1p+4OogJDOsB9zzDw6oime6Ki1qG0MJfteANG gpTWsU9tkNJ5imelTFIoI2Thk/InXT4fZiIQlN28NmevXDuMoQdY6vAOU2cRD1beIeUx srkKvNO9smyE0C89im8CyMz9AXbkTu7TSJ+V1gS9smZxQX0yqHT+iXKeMCjfVmS4+2Vy LAy2y/XCyLEEqMoUIgbHASKu3OzLkcSE1ehz/ABqcgGpfpwBT2vmMMA1i2u5GEGx4NVn 0Zaz4b+yiUzlQ8UAmB2NEdUi8TCofRucAcytCzccy2xI5tPbpzEs2v0aSCiEEDhEzOVi U1wg== X-Gm-Message-State: APjAAAUuPhlvXgWZV2BxEAI/Kuu9XFzzLOPltRnlLk9yMqW/D2zuMQtv paHX7glGqUYLCqjkBXP+wQ9zFrBHwWQ= X-Received: by 2002:a17:90b:3011:: with SMTP id hg17mr1950393pjb.90.1576534340021; Mon, 16 Dec 2019 14:12:20 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:19 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 12/28] linux-user: Include tcg.h in syscall.c Date: Mon, 16 Dec 2019 12:11:42 -1000 Message-Id: <20191216221158.29572-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::641 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Code movement in an upcoming patch will show that this file was implicitly depending on tcg.h being included indirectly. Signed-off-by: Richard Henderson --- linux-user/syscall.c | 1 + 1 file changed, 1 insertion(+) -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 171c0caef3..34825f15bf 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -115,6 +115,7 @@ #include "user/syscall-trace.h" #include "qapi/error.h" #include "fd-trans.h" +#include "tcg.h" #ifndef CLONE_IO #define CLONE_IO 0x80000000 /* Clone io context */ From patchwork Mon Dec 16 22:11:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181811 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4934793ile; Mon, 16 Dec 2019 14:20:49 -0800 (PST) X-Google-Smtp-Source: APXvYqyVHv8+NfVbwhFxVnmYdJUlpuZkuIb9Af2x41HPXrw2IuFuDc0PW0j6hszIwZ6+GePo8Ui1 X-Received: by 2002:a9d:32e:: with SMTP id 43mr34268002otv.301.1576534848950; Mon, 16 Dec 2019 14:20:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576534848; cv=none; d=google.com; s=arc-20160816; b=tckGMmhmu8vW82JHUlWY5Vk+fhxdliJCiNB2jiZR/GKh1R1cgXX6oWHBZQdTl2gBoW zKPOUe9hNcUOUe64tdw39z0ahhXuOpRLf5MF4BZewTyvM+HLg+UUFINKw3ezJk57WJB5 mSNNfthwWW3oYrH51SvDRSz4yoiFZxNuGMF5mbAtK0WK5COkosA5p9EvNBddanCmLPRM YKDgE9T8k5YmP4Ptq6cSyR8spvZ96Lc1eYMv1d5jnXhlHNhPzIDP/JEGqc4IfLf8Z/jC RNUf/AUiQ5u1A0CHTrOko7izwMeTpDdgPYY8+q89mpC5CRvJ+8whGHxjI99Itov7jHkK 8fgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=r5qvsiX5IA+LOMSB6fEkOOIthLDhI8Op7OL9OEMu7no=; b=kQtBa1NwpmwXINsauTnGbd15AdXw7zjuvpZO8ZJpxEbT3oegDqAgwaz2IGvxNY9+Av MwBXU/HdQyNYOhnnty7rWez9n5IbLnrl1r4qQ8D3MF35FjHrYq2M4izgWOdbphCfisY1 2O5CgEo38p1TM14j973RB1Q7B/vP8J5lPqd5wAp2TW14CyRz5FclFGrobUkoPiN9SnyO FQYL2DZ5+3UBMgj8n3U0Y049FDRGAZ3AMwonR7uk5AGjQEozHQrXNdpgz5Ti54sIlllQ QJM9HLNeer6QqpYTpiTVMAoyJ3b6Oq8aFJo49QeNqI44lPo3F3qzYtGv4WrvzZqFwDUU f5vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pzLdvcUs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 16si15075057otk.151.2019.12.16.14.20.48 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:20:48 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pzLdvcUs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igyjQ-0006pI-AO for patch@linaro.org; Mon, 16 Dec 2019 17:20:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36818) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybH-00059C-Sr for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igybG-0007Ce-UT for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:23 -0500 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:37530) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igybG-0007C5-PI for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:22 -0500 Received: by mail-pl1-x642.google.com with SMTP id c23so5122115plz.4 for ; Mon, 16 Dec 2019 14:12:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=r5qvsiX5IA+LOMSB6fEkOOIthLDhI8Op7OL9OEMu7no=; b=pzLdvcUsbhr7Gxdt6usq66C11c4ZSJHY+1CXqlvtXmuEIN1xo3nGy2DpysGwd1mASU ySXVXWvCrQO2pQ6hSFH0tQeh30lo3FyPSFV2gvIKfY0X3vmohH3iG2su8d+aKnS1/SLZ snM5VD5SrLI5aelTaxw7z0W1bYfMokv4bbw3H8eEFIOQP94SRmAEHYBYidVnsGyC4R8I b3vUwKDho8XrxkLIkbc9bujEj8LVLV7K592lkWgcaSaOWd9J2ug8KxxukUEW5CPy4wO1 8qpvAV/p5rexM6SFPlxHS+rvOHsObF0bhiLMqfp2sgmwJsD47B3uomqB5XlOHn2Nmi4y yrlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=r5qvsiX5IA+LOMSB6fEkOOIthLDhI8Op7OL9OEMu7no=; b=Ih79kdkifnJwzPTGRAIiGWIrgpRYOuaJfPaNb/GCeZc6XW3ccTOIGCYYP2ON4iInca /HXvBFpK4zanc0cT0Wg5sKU648lezBJ3v+od512otDDvdPDdDC8DCqaxW1I5+l3PQf7Y 2VI3stRamVkJyyGttqEOXKWQqyrZrDlxGGVlOlmZd3hlAHn21NaZSCxeAEEPnIUQlqPA Rt5aww3HFYYrl2PxWnr3H+rby2QTD+l+uX/E0AcbZHbWRgfRF+jX+2pjhdJTmA1Xzyib 1eHiamWZo6qifa70fzUuvHzmBAnXrKuC/QdyZhfX7n/u6j2qyWCNqDwMqbUsO4cK1AhO Mlbw== X-Gm-Message-State: APjAAAVrQso+9a3qCsnjzsGe/pC5RAqfbaXLOEsExo3ZqF0Kcj42O9Eo Ih0wGOqZdJUdXYr8g8oIRnO9xFA0PNw= X-Received: by 2002:a17:902:d708:: with SMTP id w8mr18959857ply.280.1576534341524; Mon, 16 Dec 2019 14:12:21 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:20 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 13/28] linux-user: Include trace-root.h in syscall-trace.h Date: Mon, 16 Dec 2019 12:11:43 -1000 Message-Id: <20191216221158.29572-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::642 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Code movement in an upcoming patch will show that this file was implicitly depending on trace-root.h being included beforehand. Signed-off-by: Richard Henderson --- include/user/syscall-trace.h | 2 ++ 1 file changed, 2 insertions(+) -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/include/user/syscall-trace.h b/include/user/syscall-trace.h index 9e60473643..79fd3e5aa9 100644 --- a/include/user/syscall-trace.h +++ b/include/user/syscall-trace.h @@ -10,6 +10,8 @@ #ifndef _SYSCALL_TRACE_H_ #define _SYSCALL_TRACE_H_ +#include "trace-root.h" + /* * These helpers just provide a common place for the various * subsystems that want to track syscalls to put their hooks in. We From patchwork Mon Dec 16 22:11:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181806 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4928841ile; Mon, 16 Dec 2019 14:15:06 -0800 (PST) X-Google-Smtp-Source: APXvYqxQ1Iwy4jkvoBc+zZbs3LFH6BSTyBzPMy8ZR0KBwON6J7Lg26nv/YYnnApW+bJpvNc2m6UU X-Received: by 2002:a37:7686:: with SMTP id r128mr1757750qkc.277.1576534506318; Mon, 16 Dec 2019 14:15:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576534506; cv=none; d=google.com; s=arc-20160816; b=IzzDg5FaLIKUfHnK1JyQ2plDb0YRZs0Bdhu1fHcQQCZ6t3IDQ8e6mMHpn4PNydrl3c W6z9WKnT+6rJkY/iygTm3ygwSK0T+kGc5tiGjUDp4PQAAhNR7dUzVuRgaL1Tbu/OWx6l 2sH1ZpdiObzREZ4JkBaSaaSPEwD3Gxg5KOAKQItWUyE55z6TCStIj3hvuFCeZTtFc0pk dkR6VD6LdFGfmwC3tvF2pcdEfoIH8h6C4smkchMXLTjkE3UjTm1c9EymrLuus2yBYAiw dcMVSUolKKZ79sE+jy9Njgdvn6nCCv6kny7SqWUmUYiBG67vUPiL/88ujbfx/rFDBhB6 kNkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=e7D0tfuzoU8uUsVgXAgk/gYVqQ2gabQZXbhCVY3WX4M=; b=mu0jiF8z3TiaLdOXHbUiKVjktRQnBgcsA7Qnr92KnwsdHAnHaL1hW9MHM1qIs3O+CQ QHjV6D1UDaC4pa4ARtVq9WfMFo/QxWohYjwZxAXaKMOsB9SjceqqOh4j2h9paVTSZSRB L44wt7/emzmPnUklwWXiEKruBO82eIaFbrVaSRQn1uQt+foGq3Rf4u1GvcPWHYyEq3ku 01F9QuqSDrL9m5AxU9Zp91axudVe1sx3M3EvTGjKXejtFJv7HPGw8va5+Q1T9xc6seYL OryYZbwUjxGPLALXbTkEvfYNf5na22jR0sDK2ryJFSHo5lX6rnE+7sXeHfNBJBjv3kfN KuMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E8Mr1W8N; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w19si10848746qkf.364.2019.12.16.14.15.06 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:15:06 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E8Mr1W8N; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60668 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igydt-0000J6-1w for patch@linaro.org; Mon, 16 Dec 2019 17:15:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36867) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybL-0005Eg-7D for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igybI-0007HE-SQ for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:27 -0500 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]:34967) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igybI-0007FT-JS for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:24 -0500 Received: by mail-pj1-x1044.google.com with SMTP id w23so3632031pjd.2 for ; Mon, 16 Dec 2019 14:12:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=e7D0tfuzoU8uUsVgXAgk/gYVqQ2gabQZXbhCVY3WX4M=; b=E8Mr1W8N21Ke/14XaBHdMaGsPwyg2stUe6f2f2BZRz+yiNOxwm56EveHRBOvAmHtbh 0ajdUVhOwx3MhNH8YfOHGKGz/btHF80pxjb4aMpk+SNideZGnZADE6Rxx8vvWXs00X3F aGEBpALzljgLFpS/kz9dQSswM/c9PH8k6/snhqE65oiobEDbaTj/nbdXoCUsTBlvFMDY rRCpnctkRp+aViVGMl5N9EXh/+hE6C/vsabAk4B2OXNbyquA7fgB3H0NY87uef00S3+U fTH5YE/ZzmkjUiHt7fXF1QVHXEJ3eDncs9mTRee25s0XxKsTLBnI79WWndR+YmVdcLBT zR3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=e7D0tfuzoU8uUsVgXAgk/gYVqQ2gabQZXbhCVY3WX4M=; b=QnVHGALJFMdcK+U7bdMj7hg+Bl41d/qc7bmHYQdOWd+nPKv2mcmyt7aXdOviQOxWL/ 7TM/UJMgMChjOWcfJdrnUfdA/SqmSd+mgcoQ1jBnEAgwXNlG0YMuiZnpMPVS4U53M3rL 0VJ9ogZtHykpP0mqxN/JuL98G0Qh0GeZ+Ow5E69iGbrIu/p/TV7YzVcGI6EtZ3XV3FVZ /4/rdmZ3axJGJsLl7GuGlnPDg0JkpjcOswK6AClufSqBp3o2Ib3exIEdq//Aj65BiiPM MggkVdcK8BbI/9runMLAhr8fQyF/6jTFGNML7ZpoCW8GIfjotnN0poqbQPH+y2SbUpYY tzJw== X-Gm-Message-State: APjAAAWvrs/XigtzWW14LZeSqN8se4S1EPiINEWzkTPXzVpwgfq6Wflm ei+Lr6JWXFvGxza8L60z64SI82iM3HY= X-Received: by 2002:a17:902:bf08:: with SMTP id bi8mr17763229plb.75.1576534343069; Mon, 16 Dec 2019 14:12:23 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:22 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 14/28] cputlb: Expand cpu_ldst_useronly_template.h in user-exec.c Date: Mon, 16 Dec 2019 12:11:44 -1000 Message-Id: <20191216221158.29572-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::1044 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" With the tracing hooks, the inline functions are no longer so simple. Reduce the amount of preprocessor obfuscation by expanding the text of each of the functions generated. The result is only slightly larger than the original. Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 54 +++-- include/exec/cpu_ldst_useronly_template.h | 159 --------------- accel/tcg/user-exec.c | 236 ++++++++++++++++++++++ 3 files changed, 262 insertions(+), 187 deletions(-) delete mode 100644 include/exec/cpu_ldst_useronly_template.h -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index 41b98ba801..0f3c49a005 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -120,35 +120,33 @@ static inline void clear_helper_retaddr(void) /* In user-only mode we provide only the _code and _data accessors. */ -#define MEMSUFFIX _data -#define DATA_SIZE 1 -#include "exec/cpu_ldst_useronly_template.h" +uint32_t cpu_ldub_data(CPUArchState *env, abi_ptr ptr); +uint32_t cpu_lduw_data(CPUArchState *env, abi_ptr ptr); +uint32_t cpu_ldl_data(CPUArchState *env, abi_ptr ptr); +uint64_t cpu_ldq_data(CPUArchState *env, abi_ptr ptr); +int cpu_ldsb_data(CPUArchState *env, abi_ptr ptr); +int cpu_ldsw_data(CPUArchState *env, abi_ptr ptr); -#define DATA_SIZE 2 -#include "exec/cpu_ldst_useronly_template.h" +uint32_t cpu_ldub_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t retaddr); +uint32_t cpu_lduw_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t retaddr); +uint32_t cpu_ldl_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t retaddr); +uint64_t cpu_ldq_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t retaddr); +int cpu_ldsb_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t retaddr); +int cpu_ldsw_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t retaddr); -#define DATA_SIZE 4 -#include "exec/cpu_ldst_useronly_template.h" +void cpu_stb_data(CPUArchState *env, abi_ptr ptr, uint32_t val); +void cpu_stw_data(CPUArchState *env, abi_ptr ptr, uint32_t val); +void cpu_stl_data(CPUArchState *env, abi_ptr ptr, uint32_t val); +void cpu_stq_data(CPUArchState *env, abi_ptr ptr, uint64_t val); -#define DATA_SIZE 8 -#include "exec/cpu_ldst_useronly_template.h" -#undef MEMSUFFIX - -#define MEMSUFFIX _code -#define CODE_ACCESS -#define DATA_SIZE 1 -#include "exec/cpu_ldst_useronly_template.h" - -#define DATA_SIZE 2 -#include "exec/cpu_ldst_useronly_template.h" - -#define DATA_SIZE 4 -#include "exec/cpu_ldst_useronly_template.h" - -#define DATA_SIZE 8 -#include "exec/cpu_ldst_useronly_template.h" -#undef MEMSUFFIX -#undef CODE_ACCESS +void cpu_stb_data_ra(CPUArchState *env, abi_ptr ptr, + uint32_t val, uintptr_t retaddr); +void cpu_stw_data_ra(CPUArchState *env, abi_ptr ptr, + uint32_t val, uintptr_t retaddr); +void cpu_stl_data_ra(CPUArchState *env, abi_ptr ptr, + uint32_t val, uintptr_t retaddr); +void cpu_stq_data_ra(CPUArchState *env, abi_ptr ptr, + uint64_t val, uintptr_t retaddr); /* * Provide the same *_mmuidx_ra interface as for softmmu. @@ -520,6 +518,8 @@ void cpu_stq_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint64_t val, #undef CPU_MMU_INDEX #undef MEMSUFFIX +#endif /* defined(CONFIG_USER_ONLY) */ + uint32_t cpu_ldub_code(CPUArchState *env, abi_ptr addr); uint32_t cpu_lduw_code(CPUArchState *env, abi_ptr addr); uint32_t cpu_ldl_code(CPUArchState *env, abi_ptr addr); @@ -535,8 +535,6 @@ static inline int cpu_ldsw_code(CPUArchState *env, abi_ptr addr) return (int16_t)cpu_lduw_code(env, addr); } -#endif /* defined(CONFIG_USER_ONLY) */ - /** * tlb_vaddr_to_host: * @env: CPUArchState diff --git a/include/exec/cpu_ldst_useronly_template.h b/include/exec/cpu_ldst_useronly_template.h deleted file mode 100644 index e5a3d1983a..0000000000 --- a/include/exec/cpu_ldst_useronly_template.h +++ /dev/null @@ -1,159 +0,0 @@ -/* - * User-only accessor function support - * - * Generate inline load/store functions for one data size. - * - * Generate a store function as well as signed and unsigned loads. - * - * Not used directly but included from cpu_ldst.h. - * - * Copyright (c) 2015 Linaro Limited - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, see . - */ - -#if !defined(CODE_ACCESS) -#include "trace-root.h" -#endif - -#include "trace/mem.h" - -#if DATA_SIZE == 8 -#define SUFFIX q -#define USUFFIX q -#define DATA_TYPE uint64_t -#define SHIFT 3 -#elif DATA_SIZE == 4 -#define SUFFIX l -#define USUFFIX l -#define DATA_TYPE uint32_t -#define SHIFT 2 -#elif DATA_SIZE == 2 -#define SUFFIX w -#define USUFFIX uw -#define DATA_TYPE uint16_t -#define DATA_STYPE int16_t -#define SHIFT 1 -#elif DATA_SIZE == 1 -#define SUFFIX b -#define USUFFIX ub -#define DATA_TYPE uint8_t -#define DATA_STYPE int8_t -#define SHIFT 0 -#else -#error unsupported data size -#endif - -#if DATA_SIZE == 8 -#define RES_TYPE uint64_t -#else -#define RES_TYPE uint32_t -#endif - -static inline RES_TYPE -glue(glue(cpu_ld, USUFFIX), MEMSUFFIX)(CPUArchState *env, abi_ptr ptr) -{ - RES_TYPE ret; -#ifdef CODE_ACCESS - set_helper_retaddr(1); - ret = glue(glue(ld, USUFFIX), _p)(g2h(ptr)); - clear_helper_retaddr(); -#else - MemOp op = MO_TE | SHIFT; - uint16_t meminfo = trace_mem_get_info(op, MMU_USER_IDX, false); - trace_guest_mem_before_exec(env_cpu(env), ptr, meminfo); - ret = glue(glue(ld, USUFFIX), _p)(g2h(ptr)); -#endif - return ret; -} - -#ifndef CODE_ACCESS -static inline RES_TYPE -glue(glue(glue(cpu_ld, USUFFIX), MEMSUFFIX), _ra)(CPUArchState *env, - abi_ptr ptr, - uintptr_t retaddr) -{ - RES_TYPE ret; - set_helper_retaddr(retaddr); - ret = glue(glue(cpu_ld, USUFFIX), MEMSUFFIX)(env, ptr); - clear_helper_retaddr(); - return ret; -} -#endif - -#if DATA_SIZE <= 2 -static inline int -glue(glue(cpu_lds, SUFFIX), MEMSUFFIX)(CPUArchState *env, abi_ptr ptr) -{ - int ret; -#ifdef CODE_ACCESS - set_helper_retaddr(1); - ret = glue(glue(lds, SUFFIX), _p)(g2h(ptr)); - clear_helper_retaddr(); -#else - MemOp op = MO_TE | MO_SIGN | SHIFT; - uint16_t meminfo = trace_mem_get_info(op, MMU_USER_IDX, false); - trace_guest_mem_before_exec(env_cpu(env), ptr, meminfo); - ret = glue(glue(lds, SUFFIX), _p)(g2h(ptr)); - qemu_plugin_vcpu_mem_cb(env_cpu(env), ptr, meminfo); -#endif - return ret; -} - -#ifndef CODE_ACCESS -static inline int -glue(glue(glue(cpu_lds, SUFFIX), MEMSUFFIX), _ra)(CPUArchState *env, - abi_ptr ptr, - uintptr_t retaddr) -{ - int ret; - set_helper_retaddr(retaddr); - ret = glue(glue(cpu_lds, SUFFIX), MEMSUFFIX)(env, ptr); - clear_helper_retaddr(); - return ret; -} -#endif /* CODE_ACCESS */ -#endif /* DATA_SIZE <= 2 */ - -#ifndef CODE_ACCESS -static inline void -glue(glue(cpu_st, SUFFIX), MEMSUFFIX)(CPUArchState *env, abi_ptr ptr, - RES_TYPE v) -{ - MemOp op = MO_TE | SHIFT; - uint16_t meminfo = trace_mem_get_info(op, MMU_USER_IDX, true); - trace_guest_mem_before_exec(env_cpu(env), ptr, meminfo); - glue(glue(st, SUFFIX), _p)(g2h(ptr), v); - qemu_plugin_vcpu_mem_cb(env_cpu(env), ptr, meminfo); -} - -static inline void -glue(glue(glue(cpu_st, SUFFIX), MEMSUFFIX), _ra)(CPUArchState *env, - abi_ptr ptr, - RES_TYPE v, - uintptr_t retaddr) -{ - set_helper_retaddr(retaddr); - glue(glue(cpu_st, SUFFIX), MEMSUFFIX)(env, ptr, v); - clear_helper_retaddr(); -} -#endif - -#undef RES_TYPE -#undef DATA_TYPE -#undef DATA_STYPE -#undef SUFFIX -#undef USUFFIX -#undef DATA_SIZE -#undef SHIFT diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index b09f7a1577..79da4219bb 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -26,6 +26,8 @@ #include "translate-all.h" #include "exec/helper-proto.h" #include "qemu/atomic128.h" +#include "trace-root.h" +#include "trace/mem.h" #undef EAX #undef ECX @@ -734,6 +736,240 @@ int cpu_signal_handler(int host_signum, void *pinfo, /* The softmmu versions of these helpers are in cputlb.c. */ +uint32_t cpu_ldub_data(CPUArchState *env, abi_ptr ptr) +{ + uint32_t ret; + uint16_t meminfo = trace_mem_get_info(MO_UB, MMU_USER_IDX, false); + + trace_guest_mem_before_exec(env_cpu(env), ptr, meminfo); + ret = ldub_p(g2h(ptr)); + qemu_plugin_vcpu_mem_cb(env_cpu(env), ptr, meminfo); + return ret; +} + +int cpu_ldsb_data(CPUArchState *env, abi_ptr ptr) +{ + int ret; + uint16_t meminfo = trace_mem_get_info(MO_SB, MMU_USER_IDX, false); + + trace_guest_mem_before_exec(env_cpu(env), ptr, meminfo); + ret = ldsb_p(g2h(ptr)); + qemu_plugin_vcpu_mem_cb(env_cpu(env), ptr, meminfo); + return ret; +} + +uint32_t cpu_lduw_data(CPUArchState *env, abi_ptr ptr) +{ + uint32_t ret; + uint16_t meminfo = trace_mem_get_info(MO_TEUW, MMU_USER_IDX, false); + + trace_guest_mem_before_exec(env_cpu(env), ptr, meminfo); + ret = lduw_p(g2h(ptr)); + qemu_plugin_vcpu_mem_cb(env_cpu(env), ptr, meminfo); + return ret; +} + +int cpu_ldsw_data(CPUArchState *env, abi_ptr ptr) +{ + int ret; + uint16_t meminfo = trace_mem_get_info(MO_TESW, MMU_USER_IDX, false); + + trace_guest_mem_before_exec(env_cpu(env), ptr, meminfo); + ret = ldsw_p(g2h(ptr)); + qemu_plugin_vcpu_mem_cb(env_cpu(env), ptr, meminfo); + return ret; +} + +uint32_t cpu_ldl_data(CPUArchState *env, abi_ptr ptr) +{ + uint32_t ret; + uint16_t meminfo = trace_mem_get_info(MO_TEUL, MMU_USER_IDX, false); + + trace_guest_mem_before_exec(env_cpu(env), ptr, meminfo); + ret = ldl_p(g2h(ptr)); + qemu_plugin_vcpu_mem_cb(env_cpu(env), ptr, meminfo); + return ret; +} + +uint64_t cpu_ldq_data(CPUArchState *env, abi_ptr ptr) +{ + uint64_t ret; + uint16_t meminfo = trace_mem_get_info(MO_TEQ, MMU_USER_IDX, false); + + trace_guest_mem_before_exec(env_cpu(env), ptr, meminfo); + ret = ldq_p(g2h(ptr)); + qemu_plugin_vcpu_mem_cb(env_cpu(env), ptr, meminfo); + return ret; +} + +uint32_t cpu_ldub_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t retaddr) +{ + uint32_t ret; + + set_helper_retaddr(retaddr); + ret = cpu_ldub_data(env, ptr); + clear_helper_retaddr(); + return ret; +} + +int cpu_ldsb_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t retaddr) +{ + int ret; + + set_helper_retaddr(retaddr); + ret = cpu_ldsb_data(env, ptr); + clear_helper_retaddr(); + return ret; +} + +uint32_t cpu_lduw_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t retaddr) +{ + uint32_t ret; + + set_helper_retaddr(retaddr); + ret = cpu_lduw_data(env, ptr); + clear_helper_retaddr(); + return ret; +} + +int cpu_ldsw_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t retaddr) +{ + int ret; + + set_helper_retaddr(retaddr); + ret = cpu_ldsw_data(env, ptr); + clear_helper_retaddr(); + return ret; +} + +uint32_t cpu_ldl_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t retaddr) +{ + uint32_t ret; + + set_helper_retaddr(retaddr); + ret = cpu_ldl_data(env, ptr); + clear_helper_retaddr(); + return ret; +} + +uint64_t cpu_ldq_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t retaddr) +{ + uint64_t ret; + + set_helper_retaddr(retaddr); + ret = cpu_ldq_data(env, ptr); + clear_helper_retaddr(); + return ret; +} + +void cpu_stb_data(CPUArchState *env, abi_ptr ptr, uint32_t val) +{ + uint16_t meminfo = trace_mem_get_info(MO_UB, MMU_USER_IDX, true); + + trace_guest_mem_before_exec(env_cpu(env), ptr, meminfo); + stb_p(g2h(ptr), val); + qemu_plugin_vcpu_mem_cb(env_cpu(env), ptr, meminfo); +} + +void cpu_stw_data(CPUArchState *env, abi_ptr ptr, uint32_t val) +{ + uint16_t meminfo = trace_mem_get_info(MO_TEUW, MMU_USER_IDX, true); + + trace_guest_mem_before_exec(env_cpu(env), ptr, meminfo); + stw_p(g2h(ptr), val); + qemu_plugin_vcpu_mem_cb(env_cpu(env), ptr, meminfo); +} + +void cpu_stl_data(CPUArchState *env, abi_ptr ptr, uint32_t val) +{ + uint16_t meminfo = trace_mem_get_info(MO_TEUL, MMU_USER_IDX, true); + + trace_guest_mem_before_exec(env_cpu(env), ptr, meminfo); + stl_p(g2h(ptr), val); + qemu_plugin_vcpu_mem_cb(env_cpu(env), ptr, meminfo); +} + +void cpu_stq_data(CPUArchState *env, abi_ptr ptr, uint64_t val) +{ + uint16_t meminfo = trace_mem_get_info(MO_TEQ, MMU_USER_IDX, true); + + trace_guest_mem_before_exec(env_cpu(env), ptr, meminfo); + stq_p(g2h(ptr), val); + qemu_plugin_vcpu_mem_cb(env_cpu(env), ptr, meminfo); +} + +void cpu_stb_data_ra(CPUArchState *env, abi_ptr ptr, + uint32_t val, uintptr_t retaddr) +{ + set_helper_retaddr(retaddr); + cpu_stb_data(env, ptr, val); + clear_helper_retaddr(); +} + +void cpu_stw_data_ra(CPUArchState *env, abi_ptr ptr, + uint32_t val, uintptr_t retaddr) +{ + set_helper_retaddr(retaddr); + cpu_stw_data(env, ptr, val); + clear_helper_retaddr(); +} + +void cpu_stl_data_ra(CPUArchState *env, abi_ptr ptr, + uint32_t val, uintptr_t retaddr) +{ + set_helper_retaddr(retaddr); + cpu_stl_data(env, ptr, val); + clear_helper_retaddr(); +} + +void cpu_stq_data_ra(CPUArchState *env, abi_ptr ptr, + uint64_t val, uintptr_t retaddr) +{ + set_helper_retaddr(retaddr); + cpu_stq_data(env, ptr, val); + clear_helper_retaddr(); +} + +uint32_t cpu_ldub_code(CPUArchState *env, abi_ptr ptr) +{ + uint32_t ret; + + set_helper_retaddr(1); + ret = ldub_p(g2h(ptr)); + clear_helper_retaddr(); + return ret; +} + +uint32_t cpu_lduw_code(CPUArchState *env, abi_ptr ptr) +{ + uint32_t ret; + + set_helper_retaddr(1); + ret = lduw_p(g2h(ptr)); + clear_helper_retaddr(); + return ret; +} + +uint32_t cpu_ldl_code(CPUArchState *env, abi_ptr ptr) +{ + uint32_t ret; + + set_helper_retaddr(1); + ret = ldl_p(g2h(ptr)); + clear_helper_retaddr(); + return ret; +} + +uint64_t cpu_ldq_code(CPUArchState *env, abi_ptr ptr) +{ + uint64_t ret; + + set_helper_retaddr(1); + ret = ldq_p(g2h(ptr)); + clear_helper_retaddr(); + return ret; +} + /* Do not allow unaligned operations to proceed. Return the host address. */ static void *atomic_mmu_lookup(CPUArchState *env, target_ulong addr, int size, uintptr_t retaddr) From patchwork Mon Dec 16 22:11:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181816 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4937606ile; Mon, 16 Dec 2019 14:23:20 -0800 (PST) X-Google-Smtp-Source: APXvYqyJpSm1B8MWbPatCzfgW91IPZiuzP5lxPh5dQFtnIK3jJiunk8WQPIVjX4ZbsWtRu/RG5yo X-Received: by 2002:a0c:9c86:: with SMTP id i6mr1764542qvf.214.1576535000232; Mon, 16 Dec 2019 14:23:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576535000; cv=none; d=google.com; s=arc-20160816; b=RJkcrEpI2C5inSDECshvsj21QvHqo8M6L8vLjRGYIbXLVTmsT5Z1+qpaSNGIsNSvZ4 nwtTaU08hfp+t3jiJyjKlTiCmIAIENgX742eN6XKhrKHzrOHgGuTGXwS6criPfH05q44 Xh6Mq5UpeoolPemS73YlQ3EjR5Fo7fruuxLIJmF/xU8B0s6+4kQ9UQIqG2h84hyPkvnz IOeYslQtHqMMFCdcThK3R/wRGBTanNrG1SWILxh3a5Fk8hEPJiQETjl7yXsi6iPRnlaV b+IFi1qWML5fuWu0L9g814qv3v7Ozv8LeGb+BhBKmvC1Zy7niaPfISpJ54cHkROAnC0h 7f6w== 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=ywIseiPjqJvH3CWY8/pVr57z5YPy7BfDXHEc/+9ytCA=; b=gGfIzyG3gGXv2VD3RnDnBzfej+xiF0NdoaFzMZQKLEQFHkx/1ldY8L05/tz5cnN+qH xVDlLgq3abmQ7oU8O7f7AFKTKu1qcDH3tXE06bX3vO0r1SgRNpgTgGWFabb+pVLFxJmu skRi2UF6Co58Xo9LYShWUDXvCtal8vFbc0WqXC4DLREWj93B3jpsBBU+MaORPKqZ4kKL OnOGPaP28guY02sIR7kf+AFDnQq1780al/RKaMUvK/NAkoCbaqJ8BZpprOqC+ruIjLcD uvitQrV+00fgxECZ34zt1y9QrxKd6gwz0WGWB3MdT7IBg80dG8YTW/gwpQ6+WITSyscT fofQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=sxhIcXsO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.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. [209.51.188.17]) by mx.google.com with ESMTPS id v2si10502761qtk.273.2019.12.16.14.23.20 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:23:20 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=sxhIcXsO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.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]:60844 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igylr-00028t-Ck for patch@linaro.org; Mon, 16 Dec 2019 17:23:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36877) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybL-0005Fc-O5 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igybK-0007Jn-Gx for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:27 -0500 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]:39470) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igybK-0007Ia-Bk for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:26 -0500 Received: by mail-pj1-x1042.google.com with SMTP id v93so3617202pjb.6 for ; Mon, 16 Dec 2019 14:12:26 -0800 (PST) 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=ywIseiPjqJvH3CWY8/pVr57z5YPy7BfDXHEc/+9ytCA=; b=sxhIcXsO1mDqVZ3f3lLseM6hZd8C8hvDkEk9QJWW8H4/7dW6VhtpqbSiGsg7YyeL0g bMIJSmd1I/dW3PorOBgri++JD93GQOxlmCupBZFnBXmSsLOCaQ95z2cH1EAGBy+LQ8IF RYx8CD6H0WZ7Ag4vHpuzKwu4zw5hbcbJQKWZFv0N844QA1XOAYg+tbuLWOro3tchXDVm b+/o4to59ZtVf3CMTXk/WFfOlNQKyP+zv1TpK/F0NIknpVrKdF/EnRsT1ZzMAYzxwIJU YxwYBhpjyF5GRqIbmlgW+5EjyILpk/QWpCEfZ2Kbnk0HsJz9To9leiyTch/9Pd3qIOMb CnQg== 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=ywIseiPjqJvH3CWY8/pVr57z5YPy7BfDXHEc/+9ytCA=; b=BUFNHncqRtd0+ejglq1g7tJPSgOxOGxAIv1bUrjkAnKAFIczOBh1fe/KTwp/IARUdh EzEM7wkinyHbV1DW2DH/XOIXD4W2UxMwkYP2AH9pS+nThWascun3DSzQ44Gj6indN6Jp TY5Mu6ajtcuZsH20NOkwxwEvtq7SbbqZMDtFjeS1EC6/AOvvmq7pWvFlMaxe9oRsPXwQ dVkKc0d4E5h/04Qdn/7V/il4iyUF2X7iw0pd7p7+Z2ejdLRW8dPiBJSpdPPguBsftV+0 nSew+fMoZ9JcB18a92bWTOr8HyjDrrU5MTW8QNoO1+1Tw3NpZQs+cZAicF/PnRuy6FXT 8elQ== X-Gm-Message-State: APjAAAVbWx5ID0ydTj2A0LdZ79y68ZL+D75QuDgRSEHCtF7tFTdk92Kq 5PnYRDeiSubTHCH/y8wdo9xYxBFvmNo= X-Received: by 2002:a17:902:9a42:: with SMTP id x2mr18533066plv.202.1576534345055; Mon, 16 Dec 2019 14:12:25 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:24 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 15/28] target/nios2: Remove MMU_MODE{0,1}_SUFFIX Date: Mon, 16 Dec 2019 12:11:45 -1000 Message-Id: <20191216221158.29572-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::1042 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: Marek Vasut , Chris Wulff Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The functions generated by these macros are unused. Cc: Chris Wulff Cc: Marek Vasut Signed-off-by: Richard Henderson --- target/nios2/cpu.h | 2 -- 1 file changed, 2 deletions(-) -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/target/nios2/cpu.h b/target/nios2/cpu.h index 361b06ffeb..78f633f970 100644 --- a/target/nios2/cpu.h +++ b/target/nios2/cpu.h @@ -217,8 +217,6 @@ void do_nios2_semihosting(CPUNios2State *env); #define CPU_SAVE_VERSION 1 /* MMU modes definitions */ -#define MMU_MODE0_SUFFIX _kernel -#define MMU_MODE1_SUFFIX _user #define MMU_SUPERVISOR_IDX 0 #define MMU_USER_IDX 1 From patchwork Mon Dec 16 22:11:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181821 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4942657ile; Mon, 16 Dec 2019 14:28:10 -0800 (PST) X-Google-Smtp-Source: APXvYqzkFOBY4cOjSoaOCzPwR7TgGNckwK4hxfJ81G1tlAL56W7qUgmzDCMF33ER6EjCxAHTyjPx X-Received: by 2002:ac8:5215:: with SMTP id r21mr1678965qtn.77.1576535290230; Mon, 16 Dec 2019 14:28:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576535290; cv=none; d=google.com; s=arc-20160816; b=F5VIYYV1LxmRG2aTctO/SrIRhfEh/8qw1MCPC7e9obqdvav+1GcFqHs1A/Fs5G9NBb puZOLQRD4sfxfnf+cuyOrJJxtB0tbenCVFRYlx0N9lcyLUtf2nxCDrebaYYKt3tRy7rL EediaIZcBjvDPFTxLzvI2Pqb083jf0CgPgJE71N0huBO6xOEW4c0ihGpCJID3em3Jhoh nqK0ZM6f6DC1SUZPPm312zutFZLPQtUs+Hwp5EeH+0iHbU1UoS6cARJcTlmHNOHLukjN gV9zRtvu12cnY2WRwlHu2iNcPciw26KdtCkP4Q0809ZBrje9JkiSoESeS1Uv6dQ4EcVb an1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=cdzUkCGd4j9cyI7GBjpMOiOf+nGUeT9o9Hdz62SsCpo=; b=gdvih8UAj24Sg5LMTIRS3cFBnWBwjsVSgb2lhfCxvFZLBXMiEEMkaM4oU5P3uzEMp+ KXS+RlckIGa69uZJc1B0svC7N2UPoBF/6AXOU2tFt5bnbuJdpy2sWb2wp2saq6obyH9w cuieeQ8Se89LlSyywa+JhmDY3N+Wq5rB9A9H8YEvFvyNCJTqfcovxxzQVNIVBL8Jkmhv yLu9r3MYCFT9J6L+lJc1PFGYCZbMjWHCqCHWRnige/XQmMdGve4aozSUaVGbyEwFGFyU Sk+tJNYwbie6h2i90N31imdMDU8w4y9zJtSuGiiFN6gPs96NS6ixOYZ8v8S4CRN0N4ga k6CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cV4bn0u5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n14si10273427qvf.92.2019.12.16.14.28.10 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:28:10 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cV4bn0u5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igyqX-0008Ll-M7 for patch@linaro.org; Mon, 16 Dec 2019 17:28:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36902) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybM-0005HT-QD for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igybL-0007Lx-SM for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:28 -0500 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:40946) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igybL-0007KP-Mx for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:27 -0500 Received: by mail-pg1-x543.google.com with SMTP id k25so4491111pgt.7 for ; Mon, 16 Dec 2019 14:12:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=cdzUkCGd4j9cyI7GBjpMOiOf+nGUeT9o9Hdz62SsCpo=; b=cV4bn0u5eECfrX2GrUnPV61AzcgZZE/VVrp095/QIKfcrYRjOqZ4F3k9+ChlpH9+AR nTfk7UfMUXXbGHrOCNgevSgcniQr/zGlGb11u+lbH5rWtYV2YeZc2TliVIr7oX39zZxp bRAls1ERUwHtIPdcEBHxgxAoeEKjCNlsv/PgGONfw3mwp422UfQLqH2SKKHeXikR3Ljv FV9V1shyK/vi6fKZl0oB3Cn47sI7CzU1MyQSh5dHgh2JeL2ZifdP7l3kNvyYrHFPcN4J v4qJ7181ZuDLnD2M4IExRUHq3/eyGub2QohcbMizzv0I2IKsVzyBEgfEEsEEMs8v7iaf ANJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cdzUkCGd4j9cyI7GBjpMOiOf+nGUeT9o9Hdz62SsCpo=; b=UlhHV1+JuruSHfoyhUe/NuzMmYvbAsa45HMpayLi3//arpSh9S2rcBmVGnSUy9aJ8K /XVscYicybG4MaiUTbj3kDoTfAjnVJlc9M5OdOouueyc2XmGpQEoHd47oAUZ/LXoUyuH KaMyFmoCwpYUadwdpvgz0ZwuLcHehVRZqj7i51Zo67Nn/nltfaXVahWI4KqXCp7cYzcV GnFfYe4L7t9nC8jq3kpYmR17Jm6OrTPLxGVpjJc3a/ywTTgJxqj6tUWueXEcLwdP5UUt llN5qzz8cM6I2k0ATk4u0UGkJGlcqU0Zs4cDHdok3z2VEKGpSK0xgd3U8/f/Gv4rwkVy 5bCg== X-Gm-Message-State: APjAAAX3IwlyEAVYHPNRqS+KuiSojRzGID1DcxLMMzeB2amE0/2c03o+ 561j+pNBr3VVx6cY+uUMv7grzJZk4ZU= X-Received: by 2002:a63:5056:: with SMTP id q22mr20839449pgl.20.1576534346514; Mon, 16 Dec 2019 14:12:26 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:25 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 16/28] target/alpha: Remove MMU_MODE{0,1}_SUFFIX Date: Mon, 16 Dec 2019 12:11:46 -1000 Message-Id: <20191216221158.29572-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::543 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The functions generated by these macros are unused. Signed-off-by: Richard Henderson --- target/alpha/cpu.h | 2 -- 1 file changed, 2 deletions(-) -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/target/alpha/cpu.h b/target/alpha/cpu.h index a530249a5b..3f782c0efe 100644 --- a/target/alpha/cpu.h +++ b/target/alpha/cpu.h @@ -193,8 +193,6 @@ enum { PALcode cheats and usees the KSEG mapping for its code+data rather than physical addresses. */ -#define MMU_MODE0_SUFFIX _kernel -#define MMU_MODE1_SUFFIX _user #define MMU_KERNEL_IDX 0 #define MMU_USER_IDX 1 #define MMU_PHYS_IDX 2 From patchwork Mon Dec 16 22:11:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181822 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4942906ile; Mon, 16 Dec 2019 14:28:24 -0800 (PST) X-Google-Smtp-Source: APXvYqww5tB4jnabVvUr+YpmKlH7kDv7I/vJ2MNCcjHTKQXs1d2JpCGcjf7ImWUolXZZVi/KhgnS X-Received: by 2002:a05:620a:62c:: with SMTP id 12mr1909643qkv.154.1576535304444; Mon, 16 Dec 2019 14:28:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576535304; cv=none; d=google.com; s=arc-20160816; b=eW0y3HcibsLtD/PgZfaKoQuGltKQg1iZM+bgH6f/9ZqRNmoTCyu9rxH4XxGdrU2AN5 b26zumdywThzK2kBYC3/216TAWp6zJc15/fYLe1Z96AAcGMIaC/r4yezaEv1STcOVzVC PNh9OfOc9pkyr+Oaz5iHeXeRz69uenfstLlV9xYhTf5c0e4O6OcSGzdJxEKLfISkjx6H YtbUhhsPxIZkqxfh9jUioSsbPvLV/Y6+hUrC9O1/HX9h8Vme3zsu0Tc7BZVODBCRBFn/ ZlGfTVPlRg9+JhXgmyn3LqdbAcmm3xOQf6nrO2UQyfCV1lnKmrNT+hnGBT8Od4gHOK+C yTOA== 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=s8SYA9/Rwv4ZxWRA0n9zn8WOO8ULkXoz56NCsZvZKnc=; b=P05dty+prSRqhNShrzj32aAKWI626W1DzYdS1wsMXEWQsazEC260gZFPeL1zRwzyO2 yPiUwoW8STFVNFMBrN5j8rX13sOYDcfqWoDJLp5waDTDxkX2+YpOBncgcqriUFVzZN+T A1lW7aa3hdKZicLFUArykU6s6l7sEV8qtEZM570E9Tg+7JlGla4UFHiBNuOV78PbOF5t 4jhT914HFysPxKRnTZQvucZBVO+OHh0mRRTI//8Zli4qA/TqTa7NW+F16yHTS0Z3b4SU 6TV2ivk7+hh6JJ7tsqVIkgAKK8gS8HLS0Stm8RPB6Jwaejhy8nYR73tFBF9SbINQwYTs C9aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Eq452F6Q; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i8si10119171qvo.141.2019.12.16.14.28.24 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:28:24 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Eq452F6Q; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igyql-0008Tv-Uw for patch@linaro.org; Mon, 16 Dec 2019 17:28:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36927) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybO-0005Jz-BQ for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igybN-0007Mt-9v for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:30 -0500 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:42306) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igybN-0007MW-4s for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:29 -0500 Received: by mail-pf1-x441.google.com with SMTP id 4so6369388pfz.9 for ; Mon, 16 Dec 2019 14:12:29 -0800 (PST) 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=s8SYA9/Rwv4ZxWRA0n9zn8WOO8ULkXoz56NCsZvZKnc=; b=Eq452F6QFJcMlAB8xMCNBHfJaYeilcHziFExSzehhnynRgmkLcQRSFmhq8/fDo6+QH xV7VFwuAkFDHegz+H3sNvosTQnDoMZVZ67uJL4AUR7NoI+3c6rJvs2BoPN36hIk8HZnq oANRhG7AqyApNppDuVmXWA+dcFu4u3WkAkLZIqvjZudE4eMd19AqhUvaqOSoltx34k2w 2JrKf5dF++dVddWOLrZjwc3SA28/uTLLbYmj9WIehpmkr+Aug3kkCeu7eUyThh4AEZOf qCqwDos91MJ66tgwHnW6XP18DJ1pb5ayuclPavrqHGFIwgJl9gEYqlJeYaPyr/YhP4Yh n04w== 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=s8SYA9/Rwv4ZxWRA0n9zn8WOO8ULkXoz56NCsZvZKnc=; b=jUS/1LYex/oud6S8YWjfjjQ8BsVAVfJ2vDGUGMjbAYJn72+ziJ14wETLFnIvPkh5HY giyvi9OMcxg49Knr8wQlNXiUtaCTNMBw7rVXIb1tSaOTCSsdQrn7osqUJLqoYiSZvYqY mFc4n2xFtuykfoSV9SV7Gu3/jLqbkpa5YTCY4+ta4P2uw7XaTxv2dHHAEjHjB1sV/2C1 PxwaH3aLkJ0wTQhXNuGCpQFLGd9zrumt5h6H4Z012QrKVTCU0/5eHFcjRCwLwBgqnZ7j c8Z3ewFq2wg4O6hqkWc80c12ob0lmatpSQQFBG0NiiofuhR2uUz1A9UI7jGdsDi76Gop Hcng== X-Gm-Message-State: APjAAAWoOqeVnGhTw2hFF0iyXPJStSN8iFF33kwWqBOfXhK3hXFUTm/4 nfEjBKaipi3THHJujfdGi6JfqYm9rGE= X-Received: by 2002:a63:f814:: with SMTP id n20mr20921854pgh.318.1576534347942; Mon, 16 Dec 2019 14:12:27 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:27 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 17/28] target/cris: Remove MMU_MODE{0,1}_SUFFIX Date: Mon, 16 Dec 2019 12:11:47 -1000 Message-Id: <20191216221158.29572-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::441 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: "Edgar E . Iglesias" Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The functions generated by these macros are unused. Cc: Edgar E. Iglesias Signed-off-by: Richard Henderson --- target/cris/cpu.h | 2 -- 1 file changed, 2 deletions(-) -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/target/cris/cpu.h b/target/cris/cpu.h index aba0a66474..bc43bc23a1 100644 --- a/target/cris/cpu.h +++ b/target/cris/cpu.h @@ -252,8 +252,6 @@ enum { #define cpu_signal_handler cpu_cris_signal_handler /* MMU modes definitions */ -#define MMU_MODE0_SUFFIX _kernel -#define MMU_MODE1_SUFFIX _user #define MMU_USER_IDX 1 static inline int cpu_mmu_index (CPUCRISState *env, bool ifetch) { From patchwork Mon Dec 16 22:11:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181819 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4939640ile; Mon, 16 Dec 2019 14:25:14 -0800 (PST) X-Google-Smtp-Source: APXvYqzhNH2VXHvZfzuL0DTpDW/z+uJDBNUl+q3rgCcghncLNbEUTVZOvRMad3iN7lDmWcZ+wWxh X-Received: by 2002:aca:1103:: with SMTP id 3mr729934oir.171.1576535114311; Mon, 16 Dec 2019 14:25:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576535114; cv=none; d=google.com; s=arc-20160816; b=ZrpRvMYKYcwdfTzlQBZM+B1nwG39J2yriZ5OSMnd4iwFAI6QQsmXvyMbWHjwUGqHAI u/2CGa3fjDlvZbmge7CxlSwloJZPneRfnvw6ww7BCcCDdPVKWvhV5hloVZz1mtmub30n ed7F8ZZgAsS20/HFMWk+x6Da2Kb3uNjmAVGMIfkhzHIQKwflOIuHXlqL5wCA2tbe7WdC w6wAIICVIcErblExT+u/q4AgjFZRWu+jrcLPeeAvpYZ9neSfvyuK2Qv/4wAVFo2FoXTz fttPIkSDtuW/vAPNcpQbxVfQ3SOl9sk4QmLUyUZAikgAMd1VBUgp4Fm4cxtu/G/od2QY JE0Q== 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=HC2V75/4cEYrSuehSqGFKt4qZAQdtudJE9CcEzS2ZMc=; b=Aux8uLiTjlgLP0H94ltnZqhLlNVk2NXyiK1oPL3euuCD51cQ/A8DTjiYGZ6lIurpNa YIMh5Ct01RLolQG0VZj4d45X3YqwM7eIR2vnbu7NqGg025lzRVCfgPnNG47I+nRn1YTx dMnpVLLVdz3O/CK1pIW5eUOCZg3lZmc8k+UxXe69DPX+kxufL0MLwU/oAgkeLKKfjYTl oBGIfIPSmnZr7m+epE2+Cy7TQJRe2qTglhGq/oT7e5kn33tSEjzWEaYrQghQZjjZ/MvV hfIbWI7cQ9ZJHK77AnDIf7JOCNS4QLAsypE++mbiDNikBUwDfvgTDowu1dajKWpKjQd+ axKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=mlM2O6WB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.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. [209.51.188.17]) by mx.google.com with ESMTPS id m9si124870oie.148.2019.12.16.14.25.14 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:25:14 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=mlM2O6WB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.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]:60886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igynh-0004mJ-DR for patch@linaro.org; Mon, 16 Dec 2019 17:25:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36955) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybP-0005MN-QI for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igybO-0007Pn-Op for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:31 -0500 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:39012) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igybO-0007OK-JQ for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:30 -0500 Received: by mail-pf1-x441.google.com with SMTP id 2so6376904pfx.6 for ; Mon, 16 Dec 2019 14:12:30 -0800 (PST) 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=HC2V75/4cEYrSuehSqGFKt4qZAQdtudJE9CcEzS2ZMc=; b=mlM2O6WBUH+LbGvC6aZ0uVh/Xx8YWLRuP5gAe9BB9BUTkMOoj/HWaVFP7S0ew09q1v Fz+UAJqQex/Cmt821SwQcJYd7sEfI18aGRO7oH9gcZ1XPaSyYS3dIdnmKWqc/+F5L2v2 CogC5wTLSGTvkAE+68INAkttFxM+pPVjca598vR9wQV3p0+LmrQ4VfxiLwrbtF5PTrJn kHR+7K4KTGzNstDxQURe/AlLKATZ5W6aQHWcT6Y+CiPg0ue2kiKQhOPTSJwF+9IiUvaY xhuO/DREwv4cBW4RUfki4A7aqKYVbeCq8yVxK1PVLXnVg3Ftg7aaxXBI75emE7Uzj6NP bRcA== 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=HC2V75/4cEYrSuehSqGFKt4qZAQdtudJE9CcEzS2ZMc=; b=uXfwZNVR1szCM+gCY+3/fUhvmao4WSDhzaZQobTeAZDSu7gadGKN1L96NNkyROfxKM EyPWkDIOwl1KsZoN5rVePJF8jXXEFmwGBju4geHSUyqKlJ1wn0CNU2JG65pb7shzY/Hb vJB0inXR8sP6Om85hARDoNY3gLMMZx80aPcQmFwFddIhSt6TvXCo2radKm27Sl9ypF4F cKCxATgHX//VNLLeEK0Na6/Df36HC1qnc2XUBurLqRD4bw40Wz6qHfppV09DCTLYo3Is kyfd3jRsX2r/AJoHHKtDkACxJv82ph1bJfsAuJ86oQhkRF736mAiVcPrvfW7OqPgc+ZT MjRg== X-Gm-Message-State: APjAAAUtMUFQlrL6jAFCbZ4vpU+/jTb/QrLunXcy+Q7XCC7rjH8maczO cCU+JOmoFu/odTO/DCxdM3Ss3/7G0nw= X-Received: by 2002:a63:4f59:: with SMTP id p25mr20870819pgl.230.1576534349416; Mon, 16 Dec 2019 14:12:29 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:28 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 18/28] target/i386: Remove MMU_MODE{0,1,2}_SUFFIX Date: Mon, 16 Dec 2019 12:11:48 -1000 Message-Id: <20191216221158.29572-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::441 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: Paolo Bonzini , Eduardo Habkost Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The functions generated by these macros are unused. Cc: Eduardo Habkost Acked-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target/i386/cpu.h | 3 --- 1 file changed, 3 deletions(-) -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/target/i386/cpu.h b/target/i386/cpu.h index cde2a16b94..6a8228df4f 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -1949,9 +1949,6 @@ uint64_t cpu_get_tsc(CPUX86State *env); #define cpu_list x86_cpu_list /* MMU modes definitions */ -#define MMU_MODE0_SUFFIX _ksmap -#define MMU_MODE1_SUFFIX _user -#define MMU_MODE2_SUFFIX _knosmap /* SMAP disabled or CPL<3 && AC=1 */ #define MMU_KSMAP_IDX 0 #define MMU_USER_IDX 1 #define MMU_KNOSMAP_IDX 2 From patchwork Mon Dec 16 22:11:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181824 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4944588ile; Mon, 16 Dec 2019 14:30:00 -0800 (PST) X-Google-Smtp-Source: APXvYqync+Zt/8kUrcwcl62FjFElAUsVZLd82lXwuoI/uTT6wlnrZyArbRMwhSVAjAV9pDAebdWC X-Received: by 2002:a05:620a:8cc:: with SMTP id z12mr1799366qkz.48.1576535400255; Mon, 16 Dec 2019 14:30:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576535400; cv=none; d=google.com; s=arc-20160816; b=x0zanUb3j9+Ue72qOhnfplmWkkPmHc4KWGBmaFlqps4ZpeEFGyN/6HfNXLptoJ+frJ Q/T65+C8WLPl2yyEun8kQoVBWMNK3Wl4JEjHmr7KO3MMGqFFPtaiSEF+lzWp/tARhina 7Ql8joFtsFHovicCST56Jpl4Ze+srD305YOautsNqFI+owpo7dr2QBCgx0hdm4sR9xQz 08jIVbDEeCN2+iSMon6QSoiAsP+A7npWnGhKdBRZaxrG+cJGjJM+Kg7VX19uarkK9Tsp uNlY1wCU1MlTJj6e0W1CkEhRnAB/4F7ZGsnXmdUBh/ULzHTrlW01qAkJ9sw+bcSI0K9Z CdFg== 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=1+xmXAmgTNTTPDSwdxL19l0lBXnRZdS0RxSiPt4HA6M=; b=DHfbdKznhXO/+UAayyG0YBLjoPXkKtA7rlzJn0PLgdNu7ii9LCmxieN9g7nC5lm7XW /smmg+rxDURR54P900tRLZRa521BPC9JOf7XXc1OlQl+fWo+rTiGApE+ZqQoq0/6H8kp wBoP+sj8+ibcMVhv6Vyshj/RqNY1VWvqXgTgD8GiDrzDx041jgHpnCJ2t3iq3Qf+L7T3 TQyS4IIDAWbd2sDeIESUlSFe/FDLdvSLNOZM9sK45c6a9wMxPs9VwlnSoyX6XY8j/wMO XlnBcdqkio2YjDsTQLOlMGOJrGumNGdeTHg155ADHVfQX8txKmqVY+K9fsQIX5Ir96b0 164A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ss2wj+1Z; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 20si4659097qvi.191.2019.12.16.14.30.00 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:30:00 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ss2wj+1Z; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igysJ-0001tF-O0 for patch@linaro.org; Mon, 16 Dec 2019 17:29:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36983) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybR-0005Ov-9X for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igybQ-0007Sd-9P for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:33 -0500 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:39014) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igybQ-0007Qh-3y for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:32 -0500 Received: by mail-pf1-x443.google.com with SMTP id 2so6376934pfx.6 for ; Mon, 16 Dec 2019 14:12:32 -0800 (PST) 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=1+xmXAmgTNTTPDSwdxL19l0lBXnRZdS0RxSiPt4HA6M=; b=ss2wj+1Z8IZ3MbqKwyMdrJDLtgPuMGuFfIFI2TidxBZr/ukpUfS49i2qJmmvUYs8ot Ym6CQwq4PXl1k6+cQrd+EeneimIuOzCrs4ChgYtVg7xEZRi0liy0ftvBdVk4tHANgb5d CQn8H/tyyC29FLY+DWOsWj5MszdxHwuzN8ldEtTcJoGgmoFRwPOKAkfIh7VGUptwNEWd YiMFeiROydklUhKhuLQj2x7lXmEK06RckDzmYS6sGeGhGJRGbNzfWdja4N33lWj4P0Pk QgJ9TAbJ0EmHBNMiUOunSUAGjX54IWhBv0F+R1+wIuoL8FRMKIYRCKsQvvppXG5s9fb9 3F/A== 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=1+xmXAmgTNTTPDSwdxL19l0lBXnRZdS0RxSiPt4HA6M=; b=RVAY+CLdqxbH3CCF8OEuJtx4gKHItl23NxBrnWz6CvjuaViaxSIkxNj3YL1rqrsdCn ua7qyk+0YgVbbxn5fFtQl5lM/ICSLjfGG3Nc60LOncz43YW9Dd5C/eBfWuPs9qKTX+Gk I6mTa24459JsU3uOa4F+L23Thv9kcLop1Qnn5LeOsEG65EBQOs+spw98jdrHi9Uw1CPO LeDi1o4x/d81RY7TMSGOpUMtYNqZDsfittuw3qozriIW+wBMY4Qf7aYdnva1cb3BJi/Z FWazVhd6QlmGlKFeolwFP0eQlAB2WqonzYbJ5wvap9iiuXXGjwmPHm66EgypTPf5BP37 S0gw== X-Gm-Message-State: APjAAAWQRGe45yZfrMItWqGN8TkcyHpkwVy+Mv8K4C+VZFimHqRb7IW1 wkWIsJuO2Q1nJPcoQMue2PFd7GzNZOw= X-Received: by 2002:a63:541e:: with SMTP id i30mr20553662pgb.183.1576534350881; Mon, 16 Dec 2019 14:12:30 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:30 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 19/28] target/microblaze: Remove MMU_MODE{0,1,2}_SUFFIX Date: Mon, 16 Dec 2019 12:11:49 -1000 Message-Id: <20191216221158.29572-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::443 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: "Edgar E . Iglesias" Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The functions generated by these macros are unused. Cc: Edgar E. Iglesias Signed-off-by: Richard Henderson --- target/microblaze/cpu.h | 3 --- 1 file changed, 3 deletions(-) -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index 95773089aa..32522f606b 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -328,9 +328,6 @@ int cpu_mb_signal_handler(int host_signum, void *pinfo, #define cpu_signal_handler cpu_mb_signal_handler /* MMU modes definitions */ -#define MMU_MODE0_SUFFIX _nommu -#define MMU_MODE1_SUFFIX _kernel -#define MMU_MODE2_SUFFIX _user #define MMU_NOMMU_IDX 0 #define MMU_KERNEL_IDX 1 #define MMU_USER_IDX 2 From patchwork Mon Dec 16 22:11:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181826 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4946419ile; Mon, 16 Dec 2019 14:31:41 -0800 (PST) X-Google-Smtp-Source: APXvYqyOp0PAVFuPDFsgfFS+5jiOYdzhs3roNnpCE5CRIDkCBFxDivwUE9bS/35/JiBgyUZCGMA7 X-Received: by 2002:a19:710a:: with SMTP id m10mr859822lfc.58.1576535501378; Mon, 16 Dec 2019 14:31:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576535501; cv=none; d=google.com; s=arc-20160816; b=bWvbL8x1tRqfIk8BB2GXE0n/e69aS+8N0VeK5VMDPCFAVe7p8TaKukXHVkwdKQcaHB 89ZxRstlO+yrnarmt6NJ9CVzcRUSlXVMD7MpGvHrjCocXvX8nUpaMOc/VCYXkvH4CfpE 1DU0bBOBjn0PgAyIz/B5Me47avfOlwovdypDSdfG4aEjWbVHuXttzfv0K1gDNHdBY/q0 25LUk2Y3G/BBsj76zdfYohu/v9cyzSrF7EcvGKUYJciJAQ5q/BRY4I5LuRV3M9BhlTVN 9Oi4NT73sFrnwf0LpQsBxkFq17+Dg4u99bHxE9l4Z31q5tnIzYpmGZ+OGxXSlRH4v5Fb JjRQ== 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=pZRCwuJZhFmLfLLVDEuLYlambcalO9LoW5IlxLfh4Nc=; b=EDya8kM0b3puGdql+gD52Lu758rvXRn6dsQ6Q0Ft2UXnlvvuE/K7dt2ZUjbUhU+Ntt vicrr5kIDGmk/xtc9b6xK/SwwVQEBj1PAZud5tkV+LFhZgpNN2rIINgPiS+qzafnWNU3 QM2WIc5aY+D7qzYzkqfPs4zyjZ+cr1fP/wRU0QEGzvbJzECdFNCeu83e5N1XhGT9ikeg esG1RZoXJS0RVzeoSeZvIZWoqI/13SA67JrruT939HY8jK6nAm4Ak8DvyHzIN1tpYkj0 0q89JVpkDPLCh6orHYWbejjFRb5v2HV+UgyxhDneGJmKNlPvSbtyEICtJYBHHjCk7YJS kkNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dglJnJmf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k4si16488980ljk.256.2019.12.16.14.31.41 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:31:41 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dglJnJmf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:32790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igytv-0003kM-Vf for patch@linaro.org; Mon, 16 Dec 2019 17:31:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37008) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybS-0005SH-Oo for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igybR-0007VJ-MI for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:34 -0500 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]:37907) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igybR-0007Ub-HN for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:33 -0500 Received: by mail-pj1-x1041.google.com with SMTP id l4so3622780pjt.5 for ; Mon, 16 Dec 2019 14:12:33 -0800 (PST) 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=pZRCwuJZhFmLfLLVDEuLYlambcalO9LoW5IlxLfh4Nc=; b=dglJnJmfBxX3xB4BMXIsaIDRLpLVx+xKl1JYPDYU+yI9XHOFJKSU8dy4bZ9LJz4NQF GW881Gl75Obj6HGyFpGC2v+rjDdEGPza4pk3REfZAqM9zl4jn2L9yDUtvVUNlXlSGi7L qoGS5FvSZcIKiyWqpJBYcEfPOrE7WImTdWg8/+AWOD8BLk4HhuKmfu17m4+T6KhitpUN f/Dx5siaxIKeyu6XshKXgI76ZMbGj04g6is/H0dAffaVjN8QhoeHsITpXBwuQYTDvbZa eT6anJXYUOuxKLFUiyP5qLynfiRYUaEm7Fr7QTBi0aYcWK2jOnrWUZp1I2vEpD/nU0e/ ELVg== 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=pZRCwuJZhFmLfLLVDEuLYlambcalO9LoW5IlxLfh4Nc=; b=cLGWHrhqYuxXUw0ixoLb5L90gQQnrbKh+3y8rJTo4Tbr05crvmfaLIW47iePvXLiKg aAQBWLaIrfX7k80tbdT6zFn177dcB3A/Ruw0ExQovFzBx7aK1oUmSa3WKiWWG2YRuSwq Ci3eHx4KAxVdn7+n/0Cv5GkOjNCc6YdUzZAJfQr+eqIy5XlAhCI9ho6DDbq1tp+57UTM cADeu9B3Yb7NdJ0HbebQHHovDiDDCNekp6bcxBjSRwKKsXSpkfgEZAdR3E2YAZmkjRxL to0o/hxsgOJgkBTpklekPimKV4mW3n7/WJu6VAFcvPik7PXpPreyX7KTjYqo5aHFgpl5 LImw== X-Gm-Message-State: APjAAAUBebOyGYrMW2gCkBnG7gvKHNrW0NYvCYYlGbuNbumK7EjukOz+ YF2lWeaAM/WjaTK2wRnnNDNUaZpoIaw= X-Received: by 2002:a17:902:a616:: with SMTP id u22mr5998617plq.173.1576534352309; Mon, 16 Dec 2019 14:12:32 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:31 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 20/28] target/sh4: Remove MMU_MODE{0,1}_SUFFIX Date: Mon, 16 Dec 2019 12:11:50 -1000 Message-Id: <20191216221158.29572-21-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::1041 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: Aurelien Jarno Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The functions generated by these macros are unused. Cc: Aurelien Jarno Signed-off-by: Richard Henderson --- target/sh4/cpu.h | 2 -- 1 file changed, 2 deletions(-) -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h index ecaa7a18a9..452a596e67 100644 --- a/target/sh4/cpu.h +++ b/target/sh4/cpu.h @@ -254,8 +254,6 @@ void cpu_load_tlb(CPUSH4State * env); #define cpu_list sh4_cpu_list /* MMU modes definitions */ -#define MMU_MODE0_SUFFIX _kernel -#define MMU_MODE1_SUFFIX _user #define MMU_USER_IDX 1 static inline int cpu_mmu_index (CPUSH4State *env, bool ifetch) { From patchwork Mon Dec 16 22:11:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181820 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4942266ile; Mon, 16 Dec 2019 14:27:50 -0800 (PST) X-Google-Smtp-Source: APXvYqxsjeQVG0Z32MNmUiGUq49T81g2kGOTIH2rTesG0P+HuErvz+l/N1Wo+s4zVfFzOteHQSYp X-Received: by 2002:a0c:ada3:: with SMTP id w32mr1702927qvc.99.1576535270840; Mon, 16 Dec 2019 14:27:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576535270; cv=none; d=google.com; s=arc-20160816; b=G8z5uuY64qfrJ4dM4WyhO0YjidpLnKT3YYiRRyV/8Tx36h8aQwFcs5McxYUmlCh+pM n7X/pmj9P5Uy2J0f1np8M1PVgcn+bxlEMDldrbzk7ASBHHSkZKQFK57EbyNqazzZcvNu xGYAtV4ltjJKazpMe8hEXdDM1hA0jOfXF9JQIDf9AzzEb7MwO2t2Hcu/Zdsy+Bmx4PMH Xyvg0NXP6R38c9kSU0QDZpPMu6ddGTU0dGrmGvx2CoW9qiBQR4qp72qsWNJ061fHixHP fH7tzQtrtE1sRnTql11I9zK34IdtnaXvR3Ui2fzfzXycn3vG4ZnXexkMIFDS3S0U3uB+ +Keg== 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=b1FV8qQCpJxFWsy94CcM4K8EE5MW0MHS/kAxt/18Mds=; b=bNFx13T8a4dGsDrU/Red0oZyOz9KGWpDfG0TIQj+egl9m/Ch0aD4q289CY6NRkDrV4 RAoW+cp0LxWIImSZhpuVDlNnhgwuUn7cTDD4Pu9sXpt+2/LSWmhFYraFmtz86Zm9c71I RQMVReJ5mXQTUr94nvxLqwGKadCjp7ddWMf9xk+eXNr2jhZ2IzuzCnql7/3r1h7aMD3Z xg5KrDNMxDse2lecbLHmqWJX7fIXyTcbdiohBsSkxEZ1q50s+lCRJTdTlfPAvaVJs2cQ B1fWOWIp7dQ/fJiRVnBq/LNVKQOVGE6NJXpJjZWRFhbkwVeHeQMUXkzh5YCQlbTaVp6n Jz4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Bgk4JFkN; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k3si1542465qvw.187.2019.12.16.14.27.50 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:27:50 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Bgk4JFkN; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60934 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igyqE-0007Ul-76 for patch@linaro.org; Mon, 16 Dec 2019 17:27:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37033) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybU-0005Vv-4R for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igybT-0007YB-1a for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:35 -0500 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:44038) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igybS-0007X9-SW for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:34 -0500 Received: by mail-pg1-x543.google.com with SMTP id x7so4482009pgl.11 for ; Mon, 16 Dec 2019 14:12:34 -0800 (PST) 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=b1FV8qQCpJxFWsy94CcM4K8EE5MW0MHS/kAxt/18Mds=; b=Bgk4JFkNW+sJ/dz5ELiYElrTsrz3fFLExw3bBCromDd2/Y76ofUA+rClxFN10Hgd0h HR1srAVtO5XJ9h0rqIstfAn6QhMWq+wEJJdpFiV35kkcg2p5vLJISK3GPwRb8xmxR0Xq ZK0CbS3Ol5Ia7w528KtGnhRIlt70Bp+NHhVN3ROszjSzHThGRtbxRMVOJeoWXphryGTU 2sMR/cHEsJjul+yrYQoELeBBew1snWwY2zyoiUwBmiirfs3t8zjULI2sLg29ngxIqACc MNi+VgDZtE464SNL9pJYCyf+H87GO1C6OPdDyBSFeZvF09V7f161FYedOp6fhwvHD4v/ IKoQ== 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=b1FV8qQCpJxFWsy94CcM4K8EE5MW0MHS/kAxt/18Mds=; b=cGfDVq6EjhEHy4zrfcI8825ZzWhaguAjY2KwOrhNa4EPjLF1d1U2aF8xID84cJ5+of e8HYHWuCRQ64leDpCAl0jsqrS0xFQQw3kpG+hkDEpYGZS0Cy3lBqkuwyVZLqquJjZTZj k/I1oD6mm4bdcqDbt69YxAZ9rT8yS0PhpikKLrdolUa7GHFyxzhmRhVK+iYyvtTzIB4P 5IJQKEZEVzfL+bGx/ABaOZG4A0r6aKhwKHvRrBuwe3TFK0uTz+M4BJzPevdwYJF6gm5X WzCxVmtpof5LX60NIwnwDR+yLgLfNhxlJFVQ5ri3d8bpmgxGyUMFCzL7CerUVXo+I4SV 3weQ== X-Gm-Message-State: APjAAAX2eYv21Mxf1l8T70ECOL0q4G8LZsat56pwuSQ1o93+ZCURPVoX eFEVzsCsNMy+wOkD19X2lp5ICTm3B2Y= X-Received: by 2002:a62:5202:: with SMTP id g2mr18486921pfb.43.1576534353739; Mon, 16 Dec 2019 14:12:33 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:33 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 21/28] target/unicore32: Remove MMU_MODE{0,1}_SUFFIX Date: Mon, 16 Dec 2019 12:11:51 -1000 Message-Id: <20191216221158.29572-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::543 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: Guan Xuetao Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The functions generated by these macros are unused. Cc: Guan Xuetao Signed-off-by: Richard Henderson --- target/unicore32/cpu.h | 2 -- 1 file changed, 2 deletions(-) -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/target/unicore32/cpu.h b/target/unicore32/cpu.h index 50ed9dd99c..7a32e086ed 100644 --- a/target/unicore32/cpu.h +++ b/target/unicore32/cpu.h @@ -133,8 +133,6 @@ void cpu_asr_write(CPUUniCore32State *env1, target_ulong val, target_ulong mask) int uc32_cpu_signal_handler(int host_signum, void *pinfo, void *puc); /* MMU modes definitions */ -#define MMU_MODE0_SUFFIX _kernel -#define MMU_MODE1_SUFFIX _user #define MMU_USER_IDX 1 static inline int cpu_mmu_index(CPUUniCore32State *env, bool ifetch) { From patchwork Mon Dec 16 22:11:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181809 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4932190ile; Mon, 16 Dec 2019 14:18:19 -0800 (PST) X-Google-Smtp-Source: APXvYqwwxa82mSYRYO6jSXaBkwnWZmrT6xSqcwWG4iX+h4vbg8B/hmboaRXtXqgkCx1/osI0uakM X-Received: by 2002:a05:6830:1d6a:: with SMTP id l10mr35420226oti.233.1576534698980; Mon, 16 Dec 2019 14:18:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576534698; cv=none; d=google.com; s=arc-20160816; b=kwnvTzypwFlHUOOBvpzZqflNc2+ebiFcAhmC6Qd6sMCdSEYuuzNi1/QqIYCOHDySyq y84FbUFXxeouPxuydhETRlEfUg8lHM7tg1RvT9OvINPs8YWVPhtOfF4WvyC/OraHNlEo ihBZp7vcF6x3KQwNIbz/v8OOTvSXZ63VBpyuv65irldH7977y/lUnSGmVyfs4PkMiEna Yelt67a/zfwPYp0Tn+3oORLYL4b/HhgVGPiBZi9qDK+NQUysypvCEUCZ7/KAD2p2T5+o v6q5iGbF0RT/MKPC9kz7Qj4EIIR6ioEfsHBvE0qneCdBFzThN83Qm7R1oMyhndDidnYF tJTQ== 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=RdINugPS7BTi3ugzwRFiwRgkZkC17AvAn9JuWLfSCDM=; b=A9UGOBMFPSQxWzy6bqcqtnuGa1orIuKwKFVPgs9eSccvRN3srudQ8oiKlwUGWldGLo UaONmoan7wRVcLDnsBpVZ+so+a2kkGukoXw72fexEqG4jQ+4lJInyeYV5PyISZeCdiBe EYUOaZH9p8qPbCPdbOWn3ck9uE8rCpgx5TNLKBJmhZ7OLaWkuhh1XZtIlYW2uO0Su+KP BqnHu6my1TUaz+02iUYtQN4uDFAs0DJCS83bFy2SAGphf1IIxwGKJOK1O1X/d5MCkfc2 65Nt1RXQrjzsWC9ub6qsSZpTGrspaS/FYzV9bn0bAM0MTFyZTFAyRPbXYhOYZG1YavOG WFDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MDkQ1wQI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t185si11244093oib.39.2019.12.16.14.18.18 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:18:18 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MDkQ1wQI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igygz-0003oC-MH for patch@linaro.org; Mon, 16 Dec 2019 17:18:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37059) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybV-0005Xw-Bn for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igybU-0007cc-DI for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:37 -0500 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:33964) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igybU-0007au-7z for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:36 -0500 Received: by mail-pf1-x442.google.com with SMTP id l127so4589840pfl.1 for ; Mon, 16 Dec 2019 14:12:36 -0800 (PST) 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=RdINugPS7BTi3ugzwRFiwRgkZkC17AvAn9JuWLfSCDM=; b=MDkQ1wQI5owBVSezTGfopmtJhXbnUJ9OuAadvRmCVwh+wextdJo8GNsAcBndYW2f44 GbPwTcrYLSDNpv7A3gLSxMntvrCKNWoF/y8uAuWKAV0DEZOBcVro30qQQhkd7F+SLHJQ wmZlhmMjkAqIYGMqZhvzn8rvNLqhhkAZPdFm2md616jmnsHBhPM0isCp4jBWHQsATyif vRw2jS71Lm3Tw+Y29ze1sxt0dCOqNfSD7O56ghaLB9eEylP2phCXak4aY8nJe9yIZmH7 pWZxfh7uIk5RDGrJt7Kv3vzFNXimifGKG05bnur/NdQYrH3qjXRlC9Jjcf2FqDglhSc4 kbnQ== 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=RdINugPS7BTi3ugzwRFiwRgkZkC17AvAn9JuWLfSCDM=; b=UdsYlHZCHX6D90k9npZggdkZYTqkA2dIilcMflTRNrjWEcijjcGYixQDdnMgNKwiqd RF8vQoG8ofj+fdGfTRPG/51LTHewewD/DpcRGntzzBPm3QNLNEoYibakb/7jVAxOJE1s 8VMCDxXYL+TmxULrSFJ29Cvi8OSPiSieVsMhxieKuFB2EHQX+s+NnAYfqNBgHC5K+Ohr hmTjz7p4sRdiJk3Fm/ryxmTl1jz4WNZ5+ynsAXopjWFS9LYQJu7Q1pFWxLiFm5Qfpd6c 4SjF3CpmWQaL6SwtinPcHSeC7xRWJJqjgcQ/BCqn1JvYRQjBsU6Or82+UNZO8v5i067o oBPg== X-Gm-Message-State: APjAAAXuFrGz9A5m8Q6ghQqxThrFRyXOxUGn3/swpcJjZJCrEz73xWms Jag1oF/8em8d5u5CMCJJDnFB8eqjQBg= X-Received: by 2002:a62:16d1:: with SMTP id 200mr18736289pfw.235.1576534355142; Mon, 16 Dec 2019 14:12:35 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:34 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 22/28] target/xtensa: Remove MMU_MODE{0,1,2,3}_SUFFIX Date: Mon, 16 Dec 2019 12:11:52 -1000 Message-Id: <20191216221158.29572-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::442 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: Max Filippov Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The functions generated by these macros are unused. Acked-by: Max Filippov Signed-off-by: Richard Henderson --- target/xtensa/cpu.h | 4 ---- 1 file changed, 4 deletions(-) -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/target/xtensa/cpu.h b/target/xtensa/cpu.h index b363ffcf10..f5a7ea48bb 100644 --- a/target/xtensa/cpu.h +++ b/target/xtensa/cpu.h @@ -685,10 +685,6 @@ static inline uint32_t xtensa_replicate_windowstart(CPUXtensaState *env) } /* MMU modes definitions */ -#define MMU_MODE0_SUFFIX _ring0 -#define MMU_MODE1_SUFFIX _ring1 -#define MMU_MODE2_SUFFIX _ring2 -#define MMU_MODE3_SUFFIX _ring3 #define MMU_USER_IDX 3 static inline int cpu_mmu_index(CPUXtensaState *env, bool ifetch) From patchwork Mon Dec 16 22:11:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181823 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4944103ile; Mon, 16 Dec 2019 14:29:29 -0800 (PST) X-Google-Smtp-Source: APXvYqyutlZnsQO15qyTp8Stwk/JMppIa7HcPrJ6lZoZu/3XUj1FVcYRFvRkGSHIdKwU0h+jP817 X-Received: by 2002:ac8:5513:: with SMTP id j19mr1679127qtq.143.1576535369209; Mon, 16 Dec 2019 14:29:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576535369; cv=none; d=google.com; s=arc-20160816; b=Tp2/fKtUG+60l+kAs8BS0zUYJeb0slf8je7shRq+/CX7br6fr8WqXCWXD9bB8UeGv5 ltL4VhGBYub4rhWl2HNCf8hOkPkFO3ImXzvrNhDX3+BW+Cv8B+wkQl4VQWqNGRoRYCsM 4hkyisR81fyMRxUeJWxMbJk/0jYKlN7mt/pC+n5nMlv9W1A2csOMzSyxyiDCRdn0ndcQ 78+X5cIHQqL/9cy+JxOECZx5ZT/mcSx3AKi55vWCXPUio1c7ffE+xnYn51SOUxhA4JcP T9UfFdhn8j9ULoWdlCOw01uz4W9M4+i1cuBYss861SAEC6MM7xyteANPWrE3aAXgeENz +fXg== 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=EBuG90/vK8B36Mf6d2sHl6oKF9FxUrNicyhDw+0iJQ0=; b=xVIHrSESR2ATiRfyPaNNPIl127zYm/hpUQMq7yqVHlb50y9XSmtCgUkG0bUmNV6Myy Yk3rWmHNJDCHNJgQ+i/TO8JI8SBxpPLbQIsYmHvlqWUcUXBppXfJnP/WxQ5SxMC5DCPt w5pTgqDWTOzZDmysTmZORFv+tXBP5vxJ+IgU6ELIZxD2+awoNi3j6eVPB2173zaNG+IG oTY/O3nnHKpYcbqBDQrJ5vVmHG3Eg4UyWCVgaRFwm6UCQMJIWwO2DQXb+6uQVW6Mqwbu FNOdR7cL9VS9yQ8ww0WZjbLNSrMLKC/GTHK5+x34xN+F3F9GPXARJZD2NkMPypCVfXWu tV2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=NO7k0iit; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.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. [209.51.188.17]) by mx.google.com with ESMTPS id i13si2934792qvo.203.2019.12.16.14.29.29 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:29:29 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=NO7k0iit; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.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]:60970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igyro-0001Je-MV for patch@linaro.org; Mon, 16 Dec 2019 17:29:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37091) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybX-0005bv-O1 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igybW-0007gb-62 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:39 -0500 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:40356) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igybV-0007fA-Um for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:38 -0500 Received: by mail-pf1-x444.google.com with SMTP id q8so6375364pfh.7 for ; Mon, 16 Dec 2019 14:12:37 -0800 (PST) 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=EBuG90/vK8B36Mf6d2sHl6oKF9FxUrNicyhDw+0iJQ0=; b=NO7k0iit9iUGLeZ/HIHUaYiwXpR6/W1ZMbdayoHB3bUU4u4dktb3kJ9uEk7dYESoMP reD+W9eZCOaoc2Y3OSQe9HypCtNcZ7YVwT9wwfNrFm1QsM5mJFcdpGo27nus1gV2ySxJ 2ADI1le9gJmEixAjwC5B1EuOoe6qfZOlHw7ljwu3+FdE4MCfx2SIVxgWpkGWbG0QwBKI W6vtX1j7gL8A28rMuml9EeoEqL8e4p0VbXWwusMtQYw9CWZeLMSLxqH4sPqiNKirm5+h xljpP8GFXOw6HQsUZxzWKIiM+QtNydDaXAvXzPsyPGKFOefm7oQSZxT3pdd+mcceKe1H orHA== 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=EBuG90/vK8B36Mf6d2sHl6oKF9FxUrNicyhDw+0iJQ0=; b=MQabkB5ohdrub+O34HuXkzoSLg8jkEnAQvS9fHuddJqOODLjTLw1n+xPUh94t9u21h PgiC3i6VzWNVyUhW2p3g9YyKdyyJ68+2Gljxsf/INwcYjjvzhtkt5JGmhf2qbxsVelYY D8yllHRB8hji6kqGybEu1eVjAHdV4XrjhlMXrxezaeZQtkShgYmBs95HaouGQTCNyXhe SlV3YS9XnECNqqyLJUvjEL9A/Eph8uI9rCdPO6BojpBxOnUR5h0rB/00hVzNjFA6/atp irqifRRgQjb2fXuh3pflLMzWtu+EIQLcX4JzkvKaiGUtt9H1/wEZBHRrk9HAdL1ScGm0 u8Rg== X-Gm-Message-State: APjAAAU9rInf7mq9KdGbiNqNGEHW1XcDCwHCd0d0YWXvYhGFa0KvLLII yXE3q+1bZL9JiCc4WwEwWQIUIoKRKAE= X-Received: by 2002:a63:4416:: with SMTP id r22mr21022359pga.254.1576534356610; Mon, 16 Dec 2019 14:12:36 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:36 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 23/28] target/m68k: Use cpu_*_mmuidx_ra instead of MMU_MODE{0, 1}_SUFFIX Date: Mon, 16 Dec 2019 12:11:53 -1000 Message-Id: <20191216221158.29572-24-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::444 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: Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The generated *_user functions are unused. The *_kernel functions have a couple of users in op_helper.c; use *_mmuidx_ra instead, with MMU_KERNEL_IDX. Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson --- v2: Use *_mmuidx_ra directly, without intermediate macros. --- target/m68k/cpu.h | 2 -- target/m68k/op_helper.c | 77 +++++++++++++++++++++++++---------------- 2 files changed, 47 insertions(+), 32 deletions(-) -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h index 20de3c379a..89af14e899 100644 --- a/target/m68k/cpu.h +++ b/target/m68k/cpu.h @@ -516,8 +516,6 @@ enum { #define cpu_list m68k_cpu_list /* MMU modes definitions */ -#define MMU_MODE0_SUFFIX _kernel -#define MMU_MODE1_SUFFIX _user #define MMU_KERNEL_IDX 0 #define MMU_USER_IDX 1 static inline int cpu_mmu_index (CPUM68KState *env, bool ifetch) diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c index bc4f845e3f..202498deb5 100644 --- a/target/m68k/op_helper.c +++ b/target/m68k/op_helper.c @@ -42,8 +42,8 @@ static void cf_rte(CPUM68KState *env) uint32_t fmt; sp = env->aregs[7]; - fmt = cpu_ldl_kernel(env, sp); - env->pc = cpu_ldl_kernel(env, sp + 4); + fmt = cpu_ldl_mmuidx_ra(env, sp, MMU_KERNEL_IDX, 0); + env->pc = cpu_ldl_mmuidx_ra(env, sp + 4, MMU_KERNEL_IDX, 0); sp |= (fmt >> 28) & 3; env->aregs[7] = sp + 8; @@ -58,13 +58,13 @@ static void m68k_rte(CPUM68KState *env) sp = env->aregs[7]; throwaway: - sr = cpu_lduw_kernel(env, sp); + sr = cpu_lduw_mmuidx_ra(env, sp, MMU_KERNEL_IDX, 0); sp += 2; - env->pc = cpu_ldl_kernel(env, sp); + env->pc = cpu_ldl_mmuidx_ra(env, sp, MMU_KERNEL_IDX, 0); sp += 4; if (m68k_feature(env, M68K_FEATURE_QUAD_MULDIV)) { /* all except 68000 */ - fmt = cpu_lduw_kernel(env, sp); + fmt = cpu_lduw_mmuidx_ra(env, sp, MMU_KERNEL_IDX, 0); sp += 2; switch (fmt >> 12) { case 0: @@ -260,12 +260,12 @@ static void cf_interrupt_all(CPUM68KState *env, int is_hw) /* ??? This could cause MMU faults. */ sp &= ~3; sp -= 4; - cpu_stl_kernel(env, sp, retaddr); + cpu_stl_mmuidx_ra(env, sp, retaddr, MMU_KERNEL_IDX, 0); sp -= 4; - cpu_stl_kernel(env, sp, fmt); + cpu_stl_mmuidx_ra(env, sp, fmt, MMU_KERNEL_IDX, 0); env->aregs[7] = sp; /* Jump to vector. */ - env->pc = cpu_ldl_kernel(env, env->vbr + vector); + env->pc = cpu_ldl_mmuidx_ra(env, env->vbr + vector, MMU_KERNEL_IDX, 0); } static inline void do_stack_frame(CPUM68KState *env, uint32_t *sp, @@ -278,23 +278,24 @@ static inline void do_stack_frame(CPUM68KState *env, uint32_t *sp, switch (format) { case 4: *sp -= 4; - cpu_stl_kernel(env, *sp, env->pc); + cpu_stl_mmuidx_ra(env, *sp, env->pc, MMU_KERNEL_IDX, 0); *sp -= 4; - cpu_stl_kernel(env, *sp, addr); + cpu_stl_mmuidx_ra(env, *sp, addr, MMU_KERNEL_IDX, 0); break; case 3: case 2: *sp -= 4; - cpu_stl_kernel(env, *sp, addr); + cpu_stl_mmuidx_ra(env, *sp, addr, MMU_KERNEL_IDX, 0); break; } *sp -= 2; - cpu_stw_kernel(env, *sp, (format << 12) + (cs->exception_index << 2)); + cpu_stw_mmuidx_ra(env, *sp, (format << 12) + (cs->exception_index << 2), + MMU_KERNEL_IDX, 0); } *sp -= 4; - cpu_stl_kernel(env, *sp, retaddr); + cpu_stl_mmuidx_ra(env, *sp, retaddr, MMU_KERNEL_IDX, 0); *sp -= 2; - cpu_stw_kernel(env, *sp, sr); + cpu_stw_mmuidx_ra(env, *sp, sr, MMU_KERNEL_IDX, 0); } static void m68k_interrupt_all(CPUM68KState *env, int is_hw) @@ -353,36 +354,52 @@ static void m68k_interrupt_all(CPUM68KState *env, int is_hw) cpu_abort(cs, "DOUBLE MMU FAULT\n"); } env->mmu.fault = true; + /* push data 3 */ sp -= 4; - cpu_stl_kernel(env, sp, 0); /* push data 3 */ + cpu_stl_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); + /* push data 2 */ sp -= 4; - cpu_stl_kernel(env, sp, 0); /* push data 2 */ + cpu_stl_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); + /* push data 1 */ sp -= 4; - cpu_stl_kernel(env, sp, 0); /* push data 1 */ + cpu_stl_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); + /* write back 1 / push data 0 */ sp -= 4; - cpu_stl_kernel(env, sp, 0); /* write back 1 / push data 0 */ + cpu_stl_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); + /* write back 1 address */ sp -= 4; - cpu_stl_kernel(env, sp, 0); /* write back 1 address */ + cpu_stl_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); + /* write back 2 data */ sp -= 4; - cpu_stl_kernel(env, sp, 0); /* write back 2 data */ + cpu_stl_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); + /* write back 2 address */ sp -= 4; - cpu_stl_kernel(env, sp, 0); /* write back 2 address */ + cpu_stl_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); + /* write back 3 data */ sp -= 4; - cpu_stl_kernel(env, sp, 0); /* write back 3 data */ + cpu_stl_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); + /* write back 3 address */ sp -= 4; - cpu_stl_kernel(env, sp, env->mmu.ar); /* write back 3 address */ + cpu_stl_mmuidx_ra(env, sp, env->mmu.ar, MMU_KERNEL_IDX, 0); + /* fault address */ sp -= 4; - cpu_stl_kernel(env, sp, env->mmu.ar); /* fault address */ + cpu_stl_mmuidx_ra(env, sp, env->mmu.ar, MMU_KERNEL_IDX, 0); + /* write back 1 status */ sp -= 2; - cpu_stw_kernel(env, sp, 0); /* write back 1 status */ + cpu_stw_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); + /* write back 2 status */ sp -= 2; - cpu_stw_kernel(env, sp, 0); /* write back 2 status */ + cpu_stw_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); + /* write back 3 status */ sp -= 2; - cpu_stw_kernel(env, sp, 0); /* write back 3 status */ + cpu_stw_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); + /* special status word */ sp -= 2; - cpu_stw_kernel(env, sp, env->mmu.ssw); /* special status word */ + cpu_stw_mmuidx_ra(env, sp, env->mmu.ssw, MMU_KERNEL_IDX, 0); + /* effective address */ sp -= 4; - cpu_stl_kernel(env, sp, env->mmu.ar); /* effective address */ + cpu_stl_mmuidx_ra(env, sp, env->mmu.ar, MMU_KERNEL_IDX, 0); + do_stack_frame(env, &sp, 7, oldsr, 0, retaddr); env->mmu.fault = false; if (qemu_loglevel_mask(CPU_LOG_INT)) { @@ -414,7 +431,7 @@ static void m68k_interrupt_all(CPUM68KState *env, int is_hw) env->aregs[7] = sp; /* Jump to vector. */ - env->pc = cpu_ldl_kernel(env, env->vbr + vector); + env->pc = cpu_ldl_mmuidx_ra(env, env->vbr + vector, MMU_KERNEL_IDX, 0); } static void do_interrupt_all(CPUM68KState *env, int is_hw) From patchwork Mon Dec 16 22:11:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181815 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4937453ile; Mon, 16 Dec 2019 14:23:12 -0800 (PST) X-Google-Smtp-Source: APXvYqwMZgId5C4XdQ4EJFOfytp5R4f5WmXex5n0Z7G54zrv95QMZHe5EQ3/qsc8qy53XupG7Z4R X-Received: by 2002:a37:ba04:: with SMTP id k4mr1869996qkf.74.1576534992565; Mon, 16 Dec 2019 14:23:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576534992; cv=none; d=google.com; s=arc-20160816; b=PF0oNTU6aD9Ox1yHJ2cdxTYR71V1IY1CQCZf076ffq5IPAu2mHb4oZHRSgXbecgAGN aKCwmJkYTYo/CrAF/0XaZiGvlU4S8oE1Szsfrr4RLl54GfO6d6vPWEe5hjL21/EHURPY gJFQV8Tdn4fTROdW00nUkr29YVjys9O3uXLwo0HxGVf8WWERwi5uem3/le6NdjY2zAQb EbR/DY8XywapxLxNT+M6iM/fZQGovKpbEjMgQeW51vPCfxy6cGAiBN6Wlz7ZnVbaPLVP H4leKm69p+4OjWrvAXmfB4/obdyZGKOGBETxlbir1G2BNFy6c/+txrqLfpy0gseZ/1sp vsVA== 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=XtJdqyLi6EEA8LSZvbXqiDPHZfLt+fS53VoCcJ6uOsI=; b=SQvzXvG/rQqGbGTqJJlKI/OnkeD9zw1m93+5FtYbQesnCh53M12Z0XpcI8idx0LYIY akHZG7gRc9iEoe2qedo9eQfkAr8TCaqfbRecpsjiYHxIMoif1miQXIljdCdBTmXOucR2 BAXw9bLLsUIMsdQe+qiOv6bPk6otvQZfYEY5CldchnM0wcMG5I/Y/r8DiPWZaCeeJ4W2 93OjKVaxKrillRcX0pNYuZ+kQUMBUsCLTdUpaE4fkXPxsA76htFgk4cjZtlU5inX0Lo0 Dnmr0T/9apXR/DJcm5LVHEeKPSNZZJWDiIA0jhoNK1RuX7BFzo3OKghY5r6InHOc0gs8 se4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=XJLRWK8q; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.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. [209.51.188.17]) by mx.google.com with ESMTPS id r1si8869483qtf.387.2019.12.16.14.23.12 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:23:12 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=XJLRWK8q; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.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]:60848 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igylj-0002Ht-Gz for patch@linaro.org; Mon, 16 Dec 2019 17:23:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37116) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybZ-0005fA-Kl for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igybX-0007kN-O4 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:41 -0500 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:46380) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igybX-0007jN-GJ for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:39 -0500 Received: by mail-pl1-x643.google.com with SMTP id k20so5103112pll.13 for ; Mon, 16 Dec 2019 14:12:39 -0800 (PST) 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=XtJdqyLi6EEA8LSZvbXqiDPHZfLt+fS53VoCcJ6uOsI=; b=XJLRWK8q8cz2kAvYvSD9kiDQmkNpb/poR4cPgyikNKbHjtfwYPxe8gF0OhTN9K412F p0A63UmWwZ0Hxptb28DJH97qCJpZFtl4SXgPK6BFsK8UTeGV8POetaiddUaoANovwv2T dJ594RQqGL/iCsbRgspWGxQZid+OaADt6nma8WQcYVnQZsqEw7LkC6d65BlN8dOwbKah PLhZ5VvDiHl9nejMso+Fk1i0bt/MeWvhrB2PdV0Uz5wvVTUajwVyrgIkVgVSi+QoCDsj S3ILxwsf+lEv9HBHHOMU2WhAcaNi8GSZkIetoKPYypXEe6FGNX30Gdfd3oBQBXirpC3E /yHw== 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=XtJdqyLi6EEA8LSZvbXqiDPHZfLt+fS53VoCcJ6uOsI=; b=oknD8zCUyn8Mfh3HAOPM+r2ZIRMcK5OfqMv1AZWkxGtbpXsU9aqPQE45mEoGOC/w7t hnHHjIhKiZJX8dMcJ97BagCSyGaePMdTzL+euIYXUwGKYCVJJDE+fCTUR9zVWa3DpW5I I98QwNGuZGY1JehrFeDQz/SST1N5eMmBP40RG5H2g8XHHDbBYnpQBwUBteVWapTVt7TR ptduDhPH+vKK1AxG6+Xm4yWcw6WVRWE+O7Z6wGY+Jg4WbmlfvtMMcDmcnuzDucv/D1YC GUVkwmltrOCder7y1Ik1Q+cj/psM8ggMjXnqOmcNS3UXGPKLmbkkhCxb/cTKgEo6mJ8P oaHA== X-Gm-Message-State: APjAAAWEOrTdGzm949xo+D/TLmk2HK22JR4nl+kxDExZdFis/TkSKOrV i02xgT6sbgg1C+hL/CRr1++mxm/ntGg= X-Received: by 2002:a17:902:8c91:: with SMTP id t17mr18368521plo.225.1576534358128; Mon, 16 Dec 2019 14:12:38 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:37 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 24/28] target/mips: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX Date: Mon, 16 Dec 2019 12:11:54 -1000 Message-Id: <20191216221158.29572-25-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::643 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: Aleksandar Rikalo , Aleksandar Markovic , Aurelien Jarno Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The separate suffixed functions were used to construct some do_##insn function switched on mmu_idx. The interface is exactly identical to the *_mmuidx_ra functions. Replace them directly and remove the constructions. Cc: Aurelien Jarno Cc: Aleksandar Rikalo Reviewed-by: Aleksandar Markovic Signed-off-by: Richard Henderson --- target/mips/cpu.h | 4 - target/mips/op_helper.c | 182 +++++++++++++--------------------------- 2 files changed, 60 insertions(+), 126 deletions(-) -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/target/mips/cpu.h b/target/mips/cpu.h index ca00f41daf..c218ccc4a8 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -1147,10 +1147,6 @@ extern uint32_t cpu_rddsp(uint32_t mask_num, CPUMIPSState *env); * MMU modes definitions. We carefully match the indices with our * hflags layout. */ -#define MMU_MODE0_SUFFIX _kernel -#define MMU_MODE1_SUFFIX _super -#define MMU_MODE2_SUFFIX _user -#define MMU_MODE3_SUFFIX _error #define MMU_USER_IDX 2 static inline int hflags_mmu_index(uint32_t hflags) diff --git a/target/mips/op_helper.c b/target/mips/op_helper.c index 18fcee4a78..79d44da6fa 100644 --- a/target/mips/op_helper.c +++ b/target/mips/op_helper.c @@ -52,69 +52,6 @@ static void raise_exception(CPUMIPSState *env, uint32_t exception) do_raise_exception(env, exception, 0); } -#if defined(CONFIG_USER_ONLY) -#define HELPER_LD(name, insn, type) \ -static inline type do_##name(CPUMIPSState *env, target_ulong addr, \ - int mem_idx, uintptr_t retaddr) \ -{ \ - return (type) cpu_##insn##_data_ra(env, addr, retaddr); \ -} -#else -#define HELPER_LD(name, insn, type) \ -static inline type do_##name(CPUMIPSState *env, target_ulong addr, \ - int mem_idx, uintptr_t retaddr) \ -{ \ - switch (mem_idx) { \ - case 0: return (type) cpu_##insn##_kernel_ra(env, addr, retaddr); \ - case 1: return (type) cpu_##insn##_super_ra(env, addr, retaddr); \ - default: \ - case 2: return (type) cpu_##insn##_user_ra(env, addr, retaddr); \ - case 3: return (type) cpu_##insn##_error_ra(env, addr, retaddr); \ - } \ -} -#endif -HELPER_LD(lw, ldl, int32_t) -#if defined(TARGET_MIPS64) -HELPER_LD(ld, ldq, int64_t) -#endif -#undef HELPER_LD - -#if defined(CONFIG_USER_ONLY) -#define HELPER_ST(name, insn, type) \ -static inline void do_##name(CPUMIPSState *env, target_ulong addr, \ - type val, int mem_idx, uintptr_t retaddr) \ -{ \ - cpu_##insn##_data_ra(env, addr, val, retaddr); \ -} -#else -#define HELPER_ST(name, insn, type) \ -static inline void do_##name(CPUMIPSState *env, target_ulong addr, \ - type val, int mem_idx, uintptr_t retaddr) \ -{ \ - switch (mem_idx) { \ - case 0: \ - cpu_##insn##_kernel_ra(env, addr, val, retaddr); \ - break; \ - case 1: \ - cpu_##insn##_super_ra(env, addr, val, retaddr); \ - break; \ - default: \ - case 2: \ - cpu_##insn##_user_ra(env, addr, val, retaddr); \ - break; \ - case 3: \ - cpu_##insn##_error_ra(env, addr, val, retaddr); \ - break; \ - } \ -} -#endif -HELPER_ST(sb, stb, uint8_t) -HELPER_ST(sw, stl, uint32_t) -#if defined(TARGET_MIPS64) -HELPER_ST(sd, stq, uint64_t) -#endif -#undef HELPER_ST - /* 64 bits arithmetic for 32 bits hosts */ static inline uint64_t get_HILO(CPUMIPSState *env) { @@ -379,12 +316,12 @@ target_ulong helper_##name(CPUMIPSState *env, target_ulong arg, int mem_idx) \ } \ env->CP0_LLAddr = do_translate_address(env, arg, 0, GETPC()); \ env->lladdr = arg; \ - env->llval = do_##insn(env, arg, mem_idx, GETPC()); \ + env->llval = cpu_##insn##_mmuidx_ra(env, arg, mem_idx, GETPC()); \ return env->llval; \ } -HELPER_LD_ATOMIC(ll, lw, 0x3) +HELPER_LD_ATOMIC(ll, ldl, 0x3) #ifdef TARGET_MIPS64 -HELPER_LD_ATOMIC(lld, ld, 0x7) +HELPER_LD_ATOMIC(lld, ldq, 0x7) #endif #undef HELPER_LD_ATOMIC #endif @@ -400,42 +337,42 @@ HELPER_LD_ATOMIC(lld, ld, 0x7) void helper_swl(CPUMIPSState *env, target_ulong arg1, target_ulong arg2, int mem_idx) { - do_sb(env, arg2, (uint8_t)(arg1 >> 24), mem_idx, GETPC()); + cpu_stb_mmuidx_ra(env, arg2, (uint8_t)(arg1 >> 24), mem_idx, GETPC()); if (GET_LMASK(arg2) <= 2) { - do_sb(env, GET_OFFSET(arg2, 1), (uint8_t)(arg1 >> 16), mem_idx, - GETPC()); + cpu_stb_mmuidx_ra(env, GET_OFFSET(arg2, 1), (uint8_t)(arg1 >> 16), + mem_idx, GETPC()); } if (GET_LMASK(arg2) <= 1) { - do_sb(env, GET_OFFSET(arg2, 2), (uint8_t)(arg1 >> 8), mem_idx, - GETPC()); + cpu_stb_mmuidx_ra(env, GET_OFFSET(arg2, 2), (uint8_t)(arg1 >> 8), + mem_idx, GETPC()); } if (GET_LMASK(arg2) == 0) { - do_sb(env, GET_OFFSET(arg2, 3), (uint8_t)arg1, mem_idx, - GETPC()); + cpu_stb_mmuidx_ra(env, GET_OFFSET(arg2, 3), (uint8_t)arg1, + mem_idx, GETPC()); } } void helper_swr(CPUMIPSState *env, target_ulong arg1, target_ulong arg2, int mem_idx) { - do_sb(env, arg2, (uint8_t)arg1, mem_idx, GETPC()); + cpu_stb_mmuidx_ra(env, arg2, (uint8_t)arg1, mem_idx, GETPC()); if (GET_LMASK(arg2) >= 1) { - do_sb(env, GET_OFFSET(arg2, -1), (uint8_t)(arg1 >> 8), mem_idx, - GETPC()); + cpu_stb_mmuidx_ra(env, GET_OFFSET(arg2, -1), (uint8_t)(arg1 >> 8), + mem_idx, GETPC()); } if (GET_LMASK(arg2) >= 2) { - do_sb(env, GET_OFFSET(arg2, -2), (uint8_t)(arg1 >> 16), mem_idx, - GETPC()); + cpu_stb_mmuidx_ra(env, GET_OFFSET(arg2, -2), (uint8_t)(arg1 >> 16), + mem_idx, GETPC()); } if (GET_LMASK(arg2) == 3) { - do_sb(env, GET_OFFSET(arg2, -3), (uint8_t)(arg1 >> 24), mem_idx, - GETPC()); + cpu_stb_mmuidx_ra(env, GET_OFFSET(arg2, -3), (uint8_t)(arg1 >> 24), + mem_idx, GETPC()); } } @@ -453,82 +390,82 @@ void helper_swr(CPUMIPSState *env, target_ulong arg1, target_ulong arg2, void helper_sdl(CPUMIPSState *env, target_ulong arg1, target_ulong arg2, int mem_idx) { - do_sb(env, arg2, (uint8_t)(arg1 >> 56), mem_idx, GETPC()); + cpu_stb_mmuidx_ra(env, arg2, (uint8_t)(arg1 >> 56), mem_idx, GETPC()); if (GET_LMASK64(arg2) <= 6) { - do_sb(env, GET_OFFSET(arg2, 1), (uint8_t)(arg1 >> 48), mem_idx, - GETPC()); + cpu_stb_mmuidx_ra(env, GET_OFFSET(arg2, 1), (uint8_t)(arg1 >> 48), + mem_idx, GETPC()); } if (GET_LMASK64(arg2) <= 5) { - do_sb(env, GET_OFFSET(arg2, 2), (uint8_t)(arg1 >> 40), mem_idx, - GETPC()); + cpu_stb_mmuidx_ra(env, GET_OFFSET(arg2, 2), (uint8_t)(arg1 >> 40), + mem_idx, GETPC()); } if (GET_LMASK64(arg2) <= 4) { - do_sb(env, GET_OFFSET(arg2, 3), (uint8_t)(arg1 >> 32), mem_idx, - GETPC()); + cpu_stb_mmuidx_ra(env, GET_OFFSET(arg2, 3), (uint8_t)(arg1 >> 32), + mem_idx, GETPC()); } if (GET_LMASK64(arg2) <= 3) { - do_sb(env, GET_OFFSET(arg2, 4), (uint8_t)(arg1 >> 24), mem_idx, - GETPC()); + cpu_stb_mmuidx_ra(env, GET_OFFSET(arg2, 4), (uint8_t)(arg1 >> 24), + mem_idx, GETPC()); } if (GET_LMASK64(arg2) <= 2) { - do_sb(env, GET_OFFSET(arg2, 5), (uint8_t)(arg1 >> 16), mem_idx, - GETPC()); + cpu_stb_mmuidx_ra(env, GET_OFFSET(arg2, 5), (uint8_t)(arg1 >> 16), + mem_idx, GETPC()); } if (GET_LMASK64(arg2) <= 1) { - do_sb(env, GET_OFFSET(arg2, 6), (uint8_t)(arg1 >> 8), mem_idx, - GETPC()); + cpu_stb_mmuidx_ra(env, GET_OFFSET(arg2, 6), (uint8_t)(arg1 >> 8), + mem_idx, GETPC()); } if (GET_LMASK64(arg2) <= 0) { - do_sb(env, GET_OFFSET(arg2, 7), (uint8_t)arg1, mem_idx, - GETPC()); + cpu_stb_mmuidx_ra(env, GET_OFFSET(arg2, 7), (uint8_t)arg1, + mem_idx, GETPC()); } } void helper_sdr(CPUMIPSState *env, target_ulong arg1, target_ulong arg2, int mem_idx) { - do_sb(env, arg2, (uint8_t)arg1, mem_idx, GETPC()); + cpu_stb_mmuidx_ra(env, arg2, (uint8_t)arg1, mem_idx, GETPC()); if (GET_LMASK64(arg2) >= 1) { - do_sb(env, GET_OFFSET(arg2, -1), (uint8_t)(arg1 >> 8), mem_idx, - GETPC()); + cpu_stb_mmuidx_ra(env, GET_OFFSET(arg2, -1), (uint8_t)(arg1 >> 8), + mem_idx, GETPC()); } if (GET_LMASK64(arg2) >= 2) { - do_sb(env, GET_OFFSET(arg2, -2), (uint8_t)(arg1 >> 16), mem_idx, - GETPC()); + cpu_stb_mmuidx_ra(env, GET_OFFSET(arg2, -2), (uint8_t)(arg1 >> 16), + mem_idx, GETPC()); } if (GET_LMASK64(arg2) >= 3) { - do_sb(env, GET_OFFSET(arg2, -3), (uint8_t)(arg1 >> 24), mem_idx, - GETPC()); + cpu_stb_mmuidx_ra(env, GET_OFFSET(arg2, -3), (uint8_t)(arg1 >> 24), + mem_idx, GETPC()); } if (GET_LMASK64(arg2) >= 4) { - do_sb(env, GET_OFFSET(arg2, -4), (uint8_t)(arg1 >> 32), mem_idx, - GETPC()); + cpu_stb_mmuidx_ra(env, GET_OFFSET(arg2, -4), (uint8_t)(arg1 >> 32), + mem_idx, GETPC()); } if (GET_LMASK64(arg2) >= 5) { - do_sb(env, GET_OFFSET(arg2, -5), (uint8_t)(arg1 >> 40), mem_idx, - GETPC()); + cpu_stb_mmuidx_ra(env, GET_OFFSET(arg2, -5), (uint8_t)(arg1 >> 40), + mem_idx, GETPC()); } if (GET_LMASK64(arg2) >= 6) { - do_sb(env, GET_OFFSET(arg2, -6), (uint8_t)(arg1 >> 48), mem_idx, - GETPC()); + cpu_stb_mmuidx_ra(env, GET_OFFSET(arg2, -6), (uint8_t)(arg1 >> 48), + mem_idx, GETPC()); } if (GET_LMASK64(arg2) == 7) { - do_sb(env, GET_OFFSET(arg2, -7), (uint8_t)(arg1 >> 56), mem_idx, - GETPC()); + cpu_stb_mmuidx_ra(env, GET_OFFSET(arg2, -7), (uint8_t)(arg1 >> 56), + mem_idx, GETPC()); } } #endif /* TARGET_MIPS64 */ @@ -546,14 +483,14 @@ void helper_lwm(CPUMIPSState *env, target_ulong addr, target_ulong reglist, for (i = 0; i < base_reglist; i++) { env->active_tc.gpr[multiple_regs[i]] = - (target_long)do_lw(env, addr, mem_idx, GETPC()); + (target_long)cpu_ldl_mmuidx_ra(env, addr, mem_idx, GETPC()); addr += 4; } } if (do_r31) { - env->active_tc.gpr[31] = (target_long)do_lw(env, addr, mem_idx, - GETPC()); + env->active_tc.gpr[31] = + (target_long)cpu_ldl_mmuidx_ra(env, addr, mem_idx, GETPC()); } } @@ -567,14 +504,14 @@ void helper_swm(CPUMIPSState *env, target_ulong addr, target_ulong reglist, target_ulong i; for (i = 0; i < base_reglist; i++) { - do_sw(env, addr, env->active_tc.gpr[multiple_regs[i]], mem_idx, - GETPC()); + cpu_stw_mmuidx_ra(env, addr, env->active_tc.gpr[multiple_regs[i]], + mem_idx, GETPC()); addr += 4; } } if (do_r31) { - do_sw(env, addr, env->active_tc.gpr[31], mem_idx, GETPC()); + cpu_stw_mmuidx_ra(env, addr, env->active_tc.gpr[31], mem_idx, GETPC()); } } @@ -589,14 +526,15 @@ void helper_ldm(CPUMIPSState *env, target_ulong addr, target_ulong reglist, target_ulong i; for (i = 0; i < base_reglist; i++) { - env->active_tc.gpr[multiple_regs[i]] = do_ld(env, addr, mem_idx, - GETPC()); + env->active_tc.gpr[multiple_regs[i]] = + cpu_ldq_mmuidx_ra(env, addr, mem_idx, GETPC()); addr += 8; } } if (do_r31) { - env->active_tc.gpr[31] = do_ld(env, addr, mem_idx, GETPC()); + env->active_tc.gpr[31] = + cpu_ldq_mmuidx_ra(env, addr, mem_idx, GETPC()); } } @@ -610,14 +548,14 @@ void helper_sdm(CPUMIPSState *env, target_ulong addr, target_ulong reglist, target_ulong i; for (i = 0; i < base_reglist; i++) { - do_sd(env, addr, env->active_tc.gpr[multiple_regs[i]], mem_idx, - GETPC()); + cpu_stq_mmuidx_ra(env, addr, env->active_tc.gpr[multiple_regs[i]], + mem_idx, GETPC()); addr += 8; } } if (do_r31) { - do_sd(env, addr, env->active_tc.gpr[31], mem_idx, GETPC()); + cpu_stq_mmuidx_ra(env, addr, env->active_tc.gpr[31], mem_idx, GETPC()); } } #endif From patchwork Mon Dec 16 22:11:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181814 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4937439ile; Mon, 16 Dec 2019 14:23:12 -0800 (PST) X-Google-Smtp-Source: APXvYqwHvReqGN5FIiVv4lIJ2ZHCoQLSq4BjA4w9tt9bralP1YHXAHr45oBE7x5KXDv+yx8JE3Kf X-Received: by 2002:ac8:4446:: with SMTP id m6mr1723289qtn.159.1576534991948; Mon, 16 Dec 2019 14:23:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576534991; cv=none; d=google.com; s=arc-20160816; b=xR2zt21vvmtTq7w10JBHFNwYSygUqR658LnRiOVOQMuqwBqvwcPY68NS7DrPDFT+Ai G2veFcrpn60pUkY6r0U9KP8eslJjGWhMRGjqbphBRFbfTwoPf9JRSBJ6YNSYdAg+rxwB 4V54GEyZeQSF0A0gPGbzdWMBfjHNC8cy4/68QJhg1nT2qlCNSGiBzksoerhCAZviD2pE Wee1erb/ZF3xM2zwwG1t7lfNaVbLMUOkPP2k7UoOsLhxzKra+3k7x3CzahNBV2dqyPlq y7dTXT2KXYSv6Gx0Tdmh2VMAw5RicDX3Ysg51VRnTprWwfeFtm4+5i2PH+N8Y86Bjl0E r/bw== 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=X2GZDJtWgjhwatqn2siyQYT3flCAUk5Su3sfOLoNGxk=; b=jLEB3F0whN8EVy0RXsDEdEFkclynFVKhqKh66iAEu5gPcsKV6esKk8CbmlBpq3sE/D 4pQ7as/FncpgOHIlCaPG2X3hSOPSN0EhTEP9CeFCfegVcjXBamKKbxISDyoUPxy65iXY jafoDuhpjBIaMq680t9zw6H36TXtK0aWiOkYGWw/w8t+NM/9/Ilmu7xz1aoK1C64iY3r VvNpHLzEWIhm2wZfJwF3eOava4R8GIXJkg/56Ihpo0APz9svE8HRgfxdgYzX3Fbd5jHW qsaYeefkkLLMnKJP5BqIMpBQjXzTlYiJIiDKlDPNSgMpCRpf847SwO6XXMVnCGJOqPC8 EZMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=t+e5ujur; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j4si10084229qtq.307.2019.12.16.14.23.11 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:23:11 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=t+e5ujur; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igylj-0001tY-0e for patch@linaro.org; Mon, 16 Dec 2019 17:23:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37127) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igyba-0005gk-I8 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igybZ-0007m5-9a for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:42 -0500 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:42391) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igybZ-0007ks-43 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:41 -0500 Received: by mail-pl1-x642.google.com with SMTP id p9so871716plk.9 for ; Mon, 16 Dec 2019 14:12:41 -0800 (PST) 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=X2GZDJtWgjhwatqn2siyQYT3flCAUk5Su3sfOLoNGxk=; b=t+e5ujurwJrOUDpMki+lqYnE3+1m/6DAiFZyKPGMkyfwalrDOFuuxbCLxvJV9aA3Ug FRI7V0fGhwYMKckurFUWWesyQVqQ3BtphfSfR82juA6XkJsWWbfWV87J0bI0m1sHsrFV 0fyCDoiW5Vg8b7cGf7TfgGFOCr6oA1PLSEQ8Y/2wDoe+QtVeUOa7vugyDTgT0yQsYzRA DP/6NAQLDe9zJL5vLUYwdcEnAOkvmDebYKMqI8OhY6WnRcjCGBjfuBzcGC7eyfMk6DX4 5jNO+E8h+4F0GeONeORCIpm8lGhU3tjm7q8oBh8u/1xXDwdmu2j3nhdY4hcbYH9IerfL qFxA== 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=X2GZDJtWgjhwatqn2siyQYT3flCAUk5Su3sfOLoNGxk=; b=l+PzOWfQJsx4numtfYL229eeAeu3BAQQa5EJDfYZxDMHGBzxRgHd4drE8Zc2m5245S oIQayqzB+qJMuNU/NiwPxe2CTDWsxKhlS5UEHrg01C84jjex782f28UBXJfuA9yVuGjV MJ0GvYVcRI4x+fp/sxZwctT8c4QGKVN/zqZkLBMTGEc1Ci7wORrBlInsQrjakq7ujgRO VVImpw9Lz7aYYoHKhf+cnZerEmVHzmjGkZPxH0c1kqgFp2Fm+nZokrSZSIoL9nsWmE7v ycKnLm7DpVgfKD0ETERAqDmQvw9j57IRQtizr9qbv+VDcf5Eg8Q9N05wKmB/9hpongpT 54sQ== X-Gm-Message-State: APjAAAUIjNIdX5ukXwVj/XmcHufCyrNHjyYhGfxgWIp1a13OdRBaFmW7 o+BHouON2vh2FGWJbBOymQoexkdgRH8= X-Received: by 2002:a17:902:b418:: with SMTP id x24mr18748104plr.85.1576534359856; Mon, 16 Dec 2019 14:12:39 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:39 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 25/28] target/s390x: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX Date: Mon, 16 Dec 2019 12:11:55 -1000 Message-Id: <20191216221158.29572-26-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::642 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: David Hildenbrand Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The generated functions aside from *_real are unused. The *_real functions have a couple of users in mem_helper.c; use *_mmuidx_ra instead, with MMU_REAL_IDX. Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson --- v2: Use *_mmuidx_ra directly, without intermediate macros. --- target/s390x/cpu.h | 5 ----- target/s390x/mem_helper.c | 21 ++++++++++++--------- 2 files changed, 12 insertions(+), 14 deletions(-) -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index aa829e954c..cfa8a81265 100644 --- a/target/s390x/cpu.h +++ b/target/s390x/cpu.h @@ -36,11 +36,6 @@ #define TARGET_INSN_START_EXTRA_WORDS 2 -#define MMU_MODE0_SUFFIX _primary -#define MMU_MODE1_SUFFIX _secondary -#define MMU_MODE2_SUFFIX _home -#define MMU_MODE3_SUFFIX _real - #define MMU_USER_IDX 0 #define S390_MAX_CPUS 248 diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 57ce17c252..6f4a16b9b2 100644 --- a/target/s390x/mem_helper.c +++ b/target/s390x/mem_helper.c @@ -2026,7 +2026,7 @@ uint32_t HELPER(testblock)(CPUS390XState *env, uint64_t real_addr) real_addr = wrap_address(env, real_addr) & TARGET_PAGE_MASK; for (i = 0; i < TARGET_PAGE_SIZE; i += 8) { - cpu_stq_real_ra(env, real_addr + i, 0, ra); + cpu_stq_mmuidx_ra(env, real_addr + i, 0, MMU_REAL_IDX, ra); } return 0; @@ -2260,11 +2260,11 @@ void HELPER(idte)(CPUS390XState *env, uint64_t r1, uint64_t r2, uint32_t m4) for (i = 0; i < entries; i++) { /* addresses are not wrapped in 24/31bit mode but table index is */ raddr = table + ((index + i) & 0x7ff) * sizeof(entry); - entry = cpu_ldq_real_ra(env, raddr, ra); + entry = cpu_ldq_mmuidx_ra(env, raddr, MMU_REAL_IDX, ra); if (!(entry & REGION_ENTRY_I)) { /* we are allowed to not store if already invalid */ entry |= REGION_ENTRY_I; - cpu_stq_real_ra(env, raddr, entry, ra); + cpu_stq_mmuidx_ra(env, raddr, entry, MMU_REAL_IDX, ra); } } } @@ -2291,9 +2291,9 @@ void HELPER(ipte)(CPUS390XState *env, uint64_t pto, uint64_t vaddr, pte_addr += VADDR_PAGE_TX(vaddr) * 8; /* Mark the page table entry as invalid */ - pte = cpu_ldq_real_ra(env, pte_addr, ra); + pte = cpu_ldq_mmuidx_ra(env, pte_addr, MMU_REAL_IDX, ra); pte |= PAGE_ENTRY_I; - cpu_stq_real_ra(env, pte_addr, pte, ra); + cpu_stq_mmuidx_ra(env, pte_addr, pte, MMU_REAL_IDX, ra); /* XXX we exploit the fact that Linux passes the exact virtual address here - it's not obliged to! */ @@ -2333,18 +2333,21 @@ void HELPER(purge)(CPUS390XState *env) /* load using real address */ uint64_t HELPER(lura)(CPUS390XState *env, uint64_t addr) { - return cpu_ldl_real_ra(env, wrap_address(env, addr), GETPC()); + return cpu_ldl_mmuidx_ra(env, wrap_address(env, addr), + MMU_REAL_IDX, GETPC()); } uint64_t HELPER(lurag)(CPUS390XState *env, uint64_t addr) { - return cpu_ldq_real_ra(env, wrap_address(env, addr), GETPC()); + return cpu_ldq_mmuidx_ra(env, wrap_address(env, addr), + MMU_REAL_IDX, GETPC()); } /* store using real address */ void HELPER(stura)(CPUS390XState *env, uint64_t addr, uint64_t v1) { - cpu_stl_real_ra(env, wrap_address(env, addr), (uint32_t)v1, GETPC()); + cpu_stl_mmuidx_ra(env, wrap_address(env, addr), (uint32_t)v1, + MMU_REAL_IDX, GETPC()); if ((env->psw.mask & PSW_MASK_PER) && (env->cregs[9] & PER_CR9_EVENT_STORE) && @@ -2357,7 +2360,7 @@ void HELPER(stura)(CPUS390XState *env, uint64_t addr, uint64_t v1) void HELPER(sturg)(CPUS390XState *env, uint64_t addr, uint64_t v1) { - cpu_stq_real_ra(env, wrap_address(env, addr), v1, GETPC()); + cpu_stq_mmuidx_ra(env, wrap_address(env, addr), v1, MMU_REAL_IDX, GETPC()); if ((env->psw.mask & PSW_MASK_PER) && (env->cregs[9] & PER_CR9_EVENT_STORE) && From patchwork Mon Dec 16 22:11:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181827 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4947788ile; Mon, 16 Dec 2019 14:32:58 -0800 (PST) X-Google-Smtp-Source: APXvYqxv/QUungzCg25ZpPTkKemQxn1wXaqLFM50m6eEM7jR44F7Y8GabL9Ph6ORH4u9c/F/G5wF X-Received: by 2002:a05:6830:10f:: with SMTP id i15mr34750567otp.199.1576535578423; Mon, 16 Dec 2019 14:32:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576535578; cv=none; d=google.com; s=arc-20160816; b=ETbpxrtD2z6tc1qb9B6UbZjpv/UWs8S+8mD6StBZk5KbdnViLJUjRD2IsdRI9JXisT 0vzl5fSUjV/do/rJQmjRhyZCji/bS2oFb8xiqYPGzYnMMsqDAREWVjd6PbRrUEjpNx84 SA2sfd1qL3fTq6xdTnV4/wmN0angep3SPBzG0KVr0ukQOfNZGJ7xKVZMIfCDenR3Cop/ LWowxMgsE7LDZuLRpr+91WxREPefka3DYp2p/XbpSFeA7psh5UfJYlV+Jgy1/fgcpZeJ gDvY9X+qDMqHy0SipZnMd5nw9Tp6NTmZolq0X7sYguoKRP+Cgtg8+1aHAt4NrAL+nTRB Ev9Q== 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=DPDM5gwX8Fn+IwrqOpQTWcLHE7dPxmxG57n6nMl0zxo=; b=Z6l3JI4C0te+aBVNemR65WSF6i6jAcQw32itTA/3krjmDx/idtYgm1qCfN81/2ByUc i8T9fPzyR4aaNshhqWFv8miE3+YH9u6Gg4iFSbB/xctBiFX3F1CTtDz46i7m4bC+w6NU Qn1G3NnlBNY2xGNZ+oquZsUsIXCo0q/sKa6UT/KsDtCeTMWp7BpGJi7pR/Jsei/7Gm4k 6HrHPrBkSQAkVa3shsF81Z1IMR/GtZ5TTFfxIe+pFwYrKOJZ3xfECTGbSgWLLxHZHPMK CR8LAwMxkqs+K/ndJEoi8Y5v34yQtRYyZ4pqNiklYOgHkDDvAifYIGRRVeTns8GDW9X6 MiAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UN7Bwu6+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p16si10609952oto.287.2019.12.16.14.32.58 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:32:58 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UN7Bwu6+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:32826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igyvB-0005Kk-Pi for patch@linaro.org; Mon, 16 Dec 2019 17:32:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37148) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybb-0005ir-Pl for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igyba-0007ma-Mo for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:43 -0500 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:42434) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igyba-0007mQ-HL for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:42 -0500 Received: by mail-pg1-x541.google.com with SMTP id s64so4488991pgb.9 for ; Mon, 16 Dec 2019 14:12:42 -0800 (PST) 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=DPDM5gwX8Fn+IwrqOpQTWcLHE7dPxmxG57n6nMl0zxo=; b=UN7Bwu6+vOzTHBL6i9nPiI8ZiDgfElJLwM8FCB7zZWSEOagzuNJmZfuexqMfRBdd4I EwG1TXovlLiTAhK+gAU7fRxPJXmxvdbR1cEGzm0FV9yl7n2vplZL6wHWeOU/h1Mch96d ZfsQlJJdx/Q7mO9lWo5KseNk5WgRllfRI6XH7GVzGf+F53ohbdCXYUuzmB3bh6P1+aTS o5aKHLKbHXeAIxKXxDJXxiVeKAO9JBk1YeGJJmFbrPP+89EcGwFfo8vhuPkQnV+b8GgO kOdkCaZJ1ZVqhGw9WS9udTsoZsXw6sGqo+PkmndXRiwEsTRmrbX6ScOt/7EjRL4XHYWR cCQw== 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=DPDM5gwX8Fn+IwrqOpQTWcLHE7dPxmxG57n6nMl0zxo=; b=khcr6lyFvf+MKbJibmmnV0iLLooVvafQjHMFbh1CAobUAZR+j3UWXn5E89O+1t0IJB V0Nzk7TwCiM6jWzVhYUMSXkM8RLxVgbKwO4BwjolSZr/NDo9ClIlxZ6zMMAnsV/ssD8m IQrQVLhuAI6N4oAj8+tesOf8C1sTMMz39RIcS9C/hBbTqJH7ZjAPVCreW2Hy0Z8+TwbD I5uzIbszWPyjAQAGGf+NNKtKoV7V3mE9DOlgA6g4UqJrpDbdm9kqeWqPH0PD44RTYe3+ ctJ1qaDyYJ2OYJngwk4GPxqQAFqi+Chu4Jxz1x6NcS4xs6f81EwLYVLKVGj4Iz20MotT +6+w== X-Gm-Message-State: APjAAAVkioW3vemS3g5kCENvRyBDPNwQQIooIXYM+CAYjPiophpP2Wcp P0eNAlbeDNbFvG0GBxpr+4wxL0IjL7A= X-Received: by 2002:aa7:850c:: with SMTP id v12mr18697255pfn.188.1576534361333; Mon, 16 Dec 2019 14:12:41 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:40 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 26/28] target/ppc: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX Date: Mon, 16 Dec 2019 12:11:56 -1000 Message-Id: <20191216221158.29572-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::541 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: David Gibson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" There are only two uses. Within dcbz_common, the local variable mmu_idx already contains the epid computation, and we can avoid repeating it for the store. Within helper_icbiep, the usage is trivially expanded using PPC_TLB_EPID_LOAD. Acked-by: David Gibson Signed-off-by: Richard Henderson --- target/ppc/cpu.h | 2 -- target/ppc/mem_helper.c | 11 ++--------- 2 files changed, 2 insertions(+), 11 deletions(-) -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index e3e82327b7..3bd983adaa 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -951,8 +951,6 @@ struct ppc_radix_page_info { * + real/paged mode combinations. The other two modes are for * external PID load/store. */ -#define MMU_MODE8_SUFFIX _epl -#define MMU_MODE9_SUFFIX _eps #define PPC_TLB_EPID_LOAD 8 #define PPC_TLB_EPID_STORE 9 diff --git a/target/ppc/mem_helper.c b/target/ppc/mem_helper.c index 1351b53f28..56855f2381 100644 --- a/target/ppc/mem_helper.c +++ b/target/ppc/mem_helper.c @@ -177,14 +177,7 @@ static void dcbz_common(CPUPPCState *env, target_ulong addr, } else { /* Slow path */ for (i = 0; i < dcbz_size; i += 8) { - if (epid) { -#if !defined(CONFIG_USER_ONLY) - /* Does not make sense on USER_ONLY config */ - cpu_stq_eps_ra(env, addr + i, 0, retaddr); -#endif - } else { - cpu_stq_data_ra(env, addr + i, 0, retaddr); - } + cpu_stq_mmuidx_ra(env, addr + i, 0, mmu_idx, retaddr); } } } @@ -216,7 +209,7 @@ void helper_icbiep(CPUPPCState *env, target_ulong addr) #if !defined(CONFIG_USER_ONLY) /* See comments above */ addr &= ~(env->dcache_line_size - 1); - cpu_ldl_epl_ra(env, addr, GETPC()); + cpu_ldl_mmuidx_ra(env, addr, PPC_TLB_EPID_LOAD, GETPC()); #endif } From patchwork Mon Dec 16 22:11:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181825 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4945995ile; Mon, 16 Dec 2019 14:31:18 -0800 (PST) X-Google-Smtp-Source: APXvYqz6pCbuBm6EydF0QpOEb49FUmN2a8deTpT0H8Y2k88PYqsnsKIn6fGoPCrzy9yzFc55Dphn X-Received: by 2002:a7b:c386:: with SMTP id s6mr1367088wmj.105.1576535478293; Mon, 16 Dec 2019 14:31:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576535478; cv=none; d=google.com; s=arc-20160816; b=roUsoJITfD1LQakGsahViKEFNt2YpComyUnjz/pATjwmP6WQMAirwQ9ACXNssjvQFh o726OWp8vCtyET4v0+f3ZS370eHUDlNFQgtPs+1py0bZ3wOkqVBmkc2U0Ijnt2R9Zn86 NNcZVo7tdY8rj1wW4vmAMSo+sP/hCD0UMJWxcqdkPJwPRRkFTWXKyns5m6BJbHEtiks8 tZ91ARXzmAYRtqcpbDMfn+oHXjDkxGnW4CML3AF1f6658yl2P4JMj0XynoidIowSs1PV vOy+5VmPHqaZCI1OQintnLZtXMiatBssowJ6MaQki4kJZ5+52a32xO9AW29JPJN6Y2Jb 7zBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=YTuCdqr9DEUMKluaH9JJH2GYVGYBP4+e1sXlxhX3YMM=; b=wW62V908yTt/M0QiujaEtn4Aydeu6bgYIXppGzRHRrbHGL92+eqloQZu/pzzkVQnah snF341t+v6U3ME3TY8t7ybo9gu+M/CaVtyMtQs4YcDtYrrD4maXTk4Xaosri2drWWoru mHfXsjlSMG/yJ7vRrbaETDNPAH2ahsT9QTd/EHQUkghil87LLv18Q+SEurva25H1LdUW vYex1fiHrvdOtRFzPVob3613kKtN2IqtZDtN/JdnGTNZLJF8Jr3f8FEKNtOdicNKrP/3 uQaywxW2mriqrPj2AFefA/fXDXzQn0ZCWNnKD0TsAhAuye/C3LgIIlaLnjJjVG14ARXK 5XYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wyuaflLb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v16si19339354wrn.237.2019.12.16.14.31.18 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:31:18 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wyuaflLb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:32782 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igytY-0003FW-Vp for patch@linaro.org; Mon, 16 Dec 2019 17:31:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37172) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybd-0005lM-Tl for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igybc-0007mx-Dy for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:45 -0500 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]:45433) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igybc-0007mn-86 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:44 -0500 Received: by mail-pg1-x533.google.com with SMTP id b9so4480231pgk.12 for ; Mon, 16 Dec 2019 14:12:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=YTuCdqr9DEUMKluaH9JJH2GYVGYBP4+e1sXlxhX3YMM=; b=wyuaflLbQ0n+753IJD9gYKpglKib62zcMroJoS+viMHwKapoHvdt5AfI0ebPPHMVjr UIvCvs3MONOFPjq+SHqKYa9N0uy0cblwekkcKIK20lkYsdz3+sg5+smNono27rOIkJes weMUi6CM5Rh9xyMKVnEvwoznF7JE57CsODSvpn3ArN02Lot43nk1HjFBrdI/i8S4gyei K9Eu4zXBsGtjLfrhvrbMgRIskgc3onCMKZt+T/+rI/pbhPhXEWlXYgeHDlcuMCeMQFK/ 7xe/ZuIaLk7qzvzo0ZX7WtQCTJ24CzY0q8x6PEHhey/T6uy90sr3xtZThZaC76rPSRlI AFYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YTuCdqr9DEUMKluaH9JJH2GYVGYBP4+e1sXlxhX3YMM=; b=Ckq08K2JIGTAmgExMbaXghuo6M4GKeeiKO4RdrfRFDEYuoPzND/ypXGX2Ziad9fShI mBc1o/EDtnwA+F+6sI/dw+PnnAA+RGERVGq5yKvE/igChNHlB8qsqUr318VpXIKFbnQo cHvJLpzRhwJRmX07xrseHCvzfaS2NHn4K8IJ64HhXuhCIYQpKnWjk4BdA3siQhgfcwoJ BHA3oKo2skPS9OMLqMCTd9+Z/Tjp+KjEM9cX9rtAiMnxsnTU2dCy5VZyz0DFgT9uwUM6 1AveonxVUFSuFGGDKZ4Sh+RXiOOQFw3YQOKE6rHBIk2o75WRGgtpp7BaWAbL15a0zyVy KZmw== X-Gm-Message-State: APjAAAWVEhyvSnstA4vbfVALsrnGGrvPASp9BgsiHT8xLjoU+ELO3+rN PADI2Sk5+UClt1wecWUOTrZvhMfclkg= X-Received: by 2002:aa7:94b0:: with SMTP id a16mr18583691pfl.35.1576534362770; Mon, 16 Dec 2019 14:12:42 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:42 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 27/28] cputlb: Remove support for MMU_MODE*_SUFFIX Date: Mon, 16 Dec 2019 12:11:57 -1000 Message-Id: <20191216221158.29572-28-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::533 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" All users have now been converted to cpu_*_mmuidx_ra. Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 230 ---------------------------------------- 1 file changed, 230 deletions(-) -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index 0f3c49a005..cf4652bf48 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -271,236 +271,6 @@ void cpu_stl_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, void cpu_stq_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint64_t val, int mmu_idx, uintptr_t retaddr); -#ifdef MMU_MODE0_SUFFIX -#define CPU_MMU_INDEX 0 -#define MEMSUFFIX MMU_MODE0_SUFFIX -#define DATA_SIZE 1 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 2 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 4 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 8 -#include "exec/cpu_ldst_template.h" -#undef CPU_MMU_INDEX -#undef MEMSUFFIX -#endif - -#if (NB_MMU_MODES >= 2) && defined(MMU_MODE1_SUFFIX) -#define CPU_MMU_INDEX 1 -#define MEMSUFFIX MMU_MODE1_SUFFIX -#define DATA_SIZE 1 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 2 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 4 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 8 -#include "exec/cpu_ldst_template.h" -#undef CPU_MMU_INDEX -#undef MEMSUFFIX -#endif - -#if (NB_MMU_MODES >= 3) && defined(MMU_MODE2_SUFFIX) - -#define CPU_MMU_INDEX 2 -#define MEMSUFFIX MMU_MODE2_SUFFIX -#define DATA_SIZE 1 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 2 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 4 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 8 -#include "exec/cpu_ldst_template.h" -#undef CPU_MMU_INDEX -#undef MEMSUFFIX -#endif /* (NB_MMU_MODES >= 3) */ - -#if (NB_MMU_MODES >= 4) && defined(MMU_MODE3_SUFFIX) - -#define CPU_MMU_INDEX 3 -#define MEMSUFFIX MMU_MODE3_SUFFIX -#define DATA_SIZE 1 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 2 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 4 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 8 -#include "exec/cpu_ldst_template.h" -#undef CPU_MMU_INDEX -#undef MEMSUFFIX -#endif /* (NB_MMU_MODES >= 4) */ - -#if (NB_MMU_MODES >= 5) && defined(MMU_MODE4_SUFFIX) - -#define CPU_MMU_INDEX 4 -#define MEMSUFFIX MMU_MODE4_SUFFIX -#define DATA_SIZE 1 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 2 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 4 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 8 -#include "exec/cpu_ldst_template.h" -#undef CPU_MMU_INDEX -#undef MEMSUFFIX -#endif /* (NB_MMU_MODES >= 5) */ - -#if (NB_MMU_MODES >= 6) && defined(MMU_MODE5_SUFFIX) - -#define CPU_MMU_INDEX 5 -#define MEMSUFFIX MMU_MODE5_SUFFIX -#define DATA_SIZE 1 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 2 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 4 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 8 -#include "exec/cpu_ldst_template.h" -#undef CPU_MMU_INDEX -#undef MEMSUFFIX -#endif /* (NB_MMU_MODES >= 6) */ - -#if (NB_MMU_MODES >= 7) && defined(MMU_MODE6_SUFFIX) - -#define CPU_MMU_INDEX 6 -#define MEMSUFFIX MMU_MODE6_SUFFIX -#define DATA_SIZE 1 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 2 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 4 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 8 -#include "exec/cpu_ldst_template.h" -#undef CPU_MMU_INDEX -#undef MEMSUFFIX -#endif /* (NB_MMU_MODES >= 7) */ - -#if (NB_MMU_MODES >= 8) && defined(MMU_MODE7_SUFFIX) - -#define CPU_MMU_INDEX 7 -#define MEMSUFFIX MMU_MODE7_SUFFIX -#define DATA_SIZE 1 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 2 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 4 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 8 -#include "exec/cpu_ldst_template.h" -#undef CPU_MMU_INDEX -#undef MEMSUFFIX -#endif /* (NB_MMU_MODES >= 8) */ - -#if (NB_MMU_MODES >= 9) && defined(MMU_MODE8_SUFFIX) - -#define CPU_MMU_INDEX 8 -#define MEMSUFFIX MMU_MODE8_SUFFIX -#define DATA_SIZE 1 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 2 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 4 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 8 -#include "exec/cpu_ldst_template.h" -#undef CPU_MMU_INDEX -#undef MEMSUFFIX -#endif /* (NB_MMU_MODES >= 9) */ - -#if (NB_MMU_MODES >= 10) && defined(MMU_MODE9_SUFFIX) - -#define CPU_MMU_INDEX 9 -#define MEMSUFFIX MMU_MODE9_SUFFIX -#define DATA_SIZE 1 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 2 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 4 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 8 -#include "exec/cpu_ldst_template.h" -#undef CPU_MMU_INDEX -#undef MEMSUFFIX -#endif /* (NB_MMU_MODES >= 10) */ - -#if (NB_MMU_MODES >= 11) && defined(MMU_MODE10_SUFFIX) - -#define CPU_MMU_INDEX 10 -#define MEMSUFFIX MMU_MODE10_SUFFIX -#define DATA_SIZE 1 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 2 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 4 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 8 -#include "exec/cpu_ldst_template.h" -#undef CPU_MMU_INDEX -#undef MEMSUFFIX -#endif /* (NB_MMU_MODES >= 11) */ - -#if (NB_MMU_MODES >= 12) && defined(MMU_MODE11_SUFFIX) - -#define CPU_MMU_INDEX 11 -#define MEMSUFFIX MMU_MODE11_SUFFIX -#define DATA_SIZE 1 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 2 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 4 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 8 -#include "exec/cpu_ldst_template.h" -#undef CPU_MMU_INDEX -#undef MEMSUFFIX -#endif /* (NB_MMU_MODES >= 12) */ - -#if (NB_MMU_MODES > 12) -#error "NB_MMU_MODES > 12 is not supported for now" -#endif /* (NB_MMU_MODES > 12) */ - /* these access are slower, they must be as rare as possible */ #define CPU_MMU_INDEX (cpu_mmu_index(env, false)) #define MEMSUFFIX _data From patchwork Mon Dec 16 22:11:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181818 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4939566ile; Mon, 16 Dec 2019 14:25:10 -0800 (PST) X-Google-Smtp-Source: APXvYqzMGE2O6OQdReAldWvUbN3UAYaXZOGM/yFOMYJQ/CiZ8jTPnWohntk9YNLQrVRj79O4uqQb X-Received: by 2002:aca:4e87:: with SMTP id c129mr666862oib.153.1576535110120; Mon, 16 Dec 2019 14:25:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576535110; cv=none; d=google.com; s=arc-20160816; b=LtxUm+HnUsYeCyVZrtTwZQAi4lyiB9YI6ADrkuuuaNcmWGRUJc+1Z+RAUcylon0dsz 413awD17SnqWHIEgbMb5eWNJ1r5zYguzE6YA+oTD9eUVHOmsB9gfKzokRZiPsAsBBGT+ lNigEEXexfF3eH/Vb8FdyZBP3ca4iiS01VPFb/uh2PZo+s9NOjAIXKMG3a4o9AJwPsuA 9uF/+RKFHadaPUkm0DQ3XweiD6+I62vpTdjN/Cp8SiVSE1fQbNDFVEituLqD9mofvJki miS1zZNrwmB/Fj8w/mvYLQlr54bbp6lGxlVc9Bv/0V6RXOznyGRxN9a5FUlNt5E25PEV AyvA== 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=n91Cd7yYniXXXBEuAFOxxPa0/GBVEYFAD0qxW/Wckas=; b=Y5OfwQ60iuy0iEhc8cON9OlRNApHvQNINwJhPr8PJ8W2InUbiKpTbbfmJAiT2B4XXE XkTDWIpo2acvX9g2ygq/dN92b8LUVc1NdrnFYlZIvY9G2c8wFVPVIMPDnYi3tfkwM/GU VZz3A7ivIiFIvFYEEws59lTmWTn5QTDGpthuWd8fziBtKUnOYZ9/3+RG6aU/q/Gsbz/V 5C+5hu1NX2i5E34G1EtPzjQDT8DgnjZ/k/y8j9Q90TENit9r0kzFRjRBmIXEa/EFSvMG bov92uz5DtiINoYsUiPBFkwy6dJCeGW2UbqKWepGvDRE/v99rX7ahOkMeHPTbt8nS2ha yK5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xDK0z/Av"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 25si11175289oiz.230.2019.12.16.14.25.10 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Dec 2019 14:25:10 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xDK0z/Av"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igynd-0004fE-8M for patch@linaro.org; Mon, 16 Dec 2019 17:25:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37197) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igybf-0005om-Qx for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igybd-0007nK-Q3 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:47 -0500 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:46795) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igybd-0007n1-Hy for qemu-devel@nongnu.org; Mon, 16 Dec 2019 17:12:45 -0500 Received: by mail-pf1-x443.google.com with SMTP id y14so6360908pfm.13 for ; Mon, 16 Dec 2019 14:12:45 -0800 (PST) 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=n91Cd7yYniXXXBEuAFOxxPa0/GBVEYFAD0qxW/Wckas=; b=xDK0z/AvKh4V4BGzpnj/qqMcPRt/sE9U0bcyQDRf33ntpcXBvFhq5ygN28JxFpPItI R/dOxqkO0RVoXFBqC37LytGEXyVM2bWFn8Wbnmvfy2+pM4rNsHFj4dsj3lsY7lIMmxV4 /qQntb26TgStnpMIDOqZ7FC2Q4keqxZFmxMoJn7xPxn1Qjs/oGzaAAFgYFs3BcDV7mY2 /gEzxcc8UA9M05Ftc0fuUzCdcsCgWCdJ7yRxFy9GysV/6jBRqBxXidOO7W86M0FD8brC y//1sKFM74UMZ8US8Rv3tcHSsYIi3Rr8FlnC9m/PdQArr0U5qvQt+1CrDHvNSKe15u8r H9UA== 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=n91Cd7yYniXXXBEuAFOxxPa0/GBVEYFAD0qxW/Wckas=; b=V8qTSW1CBLbTfyrymIsNHFNcG2ntmK3Y75EC6L8XJQai3x/1Fmu4yTF1Aa3u+wZ3oj jhBOPmf5T1o/hBJrBuazUAJ7jHysvP2msjcJ72mD/PRTfa2qkQgAflum57lvYH9GwQ9O zwCDojudcJXMxjOEUNJLgtJg/zyfzRhvEpTA25aMHxWlgLVqxVmK5EGkijoVkj5ji2LT aXW+YsjpNMHcuhlXQz6qvPFs5QH4j/6UDGyu0LcFLRqWlJg9tFJTo5PWZY3EhKXtJqvx J/2pt0OurZaBJ1gY0ssEPffg/PkX0iF5fNCbTsdooxbwM5b+lB8aYaZHRAjn/yAOxbsf AxZg== X-Gm-Message-State: APjAAAWj8ouoxyCD+SoE94u4GxlSwCMWaCzlni28YPo5VBaoP5z/oAM3 JfaIEjRIhsNbhLYax/Vjuxo7ZlRW4U0= X-Received: by 2002:a65:58ce:: with SMTP id e14mr21172438pgu.153.1576534364154; Mon, 16 Dec 2019 14:12:44 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id d6sm529767pjl.8.2019.12.16.14.12.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2019 14:12:43 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 28/28] cputlb: Expand cpu_ldst_template.h in cputlb.c Date: Mon, 16 Dec 2019 12:11:58 -1000 Message-Id: <20191216221158.29572-29-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191216221158.29572-1-richard.henderson@linaro.org> References: <20191216221158.29572-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:4864:20::443 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: Aleksandar Markovic Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Reduce the amount of preprocessor obfuscation by expanding the text of each of the functions generated. The result is only slightly smaller than the original. Reviewed-by: Aleksandar Markovic Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 67 +++++++----------- include/exec/cpu_ldst_template.h | 117 ------------------------------- accel/tcg/cputlb.c | 107 +++++++++++++++++++++++++++- 3 files changed, 130 insertions(+), 161 deletions(-) delete mode 100644 include/exec/cpu_ldst_template.h -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index cf4652bf48..62f38d5a22 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -94,32 +94,6 @@ typedef target_ulong abi_ptr; #define TARGET_ABI_FMT_ptr TARGET_ABI_FMT_lx #endif -#if defined(CONFIG_USER_ONLY) - -extern __thread uintptr_t helper_retaddr; - -static inline void set_helper_retaddr(uintptr_t ra) -{ - helper_retaddr = ra; - /* - * Ensure that this write is visible to the SIGSEGV handler that - * may be invoked due to a subsequent invalid memory operation. - */ - signal_barrier(); -} - -static inline void clear_helper_retaddr(void) -{ - /* - * Ensure that previous memory operations have succeeded before - * removing the data visible to the signal handler. - */ - signal_barrier(); - helper_retaddr = 0; -} - -/* In user-only mode we provide only the _code and _data accessors. */ - uint32_t cpu_ldub_data(CPUArchState *env, abi_ptr ptr); uint32_t cpu_lduw_data(CPUArchState *env, abi_ptr ptr); uint32_t cpu_ldl_data(CPUArchState *env, abi_ptr ptr); @@ -148,6 +122,30 @@ void cpu_stl_data_ra(CPUArchState *env, abi_ptr ptr, void cpu_stq_data_ra(CPUArchState *env, abi_ptr ptr, uint64_t val, uintptr_t retaddr); +#if defined(CONFIG_USER_ONLY) + +extern __thread uintptr_t helper_retaddr; + +static inline void set_helper_retaddr(uintptr_t ra) +{ + helper_retaddr = ra; + /* + * Ensure that this write is visible to the SIGSEGV handler that + * may be invoked due to a subsequent invalid memory operation. + */ + signal_barrier(); +} + +static inline void clear_helper_retaddr(void) +{ + /* + * Ensure that previous memory operations have succeeded before + * removing the data visible to the signal handler. + */ + signal_barrier(); + helper_retaddr = 0; +} + /* * Provide the same *_mmuidx_ra interface as for softmmu. * The mmu_idx argument is ignored. @@ -271,23 +269,6 @@ void cpu_stl_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, void cpu_stq_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint64_t val, int mmu_idx, uintptr_t retaddr); -/* these access are slower, they must be as rare as possible */ -#define CPU_MMU_INDEX (cpu_mmu_index(env, false)) -#define MEMSUFFIX _data -#define DATA_SIZE 1 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 2 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 4 -#include "exec/cpu_ldst_template.h" - -#define DATA_SIZE 8 -#include "exec/cpu_ldst_template.h" -#undef CPU_MMU_INDEX -#undef MEMSUFFIX - #endif /* defined(CONFIG_USER_ONLY) */ uint32_t cpu_ldub_code(CPUArchState *env, abi_ptr addr); diff --git a/include/exec/cpu_ldst_template.h b/include/exec/cpu_ldst_template.h deleted file mode 100644 index e400979f23..0000000000 --- a/include/exec/cpu_ldst_template.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Software MMU support - * - * Generate inline load/store functions for one MMU mode and data - * size. - * - * Generate a store function as well as signed and unsigned loads. - * - * Not used directly but included from cpu_ldst.h. - * - * Copyright (c) 2003 Fabrice Bellard - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, see . - */ - -#if DATA_SIZE == 8 -#define SUFFIX q -#define USUFFIX q -#define DATA_TYPE uint64_t -#define SHIFT 3 -#elif DATA_SIZE == 4 -#define SUFFIX l -#define USUFFIX l -#define DATA_TYPE uint32_t -#define SHIFT 2 -#elif DATA_SIZE == 2 -#define SUFFIX w -#define USUFFIX uw -#define DATA_TYPE uint16_t -#define DATA_STYPE int16_t -#define SHIFT 1 -#elif DATA_SIZE == 1 -#define SUFFIX b -#define USUFFIX ub -#define DATA_TYPE uint8_t -#define DATA_STYPE int8_t -#define SHIFT 0 -#else -#error unsupported data size -#endif - -#if DATA_SIZE == 8 -#define RES_TYPE uint64_t -#else -#define RES_TYPE uint32_t -#endif - -/* generic load/store macros */ - -static inline RES_TYPE -glue(glue(glue(cpu_ld, USUFFIX), MEMSUFFIX), _ra)(CPUArchState *env, - target_ulong ptr, - uintptr_t retaddr) -{ - return glue(glue(cpu_ld, USUFFIX), _mmuidx_ra)(env, ptr, CPU_MMU_INDEX, - retaddr); -} - -static inline RES_TYPE -glue(glue(cpu_ld, USUFFIX), MEMSUFFIX)(CPUArchState *env, target_ulong ptr) -{ - return glue(glue(cpu_ld, USUFFIX), _mmuidx_ra)(env, ptr, CPU_MMU_INDEX, 0); -} - -#if DATA_SIZE <= 2 -static inline int -glue(glue(glue(cpu_lds, SUFFIX), MEMSUFFIX), _ra)(CPUArchState *env, - target_ulong ptr, - uintptr_t retaddr) -{ - return glue(glue(cpu_lds, SUFFIX), _mmuidx_ra)(env, ptr, CPU_MMU_INDEX, - retaddr); -} - -static inline int -glue(glue(cpu_lds, SUFFIX), MEMSUFFIX)(CPUArchState *env, target_ulong ptr) -{ - return glue(glue(cpu_lds, SUFFIX), _mmuidx_ra)(env, ptr, CPU_MMU_INDEX, 0); -} -#endif - -/* generic store macro */ - -static inline void -glue(glue(glue(cpu_st, SUFFIX), MEMSUFFIX), _ra)(CPUArchState *env, - target_ulong ptr, - RES_TYPE v, uintptr_t retaddr) -{ - glue(glue(cpu_st, SUFFIX), _mmuidx_ra)(env, ptr, v, CPU_MMU_INDEX, - retaddr); -} - -static inline void -glue(glue(cpu_st, SUFFIX), MEMSUFFIX)(CPUArchState *env, target_ulong ptr, - RES_TYPE v) -{ - glue(glue(cpu_st, SUFFIX), _mmuidx_ra)(env, ptr, v, CPU_MMU_INDEX, 0); -} - -#undef RES_TYPE -#undef DATA_TYPE -#undef DATA_STYPE -#undef SUFFIX -#undef USUFFIX -#undef DATA_SIZE -#undef SHIFT diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index f0e4b0aee4..a991ea2964 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -35,7 +35,6 @@ #include "qemu/atomic128.h" #include "translate-all.h" #include "trace-root.h" -#include "qemu/plugin.h" #include "trace/mem.h" #ifdef CONFIG_PLUGIN #include "qemu/plugin-memory.h" @@ -1697,6 +1696,68 @@ uint64_t cpu_ldq_mmuidx_ra(CPUArchState *env, abi_ptr addr, ? helper_le_ldq_mmu : helper_be_ldq_mmu); } +uint32_t cpu_ldub_data_ra(CPUArchState *env, target_ulong ptr, + uintptr_t retaddr) +{ + return cpu_ldub_mmuidx_ra(env, ptr, cpu_mmu_index(env, false), retaddr); +} + +int cpu_ldsb_data_ra(CPUArchState *env, target_ulong ptr, uintptr_t retaddr) +{ + return cpu_ldsb_mmuidx_ra(env, ptr, cpu_mmu_index(env, false), retaddr); +} + +uint32_t cpu_lduw_data_ra(CPUArchState *env, target_ulong ptr, + uintptr_t retaddr) +{ + return cpu_lduw_mmuidx_ra(env, ptr, cpu_mmu_index(env, false), retaddr); +} + +int cpu_ldsw_data_ra(CPUArchState *env, target_ulong ptr, uintptr_t retaddr) +{ + return cpu_ldsw_mmuidx_ra(env, ptr, cpu_mmu_index(env, false), retaddr); +} + +uint32_t cpu_ldl_data_ra(CPUArchState *env, target_ulong ptr, uintptr_t retaddr) +{ + return cpu_ldl_mmuidx_ra(env, ptr, cpu_mmu_index(env, false), retaddr); +} + +uint64_t cpu_ldq_data_ra(CPUArchState *env, target_ulong ptr, uintptr_t retaddr) +{ + return cpu_ldq_mmuidx_ra(env, ptr, cpu_mmu_index(env, false), retaddr); +} + +uint32_t cpu_ldub_data(CPUArchState *env, target_ulong ptr) +{ + return cpu_ldub_data_ra(env, ptr, 0); +} + +int cpu_ldsb_data(CPUArchState *env, target_ulong ptr) +{ + return cpu_ldsb_data_ra(env, ptr, 0); +} + +uint32_t cpu_lduw_data(CPUArchState *env, target_ulong ptr) +{ + return cpu_lduw_data_ra(env, ptr, 0); +} + +int cpu_ldsw_data(CPUArchState *env, target_ulong ptr) +{ + return cpu_ldsw_data_ra(env, ptr, 0); +} + +uint32_t cpu_ldl_data(CPUArchState *env, target_ulong ptr) +{ + return cpu_ldl_data_ra(env, ptr, 0); +} + +uint64_t cpu_ldq_data(CPUArchState *env, target_ulong ptr) +{ + return cpu_ldq_data_ra(env, ptr, 0); +} + /* * Store Helpers */ @@ -1970,6 +2031,50 @@ void cpu_stq_mmuidx_ra(CPUArchState *env, target_ulong addr, uint64_t val, cpu_store_helper(env, addr, val, mmu_idx, retaddr, MO_TEQ); } +void cpu_stb_data_ra(CPUArchState *env, target_ulong ptr, + uint32_t val, uintptr_t retaddr) +{ + cpu_stb_mmuidx_ra(env, ptr, val, cpu_mmu_index(env, false), retaddr); +} + +void cpu_stw_data_ra(CPUArchState *env, target_ulong ptr, + uint32_t val, uintptr_t retaddr) +{ + cpu_stw_mmuidx_ra(env, ptr, val, cpu_mmu_index(env, false), retaddr); +} + +void cpu_stl_data_ra(CPUArchState *env, target_ulong ptr, + uint32_t val, uintptr_t retaddr) +{ + cpu_stl_mmuidx_ra(env, ptr, val, cpu_mmu_index(env, false), retaddr); +} + +void cpu_stq_data_ra(CPUArchState *env, target_ulong ptr, + uint64_t val, uintptr_t retaddr) +{ + cpu_stq_mmuidx_ra(env, ptr, val, cpu_mmu_index(env, false), retaddr); +} + +void cpu_stb_data(CPUArchState *env, target_ulong ptr, uint32_t val) +{ + cpu_stb_data_ra(env, ptr, val, 0); +} + +void cpu_stw_data(CPUArchState *env, target_ulong ptr, uint32_t val) +{ + cpu_stw_data_ra(env, ptr, val, 0); +} + +void cpu_stl_data(CPUArchState *env, target_ulong ptr, uint32_t val) +{ + cpu_stl_data_ra(env, ptr, val, 0); +} + +void cpu_stq_data(CPUArchState *env, target_ulong ptr, uint64_t val) +{ + cpu_stq_data_ra(env, ptr, val, 0); +} + /* First set of helpers allows passing in of OI and RETADDR. This makes them callable from other helpers. */