Message ID | 20180124232625.30105-14-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp731642ljf; Wed, 24 Jan 2018 15:28:15 -0800 (PST) X-Google-Smtp-Source: AH8x227sOiznMmfylNbNGS+uDRZWCX0TRhHnomgwlXtPvabGHhk3nZ2pZvOXPMcRcfwPDtlCWhKa X-Received: by 10.129.155.78 with SMTP id s75mr6833597ywg.358.1516836495484; Wed, 24 Jan 2018 15:28:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516836495; cv=none; d=google.com; s=arc-20160816; b=xogusIxbdypIAW9eAjU9br+P9jZdKABrdDdshH1CeHI6WoNcOkLUaQ0IEKv3mrDYkL Ho7carKr7JAs51bH3KfOZPNLHgQ7J32J8feShKz8CF8S6cSeXPDoxQxw9if2dQXJ9UPV In0luk98OgvVlJ01V5xOrXFkIWErzBfpGlI/tLQkWDwQy7ydNppx5LwFUH+XTXSN+eYi jV9mNXoUHjIFi6cnqef8QSqsWrYXAtG8MrJBzZgEknr+xBGAVbsOaZDIyDjiJJlYTblN DlEZ+coP62W1zc9N9c1qpxBTH5lO2c1MPH4WQNpm93A6KvnF0BbLetYS4yC3X6bbpyeD UlgA== 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:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=b1Z6d8vzZ3adC+SRkMYeme9R75wZN74KLoBboiIKdOc=; b=yYUpDDLovgDUjU/mLWTPBCsGMvqQS4b+x84MHxvogDpl4Q4N9y2zD+qvx86QnFprbi DbMWP04gPf1VRQxlWoefypHV9z9NNlyL2Ic6Ed0Jnf7BzKsMDIeKL3+x8jpizDV9fgye +jAN0kAus6vJ/gaNiBVpzViK0ptkkXr651QoRn6zBqJy8fTarqKCnQEOLHrWNDCGx5er LcKpgHp4AgvdJIVhqmh2nHedEhSISc562ydP3Ca5ktnt8xvn414KoRhz5+Pm8KYUbfJG USYef+sHylZMnf6yTMWY0iyrCS9GMwCD9fzqrSFYU8yIkIr2eEGtBhiwPcygKeWuX9zD +hGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=M5COY4rj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id f67si3002248ybf.3.2018.01.24.15.28.15 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 24 Jan 2018 15:28:15 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=M5COY4rj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54456 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1eeUSk-0005QT-Rp for patch@linaro.org; Wed, 24 Jan 2018 18:28:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51037) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1eeURO-0004XD-2q for qemu-devel@nongnu.org; Wed, 24 Jan 2018 18:26:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1eeURN-0001gY-91 for qemu-devel@nongnu.org; Wed, 24 Jan 2018 18:26:50 -0500 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]:36932) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1eeURN-0001gI-3g for qemu-devel@nongnu.org; Wed, 24 Jan 2018 18:26:49 -0500 Received: by mail-pg0-x242.google.com with SMTP id z17so3815345pgc.4 for <qemu-devel@nongnu.org>; Wed, 24 Jan 2018 15:26:48 -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; bh=b1Z6d8vzZ3adC+SRkMYeme9R75wZN74KLoBboiIKdOc=; b=M5COY4rj54T6UKLPRZOK+nYlU3zb+GMyqrSP+vRHlitmC0TfZlU7zcZ5K3amllQr+l 4vu1lXaDFf+fNF0JalikC+xn2XQwCpZZTO2JcBVi5hDzv4teHKRVSwRnYiebw91Fv8Ee iYlcLLemyo18DxpZVvkjf0ALHU9xhSTtIiTjo= 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; bh=b1Z6d8vzZ3adC+SRkMYeme9R75wZN74KLoBboiIKdOc=; b=fi9PIHP5SffdBQAIohbdhw7Lh0HbwhXA2e5T7/P3SZiRRczvbsdZhMpQ7qrYXA+I3k l9PDmIniw3M/z1Fn15qwXaH+1ezc6N+W67ABiqkcg1DXQdaq+/sDnqTkkSRHrwFHnxp7 hGC2NPGi5B2V1CLgIRyDXVSQ6FlIcvQ8csaw1SAymrB+qY2Qxgjb4bgbkS3BI8smi0RP /b7DSfjxb8taKMvr1zEAWv1awitdEk2iC2L8pB2DOIvAmkAmdObibc/Ff8UYum0XaLfD qEjlaEOT561Pt9lnpDKiW6M2+qBt88WZCZ41XWV3D9IlWip0KGj2jVhtfDrkBJRzo+J/ Zemg== X-Gm-Message-State: AKwxytf+q3ETC+sgWt47+mgTPNFjplO08G2F3E8oMeAKyxnheaWMwXCZ hS6l9x9wRePYWbyVck70gUf/ZtOZHTQ= X-Received: by 2002:a17:902:2c43:: with SMTP id m61-v6mr9822011plb.189.1516836407826; Wed, 24 Jan 2018 15:26:47 -0800 (PST) Received: from cloudburst.twiddle.net (174-21-6-47.tukw.qwest.net. [174.21.6.47]) by smtp.gmail.com with ESMTPSA id z19sm9760028pfh.185.2018.01.24.15.26.46 for <qemu-devel@nongnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Jan 2018 15:26:46 -0800 (PST) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Date: Wed, 24 Jan 2018 15:25:53 -0800 Message-Id: <20180124232625.30105-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180124232625.30105-1-richard.henderson@linaro.org> References: <20180124232625.30105-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::242 Subject: [Qemu-devel] [PATCH v3 13/45] target/hppa: Implement unaligned access trap X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
hppa-softmmu
|
expand
|
diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index ca619578dd..4d0b760baa 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -48,6 +48,23 @@ static void hppa_cpu_disas_set_info(CPUState *cs, disassemble_info *info) info->print_insn = print_insn_hppa; } +static void hppa_cpu_do_unaligned_access(CPUState *cs, vaddr addr, + MMUAccessType access_type, + int mmu_idx, uintptr_t retaddr) +{ + HPPACPU *cpu = HPPA_CPU(cs); + CPUHPPAState *env = &cpu->env; + + cs->exception_index = EXCP_UNALIGN; + if (env->psw & PSW_Q) { + /* ??? Needs tweaking for hppa64. */ + env->cr[CR_IOR] = addr; + env->cr[CR_ISR] = addr >> 32; + } + + cpu_loop_exit_restore(cs, retaddr); +} + static void hppa_cpu_realizefn(DeviceState *dev, Error **errp) { CPUState *cs = CPU(dev); @@ -139,7 +156,7 @@ static void hppa_cpu_class_init(ObjectClass *oc, void *data) #else cc->get_phys_page_debug = hppa_cpu_get_phys_page_debug; #endif - + cc->do_unaligned_access = hppa_cpu_do_unaligned_access; cc->disas_set_info = hppa_cpu_disas_set_info; cc->tcg_initialize = hppa_translate_init;
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/hppa/cpu.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) -- 2.14.3