From patchwork Fri Aug 4 19:16:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 710233 Delivered-To: patch@linaro.org Received: by 2002:a05:6359:d30:b0:129:c516:61db with SMTP id gp48csp162563rwb; Fri, 4 Aug 2023 12:18:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGvg5Rlwtqi+TJU8Fh5fFhd95D0oukHURw5gwov381QSAT1B9T0WY+69hfJGu8tKrxiJVUH X-Received: by 2002:ad4:48ce:0:b0:636:2e7c:4955 with SMTP id v14-20020ad448ce000000b006362e7c4955mr2467242qvx.20.1691176729690; Fri, 04 Aug 2023 12:18:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691176729; cv=none; d=google.com; s=arc-20160816; b=N9xfpjcWC/FXtqVR9ct2kx8cF9epEz4GpVpluxUZl2L0DFcv4g8xkesn3M0m2j7aDp NpbOq+iLmqytoPDTXmEc3L9Zfc55935hTDpVXDyfpMeXBus+aVNnctgJ5BH7T9duVxHJ jmu6sm1dAgd/lqPx/jAu2YZVE+ROd5N8V0AqbY6HdobZ2WA3ZGME90b10wjJtR/0uEoZ kp5k7FrDqbE5mlWurpC65UdQ/cus4OO+nb5agK0+ugQhEdtaa/j4kRkSRo5Z/nhLjDon 8SqZuQvui1WjD6uYu3bPMreFusdQBaq3VXX+iwwjU7w8Wec0egmunb7Jjhu64o3RDOCd Ebjw== 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; bh=EwdDPllNFajw64wk8OrbWVHiQAlOJrdv64fonJRMxX0=; fh=N0pzpkMrBzgxwu1Zqyrxxf8KeOW94Gy2VyKYyB2OHBY=; b=ymBWakRXA/+c5Rsq8XFyaVBnwXv6pFA1dgXnCvdyojzDWGfYoG67bIqDVcHMZLtDH9 JoFywMv+diN9X+a8ZMrDvqdWELqS9xtFQsVd2weqqIbr+Ezs/TSMeyyIi2lmV4TTmEV9 8x2DgVHeclD64dC/aDHXEYLRjk/TPjjC0kBokxlliW1NnZ6SLXEtvrMG975DMc0i7j5J JaOQhFvM27Q4Wj4Jfg8ryfNv/qlEnhWkhJjcjd6ued1OXYyXYtyh/aAO9FAZWitYzwX3 gVf3QMxwGpxS+Z1aG0dJmB+lGX2nJvWbSEBN5i56u9iJ4QraImqEsX8NXfV2I/xks/q8 wPmg== ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w5-20020a0c8e45000000b0063d3cf3419esi1689872qvb.551.2023.08.04.12.18.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Aug 2023 12:18:49 -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; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qS0Jd-0001cw-Fk; Fri, 04 Aug 2023 15:18:27 -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 1qS0JM-0001JZ-Vc; Fri, 04 Aug 2023 15:18:10 -0400 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qS0JJ-00076P-Lz; Fri, 04 Aug 2023 15:18:07 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 1049118465; Fri, 4 Aug 2023 22:17:14 +0300 (MSK) Received: from tls.msk.ru (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with SMTP id 93B711B8A8; Fri, 4 Aug 2023 22:16:53 +0300 (MSK) Received: (nullmailer pid 1875744 invoked by uid 1000); Fri, 04 Aug 2023 19:16:49 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Michael Tokarev Subject: [Stable-8.0.4 51/63] target/m68k: Fix semihost lseek offset computation Date: Fri, 4 Aug 2023 22:16:34 +0300 Message-Id: <20230804191647.1875608-20-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, 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: Peter Maydell The arguments for deposit64 are (value, start, length, fieldval); this appears to have thought they were (value, fieldval, start, length). Reorder the parameters to match the actual function. Cc: qemu-stable@nongnu.org Fixes: 950272506d ("target/m68k: Use semihosting/syscalls.h") Reported-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230801154519.3505531-1-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé (cherry picked from commit 8caaae7319a5f7ca449900c0e6bfcaed78fa3ae2) Signed-off-by: Michael Tokarev diff --git a/target/m68k/m68k-semi.c b/target/m68k/m68k-semi.c index 88ad9ba814..239f6e44e9 100644 --- a/target/m68k/m68k-semi.c +++ b/target/m68k/m68k-semi.c @@ -166,7 +166,7 @@ void do_m68k_semihosting(CPUM68KState *env, int nr) GET_ARG64(2); GET_ARG64(3); semihost_sys_lseek(cs, m68k_semi_u64_cb, arg0, - deposit64(arg2, arg1, 32, 32), arg3); + deposit64(arg2, 32, 32, arg1), arg3); break; case HOSTED_RENAME: