From patchwork Sun Oct 16 22:09:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 615426 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1617096pvb; Sun, 16 Oct 2022 15:14:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM54kbIgx33eGPdoJcvwXz0gmhr4hP3UDf0OCuATbzjz2Xk4bvXqAK87QZhXmqzimjblaOLE X-Received: by 2002:a05:620a:c4a:b0:6cf:8135:e81d with SMTP id u10-20020a05620a0c4a00b006cf8135e81dmr5616594qki.280.1665958465770; Sun, 16 Oct 2022 15:14:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665958465; cv=none; d=google.com; s=arc-20160816; b=XbbADTWIREULpAw2PlGiyrhnveqkM7juhoPV9SwPj/ludQa9GRIqMlu+kIv5lToUu8 48270ESmG0G2hMMQKYEpNY7Qm3EsB6fPqVdRofr5WwPvsW0eIll5FX0XNMiWp5JqVa/D ZjtEa4KSIU9ReyVSGkz1rsD8g35xIF4dErVWcBYU/9dy3ZHdk8A36Zt1SKSUCQcifa2g YoHeNpA9bb8YMkcpTD9CaRL/ww9KYacMJ0o0ghANfV/X1PFPJaKUOi2milR+hiWjk9JO HbGS4IOcSvRS8Jh0EbtXXLHoYSSN4l8lCfDaemI6FRl1uT+R8K13Uv5TJyTby0NNsS47 9PaA== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=zNSasT6g5lPXdmGKCoc3ZqupAp2gRn+LqJW9jUoXEIo=; b=ZBPLLOqqAFSQBkGzsg3LXme/i0wMKk4kg103FrM3CcY5u5oKdTADGeNH9WErCQNvUx kslcVXSM+MKKEn27Xt0to4FmcsOw8CmIJVkY0ZEFrtKvvPC6n5TDm+FDqvWoj5hpssi8 TpZc7Ddx+SwxRskYVlUiH0pXC2ctUlHBytno0vZ1VECTXGjtiXc5XXzAVHPnn3nHKX3S 8h1TbU5OEmKdsDD63v49GZnft6X6Jf/VJ3vv5SUsNsidR+6MWa9WPcznLtvZXkgcAYAU 9GoBrBmLCiLz27KrG1dvHOQmnWii6cfaS87IN2zJVsynJBKFYRwxyYIvB7y5eryqZBmh hpGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QQi4JHn5; 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 cn8-20020a05622a248800b00399d7c42f5asi4894284qtb.201.2022.10.16.15.14.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 16 Oct 2022 15:14:25 -0700 (PDT) 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=QQi4JHn5; 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]:34394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okBto-00027o-SH for patch@linaro.org; Sun, 16 Oct 2022 18:14:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okBpm-00025l-2G for qemu-devel@nongnu.org; Sun, 16 Oct 2022 18:10:14 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]:38534) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okBpk-0007fN-Dq for qemu-devel@nongnu.org; Sun, 16 Oct 2022 18:10:13 -0400 Received: by mail-pl1-x631.google.com with SMTP id o21so6797222ple.5 for ; Sun, 16 Oct 2022 15:10:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=zNSasT6g5lPXdmGKCoc3ZqupAp2gRn+LqJW9jUoXEIo=; b=QQi4JHn5/5RqthQ9NF+BboZ7C5kJH7t+bGYe2OKEBgtaAzjn4g3PvajZigdLZyeLmP vzg+RG7+OWt2T6jqQxGovF6nIL+NB7X99x6VDKFVdTDoD2IKVgIRl/eHLo6xcU5VhcJx CwvjvspQ3XqJ6VayMJGdCh0UnrhcIdfzv1oe98ZTxdAoUF2DUIV0wbJmMS6wxfc+WFw1 PBkZKfpmklbrZF6nf3QmJEILwDF+UifI8GdHtmRmAgbrhfwaWc1MlhOmbdjROTtPg7gx ALrq0NVnml0VloNNNqchYbPRDpcD3Tp3ONb+ab/1B3utAHkWer5P3CbdH/HuV57jmqNo FfAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zNSasT6g5lPXdmGKCoc3ZqupAp2gRn+LqJW9jUoXEIo=; b=WV/TlWPFFyrBGLT9wE1Cd4Woh9mmvzpo5Mgu8jriqJeZlsKn9AnPSlResecBY79EWl R4QqyFiBG3BlpcYnDu0dd2OJ5z5oXPLQCv0GlkiZkQ5qU9qbJDeiwSWWyrFaa8fKfJRT y/jdlZ5hyHCLA0b/xk3mTkBqfncv0Qh+EeOzzqjpEZUZhXaH6lMeycOzPAV5Mty2jLND s+s+eSL3CSjQTtwWzM14HF+TA7A9zPaeaBva4l78LdiKFH+gWeH6wqyoK0ZYJrFpsS5f zCm0AEmJXC/gsFrSpqAMXUgAuBjgEgLuDyehAKbSU+7c3eFxPWQfAwKfhTz4PPs2Kkub PyNw== X-Gm-Message-State: ACrzQf00pQewwEtMwfQvPO4Og3U6vLWUcUkD7OmQBVQROIGzbs88+pDH NFm+5wbI83jZmnyDthLgoR0wrrqNJ5l7MMYQ X-Received: by 2002:a17:902:7c11:b0:178:a6ca:4850 with SMTP id x17-20020a1709027c1100b00178a6ca4850mr9118678pll.111.1665958210656; Sun, 16 Oct 2022 15:10:10 -0700 (PDT) Received: from localhost.localdomain ([149.135.10.35]) by smtp.gmail.com with ESMTPSA id z18-20020aa79592000000b0053e2b61b714sm5454751pfj.114.2022.10.16.15.10.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Oct 2022 15:10:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH v7 0/9] target/arm: pc-relative translation blocks Date: Mon, 17 Oct 2022 08:09:23 +1000 Message-Id: <20221016220932.274260-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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 is the Arm specific changes required to reduce the amount of translation for address space randomization. Changes for v7: * Remove read_pc in patch 8. * Add DisasLabel and inlines to generate/emit, cleaning up the management of pc_save. * Restore pc_save after tcg_remove_ops_after. r~ Richard Henderson (9): target/arm: Introduce curr_insn_len target/arm: Change gen_goto_tb to work on displacements target/arm: Change gen_*set_pc_im to gen_*update_pc target/arm: Change gen_exception_insn* to work on displacements target/arm: Remove gen_exception_internal_insn pc argument target/arm: Change gen_jmp* to work on displacements target/arm: Introduce gen_pc_plus_diff for aarch64 target/arm: Introduce gen_pc_plus_diff for aarch32 target/arm: Enable TARGET_TB_PCREL target/arm/cpu-param.h | 1 + target/arm/translate-a32.h | 2 +- target/arm/translate.h | 66 +++++++- target/arm/cpu.c | 23 +-- target/arm/translate-a64.c | 191 +++++++++++++---------- target/arm/translate-m-nocp.c | 8 +- target/arm/translate-mve.c | 2 +- target/arm/translate-vfp.c | 10 +- target/arm/translate.c | 276 ++++++++++++++++++++-------------- 9 files changed, 351 insertions(+), 228 deletions(-)