From nobody Wed Nov 5 18:30:56 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1536112002692250.42575387951774; Tue, 4 Sep 2018 18:46:42 -0700 (PDT) Received: from localhost ([::1]:53383 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fxMu1-00074Z-DZ for importer@patchew.org; Tue, 04 Sep 2018 21:46:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fxMrv-0005t6-TW for qemu-devel@nongnu.org; Tue, 04 Sep 2018 21:44:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fxMru-0006ib-RX for qemu-devel@nongnu.org; Tue, 04 Sep 2018 21:44:31 -0400 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]:38939) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fxMrr-0006e9-VI for qemu-devel@nongnu.org; Tue, 04 Sep 2018 21:44:29 -0400 Received: by mail-lj1-x233.google.com with SMTP id l15-v6so4804104lji.6 for ; Tue, 04 Sep 2018 18:44:26 -0700 (PDT) Received: from octofox.cadence.com (jcmvbkbc-1-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:1fa::2]) by smtp.gmail.com with ESMTPSA id g10-v6sm59337lfl.11.2018.09.04.18.44.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Sep 2018 18:44:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wY229Uq9Klsh5BvcIvkO5hQDk1cEjYww5T7I5nckfXQ=; b=p4SwKudL1uUrIAU/eysqw+tQ78XVx3DFlOt0zKMLBAi58ZkTZBC8hQqGV9L8GCYeQO vS8E7i8kg5qPrzJ2Yd7CcPRJ8mZZ38h9+4SIVAtGQZPUJjH3jDavXKiYfNm6eqdwcwHr 6m9zReFTQE50nEhv1TlnW6Z9lUkE6g0UVGYyn545k99k0ajZzlzZN9p9kL8NJy1/hRaV nNu73qYXwAJaOvKI73HZGmcbyzexjVdTgsjtXbFecslqzHKXBKVzWa5+7AuB1rEPXSuv Ds+0XkyXutw80UrD8xq4wmSHbvhEjLE4JNZVIYXa0UMGBaL9sx6tw3mbYw0xQsgxTD9i bypw== 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=wY229Uq9Klsh5BvcIvkO5hQDk1cEjYww5T7I5nckfXQ=; b=NWUeuNiSvpBy1CSSqWHgsfTtmm/uztLglSuFYY4nd4dVw8rslzxoPabZJRRU+Xfast iTdlAca9nqfo3bg13xetpX7acNhPy/tu3FMp+itrG7Mi7kzAxGhzELHjeIe+fW1MYmjH zznGoHFOoxJtqgYEldvp1YoY1WSm3rlYd2P7Q3UFL92fQ6/qDtnIUm6tnzwUjwgS+Y5f 4Ouk58ZiJ0RitDmHWWDWDhITn3lECF5IzCEKsJtCndxLbUWBGcwrz20++wCxoM5/utMr 1QtcIFKGFJQpxrlIUXEnV0AwjE79ZJWbGnKdbx/firCe4Ekuzzr9d2LTG7CuPM0pZ4ZN cbEg== X-Gm-Message-State: APzg51ANBO1v/fA1yK2lBlctWk3cANpwN2j3k16+5mXkU6ES7v1yudpy ogyfb3jV45q8mURziUHkLYFksa+GNqQ= X-Google-Smtp-Source: ANB0VdbNQVqXwXfQbtChlo6YdRLQjEf0YsD73yaoNctOt0/HctZlDj4bqXhjrIpMAdMNgkf+ygspcQ== X-Received: by 2002:a2e:3e0d:: with SMTP id l13-v6mr19612088lja.151.1536111865568; Tue, 04 Sep 2018 18:44:25 -0700 (PDT) From: Max Filippov To: qemu-devel@nongnu.org Date: Tue, 4 Sep 2018 18:43:40 -0700 Message-Id: <20180905014352.970-4-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180905014352.970-1-jcmvbkbc@gmail.com> References: <20180905014352.970-1-jcmvbkbc@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::233 Subject: [Qemu-devel] [PATCH 03/15] target/xtensa: extract test for syscall instruction X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Max Filippov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" - mark syscall instruction; - put syscall exception check right after privileged exception check; Signed-off-by: Max Filippov --- target/xtensa/translate.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index ebee7bd65e48..450e30d316a8 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -1047,6 +1047,11 @@ static void disas_xtensa_insn(CPUXtensaState *env, D= isasContext *dc) return; } =20 + if (op_flags & XTENSA_OP_SYSCALL) { + gen_exception_cause(dc, SYSCALL_CAUSE); + return; + } + for (slot =3D 0; slot < slots; ++slot) { XtensaOpcodeOps *ops =3D slot_prop[slot].ops; =20 @@ -2557,12 +2562,6 @@ static void translate_subx(DisasContext *dc, const u= int32_t arg[], } } =20 -static void translate_syscall(DisasContext *dc, const uint32_t arg[], - const uint32_t par[]) -{ - gen_exception_cause(dc, SYSCALL_CAUSE); -} - static void translate_waiti(DisasContext *dc, const uint32_t arg[], const uint32_t par[]) { @@ -4094,7 +4093,7 @@ static const XtensaOpcodeOps core_ops[] =3D { .par =3D (const uint32_t[]){3}, }, { .name =3D "syscall", - .translate =3D translate_syscall, + .op_flags =3D XTENSA_OP_SYSCALL, }, { .name =3D "umul.aa.hh", .translate =3D translate_mac16, --=20 2.11.0