From patchwork Sat Apr 8 15:43:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 671509 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp834136wrt; Sat, 8 Apr 2023 08:44:38 -0700 (PDT) X-Google-Smtp-Source: AKy350ZvtHaZSgUobV/9B2OXwtDmdMzRF9gVrlkHneklumIgG7oDmcpOFf+8XyhV4vTJXYKqiGj/ X-Received: by 2002:ac8:580f:0:b0:3bf:c3e8:c19b with SMTP id g15-20020ac8580f000000b003bfc3e8c19bmr8263026qtg.22.1680968678122; Sat, 08 Apr 2023 08:44:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680968678; cv=none; d=google.com; s=arc-20160816; b=qhlUValRvRVl133ar2tSIx5xw7spdro8DK+Yqvwt9xj3OtoSiOXbTUwAo6CqE9qNDt g8IlZs1Os14PYs2HhBjRrU8lsY3BHzyoWJoQRrS5S/gIs4p/VpQE5VQpgXKx6dkoI6Gz YRVo1VeyKmDzHWK2QM1Wb4oTL4/M6X3f1JVfiyUxIFU8QJr4AVouBWhK7mECCluOfE+C cqmprBESq3+cRQEUrM+6lcrouCDpe6q4tZPfxC9Lu6EKg/D+Ux4CVGXyW++iEzn7d7Ze +b0yevckGGNyLyuqKIHEjRLM4LyEz6qEvAv3rB55sfIzxwfeL8rI2eflQFpsqJ3lImnj dgEQ== 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:message-id:date:subject:to:from:dkim-signature; bh=h1m1skUerP745G4hFY+E0hiRSYGVJiW6Qdqxzxq+yLk=; b=ONlZfjyGnl5HzGEyAVWvUVAcOnVyz0PKDWYH82ojIKAQl2L08dxxZ5tH4+sljuJQYt i8y3LfuklwHRJ7BwUa7lJI6UoqqeuESla1m9MtQlRVGlb5xgL0BEFwiYmE7FW1VRhrpP llk27KdqcALikIR2CfiNXSYWrarNtmxyf+arSuFKfbettksFjDsNed2p6D5kWon4+/MJ KW4sGQQkpMeuMze8ADMH1zFx5Njm+BcbZVBeT59NCqqJwvY/6+9prUU8RUjSaa9Wlzih fMux2BTfZ0+Yh4FR+TXXiY+5AmHDI3E3qicnyKMKcUhTdfEe5Gcmb4Mu1NXSpTw7mork oa3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=SS1N0VOt; 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 z9-20020a05622a028900b003d4da60a9d5si4611534qtw.214.2023.04.08.08.44.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 08 Apr 2023 08:44:38 -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=SS1N0VOt; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1plAit-0001TM-BV; Sat, 08 Apr 2023 11:43: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 1plAiq-0001Rz-UI for qemu-devel@nongnu.org; Sat, 08 Apr 2023 11:43:25 -0400 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1plAim-0003d4-KR for qemu-devel@nongnu.org; Sat, 08 Apr 2023 11:43:24 -0400 Received: by mail-pj1-x1033.google.com with SMTP id c3so1491026pjg.1 for ; Sat, 08 Apr 2023 08:43:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680968597; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=h1m1skUerP745G4hFY+E0hiRSYGVJiW6Qdqxzxq+yLk=; b=SS1N0VOtQBbPzJ7ayHwb8Jl67hj00803vCFeZ0F/b5EfoLK3gOzghbIxmhFgAHAeMo pzTV+R/L176kjfGaVMDVM3IBXVxk/QwE7BslAswHpLiPgA2OFPYn9iBWlgCToKL2z1lH /3SVc8z2N28Yvs7FJk6JoGb8mAplu1OuyJ+FXhr4OW7WnjwjzOA9c0t0IBreEGN0CwJH l0s9qSv3agh7hMvNdBcY+J7zTAILF9j99FLRev49HXvLdABMJkS4F9peO5DacRfNvN58 nrpuqdrzpkxJBOG4Fr9knCSdrCJXOVuRllawErq5MiCtAhAm4ibFNUIgECbQSYZ338Sr /QDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680968597; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=h1m1skUerP745G4hFY+E0hiRSYGVJiW6Qdqxzxq+yLk=; b=aCAIOggsVw+aHSFHJGlsoqAb59z3iXgFY9gl7VWvJ24Wet9uZ76cJ8kEqbocO6VQKz h7wYzv3RZZgYdLf10lgiLnaCHV1hlL/em+LyG4sEHYbZqEwnGISakmSOdizYRFUW6wfR i5QXsYSwgnOIXUrdsU0qth1LOsBFjrCIkGnHOhAzf6oHhLCNRSIu1cjA7ppu1454JJwW AqS6doDeq04Pcx3mBwZZQ7pdUNAM5/AsYl4elf3KeN6oPfcTmMNuui2Wr55Nor+3qTD2 5d/+HppGhMpzb7X/sJjWTyQDIs4QV9ew1HQ02K7uyfRWc6tVJ6/K3W8Ee/e0MmwFWfmC YLeA== X-Gm-Message-State: AAQBX9dVnulWCeolESUXnc9DrwQQbo2WgxTRG4gIhT7CyHSMwWDOtKtb V7Rje+3oTr9AP23k8EI3Sob+Ln0WPiVg9AWp9yM= X-Received: by 2002:a17:902:ec8a:b0:1a1:ee8c:eef7 with SMTP id x10-20020a170902ec8a00b001a1ee8ceef7mr8619846plg.48.1680968597403; Sat, 08 Apr 2023 08:43:17 -0700 (PDT) Received: from stoup.. ([2602:ae:1541:f901:fcd:4458:21c7:367e]) by smtp.gmail.com with ESMTPSA id je9-20020a170903264900b0019f3e339fb4sm4690345plb.187.2023.04.08.08.43.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Apr 2023 08:43:16 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-8.0] tcg/ppc: Fix TCG_TARGET_CALL_{ARG, RET}_I128 for ppc32 Date: Sat, 8 Apr 2023 08:43:16 -0700 Message-Id: <20230408154316.3812709-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1033.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 For both _CALL_SYSV and _CALL_DARWIN, return is by reference, not in 4 integer registers. For _CALL_SYSV, argument is also by reference. This error resulted in $ ./qemu-system-i386 -nographic qemu-system-i386: tcg/ppc/tcg-target.c.inc:185: \ tcg_target_call_oarg_reg: Assertion `slot >= 0 && slot <= 1' failed. Fixes: 5427a9a7604 ("tcg: Add TCG_TARGET_CALL_{RET,ARG}_I128") Signed-off-by: Richard Henderson Tested-by: Mark Cave-Ayland --- tcg/ppc/tcg-target.c.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index eb9e80ad37..8e6039576a 100644 --- a/tcg/ppc/tcg-target.c.inc +++ b/tcg/ppc/tcg-target.c.inc @@ -44,17 +44,18 @@ #if TCG_TARGET_REG_BITS == 64 # define TCG_TARGET_CALL_ARG_I32 TCG_CALL_ARG_EXTEND +# define TCG_TARGET_CALL_RET_I128 TCG_CALL_RET_NORMAL #else # define TCG_TARGET_CALL_ARG_I32 TCG_CALL_ARG_NORMAL +# define TCG_TARGET_CALL_RET_I128 TCG_CALL_RET_BY_REF #endif #ifdef _CALL_SYSV # define TCG_TARGET_CALL_ARG_I64 TCG_CALL_ARG_EVEN +# define TCG_TARGET_CALL_ARG_I128 TCG_CALL_ARG_BY_REF #else # define TCG_TARGET_CALL_ARG_I64 TCG_CALL_ARG_NORMAL +# define TCG_TARGET_CALL_ARG_I128 TCG_CALL_ARG_NORMAL #endif -/* Note sysv arg alignment applies only to 2-word types, not more. */ -#define TCG_TARGET_CALL_ARG_I128 TCG_CALL_ARG_NORMAL -#define TCG_TARGET_CALL_RET_I128 TCG_CALL_RET_NORMAL #include "../tcg-pool.c.inc" #include "../tcg-ldst.c.inc"