From nobody Wed Jul 3 23:25:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1629314786; cv=none; d=zohomail.com; s=zohoarc; b=OtTA7Gg+7zDkipfliGXhlF+We0ZVOwbydM4lF9NpsSXBLzDQc87NrrBBJszGRFWoe6jvW4boxECdUyt2mxR4ZTC1w0ZrgIzgr8Xj+5CJkxe/4SkseAHAVix3CSpXWVstG/3xDywULnJmYbY+CGeUnC7BXBuvCA9kjQMtxmefHgw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629314786; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=GXOlbQT0wGZicRa4Afgu+4pPip7Q2NUMioJcGG1uVyI=; b=fpAtE4xWleV7n8Hvsd8gXKajYLzalF9F1WDiCRegpCNqUW0+HRyxSvvHK2mlqNBOJHbkZybWutJ7sBoDW80KQqRNYeUm5XFQiFPYwX3wbDcgUXUgBXfsVwnHoTIuqPNFGR7crLEiHnBBIAP3X1Ryg0JlGmWVOwiFGrKpXoWoRO0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1629314786607978.7326140970655; Wed, 18 Aug 2021 12:26:26 -0700 (PDT) Received: from localhost ([::1]:56616 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGRCj-0006MF-Ey for importer@patchew.org; Wed, 18 Aug 2021 15:26:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57870) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGR6F-0000Su-So for qemu-devel@nongnu.org; Wed, 18 Aug 2021 15:19:43 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]:41518) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mGR6E-00004x-CQ for qemu-devel@nongnu.org; Wed, 18 Aug 2021 15:19:43 -0400 Received: by mail-pl1-x62c.google.com with SMTP id e15so2427913plh.8 for ; Wed, 18 Aug 2021 12:19:42 -0700 (PDT) Received: from localhost.localdomain ([173.197.107.15]) by smtp.gmail.com with ESMTPSA id a6sm524108pjs.40.2021.08.18.12.19.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Aug 2021 12:19:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GXOlbQT0wGZicRa4Afgu+4pPip7Q2NUMioJcGG1uVyI=; b=I8lwAcoXc7l/5Ytm3zRMIA2zEWDAItlnmy48h+gDvWE3SDXjm4Ni7sulQrJuJOxKkH IMHqUOTwDOhfAS9XzoLei+Nwadf43Nan3PugEJrITVhisWCLcSEQ4AZalQN1lcdHtBSQ fMDYcgK931mf2t9O4zP/3YF/enz0E0qfTeIaEjyF6fmE2RYt8G5MGm+nEr7DP/Bmln+D G9pNV/IurmmZMoFrKX2Uvfy41fdwZH1w+KTPgpQx6GlCWh6B2ZxmWxRlDtHLQ8eOr873 lLSqczYbXy1mQHKbZEt1KPYPe8fjrpqUwJe8YObix3tODesrWd7MzrIHczRxv7ZS3/IZ f7DA== 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=GXOlbQT0wGZicRa4Afgu+4pPip7Q2NUMioJcGG1uVyI=; b=fMktimdKGXn3WmG+TUbtY2q61FKpIKw4j8J1vX5N4J/yJOo7XD4d7WuLfB0t6X/j6/ IitFcMI0uoI0CMenb3D58rBg72PJxAIKqBtBmheKkBFVwQ4xeJCcIyUW50CikUC6Pjpj eDI9xTxl8NOHa/9AKqM5qmpmwowXiflKqciLDyvNj6yPy8sMAAAZhCuJd4Dshe3E/qEl my5rvDYMb+sPzr6XnLptfZQ3CjcYF+5vW78mGPjbpRIpHdZyJpQxrijoGNtiNvxdJ+hO 98W0jBZ3ZMKTiTnOps5+6y3kr7HQ7ExoGOkvf0lnBbZgDyDUs+MFUfKvAPa2xRoxv4f5 DqUA== X-Gm-Message-State: AOAM531yJjhTqwBGwste39ZuwUP+9lZ0+C0tYZI2odWCVm51NIFySCNm FF+FZAYK1squDuptqP7tYUtAap4jqROMyg== X-Google-Smtp-Source: ABdhPJytclogOyhSP2ebBjEZvRG90KwbuQiI0H9QKG6HLRF/948Bs1QRgLYkY2cnEQ+NOA8myauhjw== X-Received: by 2002:a17:90a:f3cc:: with SMTP id ha12mr10875871pjb.195.1629314381187; Wed, 18 Aug 2021 12:19:41 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 15/66] target/sh4: Implement do_unaligned_access for user-only Date: Wed, 18 Aug 2021 09:18:29 -1000 Message-Id: <20210818191920.390759-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210818191920.390759-1-richard.henderson@linaro.org> References: <20210818191920.390759-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yoshinori Sato Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1629314788376100001 Content-Type: text/plain; charset="utf-8" Cc: Yoshinori Sato Signed-off-by: Richard Henderson --- linux-user/sh4/cpu_loop.c | 8 ++++++++ target/sh4/cpu.c | 2 +- target/sh4/op_helper.c | 3 --- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/linux-user/sh4/cpu_loop.c b/linux-user/sh4/cpu_loop.c index 222ed1c670..21d97250a8 100644 --- a/linux-user/sh4/cpu_loop.c +++ b/linux-user/sh4/cpu_loop.c @@ -71,6 +71,14 @@ void cpu_loop(CPUSH4State *env) info._sifields._sigfault._addr =3D env->tea; queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); break; + case 0xe0: + case 0x100: + info.si_signo =3D TARGET_SIGBUS; + info.si_errno =3D 0; + info.si_code =3D TARGET_BUS_ADRALN; + info._sifields._sigfault._addr =3D env->tea; + queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); + break; case EXCP_ATOMIC: cpu_exec_step_atomic(cs); arch_interrupt =3D false; diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index 8326922942..b60234cd31 100644 --- a/target/sh4/cpu.c +++ b/target/sh4/cpu.c @@ -238,10 +238,10 @@ static const struct TCGCPUOps superh_tcg_ops =3D { .synchronize_from_tb =3D superh_cpu_synchronize_from_tb, .cpu_exec_interrupt =3D superh_cpu_exec_interrupt, .tlb_fill =3D superh_cpu_tlb_fill, + .do_unaligned_access =3D superh_cpu_do_unaligned_access, =20 #ifndef CONFIG_USER_ONLY .do_interrupt =3D superh_cpu_do_interrupt, - .do_unaligned_access =3D superh_cpu_do_unaligned_access, .io_recompile_replay_branch =3D superh_io_recompile_replay_branch, #endif /* !CONFIG_USER_ONLY */ }; diff --git a/target/sh4/op_helper.c b/target/sh4/op_helper.c index d6d70c339f..b46fc1bf11 100644 --- a/target/sh4/op_helper.c +++ b/target/sh4/op_helper.c @@ -23,7 +23,6 @@ #include "exec/cpu_ldst.h" #include "fpu/softfloat.h" =20 -#ifndef CONFIG_USER_ONLY =20 void superh_cpu_do_unaligned_access(CPUState *cs, vaddr addr, MMUAccessType access_type, @@ -46,8 +45,6 @@ void superh_cpu_do_unaligned_access(CPUState *cs, vaddr a= ddr, cpu_loop_exit_restore(cs, retaddr); } =20 -#endif - void helper_ldtlb(CPUSH4State *env) { #ifdef CONFIG_USER_ONLY --=20 2.25.1