From patchwork Fri Jul 26 17:49:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 169908 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp363164ilk; Fri, 26 Jul 2019 11:00:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqxx2JR3DR5bp7iy7SfFFwcEE89+4ZDqXmNMrCTVQ8ZZ1bs8d/hwAy8uFwcI6GnwcjzIxVXi X-Received: by 2002:a37:a389:: with SMTP id m131mr65817462qke.168.1564164057309; Fri, 26 Jul 2019 11:00:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564164057; cv=none; d=google.com; s=arc-20160816; b=mQSt8f8rLw1E/w+HuffVA6B6v760AS3bYYSlUimPJspogYdvzqypGl1t5qki07w2LG aju4EZkF7vtjwWOeYWNfeKVNhozWKqLGMiIqFM+ggv9MBFrxhEgQz640cKBBJfO0qM5j qHdQdJyl6vX1Ug7Ts5Yv8ffDLJcqsf2s9sBIhIPdfYl3m1Y9CHFhraNcvFQWytaHwcIF kwQ4Cjou7cRJ5c/wBmiUQPO1c5iINN5xsyW7eq1CjXT93151JnmmRMZYlFytYVx4RRB4 pK+ITxIy1oS65ZJxLesHQKDVhU9+p7fcqoy+kfBy//hTpnbAsUVZgLLg6rXR3IK1JWWl KGgQ== 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:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=BMsZb1YBUEkHFwRh2YB1z1GO0sYcNt67hSkjhh9u9CQ=; b=qlUyaS03VB+z0cx/+hIVJm5novUmoXJPnD5/aF7QTyh0TIxZL09vwlPbPY8GLOydY5 d9f4Pofa85kqPUmjvkUxUnluYU2V5nh/HVyoUD2YkXu5Jac/UXcW3soGeZUm/fkiczkJ BnfKYHScxipIcCZoGGM6spcKwxQOaUkZZJb2yqfoqaKmS2BxxPsMtwJWEtCmXmpiQOtM tLEfI22SGCPAtwHkmUE5dl04gj8QzwPmTPTOndJdUdVGbgnCSR3zOeeDn7MZn9hyZyJ8 UmV57BhlmRZZDVsOhCNatGpDC69Kq+npXG5XveC5xibU/OZfmhUZZmY8UaP23sHqUSz1 wc2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=mi5iMrWG; 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 a193si10819726qkc.324.2019.07.26.11.00.57 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jul 2019 11:00:57 -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=fail header.i=@linaro.org header.s=google header.b=mi5iMrWG; 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]:42580 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hr4WV-0001Rk-1p for patch@linaro.org; Fri, 26 Jul 2019 14:00:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58413) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hr4NH-0004ZC-Kb for qemu-devel@nongnu.org; Fri, 26 Jul 2019 13:51:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hr4NF-0000Ni-Ez for qemu-devel@nongnu.org; Fri, 26 Jul 2019 13:51:22 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]:35672) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hr4NE-0000CC-Fw for qemu-devel@nongnu.org; Fri, 26 Jul 2019 13:51:20 -0400 Received: by mail-pf1-x434.google.com with SMTP id u14so24877954pfn.2 for ; Fri, 26 Jul 2019 10:51:13 -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; bh=BMsZb1YBUEkHFwRh2YB1z1GO0sYcNt67hSkjhh9u9CQ=; b=mi5iMrWGCckm2qAJEelgKpFU5RQeFtlvjRdAG3uF/g8cPqEcYsYMp6Ewb2jnN9DITj dplcSyTTrSSmw8PjN76+0yBAlDaB36wTCEU8vkdWu3Gh5C0QLEHkbg0Y0ThX9GhW72Vc zvVnrhS17n6ZhckRCeolIIacRX56xk0gSJ2H7iaQYz94ET+CBR3heLseAD1tfhvgCzDe vgI1IOm6GLwuKwKN+Kuab0Vt27U+/VhFzsb9SOInNoLGbLePpbRVduT1rfBterlpqTPT /js+TS3eM/OBIf/CVTXOggaIdlBNV5C5QCvUscDp57FEw5wCKpsDD3HDvbcEA3w/zX6d zFNw== 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; bh=BMsZb1YBUEkHFwRh2YB1z1GO0sYcNt67hSkjhh9u9CQ=; b=LL7lZgGF8+hzCLgvwCH1TXYlRx9WaRWdGCC1unkDBJ74hx5MrNuSrN14Pstt5Lps5h +7GuoIBfLn6ggJjuuiGbrrzcZ6DQmUqvEk8MOlvNI08rqTtiW3Kkf5TLjZCyp5GLI/hh Eil2yW9ayiyUCaW0CEjO1tQYI24e/F93K0V00yTHiZFhRMReVOe6O5rfG88j8XDoiSNF 2wwcccy6Qhr/aZAw2HrdILw/2ce+0y8PBaKxr6/PI90yC6wbNzlHU0yuZijStvg+C9eD HBtnL9OF3JDfesHdSNzJrNxfF2SFsbmXN8um8FayojCLzkc1VwuApcMxoa/83fY+60M3 RlbA== X-Gm-Message-State: APjAAAVofr5Lsv8nsciRerwfGbgvj0duWULZ7f3yFYdfFIhuPQpM7Hik YByQcs0BQ5hzr1bFYsfX7hWLMok737c= X-Received: by 2002:a62:2f06:: with SMTP id v6mr23655611pfv.195.1564163471371; Fri, 26 Jul 2019 10:51:11 -0700 (PDT) Received: from localhost.localdomain (97-126-117-207.tukw.qwest.net. [97.126.117.207]) by smtp.gmail.com with ESMTPSA id o24sm104287919pfp.135.2019.07.26.10.51.10 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 26 Jul 2019 10:51:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 26 Jul 2019 10:49:56 -0700 Message-Id: <20190726175032.6769-32-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190726175032.6769-1-richard.henderson@linaro.org> References: <20190726175032.6769-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::434 Subject: [Qemu-devel] [PATCH 31/67] target/arm: Convert SVC X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/arm/translate.c | 19 +++++++++++++------ target/arm/a32.decode | 4 ++++ 2 files changed, 17 insertions(+), 6 deletions(-) -- 2.17.1 diff --git a/target/arm/translate.c b/target/arm/translate.c index 3f14e5c7f3..7ea118a795 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -9979,6 +9979,18 @@ static bool trans_BLX_i(DisasContext *s, arg_BLX_i *a) return true; } +/* + * Supervisor call + */ + +static bool trans_SVC(DisasContext *s, arg_SVC *a) +{ + gen_set_pc_im(s, s->pc); + s->svc_imm = a->imm; + s->base.is_jmp = DISAS_SWI; + return true; +} + /* * Legacy decoder. */ @@ -10243,6 +10255,7 @@ static void disas_arm_insn(DisasContext *s, unsigned int insn) case 0x09: case 0xa: case 0xb: + case 0xf: /* All done in decodetree. Reach here for illegal ops. */ goto illegal_op; case 0xc: @@ -10258,12 +10271,6 @@ static void disas_arm_insn(DisasContext *s, unsigned int insn) goto illegal_op; } break; - case 0xf: - /* swi */ - gen_set_pc_im(s, s->pc); - s->svc_imm = extract32(insn, 0, 24); - s->base.is_jmp = DISAS_SWI; - break; default: illegal_op: gen_illegal_op(s); diff --git a/target/arm/a32.decode b/target/arm/a32.decode index f0f0f50c4e..c2fb28f235 100644 --- a/target/arm/a32.decode +++ b/target/arm/a32.decode @@ -528,3 +528,7 @@ LDM ---- 100 b:1 i:1 u:1 w:1 1 rn:4 list:16 &ldst_block B .... 1010 ........................ @branch BL .... 1011 ........................ @branch + +# Supervisor call + +SVC ---- 1111 imm:24 &i