From patchwork Mon Apr 10 15:34:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 672037 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:184:0:0:0:0 with SMTP id p4csp316314wrx; Mon, 10 Apr 2023 08:35:38 -0700 (PDT) X-Google-Smtp-Source: AKy350ZoRdLv2+xsIXGB0DD25wj71kDuyKSnyEQKeXik5ardwR2MgJ3ppCZ+KvSSLQDeB4w3chGu X-Received: by 2002:ac8:5c43:0:b0:3e1:59e8:7451 with SMTP id j3-20020ac85c43000000b003e159e87451mr12543819qtj.14.1681140938221; Mon, 10 Apr 2023 08:35:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681140938; cv=none; d=google.com; s=arc-20160816; b=SZe6DWwhIJmWPJOkeHcFTBvNKfBWg/tSd6Rxd3LKOXXCmiy4njW+CyBYVoVw1PoTEJ Pn2zIN3x3c2c7yQbqNfisrT1qdBktNr4xUa3DlAGFuQJK5oqsr6vFEffdEZ2BiIijg/W 6Ls1BBO0zl5z1cInEfY3CP0peYpcvQkTs/hiaaQubdT02pQRs8aVWe8LD+CFE0hWBmHa 7d/qY3qT2OhHDGvmboPrpuxKJN8HDT+vBLwPIvKSt73qFMeJsP712BKtu3KCKi+LzB2B flpYdvtXGm97eKxzOnY+dtUApmwnIpfAdPKGnbMU8uliLii8YHAPNN96o3Q7BVXfgkPf U2EQ== 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=rcNEhGFLchqZMB3huLw45XXaPWISEFJfrSvpuPV2BPc=; b=IvQDoviB1yeS2EDd6J8mhph/9gfv9lfJYYTmCJ1iwx3FDZ3CEaLxxA2y1xbMQ6a5jz 1pz5s+L0AX2fW+8ammLiUSrnPjYfxYUuuz3OSIMykUaM1VZjDAVfkIz32M5tboN2jvYx Q3y6yco3zuctq1v3g/6sSBu/5Z3xaFyNmknZQN5wpbSVYFFHcRc3QexPdk1Hvx+NH4UL V33Y0jcLu6LiCswkfa+EQtdmR2MhLh2XtlyhNyax1xuoUtmCdBtUex/sYCUiDcsu3xzL C6eEaQmF60Rb+BMNhBm6fshf/F6Bk9pWxVR6x49EF7QGftDcl6lT3b2LUUedbp+ul/aT n6+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AyjpoMXi; 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 u16-20020a05620a455000b007468b3dbd63si8106448qkp.729.2023.04.10.08.35.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Apr 2023 08:35: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=pass header.i=@linaro.org header.s=google header.b=AyjpoMXi; 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 1pltXl-0000bW-K8; Mon, 10 Apr 2023 11:34:57 -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 1pltXi-0000UX-Gr for qemu-devel@nongnu.org; Mon, 10 Apr 2023 11:34:54 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pltXg-0000nP-5i for qemu-devel@nongnu.org; Mon, 10 Apr 2023 11:34:54 -0400 Received: by mail-pl1-x62a.google.com with SMTP id ke16so4885857plb.6 for ; Mon, 10 Apr 2023 08:34:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681140890; 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=rcNEhGFLchqZMB3huLw45XXaPWISEFJfrSvpuPV2BPc=; b=AyjpoMXiXPIjRc41wrEmqxI6orJkcCMvzAJEB3j5RxJw1PpqKF5YCb86SHu8dZBsIA mDwPbmSt14OJ7CdRb3AXyyuRRA0m1Q6BRonkP3QS6M6MljZ+IogZu70PDhXgMOjcgTZp +sP+WSBUACNkHx3+XDFi02UOBdJzQsw7fxNOKXNcvFdc7HRE1GiZbNYIikb7aLZw/PuZ 8x4KurMCj1uvQ/9Dl3Um5fjO1IwhXtz27bVjU4RoXmwbW4sXOdo7ypoQqslC29MRlv4t hfjLwr9fYJaDrRZUlq2dZbybzHqNt6lm9yy2Ao4orHuEhrDkwpHf+k8gnndIM0ch6oO/ 5ofg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681140890; 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=rcNEhGFLchqZMB3huLw45XXaPWISEFJfrSvpuPV2BPc=; b=GZXBoe7IQselhmGvgk3iH5l8OAupIaIJMSqjokbz+DMPzHPtHOyJX8PFacakjURrXT cGpv0PsgfJfsc5ISRDRifG9+LELUaVoY3zBrnMhN7lIFvWvgyO404L+/X+19rbmBMkK8 Hu+cwyyLlRlOAxC7glGl3PhXCX3iDXke5pX+eD2RjwI/haRQpeCJS0eMoeqPeimT5qWA MwQLxiu8zHac/uCeyc7LmxUCgHYk/P0VpVOen6BG9LOF3Xv7F9qrWsxNgkikGZdgqcmJ 3FhThB2jgYAm79iIrFAcuTVAgQsD9jLEjLnhx+h7YQvHB/fZwm9MFYNLLGev1j2uFcqe fYcw== X-Gm-Message-State: AAQBX9ehr6OBRCrknMARm16c85+2mZc7pS/Yq+kq1P2oeVa0hWV0jA+C Lm46tg2gfr45v23/ngimurXWSIKMzrXW1suPuAQ= X-Received: by 2002:a17:903:4101:b0:1a5:19bc:d70d with SMTP id r1-20020a170903410100b001a519bcd70dmr8196103pld.38.1681140890674; Mon, 10 Apr 2023 08:34:50 -0700 (PDT) Received: from stoup.. ([2602:ae:1541:f901:2e6b:e4d3:9526:71d6]) by smtp.gmail.com with ESMTPSA id jj6-20020a170903048600b001a64e854553sm534402plb.159.2023.04.10.08.34.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Apr 2023 08:34:50 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org Subject: [PULL 1/3] tcg/i386: Adjust assert in tcg_out_addi_ptr Date: Mon, 10 Apr 2023 08:34:46 -0700 Message-Id: <20230410153448.787498-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230410153448.787498-1-richard.henderson@linaro.org> References: <20230410153448.787498-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.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 We can arrive here on _WIN64 because Int128 is passed by reference. Change the assert to check that the immediate is in range, instead of attempting to check the host ABI. Fixes: 6a6d772e30d ("tcg: Introduce tcg_out_addi_ptr") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1581 Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc index 4444eb9234..5a151fe64a 100644 --- a/tcg/i386/tcg-target.c.inc +++ b/tcg/i386/tcg-target.c.inc @@ -1082,7 +1082,7 @@ static void tcg_out_addi_ptr(TCGContext *s, TCGReg rd, TCGReg rs, tcg_target_long imm) { /* This function is only used for passing structs by reference. */ - tcg_debug_assert(TCG_TARGET_REG_BITS == 32); + tcg_debug_assert(imm == (int32_t)imm); tcg_out_modrm_offset(s, OPC_LEA, rd, rs, imm); } From patchwork Mon Apr 10 15:34:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 672036 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:184:0:0:0:0 with SMTP id p4csp316190wrx; Mon, 10 Apr 2023 08:35:21 -0700 (PDT) X-Google-Smtp-Source: AKy350bqTrI2ZnqqL77XESDglo7IrS9W1C1N6m31gnPC4fmPGwIGmJqH+c2kR+ggIB3oNmXMheu0 X-Received: by 2002:a05:622a:1803:b0:3e4:e79c:55db with SMTP id t3-20020a05622a180300b003e4e79c55dbmr18716757qtc.42.1681140921412; Mon, 10 Apr 2023 08:35:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681140921; cv=none; d=google.com; s=arc-20160816; b=AmAagi906Wvg/oWz2Se4m9d0J8D0XoS06WVVYE6JtEI/zmH4Q3B/D43J6tjxmJOBVr u6uMh4JSIzl9d924xmhPhSk69DKyrYkDDmNtsBo1ILLUJpqpqt99FclpHtilr5Cmqziv ZHLbqPMvX5uxBYG74Rl53H/fiyk6NupBAmsJl7xRotoEGYadrCN3NOVzAA+7RUUx3boU LjY8YO12NehtlJi8dNqtQ0a5He1rH1VoKMaQ4ms616/6MRHXcopM2uJwP2dI2XmmX8fy sBp7CnOevt43qEbU3sSubrm7iX/EDvKCEZOnx7gmnIl3PkRNdQ0WCV+81a8HFzHk9XY6 Ul9w== 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=lnXUaEENQ1jQIIP6iKAfC6khYvLIRe71lrXEP0Olkj4=; b=I/WdefyBcZZH9JkiBDQ0wcdRqvy7D7XmNwoKPPCYbnkudGnRbQJeygUyECKnM7d5tz yRYHywMnJQVDYr/1TkQoAlQ/ynf3Z3QasBl900bgyLGxmTI2nuxGI2/WPma5ciN4x0Ef Zy66ezRvRnN619QzofkcTHNyHUcAaUHPbXBJW+mvNcTaIKqbTM5URoQWPedJtS4pC2Jc rmcl1EDQdHVHKrgnr11rwTCf97543sFEa1MIvrhzSOw41wncZTrkyZMCPKcRfhtZggVi mI2/X+vB8/RyvyXfdkeQ6+Pya3oefmPAd1Nm1itwRV8yCP4Ki/MP42yQVgnapTL2iusz VOzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AyC1xutJ; 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 o7-20020a05622a008700b003b63a6cc22dsi7309852qtw.701.2023.04.10.08.35.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Apr 2023 08:35:21 -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=AyC1xutJ; 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 1pltXl-0000ar-07; Mon, 10 Apr 2023 11:34:57 -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 1pltXi-0000Vb-Ne for qemu-devel@nongnu.org; Mon, 10 Apr 2023 11:34:54 -0400 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pltXh-0000nZ-1V for qemu-devel@nongnu.org; Mon, 10 Apr 2023 11:34:54 -0400 Received: by mail-pj1-x102f.google.com with SMTP id l9-20020a17090a3f0900b0023d32684e7fso12916591pjc.1 for ; Mon, 10 Apr 2023 08:34:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681140891; 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=lnXUaEENQ1jQIIP6iKAfC6khYvLIRe71lrXEP0Olkj4=; b=AyC1xutJVN2WpA3l2onnUy33e2QCFeI8zi7cr8YuRhlNn+XLPW55MXXKeg8h6JAljw d70+JEU/bDmY190ajZ3mZywW4yGjw37x12imDgTlrVcra3Nf81VsYVLm72dR5BxmGgnm GP0uoDVFIL5cB7MKOTZVWY8ZFOwwSWVkP0FNioRmgPhblFBb10xY5sS36M3iCJOEDaUz LGBY77WaxF4H+NqEbTnSzBjgx4yRWHde5Kp7h7N/8aNzNDV+b7V5tXy0lN0I7JRAC+EX M6zTTzTd4T25ZrrMsxa582vFy3IYdF2Nwb5Ylt/3NGb4TKVpeC4e7bIVGt99qSBtpyAJ B5Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681140891; 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=lnXUaEENQ1jQIIP6iKAfC6khYvLIRe71lrXEP0Olkj4=; b=ZtZk5Yzcbwa/j3tTmu5FNAblplEwuVCcPWHQR4GigykMV3nh3YXHMGhobutthswbqJ qtlzQQLxN2xSwb+ns0nzR/FCSEAXRJq6Bp8GPJEb5zpS40Kzc1GGSToaQe9EZywubpPh I6ik+N4ZOINBF7HfydmKKZq3W1hHC1/6jIUh6VgGYLEUnUW0SE/B0zAmeyQvvaeONQnt FAsvBKRWf6kiG5TfV7Jd7k87f1Bs5/QptKkhEraQ3WR/hfTF0H6sZnNbElAgyv7vEvt+ elr7ddWaOaQufFmnZFuoycc7Glqrsbkj/Og5Kw5duEr+UMuI2s8QT2NQCI/IXl4sE5Q3 VEZQ== X-Gm-Message-State: AAQBX9epWxOOZSXFLlRw/Qr2yoxLrKk8hZMjDVcTSxf6ibsOjWpwfrd7 aq26lmnVkeZa2WaDRKox8muxwHPM5ifLMoVrTlU= X-Received: by 2002:a17:903:244d:b0:1a1:aa68:7e61 with SMTP id l13-20020a170903244d00b001a1aa687e61mr15586536pls.33.1681140891508; Mon, 10 Apr 2023 08:34:51 -0700 (PDT) Received: from stoup.. ([2602:ae:1541:f901:2e6b:e4d3:9526:71d6]) by smtp.gmail.com with ESMTPSA id jj6-20020a170903048600b001a64e854553sm534402plb.159.2023.04.10.08.34.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Apr 2023 08:34:51 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org Subject: [PULL 2/3] tcg/mips: Fix TCG_TARGET_CALL_RET_I128 for o32 abi Date: Mon, 10 Apr 2023 08:34:47 -0700 Message-Id: <20230410153448.787498-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230410153448.787498-1-richard.henderson@linaro.org> References: <20230410153448.787498-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102f.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 The return is by reference, not in 4 integer registers. This error resulted in qemu-system-i386: tcg/mips/tcg-target.c.inc:140: \ 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 --- tcg/mips/tcg-target.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tcg/mips/tcg-target.h b/tcg/mips/tcg-target.h index 68b11e4d48..2431fc5353 100644 --- a/tcg/mips/tcg-target.h +++ b/tcg/mips/tcg-target.h @@ -84,13 +84,14 @@ typedef enum { #if _MIPS_SIM == _ABIO32 # define TCG_TARGET_CALL_STACK_OFFSET 16 # define TCG_TARGET_CALL_ARG_I64 TCG_CALL_ARG_EVEN +# define TCG_TARGET_CALL_RET_I128 TCG_CALL_RET_BY_REF #else # define TCG_TARGET_CALL_STACK_OFFSET 0 # define TCG_TARGET_CALL_ARG_I64 TCG_CALL_ARG_NORMAL +# define TCG_TARGET_CALL_RET_I128 TCG_CALL_RET_NORMAL #endif #define TCG_TARGET_CALL_ARG_I32 TCG_CALL_ARG_NORMAL #define TCG_TARGET_CALL_ARG_I128 TCG_CALL_ARG_EVEN -#define TCG_TARGET_CALL_RET_I128 TCG_CALL_RET_NORMAL /* MOVN/MOVZ instructions detection */ #if (defined(__mips_isa_rev) && (__mips_isa_rev >= 1)) || \ From patchwork Mon Apr 10 15:34:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 672038 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:184:0:0:0:0 with SMTP id p4csp316424wrx; Mon, 10 Apr 2023 08:35:49 -0700 (PDT) X-Google-Smtp-Source: AKy350bxC+m1LUX/bUnQqxO5YfA+3gIIz8eGYi18Gf/q2/BB1/KyJFfNDkbf5H7GWci+DGoxKKtc X-Received: by 2002:a05:622a:1888:b0:3e6:3c44:e200 with SMTP id v8-20020a05622a188800b003e63c44e200mr11966165qtc.65.1681140949535; Mon, 10 Apr 2023 08:35:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681140949; cv=none; d=google.com; s=arc-20160816; b=PgFWrajOUXobSyqyhNEBIYQZIMvETAvpLf5U7nvrfZ+OFKXH7TjSb/uU8eMZQ1anF2 qfUyWg0m2U1e+Qcfueju01v+Ju7pCEqWMR63s4zKEwt/j9I8+spD8EoaO1TEed8rhqOP vgIplpTNqhA41Od0/J2vUKKzc7tDNJf4QZSsiA1uc9xhsbxOXIOS/e2Mzd+bfj2KoxTE 3hirRSytpefrUbWbJJGefjD7+tYJOyN7vWYughRNxMfTAUP+gwoEFJR9O/v38Ob7u6NA DzdhIExvFotRLgnpdVZ+i37W4oe+NDB57psERNadjM2PmcbcYykS9Q3zEBaRXmRyNVuY LFbQ== 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=gBl5GODmqunu8RhMyVnek3iPrET/1omof3j02qUp0Cw=; b=Cn7buvsjMFbATBJ7lS7mkO9brASm8jiFBzl94NqeBhGuWpiDFBI7hl/BpzP1C4qJeu HV45NB8lrz3nXuA8v6WM7fG3nOscT0jekvsg5UjtPtW2sDZ7fZ3116iQPEgc7wl0cD9o nVzJi/eg5Ngh1kiA0ScAybLvH9nX0Chq6pTEjb3UD0bF8LdsobLLt0Q+2cWHtHbq0UBG YC9yaKv3wAbXTiP5yZxZ6/tXEqBVA7CZsqo/vW+3bpatF/P4+ZIxeZ+7WTGxUWK95jJ1 r2GRrwZr7pewBIz8hl1so2E5G8/puQSZH6310z6wda/EItPjWgq69FYJVEe9DId58J/t FGHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NmMmV9wr; 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 bp34-20020a05620a45a200b0071b2303a52csi7432820qkb.752.2023.04.10.08.35.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Apr 2023 08:35: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; dkim=pass header.i=@linaro.org header.s=google header.b=NmMmV9wr; 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 1pltXm-0000bp-44; Mon, 10 Apr 2023 11:34:58 -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 1pltXj-0000Xr-7W for qemu-devel@nongnu.org; Mon, 10 Apr 2023 11:34:55 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pltXh-0000nf-HU for qemu-devel@nongnu.org; Mon, 10 Apr 2023 11:34:54 -0400 Received: by mail-pl1-x636.google.com with SMTP id q2so9832865pll.7 for ; Mon, 10 Apr 2023 08:34:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681140892; 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=gBl5GODmqunu8RhMyVnek3iPrET/1omof3j02qUp0Cw=; b=NmMmV9wr+UoyWtllFJOOoYCEeNv9SAP+ygvNMlQXKIIUNneqCsR9j4HXlg5N1Egmn/ ldGOSgdb8e2vsFZg9N/TZvKazNqXHHYGg25DRbBnGt9mO8SAsR1CY5sjv6eX9r8aKQ/H JKzhsapjs3TiW5hkCHFcE8P94SnRhTqF9kj8VxnmzOcoJvj+JUGd67Mi+oBsoSlW3AZ8 B7Hq8oCHp/LfkGiOfCuOx/qRWowDoGFQfLnbyWzPzs1Ibnypdnp9d/gX9fWoB34y5Yu/ W7Mczya6vb4rWVtWMR+LSMrBpu/QOOkR88IAEnPpT0urRnTqPuuEt4S0x8CHXlUjel/e NYQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681140892; 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=gBl5GODmqunu8RhMyVnek3iPrET/1omof3j02qUp0Cw=; b=Mn1hhdJ5HNcPhdxCFLeF/cEtgIdtamNIbcOgU56lRVC5TegZhTiUncfsbk9uRJhCDR 1fmY9YFnFiMtGzPUx2D7q4k6hhv5WePEhAi+zhHuf2sVR0F60pOFfOJR5gkRjTlPOSP1 GyNQXMbs0/c1XqX6QDaIBNJXqsA8RqaDd3lKuGw6jueK9nG7XM2xp73ZAWhEP/vcGmZ1 VRgqoVvCicqFeuPUAtR5Es2YAQL8tTDD2IYhibc9iX4IutcCCv+hoo/dC/PidCpt9BjA uwYzcDVejFsC0QhDOfI0ApkRBumOJsMD/RbFCqJhBr75/7mlxedgfPFKPBIBY2dGNPMQ QwMA== X-Gm-Message-State: AAQBX9eMwrtwxPugWcGk2h6T3hEh9/n1eBzLtyiynqjcAA1uhyo2Cmvh 4nonUgcrYMRC+HiCl+Porju6GDXOAZ4V8K1vVCc= X-Received: by 2002:a17:902:fb07:b0:1a5:ac0e:a4ea with SMTP id le7-20020a170902fb0700b001a5ac0ea4eamr5348007plb.29.1681140892246; Mon, 10 Apr 2023 08:34:52 -0700 (PDT) Received: from stoup.. ([2602:ae:1541:f901:2e6b:e4d3:9526:71d6]) by smtp.gmail.com with ESMTPSA id jj6-20020a170903048600b001a64e854553sm534402plb.159.2023.04.10.08.34.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Apr 2023 08:34:51 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, Mark Cave-Ayland Subject: [PULL 3/3] tcg/ppc: Fix TCG_TARGET_CALL_{ARG,RET}_I128 for ppc32 Date: Mon, 10 Apr 2023 08:34:48 -0700 Message-Id: <20230410153448.787498-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230410153448.787498-1-richard.henderson@linaro.org> References: <20230410153448.787498-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.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") Tested-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- 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 afadf9a1e3..066b49224a 100644 --- a/tcg/ppc/tcg-target.c.inc +++ b/tcg/ppc/tcg-target.c.inc @@ -46,17 +46,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 /* For some memory operations, we need a scratch that isn't R0. For the AIX calling convention, we can re-use the TOC register since we'll be reloading