From patchwork Wed Apr 24 22:51:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 791540 Delivered-To: patch@linaro.org Received: by 2002:a5d:4884:0:b0:346:15ad:a2a with SMTP id g4csp1091940wrq; Wed, 24 Apr 2024 15:53:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU7yBmAhO5AVE7OnYQ+XgeAAZsNC/b2dISh3jpkV/D3zPWySz5nOosM4wnmY2zFo48j0WtOM9InVK3iaqxJk3ME X-Google-Smtp-Source: AGHT+IEvmo6iVxZtYblkqeeBBM7BK41/eeuJc4tfY8RevNvSJgS0nimwebl7/Ufgu/GYGUn3Z/er X-Received: by 2002:ad4:4d4f:0:b0:6a0:947d:e7de with SMTP id m15-20020ad44d4f000000b006a0947de7demr3703797qvm.8.1713999189240; Wed, 24 Apr 2024 15:53:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713999189; cv=none; d=google.com; s=arc-20160816; b=v3I0WwZhrU4+27MbyUzKqM0eysIRYJJcYPTg99aUTraxN49vvf4xqazyyueC8Ygp3Z z+QvxIt5UiAYt/X1hVtWae2yx3vtn95MXahMoomNNetyHVh9nizDbIfvOLH1H8VmZeYa ZGAI6nS4dGb/lFhyDt0oXjZYApTd43jJ7SpdFTW56an4Kvc3bgomu/c4bzqmNaia8SqN LJ6ZsAj+VbDRiHHPLXHzwjXh+6e/AxJlT8upHtNdJ0y0QaWfgKiSRFK4ez3B82PBj81p BQUYUW05AsDORvZtYBPVUxHx1eFFzmIpPgSUH2ZwG3HqPNikod3Mzn3ah3qxYfzm4ab1 4pEQ== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hIaIEQSm9VCOv6FXtjW2b8GU4ZH5b2a473JIJYHIFaQ=; fh=P3j12pZrhCzqOnqZjKPrBC9OQstkED2dDYfAmFoOlTU=; b=gYlfwOMB1nZd0bxROhCoDv1helfiHJ00q+kovZino1YDoTO0qEOLIo3f+ylFsW58gN r+jQDD2So6OrffkKjdefWmn4XS3CMiW4WxMJd/HSSXLtrqAz9y/qXrEd8mE2yhre4tK3 KOWVAXzfzk4q6Rh5zZZQbYsDLouyvWI/xOPOSs0GgMMqZhhKdv2+VejkCk4MMMga9Yrh Ongwfr7jJKDauPVWWomofhQAXxtnycUXV2gRmI0Tpd+4Zk1gYx7zpza7lB+UvkyktR8q TeF+fyHG6ZzxsL1nWXehkktAs178DD0pZ+88/aNmmx1hz/8XOuBYDrKkPMAhrPxZRg5u NzIQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B8pj1X+u; 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=pass (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 r4-20020ad45764000000b006a09f4be5ffsi193171qvx.57.2024.04.24.15.53.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Apr 2024 15:53:09 -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=pass header.i=@linaro.org header.s=google header.b=B8pj1X+u; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rzlSj-0006yo-Ah; Wed, 24 Apr 2024 18:51:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rzlSh-0006y9-JK for qemu-devel@nongnu.org; Wed, 24 Apr 2024 18:51:35 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rzlSg-0006gf-0H for qemu-devel@nongnu.org; Wed, 24 Apr 2024 18:51:35 -0400 Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-60275a82611so308014a12.1 for ; Wed, 24 Apr 2024 15:51:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713999092; x=1714603892; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hIaIEQSm9VCOv6FXtjW2b8GU4ZH5b2a473JIJYHIFaQ=; b=B8pj1X+uCGrkrMLRzjaKrI0i7tliJ1bm0K8dIAxN3sEHU3m4UBtUyq7OruVwa2kgaA YiJpWBnp8tj0p0stOA54Lvp5akbesHWtSIiyXAlAocSkCsSb2YHraZqbWn3d/wUcV/Zx nklwjXawCb6443eydVtxI/m7o7pD0JCgRlG/dytJkWiasFK7jR8DcylUy7u4KDxLS7NV 8aZjUzqV1eyfS6ejMTto+Bhg9Q7IRcSSrrKpBRK/AOAEyVmdOw+UBCGuaXUT+Zc2Gxpg Swe87zIY24U2VpE2GqhYLRPH4dM20pMbUyZWXLFJyE2O2aurHMRsXU88oOimJZrtCWvL whbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713999092; x=1714603892; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hIaIEQSm9VCOv6FXtjW2b8GU4ZH5b2a473JIJYHIFaQ=; b=psmMQJj0Roh83xEh/k1Uj8NBIzi3jIwa5iyodU8zuHo+mukm7UDUDNbtFb+OO+YB0y 6gBlRpK48Eknl8ORZEnbcM0WdF0BpP9yz6i4q/6gfuiFROvi4THELX3CbUKwTkmTfE8W zOor3U7QgZsDWp/KEy9mAESpRCKxTl1fHUavgxZWR49hTtzM4aOnAZXprQS0/xdzq/Id P1UfrSprScaAZ+pUD/f1FpHfAc23Nh0IiEeBD6Oasq2kV+R+ugxM/aGAH0rnLVaLLzC1 4bwj6nCaR1rY9eLAdfUigr5b+7yRv8iFpcmrSLtZalQq/f2bIjiWkKgqjwJmwLLe02lh 5wtQ== X-Gm-Message-State: AOJu0YwCXd6nPBd1w+PgPj8vYBjEtKzG+HnGj38RW4EuMnHQca6QLYpt dou7yHgA3tBvENltC1BVyMHC2iqkdn0pvxzmEZHnxXJ7CZ9d59MZVJ3sE3NEaRFRTkoxZJouv1w N X-Received: by 2002:a05:6a20:5605:b0:1a7:a564:14db with SMTP id ir5-20020a056a20560500b001a7a56414dbmr3990710pzc.24.1713999092294; Wed, 24 Apr 2024 15:51:32 -0700 (PDT) Received: from stoup.. ([156.19.246.23]) by smtp.gmail.com with ESMTPSA id it12-20020a056a00458c00b006ead792b6f2sm11960864pfb.1.2024.04.24.15.51.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 15:51:31 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Keith Packard , Peter Maydell Subject: [PULL 7/9] target/m68k: Pass semihosting arg to exit Date: Wed, 24 Apr 2024 15:51:21 -0700 Message-Id: <20240424225123.929152-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240424225123.929152-1-richard.henderson@linaro.org> References: <20240424225123.929152-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Keith Packard Instead of using d0 (the semihost function number), use d1 (the provide exit status). Signed-off-by: Keith Packard Reviewed-by: Peter Maydell Message-Id: <20230802161914.395443-2-keithp@keithp.com> Signed-off-by: Richard Henderson --- target/m68k/m68k-semi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/m68k/m68k-semi.c b/target/m68k/m68k-semi.c index 546cff2246..6fbbd140f3 100644 --- a/target/m68k/m68k-semi.c +++ b/target/m68k/m68k-semi.c @@ -132,8 +132,8 @@ void do_m68k_semihosting(CPUM68KState *env, int nr) args = env->dregs[1]; switch (nr) { case HOSTED_EXIT: - gdb_exit(env->dregs[0]); - exit(env->dregs[0]); + gdb_exit(env->dregs[1]); + exit(env->dregs[1]); case HOSTED_OPEN: GET_ARG(0);