From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id SBnQE3a3gGB8RwAAWB0awg (envelope-from ) for ; Wed, 21 Apr 2021 19:38:30 -0400 Received: by simark.ca (Postfix, from userid 112) id 3C5D81F104; Wed, 21 Apr 2021 19:38:30 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_SIGNED, MAILING_LIST_MULTI,RDNS_DYNAMIC,T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 9193B1E783 for ; Wed, 21 Apr 2021 19:38:29 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5077E386EC30; Wed, 21 Apr 2021 23:38:29 +0000 (GMT) Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by sourceware.org (Postfix) with ESMTPS id 9BA843857C74 for ; Wed, 21 Apr 2021 23:38:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9BA843857C74 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=jimw@sifive.com Received: by mail-ed1-x52e.google.com with SMTP id j12so26258845edy.3 for ; Wed, 21 Apr 2021 16:38:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bPOjpAG4BDlcCcIhC/nAZvaAndz8sWM5VHLyDRDr9q4=; b=VYihUGWHMqq8/hOFTD/e+jKQHaFOQpYrNKl72faBPLyZBxguAAArwJEMEo7TDZTDm2 PhKI5LVkHeq2juqtQOuhjfqz485rKGIQcp3rFN84rgwfAIKluvKVjZeOpGcPgAdChgWQ xtltjtajWDAV/MffvoXrwInjuvj7LEGRyynsgRVq5KeE3n9W/cqyjdiEzcyOP1w3p3t1 YY8/BM6w9aH8YM0yYUnl+7/Q2j+ZXWh/MAL1hgweH26vIi33k/Yt2ZPtDayVPRbmjKJH 2+hJfjFlXGguwtI1QRrcJWEblfKKQ4JVEEBVe5tG4jycT/WNoSMFlOxOJgmmn1Owqinc eHOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bPOjpAG4BDlcCcIhC/nAZvaAndz8sWM5VHLyDRDr9q4=; b=WVKc/eQli62rvD8STRkEY+BwDgHlcCjH53/jcZRbnx75CsnigmmnaBw3F9cOa1nBtm yXAwYwW69UpxN4SRgvSUiFbpV9/bqiBbCB5f6Rk77RrFkJwEnuk0flsT2lIb8dOWeh0Y jqSyw/p9Wbsy6/b8TvgEWXEZ2WRRmPulCYQ0tbQroRMBK08lPp4cMjsJ3T8DxlLX4ToN 4feY247M9Vr2MMkvUAhZsP4uCKZzrlTMDgI/Y8ngkNlppHmuQ29IYPs1b4HRkcsgzGQy PrOS54mrxYVxsj4Pqp0HXpvrzL7hG4M7sKXJW4rI1/SGoEldgVnbjjgY2ijndhQjd/LG v36Q== X-Gm-Message-State: AOAM5321sm7r5hvTa7W2BT6s6UEg1DxfHwy6rKtXeBFovI8Ed8z2XjTh MfLXISzNyaizJNlU6qCR8PJpGwNhwf8mGu6chjG8dheu8M8= X-Google-Smtp-Source: ABdhPJyEl1U3FEBEJees4R33cd5dwuBChHTo0Yxqk7pyTYf1s5rhFiKGdKtD15fUhWdoitD4k3cEVUFhq7JHaAMLk90= X-Received: by 2002:a05:6402:2686:: with SMTP id w6mr481066edd.226.1619048305515; Wed, 21 Apr 2021 16:38:25 -0700 (PDT) MIME-Version: 1.0 References: <20210417175831.16413-1-jimw@sifive.com> <20210417175831.16413-10-jimw@sifive.com> In-Reply-To: <20210417175831.16413-10-jimw@sifive.com> From: Jim Wilson Date: Wed, 21 Apr 2021 16:38:14 -0700 Message-ID: Subject: Re: [PATCH 09/24] RISC-V sim: Fix syscall fallback. To: gdb-patches@sourceware.org, Mike Frysinger Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kito Cheng Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On Sat, Apr 17, 2021 at 10:59 AM Jim Wilson wrote: > From: Kito Cheng > > Fall back to sim_syscall if we don't handle this syscall. > > sim/riscv/ > * sim-main.c (execute_i): In case MATCH_ECALL, make default case > call sim_syscall. > --- > sim/riscv/sim-main.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/sim/riscv/sim-main.c b/sim/riscv/sim-main.c > index 597e9c3..48cf27f 100644 > --- a/sim/riscv/sim-main.c > +++ b/sim/riscv/sim-main.c > @@ -1284,7 +1284,8 @@ execute_i (SIM_CPU *cpu, unsigned_word iw, const > struct riscv_opcode *op) > break; > } > default: > - cpu->a0 = -1; > + cpu->a0 = sim_syscall (cpu, cpu->a7, cpu->a0, > + cpu->a1, cpu->a2, cpu->a3); > break; > } > } > -- > 2.7.4 > This one is missing a review. Jim