From patchwork Fri Jul 5 15:30:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810411 Delivered-To: patch@linaro.org Received: by 2002:ab3:6bc5:0:b0:273:6c53:9181 with SMTP id v5csp525248ltk; Fri, 5 Jul 2024 08:34:59 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXMJzH+wuKxqjhd9rKGIC6WX32meYKY3E2Re3pBZfjPtVmp9luFovEuKQHv3sXQIYh51+tq51Xxt7kpx3VlWgXD X-Google-Smtp-Source: AGHT+IHQT1dK26ghPfS4r4go8VQi+WxiBjQH5V/JGLjGYQgw7wJw6Os6bXvDYrnV/XyURZLq2TBa X-Received: by 2002:ad4:5f8e:0:b0:6b0:75bd:7fb with SMTP id 6a1803df08f44-6b5ed099c06mr47598406d6.40.1720193699103; Fri, 05 Jul 2024 08:34:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193699; cv=none; d=google.com; s=arc-20160816; b=OoMYkM3qn+oR/mnhHSgWls8qfodhHp3n3s0qHLiem4rvbKyMOEYStsfLxEn/pO3nPO aJ2UsVeY351Od6d99txBYBCTyXTbNhMmo5Adf+1LUPuaJy6AludH1YOLvVdnkzo+4KKn h0wYpMDjZ28r0XS1G0yO8HRo+hkiuDbNQs9DGn8UvS30ttyVPxmQCNlKbjiBz6CX3Hua V222or0KItaUefRe+yBOvsegv2sKrDdv2+yJFodq4Xov0ohHaSysLDhr1eYtbJeQt1XK Z7xCLeDQx0hi/J2AZ/93cYcLzR8RVjedVlYtu9ewWgop9v4KFkIjLCoi7f90045miK5K nyYA== 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=ldyUH9Hn6Eww0iJRRhRb5soziQO77Zzr7htHiwXtIxg=; fh=RNVWmd7TwlX/wyQcdhmnon4JQcsRaZwH7hItUZb0D88=; b=GGZj8VugB0ZgKcSQTnj9Ff0ORYF985QKGXpGuaC2ac7nXMbmBoQG5DarRJQMazYKAF 9iNzI9KrumvQe2BgF2Rqj6qPjyH8kS35ksldvXNvul1ZfwXfWiaV/SmDj4yUbv5A7/l5 xUxNHDM0wC0af23qvtfh29n+Q1b733vtRGjRsAUWf1WvmFYg3t3/7Q4p/cYIQEDlw3pl BsMzOC2sMPfN/VrpctX7y115C3m1Koxp53TjMiVxmqgwTJOnENuMYIjlaCD+YWIPIIuw EuhsS4scDABcla5wFVIHjNhjor+XyMHH+TnaafDslTm9g02PxesvVMXyedW0uMGMccxy V1ig==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vcazQ5gK; 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 6a1803df08f44-6b5e6635d74si52781186d6.382.2024.07.05.08.34.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:34:59 -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=vcazQ5gK; 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 1sPktv-0005dB-Ed; Fri, 05 Jul 2024 11:31:07 -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 1sPktq-0005bk-UC for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:04 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPktn-0000IM-Sj for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:02 -0400 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-58b447c511eso2379572a12.2 for ; Fri, 05 Jul 2024 08:30:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193455; x=1720798255; 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=ldyUH9Hn6Eww0iJRRhRb5soziQO77Zzr7htHiwXtIxg=; b=vcazQ5gK9cdfKbFtgkJ14zzr9+j84b462kAWPGDtM7GIgN4qS1s1N5saR0iNe+dkwt pSRqq8/2tVtkZe9EpFEgOCoG5F6hZSU4EskTYbI7yJR1I72umHCr2fT0ZdqJkLJ05QLp EvslcGMPD5enJaEl49PD96xuTMZLqboF0jHbkEdKlrNz9qEHecnci2Z+L7ARqGF6zXDa VJmjKW6mUKzzvhOOZ/YJalIvm3trLp5W1itxAVPgpyenXorjlAvKajnT3YzHk5HJjAUo rZaVB4bQHch6SF2tMek081MUtfbJZHRQuk+6DcrupIzE/X95psccYib4MDuRJgaeO/T5 eeng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193455; x=1720798255; 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=ldyUH9Hn6Eww0iJRRhRb5soziQO77Zzr7htHiwXtIxg=; b=Wmu+8Bd+FwYdZUiuPrpNEhMNE0rnptwhr2RJGOlV22J1seiU2qugYylTvnyHfPOcaY MplZf2fYVx2rKPqWRpccJocqW8+gZW5WZx5L73+uylUSes+CE9E/xxEY7SPKAeFHHmE9 EoMnFlXKVe7C4/QmQV9BQ7Up6qkk6GT9DC4I0Dv0c51lZSypPVfznxNg/wQK4OJGibt+ j3FhsjQegqFFY4zLG6VVrQs4xK2ip+Bu1qzhjTx+sPuGWISdeXyVKWzsiX0Py9EBoElm fbdAvQdqAChFxnoozXYAhgExR3cBRDTUm4vB/PgHnOW/sW0kY/5vMCudjq15eJ+ZLmPp rwZw== X-Gm-Message-State: AOJu0Yw1oZmjM0byeGQkV/hCVcJlmZ2vKQGB8bE6nh8Hwc2SmqOeFs66 vHInai8TqkW0PaKRkdaMMrOUUT3LMwHn7KITkhtV9s6S6zvYHRmb4g8DQgIfHKs= X-Received: by 2002:a17:906:5acd:b0:a72:4402:9344 with SMTP id a640c23a62f3a-a77ba46ce62mr418927266b.20.1720193454358; Fri, 05 Jul 2024 08:30:54 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a77d965dc4asm37874766b.87.2024.07.05.08.30.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:30:53 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2401F5F8AF; Fri, 5 Jul 2024 16:30:53 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 01/40] tests/lcitool: fix debian-i686-cross toolchain prefix Date: Fri, 5 Jul 2024 16:30:13 +0100 Message-Id: <20240705153052.1219696-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52f.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 I guess we never noticed and tried to build with this cross image. Fix the toolchain prefix so we actually build 32 bit images. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-2-alex.bennee@linaro.org> diff --git a/tests/docker/dockerfiles/debian-i686-cross.docker b/tests/docker/dockerfiles/debian-i686-cross.docker index f1e5b0b877..f4ef054a2e 100644 --- a/tests/docker/dockerfiles/debian-i686-cross.docker +++ b/tests/docker/dockerfiles/debian-i686-cross.docker @@ -169,7 +169,7 @@ endian = 'little'\n" > /usr/local/share/meson/cross/i686-linux-gnu && \ ENV ABI "i686-linux-gnu" ENV MESON_OPTS "--cross-file=i686-linux-gnu" -ENV QEMU_CONFIGURE_OPTS --cross-prefix=x86_64-linux-gnu- +ENV QEMU_CONFIGURE_OPTS --cross-prefix=i686-linux-gnu- ENV DEF_TARGET_LIST x86_64-softmmu,x86_64-linux-user,i386-softmmu,i386-linux-user # As a final step configure the user (if env is defined) ARG USER diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh index b25e3ac4dd..ac803e34f1 100755 --- a/tests/lcitool/refresh +++ b/tests/lcitool/refresh @@ -167,7 +167,7 @@ try: generate_dockerfile("debian-i686-cross", "debian-11", cross="i686", - trailer=cross_build("x86_64-linux-gnu-", + trailer=cross_build("i686-linux-gnu-", "x86_64-softmmu," "x86_64-linux-user," "i386-softmmu,i386-linux-user")) From patchwork Fri Jul 5 15:30:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810404 Delivered-To: patch@linaro.org Received: by 2002:ab3:6bc5:0:b0:273:6c53:9181 with SMTP id v5csp524604ltk; Fri, 5 Jul 2024 08:33:34 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWgn0LfH0N5mEfkhpu00F94D8GshtkRdUeiErBnOzAOHGVSN6wNvxOkvfPX1IFJ+LMWzu3+xnul9ZjWpMBIFVfb X-Google-Smtp-Source: AGHT+IEr3aIPS0d+zfAee69H0fvtLhpSVeDyIQzFQnbiE3Ra/12zqwsdJaPIip/87F1wP1Shg34m X-Received: by 2002:a05:6214:212b:b0:6b5:116:b212 with SMTP id 6a1803df08f44-6b5ed0263aamr56281416d6.45.1720193613953; Fri, 05 Jul 2024 08:33:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193613; cv=none; d=google.com; s=arc-20160816; b=nfE7u9OJC8UhH9ken55uvLDCMk6oYD48jBdRhBncr/2QRk3Skezoz86c6tSAa0qm7G AI89TGWDDnqDOFiX/kgMjOjIHFyimGg9UMw1/sWG8BGxUgn62q6rQ8/X8P1ZYtOZsPRe oTipJdnE89Yx1w171pYrqYNq1i7lDteH91kLNwS7+mcH/GPpMi+hITi5R0K3Dpt7GuGV 6Yjp2BPshjfanShSucHHJJk7WgUY+7VoXLeapag185E6ILEnnsfAWhPkSq3kgAvF74bO t1+iYnXDqKaVIDPXy9bw66LDDXUcQm+pfUwyjm6yfJUQcNFckfSAYdNB4j1ppjOl0M39 uNEA== 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=opDNu+IupAr1RipdhERW7M7QO1kyIP56AngvVE3Dieo=; fh=P8FetLEEI+AlaHqem49VUVcfdaD5c5g7Zxzzh1kqK8A=; b=ithkBdVOBmEwG/LqYgW6L/3d5JBsc9eHy5ZuPdCth1tjsd54EjJMKy0Qa8xLp6aUBj dADYfMOAtl+PkhaUe6SD1svjykD1i6nC9OKff6+JbGCYiBpbZudFX/rw2x3kUhnguJKK AgBEsoxD6daYGiDULz6CFFzrjnYG52SNeNdLwADuhqV6EAwzBaxBqtfdyDULpqB0Hp7U I+tnCzczJxw4nT07YstsHAApXPG+wytr2TFUwkq5XsyrGcMF+TytV9yVdsAkS5QB21r6 IROWN/+zP5nMREaJxDvEGhowI3oL7Wky5sucj4MoCTqp4igO7HRL6sK+oB7RzfkZbE3b FdbA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zy66lh6u; 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 6a1803df08f44-6b59e5eb34dsi175277416d6.352.2024.07.05.08.33.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:33:33 -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=zy66lh6u; 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 1sPkty-0005en-DX; Fri, 05 Jul 2024 11:31:10 -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 1sPktq-0005bf-7M for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:04 -0400 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPktm-0000He-Fm for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:01 -0400 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a77c2d89af8so164664066b.2 for ; Fri, 05 Jul 2024 08:30:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193455; x=1720798255; 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=opDNu+IupAr1RipdhERW7M7QO1kyIP56AngvVE3Dieo=; b=zy66lh6uLtmbnHP/7GB2SmWSjqa+OiLRrYsMM0M1u3fvjvYFKYjuNoyLFlk+iyVAU2 hoLvVmPJCA87gmBcyrchAi54jsStxfhIGBM8D1RzXU1/VYFFFoR7mh2AYnc5qZIdEdgH GSVKD8sYKt3QnoStqBFfu87gHuKQZzpbehUUvYlUnb5CE14ySaR9vSbhdxjZRuDW5Ptm 3hz1lg+mFNnsrvZFAHeNA6Sch79EeS8XSkzviCHdtr1w6Wzoe4GWQrMznpuQEuOOxDhm n4jhO8jvGoyZNlwUW6KUgWZepZORdPfj3aK6CB97VzCv25/98FkKCA+8qKL7Su0Yvlu3 /RYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193455; x=1720798255; 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=opDNu+IupAr1RipdhERW7M7QO1kyIP56AngvVE3Dieo=; b=GGNKt0P9uGwfkC1nukzM+ju294sLyn2Ya9mBnWBo8WAC2ifOHxPtF+XcC+yK5wdtly q82xs0C+CETiGSM2C9HJrqqiVUBRjf5A3a5oKjQlCe0hKbk8OncNCEu+Rfh0yC2L1sxm xWksaXxrEVqHHN3teEmFIgkdKhSW4oswlF/RrvcSWbsAFjbxo6e8mCxkpjZtkUQAPLfY 6dxbro8Ko6ZRmMs/TMeT6dbLWXECHM2QBxV7jdY8LyTwbuLa34LgKJ7oX3UL05t8afZv lKvqoI2VWwXAdyQHxKyckqdikibOVXPHc6HyIqztKT0/ZGPhxQY5aF8TsGPZpRW+fGWM qIqw== X-Gm-Message-State: AOJu0YziA+qKGzj1j0epip9RlfaEYPnroNpMX5SZwb2Y7I5BC5cg+jAW tZN7EW/qVfyr0ULLZ9R3vulr3TyAaNIHG1zrJSTVZjZSIoxXysTOY+jHwlAg1ss= X-Received: by 2002:a17:906:228d:b0:a77:c314:d621 with SMTP id a640c23a62f3a-a77c314d83amr209266666b.13.1720193454631; Fri, 05 Jul 2024 08:30:54 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a72aaf1bd30sm698297466b.12.2024.07.05.08.30.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:30:53 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 37FCD5F92A; Fri, 5 Jul 2024 16:30:53 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 02/40] testing: restore some testing for i686 Date: Fri, 5 Jul 2024 16:30:14 +0100 Message-Id: <20240705153052.1219696-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62c.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 commit 4f9a8315e6 (gitlab-ci.d/crossbuilds: Drop the i386 system emulation job) was a little too aggressive dropping testing for 32 bit system builds. Partially revert but using the debian-i686 cross build images this time as fedora has deprecated the 32 bit stuff. As the SEV breakage gets in the way and its TCG issues we want to catch I've added --disable-kvm to the build. Reported-by: Richard Henderson Suggested-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-3-alex.bennee@linaro.org> diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml index 47bdb99b5b..3de0341afe 100644 --- a/.gitlab-ci.d/crossbuilds.yml +++ b/.gitlab-ci.d/crossbuilds.yml @@ -37,6 +37,17 @@ cross-arm64-kvm-only: IMAGE: debian-arm64-cross EXTRA_CONFIGURE_OPTS: --disable-tcg --without-default-features +cross-i686-system: + extends: + - .cross_system_build_job + - .cross_test_artifacts + needs: + job: i686-debian-cross-container + variables: + IMAGE: debian-i686-cross + EXTRA_CONFIGURE_OPTS: --disable-kvm + MAKE_CHECK_ARGS: check-qtest + cross-i686-user: extends: - .cross_user_build_job From patchwork Fri Jul 5 15:30:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810399 Delivered-To: patch@linaro.org Received: by 2002:ab3:6bc5:0:b0:273:6c53:9181 with SMTP id v5csp523939ltk; Fri, 5 Jul 2024 08:32:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVXRxo5aslDdk0dUJTuyJwmQnYM4fjZjhiCNAhmmgtHrB26LO6vTzdrm+C7c7hI4l8ZNZ+TzRghUlKkPby7WOai X-Google-Smtp-Source: AGHT+IEbCMV5sKuzvrbkGu42UYbOqcaK8TJ8T+aw4m60CIJMUsvTirE7+1Izx3oEk3C6pPj3JFUd X-Received: by 2002:ac8:5d43:0:b0:43b:173e:ce1b with SMTP id d75a77b69052e-447ccf7f229mr63713051cf.32.1720193545660; Fri, 05 Jul 2024 08:32:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193545; cv=none; d=google.com; s=arc-20160816; b=LpegxtUfJRmGgkTA3F2+iBPBT8i3x+LgY5boWcGq1ML0s25GIETkH5Cfcp4oYrFo92 P7bAIY37+T0dOlBiXoGQ11tS1VdmAsxlGjkfYJo/wmyzbU7teAzPG1fdK5hGOmaNmdIe IRwVt8yhkrAxC0wmoQI8ssSRuUFrzs2zIrZFRkYj4whlZVhKi+TcEQrUyY3lQaK+RmR3 Ta3SuPQB0KF/9uIjOcqlFQLV2xYLFputTxY1opbKM85fq5GKtnneRyUmvj3Exwu0yX1b Z5JOvCxbFntnCiSYyMvLdPz1tFkoJJd0VvGF9MFXXk2AZ5SFVIemgyPDdqMbWoHaRzna DtBQ== 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=CurKVhgGzPO6kvK5KOd6kl4xIM/fKHjGD5Ox4ZiqWow=; fh=su5fQotZIJRhEQMgDtijcx49gTTbNdmkUZoqiNzp9QU=; b=ws/L50IcKE65PZZ9KWcPpqml0go64adOmJpwwH3dw+1xgZ3FIbO9/Dg10c+TRkouZi zlv8QmCPVGrTqu/gOY354DRnwDO1Nvb8hpRjPI+cBo6OAQOSJ4v0Cr/xES6FCUi1Mvza 5Ne4nePtgrP/0idzqbuP1f7Scg9nGCMqb5UJZpxtNOaIifqL7pyiv6sXqALFD8NNe2uc wC95clDzPDOMrk0y1/pQQqRuV3NXjrgZxGHnpjh7v4EJNgNAa0J6JnmWJPqcW3E0fBOW GTr99ELa5v5XWI0/cmA+xHE4iaL9p91A5d3e6WMpp0AlQMRC8L6gcfgD2ZsnhIJSCV/1 kaGw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QooZZcdZ; 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 d75a77b69052e-44651486423si170489321cf.385.2024.07.05.08.32.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:32:25 -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=QooZZcdZ; 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 1sPktw-0005eC-HU; Fri, 05 Jul 2024 11:31:08 -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 1sPktq-0005bl-Uf for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:04 -0400 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPktm-0000Im-Fn for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:02 -0400 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a77c9d3e593so103473166b.0 for ; Fri, 05 Jul 2024 08:30:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193455; x=1720798255; 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=CurKVhgGzPO6kvK5KOd6kl4xIM/fKHjGD5Ox4ZiqWow=; b=QooZZcdZAyIt6GDlokBLZJb/gbEL0O4BwIdWv/6PLTYW1rmf27H2wPHiYhdUsHW+aj I6G5yB7oWWpRrJ0tb00rs/7YmFr3R1NHgeybw9M3TQf94ohp5uRqypLfh3BHYUbeFRxU ificnIkuJo7s1RAsNFvIxDu36I29jIdpsVURL8mQU832ho39SOlcudUK5KnyW6IAJMMK P5WI80RJd8zMaFPWPn1w9IdvDbG5jmT9tr4a1TD0mDXrGi712Zih4+ekS+hs6/amOOFK X4W7i9nG3Av7VQHfZfZKNTsQl5wHCzWL+V+DPM8IuvlJReoIls/wdBKsjlPcfDVURfX7 aU5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193455; x=1720798255; 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=CurKVhgGzPO6kvK5KOd6kl4xIM/fKHjGD5Ox4ZiqWow=; b=UUFXreYZxZirS91Q3jjVoULn36RrKfIe/YwW+xKV3Ou2JnRNvGGL7/1VihiLJOLpD+ A90QoCYP6HOWrPmPp5DN5CV1rHsQUGYjA1bG+av9qHBWZS3RWqvVW7mq2rLQZuCLKpQb KETLug0Ja794zPGCsnO+xVx3D3Jf7CYPyA/dQyKLEi+2tWDj4m62WnTyccUq+7Xejp0D ydOtPXsMhVakFq8rDgQNMAFSLfaJ11fBvb1u9rjHEG6INx6TTM0GJ3ywu66OGi9bW58F jx6r6INlZE5qf7tfySBBX3OJdL3RastXnTCMimXbVK91c296Az1FQQrzCaacjYYYvAfK jFvg== X-Gm-Message-State: AOJu0YxdChggzgQYEbzAw+BvLrZFVswh0c0TkRoqbaZy7VlHjgMLqS7h 6Om/Negtly2sXD/mTHZc83S9dQL9SEFJuOKB7sdKwkEs0NiiVTz3kESIltSNfoI= X-Received: by 2002:a17:906:5acd:b0:a72:631d:6de1 with SMTP id a640c23a62f3a-a77ba4785b5mr338581866b.20.1720193454930; Fri, 05 Jul 2024 08:30:54 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a77c3925a96sm105257666b.120.2024.07.05.08.30.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:30:53 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 4E4895F92B; Fri, 5 Jul 2024 16:30:53 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , Paolo Bonzini , Peter Xu , David Hildenbrand , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Hajnoczi , Mads Ynddal Subject: [PULL 03/40] tracepoints: move physmem trace points Date: Fri, 5 Jul 2024 16:30:15 +0100 Message-Id: <20240705153052.1219696-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62d.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 They don't need to be in the global trace-events file and can have a local trace header. Also add address_space_map tracepoint for tracking mapping behaviour. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-4-alex.bennee@linaro.org> diff --git a/system/physmem.c b/system/physmem.c index 261196cde0..14aa025d41 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -53,7 +53,7 @@ #include "sysemu/hostmem.h" #include "sysemu/hw_accel.h" #include "sysemu/xen-mapcache.h" -#include "trace/trace-root.h" +#include "trace.h" #ifdef CONFIG_FALLOCATE_PUNCH_HOLE #include @@ -3193,6 +3193,8 @@ void *address_space_map(AddressSpace *as, MemoryRegion *mr; FlatView *fv; + trace_address_space_map(as, addr, len, is_write, *(uint32_t *) &attrs); + if (len == 0) { return NULL; } diff --git a/system/trace-events b/system/trace-events index 69c9044151..2ed1d59b1f 100644 --- a/system/trace-events +++ b/system/trace-events @@ -21,6 +21,12 @@ flatview_destroy(void *view, void *root) "%p (root %p)" flatview_destroy_rcu(void *view, void *root) "%p (root %p)" global_dirty_changed(unsigned int bitmask) "bitmask 0x%"PRIx32 +# physmem.c +address_space_map(void *as, uint64_t addr, uint64_t len, bool is_write, uint32_t attrs) "as:%p addr 0x%"PRIx64":%"PRIx64" write:%d attrs:0x%x" +find_ram_offset(uint64_t size, uint64_t offset) "size: 0x%" PRIx64 " @ 0x%" PRIx64 +find_ram_offset_loop(uint64_t size, uint64_t candidate, uint64_t offset, uint64_t next, uint64_t mingap) "trying size: 0x%" PRIx64 " @ 0x%" PRIx64 ", offset: 0x%" PRIx64" next: 0x%" PRIx64 " mingap: 0x%" PRIx64 +ram_block_discard_range(const char *rbname, void *hva, size_t length, bool need_madvise, bool need_fallocate, int ret) "%s@%p + 0x%zx: madvise: %d fallocate: %d ret: %d" + # cpus.c vm_stop_flush_all(int ret) "ret %d" diff --git a/trace-events b/trace-events index dd318ed1af..9cb96f64c4 100644 --- a/trace-events +++ b/trace-events @@ -37,11 +37,6 @@ dma_complete(void *dbs, int ret, void *cb) "dbs=%p ret=%d cb=%p" dma_blk_cb(void *dbs, int ret) "dbs=%p ret=%d" dma_map_wait(void *dbs) "dbs=%p" -# exec.c -find_ram_offset(uint64_t size, uint64_t offset) "size: 0x%" PRIx64 " @ 0x%" PRIx64 -find_ram_offset_loop(uint64_t size, uint64_t candidate, uint64_t offset, uint64_t next, uint64_t mingap) "trying size: 0x%" PRIx64 " @ 0x%" PRIx64 ", offset: 0x%" PRIx64" next: 0x%" PRIx64 " mingap: 0x%" PRIx64 -ram_block_discard_range(const char *rbname, void *hva, size_t length, bool need_madvise, bool need_fallocate, int ret) "%s@%p + 0x%zx: madvise: %d fallocate: %d ret: %d" - # job.c job_state_transition(void *job, int ret, const char *legal, const char *s0, const char *s1) "job %p (ret: %d) attempting %s transition (%s-->%s)" job_apply_verb(void *job, const char *state, const char *verb, const char *legal) "job %p in state %s; applying verb %s (%s)" From patchwork Fri Jul 5 15:30:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810401 Delivered-To: patch@linaro.org Received: by 2002:ab3:6bc5:0:b0:273:6c53:9181 with SMTP id v5csp524128ltk; Fri, 5 Jul 2024 08:32:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUCa/Zzq534Hpt9RsFJcPzrTbR5Xf/6x5SBpgi0bZ6qJNIive9196SYbcSIijByGjQJ/8XjByCr449aOC70xtUf X-Google-Smtp-Source: AGHT+IGcaW4terT66rSigr4HuqacewRXWplKGXsIHZkxRVpyIf/ZpIDuCM1xnB/tddj76rGA0ZhE X-Received: by 2002:a05:620a:1a1b:b0:79d:5503:a92a with SMTP id af79cd13be357-79eee1de540mr684706085a.10.1720193564993; Fri, 05 Jul 2024 08:32:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193564; cv=none; d=google.com; s=arc-20160816; b=hBf5CxmP1iJYb/twFC3529/14Ra50/0Ne65fE+exrzcDGoE/pYySJUAzLDWmr+el6K 2pLrRxAi/mohBRyD5a8YymdXuzjPYik0bawO1P28w9qRduVmeIWoLYa8y1IXFTvCVFdD uojYXMr9drAvA2NmPFCFGl/rpOI6m/Owfp2ac8AVsJWgQ3x8VOH4fNspUAW1cuP6u0iK HQgYaDwn8Ypny1oOkgvTsRarqVjxX51gEHWr7d6DkEDZ5P5zA+GOnlA0XWtM2Ph5qsfN XiinFo1zOZ4PIA1jftLKDxj29qprUwH52HA8GxtkpIhl/cB8rt5F7Kv4N6Yn5xjEiMib Jguw== 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=zgH3hJroWZO1UK9YywGYVtlcVLycJueDEDps19iwMSg=; fh=A91qHV/NgBlm13T0oHoIASa0bR14Idjn4U0sD6jkBqI=; b=ekS25vK94ARXiXAxdqsbvbvpuQgg19LbnrCxxTkaRL9XPgPmHDwdaRMY2NcrpdUv6E UW0OJWqXIPxCrK+Q0lhsXQp3CIcWA45Svn79q1v34guU09Sb6JEWiAZa/fXqRq8eAkQE 1zhXfHttArhuTY2C3yyh0h+hJG/F31iKUENPCY3tX1HaVUJTBXWU7yVTD8WHpBLreMtI 78t1+uT9GYIkSKqcOb9ZOrLOZPUK10PUckFmLIxRNp9j9kH33zxTOQMcn9gONxSUfSce +HPBugoDRdHeM4JTOK9xd0WMAKmG02Y36hQqmSKlAJZnbO5mer3Di+ZhtT4IywGPyWhu ZPQg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uzvV6aXM; 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 af79cd13be357-79d6931647asi1869819585a.490.2024.07.05.08.32.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:32:44 -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=uzvV6aXM; 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 1sPktz-0005gy-Ar; Fri, 05 Jul 2024 11:31:12 -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 1sPktu-0005cg-5O for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:06 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPktn-0000Ix-Sc for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:05 -0400 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a7541fad560so204966766b.0 for ; Fri, 05 Jul 2024 08:30:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193456; x=1720798256; 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=zgH3hJroWZO1UK9YywGYVtlcVLycJueDEDps19iwMSg=; b=uzvV6aXMD/fLrJ0PvMQVDjSNB7hHVbLbCNjMuW7Irb3NG/7lpyBM+5pK8p0FoWr8EF kL7nicCYj0KJgCq62iE0lTMvFJDXDJw7EgZUov1b3pxj4xp0sx92qLLtYQA/1UBkcXGm IiwDxytBFJo/ufYabuCsZr161reATHkos+tFHwW6PzjBhQcumCdw2MlWhSSduf5UieIr okTeVoZxZRHU3OQNgtK4/mBY7aOKk0vXdF2TmIixinx0Sf7yoqzlkAGwb8WOGT3BetB8 2jQSGP8M6iUQCjlKm/t2PHH0zyBrBfUpg5hPRg6zhHOnxPzad51k3kT5bjfWh9pEeRLC t/CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193456; x=1720798256; 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=zgH3hJroWZO1UK9YywGYVtlcVLycJueDEDps19iwMSg=; b=kU75zsX1qzALqN32rN7KcGuTW5qIgp0U9Tm+JBrSpn61hhOBKFl/nqcc8aoUM7kn1o uN7zTHtnEIh1x1ZXwYacA/6c2AhsY+b6Q5QorNxeSIepkzOIefv0aHSIEAPqUsQZZVuj qHWrEMrV676aIg6WQoRzR6mypA0CS2hZ41vljdYEZoyGOel3fFCGSxrC01XTx8wKB4X2 TjUVGN4eUChw77oLXNIu9P1GSnIo2Debb1LtGEq6mq4K8R0NnRWEucx3cFDGvO/ug7Uc x0AqqTKi8GMgxBBfs63JtcWFYWXGtLBge7FaDpUwFZYtw8hl4d/HXMcX3HJvDK+KiK3F 3geg== X-Gm-Message-State: AOJu0Ywh7qw8Bt0mJOAsrRsa4h8yXr2YBA8kFqFfC0H7HaaGUBS0dldx kdRCxefwys7sMDnck/zHOJ387+eCRDzFdU2S0c1EcNTA+t8EgBerW0+0lER9g1w= X-Received: by 2002:a17:906:747:b0:a77:c824:b4c4 with SMTP id a640c23a62f3a-a77c824b586mr190009666b.19.1720193455672; Fri, 05 Jul 2024 08:30:55 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a77da27c044sm33099166b.157.2024.07.05.08.30.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:30:54 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 637955F931; Fri, 5 Jul 2024 16:30:53 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Manos Pitsidianakis , Aleksandar Rikalo , Paul Burton Subject: [PULL 04/40] hw/core: ensure kernel_end never gets used undefined Date: Fri, 5 Jul 2024 16:30:16 +0100 Message-Id: <20240705153052.1219696-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62f.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, T_SPF_TEMPERROR=0.01 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 Really the problem here is the return values of fit_load_[kernel|fdt]() are a little all over the place. However we don't want to somehow get through not having set kernel_end and having it just be random unused data. The compiler complained on an --enable-gcov build: In file included from ../../hw/core/loader-fit.c:20: /home/alex/lsrc/qemu.git/include/qemu/osdep.h: In function ‘load_fit’: /home/alex/lsrc/qemu.git/include/qemu/osdep.h:486:45: error: ‘kernel_end’ may be used uninitialized [-Werror=maybe-uninitialized] 486 | #define ROUND_UP(n, d) ROUND_DOWN((n) + (d) - 1, (d)) | ^ ../../hw/core/loader-fit.c:270:12: note: ‘kernel_end’ was declared here 270 | hwaddr kernel_end; | ^~~~~~~~~~ Reviewed-by: Manos Pitsidianakis Signed-off-by: Alex Bennée Reviewed-by: Aleksandar Rikalo Message-Id: <20240705084047.857176-5-alex.bennee@linaro.org> diff --git a/hw/core/loader-fit.c b/hw/core/loader-fit.c index 9f20007dbb..7ccc9d5fbc 100644 --- a/hw/core/loader-fit.c +++ b/hw/core/loader-fit.c @@ -267,7 +267,7 @@ int load_fit(const struct fit_loader *ldr, const char *filename, void *opaque) const char *def_cfg_name; char path[FIT_LOADER_MAX_PATH]; int itb_size, configs, cfg_off, off; - hwaddr kernel_end; + hwaddr kernel_end = 0; int ret; itb = load_device_tree(filename, &itb_size); From patchwork Fri Jul 5 15:30:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810395 Delivered-To: patch@linaro.org Received: by 2002:ab3:6bc5:0:b0:273:6c53:9181 with SMTP id v5csp523625ltk; Fri, 5 Jul 2024 08:31:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVCe7HXhJvSbLAL/3Qafy/Uy3H6Wf26dRMCLFM+Upohmd91lYYOCMqn5tpZawqGRW4wJlBP79WWZCjw3yusP2Xb X-Google-Smtp-Source: AGHT+IFYX7ScjQ0ORD2F3eQDrhnkLCOxM2WQz1JKQ1+V/rZSxLLIM0OChPgorwMdHLYtkS/ies/Q X-Received: by 2002:a05:620a:361e:b0:79d:61da:ba3e with SMTP id af79cd13be357-79eee1cd3e6mr517168985a.21.1720193514465; Fri, 05 Jul 2024 08:31:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193514; cv=none; d=google.com; s=arc-20160816; b=yU1CLAmW45xGB6GpkdJgqTAUDe0eh9peVx5JCvMr/wv0xoH/uib1wWpdNvlLWvBnCZ 4K5DAceCbunG8v3i+f/IkDWdXtDDuKfjF20ed0N3K7i+9HkAnbMY2aihnGVLr514vrkl iTMDZxHtKP8GSzSyU+/i5c1YzpNqcynGlWl/nAoSXwTFZgCwbucyvDvwoOKa9HoTBIs0 TxsdWFeabaFWM2ljyplU41xwfCdyi0PyI4VxlrfFzrhZVvzouJsw4mKgbdbXo1TEkC+a +m86wpE+wWX2+K8gt8ipJ6XM/SYWlrPzJSa3zQAasRMsl+R/j40K6gOPTftAA74L/5bl B+nA== 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=yb3iq8Uefi2wrk4lmxR12EyJjPJCI4ULXKQi9nDSkSE=; fh=QVK3h56o43PrXvQbcYeSm4+VzCeC92txQhQBQURGmxg=; b=TOxNBRQXJlZfrwlXU2DRS20KMS25FVe1YKHQOdKTDOFBd13Qo+05iB7D7Oxj35QeAv JgrQtLMS0Rs1+6yw4kmuBkp4hVRb2Q8vPaqWXPEwL+SAnkeXlm+kGNAPDTtsz4+ANXKb Zrdm55Ila+9+QywnyIx8WDP3l93+qc1yzkxDyTcg82gQz2MJiRJ5YDE91eQmjsjHFNLI OBfwvqIX3rXCwIgk07qyfY+zUpKz236vxP8zHXetfK1kCwOYdqAIfePPhVKInNLVXur1 fU5iflX+ftbCJ37D2n8WH6obZP537iX+2lgPsMHW0c/FIO8BDLjrmVwpT+ux3Hgr4MMP o9Ew==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OQqyg1is; 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 af79cd13be357-79d772a6e99si1629403485a.378.2024.07.05.08.31.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:31:54 -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=OQqyg1is; 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 1sPktu-0005cq-Oa; Fri, 05 Jul 2024 11:31:06 -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 1sPkts-0005bq-73 for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:04 -0400 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPktp-0000Ju-Sv for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:03 -0400 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-52ea2ce7abaso1860650e87.0 for ; Fri, 05 Jul 2024 08:31:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193458; x=1720798258; 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=yb3iq8Uefi2wrk4lmxR12EyJjPJCI4ULXKQi9nDSkSE=; b=OQqyg1isdbClJoHoIs0oT5BZ+oNSIqP0HKXjRvYB3u5eHOQHxFlh9YltDwC9bHtLsd RjZfknKoP46HW1C53AWtM8fSHJrheCqL2BnJeuXAWEK3KYoUaXD5XVIOHf+KQdh24ir3 kYN+WBdwlbALdrVTL29I2KTwWotQl4ppKeKCmbCYhhFUjOjBH1SiqoEyYNgO5EX/Ca+B evCvOqkwSabnYqmdY93F+rOsmO+ibWTFS0SB+CoqM6V/OowrardRjwfRMl7pwcNj+WAo bQpnD8BV7VKCYmDEzdWroL0wu5E0Pp2r/qvk7SAGume+7H5zK8v6GMmCmnE3J7/+E9rj ilrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193458; x=1720798258; 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=yb3iq8Uefi2wrk4lmxR12EyJjPJCI4ULXKQi9nDSkSE=; b=HikECl/UDx2qa7yLrl4ld/t/PDWPddDF/zeHoSG0LguRh3R5/RAb/E8aJIWjF9vDly CcOhxZBiDFOdGWEuJnFnikVcXmR5XcmHkoVQw0dRr766WxWN+ZxWslrUCq7em1Fgg/wT SiqSjyVUYT3iYvFCGTFfsmKfS2O7OVTd6qDmFnpcpFECnGYJQ84KQ4RiK4S9F04pHHJF PnrNN879EfiP/W0at/pGqlb8Lkru8vNRyOP9mpqPH2xnHlvpf6OCitPmmMXmBoE/NknO FqmfVft/CbMNnr5sMQ9P/RLyJvUxtyHJEi/W2pu0iA7QdpW6pERk1+zqTrdZ86Eqiv0Y 2dFg== X-Gm-Message-State: AOJu0YzTG/CMaB2mq7BCUurDjQEYG7GYj4hK7WiE1gDGa3v6L4vzWqkZ yVHZpIUREyvXFQ3EZ3fg6DHbPSHyJMOCbTVYbNNuQppV/sl/3xbfVKtRUVUPXIg= X-Received: by 2002:ac2:4115:0:b0:52c:f3fa:86c with SMTP id 2adb3069b0e04-52ea0629bc7mr3994185e87.18.1720193457678; Fri, 05 Jul 2024 08:30:57 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-58e9e68e110sm1929049a12.91.2024.07.05.08.30.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:30:55 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 7AA925F935; Fri, 5 Jul 2024 16:30:53 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 05/40] tests/docker: Specify --userns keep-id for Podman Date: Fri, 5 Jul 2024 16:30:17 +0100 Message-Id: <20240705153052.1219696-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x135.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: Akihiko Odaki Previously we are always specifying -u $(UID) to match the UID in the container with one outside. This causes a problem with rootless Podman. Rootless Podman remaps user IDs in the container to ones controllable for the current user outside. The -u option instructs Podman to use a specified UID in the container but does not affect the UID remapping. Therefore, the UID in the container can be remapped to some other UID outside the container. This can make the access to bind-mounted volumes fail because the remapped UID mismatches with the owner of the directories. Replace -u $(UID) with --userns keep-id, which fixes the UID remapping. This change is limited to Podman because Docker does not support --userns keep-id. Signed-off-by: Akihiko Odaki Message-Id: <20240626-podman-v1-1-f8c8daf2bb0a@daynix.com> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-6-alex.bennee@linaro.org> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 8df50a0ca0..708e3a72fb 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -207,7 +207,12 @@ docker-run: docker-qemu-src $(call quiet-command, \ $(RUNC) run \ --rm \ - $(if $(NOUSER),,-u $(UID)) \ + $(if $(NOUSER),, \ + $(if $(filter docker,$(RUNC)), \ + -u $(UID), \ + --userns keep-id \ + ) \ + ) \ --security-opt seccomp=unconfined \ $(if $(DEBUG),-ti,) \ $(if $(NETWORK),$(if $(subst $(NETWORK),,1),--net=$(NETWORK)),--net=none) \ From patchwork Fri Jul 5 15:30:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810409 Delivered-To: patch@linaro.org Received: by 2002:ab3:6bc5:0:b0:273:6c53:9181 with SMTP id v5csp525211ltk; Fri, 5 Jul 2024 08:34:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWAlrPOSCCb5oaTgJGPu4rhQWz26QNpfVuRBrIwDP8P+whryPZ/aGWJpht+wHHhtGDdhzkAdCsu2mAYTbJlfd4H X-Google-Smtp-Source: AGHT+IFjb88uTvQOLH4Pc9pQHiH2RK1Zvz27u+r8BEnm1FzJUq29Axf8+GtVRKdo2DKmDPQGY32O X-Received: by 2002:a05:6870:82a3:b0:254:9182:180b with SMTP id 586e51a60fabf-25e2bb7af3dmr4111592fac.29.1720193694752; Fri, 05 Jul 2024 08:34:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193694; cv=none; d=google.com; s=arc-20160816; b=nb5Y3WxkL7nVTAHM0uywZIW1ZroEAUXPdZP9vJDK6TumA8CqdBnN5Xb9SgpkBdiWeI OqfhL0OiD1GVJHZmQCW9zcD54k5SU7vM2MrenfyuIbBvpaRwKhZ+IDhgd7CUb2m0xF8S ui39I7NKOH8md6yXQ4+7HGjOZouQPC9mRtRGp8PzrZgwhm5QilkEn+ch+S0cIMEUxRRM XNiI4xrCvYTC/ssimku7dqaNP3swGaMUdGGWaNhWTsnG/1NMSsGnQC3o3YuOwJdwXExT X5GEMB0Fibi6HNVGULTt9iUPBDyw7wMRQblyuZAIocyrqz6wp78z1QW4PYf+gAO9LBF8 TkAA== 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=Xv12aEHcacHy909xjN8SHkQelk6UZTRk75aOEyUvjoM=; fh=9XduUmIkBvYIbwkqrMo5Pxk5m1/cMYk6ZohD+0duq5Y=; b=uzoelywRhbh9LWhsWkW+0D6IYpHdyU6rt+N21W3AK68x9aUcnkzWcyu28spSc7j8dB HpnQU6UhaykyZBh1ZIl/AAmtWNDphnrv0P42A+gybaYEEzHpYrlJUbUsXDGXwzXPDCl1 U938Sgk68aFnJS5sSIIuLqdfpj7e9cruFOafCcyLgliygfthxWy7VQSXBAcFZDzTWth8 XAc9fgSoVn9DWY199CIJ1l1PDcDumkik8HIp/oljvJJiDAoH1r7+kMbAp1FBIgv2a4rV VDtq4f4AizCgzDzTcixK7icCLC2pHDJ8WcCvk6WtFp9CCpknjanszLd/Nnz98fF5LyzX 3kww==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w+dG1OpS; 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 6a1803df08f44-6b5de38de36si70889046d6.359.2024.07.05.08.34.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:34:54 -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=w+dG1OpS; 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 1sPktv-0005dH-KO; Fri, 05 Jul 2024 11:31:07 -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 1sPkts-0005bs-71 for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:04 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPktp-0000Nb-RJ for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:03 -0400 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-57cd26347d3so2426452a12.1 for ; Fri, 05 Jul 2024 08:30:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193459; x=1720798259; 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=Xv12aEHcacHy909xjN8SHkQelk6UZTRk75aOEyUvjoM=; b=w+dG1OpSGb+cNSmjPl20J3Nj95hNAbuTUE9QlFAmmHh2mgHm0Gwd5j/MTXEsGsKkYT /OdOFaOQfDufFYTXX7/DK1QM7OBVGcj8M/TazCTPJgyZS33+2a2gv3hWlzIlLQRtt79Z sXvUbdrLsPKKQCzofexVoHHyYakNThhcH7BVPG1HbDQn+/ItAe4DYy/5f1o5cM/eoBKB Q8qhuBqHJCYm2JArLKNdw5Hwdir1rzIUFY+l/Ft4HXEcZK/mJMJ0XiJugSBQRLGSkkOw cLEY0yjITDQOjCHPEkoTwxXPNR1BGHxCU6UDnBiFD5Wo6Jf2Z4veUtzgJtIl10tTGaNA nLSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193459; x=1720798259; 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=Xv12aEHcacHy909xjN8SHkQelk6UZTRk75aOEyUvjoM=; b=pFhz0yynPjjid1/LPrmb/C+7ucXWzT5Y/My1R4gh/KoqeQaLimtwYXca4Ue/Kcmldl /L2OzOtYooFZJmfPOPu1SbzvsmS7l7Fyz1gEADCyf/ftgpd+J0E48hikmLgynY0yJU8F gLR8Ik0vHJ/M6wzFVs9v2wLoPbUa41rq0vrHRdK1lI8sIWtH5lqN0z7y5frw7+hHs2j1 VVSkWquTTFaTgoPMR8MB3Cg5pKF/RN5POTA+eqeS/DVGOVsnsAEbS9QHm0RTMPJ5oIzX HvG1Nu90AdjGCjWImVHySC6+XQN5JzGNqzJNJGo3xPkBWHR4eCHVUP1f3PS4opVz3B1j XvSQ== X-Gm-Message-State: AOJu0Yy8TAG+t+BEyfT2Q2eNhnCQuet3Q1RCpx7PrrfKoZ/FLLfr9O/6 GedDt21uVrwZtYJWmj2nZtOkHutHdoT+V3dy4D0D/G6Q7/F6NcSdRSOclVCVKy1XGPye6+HHoko w X-Received: by 2002:a05:6402:1cc1:b0:58b:4621:e866 with SMTP id 4fb4d7f45d1cf-58e5cd12b99mr2738756a12.41.1720193458578; Fri, 05 Jul 2024 08:30:58 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-58ad8730dcfsm5495220a12.7.2024.07.05.08.30.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:30:57 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 909875F93A; Fri, 5 Jul 2024 16:30:53 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , Akihiko Odaki , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PULL 06/40] tests/tcg/minilib: Constify digits in print_num Date: Fri, 5 Jul 2024 16:30:18 +0100 Message-Id: <20240705153052.1219696-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x534.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: Richard Henderson This avoids a memcpy to the stack when compiled with clang. Since we don't enable optimization, nor provide memcpy, this results in an undefined symbol error at link time. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Akihiko Odaki Message-Id: <20240630190050.160642-2-richard.henderson@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-7-alex.bennee@linaro.org> diff --git a/tests/tcg/minilib/printf.c b/tests/tcg/minilib/printf.c index 10472b4f58..fb0189c2bb 100644 --- a/tests/tcg/minilib/printf.c +++ b/tests/tcg/minilib/printf.c @@ -27,7 +27,7 @@ static void print_str(char *s) static void print_num(unsigned long long value, int base) { - char digits[] = "0123456789abcdef"; + static const char digits[] = "0123456789abcdef"; char buf[32]; int i = sizeof(buf) - 2, j; From patchwork Fri Jul 5 15:30:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810403 Delivered-To: patch@linaro.org Received: by 2002:ab3:6bc5:0:b0:273:6c53:9181 with SMTP id v5csp524602ltk; Fri, 5 Jul 2024 08:33:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXffdcq45W2Uie2bdPhkchHmZO1HJg4XCOSHJecFM//24yrDPYd5HqAg89rAW1J/QCF8AXRVSpkshqZ7SyiTxPI X-Google-Smtp-Source: AGHT+IHSEZt4GithT4RJg62JPDOC38s77NpNAHbFd+dJWhI9Sf/xI6u5cWREruhQY4J3DHHMW+6n X-Received: by 2002:a05:620a:17a4:b0:79d:6381:67aa with SMTP id af79cd13be357-79eee247a5dmr531967785a.58.1720193613591; Fri, 05 Jul 2024 08:33:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193613; cv=none; d=google.com; s=arc-20160816; b=HD9b0s7bIwH65Rr+th919rMnujD6xx5aNG5P+MmRVZV27wnIk3Ue4G4T6MhfS85yCf kaOUr1o9B1XGcpqobJMMNY/EclGbk/GUHnZVkrQxaAeJ5iEVFdMtHIf/MgD9QnTiJrx1 iPsxohMQiWggDoeuPJ0yOufuhYLE6xuXkuQ1owLyHvBU0AIyplftJraNxU/3I/BbRQWh XZSsI5APWEYYSptaK36qwNGtcQwFjRjGDEoNSuUB0VpbWYW5X2BI1zASRsdt/Bi6WJi/ cM+8pv9ydVdPUZuia8PWeNxHnAI3IjzodFrt2hn7BTYr5RXmEvV/Km4kksMOwKjnxHsb 5i9A== 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=GTAwyE/pG5nM9OTzmL49b7cH+p8g0kVoInrpYccmZCc=; fh=e9rMVMHg0Y4oAmCBh5+XvioUrHJPIhxNsFtH0VtAqE0=; b=AS8ChASqsqjhrglDfCjb2Q/ZhBeQn2xNkwMvDfAudA8CILVPqgDQeiWcCDjxKWk891 y53rb/E2Me9xw4TwECKqCH7lrRLs2I+Cg9Qs6vMcFpK+15IrKfbYc5/nc9/sLFPs6KSq jjvJKxOhn1SVnSTurprjqJTfyP2gXAVcAs+1kif8zDLknavEpunOlU8NtGG4RtGjU3U4 pVgH7GKm/jjBLPmhfiXbw/NRQWTZjPjuZr3YxH9Ag4S4iSBBRc/txKj+081/WPdkUlZ/ twaUoTohXMbTUkE2qdPvTqHzkyTpz3H9i0kDEB/NHdkasbKRUKUn2FMNwsVHNE5JpaXA STCw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DIIagwuw; 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 af79cd13be357-79ee34fae33si572973685a.421.2024.07.05.08.33.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:33:33 -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=DIIagwuw; 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 1sPku2-0005iv-CW; Fri, 05 Jul 2024 11:31:14 -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 1sPktx-0005eY-0K for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:09 -0400 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPktt-0000QA-2I for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:08 -0400 Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-58bac81f40bso2512540a12.1 for ; Fri, 05 Jul 2024 08:31:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193463; x=1720798263; 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=GTAwyE/pG5nM9OTzmL49b7cH+p8g0kVoInrpYccmZCc=; b=DIIagwuwpRqGQUSR/EpaflWq+x1InpfElgZszgSM+eIs+ixc0ac+PVQKMDuCNQkTwm SYURl4/yFJYneVcupwv/8CEE1aMvuqnqEfQSWE0IHIokPqNA/tnO82XZtTz9qPR536Yd bZzutQZvuW8YDFf3E8VMX8xvh9SsZtBHKr/HENxAszHj2OP8HPBMvMl6JC5FWODVLTw4 8szC9jpDk9GaLPGeb2dp4JLjGjb+YYS1at211x5LnxDJKWF/NK/zmyraazIjtryyZyZo /QlP6rBq6GHLQwP6wh9e5cySJFNnBu7nI5Ixe6KbfyuutF90hwAzC5GX189+s2hYQYUA /yVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193463; x=1720798263; 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=GTAwyE/pG5nM9OTzmL49b7cH+p8g0kVoInrpYccmZCc=; b=MSkpHDDou/jwLV5LMEwXwOMUxx8bZCoD8DN2qDrO1Qqm0IVfCrPTKUvEotvyQaXDzA ZGgzA2zHCK8c5MorbfIMdYuSsBGozF/zwOwS6xHSw06/neRaLuolGx9DowNou9nxFKMP ftruEuNZ4fOKd98GJgBUX8lIJZdMnjCbuCr4tvkiuQNqFbSpvFb/pLYb2d4ctgRanQ5j SCs7zN0JRhnIpRBFxQ9oG008PqxktTQCsaA2FX7FqH88AFQ2QW4wLpbIr2I4BRt4rQ/h 9CKnYqJbWNF2t1PiaYIKrA7FFheS5VU+Ppp8JaqXOAHVxGcmwh1xzULOXOvhQiORlZZ1 24MQ== X-Gm-Message-State: AOJu0Yx0BqEHUcL7LPeOEw/UAAVB2Zjox9JBS5cpv1V/8tDTmjkxtIHm 9dOgn9XDrmMUBKz3TgQSBum/cML4HmK2+8ElCg/XOdaGAoZ2C6hIy4iigbv2cG8= X-Received: by 2002:a17:906:4794:b0:a72:87c4:8fbe with SMTP id a640c23a62f3a-a77ba46bba9mr393737166b.21.1720193463004; Fri, 05 Jul 2024 08:31:03 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a77cd9cb2f7sm56529166b.29.2024.07.05.08.30.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:30:57 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id A793F5F9EB; Fri, 5 Jul 2024 16:30:53 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Akihiko Odaki , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 07/40] tests/tcg: Adjust variable defintion from cc-option Date: Fri, 5 Jul 2024 16:30:19 +0100 Message-Id: <20240705153052.1219696-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::531; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x531.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: Richard Henderson Define the variable to the compiler flag used, not "y". This avoids replication of the compiler flag itself. Signed-off-by: Richard Henderson Reviewed-by: Akihiko Odaki Message-Id: <20240630190050.160642-3-richard.henderson@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-8-alex.bennee@linaro.org> diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target index f21be50d3b..cb8cfeb6da 100644 --- a/tests/tcg/Makefile.target +++ b/tests/tcg/Makefile.target @@ -49,7 +49,7 @@ quiet-command = $(call quiet-@,$2,$3)$1 cc-test = $(CC) -Werror $1 -c -o /dev/null -xc /dev/null >/dev/null 2>&1 cc-option = if $(call cc-test, $1); then \ - echo "$(TARGET_PREFIX)$1 detected" && echo "$(strip $2)=y" >&3; else \ + echo "$(TARGET_PREFIX)$1 detected" && echo "$(strip $2)=$(strip $1)" >&3; else \ echo "$(TARGET_PREFIX)$1 not detected"; fi # $1 = test name, $2 = cmd, $3 = desc diff --git a/tests/tcg/aarch64/Makefile.softmmu-target b/tests/tcg/aarch64/Makefile.softmmu-target index 4b03ef602e..39d3f961c5 100644 --- a/tests/tcg/aarch64/Makefile.softmmu-target +++ b/tests/tcg/aarch64/Makefile.softmmu-target @@ -81,7 +81,7 @@ run-memory-replay: memory-replay run-memory-record EXTRA_RUNS+=run-memory-replay ifneq ($(CROSS_CC_HAS_ARMV8_3),) -pauth-3: CFLAGS += -march=armv8.3-a +pauth-3: CFLAGS += $(CROSS_CC_HAS_ARMV8_3) else pauth-3: $(call skip-test, "BUILD of $@", "missing compiler support") diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target index 4ecbca6a41..11ccde5579 100644 --- a/tests/tcg/aarch64/Makefile.target +++ b/tests/tcg/aarch64/Makefile.target @@ -32,17 +32,17 @@ config-cc.mak: Makefile ifneq ($(CROSS_CC_HAS_ARMV8_2),) AARCH64_TESTS += dcpop -dcpop: CFLAGS += -march=armv8.2-a +dcpop: CFLAGS += $(CROSS_CC_HAS_ARMV8_2) endif ifneq ($(CROSS_CC_HAS_ARMV8_5),) AARCH64_TESTS += dcpodp -dcpodp: CFLAGS += -march=armv8.5-a +dcpodp: CFLAGS += $(CROSS_CC_HAS_ARMV8_5) endif # Pauth Tests ifneq ($(CROSS_CC_HAS_ARMV8_3),) AARCH64_TESTS += pauth-1 pauth-2 pauth-4 pauth-5 test-2375 -pauth-%: CFLAGS += -march=armv8.3-a +pauth-%: CFLAGS += $(CROSS_CC_HAS_ARMV8_3) test-2375: CFLAGS += -march=armv8.3-a run-pauth-1: QEMU_OPTS += -cpu max run-pauth-2: QEMU_OPTS += -cpu max @@ -55,7 +55,7 @@ endif # bti-1 tests the elf notes, so we require special compiler support. ifneq ($(CROSS_CC_HAS_ARMV8_BTI),) AARCH64_TESTS += bti-1 bti-3 -bti-1 bti-3: CFLAGS += -fno-stack-protector -mbranch-protection=standard +bti-1 bti-3: CFLAGS += -fno-stack-protector $(CROSS_CC_HAS_ARMV8_BTI) bti-1 bti-3: LDFLAGS += -nostdlib endif # bti-2 tests PROT_BTI, so no special compiler support required. @@ -64,12 +64,13 @@ AARCH64_TESTS += bti-2 # MTE Tests ifneq ($(CROSS_CC_HAS_ARMV8_MTE),) AARCH64_TESTS += mte-1 mte-2 mte-3 mte-4 mte-5 mte-6 mte-7 -mte-%: CFLAGS += -march=armv8.5-a+memtag +mte-%: CFLAGS += $(CROSS_CC_HAS_ARMV8_MTE) endif # SME Tests ifneq ($(CROSS_AS_HAS_ARMV9_SME),) AARCH64_TESTS += sme-outprod1 sme-smopa-1 sme-smopa-2 +sme-outprod1 sme-smopa-1 sme-smopa-2: CFLAGS += $(CROSS_AS_HAS_ARMV9_SME) endif # System Registers Tests @@ -99,7 +100,7 @@ TESTS += sha512-vector ifneq ($(CROSS_CC_HAS_SVE),) # SVE ioctl test AARCH64_TESTS += sve-ioctls -sve-ioctls: CFLAGS+=-march=armv8.1-a+sve +sve-ioctls: CFLAGS += $(CROSS_CC_HAS_SVE) sha512-sve: CFLAGS=-O3 -march=armv8.1-a+sve sha512-sve: sha512.c @@ -134,7 +135,7 @@ endif ifneq ($(CROSS_CC_HAS_SVE2),) AARCH64_TESTS += test-826 -test-826: CFLAGS+=-march=armv8.1-a+sve2 +test-826: CFLAGS += $(CROSS_CC_HAS_SVE2) endif TESTS += $(AARCH64_TESTS) From patchwork Fri Jul 5 15:30:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810402 Delivered-To: patch@linaro.org Received: by 2002:ab3:6bc5:0:b0:273:6c53:9181 with SMTP id v5csp524134ltk; Fri, 5 Jul 2024 08:32:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU6ZbpXNvCMFKWB0JFPWP3yc88T1yVd+G15bOdg57PKgwbL7VgV2AqAiynnBaqbSN33dHPcS/oFS27phdp/UzpE X-Google-Smtp-Source: AGHT+IFksFnSXZyznJq4NVNLD2JajdkO3FbRAEZJZ4G63X8xigHx0merocK42PVougAs8bOliXUh X-Received: by 2002:a05:620a:841f:b0:79d:65ac:dbb8 with SMTP id af79cd13be357-79eee25b311mr528092385a.52.1720193565599; Fri, 05 Jul 2024 08:32:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193565; cv=none; d=google.com; s=arc-20160816; b=pDlp2ZJtN1lALEEOWOTDpSLnN24XdxnyVTj9aTnopuuD2uwLQ6kn/9khbouTBVM0ap 6zaQsTGeA9gND2Kghx4fCV7DFaNqPug80iAihP8E5eNsvTLBviuvtUIWKl6tsmqUlocb oTOyQwDo9EdgLZJjftNAa7Bsxy/29VbuNG9RR6dWam6K6GrkoR1hXAEjRF6qmWojwklZ OQYE9GyOqxddhacuNzkILUgbu7iZMfRACUEGjjeCTIha9IReRv6CXRt0AcQsYTRzVCRG PSLrTUI38C0SAti4gL52yY4TRkQki0G881Px4zuNDZhATBPq19VxudpN6gh8N4T3Cv3h H2QQ== 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=URiLbq4/9zVnXxv5mThe5iKKCIjw63PUulDUIw3Un1M=; fh=DRz3T8hy46IOIOI0+1PyoMvsH/I8h2Md0cQSsMbTLVY=; b=vuOVYtpv86QJsgD/HUT+QsF5b7uAoL+45Fw7QHhqOeBo97qvwZkeLTQyA8aGoH6GL8 bDsrEFT//FNEkwvzppzdMZVz+KxSiP317kNP4mbxsnSwVeqODhlLIzvN4/s/OftqIn2E oQk/qezCaAcC33qU/Te+ovT2fnZUR1KGX6UWeVDNJ/HukVEMmSgE4tSp7eIVhTzvigUi ZBTetbWVWTxWqSNfiRjTprF0HpzDNcMjuCddiTBjnmNdWKN0DHsyh1aSmeH3FvXHEwJv xDcC9Hkkgn6VFwNkJnDjSCKpirZopkoPnLtUw3ZBv+auL1KIXN7YHha+5eDG1MOXXS0V R8dw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yZFprYl5; 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 af79cd13be357-79d69262d03si1663656085a.80.2024.07.05.08.32.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:32:45 -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=yZFprYl5; 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 1sPku4-0005kl-Hp; Fri, 05 Jul 2024 11:31:16 -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 1sPku1-0005iK-IO for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:13 -0400 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPktu-0000Qb-9p for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:13 -0400 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a724a8097deso220441866b.1 for ; Fri, 05 Jul 2024 08:31:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193464; x=1720798264; 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=URiLbq4/9zVnXxv5mThe5iKKCIjw63PUulDUIw3Un1M=; b=yZFprYl5PuY7VKLq5AUieni/2MB2Uu93HQhE7S0QNArD/LBHD59O52KVG0RpA3z9c+ 9+8ZnqHlPNFP8l2PnVwo8K7v3JSYb+V6iKZvAPXSl3gm4wsBIA9IJfzb1NspY3xbFyza anlDv4boUeUhu9HEOqMRaduPxdqE2kR9tAPeG0nm3orZ7aK2pxAXA1/3MWUk9nSZtheV cfQiPzDs1vpfeER02d/AFgnp58R+pEVOR/hmCWCjn5Dn8ICuVUNtczFtm1ttthMs17i7 IjqVja/8gtbk3PWYR4K+I4e21dxWWtF5VcPz7HMSRwKqwBdevfVx4vsqTTooVf9TaVxs nLxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193464; x=1720798264; 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=URiLbq4/9zVnXxv5mThe5iKKCIjw63PUulDUIw3Un1M=; b=jHQt2ph5IX6BIzi7OXqj9GsgOQipC5yAVJOSUYpqOO0dr76ban4BAv4Wi7GW9jjYWG yq1TAoYyN18GosomgfaGCcs6ZOLuzrANWYmn4u831Mp2bEZRKTjOpLry1KIzoTP8euqp 578z7Y0fpxhItKGw1gEzwJuD9kCHID+QHEjRcK2iYcT/BU/OAP8UvLvHt7l5SrJdRzfN cHt6ekbvF+Ynl29G4LPtJR3j1EOXo+uRpgk1i32Kq5h/WxCh6u/3vPwqIXtpjYCv3cWg SyTkelU7Eo1r7NNzhnFPPFVlfnqzwTSOVqpnzrhAN02ASXfpQMKrPHPA03BgeSIxdTK1 1gZQ== X-Gm-Message-State: AOJu0YyKbdU5Q1g+jIDGVszCZz2cx9JxLiuckMMbHyqGTHc+cBT42yDF qUewg7zmz3ZWJHB/vZfNcPExvIXNfpkPJ0hd27iBZv3E8YgcAXTIkjcLy9ecdf8= X-Received: by 2002:a17:906:34d3:b0:a75:3f38:e0a4 with SMTP id a640c23a62f3a-a77ba7082c8mr373285266b.47.1720193464292; Fri, 05 Jul 2024 08:31:04 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a77c8e18f32sm78421466b.95.2024.07.05.08.30.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:30:57 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id BD5F35F9ED; Fri, 5 Jul 2024 16:30:53 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Akihiko Odaki , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 08/40] tests/tcg/aarch64: Drop -fno-tree-loop-distribute-patterns Date: Fri, 5 Jul 2024 16:30:20 +0100 Message-Id: <20240705153052.1219696-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62c.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=unavailable 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: Richard Henderson This option is not supported by clang, and is not required in order to get sve code generation with gcc 12. Signed-off-by: Richard Henderson Reviewed-by: Akihiko Odaki Message-Id: <20240630190050.160642-4-richard.henderson@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-9-alex.bennee@linaro.org> diff --git a/tests/tcg/aarch64/Makefile.softmmu-target b/tests/tcg/aarch64/Makefile.softmmu-target index 39d3f961c5..dd6d595830 100644 --- a/tests/tcg/aarch64/Makefile.softmmu-target +++ b/tests/tcg/aarch64/Makefile.softmmu-target @@ -39,7 +39,7 @@ memory: CFLAGS+=-DCHECK_UNALIGNED=1 memory-sve: memory.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS) $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) -memory-sve: CFLAGS+=-DCHECK_UNALIGNED=1 -march=armv8.1-a+sve -O3 -fno-tree-loop-distribute-patterns +memory-sve: CFLAGS+=-DCHECK_UNALIGNED=1 -march=armv8.1-a+sve -O3 TESTS+=memory-sve From patchwork Fri Jul 5 15:30:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810407 Delivered-To: patch@linaro.org Received: by 2002:ab3:6bc5:0:b0:273:6c53:9181 with SMTP id v5csp524695ltk; Fri, 5 Jul 2024 08:33:48 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWkGKpUE14PyRRuRXDvoWWQVDiJy/CvuAYpXkQWFz29GVludX3OnwGUDOpYOEHx0uwYVXts6FFsJjULKK7io6+X X-Google-Smtp-Source: AGHT+IH0v5W9EsxfOFeiIKLuw5sC8UKiGe88TQYABnf1IT5hYCHPVkxCmhJuMK5wkaXxcNp2AoDA X-Received: by 2002:a05:6214:1942:b0:6b5:4a87:4034 with SMTP id 6a1803df08f44-6b5ed099e8amr69233226d6.49.1720193628234; Fri, 05 Jul 2024 08:33:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193628; cv=none; d=google.com; s=arc-20160816; b=BAkykfSOaXuqVpA/XxG3DWZY3M9Vty9Moscm+xKAENCAdhUyVAOdvQ9MufSIdzD5uu wNHrOY8R7suL4KikavVJ2dgiShh6JtRtj3rzfXVkbIoABEFddOOocgq3whReF/Uy32R2 1hNShzxqUtHTWZBh+dGWkuHKgJJHEYkOSe6oDSE391AZh8qHGf/xhCXnAhD8esZ4XNLn jQGpaiI1Dks9+r2AGe3HjdoQyfdvcEVtBAOZ5tKYbBHkWIJ/fozKwjNgzmJ9gkX1nVhc 7pSEeGMyPmaKDRNFhoM/JZezgY4igi4zbPTUV5HUeKIRHL4mW/JwBk/3yIKfm+QSD5Et F51Q== 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=it+TebEWAUdyZUulzklPipDIOEzwrfquC83Yceo5Vww=; fh=/C6WfS06kDGdq4SnrdHuFaxZdzWbTeTB1VJdaBqIbbc=; b=npfp6O5J8wJHD+Ol+dPFYpzdNk9/9aoYCxl5HJyvxKB3EuygeIXTUW1IOwqRLNYJqa fO59ZnXqeYdv4YmOWtRR5IftsKLxQ3mWF8DtTADeXbyDk2MXVLgmGT44Eujwr7h3LOQ0 mGHiGd6PGWI1TihNJBucjz3TQ/YfdUfT8hHMvEkI7GdR9wX/2EMwN5Cc64trFRBbdCCb /6Jr5foK6Za2/mXtcLi3MgZjQF2/98JijtSU7nlz3uBxf+YnCpRnodGJ+aNxH4wUIhak +KGezY9lF3coDQ5QAjWa7o4f4SFSvhpEbBbp3nM3Ap/1g09gof9RM6BJYkrw9MYRnLNm eTkA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UvMC0qDb; 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 6a1803df08f44-6b5e87b3d51si45492336d6.405.2024.07.05.08.33.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:33:48 -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=UvMC0qDb; 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 1sPku2-0005j1-P8; Fri, 05 Jul 2024 11:31:14 -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 1sPku0-0005ht-RM for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:12 -0400 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPktt-0000Qg-WF for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:12 -0400 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-57cf8880f95so2433805a12.3 for ; Fri, 05 Jul 2024 08:31:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193464; x=1720798264; 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=it+TebEWAUdyZUulzklPipDIOEzwrfquC83Yceo5Vww=; b=UvMC0qDbELTp+dHAjvkZk0o/GXMViFml59c2pjH5nd2uZYyzgxkEX67qLMMvb8LhTQ oBYAgFaKQ9cbeH8hnNOgpUVXd8RUsT4whPKpkWbv0qR2+Jb5KPI7HML1JaQjSpZ6U3g8 FRmDg3VivaPo+ON2yW0U+mL4f4f2oYvETSe29kzXtZ6A+UZtqdtsi5QEda+WNy/xVPQg Ov5b1MwtQ0hA4z/bTr3mJruzCnZKD2fm+luG8PkB9bWIS/MeiAtlAGGwD/Y5zzHxIuQn MQUB9cc76z4IkwfuFnVbCyeaVOgW8mVZJyKZIh/Dvi9E4J4iw1O2HhoRU/xrIfDiZy5V 66vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193464; x=1720798264; 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=it+TebEWAUdyZUulzklPipDIOEzwrfquC83Yceo5Vww=; b=kZ8w9ptyE2WEbuhS9RRoEbaB3ml1Vn9XHdf7wdrukSCm/KlqIJ2KV8srO7Kn9Y81BI kz98hk2sWpRhYeeLxwMf1TpEZWEiqha4DrW93xhtayqH0mb5uVioaabDLxdL2hHKPyLt X4IwDnMGJqFApMzxuZesuPj/O8FdhES5pIfDQ/E1HIXahaVFCZMS3JD/DMitOqiBeHRq 3Ro9Au9tzFUiw+OPOXwMunUqcoRyhVQjx6gDPXMGLF9WedLAIdUJicf1SIaZRvkNGfml VOkKPQoE1W3G//+kOe9Yk7+MnQ7zq6nYHOWQ3AJ+Vrjjqa2T6BtJk9RjrM/mleJAM9fL XNKg== X-Gm-Message-State: AOJu0YwJKKZ7mm6ubVdwqqi4xIvRUzGQkLvcREwI+ixcOhjtdhbumIJT sNMU1xwMHPei9VLRhwVYbfZEsnRVJ64vsbB2riIbS/CBjgMoAz0pqIt/gKztUHBsBq1ChK39HD3 d X-Received: by 2002:a17:906:1355:b0:a77:ddce:e9b8 with SMTP id a640c23a62f3a-a77ddceec07mr38506966b.75.1720193464024; Fri, 05 Jul 2024 08:31:04 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a77b226b1bcsm172178166b.88.2024.07.05.08.30.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:30:57 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id D3C5E620ED; Fri, 5 Jul 2024 16:30:53 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 09/40] tests/tcg/aarch64: Explicitly specify register width Date: Fri, 5 Jul 2024 16:30:21 +0100 Message-Id: <20240705153052.1219696-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x533.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: Akihiko Odaki clang version 18.1.6 assumes a register is 64-bit by default and complains if a 32-bit value is given. Explicitly specify register width when passing a 32-bit value. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20240627-tcg-v2-3-1690a813348e@daynix.com> Reviewed-by: Akihiko Odaki Message-Id: <20240630190050.160642-5-richard.henderson@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-10-alex.bennee@linaro.org> diff --git a/tests/tcg/aarch64/bti-1.c b/tests/tcg/aarch64/bti-1.c index 99a879af23..1fada8108d 100644 --- a/tests/tcg/aarch64/bti-1.c +++ b/tests/tcg/aarch64/bti-1.c @@ -17,15 +17,15 @@ static void skip2_sigill(int sig, siginfo_t *info, ucontext_t *uc) #define BTI_JC "hint #38" #define BTYPE_1(DEST) \ - asm("mov %0,#1; adr x16, 1f; br x16; 1: " DEST "; mov %0,#0" \ + asm("mov %w0,#1; adr x16, 1f; br x16; 1: " DEST "; mov %w0,#0" \ : "=r"(skipped) : : "x16") #define BTYPE_2(DEST) \ - asm("mov %0,#1; adr x16, 1f; blr x16; 1: " DEST "; mov %0,#0" \ + asm("mov %w0,#1; adr x16, 1f; blr x16; 1: " DEST "; mov %w0,#0" \ : "=r"(skipped) : : "x16", "x30") #define BTYPE_3(DEST) \ - asm("mov %0,#1; adr x15, 1f; br x15; 1: " DEST "; mov %0,#0" \ + asm("mov %w0,#1; adr x15, 1f; br x15; 1: " DEST "; mov %w0,#0" \ : "=r"(skipped) : : "x15") #define TEST(WHICH, DEST, EXPECT) \ diff --git a/tests/tcg/aarch64/bti-3.c b/tests/tcg/aarch64/bti-3.c index 8c534c09d7..6a3bd037bc 100644 --- a/tests/tcg/aarch64/bti-3.c +++ b/tests/tcg/aarch64/bti-3.c @@ -11,15 +11,15 @@ static void skip2_sigill(int sig, siginfo_t *info, ucontext_t *uc) } #define BTYPE_1() \ - asm("mov %0,#1; adr x16, 1f; br x16; 1: hint #25; mov %0,#0" \ + asm("mov %w0,#1; adr x16, 1f; br x16; 1: hint #25; mov %w0,#0" \ : "=r"(skipped) : : "x16", "x30") #define BTYPE_2() \ - asm("mov %0,#1; adr x16, 1f; blr x16; 1: hint #25; mov %0,#0" \ + asm("mov %w0,#1; adr x16, 1f; blr x16; 1: hint #25; mov %w0,#0" \ : "=r"(skipped) : : "x16", "x30") #define BTYPE_3() \ - asm("mov %0,#1; adr x15, 1f; br x15; 1: hint #25; mov %0,#0" \ + asm("mov %w0,#1; adr x15, 1f; br x15; 1: hint #25; mov %w0,#0" \ : "=r"(skipped) : : "x15", "x30") #define TEST(WHICH, EXPECT) \ From patchwork Fri Jul 5 15:30:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810410 Delivered-To: patch@linaro.org Received: by 2002:ab3:6bc5:0:b0:273:6c53:9181 with SMTP id v5csp525241ltk; Fri, 5 Jul 2024 08:34:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWW8uP71hYOhEwHfkU8nRoH6TzeazUPzKT3ZS3iVbplgtEpEqrLnCX4ogU7UkTFnR0dA3dVhWbyPi0wgntVJe39 X-Google-Smtp-Source: AGHT+IEpkdqbLdQTriZa2rUNfErYkwarewsCjfek1TSbyxVbtFw0Unlit0a+dy1fhfL2APXZnaPq X-Received: by 2002:a05:6214:5b11:b0:6b5:3bc:388f with SMTP id 6a1803df08f44-6b5ecffc343mr54424876d6.32.1720193697506; Fri, 05 Jul 2024 08:34:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193697; cv=none; d=google.com; s=arc-20160816; b=tR7BLLOanUWo3TVjcMRzZhPZ4/fBJpQPtccqzbJ6MJNXcDwoJGDXwpiO5gzMgVK3p7 pPPdjbohJUi7I588BxzURD9z6/yzLTBSZ1oFXWPTDjsnuupr8Grq7XfukbqV+vCmjptH lSh2xrWWF70vHnr9beHMd3Hyg/GPNQVhjh8lbhcNCKOUX8G0CvBSmv/+uR7+Hw9RcycZ CuIYr+JNUKInQnVCLFKoMoIEr0eErv3XGz+NiH+oSpnsXYSBdr0kTVrvBK712D1XuR2M 9dobn0Q20JB9E+vIVvMID5vUTuy8jzhhQc0q3jdnPVKWkm/FUqpX+rTFS5ME22TP1uAK guBQ== 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=qi8EZxXfCvRnQubk3+hKID52gSjI2xNtzTbxu1dIU6s=; fh=5IJrFVo051urdyoTcOnShmVjHgAbwmndOldXS90BNSE=; b=S3pVmKU6+bV3Z+H9LkmDdI7YUuo+ioZ24HJ8rerI3kJGvpAPn57vncKY6Iryz8/9+Q wB55RQY0Z4fMpJtlWU69rdUkwX5nRq4Uhuv/cEvIqvRPBGo72j+Sb0a/GrmH5NbQc/9r bkXWNme7IPIWXuV3ChmGO78VFUbL1lzxbOqujFvYZb9kAT6aTlHlkzhgEe8TreZXXLK+ /3kj/hloAmRoJ0tMtZSJbGsbdMUIqHWrL+wO5EU/G+6cYfba7r9aqBG4RuDRynJrE2LB yabhn+hAFz29QUQKZy/36cIl86+SIczXwWxMqtsuulMqtT4egXgCqKE/InjsV4iPZYnp Bh9w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SsgN2AME; 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 6a1803df08f44-6b59e5ea854si177681656d6.318.2024.07.05.08.34.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:34:57 -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=SsgN2AME; 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 1sPku3-0005j6-88; Fri, 05 Jul 2024 11:31:15 -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 1sPkty-0005gN-Uc for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:11 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPktt-0000QG-89 for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:10 -0400 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-58b447c513aso2092152a12.2 for ; Fri, 05 Jul 2024 08:31:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193464; x=1720798264; 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=qi8EZxXfCvRnQubk3+hKID52gSjI2xNtzTbxu1dIU6s=; b=SsgN2AMEOtLniac5HMZXImt2fjBdShOzc8XyfWAaIMBGq5G74o+5Axg/ZeUnfiz4K9 74nrRTNvS4mwciG8cPHie4S2jhFgqHHc0/2cprfFwCMWoEyTKO2FMf/NpNUmG4t39wsX V1ImyBSOyu/5NaQ2YcZP8x/E9Kh7S1MBcIp5nr2U2q4tDsFCr7Y190Z5f/gaZy4Px2sj ct+yxggUpVumpjhmZRl81JbJlfG5N14RYguGpdqQlnRXmwT+sFdQCE50RUyC6Ew/NXu5 gQ8H80Xag7BF5osgq/QMUCElAIQf4nhw1KG/nW7Xrnuox5kTSxtQ1mvsyfgnjLWfXu+W v6Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193464; x=1720798264; 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=qi8EZxXfCvRnQubk3+hKID52gSjI2xNtzTbxu1dIU6s=; b=SuWdTr5wMYX/azhycE4ASFxYIpaQQICCuKnuYqpAPugPHe9WDeW9rjW6rFWhM++tOS 5AFdTd/qmDk9uWgyXHsnJlbzCkxFRcvP+E0Bcvj699Bo655Pub39dkeyPA0iK6KfkkkS DevT54G0157izQRyrDkCY1zv0pNqWCrFq2GZcyK7hBzX2IlNaDeHHCMsfNMS5Bxp7k/Y toe2k5C78F43K6teKIDibXUFzEIA276vQNwCaqFj6JEPrEhnzU2laKD6tkOUzkJ/NLQe Eiye1z10awdCuxvKUA30f9Rae1KAhoh8hbrJzXFZjHcu76k+/N/G/H0R6V80ApK1hq/b 4Kew== X-Gm-Message-State: AOJu0Ywc4NQ1kBuRNkfPAQODywt2mMeiHHnOV5oTVfQ6sJ8YRaLRt4d4 sdgJUML+pcV+qGcRimfeYgaCznVndGVP/wK7cL9GX1Pt8mVplbrx0OriGuHtoqS94WjckedMnUZ U X-Received: by 2002:aa7:d693:0:b0:58b:9077:2bd4 with SMTP id 4fb4d7f45d1cf-58e5cd151dfmr2659043a12.41.1720193463385; Fri, 05 Jul 2024 08:31:03 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5861324dca6sm9809697a12.31.2024.07.05.08.30.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:30:57 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id EC3E0620F2; Fri, 5 Jul 2024 16:30:53 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 10/40] tests/tcg/aarch64: Fix irg operand type Date: Fri, 5 Jul 2024 16:30:22 +0100 Message-Id: <20240705153052.1219696-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52b.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=unavailable 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: Akihiko Odaki irg expects 64-bit integers. Passing a 32-bit integer results in compilation failure with clang version 18.1.6. Signed-off-by: Akihiko Odaki Message-Id: <20240627-tcg-v2-4-1690a813348e@daynix.com> Reviewed-by: Akihiko Odaki Message-Id: <20240630190050.160642-6-richard.henderson@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-11-alex.bennee@linaro.org> diff --git a/tests/tcg/aarch64/mte-1.c b/tests/tcg/aarch64/mte-1.c index 88dcd617ad..146cad4a04 100644 --- a/tests/tcg/aarch64/mte-1.c +++ b/tests/tcg/aarch64/mte-1.c @@ -15,7 +15,7 @@ int main(int ac, char **av) enable_mte(PR_MTE_TCF_NONE); p0 = alloc_mte_mem(sizeof(*p0)); - asm("irg %0,%1,%2" : "=r"(p1) : "r"(p0), "r"(1)); + asm("irg %0,%1,%2" : "=r"(p1) : "r"(p0), "r"(1l)); assert(p1 != p0); asm("subp %0,%1,%2" : "=r"(c) : "r"(p0), "r"(p1)); assert(c == 0); From patchwork Fri Jul 5 15:30:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810412 Delivered-To: patch@linaro.org Received: by 2002:ab3:6bc5:0:b0:273:6c53:9181 with SMTP id v5csp525254ltk; Fri, 5 Jul 2024 08:35:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWZmFmSfJZwaSEvODPtpxiCOifyF/cS2menF67j/fx90E4/g/0fspflqfUzay5sJgWfZt7mfPGbXl6JhugtZfj4 X-Google-Smtp-Source: AGHT+IErApMaBTbAjQFfXC9b1tjwPySWhuRD98a3XFJlsq589YI57pS9RYXEk2be7JrHPXwwzxfA X-Received: by 2002:a05:620a:2903:b0:79d:8042:cd01 with SMTP id af79cd13be357-79eee1b057fmr686672285a.7.1720193699861; Fri, 05 Jul 2024 08:34:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193699; cv=none; d=google.com; s=arc-20160816; b=ZwIWopg7ocg/QxeSxZgQfavaZ3+98/A8xBxMdR4VWxxpo4r8xPnvFkOShCMXel5bcg 1nLRaej8QPHbnID4Dw40R1TVjtdUHSyoYNg3k+C92k2nW5pQxB6TFyDBNsbUzL6P/YnA RpodWMFPfxElbPD5L/VS+W0MgXH1zCW8WppowPLNUzaF1qUnzPUw4lO3FLlIj+wVsoLE 4wJDR0HuA/2vOQu8y9rCC/eeSanKEu0EePO8qN4Ka0CwACLAWu03pzHbyW6LigbJLXIg ektrH4KLiBXnvD5wtGg1QRZ6/2eT0u3udE053sqs+cj9ZeOmnm+y8SUnPsG5/T8uNebO kW4Q== 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=7dL44LVhy8HUCuCBi0juUZMiha6qD0o8n5oVMcUj9i8=; fh=5IJrFVo051urdyoTcOnShmVjHgAbwmndOldXS90BNSE=; b=VyFOVu0cZWAue1zeEnovd/wP3Zb8jn+FuDQ+Ey9bcpzNvsP/n2g9broaTCA9VMo8Ee cDDYM9JdcXyHHzKg4HAYgm02ac5faqz3jIwJI/yVgkCRLkQhzRXsGYCFwFXoE3wqMaPB PYgJIMii80SJe7EjQ6u1eupMn8VTaDRoi7qcJBVD5y3UxsER1zfhaZm+DbpBlqO4GZQF MpSoUhbjRyjjM0ZebaOoCG4Dwu7k+bRpY/sX/F3vQ7gdSgK39bTFlRy7ANHjfolFpFyh Lt0jcXXd/pYgZ59KXaIz6coAil0JcUbzNMTmT/7Dmwg6XhyYa/zArxNZL5kle75RnrNg 1aEA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rOu1jg4h; 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 af79cd13be357-79d692f253csi1852535385a.275.2024.07.05.08.34.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:34:59 -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=rOu1jg4h; 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 1sPku7-0005nX-LY; Fri, 05 Jul 2024 11:31:19 -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 1sPku5-0005lL-Cf for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:17 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPktt-0000QL-NB for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:17 -0400 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a77bf336171so258696966b.1 for ; Fri, 05 Jul 2024 08:31:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193464; x=1720798264; 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=7dL44LVhy8HUCuCBi0juUZMiha6qD0o8n5oVMcUj9i8=; b=rOu1jg4h4D7/QSccAJLykUdGoMYVJPY+OLfDkpAzju70lC8rSGZnNJtq3BIkNTV2cn EsHEYFBHaCoiKvKkeXr+CodvT4L0MC/HYdUy90g00HvIfzgpIqS5sP+KiKdaxLkGezpz 3Xgmw3BjobTaCPSpPEvylQQcrV1XSO+T/0z590QcXRllQsgJGeEgNBS7y/hWDZVZla48 Ca3fEWPO4T0d1abC/YHOkN66WkLbc/Nxb5+HYHgApN0AvLfzu2bsxhmH/TFIVLAeH0uW C9PG8TmBV8Ys+bFNDizfT3Bsi4ES9zfrzRHzNkW2vJb9PMa+g3v5Mbaw5r269bKbAfrO 9B9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193464; x=1720798264; 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=7dL44LVhy8HUCuCBi0juUZMiha6qD0o8n5oVMcUj9i8=; b=YhoFi41Z0Qest3tfZiNqLk1xOlbwMy+Su5ekGFkJiDMMWBuACrZO3dAHJdw0Fs53dY NMczSDWP+1IOLeEYq3kIfUATBYGLK8iiYlAgaIRv2Z4luKgqBLB59+zLJojJCQO2v2TC IpX2qjVpxi9fIuUdbWeKvCW/SsVeIAspSG0bevh7nSM6j9/8GYh5mbCombeBF0efDIH0 wrPk3yiGjJDgwa+lFAWnCMbSzL1dYbKQHZ7+AobJWXK0rj8U7pG+cQQTBfMcr8Wi/dtD v8qEVn5spkaclEh4+xKIZswUuNj+X9rqKiViYU4FkOK9zV+koA4YBjor6Ymad84n6OTt K1Jw== X-Gm-Message-State: AOJu0YzOA6EEmG7tdDwns7nKIgFjCRC4w1DJ0CqN3ay2NkInMi5Fsf2i WdOBiF2Yl7XEWmlZMNO/qXv0OHVM6HmwIqWovczc+IGJd223qSbEYGev/BAunxQ= X-Received: by 2002:a17:906:1919:b0:a72:4207:479b with SMTP id a640c23a62f3a-a77bd99ec6cmr368981466b.5.1720193463682; Fri, 05 Jul 2024 08:31:03 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a77c4cdee52sm101519766b.128.2024.07.05.08.30.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:30:57 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 0D0D2620FA; Fri, 5 Jul 2024 16:30:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 11/40] tests/tcg/aarch64: Do not use x constraint Date: Fri, 5 Jul 2024 16:30:23 +0100 Message-Id: <20240705153052.1219696-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62f.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, T_SPF_TEMPERROR=0.01 autolearn=unavailable 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: Akihiko Odaki clang version 18.1.6 does not support x constraint for AArch64. Use w instead. Signed-off-by: Akihiko Odaki Message-Id: <20240627-tcg-v2-5-1690a813348e@daynix.com> Reviewed-by: Akihiko Odaki Message-Id: <20240630190050.160642-7-richard.henderson@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-12-alex.bennee@linaro.org> diff --git a/tests/tcg/arm/fcvt.c b/tests/tcg/arm/fcvt.c index 7ac47b564e..f631197287 100644 --- a/tests/tcg/arm/fcvt.c +++ b/tests/tcg/arm/fcvt.c @@ -126,7 +126,7 @@ static void convert_single_to_half(void) asm("vcvtb.f16.f32 %0, %1" : "=t" (output) : "x" (input)); #else uint16_t output; - asm("fcvt %h0, %s1" : "=w" (output) : "x" (input)); + asm("fcvt %h0, %s1" : "=w" (output) : "w" (input)); #endif print_half_number(i, output); } @@ -149,7 +149,7 @@ static void convert_single_to_double(void) #if defined(__arm__) asm("vcvt.f64.f32 %P0, %1" : "=w" (output) : "t" (input)); #else - asm("fcvt %d0, %s1" : "=w" (output) : "x" (input)); + asm("fcvt %d0, %s1" : "=w" (output) : "w" (input)); #endif print_double_number(i, output); } @@ -244,7 +244,7 @@ static void convert_double_to_half(void) /* asm("vcvtb.f16.f64 %0, %P1" : "=t" (output) : "x" (input)); */ output = input; #else - asm("fcvt %h0, %d1" : "=w" (output) : "x" (input)); + asm("fcvt %h0, %d1" : "=w" (output) : "w" (input)); #endif print_half_number(i, output); } @@ -267,7 +267,7 @@ static void convert_double_to_single(void) #if defined(__arm__) asm("vcvt.f32.f64 %0, %P1" : "=w" (output) : "x" (input)); #else - asm("fcvt %s0, %d1" : "=w" (output) : "x" (input)); + asm("fcvt %s0, %d1" : "=w" (output) : "w" (input)); #endif print_single_number(i, output); @@ -335,7 +335,7 @@ static void convert_half_to_double(void) /* asm("vcvtb.f64.f16 %P0, %1" : "=w" (output) : "t" (input)); */ output = input; #else - asm("fcvt %d0, %h1" : "=w" (output) : "x" (input)); + asm("fcvt %d0, %h1" : "=w" (output) : "w" (input)); #endif print_double_number(i, output); } @@ -357,7 +357,7 @@ static void convert_half_to_single(void) #if defined(__arm__) asm("vcvtb.f32.f16 %0, %1" : "=w" (output) : "x" ((uint32_t)input)); #else - asm("fcvt %s0, %h1" : "=w" (output) : "x" (input)); + asm("fcvt %s0, %h1" : "=w" (output) : "w" (input)); #endif print_single_number(i, output); } @@ -380,7 +380,7 @@ static void convert_half_to_integer(void) /* asm("vcvt.s32.f16 %0, %1" : "=t" (output) : "t" (input)); v8.2*/ output = input; #else - asm("fcvt %s0, %h1" : "=w" (output) : "x" (input)); + asm("fcvt %s0, %h1" : "=w" (output) : "w" (input)); #endif print_int64(i, output); } From patchwork Fri Jul 5 15:30:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810400 Delivered-To: patch@linaro.org Received: by 2002:ab3:6bc5:0:b0:273:6c53:9181 with SMTP id v5csp523981ltk; Fri, 5 Jul 2024 08:32:29 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUKSmYwa7IM8PeMjP4AbWlanPI2GJCav+9w3bzBft2lCb+/mRrs4/gPowBzZ5tYMc4ue/ndyVngI3/NwpSO7XsD X-Google-Smtp-Source: AGHT+IEALXi2BV7Atw1cw07FadCA+hp2Hqw68iEF//yZ4cwiWuiu4bF2XVVMzUovoaH/nRIBsuMP X-Received: by 2002:a05:620a:2e5:b0:79d:6926:f765 with SMTP id af79cd13be357-79eee1df663mr466782885a.45.1720193549627; Fri, 05 Jul 2024 08:32:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193549; cv=none; d=google.com; s=arc-20160816; b=o6ccZOl0vnzCajBABTFGnIgIR3tfnuzcUrBBPYOPFlUhSnYw/3LGX3h/tWC6gufv/M G6ccpOIC1dPAivE84LLXw12SJxW+6q2LdZHRRShzQb/IZUXf9+vFJT5jCFF8W9IhaTMy IwFTP+ONLG8eS0KtPHMqEvJYGjuOqHcED2liAiN0mzWlY8UZMxBKn37w8CMiZy3fvibG BV5ZitLf2Bmy+DuidjeNR1XaEF04nt1ECTMWbg8gu2nrGxdxQWozrQK6onP6TcXvi1UP OdNy7NZxNy/kXvBehcRDjdaSdgntU2EQlfqQrK5rFCqCZzlchYrDyjPbLcANaU5qR6IS S2jw== 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=mWUoJ8jMYHKZK6JbWNGMObF6aodq8m6nBv1ts3bfECs=; fh=DRz3T8hy46IOIOI0+1PyoMvsH/I8h2Md0cQSsMbTLVY=; b=VbktuN1PKOcV4izVQKlsZUBuvBIs4LbLNwoVZmOJpdfV4nzyZ2RL5FCq+obo9WefUz 1dSoaDPGucNlsVOLUavXIDjLsmD9V/nx0U9la5cceRlmKTrEb63fIS2Ri10TfawITycL Nx/20qEhsGY27600UuM2OXcX1EqPA4sCbNrzuZCChW29kChRWMy7S/MpqBSLXJJ4NaaK J5y+rTZjTDS1sL5yVWEXeeMKfjxBE2tt1wA9PEwZX6ZcGvDf5spJ0tMmZvBjr/zLLMBr D/xvmWybRbPEXyKqFxdf4KWuwliczzQ0zvcw812DSMKtA7kJCYuL48aSJKFEK7/W7lZ3 23rA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Sg2UBWVl; 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 af79cd13be357-79d692615d7si1698341185a.86.2024.07.05.08.32.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:32:29 -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=Sg2UBWVl; 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 1sPktz-0005gw-A3; Fri, 05 Jul 2024 11:31:12 -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 1sPktv-0005dC-CX for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:07 -0400 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPktq-0000O6-Vi for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:07 -0400 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-52ea5dc3c66so1501632e87.3 for ; Fri, 05 Jul 2024 08:31:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193461; x=1720798261; 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=mWUoJ8jMYHKZK6JbWNGMObF6aodq8m6nBv1ts3bfECs=; b=Sg2UBWVl7UkQNaW0vv0qf0dJ4Jw9egmEwa+LkZInYeT9numwHEfcGhoHWGVZ7DliYZ lmQFvXLPwqaCPevX4+5ESVBcHjqofLY7/IwSf1J2OA1ipPkaqYORdpS3xqPrcdC5f56T 9wJUQfjlyoQpS4Wz+DNwQuJzrbFrIA71mNl4/nV7x0hGlB7KIXsX1mWDDuU7zImYcMXK +3ncEoOtfjELiQXEQGJ0S2vZ587sqSAw0SaFQsE4WtjXonTKnCSQkLkYVNcWDqlCUBjb vtbffZiJQXgqKXxjd0xvUFdgJzr4g9j7R747ogopJ2chwgmZsyFTIvR2vdLccFeyBEDh 4bxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193461; x=1720798261; 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=mWUoJ8jMYHKZK6JbWNGMObF6aodq8m6nBv1ts3bfECs=; b=HdlBeNr2BcWdYOu/WMT3XcKr6fcO2uyg1A+KTkqqAjli+7rx6leaPSrmuter1MUkfx 37Pn0I3Egk+8IMiOoqwiShQjVvLae9LzZQ5yR+qLLD01vvh4pnxVA/ucrEuUSD90I0l2 1TnDbPPeRolBzfNWRfYCxP7d/R6riFRKl8doK2LHdiMHe2hay+sZT3/FvwiqWd7T60we zRJb3gEJ/U6FZ6666eGXau3ebVKQtOroXVWLJJPAotPbawa/rXubIsX0pMcZbPRA5d8I iexomt7+Aa2kdsZnpjAQtBw9+E9v/NlCitsSZDmktktcLxb7tI2IMcoB+QULFSKX8l4u 3yWw== X-Gm-Message-State: AOJu0Yzjhv/d6ocD2hD7ByqqgFSbvSmkTWHFCcMm7h8WdnUqdz1h3l2d opktlS8XztUnIswOp+9pJw/oxPGzDRrRumUusJAvEZfVEmoZO4oKDbJsVMA0VyCbdCf+ZB8/+hd s X-Received: by 2002:a05:6512:32a6:b0:52d:3ada:4b6b with SMTP id 2adb3069b0e04-52ea060dc75mr4337366e87.1.1720193460674; Fri, 05 Jul 2024 08:31:00 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a77a18c7123sm236694766b.58.2024.07.05.08.30.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:30:57 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 21C23620FD; Fri, 5 Jul 2024 16:30:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Akihiko Odaki , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 12/40] tests/tcg/aarch64: Add -fno-integrated-as for sme Date: Fri, 5 Jul 2024 16:30:24 +0100 Message-Id: <20240705153052.1219696-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12d; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x12d.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: Richard Henderson The only use of SME is inline assembly. Both gcc and clang only support SME with very recent releases; by deferring detection to the assembler we get better test coverage. Signed-off-by: Richard Henderson Reviewed-by: Akihiko Odaki Message-Id: <20240630190050.160642-8-richard.henderson@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-13-alex.bennee@linaro.org> diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target index 11ccde5579..ad1774c2ce 100644 --- a/tests/tcg/aarch64/Makefile.target +++ b/tests/tcg/aarch64/Makefile.target @@ -20,6 +20,7 @@ run-fcvt: fcvt config-cc.mak: Makefile $(quiet-@)( \ + fnia=`$(call cc-test,-fno-integrated-as) && echo -fno-integrated-as`; \ $(call cc-option,-march=armv8.1-a+sve, CROSS_CC_HAS_SVE); \ $(call cc-option,-march=armv8.1-a+sve2, CROSS_CC_HAS_SVE2); \ $(call cc-option,-march=armv8.2-a, CROSS_CC_HAS_ARMV8_2); \ @@ -27,7 +28,7 @@ config-cc.mak: Makefile $(call cc-option,-march=armv8.5-a, CROSS_CC_HAS_ARMV8_5); \ $(call cc-option,-mbranch-protection=standard, CROSS_CC_HAS_ARMV8_BTI); \ $(call cc-option,-march=armv8.5-a+memtag, CROSS_CC_HAS_ARMV8_MTE); \ - $(call cc-option,-Wa$(COMMA)-march=armv9-a+sme, CROSS_AS_HAS_ARMV9_SME)) 3> config-cc.mak + $(call cc-option,-Wa$(COMMA)-march=armv9-a+sme $$fnia, CROSS_AS_HAS_ARMV9_SME)) 3> config-cc.mak -include config-cc.mak ifneq ($(CROSS_CC_HAS_ARMV8_2),) From patchwork Fri Jul 5 15:30:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810405 Delivered-To: patch@linaro.org Received: by 2002:ab3:6bc5:0:b0:273:6c53:9181 with SMTP id v5csp524636ltk; Fri, 5 Jul 2024 08:33:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWiGZHhIpeEqWTG7YOCcrGqc9TRYQ2fUdlZwfRWHR3rqjQw8Eg5L3YnnZzXkV0iAQ0QpDa21XUSYYybApIie2OL X-Google-Smtp-Source: AGHT+IH4MUr6oIa4MXHzbDHQvQ/s+9AZLtXZ1A0wiQ7RcZKv9prpFj/9+vYUHsfOIyMYexWIuCH+ X-Received: by 2002:a05:6830:47:b0:703:5ab1:64d4 with SMTP id 46e09a7af769-7035ab179f1mr1443095a34.29.1720193619152; Fri, 05 Jul 2024 08:33:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193619; cv=none; d=google.com; s=arc-20160816; b=lxe0o8aA0iJpitAo01JeGeKGGnVA8md6fvroF5L6XfamJnxuonJtQdni5kD1+wsyw7 UdpTEyDRgd9gZco+hrpqu9F4DwQYMsXqtWNBp+GWcWwVDg/cMix61WJXfNsmk+HLBNg7 MMCEh9hcc318/X+VnuAtXZaNvMNINal0mdqdLb2vENJuY8oKOBKsMlqILOnv/4Ve/2+k XqouzWUDexPeYW6zEaBxcdCVMYpoqJ9Q6Hm1F3bcEDMesSgJ3SEBOj3oRzai7udqeI+7 q5xdVdn75KRlN3TomCsFp83WUmoQzl17hvhdc+7jDFEvGJeU9+QefYhOcsj2D6afQ0FL WVng== 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=bHg4+s/FpPZxeeTuztoD98f0IJGMJLG80p/HXuBKFjc=; fh=ciSoQgqucu/oEfZlaB6nZdSrNnqkgtVavnibiIeOass=; b=MGq6dmO0DkMcqBYduvUvImoMDfFlA9gaaSOn7AhKWCUDM2ilwGHgXwzv3Z/JY0Cbq7 qWiEzxDQQtO5gdq+Y+XyUcTChHnTh7WCRRpmjaUjn0GedmsaGXJwJ20xMdLAscnTfVJ5 sttPFZaGa2UMVqFcSLzw6xL/RwHZdII0rc271txINHgqBUQ6rXYxpkTecoaANi9YtRqI 9AVRdIwE4eFypnPWqu8G8kUM/N+3Qiq5sTWjWBEN+tmKrigIRFEcLD8IOHkxC+Q955yW Uuegmh364j18rf4q9rCT29tWA9rkQozkRLLzvWR+kuwvDvDgaGzrKiLbfh96iJwfsEzO wWkg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qxiy6dmd; 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 af79cd13be357-79efef89517si40252985a.152.2024.07.05.08.33.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:33:39 -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=qxiy6dmd; 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 1sPku1-0005iG-L7; Fri, 05 Jul 2024 11:31:13 -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 1sPktw-0005eP-Kn for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:08 -0400 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPktq-0000O4-Nt for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:08 -0400 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-52e9a920e73so2049195e87.2 for ; Fri, 05 Jul 2024 08:31:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193461; x=1720798261; 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=bHg4+s/FpPZxeeTuztoD98f0IJGMJLG80p/HXuBKFjc=; b=qxiy6dmdzyTFotvH3Z/HSFYicj52u17NDcMXqSify9Z9KUHrn21VfcwKK+sSvsSrn7 LcVwXkjbXXQJoHQipJ0XMp82TeFAiuygPNl2/YVFWCGvky3S3ZcF1U+/HnvrFJf5yAsf GiB65YZt8M+GGHOeWugiB+Te0ElROPoiWRThjihx7c95K/9x+jedKwGdsO7Bzj4FxQOf GiRr6hcic/AAr1vskKg1eLyDSXPSeKnTzAnaOYCfI0Ycblr3GhZIlQ6YAEpbSa65+Hw0 H3K9EQy4iXq2zsSXmoPeOxEZu+da3LM4yqxCnJsTzje7e8gN9zWqZbvW3Yye8aFDyYN8 mULg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193461; x=1720798261; 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=bHg4+s/FpPZxeeTuztoD98f0IJGMJLG80p/HXuBKFjc=; b=WDWVOJ84YJDTi5macudN02yERwZoudKpW6+e4DhxhIsorowX/xsz04hpcAKiCprkeR vu8fCLY2tnCmQiYi9NODduOCGcrBFRCTHdiGU+MnuwNu8KP4dQyeYsp6i6z9irwLo85m HPfqdOI2lHMQn8CXu/+95ycEmRJhrsRddGHViqSZIXIuxKiH9UrIBPZolNkApz7xHNTg piLl5VX+vkuQnoyLhyYzvOthbkmXThnJ00OS3oXUamYEQAPKAM3QWA5OH/9gwBa92slk ZjM216otOhf+0Mw4k3X4I9r/dRGVZcGEZIq3Ka9nco0uiUSIFrGHJcyws9cj+mrHNGCr 2quA== X-Gm-Message-State: AOJu0YxG48scwKqfrWNVqlhxHpVlq5b5eVWixK/IJKOL2IWqMf30kcoB hXQImcicMRGG9w8rBYz0SDD/Wr1FGAoHpk5+y92mB5/+qVooJEBn8JVnksgjipI= X-Received: by 2002:ac2:5b83:0:b0:52e:9ba5:9853 with SMTP id 2adb3069b0e04-52ea062de5cmr3500464e87.24.1720193459651; Fri, 05 Jul 2024 08:30:59 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-58f4114a9ffsm1293305a12.12.2024.07.05.08.30.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:30:57 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 474B262102; Fri, 5 Jul 2024 16:30:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 13/40] tests/tcg/arm: Fix fcvt result messages Date: Fri, 5 Jul 2024 16:30:25 +0100 Message-Id: <20240705153052.1219696-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12f; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x12f.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: Akihiko Odaki The test cases for "converting double-precision to single-precision" emits float but the result variable was typed as uint32_t and corrupted the printed values. Propertly type it as float. Signed-off-by: Akihiko Odaki Fixes: 8ec8a55e3fc9 ("tests/tcg/arm: add fcvt test cases for AArch32/64") Message-Id: <20240627-tcg-v2-1-1690a813348e@daynix.com> [rth: Update arm ref file as well] Signed-off-by: Richard Henderson Reviewed-by: Akihiko Odaki Message-Id: <20240630190050.160642-9-richard.henderson@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-14-alex.bennee@linaro.org> diff --git a/tests/tcg/arm/fcvt.c b/tests/tcg/arm/fcvt.c index f631197287..157790e679 100644 --- a/tests/tcg/arm/fcvt.c +++ b/tests/tcg/arm/fcvt.c @@ -258,7 +258,7 @@ static void convert_double_to_single(void) for (i = 0; i < ARRAY_SIZE(double_numbers); ++i) { double input = double_numbers[i].d; - uint32_t output; + float output; feclearexcept(FE_ALL_EXCEPT); diff --git a/tests/tcg/aarch64/fcvt.ref b/tests/tcg/aarch64/fcvt.ref index e7af24dc58..2726b41063 100644 --- a/tests/tcg/aarch64/fcvt.ref +++ b/tests/tcg/aarch64/fcvt.ref @@ -211,45 +211,45 @@ Converting double-precision to half-precision 40 HALF: 0x7f00 (0x1 => INVALID) Converting double-precision to single-precision 00 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -00 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +00 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) 01 DOUBLE: -nan / 0x00fff8000000000000 (0 => OK) -01 SINGLE: 4.29077299200000000000e+09 / 0x4f7fc000 (0 => OK) +01 SINGLE: -nan / 0xffc00000 (0 => OK) 02 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) -02 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0 => OK) +02 SINGLE: -inf / 0xff800000 (0 => OK) 03 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff (0 => OK) -03 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x14 => OVERFLOW INEXACT ) +03 SINGLE: -inf / 0xff800000 (0x14 => OVERFLOW INEXACT ) 04 DOUBLE: -3.40282346638528859812e+38 / 0x00c7efffffe0000000 (0 => OK) -04 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x10 => INEXACT ) +04 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) 05 DOUBLE: -3.40282346638528859812e+38 / 0x00c7efffffe0000000 (0 => OK) -05 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x10 => INEXACT ) +05 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) 06 DOUBLE: -1.11100000000000007529e+31 / 0x00c661874b135ff654 (0 => OK) -06 SINGLE: 4.07766476800000000000e+09 / 0x4f730c3a (0x10 => INEXACT ) +06 SINGLE: -1.11100004769645909791e+31 / 0xf30c3a59 (0x10 => INEXACT ) 07 DOUBLE: -1.11099999999999999085e+30 / 0x00c62c0bab523323b9 (0 => OK) -07 SINGLE: 4.04962432000000000000e+09 / 0x4f71605d (0x10 => INEXACT ) +07 SINGLE: -1.11100003258488635273e+30 / 0xf1605d5b (0x10 => INEXACT ) 08 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) -08 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +08 SINGLE: -2.00000000000000000000e+00 / 0xc0000000 (0 => OK) 09 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) -09 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +09 SINGLE: -1.00000000000000000000e+00 / 0xbf800000 (0 => OK) 10 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) -10 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: -0.00000000000000000000e+00 / 0x80000000 (0x18 => UNDERFLOW INEXACT ) 11 DOUBLE: -1.17549435082228750797e-38 / 0x00b810000000000000 (0 => OK) -11 SINGLE: 2.15587225600000000000e+09 / 0x4f008000 (0 => OK) +11 SINGLE: -1.17549435082228750797e-38 / 0x80800000 (0 => OK) 12 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) 12 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) 13 DOUBLE: 1.17549435082228750797e-38 / 0x003810000000000000 (0 => OK) -13 SINGLE: 8.38860800000000000000e+06 / 0x4b000000 (0 => OK) +13 SINGLE: 1.17549435082228750797e-38 / 0x00800000 (0 => OK) 14 DOUBLE: 2.98023224000000013061e-08 / 0x003e600000001c5f68 (0 => OK) -14 SINGLE: 8.55638016000000000000e+08 / 0x4e4c0000 (0x10 => INEXACT ) +14 SINGLE: 2.98023223876953125000e-08 / 0x33000000 (0x10 => INEXACT ) 15 DOUBLE: 5.96046000000000015661e-08 / 0x003e6ffffe6cb2fa82 (0 => OK) -15 SINGLE: 8.64026624000000000000e+08 / 0x4e4e0000 (0x10 => INEXACT ) +15 SINGLE: 5.96045985901128005935e-08 / 0x337ffff3 (0x10 => INEXACT ) 16 DOUBLE: 6.09755999999999994299e-05 / 0x003f0ff801a9af58a1 (0 => OK) -16 SINGLE: 9.47896320000000000000e+08 / 0x4e61ff00 (0x10 => INEXACT ) +16 SINGLE: 6.09755988989491015673e-05 / 0x387fc00d (0x10 => INEXACT ) 17 DOUBLE: 6.10352000000000013665e-05 / 0x003f100000c06a1ef5 (0 => OK) -17 SINGLE: 9.47912704000000000000e+08 / 0x4e620000 (0x10 => INEXACT ) +17 SINGLE: 6.10351999057456851006e-05 / 0x38800006 (0x10 => INEXACT ) 18 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -18 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +18 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 19 DOUBLE: 1.00097656250000000000e+00 / 0x003ff0040000000000 (0 => OK) -19 SINGLE: 1.06536140800000000000e+09 / 0x4e7e0080 (0 => OK) +19 SINGLE: 1.00097656250000000000e+00 / 0x3f802000 (0 => OK) 20 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) 20 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 21 DOUBLE: 1.37899728486072282843e-308 / 0x000009ea82a2287680 (0 => OK) @@ -257,41 +257,41 @@ Converting double-precision to single-precision 22 DOUBLE: 1.49147387366816238763e-308 / 0x00000ab98fba843210 (0 => OK) 22 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 23 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -23 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +23 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 24 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) -24 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +24 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) 25 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769 (0 => OK) -25 SINGLE: 1.07675456000000000000e+09 / 0x4e805bf1 (0x10 => INEXACT ) +25 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0x10 => INEXACT ) 26 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18 (0 => OK) -26 SINGLE: 1.07853004800000000000e+09 / 0x4e809220 (0x10 => INEXACT ) +26 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb (0x10 => INEXACT ) 27 DOUBLE: 6.55030000000000000000e+04 / 0x0040effbe000000000 (0 => OK) -27 SINGLE: 1.19956249600000000000e+09 / 0x4e8effbe (0 => OK) +27 SINGLE: 6.55030000000000000000e+04 / 0x477fdf00 (0 => OK) 28 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) -28 SINGLE: 1.19956275200000000000e+09 / 0x4e8effc0 (0 => OK) +28 SINGLE: 6.55040000000000000000e+04 / 0x477fe000 (0 => OK) 29 DOUBLE: 6.55050000000000000000e+04 / 0x0040effc2000000000 (0 => OK) -29 SINGLE: 1.19956300800000000000e+09 / 0x4e8effc2 (0 => OK) +29 SINGLE: 6.55050000000000000000e+04 / 0x477fe100 (0 => OK) 30 DOUBLE: 1.31007000000000000000e+05 / 0x0040fffbf000000000 (0 => OK) -30 SINGLE: 1.20795123200000000000e+09 / 0x4e8fffbf (0 => OK) +30 SINGLE: 1.31007000000000000000e+05 / 0x47ffdf80 (0 => OK) 31 DOUBLE: 1.31008000000000000000e+05 / 0x0040fffc0000000000 (0 => OK) -31 SINGLE: 1.20795136000000000000e+09 / 0x4e8fffc0 (0 => OK) +31 SINGLE: 1.31008000000000000000e+05 / 0x47ffe000 (0 => OK) 32 DOUBLE: 1.31009000000000000000e+05 / 0x0040fffc1000000000 (0 => OK) -32 SINGLE: 1.20795148800000000000e+09 / 0x4e8fffc1 (0 => OK) +32 SINGLE: 1.31009000000000000000e+05 / 0x47ffe080 (0 => OK) 33 DOUBLE: 2.14748364700000000000e+09 / 0x0041dfffffffc00000 (0 => OK) -33 SINGLE: 1.32540006400000000000e+09 / 0x4e9e0000 (0x10 => INEXACT ) +33 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x10 => INEXACT ) 34 DOUBLE: 3.40282346638528859812e+38 / 0x0047efffffe0000000 (0 => OK) -34 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x10 => INEXACT ) +34 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) 35 DOUBLE: 3.40282346638528859812e+38 / 0x0047efffffe0000000 (0 => OK) -35 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x10 => INEXACT ) +35 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) 36 DOUBLE: 1.79769313486231570815e+308 / 0x007fefffffffffffff (0 => OK) -36 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x14 => OVERFLOW INEXACT ) +36 SINGLE: inf / 0x7f800000 (0x14 => OVERFLOW INEXACT ) 37 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) -37 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0 => OK) +37 SINGLE: inf / 0x7f800000 (0 => OK) 38 DOUBLE: nan / 0x007ff8000000000000 (0 => OK) -38 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0 => OK) +38 SINGLE: nan / 0x7fc00000 (0 => OK) 39 DOUBLE: nan / 0x007ff0000000000001 (0 => OK) -39 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0x1 => INVALID) +39 SINGLE: nan / 0x7fc00000 (0x1 => INVALID) 40 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -40 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +40 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) Converting half-precision to single-precision 00 HALF: 0xffff (0 => OK) 00 SINGLE: -nan / 0xffffe000 (0 => OK) @@ -574,87 +574,87 @@ Converting double-precision to half-precision 40 HALF: 0x7f00 (0x1 => INVALID) Converting double-precision to single-precision 00 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -00 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +00 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) 01 DOUBLE: -nan / 0x00fff8000000000000 (0 => OK) -01 SINGLE: 4.29077299200000000000e+09 / 0x4f7fc000 (0 => OK) +01 SINGLE: -nan / 0xffc00000 (0 => OK) 02 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) -02 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0 => OK) +02 SINGLE: -inf / 0xff800000 (0 => OK) 03 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff (0 => OK) -03 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x14 => OVERFLOW INEXACT ) +03 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0x14 => OVERFLOW INEXACT ) 04 DOUBLE: -3.40282346638528859811e+38 / 0x00c7efffffe0000000 (0 => OK) -04 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x10 => INEXACT ) +04 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) 05 DOUBLE: -3.40282346638528859811e+38 / 0x00c7efffffe0000000 (0 => OK) -05 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x10 => INEXACT ) +05 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) 06 DOUBLE: -1.11100000000000007529e+31 / 0x00c661874b135ff654 (0 => OK) -06 SINGLE: 4.07766502400000000000e+09 / 0x4f730c3b (0x10 => INEXACT ) +06 SINGLE: -1.11099992680387713644e+31 / 0xf30c3a58 (0x10 => INEXACT ) 07 DOUBLE: -1.11099999999999999084e+30 / 0x00c62c0bab523323b9 (0 => OK) -07 SINGLE: 4.04962457600000000000e+09 / 0x4f71605e (0x10 => INEXACT ) +07 SINGLE: -1.11099995702702262681e+30 / 0xf1605d5a (0x10 => INEXACT ) 08 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) -08 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +08 SINGLE: -2.00000000000000000000e+00 / 0xc0000000 (0 => OK) 09 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) -09 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +09 SINGLE: -1.00000000000000000000e+00 / 0xbf800000 (0 => OK) 10 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) -10 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: -0.00000000000000000000e+00 / 0x80000000 (0x18 => UNDERFLOW INEXACT ) 11 DOUBLE: -1.17549435082228750796e-38 / 0x00b810000000000000 (0 => OK) -11 SINGLE: 2.15587225600000000000e+09 / 0x4f008000 (0 => OK) +11 SINGLE: -1.17549435082228750796e-38 / 0x80800000 (0 => OK) 12 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) 12 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) 13 DOUBLE: 1.17549435082228750797e-38 / 0x003810000000000000 (0 => OK) -13 SINGLE: 8.38860800000000000000e+06 / 0x4b000000 (0 => OK) +13 SINGLE: 1.17549435082228750797e-38 / 0x00800000 (0 => OK) 14 DOUBLE: 2.98023224000000013061e-08 / 0x003e600000001c5f68 (0 => OK) -14 SINGLE: 8.55638080000000000000e+08 / 0x4e4c0001 (0x10 => INEXACT ) +14 SINGLE: 2.98023259404089913006e-08 / 0x33000001 (0x10 => INEXACT ) 15 DOUBLE: 5.96046000000000015662e-08 / 0x003e6ffffe6cb2fa82 (0 => OK) -15 SINGLE: 8.64026624000000000000e+08 / 0x4e4e0000 (0x10 => INEXACT ) +15 SINGLE: 5.96046021428264793940e-08 / 0x337ffff4 (0x10 => INEXACT ) 16 DOUBLE: 6.09755999999999994299e-05 / 0x003f0ff801a9af58a1 (0 => OK) -16 SINGLE: 9.47896384000000000000e+08 / 0x4e61ff01 (0x10 => INEXACT ) +16 SINGLE: 6.09756025369279086590e-05 / 0x387fc00e (0x10 => INEXACT ) 17 DOUBLE: 6.10352000000000013665e-05 / 0x003f100000c06a1ef5 (0 => OK) -17 SINGLE: 9.47912768000000000000e+08 / 0x4e620001 (0x10 => INEXACT ) +17 SINGLE: 6.10352071817032992840e-05 / 0x38800007 (0x10 => INEXACT ) 18 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -18 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +18 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 19 DOUBLE: 1.00097656250000000000e+00 / 0x003ff0040000000000 (0 => OK) -19 SINGLE: 1.06536140800000000000e+09 / 0x4e7e0080 (0 => OK) +19 SINGLE: 1.00097656250000000000e+00 / 0x3f802000 (0 => OK) 20 DOUBLE: 2.22507385850720138310e-308 / 0x000010000000000000 (0 => OK) -20 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0x18 => UNDERFLOW INEXACT ) +20 SINGLE: 1.40129846432481707093e-45 / 0x00000001 (0x18 => UNDERFLOW INEXACT ) 21 DOUBLE: 1.37899728486072282844e-308 / 0x000009ea82a2287680 (0 => OK) -21 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0x18 => UNDERFLOW INEXACT ) +21 SINGLE: 1.40129846432481707093e-45 / 0x00000001 (0x18 => UNDERFLOW INEXACT ) 22 DOUBLE: 1.49147387366816238764e-308 / 0x00000ab98fba843210 (0 => OK) -22 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0x18 => UNDERFLOW INEXACT ) +22 SINGLE: 1.40129846432481707093e-45 / 0x00000001 (0x18 => UNDERFLOW INEXACT ) 23 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -23 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +23 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 24 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) -24 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +24 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) 25 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769 (0 => OK) -25 SINGLE: 1.07675456000000000000e+09 / 0x4e805bf1 (0x10 => INEXACT ) +25 SINGLE: 2.71828198432922363282e+00 / 0x402df855 (0x10 => INEXACT ) 26 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18 (0 => OK) -26 SINGLE: 1.07853004800000000000e+09 / 0x4e809220 (0x10 => INEXACT ) +26 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb (0x10 => INEXACT ) 27 DOUBLE: 6.55030000000000000000e+04 / 0x0040effbe000000000 (0 => OK) -27 SINGLE: 1.19956249600000000000e+09 / 0x4e8effbe (0 => OK) +27 SINGLE: 6.55030000000000000000e+04 / 0x477fdf00 (0 => OK) 28 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) -28 SINGLE: 1.19956275200000000000e+09 / 0x4e8effc0 (0 => OK) +28 SINGLE: 6.55040000000000000000e+04 / 0x477fe000 (0 => OK) 29 DOUBLE: 6.55050000000000000000e+04 / 0x0040effc2000000000 (0 => OK) -29 SINGLE: 1.19956300800000000000e+09 / 0x4e8effc2 (0 => OK) +29 SINGLE: 6.55050000000000000000e+04 / 0x477fe100 (0 => OK) 30 DOUBLE: 1.31007000000000000000e+05 / 0x0040fffbf000000000 (0 => OK) -30 SINGLE: 1.20795123200000000000e+09 / 0x4e8fffbf (0 => OK) +30 SINGLE: 1.31007000000000000000e+05 / 0x47ffdf80 (0 => OK) 31 DOUBLE: 1.31008000000000000000e+05 / 0x0040fffc0000000000 (0 => OK) -31 SINGLE: 1.20795136000000000000e+09 / 0x4e8fffc0 (0 => OK) +31 SINGLE: 1.31008000000000000000e+05 / 0x47ffe000 (0 => OK) 32 DOUBLE: 1.31009000000000000000e+05 / 0x0040fffc1000000000 (0 => OK) -32 SINGLE: 1.20795148800000000000e+09 / 0x4e8fffc1 (0 => OK) +32 SINGLE: 1.31009000000000000000e+05 / 0x47ffe080 (0 => OK) 33 DOUBLE: 2.14748364700000000000e+09 / 0x0041dfffffffc00000 (0 => OK) -33 SINGLE: 1.32540006400000000000e+09 / 0x4e9e0000 (0x10 => INEXACT ) +33 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x10 => INEXACT ) 34 DOUBLE: 3.40282346638528859812e+38 / 0x0047efffffe0000000 (0 => OK) -34 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x10 => INEXACT ) +34 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) 35 DOUBLE: 3.40282346638528859812e+38 / 0x0047efffffe0000000 (0 => OK) -35 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x10 => INEXACT ) +35 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) 36 DOUBLE: 1.79769313486231570815e+308 / 0x007fefffffffffffff (0 => OK) -36 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x14 => OVERFLOW INEXACT ) +36 SINGLE: inf / 0x7f800000 (0x14 => OVERFLOW INEXACT ) 37 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) -37 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0 => OK) +37 SINGLE: inf / 0x7f800000 (0 => OK) 38 DOUBLE: nan / 0x007ff8000000000000 (0 => OK) -38 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0 => OK) +38 SINGLE: nan / 0x7fc00000 (0 => OK) 39 DOUBLE: nan / 0x007ff0000000000001 (0 => OK) -39 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0x1 => INVALID) +39 SINGLE: nan / 0x7fc00000 (0x1 => INVALID) 40 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -40 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +40 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) Converting half-precision to single-precision 00 HALF: 0xffff (0 => OK) 00 SINGLE: -nan / 0xffffe000 (0 => OK) @@ -937,45 +937,45 @@ Converting double-precision to half-precision 40 HALF: 0x7f00 (0x1 => INVALID) Converting double-precision to single-precision 00 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -00 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +00 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) 01 DOUBLE: -nan / 0x00fff8000000000000 (0 => OK) -01 SINGLE: 4.29077299200000000000e+09 / 0x4f7fc000 (0 => OK) +01 SINGLE: -nan / 0xffc00000 (0 => OK) 02 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) -02 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0 => OK) +02 SINGLE: -inf / 0xff800000 (0 => OK) 03 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff (0 => OK) -03 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x14 => OVERFLOW INEXACT ) +03 SINGLE: -inf / 0xff800000 (0x14 => OVERFLOW INEXACT ) 04 DOUBLE: -3.40282346638528859812e+38 / 0x00c7efffffe0000000 (0 => OK) -04 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff (0x10 => INEXACT ) +04 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) 05 DOUBLE: -3.40282346638528859812e+38 / 0x00c7efffffe0000000 (0 => OK) -05 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff (0x10 => INEXACT ) +05 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) 06 DOUBLE: -1.11100000000000007530e+31 / 0x00c661874b135ff654 (0 => OK) -06 SINGLE: 4.07766476800000000000e+09 / 0x4f730c3a (0x10 => INEXACT ) +06 SINGLE: -1.11100004769645909791e+31 / 0xf30c3a59 (0x10 => INEXACT ) 07 DOUBLE: -1.11099999999999999085e+30 / 0x00c62c0bab523323b9 (0 => OK) -07 SINGLE: 4.04962432000000000000e+09 / 0x4f71605d (0x10 => INEXACT ) +07 SINGLE: -1.11100003258488635273e+30 / 0xf1605d5b (0x10 => INEXACT ) 08 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) -08 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +08 SINGLE: -2.00000000000000000000e+00 / 0xc0000000 (0 => OK) 09 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) -09 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +09 SINGLE: -1.00000000000000000000e+00 / 0xbf800000 (0 => OK) 10 DOUBLE: -2.22507385850720138310e-308 / 0x008010000000000000 (0 => OK) -10 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: -1.40129846432481707093e-45 / 0x80000001 (0x18 => UNDERFLOW INEXACT ) 11 DOUBLE: -1.17549435082228750797e-38 / 0x00b810000000000000 (0 => OK) -11 SINGLE: 2.15587225600000000000e+09 / 0x4f008000 (0 => OK) +11 SINGLE: -1.17549435082228750797e-38 / 0x80800000 (0 => OK) 12 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) 12 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) 13 DOUBLE: 1.17549435082228750796e-38 / 0x003810000000000000 (0 => OK) -13 SINGLE: 8.38860800000000000000e+06 / 0x4b000000 (0 => OK) +13 SINGLE: 1.17549435082228750796e-38 / 0x00800000 (0 => OK) 14 DOUBLE: 2.98023224000000013060e-08 / 0x003e600000001c5f68 (0 => OK) -14 SINGLE: 8.55638016000000000000e+08 / 0x4e4c0000 (0x10 => INEXACT ) +14 SINGLE: 2.98023223876953125000e-08 / 0x33000000 (0x10 => INEXACT ) 15 DOUBLE: 5.96046000000000015661e-08 / 0x003e6ffffe6cb2fa82 (0 => OK) -15 SINGLE: 8.64026560000000000000e+08 / 0x4e4dffff (0x10 => INEXACT ) +15 SINGLE: 5.96045985901128005934e-08 / 0x337ffff3 (0x10 => INEXACT ) 16 DOUBLE: 6.09755999999999994298e-05 / 0x003f0ff801a9af58a1 (0 => OK) -16 SINGLE: 9.47896320000000000000e+08 / 0x4e61ff00 (0x10 => INEXACT ) +16 SINGLE: 6.09755988989491015672e-05 / 0x387fc00d (0x10 => INEXACT ) 17 DOUBLE: 6.10352000000000013664e-05 / 0x003f100000c06a1ef5 (0 => OK) -17 SINGLE: 9.47912704000000000000e+08 / 0x4e620000 (0x10 => INEXACT ) +17 SINGLE: 6.10351999057456851005e-05 / 0x38800006 (0x10 => INEXACT ) 18 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -18 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +18 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 19 DOUBLE: 1.00097656250000000000e+00 / 0x003ff0040000000000 (0 => OK) -19 SINGLE: 1.06536140800000000000e+09 / 0x4e7e0080 (0 => OK) +19 SINGLE: 1.00097656250000000000e+00 / 0x3f802000 (0 => OK) 20 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) 20 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 21 DOUBLE: 1.37899728486072282843e-308 / 0x000009ea82a2287680 (0 => OK) @@ -983,41 +983,41 @@ Converting double-precision to single-precision 22 DOUBLE: 1.49147387366816238763e-308 / 0x00000ab98fba843210 (0 => OK) 22 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 23 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -23 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +23 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 24 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) -24 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +24 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) 25 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769 (0 => OK) -25 SINGLE: 1.07675443200000000000e+09 / 0x4e805bf0 (0x10 => INEXACT ) +25 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0x10 => INEXACT ) 26 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18 (0 => OK) -26 SINGLE: 1.07852992000000000000e+09 / 0x4e80921f (0x10 => INEXACT ) +26 SINGLE: 3.14159250259399414062e+00 / 0x40490fda (0x10 => INEXACT ) 27 DOUBLE: 6.55030000000000000000e+04 / 0x0040effbe000000000 (0 => OK) -27 SINGLE: 1.19956249600000000000e+09 / 0x4e8effbe (0 => OK) +27 SINGLE: 6.55030000000000000000e+04 / 0x477fdf00 (0 => OK) 28 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) -28 SINGLE: 1.19956275200000000000e+09 / 0x4e8effc0 (0 => OK) +28 SINGLE: 6.55040000000000000000e+04 / 0x477fe000 (0 => OK) 29 DOUBLE: 6.55050000000000000000e+04 / 0x0040effc2000000000 (0 => OK) -29 SINGLE: 1.19956300800000000000e+09 / 0x4e8effc2 (0 => OK) +29 SINGLE: 6.55050000000000000000e+04 / 0x477fe100 (0 => OK) 30 DOUBLE: 1.31007000000000000000e+05 / 0x0040fffbf000000000 (0 => OK) -30 SINGLE: 1.20795123200000000000e+09 / 0x4e8fffbf (0 => OK) +30 SINGLE: 1.31007000000000000000e+05 / 0x47ffdf80 (0 => OK) 31 DOUBLE: 1.31008000000000000000e+05 / 0x0040fffc0000000000 (0 => OK) -31 SINGLE: 1.20795136000000000000e+09 / 0x4e8fffc0 (0 => OK) +31 SINGLE: 1.31008000000000000000e+05 / 0x47ffe000 (0 => OK) 32 DOUBLE: 1.31009000000000000000e+05 / 0x0040fffc1000000000 (0 => OK) -32 SINGLE: 1.20795148800000000000e+09 / 0x4e8fffc1 (0 => OK) +32 SINGLE: 1.31009000000000000000e+05 / 0x47ffe080 (0 => OK) 33 DOUBLE: 2.14748364700000000000e+09 / 0x0041dfffffffc00000 (0 => OK) -33 SINGLE: 1.32539993600000000000e+09 / 0x4e9dffff (0x10 => INEXACT ) +33 SINGLE: 2.14748352000000000000e+09 / 0x4effffff (0x10 => INEXACT ) 34 DOUBLE: 3.40282346638528859811e+38 / 0x0047efffffe0000000 (0 => OK) -34 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x10 => INEXACT ) +34 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) 35 DOUBLE: 3.40282346638528859811e+38 / 0x0047efffffe0000000 (0 => OK) -35 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x10 => INEXACT ) +35 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) 36 DOUBLE: 1.79769313486231570814e+308 / 0x007fefffffffffffff (0 => OK) -36 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x14 => OVERFLOW INEXACT ) +36 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0x14 => OVERFLOW INEXACT ) 37 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) -37 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0 => OK) +37 SINGLE: inf / 0x7f800000 (0 => OK) 38 DOUBLE: nan / 0x007ff8000000000000 (0 => OK) -38 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0 => OK) +38 SINGLE: nan / 0x7fc00000 (0 => OK) 39 DOUBLE: nan / 0x007ff0000000000001 (0 => OK) -39 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0x1 => INVALID) +39 SINGLE: nan / 0x7fc00000 (0x1 => INVALID) 40 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -40 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +40 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) Converting half-precision to single-precision 00 HALF: 0xffff (0 => OK) 00 SINGLE: -nan / 0xffffe000 (0 => OK) @@ -1300,45 +1300,45 @@ Converting double-precision to half-precision 40 HALF: 0x7f00 (0x1 => INVALID) Converting double-precision to single-precision 00 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -00 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +00 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) 01 DOUBLE: -nan / 0x00fff8000000000000 (0 => OK) -01 SINGLE: 4.29077299200000000000e+09 / 0x4f7fc000 (0 => OK) +01 SINGLE: -nan / 0xffc00000 (0 => OK) 02 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) -02 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0 => OK) +02 SINGLE: -inf / 0xff800000 (0 => OK) 03 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff (0 => OK) -03 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff (0x14 => OVERFLOW INEXACT ) +03 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0x14 => OVERFLOW INEXACT ) 04 DOUBLE: -3.40282346638528859811e+38 / 0x00c7efffffe0000000 (0 => OK) -04 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff (0x10 => INEXACT ) +04 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) 05 DOUBLE: -3.40282346638528859811e+38 / 0x00c7efffffe0000000 (0 => OK) -05 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff (0x10 => INEXACT ) +05 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) 06 DOUBLE: -1.11100000000000007529e+31 / 0x00c661874b135ff654 (0 => OK) -06 SINGLE: 4.07766476800000000000e+09 / 0x4f730c3a (0x10 => INEXACT ) +06 SINGLE: -1.11099992680387713644e+31 / 0xf30c3a58 (0x10 => INEXACT ) 07 DOUBLE: -1.11099999999999999084e+30 / 0x00c62c0bab523323b9 (0 => OK) -07 SINGLE: 4.04962432000000000000e+09 / 0x4f71605d (0x10 => INEXACT ) +07 SINGLE: -1.11099995702702262681e+30 / 0xf1605d5a (0x10 => INEXACT ) 08 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) -08 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +08 SINGLE: -2.00000000000000000000e+00 / 0xc0000000 (0 => OK) 09 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) -09 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +09 SINGLE: -1.00000000000000000000e+00 / 0xbf800000 (0 => OK) 10 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) -10 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: -0.00000000000000000000e+00 / 0x80000000 (0x18 => UNDERFLOW INEXACT ) 11 DOUBLE: -1.17549435082228750796e-38 / 0x00b810000000000000 (0 => OK) -11 SINGLE: 2.15587225600000000000e+09 / 0x4f008000 (0 => OK) +11 SINGLE: -1.17549435082228750796e-38 / 0x80800000 (0 => OK) 12 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) 12 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) 13 DOUBLE: 1.17549435082228750796e-38 / 0x003810000000000000 (0 => OK) -13 SINGLE: 8.38860800000000000000e+06 / 0x4b000000 (0 => OK) +13 SINGLE: 1.17549435082228750796e-38 / 0x00800000 (0 => OK) 14 DOUBLE: 2.98023224000000013060e-08 / 0x003e600000001c5f68 (0 => OK) -14 SINGLE: 8.55638016000000000000e+08 / 0x4e4c0000 (0x10 => INEXACT ) +14 SINGLE: 2.98023223876953125000e-08 / 0x33000000 (0x10 => INEXACT ) 15 DOUBLE: 5.96046000000000015661e-08 / 0x003e6ffffe6cb2fa82 (0 => OK) -15 SINGLE: 8.64026560000000000000e+08 / 0x4e4dffff (0x10 => INEXACT ) +15 SINGLE: 5.96045985901128005934e-08 / 0x337ffff3 (0x10 => INEXACT ) 16 DOUBLE: 6.09755999999999994298e-05 / 0x003f0ff801a9af58a1 (0 => OK) -16 SINGLE: 9.47896320000000000000e+08 / 0x4e61ff00 (0x10 => INEXACT ) +16 SINGLE: 6.09755988989491015672e-05 / 0x387fc00d (0x10 => INEXACT ) 17 DOUBLE: 6.10352000000000013664e-05 / 0x003f100000c06a1ef5 (0 => OK) -17 SINGLE: 9.47912704000000000000e+08 / 0x4e620000 (0x10 => INEXACT ) +17 SINGLE: 6.10351999057456851005e-05 / 0x38800006 (0x10 => INEXACT ) 18 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -18 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +18 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 19 DOUBLE: 1.00097656250000000000e+00 / 0x003ff0040000000000 (0 => OK) -19 SINGLE: 1.06536140800000000000e+09 / 0x4e7e0080 (0 => OK) +19 SINGLE: 1.00097656250000000000e+00 / 0x3f802000 (0 => OK) 20 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) 20 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 21 DOUBLE: 1.37899728486072282843e-308 / 0x000009ea82a2287680 (0 => OK) @@ -1346,41 +1346,41 @@ Converting double-precision to single-precision 22 DOUBLE: 1.49147387366816238763e-308 / 0x00000ab98fba843210 (0 => OK) 22 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 23 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -23 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +23 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 24 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) -24 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +24 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) 25 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769 (0 => OK) -25 SINGLE: 1.07675443200000000000e+09 / 0x4e805bf0 (0x10 => INEXACT ) +25 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0x10 => INEXACT ) 26 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18 (0 => OK) -26 SINGLE: 1.07852992000000000000e+09 / 0x4e80921f (0x10 => INEXACT ) +26 SINGLE: 3.14159250259399414062e+00 / 0x40490fda (0x10 => INEXACT ) 27 DOUBLE: 6.55030000000000000000e+04 / 0x0040effbe000000000 (0 => OK) -27 SINGLE: 1.19956249600000000000e+09 / 0x4e8effbe (0 => OK) +27 SINGLE: 6.55030000000000000000e+04 / 0x477fdf00 (0 => OK) 28 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) -28 SINGLE: 1.19956275200000000000e+09 / 0x4e8effc0 (0 => OK) +28 SINGLE: 6.55040000000000000000e+04 / 0x477fe000 (0 => OK) 29 DOUBLE: 6.55050000000000000000e+04 / 0x0040effc2000000000 (0 => OK) -29 SINGLE: 1.19956300800000000000e+09 / 0x4e8effc2 (0 => OK) +29 SINGLE: 6.55050000000000000000e+04 / 0x477fe100 (0 => OK) 30 DOUBLE: 1.31007000000000000000e+05 / 0x0040fffbf000000000 (0 => OK) -30 SINGLE: 1.20795123200000000000e+09 / 0x4e8fffbf (0 => OK) +30 SINGLE: 1.31007000000000000000e+05 / 0x47ffdf80 (0 => OK) 31 DOUBLE: 1.31008000000000000000e+05 / 0x0040fffc0000000000 (0 => OK) -31 SINGLE: 1.20795136000000000000e+09 / 0x4e8fffc0 (0 => OK) +31 SINGLE: 1.31008000000000000000e+05 / 0x47ffe000 (0 => OK) 32 DOUBLE: 1.31009000000000000000e+05 / 0x0040fffc1000000000 (0 => OK) -32 SINGLE: 1.20795148800000000000e+09 / 0x4e8fffc1 (0 => OK) +32 SINGLE: 1.31009000000000000000e+05 / 0x47ffe080 (0 => OK) 33 DOUBLE: 2.14748364700000000000e+09 / 0x0041dfffffffc00000 (0 => OK) -33 SINGLE: 1.32539993600000000000e+09 / 0x4e9dffff (0x10 => INEXACT ) +33 SINGLE: 2.14748352000000000000e+09 / 0x4effffff (0x10 => INEXACT ) 34 DOUBLE: 3.40282346638528859811e+38 / 0x0047efffffe0000000 (0 => OK) -34 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x10 => INEXACT ) +34 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) 35 DOUBLE: 3.40282346638528859811e+38 / 0x0047efffffe0000000 (0 => OK) -35 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x10 => INEXACT ) +35 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) 36 DOUBLE: 1.79769313486231570814e+308 / 0x007fefffffffffffff (0 => OK) -36 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x14 => OVERFLOW INEXACT ) +36 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0x14 => OVERFLOW INEXACT ) 37 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) -37 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0 => OK) +37 SINGLE: inf / 0x7f800000 (0 => OK) 38 DOUBLE: nan / 0x007ff8000000000000 (0 => OK) -38 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0 => OK) +38 SINGLE: nan / 0x7fc00000 (0 => OK) 39 DOUBLE: nan / 0x007ff0000000000001 (0 => OK) -39 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0x1 => INVALID) +39 SINGLE: nan / 0x7fc00000 (0x1 => INVALID) 40 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -40 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +40 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) Converting half-precision to single-precision 00 HALF: 0xffff (0 => OK) 00 SINGLE: -nan / 0xffffe000 (0 => OK) @@ -1845,45 +1845,45 @@ Converting double-precision to half-precision 40 HALF: 0000 (0x1 => INVALID) Converting double-precision to single-precision 00 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -00 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +00 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) 01 DOUBLE: -nan / 0x00fff8000000000000 (0 => OK) -01 SINGLE: 4.29077299200000000000e+09 / 0x4f7fc000 (0 => OK) +01 SINGLE: -nan / 0xffc00000 (0 => OK) 02 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) -02 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0 => OK) +02 SINGLE: -inf / 0xff800000 (0 => OK) 03 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff (0 => OK) -03 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x14 => OVERFLOW INEXACT ) +03 SINGLE: -inf / 0xff800000 (0x14 => OVERFLOW INEXACT ) 04 DOUBLE: -3.40282346638528859812e+38 / 0x00c7efffffe0000000 (0 => OK) -04 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x10 => INEXACT ) +04 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) 05 DOUBLE: -3.40282346638528859812e+38 / 0x00c7efffffe0000000 (0 => OK) -05 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x10 => INEXACT ) +05 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) 06 DOUBLE: -1.11100000000000007529e+31 / 0x00c661874b135ff654 (0 => OK) -06 SINGLE: 4.07766476800000000000e+09 / 0x4f730c3a (0x10 => INEXACT ) +06 SINGLE: -1.11100004769645909791e+31 / 0xf30c3a59 (0x10 => INEXACT ) 07 DOUBLE: -1.11099999999999999085e+30 / 0x00c62c0bab523323b9 (0 => OK) -07 SINGLE: 4.04962432000000000000e+09 / 0x4f71605d (0x10 => INEXACT ) +07 SINGLE: -1.11100003258488635273e+30 / 0xf1605d5b (0x10 => INEXACT ) 08 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) -08 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +08 SINGLE: -2.00000000000000000000e+00 / 0xc0000000 (0 => OK) 09 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) -09 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +09 SINGLE: -1.00000000000000000000e+00 / 0xbf800000 (0 => OK) 10 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) -10 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: -0.00000000000000000000e+00 / 0x80000000 (0x18 => UNDERFLOW INEXACT ) 11 DOUBLE: -1.17549435082228750797e-38 / 0x00b810000000000000 (0 => OK) -11 SINGLE: 2.15587225600000000000e+09 / 0x4f008000 (0 => OK) +11 SINGLE: -1.17549435082228750797e-38 / 0x80800000 (0 => OK) 12 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) 12 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) 13 DOUBLE: 1.17549435082228750797e-38 / 0x003810000000000000 (0 => OK) -13 SINGLE: 8.38860800000000000000e+06 / 0x4b000000 (0 => OK) +13 SINGLE: 1.17549435082228750797e-38 / 0x00800000 (0 => OK) 14 DOUBLE: 2.98023224000000013061e-08 / 0x003e600000001c5f68 (0 => OK) -14 SINGLE: 8.55638016000000000000e+08 / 0x4e4c0000 (0x10 => INEXACT ) +14 SINGLE: 2.98023223876953125000e-08 / 0x33000000 (0x10 => INEXACT ) 15 DOUBLE: 5.96046000000000015661e-08 / 0x003e6ffffe6cb2fa82 (0 => OK) -15 SINGLE: 8.64026624000000000000e+08 / 0x4e4e0000 (0x10 => INEXACT ) +15 SINGLE: 5.96045985901128005935e-08 / 0x337ffff3 (0x10 => INEXACT ) 16 DOUBLE: 6.09755999999999994299e-05 / 0x003f0ff801a9af58a1 (0 => OK) -16 SINGLE: 9.47896320000000000000e+08 / 0x4e61ff00 (0x10 => INEXACT ) +16 SINGLE: 6.09755988989491015673e-05 / 0x387fc00d (0x10 => INEXACT ) 17 DOUBLE: 6.10352000000000013665e-05 / 0x003f100000c06a1ef5 (0 => OK) -17 SINGLE: 9.47912704000000000000e+08 / 0x4e620000 (0x10 => INEXACT ) +17 SINGLE: 6.10351999057456851006e-05 / 0x38800006 (0x10 => INEXACT ) 18 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -18 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +18 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 19 DOUBLE: 1.00097656250000000000e+00 / 0x003ff0040000000000 (0 => OK) -19 SINGLE: 1.06536140800000000000e+09 / 0x4e7e0080 (0 => OK) +19 SINGLE: 1.00097656250000000000e+00 / 0x3f802000 (0 => OK) 20 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) 20 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 21 DOUBLE: 1.37899728486072282843e-308 / 0x000009ea82a2287680 (0 => OK) @@ -1891,41 +1891,41 @@ Converting double-precision to single-precision 22 DOUBLE: 1.49147387366816238763e-308 / 0x00000ab98fba843210 (0 => OK) 22 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 23 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -23 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +23 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 24 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) -24 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +24 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) 25 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769 (0 => OK) -25 SINGLE: 1.07675456000000000000e+09 / 0x4e805bf1 (0x10 => INEXACT ) +25 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0x10 => INEXACT ) 26 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18 (0 => OK) -26 SINGLE: 1.07853004800000000000e+09 / 0x4e809220 (0x10 => INEXACT ) +26 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb (0x10 => INEXACT ) 27 DOUBLE: 6.55030000000000000000e+04 / 0x0040effbe000000000 (0 => OK) -27 SINGLE: 1.19956249600000000000e+09 / 0x4e8effbe (0 => OK) +27 SINGLE: 6.55030000000000000000e+04 / 0x477fdf00 (0 => OK) 28 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) -28 SINGLE: 1.19956275200000000000e+09 / 0x4e8effc0 (0 => OK) +28 SINGLE: 6.55040000000000000000e+04 / 0x477fe000 (0 => OK) 29 DOUBLE: 6.55050000000000000000e+04 / 0x0040effc2000000000 (0 => OK) -29 SINGLE: 1.19956300800000000000e+09 / 0x4e8effc2 (0 => OK) +29 SINGLE: 6.55050000000000000000e+04 / 0x477fe100 (0 => OK) 30 DOUBLE: 1.31007000000000000000e+05 / 0x0040fffbf000000000 (0 => OK) -30 SINGLE: 1.20795123200000000000e+09 / 0x4e8fffbf (0 => OK) +30 SINGLE: 1.31007000000000000000e+05 / 0x47ffdf80 (0 => OK) 31 DOUBLE: 1.31008000000000000000e+05 / 0x0040fffc0000000000 (0 => OK) -31 SINGLE: 1.20795136000000000000e+09 / 0x4e8fffc0 (0 => OK) +31 SINGLE: 1.31008000000000000000e+05 / 0x47ffe000 (0 => OK) 32 DOUBLE: 1.31009000000000000000e+05 / 0x0040fffc1000000000 (0 => OK) -32 SINGLE: 1.20795148800000000000e+09 / 0x4e8fffc1 (0 => OK) +32 SINGLE: 1.31009000000000000000e+05 / 0x47ffe080 (0 => OK) 33 DOUBLE: 2.14748364700000000000e+09 / 0x0041dfffffffc00000 (0 => OK) -33 SINGLE: 1.32540006400000000000e+09 / 0x4e9e0000 (0x10 => INEXACT ) +33 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x10 => INEXACT ) 34 DOUBLE: 3.40282346638528859812e+38 / 0x0047efffffe0000000 (0 => OK) -34 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x10 => INEXACT ) +34 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) 35 DOUBLE: 3.40282346638528859812e+38 / 0x0047efffffe0000000 (0 => OK) -35 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x10 => INEXACT ) +35 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) 36 DOUBLE: 1.79769313486231570815e+308 / 0x007fefffffffffffff (0 => OK) -36 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x14 => OVERFLOW INEXACT ) +36 SINGLE: inf / 0x7f800000 (0x14 => OVERFLOW INEXACT ) 37 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) -37 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0 => OK) +37 SINGLE: inf / 0x7f800000 (0 => OK) 38 DOUBLE: nan / 0x007ff8000000000000 (0 => OK) -38 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0 => OK) +38 SINGLE: nan / 0x7fc00000 (0 => OK) 39 DOUBLE: nan / 0x007ff0000000000001 (0 => OK) -39 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0x1 => INVALID) +39 SINGLE: nan / 0x7fc00000 (0x1 => INVALID) 40 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -40 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +40 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) Converting half-precision to single-precision 00 HALF: 0xffff (0 => OK) 00 SINGLE: -1.31008000000000000000e+05 / 0xc7ffe000 (0 => OK) @@ -2208,87 +2208,87 @@ Converting double-precision to half-precision 40 HALF: 0000 (0x1 => INVALID) Converting double-precision to single-precision 00 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -00 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +00 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) 01 DOUBLE: -nan / 0x00fff8000000000000 (0 => OK) -01 SINGLE: 4.29077299200000000000e+09 / 0x4f7fc000 (0 => OK) +01 SINGLE: -nan / 0xffc00000 (0 => OK) 02 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) -02 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0 => OK) +02 SINGLE: -inf / 0xff800000 (0 => OK) 03 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff (0 => OK) -03 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x14 => OVERFLOW INEXACT ) +03 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0x14 => OVERFLOW INEXACT ) 04 DOUBLE: -3.40282346638528859811e+38 / 0x00c7efffffe0000000 (0 => OK) -04 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x10 => INEXACT ) +04 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) 05 DOUBLE: -3.40282346638528859811e+38 / 0x00c7efffffe0000000 (0 => OK) -05 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x10 => INEXACT ) +05 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) 06 DOUBLE: -1.11100000000000007529e+31 / 0x00c661874b135ff654 (0 => OK) -06 SINGLE: 4.07766502400000000000e+09 / 0x4f730c3b (0x10 => INEXACT ) +06 SINGLE: -1.11099992680387713644e+31 / 0xf30c3a58 (0x10 => INEXACT ) 07 DOUBLE: -1.11099999999999999084e+30 / 0x00c62c0bab523323b9 (0 => OK) -07 SINGLE: 4.04962457600000000000e+09 / 0x4f71605e (0x10 => INEXACT ) +07 SINGLE: -1.11099995702702262681e+30 / 0xf1605d5a (0x10 => INEXACT ) 08 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) -08 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +08 SINGLE: -2.00000000000000000000e+00 / 0xc0000000 (0 => OK) 09 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) -09 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +09 SINGLE: -1.00000000000000000000e+00 / 0xbf800000 (0 => OK) 10 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) -10 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: -0.00000000000000000000e+00 / 0x80000000 (0x18 => UNDERFLOW INEXACT ) 11 DOUBLE: -1.17549435082228750796e-38 / 0x00b810000000000000 (0 => OK) -11 SINGLE: 2.15587225600000000000e+09 / 0x4f008000 (0 => OK) +11 SINGLE: -1.17549435082228750796e-38 / 0x80800000 (0 => OK) 12 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) 12 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) 13 DOUBLE: 1.17549435082228750797e-38 / 0x003810000000000000 (0 => OK) -13 SINGLE: 8.38860800000000000000e+06 / 0x4b000000 (0 => OK) +13 SINGLE: 1.17549435082228750797e-38 / 0x00800000 (0 => OK) 14 DOUBLE: 2.98023224000000013061e-08 / 0x003e600000001c5f68 (0 => OK) -14 SINGLE: 8.55638080000000000000e+08 / 0x4e4c0001 (0x10 => INEXACT ) +14 SINGLE: 2.98023259404089913006e-08 / 0x33000001 (0x10 => INEXACT ) 15 DOUBLE: 5.96046000000000015662e-08 / 0x003e6ffffe6cb2fa82 (0 => OK) -15 SINGLE: 8.64026624000000000000e+08 / 0x4e4e0000 (0x10 => INEXACT ) +15 SINGLE: 5.96046021428264793940e-08 / 0x337ffff4 (0x10 => INEXACT ) 16 DOUBLE: 6.09755999999999994299e-05 / 0x003f0ff801a9af58a1 (0 => OK) -16 SINGLE: 9.47896384000000000000e+08 / 0x4e61ff01 (0x10 => INEXACT ) +16 SINGLE: 6.09756025369279086590e-05 / 0x387fc00e (0x10 => INEXACT ) 17 DOUBLE: 6.10352000000000013665e-05 / 0x003f100000c06a1ef5 (0 => OK) -17 SINGLE: 9.47912768000000000000e+08 / 0x4e620001 (0x10 => INEXACT ) +17 SINGLE: 6.10352071817032992840e-05 / 0x38800007 (0x10 => INEXACT ) 18 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -18 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +18 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 19 DOUBLE: 1.00097656250000000000e+00 / 0x003ff0040000000000 (0 => OK) -19 SINGLE: 1.06536140800000000000e+09 / 0x4e7e0080 (0 => OK) +19 SINGLE: 1.00097656250000000000e+00 / 0x3f802000 (0 => OK) 20 DOUBLE: 2.22507385850720138310e-308 / 0x000010000000000000 (0 => OK) -20 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0x18 => UNDERFLOW INEXACT ) +20 SINGLE: 1.40129846432481707093e-45 / 0x00000001 (0x18 => UNDERFLOW INEXACT ) 21 DOUBLE: 1.37899728486072282844e-308 / 0x000009ea82a2287680 (0 => OK) -21 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0x18 => UNDERFLOW INEXACT ) +21 SINGLE: 1.40129846432481707093e-45 / 0x00000001 (0x18 => UNDERFLOW INEXACT ) 22 DOUBLE: 1.49147387366816238764e-308 / 0x00000ab98fba843210 (0 => OK) -22 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0x18 => UNDERFLOW INEXACT ) +22 SINGLE: 1.40129846432481707093e-45 / 0x00000001 (0x18 => UNDERFLOW INEXACT ) 23 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -23 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +23 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 24 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) -24 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +24 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) 25 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769 (0 => OK) -25 SINGLE: 1.07675456000000000000e+09 / 0x4e805bf1 (0x10 => INEXACT ) +25 SINGLE: 2.71828198432922363282e+00 / 0x402df855 (0x10 => INEXACT ) 26 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18 (0 => OK) -26 SINGLE: 1.07853004800000000000e+09 / 0x4e809220 (0x10 => INEXACT ) +26 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb (0x10 => INEXACT ) 27 DOUBLE: 6.55030000000000000000e+04 / 0x0040effbe000000000 (0 => OK) -27 SINGLE: 1.19956249600000000000e+09 / 0x4e8effbe (0 => OK) +27 SINGLE: 6.55030000000000000000e+04 / 0x477fdf00 (0 => OK) 28 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) -28 SINGLE: 1.19956275200000000000e+09 / 0x4e8effc0 (0 => OK) +28 SINGLE: 6.55040000000000000000e+04 / 0x477fe000 (0 => OK) 29 DOUBLE: 6.55050000000000000000e+04 / 0x0040effc2000000000 (0 => OK) -29 SINGLE: 1.19956300800000000000e+09 / 0x4e8effc2 (0 => OK) +29 SINGLE: 6.55050000000000000000e+04 / 0x477fe100 (0 => OK) 30 DOUBLE: 1.31007000000000000000e+05 / 0x0040fffbf000000000 (0 => OK) -30 SINGLE: 1.20795123200000000000e+09 / 0x4e8fffbf (0 => OK) +30 SINGLE: 1.31007000000000000000e+05 / 0x47ffdf80 (0 => OK) 31 DOUBLE: 1.31008000000000000000e+05 / 0x0040fffc0000000000 (0 => OK) -31 SINGLE: 1.20795136000000000000e+09 / 0x4e8fffc0 (0 => OK) +31 SINGLE: 1.31008000000000000000e+05 / 0x47ffe000 (0 => OK) 32 DOUBLE: 1.31009000000000000000e+05 / 0x0040fffc1000000000 (0 => OK) -32 SINGLE: 1.20795148800000000000e+09 / 0x4e8fffc1 (0 => OK) +32 SINGLE: 1.31009000000000000000e+05 / 0x47ffe080 (0 => OK) 33 DOUBLE: 2.14748364700000000000e+09 / 0x0041dfffffffc00000 (0 => OK) -33 SINGLE: 1.32540006400000000000e+09 / 0x4e9e0000 (0x10 => INEXACT ) +33 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x10 => INEXACT ) 34 DOUBLE: 3.40282346638528859812e+38 / 0x0047efffffe0000000 (0 => OK) -34 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x10 => INEXACT ) +34 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) 35 DOUBLE: 3.40282346638528859812e+38 / 0x0047efffffe0000000 (0 => OK) -35 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x10 => INEXACT ) +35 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) 36 DOUBLE: 1.79769313486231570815e+308 / 0x007fefffffffffffff (0 => OK) -36 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x14 => OVERFLOW INEXACT ) +36 SINGLE: inf / 0x7f800000 (0x14 => OVERFLOW INEXACT ) 37 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) -37 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0 => OK) +37 SINGLE: inf / 0x7f800000 (0 => OK) 38 DOUBLE: nan / 0x007ff8000000000000 (0 => OK) -38 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0 => OK) +38 SINGLE: nan / 0x7fc00000 (0 => OK) 39 DOUBLE: nan / 0x007ff0000000000001 (0 => OK) -39 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0x1 => INVALID) +39 SINGLE: nan / 0x7fc00000 (0x1 => INVALID) 40 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -40 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +40 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) Converting half-precision to single-precision 00 HALF: 0xffff (0 => OK) 00 SINGLE: -1.31008000000000000000e+05 / 0xc7ffe000 (0 => OK) @@ -2571,45 +2571,45 @@ Converting double-precision to half-precision 40 HALF: 0000 (0x1 => INVALID) Converting double-precision to single-precision 00 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -00 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +00 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) 01 DOUBLE: -nan / 0x00fff8000000000000 (0 => OK) -01 SINGLE: 4.29077299200000000000e+09 / 0x4f7fc000 (0 => OK) +01 SINGLE: -nan / 0xffc00000 (0 => OK) 02 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) -02 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0 => OK) +02 SINGLE: -inf / 0xff800000 (0 => OK) 03 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff (0 => OK) -03 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x14 => OVERFLOW INEXACT ) +03 SINGLE: -inf / 0xff800000 (0x14 => OVERFLOW INEXACT ) 04 DOUBLE: -3.40282346638528859812e+38 / 0x00c7efffffe0000000 (0 => OK) -04 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff (0x10 => INEXACT ) +04 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) 05 DOUBLE: -3.40282346638528859812e+38 / 0x00c7efffffe0000000 (0 => OK) -05 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff (0x10 => INEXACT ) +05 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) 06 DOUBLE: -1.11100000000000007530e+31 / 0x00c661874b135ff654 (0 => OK) -06 SINGLE: 4.07766476800000000000e+09 / 0x4f730c3a (0x10 => INEXACT ) +06 SINGLE: -1.11100004769645909791e+31 / 0xf30c3a59 (0x10 => INEXACT ) 07 DOUBLE: -1.11099999999999999085e+30 / 0x00c62c0bab523323b9 (0 => OK) -07 SINGLE: 4.04962432000000000000e+09 / 0x4f71605d (0x10 => INEXACT ) +07 SINGLE: -1.11100003258488635273e+30 / 0xf1605d5b (0x10 => INEXACT ) 08 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) -08 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +08 SINGLE: -2.00000000000000000000e+00 / 0xc0000000 (0 => OK) 09 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) -09 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +09 SINGLE: -1.00000000000000000000e+00 / 0xbf800000 (0 => OK) 10 DOUBLE: -2.22507385850720138310e-308 / 0x008010000000000000 (0 => OK) -10 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: -1.40129846432481707093e-45 / 0x80000001 (0x18 => UNDERFLOW INEXACT ) 11 DOUBLE: -1.17549435082228750797e-38 / 0x00b810000000000000 (0 => OK) -11 SINGLE: 2.15587225600000000000e+09 / 0x4f008000 (0 => OK) +11 SINGLE: -1.17549435082228750797e-38 / 0x80800000 (0 => OK) 12 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) 12 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) 13 DOUBLE: 1.17549435082228750796e-38 / 0x003810000000000000 (0 => OK) -13 SINGLE: 8.38860800000000000000e+06 / 0x4b000000 (0 => OK) +13 SINGLE: 1.17549435082228750796e-38 / 0x00800000 (0 => OK) 14 DOUBLE: 2.98023224000000013060e-08 / 0x003e600000001c5f68 (0 => OK) -14 SINGLE: 8.55638016000000000000e+08 / 0x4e4c0000 (0x10 => INEXACT ) +14 SINGLE: 2.98023223876953125000e-08 / 0x33000000 (0x10 => INEXACT ) 15 DOUBLE: 5.96046000000000015661e-08 / 0x003e6ffffe6cb2fa82 (0 => OK) -15 SINGLE: 8.64026560000000000000e+08 / 0x4e4dffff (0x10 => INEXACT ) +15 SINGLE: 5.96045985901128005934e-08 / 0x337ffff3 (0x10 => INEXACT ) 16 DOUBLE: 6.09755999999999994298e-05 / 0x003f0ff801a9af58a1 (0 => OK) -16 SINGLE: 9.47896320000000000000e+08 / 0x4e61ff00 (0x10 => INEXACT ) +16 SINGLE: 6.09755988989491015672e-05 / 0x387fc00d (0x10 => INEXACT ) 17 DOUBLE: 6.10352000000000013664e-05 / 0x003f100000c06a1ef5 (0 => OK) -17 SINGLE: 9.47912704000000000000e+08 / 0x4e620000 (0x10 => INEXACT ) +17 SINGLE: 6.10351999057456851005e-05 / 0x38800006 (0x10 => INEXACT ) 18 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -18 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +18 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 19 DOUBLE: 1.00097656250000000000e+00 / 0x003ff0040000000000 (0 => OK) -19 SINGLE: 1.06536140800000000000e+09 / 0x4e7e0080 (0 => OK) +19 SINGLE: 1.00097656250000000000e+00 / 0x3f802000 (0 => OK) 20 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) 20 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 21 DOUBLE: 1.37899728486072282843e-308 / 0x000009ea82a2287680 (0 => OK) @@ -2617,41 +2617,41 @@ Converting double-precision to single-precision 22 DOUBLE: 1.49147387366816238763e-308 / 0x00000ab98fba843210 (0 => OK) 22 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 23 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -23 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +23 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 24 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) -24 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +24 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) 25 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769 (0 => OK) -25 SINGLE: 1.07675443200000000000e+09 / 0x4e805bf0 (0x10 => INEXACT ) +25 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0x10 => INEXACT ) 26 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18 (0 => OK) -26 SINGLE: 1.07852992000000000000e+09 / 0x4e80921f (0x10 => INEXACT ) +26 SINGLE: 3.14159250259399414062e+00 / 0x40490fda (0x10 => INEXACT ) 27 DOUBLE: 6.55030000000000000000e+04 / 0x0040effbe000000000 (0 => OK) -27 SINGLE: 1.19956249600000000000e+09 / 0x4e8effbe (0 => OK) +27 SINGLE: 6.55030000000000000000e+04 / 0x477fdf00 (0 => OK) 28 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) -28 SINGLE: 1.19956275200000000000e+09 / 0x4e8effc0 (0 => OK) +28 SINGLE: 6.55040000000000000000e+04 / 0x477fe000 (0 => OK) 29 DOUBLE: 6.55050000000000000000e+04 / 0x0040effc2000000000 (0 => OK) -29 SINGLE: 1.19956300800000000000e+09 / 0x4e8effc2 (0 => OK) +29 SINGLE: 6.55050000000000000000e+04 / 0x477fe100 (0 => OK) 30 DOUBLE: 1.31007000000000000000e+05 / 0x0040fffbf000000000 (0 => OK) -30 SINGLE: 1.20795123200000000000e+09 / 0x4e8fffbf (0 => OK) +30 SINGLE: 1.31007000000000000000e+05 / 0x47ffdf80 (0 => OK) 31 DOUBLE: 1.31008000000000000000e+05 / 0x0040fffc0000000000 (0 => OK) -31 SINGLE: 1.20795136000000000000e+09 / 0x4e8fffc0 (0 => OK) +31 SINGLE: 1.31008000000000000000e+05 / 0x47ffe000 (0 => OK) 32 DOUBLE: 1.31009000000000000000e+05 / 0x0040fffc1000000000 (0 => OK) -32 SINGLE: 1.20795148800000000000e+09 / 0x4e8fffc1 (0 => OK) +32 SINGLE: 1.31009000000000000000e+05 / 0x47ffe080 (0 => OK) 33 DOUBLE: 2.14748364700000000000e+09 / 0x0041dfffffffc00000 (0 => OK) -33 SINGLE: 1.32539993600000000000e+09 / 0x4e9dffff (0x10 => INEXACT ) +33 SINGLE: 2.14748352000000000000e+09 / 0x4effffff (0x10 => INEXACT ) 34 DOUBLE: 3.40282346638528859811e+38 / 0x0047efffffe0000000 (0 => OK) -34 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x10 => INEXACT ) +34 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) 35 DOUBLE: 3.40282346638528859811e+38 / 0x0047efffffe0000000 (0 => OK) -35 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x10 => INEXACT ) +35 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) 36 DOUBLE: 1.79769313486231570814e+308 / 0x007fefffffffffffff (0 => OK) -36 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x14 => OVERFLOW INEXACT ) +36 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0x14 => OVERFLOW INEXACT ) 37 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) -37 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0 => OK) +37 SINGLE: inf / 0x7f800000 (0 => OK) 38 DOUBLE: nan / 0x007ff8000000000000 (0 => OK) -38 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0 => OK) +38 SINGLE: nan / 0x7fc00000 (0 => OK) 39 DOUBLE: nan / 0x007ff0000000000001 (0 => OK) -39 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0x1 => INVALID) +39 SINGLE: nan / 0x7fc00000 (0x1 => INVALID) 40 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -40 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +40 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) Converting half-precision to single-precision 00 HALF: 0xffff (0 => OK) 00 SINGLE: -1.31008000000000000000e+05 / 0xc7ffe000 (0 => OK) @@ -2934,45 +2934,45 @@ Converting double-precision to half-precision 40 HALF: 0000 (0x1 => INVALID) Converting double-precision to single-precision 00 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -00 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +00 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) 01 DOUBLE: -nan / 0x00fff8000000000000 (0 => OK) -01 SINGLE: 4.29077299200000000000e+09 / 0x4f7fc000 (0 => OK) +01 SINGLE: -nan / 0xffc00000 (0 => OK) 02 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) -02 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0 => OK) +02 SINGLE: -inf / 0xff800000 (0 => OK) 03 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff (0 => OK) -03 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff (0x14 => OVERFLOW INEXACT ) +03 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0x14 => OVERFLOW INEXACT ) 04 DOUBLE: -3.40282346638528859811e+38 / 0x00c7efffffe0000000 (0 => OK) -04 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff (0x10 => INEXACT ) +04 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) 05 DOUBLE: -3.40282346638528859811e+38 / 0x00c7efffffe0000000 (0 => OK) -05 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff (0x10 => INEXACT ) +05 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) 06 DOUBLE: -1.11100000000000007529e+31 / 0x00c661874b135ff654 (0 => OK) -06 SINGLE: 4.07766476800000000000e+09 / 0x4f730c3a (0x10 => INEXACT ) +06 SINGLE: -1.11099992680387713644e+31 / 0xf30c3a58 (0x10 => INEXACT ) 07 DOUBLE: -1.11099999999999999084e+30 / 0x00c62c0bab523323b9 (0 => OK) -07 SINGLE: 4.04962432000000000000e+09 / 0x4f71605d (0x10 => INEXACT ) +07 SINGLE: -1.11099995702702262681e+30 / 0xf1605d5a (0x10 => INEXACT ) 08 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) -08 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +08 SINGLE: -2.00000000000000000000e+00 / 0xc0000000 (0 => OK) 09 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) -09 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +09 SINGLE: -1.00000000000000000000e+00 / 0xbf800000 (0 => OK) 10 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) -10 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: -0.00000000000000000000e+00 / 0x80000000 (0x18 => UNDERFLOW INEXACT ) 11 DOUBLE: -1.17549435082228750796e-38 / 0x00b810000000000000 (0 => OK) -11 SINGLE: 2.15587225600000000000e+09 / 0x4f008000 (0 => OK) +11 SINGLE: -1.17549435082228750796e-38 / 0x80800000 (0 => OK) 12 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) 12 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) 13 DOUBLE: 1.17549435082228750796e-38 / 0x003810000000000000 (0 => OK) -13 SINGLE: 8.38860800000000000000e+06 / 0x4b000000 (0 => OK) +13 SINGLE: 1.17549435082228750796e-38 / 0x00800000 (0 => OK) 14 DOUBLE: 2.98023224000000013060e-08 / 0x003e600000001c5f68 (0 => OK) -14 SINGLE: 8.55638016000000000000e+08 / 0x4e4c0000 (0x10 => INEXACT ) +14 SINGLE: 2.98023223876953125000e-08 / 0x33000000 (0x10 => INEXACT ) 15 DOUBLE: 5.96046000000000015661e-08 / 0x003e6ffffe6cb2fa82 (0 => OK) -15 SINGLE: 8.64026560000000000000e+08 / 0x4e4dffff (0x10 => INEXACT ) +15 SINGLE: 5.96045985901128005934e-08 / 0x337ffff3 (0x10 => INEXACT ) 16 DOUBLE: 6.09755999999999994298e-05 / 0x003f0ff801a9af58a1 (0 => OK) -16 SINGLE: 9.47896320000000000000e+08 / 0x4e61ff00 (0x10 => INEXACT ) +16 SINGLE: 6.09755988989491015672e-05 / 0x387fc00d (0x10 => INEXACT ) 17 DOUBLE: 6.10352000000000013664e-05 / 0x003f100000c06a1ef5 (0 => OK) -17 SINGLE: 9.47912704000000000000e+08 / 0x4e620000 (0x10 => INEXACT ) +17 SINGLE: 6.10351999057456851005e-05 / 0x38800006 (0x10 => INEXACT ) 18 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -18 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +18 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 19 DOUBLE: 1.00097656250000000000e+00 / 0x003ff0040000000000 (0 => OK) -19 SINGLE: 1.06536140800000000000e+09 / 0x4e7e0080 (0 => OK) +19 SINGLE: 1.00097656250000000000e+00 / 0x3f802000 (0 => OK) 20 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) 20 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 21 DOUBLE: 1.37899728486072282843e-308 / 0x000009ea82a2287680 (0 => OK) @@ -2980,41 +2980,41 @@ Converting double-precision to single-precision 22 DOUBLE: 1.49147387366816238763e-308 / 0x00000ab98fba843210 (0 => OK) 22 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 23 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -23 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +23 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 24 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) -24 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +24 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) 25 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769 (0 => OK) -25 SINGLE: 1.07675443200000000000e+09 / 0x4e805bf0 (0x10 => INEXACT ) +25 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0x10 => INEXACT ) 26 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18 (0 => OK) -26 SINGLE: 1.07852992000000000000e+09 / 0x4e80921f (0x10 => INEXACT ) +26 SINGLE: 3.14159250259399414062e+00 / 0x40490fda (0x10 => INEXACT ) 27 DOUBLE: 6.55030000000000000000e+04 / 0x0040effbe000000000 (0 => OK) -27 SINGLE: 1.19956249600000000000e+09 / 0x4e8effbe (0 => OK) +27 SINGLE: 6.55030000000000000000e+04 / 0x477fdf00 (0 => OK) 28 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) -28 SINGLE: 1.19956275200000000000e+09 / 0x4e8effc0 (0 => OK) +28 SINGLE: 6.55040000000000000000e+04 / 0x477fe000 (0 => OK) 29 DOUBLE: 6.55050000000000000000e+04 / 0x0040effc2000000000 (0 => OK) -29 SINGLE: 1.19956300800000000000e+09 / 0x4e8effc2 (0 => OK) +29 SINGLE: 6.55050000000000000000e+04 / 0x477fe100 (0 => OK) 30 DOUBLE: 1.31007000000000000000e+05 / 0x0040fffbf000000000 (0 => OK) -30 SINGLE: 1.20795123200000000000e+09 / 0x4e8fffbf (0 => OK) +30 SINGLE: 1.31007000000000000000e+05 / 0x47ffdf80 (0 => OK) 31 DOUBLE: 1.31008000000000000000e+05 / 0x0040fffc0000000000 (0 => OK) -31 SINGLE: 1.20795136000000000000e+09 / 0x4e8fffc0 (0 => OK) +31 SINGLE: 1.31008000000000000000e+05 / 0x47ffe000 (0 => OK) 32 DOUBLE: 1.31009000000000000000e+05 / 0x0040fffc1000000000 (0 => OK) -32 SINGLE: 1.20795148800000000000e+09 / 0x4e8fffc1 (0 => OK) +32 SINGLE: 1.31009000000000000000e+05 / 0x47ffe080 (0 => OK) 33 DOUBLE: 2.14748364700000000000e+09 / 0x0041dfffffffc00000 (0 => OK) -33 SINGLE: 1.32539993600000000000e+09 / 0x4e9dffff (0x10 => INEXACT ) +33 SINGLE: 2.14748352000000000000e+09 / 0x4effffff (0x10 => INEXACT ) 34 DOUBLE: 3.40282346638528859811e+38 / 0x0047efffffe0000000 (0 => OK) -34 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x10 => INEXACT ) +34 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) 35 DOUBLE: 3.40282346638528859811e+38 / 0x0047efffffe0000000 (0 => OK) -35 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x10 => INEXACT ) +35 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) 36 DOUBLE: 1.79769313486231570814e+308 / 0x007fefffffffffffff (0 => OK) -36 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x14 => OVERFLOW INEXACT ) +36 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0x14 => OVERFLOW INEXACT ) 37 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) -37 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0 => OK) +37 SINGLE: inf / 0x7f800000 (0 => OK) 38 DOUBLE: nan / 0x007ff8000000000000 (0 => OK) -38 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0 => OK) +38 SINGLE: nan / 0x7fc00000 (0 => OK) 39 DOUBLE: nan / 0x007ff0000000000001 (0 => OK) -39 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0x1 => INVALID) +39 SINGLE: nan / 0x7fc00000 (0x1 => INVALID) 40 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -40 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +40 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) Converting half-precision to single-precision 00 HALF: 0xffff (0 => OK) 00 SINGLE: -1.31008000000000000000e+05 / 0xc7ffe000 (0 => OK) diff --git a/tests/tcg/arm/fcvt.ref b/tests/tcg/arm/fcvt.ref index f052b6d7e5..8e007c3345 100644 --- a/tests/tcg/arm/fcvt.ref +++ b/tests/tcg/arm/fcvt.ref @@ -211,45 +211,45 @@ Converting double-precision to half-precision 40 HALF: 0000 (0x1 => INVALID) Converting double-precision to single-precision 00 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -00 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +00 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) 01 DOUBLE: -nan / 0x00fff8000000000000 (0 => OK) -01 SINGLE: 4.29077299200000000000e+09 / 0x4f7fc000 (0 => OK) +01 SINGLE: -nan / 0xffc00000 (0 => OK) 02 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) -02 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0 => OK) +02 SINGLE: -inf / 0xff800000 (0 => OK) 03 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff (0 => OK) -03 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x14 => OVERFLOW INEXACT ) +03 SINGLE: -inf / 0xff800000 (0x14 => OVERFLOW INEXACT ) 04 DOUBLE: -3.40282346638528859812e+38 / 0x00c7efffffe0000000 (0 => OK) -04 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x10 => INEXACT ) +04 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) 05 DOUBLE: -3.40282346638528859812e+38 / 0x00c7efffffe0000000 (0 => OK) -05 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x10 => INEXACT ) +05 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) 06 DOUBLE: -1.11100000000000007529e+31 / 0x00c661874b135ff654 (0 => OK) -06 SINGLE: 4.07766476800000000000e+09 / 0x4f730c3a (0x10 => INEXACT ) +06 SINGLE: -1.11100004769645909791e+31 / 0xf30c3a59 (0x10 => INEXACT ) 07 DOUBLE: -1.11099999999999999085e+30 / 0x00c62c0bab523323b9 (0 => OK) -07 SINGLE: 4.04962432000000000000e+09 / 0x4f71605d (0x10 => INEXACT ) +07 SINGLE: -1.11100003258488635273e+30 / 0xf1605d5b (0x10 => INEXACT ) 08 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) -08 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +08 SINGLE: -2.00000000000000000000e+00 / 0xc0000000 (0 => OK) 09 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) -09 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +09 SINGLE: -1.00000000000000000000e+00 / 0xbf800000 (0 => OK) 10 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) -10 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: -0.00000000000000000000e+00 / 0x80000000 (0x18 => UNDERFLOW INEXACT ) 11 DOUBLE: -1.17549435082228750797e-38 / 0x00b810000000000000 (0 => OK) -11 SINGLE: 2.15587225600000000000e+09 / 0x4f008000 (0 => OK) +11 SINGLE: -1.17549435082228750797e-38 / 0x80800000 (0 => OK) 12 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) 12 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) 13 DOUBLE: 1.17549435082228750797e-38 / 0x003810000000000000 (0 => OK) -13 SINGLE: 8.38860800000000000000e+06 / 0x4b000000 (0 => OK) +13 SINGLE: 1.17549435082228750797e-38 / 0x00800000 (0 => OK) 14 DOUBLE: 2.98023224000000013061e-08 / 0x003e600000001c5f68 (0 => OK) -14 SINGLE: 8.55638016000000000000e+08 / 0x4e4c0000 (0x10 => INEXACT ) +14 SINGLE: 2.98023223876953125000e-08 / 0x33000000 (0x10 => INEXACT ) 15 DOUBLE: 5.96046000000000015661e-08 / 0x003e6ffffe6cb2fa82 (0 => OK) -15 SINGLE: 8.64026624000000000000e+08 / 0x4e4e0000 (0x10 => INEXACT ) +15 SINGLE: 5.96045985901128005935e-08 / 0x337ffff3 (0x10 => INEXACT ) 16 DOUBLE: 6.09755999999999994299e-05 / 0x003f0ff801a9af58a1 (0 => OK) -16 SINGLE: 9.47896320000000000000e+08 / 0x4e61ff00 (0x10 => INEXACT ) +16 SINGLE: 6.09755988989491015673e-05 / 0x387fc00d (0x10 => INEXACT ) 17 DOUBLE: 6.10352000000000013665e-05 / 0x003f100000c06a1ef5 (0 => OK) -17 SINGLE: 9.47912704000000000000e+08 / 0x4e620000 (0x10 => INEXACT ) +17 SINGLE: 6.10351999057456851006e-05 / 0x38800006 (0x10 => INEXACT ) 18 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -18 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +18 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 19 DOUBLE: 1.00097656250000000000e+00 / 0x003ff0040000000000 (0 => OK) -19 SINGLE: 1.06536140800000000000e+09 / 0x4e7e0080 (0 => OK) +19 SINGLE: 1.00097656250000000000e+00 / 0x3f802000 (0 => OK) 20 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) 20 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 21 DOUBLE: 1.37899728486072282843e-308 / 0x000009ea82a2287680 (0 => OK) @@ -257,41 +257,41 @@ Converting double-precision to single-precision 22 DOUBLE: 1.49147387366816238763e-308 / 0x00000ab98fba843210 (0 => OK) 22 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 23 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -23 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +23 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 24 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) -24 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +24 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) 25 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769 (0 => OK) -25 SINGLE: 1.07675456000000000000e+09 / 0x4e805bf1 (0x10 => INEXACT ) +25 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0x10 => INEXACT ) 26 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18 (0 => OK) -26 SINGLE: 1.07853004800000000000e+09 / 0x4e809220 (0x10 => INEXACT ) +26 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb (0x10 => INEXACT ) 27 DOUBLE: 6.55030000000000000000e+04 / 0x0040effbe000000000 (0 => OK) -27 SINGLE: 1.19956249600000000000e+09 / 0x4e8effbe (0 => OK) +27 SINGLE: 6.55030000000000000000e+04 / 0x477fdf00 (0 => OK) 28 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) -28 SINGLE: 1.19956275200000000000e+09 / 0x4e8effc0 (0 => OK) +28 SINGLE: 6.55040000000000000000e+04 / 0x477fe000 (0 => OK) 29 DOUBLE: 6.55050000000000000000e+04 / 0x0040effc2000000000 (0 => OK) -29 SINGLE: 1.19956300800000000000e+09 / 0x4e8effc2 (0 => OK) +29 SINGLE: 6.55050000000000000000e+04 / 0x477fe100 (0 => OK) 30 DOUBLE: 1.31007000000000000000e+05 / 0x0040fffbf000000000 (0 => OK) -30 SINGLE: 1.20795123200000000000e+09 / 0x4e8fffbf (0 => OK) +30 SINGLE: 1.31007000000000000000e+05 / 0x47ffdf80 (0 => OK) 31 DOUBLE: 1.31008000000000000000e+05 / 0x0040fffc0000000000 (0 => OK) -31 SINGLE: 1.20795136000000000000e+09 / 0x4e8fffc0 (0 => OK) +31 SINGLE: 1.31008000000000000000e+05 / 0x47ffe000 (0 => OK) 32 DOUBLE: 1.31009000000000000000e+05 / 0x0040fffc1000000000 (0 => OK) -32 SINGLE: 1.20795148800000000000e+09 / 0x4e8fffc1 (0 => OK) +32 SINGLE: 1.31009000000000000000e+05 / 0x47ffe080 (0 => OK) 33 DOUBLE: 2.14748364700000000000e+09 / 0x0041dfffffffc00000 (0 => OK) -33 SINGLE: 1.32540006400000000000e+09 / 0x4e9e0000 (0x10 => INEXACT ) +33 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x10 => INEXACT ) 34 DOUBLE: 3.40282346638528859812e+38 / 0x0047efffffe0000000 (0 => OK) -34 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x10 => INEXACT ) +34 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) 35 DOUBLE: 3.40282346638528859812e+38 / 0x0047efffffe0000000 (0 => OK) -35 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x10 => INEXACT ) +35 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) 36 DOUBLE: 1.79769313486231570815e+308 / 0x007fefffffffffffff (0 => OK) -36 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x14 => OVERFLOW INEXACT ) +36 SINGLE: inf / 0x7f800000 (0x14 => OVERFLOW INEXACT ) 37 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) -37 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0 => OK) +37 SINGLE: inf / 0x7f800000 (0 => OK) 38 DOUBLE: nan / 0x007ff8000000000000 (0 => OK) -38 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0 => OK) +38 SINGLE: nan / 0x7fc00000 (0 => OK) 39 DOUBLE: nan / 0x007ff0000000000001 (0 => OK) -39 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0x1 => INVALID) +39 SINGLE: nan / 0x7fc00000 (0x1 => INVALID) 40 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -40 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +40 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) Converting half-precision to single-precision 00 HALF: 0xffff (0 => OK) 00 SINGLE: -nan / 0xffffe000 (0 => OK) @@ -574,87 +574,87 @@ Converting double-precision to half-precision 40 HALF: 0000 (0x1 => INVALID) Converting double-precision to single-precision 00 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -00 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +00 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) 01 DOUBLE: -nan / 0x00fff8000000000000 (0 => OK) -01 SINGLE: 4.29077299200000000000e+09 / 0x4f7fc000 (0 => OK) +01 SINGLE: -nan / 0xffc00000 (0 => OK) 02 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) -02 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0 => OK) +02 SINGLE: -inf / 0xff800000 (0 => OK) 03 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff (0 => OK) -03 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x14 => OVERFLOW INEXACT ) +03 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0x14 => OVERFLOW INEXACT ) 04 DOUBLE: -3.40282346638528859811e+38 / 0x00c7efffffe0000000 (0 => OK) -04 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x10 => INEXACT ) +04 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) 05 DOUBLE: -3.40282346638528859811e+38 / 0x00c7efffffe0000000 (0 => OK) -05 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x10 => INEXACT ) +05 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) 06 DOUBLE: -1.11100000000000007529e+31 / 0x00c661874b135ff654 (0 => OK) -06 SINGLE: 4.07766502400000000000e+09 / 0x4f730c3b (0x10 => INEXACT ) +06 SINGLE: -1.11099992680387713644e+31 / 0xf30c3a58 (0x10 => INEXACT ) 07 DOUBLE: -1.11099999999999999084e+30 / 0x00c62c0bab523323b9 (0 => OK) -07 SINGLE: 4.04962457600000000000e+09 / 0x4f71605e (0x10 => INEXACT ) +07 SINGLE: -1.11099995702702262681e+30 / 0xf1605d5a (0x10 => INEXACT ) 08 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) -08 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +08 SINGLE: -2.00000000000000000000e+00 / 0xc0000000 (0 => OK) 09 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) -09 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +09 SINGLE: -1.00000000000000000000e+00 / 0xbf800000 (0 => OK) 10 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) -10 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: -0.00000000000000000000e+00 / 0x80000000 (0x18 => UNDERFLOW INEXACT ) 11 DOUBLE: -1.17549435082228750796e-38 / 0x00b810000000000000 (0 => OK) -11 SINGLE: 2.15587225600000000000e+09 / 0x4f008000 (0 => OK) +11 SINGLE: -1.17549435082228750796e-38 / 0x80800000 (0 => OK) 12 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) 12 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) 13 DOUBLE: 1.17549435082228750797e-38 / 0x003810000000000000 (0 => OK) -13 SINGLE: 8.38860800000000000000e+06 / 0x4b000000 (0 => OK) +13 SINGLE: 1.17549435082228750797e-38 / 0x00800000 (0 => OK) 14 DOUBLE: 2.98023224000000013061e-08 / 0x003e600000001c5f68 (0 => OK) -14 SINGLE: 8.55638080000000000000e+08 / 0x4e4c0001 (0x10 => INEXACT ) +14 SINGLE: 2.98023259404089913006e-08 / 0x33000001 (0x10 => INEXACT ) 15 DOUBLE: 5.96046000000000015662e-08 / 0x003e6ffffe6cb2fa82 (0 => OK) -15 SINGLE: 8.64026624000000000000e+08 / 0x4e4e0000 (0x10 => INEXACT ) +15 SINGLE: 5.96046021428264793940e-08 / 0x337ffff4 (0x10 => INEXACT ) 16 DOUBLE: 6.09755999999999994299e-05 / 0x003f0ff801a9af58a1 (0 => OK) -16 SINGLE: 9.47896384000000000000e+08 / 0x4e61ff01 (0x10 => INEXACT ) +16 SINGLE: 6.09756025369279086590e-05 / 0x387fc00e (0x10 => INEXACT ) 17 DOUBLE: 6.10352000000000013665e-05 / 0x003f100000c06a1ef5 (0 => OK) -17 SINGLE: 9.47912768000000000000e+08 / 0x4e620001 (0x10 => INEXACT ) +17 SINGLE: 6.10352071817032992840e-05 / 0x38800007 (0x10 => INEXACT ) 18 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -18 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +18 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 19 DOUBLE: 1.00097656250000000000e+00 / 0x003ff0040000000000 (0 => OK) -19 SINGLE: 1.06536140800000000000e+09 / 0x4e7e0080 (0 => OK) +19 SINGLE: 1.00097656250000000000e+00 / 0x3f802000 (0 => OK) 20 DOUBLE: 2.22507385850720138310e-308 / 0x000010000000000000 (0 => OK) -20 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0x18 => UNDERFLOW INEXACT ) +20 SINGLE: 1.40129846432481707093e-45 / 0x00000001 (0x18 => UNDERFLOW INEXACT ) 21 DOUBLE: 1.37899728486072282844e-308 / 0x000009ea82a2287680 (0 => OK) -21 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0x18 => UNDERFLOW INEXACT ) +21 SINGLE: 1.40129846432481707093e-45 / 0x00000001 (0x18 => UNDERFLOW INEXACT ) 22 DOUBLE: 1.49147387366816238764e-308 / 0x00000ab98fba843210 (0 => OK) -22 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0x18 => UNDERFLOW INEXACT ) +22 SINGLE: 1.40129846432481707093e-45 / 0x00000001 (0x18 => UNDERFLOW INEXACT ) 23 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -23 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +23 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 24 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) -24 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +24 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) 25 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769 (0 => OK) -25 SINGLE: 1.07675456000000000000e+09 / 0x4e805bf1 (0x10 => INEXACT ) +25 SINGLE: 2.71828198432922363282e+00 / 0x402df855 (0x10 => INEXACT ) 26 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18 (0 => OK) -26 SINGLE: 1.07853004800000000000e+09 / 0x4e809220 (0x10 => INEXACT ) +26 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb (0x10 => INEXACT ) 27 DOUBLE: 6.55030000000000000000e+04 / 0x0040effbe000000000 (0 => OK) -27 SINGLE: 1.19956249600000000000e+09 / 0x4e8effbe (0 => OK) +27 SINGLE: 6.55030000000000000000e+04 / 0x477fdf00 (0 => OK) 28 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) -28 SINGLE: 1.19956275200000000000e+09 / 0x4e8effc0 (0 => OK) +28 SINGLE: 6.55040000000000000000e+04 / 0x477fe000 (0 => OK) 29 DOUBLE: 6.55050000000000000000e+04 / 0x0040effc2000000000 (0 => OK) -29 SINGLE: 1.19956300800000000000e+09 / 0x4e8effc2 (0 => OK) +29 SINGLE: 6.55050000000000000000e+04 / 0x477fe100 (0 => OK) 30 DOUBLE: 1.31007000000000000000e+05 / 0x0040fffbf000000000 (0 => OK) -30 SINGLE: 1.20795123200000000000e+09 / 0x4e8fffbf (0 => OK) +30 SINGLE: 1.31007000000000000000e+05 / 0x47ffdf80 (0 => OK) 31 DOUBLE: 1.31008000000000000000e+05 / 0x0040fffc0000000000 (0 => OK) -31 SINGLE: 1.20795136000000000000e+09 / 0x4e8fffc0 (0 => OK) +31 SINGLE: 1.31008000000000000000e+05 / 0x47ffe000 (0 => OK) 32 DOUBLE: 1.31009000000000000000e+05 / 0x0040fffc1000000000 (0 => OK) -32 SINGLE: 1.20795148800000000000e+09 / 0x4e8fffc1 (0 => OK) +32 SINGLE: 1.31009000000000000000e+05 / 0x47ffe080 (0 => OK) 33 DOUBLE: 2.14748364700000000000e+09 / 0x0041dfffffffc00000 (0 => OK) -33 SINGLE: 1.32540006400000000000e+09 / 0x4e9e0000 (0x10 => INEXACT ) +33 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x10 => INEXACT ) 34 DOUBLE: 3.40282346638528859812e+38 / 0x0047efffffe0000000 (0 => OK) -34 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x10 => INEXACT ) +34 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) 35 DOUBLE: 3.40282346638528859812e+38 / 0x0047efffffe0000000 (0 => OK) -35 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x10 => INEXACT ) +35 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) 36 DOUBLE: 1.79769313486231570815e+308 / 0x007fefffffffffffff (0 => OK) -36 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x14 => OVERFLOW INEXACT ) +36 SINGLE: inf / 0x7f800000 (0x14 => OVERFLOW INEXACT ) 37 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) -37 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0 => OK) +37 SINGLE: inf / 0x7f800000 (0 => OK) 38 DOUBLE: nan / 0x007ff8000000000000 (0 => OK) -38 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0 => OK) +38 SINGLE: nan / 0x7fc00000 (0 => OK) 39 DOUBLE: nan / 0x007ff0000000000001 (0 => OK) -39 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0x1 => INVALID) +39 SINGLE: nan / 0x7fc00000 (0x1 => INVALID) 40 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -40 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +40 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) Converting half-precision to single-precision 00 HALF: 0xffff (0 => OK) 00 SINGLE: -nan / 0xffffe000 (0 => OK) @@ -937,45 +937,45 @@ Converting double-precision to half-precision 40 HALF: 0000 (0x1 => INVALID) Converting double-precision to single-precision 00 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -00 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +00 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) 01 DOUBLE: -nan / 0x00fff8000000000000 (0 => OK) -01 SINGLE: 4.29077299200000000000e+09 / 0x4f7fc000 (0 => OK) +01 SINGLE: -nan / 0xffc00000 (0 => OK) 02 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) -02 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0 => OK) +02 SINGLE: -inf / 0xff800000 (0 => OK) 03 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff (0 => OK) -03 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x14 => OVERFLOW INEXACT ) +03 SINGLE: -inf / 0xff800000 (0x14 => OVERFLOW INEXACT ) 04 DOUBLE: -3.40282346638528859812e+38 / 0x00c7efffffe0000000 (0 => OK) -04 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff (0x10 => INEXACT ) +04 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) 05 DOUBLE: -3.40282346638528859812e+38 / 0x00c7efffffe0000000 (0 => OK) -05 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff (0x10 => INEXACT ) +05 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) 06 DOUBLE: -1.11100000000000007530e+31 / 0x00c661874b135ff654 (0 => OK) -06 SINGLE: 4.07766476800000000000e+09 / 0x4f730c3a (0x10 => INEXACT ) +06 SINGLE: -1.11100004769645909791e+31 / 0xf30c3a59 (0x10 => INEXACT ) 07 DOUBLE: -1.11099999999999999085e+30 / 0x00c62c0bab523323b9 (0 => OK) -07 SINGLE: 4.04962432000000000000e+09 / 0x4f71605d (0x10 => INEXACT ) +07 SINGLE: -1.11100003258488635273e+30 / 0xf1605d5b (0x10 => INEXACT ) 08 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) -08 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +08 SINGLE: -2.00000000000000000000e+00 / 0xc0000000 (0 => OK) 09 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) -09 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +09 SINGLE: -1.00000000000000000000e+00 / 0xbf800000 (0 => OK) 10 DOUBLE: -2.22507385850720138310e-308 / 0x008010000000000000 (0 => OK) -10 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: -1.40129846432481707093e-45 / 0x80000001 (0x18 => UNDERFLOW INEXACT ) 11 DOUBLE: -1.17549435082228750797e-38 / 0x00b810000000000000 (0 => OK) -11 SINGLE: 2.15587225600000000000e+09 / 0x4f008000 (0 => OK) +11 SINGLE: -1.17549435082228750797e-38 / 0x80800000 (0 => OK) 12 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) 12 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) 13 DOUBLE: 1.17549435082228750796e-38 / 0x003810000000000000 (0 => OK) -13 SINGLE: 8.38860800000000000000e+06 / 0x4b000000 (0 => OK) +13 SINGLE: 1.17549435082228750796e-38 / 0x00800000 (0 => OK) 14 DOUBLE: 2.98023224000000013060e-08 / 0x003e600000001c5f68 (0 => OK) -14 SINGLE: 8.55638016000000000000e+08 / 0x4e4c0000 (0x10 => INEXACT ) +14 SINGLE: 2.98023223876953125000e-08 / 0x33000000 (0x10 => INEXACT ) 15 DOUBLE: 5.96046000000000015661e-08 / 0x003e6ffffe6cb2fa82 (0 => OK) -15 SINGLE: 8.64026560000000000000e+08 / 0x4e4dffff (0x10 => INEXACT ) +15 SINGLE: 5.96045985901128005934e-08 / 0x337ffff3 (0x10 => INEXACT ) 16 DOUBLE: 6.09755999999999994298e-05 / 0x003f0ff801a9af58a1 (0 => OK) -16 SINGLE: 9.47896320000000000000e+08 / 0x4e61ff00 (0x10 => INEXACT ) +16 SINGLE: 6.09755988989491015672e-05 / 0x387fc00d (0x10 => INEXACT ) 17 DOUBLE: 6.10352000000000013664e-05 / 0x003f100000c06a1ef5 (0 => OK) -17 SINGLE: 9.47912704000000000000e+08 / 0x4e620000 (0x10 => INEXACT ) +17 SINGLE: 6.10351999057456851005e-05 / 0x38800006 (0x10 => INEXACT ) 18 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -18 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +18 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 19 DOUBLE: 1.00097656250000000000e+00 / 0x003ff0040000000000 (0 => OK) -19 SINGLE: 1.06536140800000000000e+09 / 0x4e7e0080 (0 => OK) +19 SINGLE: 1.00097656250000000000e+00 / 0x3f802000 (0 => OK) 20 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) 20 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 21 DOUBLE: 1.37899728486072282843e-308 / 0x000009ea82a2287680 (0 => OK) @@ -983,41 +983,41 @@ Converting double-precision to single-precision 22 DOUBLE: 1.49147387366816238763e-308 / 0x00000ab98fba843210 (0 => OK) 22 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 23 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -23 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +23 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 24 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) -24 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +24 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) 25 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769 (0 => OK) -25 SINGLE: 1.07675443200000000000e+09 / 0x4e805bf0 (0x10 => INEXACT ) +25 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0x10 => INEXACT ) 26 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18 (0 => OK) -26 SINGLE: 1.07852992000000000000e+09 / 0x4e80921f (0x10 => INEXACT ) +26 SINGLE: 3.14159250259399414062e+00 / 0x40490fda (0x10 => INEXACT ) 27 DOUBLE: 6.55030000000000000000e+04 / 0x0040effbe000000000 (0 => OK) -27 SINGLE: 1.19956249600000000000e+09 / 0x4e8effbe (0 => OK) +27 SINGLE: 6.55030000000000000000e+04 / 0x477fdf00 (0 => OK) 28 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) -28 SINGLE: 1.19956275200000000000e+09 / 0x4e8effc0 (0 => OK) +28 SINGLE: 6.55040000000000000000e+04 / 0x477fe000 (0 => OK) 29 DOUBLE: 6.55050000000000000000e+04 / 0x0040effc2000000000 (0 => OK) -29 SINGLE: 1.19956300800000000000e+09 / 0x4e8effc2 (0 => OK) +29 SINGLE: 6.55050000000000000000e+04 / 0x477fe100 (0 => OK) 30 DOUBLE: 1.31007000000000000000e+05 / 0x0040fffbf000000000 (0 => OK) -30 SINGLE: 1.20795123200000000000e+09 / 0x4e8fffbf (0 => OK) +30 SINGLE: 1.31007000000000000000e+05 / 0x47ffdf80 (0 => OK) 31 DOUBLE: 1.31008000000000000000e+05 / 0x0040fffc0000000000 (0 => OK) -31 SINGLE: 1.20795136000000000000e+09 / 0x4e8fffc0 (0 => OK) +31 SINGLE: 1.31008000000000000000e+05 / 0x47ffe000 (0 => OK) 32 DOUBLE: 1.31009000000000000000e+05 / 0x0040fffc1000000000 (0 => OK) -32 SINGLE: 1.20795148800000000000e+09 / 0x4e8fffc1 (0 => OK) +32 SINGLE: 1.31009000000000000000e+05 / 0x47ffe080 (0 => OK) 33 DOUBLE: 2.14748364700000000000e+09 / 0x0041dfffffffc00000 (0 => OK) -33 SINGLE: 1.32539993600000000000e+09 / 0x4e9dffff (0x10 => INEXACT ) +33 SINGLE: 2.14748352000000000000e+09 / 0x4effffff (0x10 => INEXACT ) 34 DOUBLE: 3.40282346638528859811e+38 / 0x0047efffffe0000000 (0 => OK) -34 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x10 => INEXACT ) +34 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) 35 DOUBLE: 3.40282346638528859811e+38 / 0x0047efffffe0000000 (0 => OK) -35 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x10 => INEXACT ) +35 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) 36 DOUBLE: 1.79769313486231570814e+308 / 0x007fefffffffffffff (0 => OK) -36 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x14 => OVERFLOW INEXACT ) +36 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0x14 => OVERFLOW INEXACT ) 37 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) -37 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0 => OK) +37 SINGLE: inf / 0x7f800000 (0 => OK) 38 DOUBLE: nan / 0x007ff8000000000000 (0 => OK) -38 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0 => OK) +38 SINGLE: nan / 0x7fc00000 (0 => OK) 39 DOUBLE: nan / 0x007ff0000000000001 (0 => OK) -39 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0x1 => INVALID) +39 SINGLE: nan / 0x7fc00000 (0x1 => INVALID) 40 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -40 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +40 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) Converting half-precision to single-precision 00 HALF: 0xffff (0 => OK) 00 SINGLE: -nan / 0xffffe000 (0 => OK) @@ -1300,45 +1300,45 @@ Converting double-precision to half-precision 40 HALF: 0000 (0x1 => INVALID) Converting double-precision to single-precision 00 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -00 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +00 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) 01 DOUBLE: -nan / 0x00fff8000000000000 (0 => OK) -01 SINGLE: 4.29077299200000000000e+09 / 0x4f7fc000 (0 => OK) +01 SINGLE: -nan / 0xffc00000 (0 => OK) 02 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) -02 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0 => OK) +02 SINGLE: -inf / 0xff800000 (0 => OK) 03 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff (0 => OK) -03 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff (0x14 => OVERFLOW INEXACT ) +03 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0x14 => OVERFLOW INEXACT ) 04 DOUBLE: -3.40282346638528859811e+38 / 0x00c7efffffe0000000 (0 => OK) -04 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff (0x10 => INEXACT ) +04 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) 05 DOUBLE: -3.40282346638528859811e+38 / 0x00c7efffffe0000000 (0 => OK) -05 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff (0x10 => INEXACT ) +05 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) 06 DOUBLE: -1.11100000000000007529e+31 / 0x00c661874b135ff654 (0 => OK) -06 SINGLE: 4.07766476800000000000e+09 / 0x4f730c3a (0x10 => INEXACT ) +06 SINGLE: -1.11099992680387713644e+31 / 0xf30c3a58 (0x10 => INEXACT ) 07 DOUBLE: -1.11099999999999999084e+30 / 0x00c62c0bab523323b9 (0 => OK) -07 SINGLE: 4.04962432000000000000e+09 / 0x4f71605d (0x10 => INEXACT ) +07 SINGLE: -1.11099995702702262681e+30 / 0xf1605d5a (0x10 => INEXACT ) 08 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) -08 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +08 SINGLE: -2.00000000000000000000e+00 / 0xc0000000 (0 => OK) 09 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) -09 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +09 SINGLE: -1.00000000000000000000e+00 / 0xbf800000 (0 => OK) 10 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) -10 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: -0.00000000000000000000e+00 / 0x80000000 (0x18 => UNDERFLOW INEXACT ) 11 DOUBLE: -1.17549435082228750796e-38 / 0x00b810000000000000 (0 => OK) -11 SINGLE: 2.15587225600000000000e+09 / 0x4f008000 (0 => OK) +11 SINGLE: -1.17549435082228750796e-38 / 0x80800000 (0 => OK) 12 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) 12 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) 13 DOUBLE: 1.17549435082228750796e-38 / 0x003810000000000000 (0 => OK) -13 SINGLE: 8.38860800000000000000e+06 / 0x4b000000 (0 => OK) +13 SINGLE: 1.17549435082228750796e-38 / 0x00800000 (0 => OK) 14 DOUBLE: 2.98023224000000013060e-08 / 0x003e600000001c5f68 (0 => OK) -14 SINGLE: 8.55638016000000000000e+08 / 0x4e4c0000 (0x10 => INEXACT ) +14 SINGLE: 2.98023223876953125000e-08 / 0x33000000 (0x10 => INEXACT ) 15 DOUBLE: 5.96046000000000015661e-08 / 0x003e6ffffe6cb2fa82 (0 => OK) -15 SINGLE: 8.64026560000000000000e+08 / 0x4e4dffff (0x10 => INEXACT ) +15 SINGLE: 5.96045985901128005934e-08 / 0x337ffff3 (0x10 => INEXACT ) 16 DOUBLE: 6.09755999999999994298e-05 / 0x003f0ff801a9af58a1 (0 => OK) -16 SINGLE: 9.47896320000000000000e+08 / 0x4e61ff00 (0x10 => INEXACT ) +16 SINGLE: 6.09755988989491015672e-05 / 0x387fc00d (0x10 => INEXACT ) 17 DOUBLE: 6.10352000000000013664e-05 / 0x003f100000c06a1ef5 (0 => OK) -17 SINGLE: 9.47912704000000000000e+08 / 0x4e620000 (0x10 => INEXACT ) +17 SINGLE: 6.10351999057456851005e-05 / 0x38800006 (0x10 => INEXACT ) 18 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -18 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +18 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 19 DOUBLE: 1.00097656250000000000e+00 / 0x003ff0040000000000 (0 => OK) -19 SINGLE: 1.06536140800000000000e+09 / 0x4e7e0080 (0 => OK) +19 SINGLE: 1.00097656250000000000e+00 / 0x3f802000 (0 => OK) 20 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) 20 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 21 DOUBLE: 1.37899728486072282843e-308 / 0x000009ea82a2287680 (0 => OK) @@ -1346,41 +1346,41 @@ Converting double-precision to single-precision 22 DOUBLE: 1.49147387366816238763e-308 / 0x00000ab98fba843210 (0 => OK) 22 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 23 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -23 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +23 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 24 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) -24 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +24 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) 25 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769 (0 => OK) -25 SINGLE: 1.07675443200000000000e+09 / 0x4e805bf0 (0x10 => INEXACT ) +25 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0x10 => INEXACT ) 26 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18 (0 => OK) -26 SINGLE: 1.07852992000000000000e+09 / 0x4e80921f (0x10 => INEXACT ) +26 SINGLE: 3.14159250259399414062e+00 / 0x40490fda (0x10 => INEXACT ) 27 DOUBLE: 6.55030000000000000000e+04 / 0x0040effbe000000000 (0 => OK) -27 SINGLE: 1.19956249600000000000e+09 / 0x4e8effbe (0 => OK) +27 SINGLE: 6.55030000000000000000e+04 / 0x477fdf00 (0 => OK) 28 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) -28 SINGLE: 1.19956275200000000000e+09 / 0x4e8effc0 (0 => OK) +28 SINGLE: 6.55040000000000000000e+04 / 0x477fe000 (0 => OK) 29 DOUBLE: 6.55050000000000000000e+04 / 0x0040effc2000000000 (0 => OK) -29 SINGLE: 1.19956300800000000000e+09 / 0x4e8effc2 (0 => OK) +29 SINGLE: 6.55050000000000000000e+04 / 0x477fe100 (0 => OK) 30 DOUBLE: 1.31007000000000000000e+05 / 0x0040fffbf000000000 (0 => OK) -30 SINGLE: 1.20795123200000000000e+09 / 0x4e8fffbf (0 => OK) +30 SINGLE: 1.31007000000000000000e+05 / 0x47ffdf80 (0 => OK) 31 DOUBLE: 1.31008000000000000000e+05 / 0x0040fffc0000000000 (0 => OK) -31 SINGLE: 1.20795136000000000000e+09 / 0x4e8fffc0 (0 => OK) +31 SINGLE: 1.31008000000000000000e+05 / 0x47ffe000 (0 => OK) 32 DOUBLE: 1.31009000000000000000e+05 / 0x0040fffc1000000000 (0 => OK) -32 SINGLE: 1.20795148800000000000e+09 / 0x4e8fffc1 (0 => OK) +32 SINGLE: 1.31009000000000000000e+05 / 0x47ffe080 (0 => OK) 33 DOUBLE: 2.14748364700000000000e+09 / 0x0041dfffffffc00000 (0 => OK) -33 SINGLE: 1.32539993600000000000e+09 / 0x4e9dffff (0x10 => INEXACT ) +33 SINGLE: 2.14748352000000000000e+09 / 0x4effffff (0x10 => INEXACT ) 34 DOUBLE: 3.40282346638528859811e+38 / 0x0047efffffe0000000 (0 => OK) -34 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x10 => INEXACT ) +34 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) 35 DOUBLE: 3.40282346638528859811e+38 / 0x0047efffffe0000000 (0 => OK) -35 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x10 => INEXACT ) +35 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) 36 DOUBLE: 1.79769313486231570814e+308 / 0x007fefffffffffffff (0 => OK) -36 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x14 => OVERFLOW INEXACT ) +36 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0x14 => OVERFLOW INEXACT ) 37 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) -37 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0 => OK) +37 SINGLE: inf / 0x7f800000 (0 => OK) 38 DOUBLE: nan / 0x007ff8000000000000 (0 => OK) -38 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0 => OK) +38 SINGLE: nan / 0x7fc00000 (0 => OK) 39 DOUBLE: nan / 0x007ff0000000000001 (0 => OK) -39 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0x1 => INVALID) +39 SINGLE: nan / 0x7fc00000 (0x1 => INVALID) 40 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -40 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +40 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) Converting half-precision to single-precision 00 HALF: 0xffff (0 => OK) 00 SINGLE: -nan / 0xffffe000 (0 => OK) @@ -1845,45 +1845,45 @@ Converting double-precision to half-precision 40 HALF: 0000 (0x1 => INVALID) Converting double-precision to single-precision 00 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -00 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +00 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) 01 DOUBLE: -nan / 0x00fff8000000000000 (0 => OK) -01 SINGLE: 4.29077299200000000000e+09 / 0x4f7fc000 (0 => OK) +01 SINGLE: -nan / 0xffc00000 (0 => OK) 02 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) -02 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0 => OK) +02 SINGLE: -inf / 0xff800000 (0 => OK) 03 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff (0 => OK) -03 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x14 => OVERFLOW INEXACT ) +03 SINGLE: -inf / 0xff800000 (0x14 => OVERFLOW INEXACT ) 04 DOUBLE: -3.40282346638528859812e+38 / 0x00c7efffffe0000000 (0 => OK) -04 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x10 => INEXACT ) +04 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) 05 DOUBLE: -3.40282346638528859812e+38 / 0x00c7efffffe0000000 (0 => OK) -05 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x10 => INEXACT ) +05 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) 06 DOUBLE: -1.11100000000000007529e+31 / 0x00c661874b135ff654 (0 => OK) -06 SINGLE: 4.07766476800000000000e+09 / 0x4f730c3a (0x10 => INEXACT ) +06 SINGLE: -1.11100004769645909791e+31 / 0xf30c3a59 (0x10 => INEXACT ) 07 DOUBLE: -1.11099999999999999085e+30 / 0x00c62c0bab523323b9 (0 => OK) -07 SINGLE: 4.04962432000000000000e+09 / 0x4f71605d (0x10 => INEXACT ) +07 SINGLE: -1.11100003258488635273e+30 / 0xf1605d5b (0x10 => INEXACT ) 08 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) -08 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +08 SINGLE: -2.00000000000000000000e+00 / 0xc0000000 (0 => OK) 09 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) -09 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +09 SINGLE: -1.00000000000000000000e+00 / 0xbf800000 (0 => OK) 10 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) -10 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: -0.00000000000000000000e+00 / 0x80000000 (0x18 => UNDERFLOW INEXACT ) 11 DOUBLE: -1.17549435082228750797e-38 / 0x00b810000000000000 (0 => OK) -11 SINGLE: 2.15587225600000000000e+09 / 0x4f008000 (0 => OK) +11 SINGLE: -1.17549435082228750797e-38 / 0x80800000 (0 => OK) 12 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) 12 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) 13 DOUBLE: 1.17549435082228750797e-38 / 0x003810000000000000 (0 => OK) -13 SINGLE: 8.38860800000000000000e+06 / 0x4b000000 (0 => OK) +13 SINGLE: 1.17549435082228750797e-38 / 0x00800000 (0 => OK) 14 DOUBLE: 2.98023224000000013061e-08 / 0x003e600000001c5f68 (0 => OK) -14 SINGLE: 8.55638016000000000000e+08 / 0x4e4c0000 (0x10 => INEXACT ) +14 SINGLE: 2.98023223876953125000e-08 / 0x33000000 (0x10 => INEXACT ) 15 DOUBLE: 5.96046000000000015661e-08 / 0x003e6ffffe6cb2fa82 (0 => OK) -15 SINGLE: 8.64026624000000000000e+08 / 0x4e4e0000 (0x10 => INEXACT ) +15 SINGLE: 5.96045985901128005935e-08 / 0x337ffff3 (0x10 => INEXACT ) 16 DOUBLE: 6.09755999999999994299e-05 / 0x003f0ff801a9af58a1 (0 => OK) -16 SINGLE: 9.47896320000000000000e+08 / 0x4e61ff00 (0x10 => INEXACT ) +16 SINGLE: 6.09755988989491015673e-05 / 0x387fc00d (0x10 => INEXACT ) 17 DOUBLE: 6.10352000000000013665e-05 / 0x003f100000c06a1ef5 (0 => OK) -17 SINGLE: 9.47912704000000000000e+08 / 0x4e620000 (0x10 => INEXACT ) +17 SINGLE: 6.10351999057456851006e-05 / 0x38800006 (0x10 => INEXACT ) 18 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -18 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +18 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 19 DOUBLE: 1.00097656250000000000e+00 / 0x003ff0040000000000 (0 => OK) -19 SINGLE: 1.06536140800000000000e+09 / 0x4e7e0080 (0 => OK) +19 SINGLE: 1.00097656250000000000e+00 / 0x3f802000 (0 => OK) 20 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) 20 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 21 DOUBLE: 1.37899728486072282843e-308 / 0x000009ea82a2287680 (0 => OK) @@ -1891,41 +1891,41 @@ Converting double-precision to single-precision 22 DOUBLE: 1.49147387366816238763e-308 / 0x00000ab98fba843210 (0 => OK) 22 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 23 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -23 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +23 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 24 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) -24 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +24 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) 25 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769 (0 => OK) -25 SINGLE: 1.07675456000000000000e+09 / 0x4e805bf1 (0x10 => INEXACT ) +25 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0x10 => INEXACT ) 26 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18 (0 => OK) -26 SINGLE: 1.07853004800000000000e+09 / 0x4e809220 (0x10 => INEXACT ) +26 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb (0x10 => INEXACT ) 27 DOUBLE: 6.55030000000000000000e+04 / 0x0040effbe000000000 (0 => OK) -27 SINGLE: 1.19956249600000000000e+09 / 0x4e8effbe (0 => OK) +27 SINGLE: 6.55030000000000000000e+04 / 0x477fdf00 (0 => OK) 28 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) -28 SINGLE: 1.19956275200000000000e+09 / 0x4e8effc0 (0 => OK) +28 SINGLE: 6.55040000000000000000e+04 / 0x477fe000 (0 => OK) 29 DOUBLE: 6.55050000000000000000e+04 / 0x0040effc2000000000 (0 => OK) -29 SINGLE: 1.19956300800000000000e+09 / 0x4e8effc2 (0 => OK) +29 SINGLE: 6.55050000000000000000e+04 / 0x477fe100 (0 => OK) 30 DOUBLE: 1.31007000000000000000e+05 / 0x0040fffbf000000000 (0 => OK) -30 SINGLE: 1.20795123200000000000e+09 / 0x4e8fffbf (0 => OK) +30 SINGLE: 1.31007000000000000000e+05 / 0x47ffdf80 (0 => OK) 31 DOUBLE: 1.31008000000000000000e+05 / 0x0040fffc0000000000 (0 => OK) -31 SINGLE: 1.20795136000000000000e+09 / 0x4e8fffc0 (0 => OK) +31 SINGLE: 1.31008000000000000000e+05 / 0x47ffe000 (0 => OK) 32 DOUBLE: 1.31009000000000000000e+05 / 0x0040fffc1000000000 (0 => OK) -32 SINGLE: 1.20795148800000000000e+09 / 0x4e8fffc1 (0 => OK) +32 SINGLE: 1.31009000000000000000e+05 / 0x47ffe080 (0 => OK) 33 DOUBLE: 2.14748364700000000000e+09 / 0x0041dfffffffc00000 (0 => OK) -33 SINGLE: 1.32540006400000000000e+09 / 0x4e9e0000 (0x10 => INEXACT ) +33 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x10 => INEXACT ) 34 DOUBLE: 3.40282346638528859812e+38 / 0x0047efffffe0000000 (0 => OK) -34 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x10 => INEXACT ) +34 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) 35 DOUBLE: 3.40282346638528859812e+38 / 0x0047efffffe0000000 (0 => OK) -35 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x10 => INEXACT ) +35 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) 36 DOUBLE: 1.79769313486231570815e+308 / 0x007fefffffffffffff (0 => OK) -36 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x14 => OVERFLOW INEXACT ) +36 SINGLE: inf / 0x7f800000 (0x14 => OVERFLOW INEXACT ) 37 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) -37 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0 => OK) +37 SINGLE: inf / 0x7f800000 (0 => OK) 38 DOUBLE: nan / 0x007ff8000000000000 (0 => OK) -38 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0 => OK) +38 SINGLE: nan / 0x7fc00000 (0 => OK) 39 DOUBLE: nan / 0x007ff0000000000001 (0 => OK) -39 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0x1 => INVALID) +39 SINGLE: nan / 0x7fc00000 (0x1 => INVALID) 40 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -40 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +40 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) Converting half-precision to single-precision 00 HALF: 0xffff (0 => OK) 00 SINGLE: -1.31008000000000000000e+05 / 0xc7ffe000 (0 => OK) @@ -2208,87 +2208,87 @@ Converting double-precision to half-precision 40 HALF: 0000 (0x1 => INVALID) Converting double-precision to single-precision 00 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -00 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +00 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) 01 DOUBLE: -nan / 0x00fff8000000000000 (0 => OK) -01 SINGLE: 4.29077299200000000000e+09 / 0x4f7fc000 (0 => OK) +01 SINGLE: -nan / 0xffc00000 (0 => OK) 02 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) -02 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0 => OK) +02 SINGLE: -inf / 0xff800000 (0 => OK) 03 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff (0 => OK) -03 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x14 => OVERFLOW INEXACT ) +03 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0x14 => OVERFLOW INEXACT ) 04 DOUBLE: -3.40282346638528859811e+38 / 0x00c7efffffe0000000 (0 => OK) -04 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x10 => INEXACT ) +04 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) 05 DOUBLE: -3.40282346638528859811e+38 / 0x00c7efffffe0000000 (0 => OK) -05 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x10 => INEXACT ) +05 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) 06 DOUBLE: -1.11100000000000007529e+31 / 0x00c661874b135ff654 (0 => OK) -06 SINGLE: 4.07766502400000000000e+09 / 0x4f730c3b (0x10 => INEXACT ) +06 SINGLE: -1.11099992680387713644e+31 / 0xf30c3a58 (0x10 => INEXACT ) 07 DOUBLE: -1.11099999999999999084e+30 / 0x00c62c0bab523323b9 (0 => OK) -07 SINGLE: 4.04962457600000000000e+09 / 0x4f71605e (0x10 => INEXACT ) +07 SINGLE: -1.11099995702702262681e+30 / 0xf1605d5a (0x10 => INEXACT ) 08 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) -08 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +08 SINGLE: -2.00000000000000000000e+00 / 0xc0000000 (0 => OK) 09 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) -09 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +09 SINGLE: -1.00000000000000000000e+00 / 0xbf800000 (0 => OK) 10 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) -10 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: -0.00000000000000000000e+00 / 0x80000000 (0x18 => UNDERFLOW INEXACT ) 11 DOUBLE: -1.17549435082228750796e-38 / 0x00b810000000000000 (0 => OK) -11 SINGLE: 2.15587225600000000000e+09 / 0x4f008000 (0 => OK) +11 SINGLE: -1.17549435082228750796e-38 / 0x80800000 (0 => OK) 12 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) 12 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) 13 DOUBLE: 1.17549435082228750797e-38 / 0x003810000000000000 (0 => OK) -13 SINGLE: 8.38860800000000000000e+06 / 0x4b000000 (0 => OK) +13 SINGLE: 1.17549435082228750797e-38 / 0x00800000 (0 => OK) 14 DOUBLE: 2.98023224000000013061e-08 / 0x003e600000001c5f68 (0 => OK) -14 SINGLE: 8.55638080000000000000e+08 / 0x4e4c0001 (0x10 => INEXACT ) +14 SINGLE: 2.98023259404089913006e-08 / 0x33000001 (0x10 => INEXACT ) 15 DOUBLE: 5.96046000000000015662e-08 / 0x003e6ffffe6cb2fa82 (0 => OK) -15 SINGLE: 8.64026624000000000000e+08 / 0x4e4e0000 (0x10 => INEXACT ) +15 SINGLE: 5.96046021428264793940e-08 / 0x337ffff4 (0x10 => INEXACT ) 16 DOUBLE: 6.09755999999999994299e-05 / 0x003f0ff801a9af58a1 (0 => OK) -16 SINGLE: 9.47896384000000000000e+08 / 0x4e61ff01 (0x10 => INEXACT ) +16 SINGLE: 6.09756025369279086590e-05 / 0x387fc00e (0x10 => INEXACT ) 17 DOUBLE: 6.10352000000000013665e-05 / 0x003f100000c06a1ef5 (0 => OK) -17 SINGLE: 9.47912768000000000000e+08 / 0x4e620001 (0x10 => INEXACT ) +17 SINGLE: 6.10352071817032992840e-05 / 0x38800007 (0x10 => INEXACT ) 18 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -18 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +18 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 19 DOUBLE: 1.00097656250000000000e+00 / 0x003ff0040000000000 (0 => OK) -19 SINGLE: 1.06536140800000000000e+09 / 0x4e7e0080 (0 => OK) +19 SINGLE: 1.00097656250000000000e+00 / 0x3f802000 (0 => OK) 20 DOUBLE: 2.22507385850720138310e-308 / 0x000010000000000000 (0 => OK) -20 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0x18 => UNDERFLOW INEXACT ) +20 SINGLE: 1.40129846432481707093e-45 / 0x00000001 (0x18 => UNDERFLOW INEXACT ) 21 DOUBLE: 1.37899728486072282844e-308 / 0x000009ea82a2287680 (0 => OK) -21 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0x18 => UNDERFLOW INEXACT ) +21 SINGLE: 1.40129846432481707093e-45 / 0x00000001 (0x18 => UNDERFLOW INEXACT ) 22 DOUBLE: 1.49147387366816238764e-308 / 0x00000ab98fba843210 (0 => OK) -22 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0x18 => UNDERFLOW INEXACT ) +22 SINGLE: 1.40129846432481707093e-45 / 0x00000001 (0x18 => UNDERFLOW INEXACT ) 23 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -23 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +23 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 24 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) -24 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +24 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) 25 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769 (0 => OK) -25 SINGLE: 1.07675456000000000000e+09 / 0x4e805bf1 (0x10 => INEXACT ) +25 SINGLE: 2.71828198432922363282e+00 / 0x402df855 (0x10 => INEXACT ) 26 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18 (0 => OK) -26 SINGLE: 1.07853004800000000000e+09 / 0x4e809220 (0x10 => INEXACT ) +26 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb (0x10 => INEXACT ) 27 DOUBLE: 6.55030000000000000000e+04 / 0x0040effbe000000000 (0 => OK) -27 SINGLE: 1.19956249600000000000e+09 / 0x4e8effbe (0 => OK) +27 SINGLE: 6.55030000000000000000e+04 / 0x477fdf00 (0 => OK) 28 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) -28 SINGLE: 1.19956275200000000000e+09 / 0x4e8effc0 (0 => OK) +28 SINGLE: 6.55040000000000000000e+04 / 0x477fe000 (0 => OK) 29 DOUBLE: 6.55050000000000000000e+04 / 0x0040effc2000000000 (0 => OK) -29 SINGLE: 1.19956300800000000000e+09 / 0x4e8effc2 (0 => OK) +29 SINGLE: 6.55050000000000000000e+04 / 0x477fe100 (0 => OK) 30 DOUBLE: 1.31007000000000000000e+05 / 0x0040fffbf000000000 (0 => OK) -30 SINGLE: 1.20795123200000000000e+09 / 0x4e8fffbf (0 => OK) +30 SINGLE: 1.31007000000000000000e+05 / 0x47ffdf80 (0 => OK) 31 DOUBLE: 1.31008000000000000000e+05 / 0x0040fffc0000000000 (0 => OK) -31 SINGLE: 1.20795136000000000000e+09 / 0x4e8fffc0 (0 => OK) +31 SINGLE: 1.31008000000000000000e+05 / 0x47ffe000 (0 => OK) 32 DOUBLE: 1.31009000000000000000e+05 / 0x0040fffc1000000000 (0 => OK) -32 SINGLE: 1.20795148800000000000e+09 / 0x4e8fffc1 (0 => OK) +32 SINGLE: 1.31009000000000000000e+05 / 0x47ffe080 (0 => OK) 33 DOUBLE: 2.14748364700000000000e+09 / 0x0041dfffffffc00000 (0 => OK) -33 SINGLE: 1.32540006400000000000e+09 / 0x4e9e0000 (0x10 => INEXACT ) +33 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x10 => INEXACT ) 34 DOUBLE: 3.40282346638528859812e+38 / 0x0047efffffe0000000 (0 => OK) -34 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x10 => INEXACT ) +34 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) 35 DOUBLE: 3.40282346638528859812e+38 / 0x0047efffffe0000000 (0 => OK) -35 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x10 => INEXACT ) +35 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff (0 => OK) 36 DOUBLE: 1.79769313486231570815e+308 / 0x007fefffffffffffff (0 => OK) -36 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0x14 => OVERFLOW INEXACT ) +36 SINGLE: inf / 0x7f800000 (0x14 => OVERFLOW INEXACT ) 37 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) -37 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0 => OK) +37 SINGLE: inf / 0x7f800000 (0 => OK) 38 DOUBLE: nan / 0x007ff8000000000000 (0 => OK) -38 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0 => OK) +38 SINGLE: nan / 0x7fc00000 (0 => OK) 39 DOUBLE: nan / 0x007ff0000000000001 (0 => OK) -39 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0x1 => INVALID) +39 SINGLE: nan / 0x7fc00000 (0x1 => INVALID) 40 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -40 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +40 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) Converting half-precision to single-precision 00 HALF: 0xffff (0 => OK) 00 SINGLE: -1.31008000000000000000e+05 / 0xc7ffe000 (0 => OK) @@ -2571,45 +2571,45 @@ Converting double-precision to half-precision 40 HALF: 0000 (0x1 => INVALID) Converting double-precision to single-precision 00 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -00 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +00 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) 01 DOUBLE: -nan / 0x00fff8000000000000 (0 => OK) -01 SINGLE: 4.29077299200000000000e+09 / 0x4f7fc000 (0 => OK) +01 SINGLE: -nan / 0xffc00000 (0 => OK) 02 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) -02 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0 => OK) +02 SINGLE: -inf / 0xff800000 (0 => OK) 03 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff (0 => OK) -03 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0x14 => OVERFLOW INEXACT ) +03 SINGLE: -inf / 0xff800000 (0x14 => OVERFLOW INEXACT ) 04 DOUBLE: -3.40282346638528859812e+38 / 0x00c7efffffe0000000 (0 => OK) -04 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff (0x10 => INEXACT ) +04 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) 05 DOUBLE: -3.40282346638528859812e+38 / 0x00c7efffffe0000000 (0 => OK) -05 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff (0x10 => INEXACT ) +05 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff (0 => OK) 06 DOUBLE: -1.11100000000000007530e+31 / 0x00c661874b135ff654 (0 => OK) -06 SINGLE: 4.07766476800000000000e+09 / 0x4f730c3a (0x10 => INEXACT ) +06 SINGLE: -1.11100004769645909791e+31 / 0xf30c3a59 (0x10 => INEXACT ) 07 DOUBLE: -1.11099999999999999085e+30 / 0x00c62c0bab523323b9 (0 => OK) -07 SINGLE: 4.04962432000000000000e+09 / 0x4f71605d (0x10 => INEXACT ) +07 SINGLE: -1.11100003258488635273e+30 / 0xf1605d5b (0x10 => INEXACT ) 08 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) -08 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +08 SINGLE: -2.00000000000000000000e+00 / 0xc0000000 (0 => OK) 09 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) -09 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +09 SINGLE: -1.00000000000000000000e+00 / 0xbf800000 (0 => OK) 10 DOUBLE: -2.22507385850720138310e-308 / 0x008010000000000000 (0 => OK) -10 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: -1.40129846432481707093e-45 / 0x80000001 (0x18 => UNDERFLOW INEXACT ) 11 DOUBLE: -1.17549435082228750797e-38 / 0x00b810000000000000 (0 => OK) -11 SINGLE: 2.15587225600000000000e+09 / 0x4f008000 (0 => OK) +11 SINGLE: -1.17549435082228750797e-38 / 0x80800000 (0 => OK) 12 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) 12 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) 13 DOUBLE: 1.17549435082228750796e-38 / 0x003810000000000000 (0 => OK) -13 SINGLE: 8.38860800000000000000e+06 / 0x4b000000 (0 => OK) +13 SINGLE: 1.17549435082228750796e-38 / 0x00800000 (0 => OK) 14 DOUBLE: 2.98023224000000013060e-08 / 0x003e600000001c5f68 (0 => OK) -14 SINGLE: 8.55638016000000000000e+08 / 0x4e4c0000 (0x10 => INEXACT ) +14 SINGLE: 2.98023223876953125000e-08 / 0x33000000 (0x10 => INEXACT ) 15 DOUBLE: 5.96046000000000015661e-08 / 0x003e6ffffe6cb2fa82 (0 => OK) -15 SINGLE: 8.64026560000000000000e+08 / 0x4e4dffff (0x10 => INEXACT ) +15 SINGLE: 5.96045985901128005934e-08 / 0x337ffff3 (0x10 => INEXACT ) 16 DOUBLE: 6.09755999999999994298e-05 / 0x003f0ff801a9af58a1 (0 => OK) -16 SINGLE: 9.47896320000000000000e+08 / 0x4e61ff00 (0x10 => INEXACT ) +16 SINGLE: 6.09755988989491015672e-05 / 0x387fc00d (0x10 => INEXACT ) 17 DOUBLE: 6.10352000000000013664e-05 / 0x003f100000c06a1ef5 (0 => OK) -17 SINGLE: 9.47912704000000000000e+08 / 0x4e620000 (0x10 => INEXACT ) +17 SINGLE: 6.10351999057456851005e-05 / 0x38800006 (0x10 => INEXACT ) 18 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -18 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +18 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 19 DOUBLE: 1.00097656250000000000e+00 / 0x003ff0040000000000 (0 => OK) -19 SINGLE: 1.06536140800000000000e+09 / 0x4e7e0080 (0 => OK) +19 SINGLE: 1.00097656250000000000e+00 / 0x3f802000 (0 => OK) 20 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) 20 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 21 DOUBLE: 1.37899728486072282843e-308 / 0x000009ea82a2287680 (0 => OK) @@ -2617,41 +2617,41 @@ Converting double-precision to single-precision 22 DOUBLE: 1.49147387366816238763e-308 / 0x00000ab98fba843210 (0 => OK) 22 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 23 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -23 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +23 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 24 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) -24 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +24 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) 25 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769 (0 => OK) -25 SINGLE: 1.07675443200000000000e+09 / 0x4e805bf0 (0x10 => INEXACT ) +25 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0x10 => INEXACT ) 26 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18 (0 => OK) -26 SINGLE: 1.07852992000000000000e+09 / 0x4e80921f (0x10 => INEXACT ) +26 SINGLE: 3.14159250259399414062e+00 / 0x40490fda (0x10 => INEXACT ) 27 DOUBLE: 6.55030000000000000000e+04 / 0x0040effbe000000000 (0 => OK) -27 SINGLE: 1.19956249600000000000e+09 / 0x4e8effbe (0 => OK) +27 SINGLE: 6.55030000000000000000e+04 / 0x477fdf00 (0 => OK) 28 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) -28 SINGLE: 1.19956275200000000000e+09 / 0x4e8effc0 (0 => OK) +28 SINGLE: 6.55040000000000000000e+04 / 0x477fe000 (0 => OK) 29 DOUBLE: 6.55050000000000000000e+04 / 0x0040effc2000000000 (0 => OK) -29 SINGLE: 1.19956300800000000000e+09 / 0x4e8effc2 (0 => OK) +29 SINGLE: 6.55050000000000000000e+04 / 0x477fe100 (0 => OK) 30 DOUBLE: 1.31007000000000000000e+05 / 0x0040fffbf000000000 (0 => OK) -30 SINGLE: 1.20795123200000000000e+09 / 0x4e8fffbf (0 => OK) +30 SINGLE: 1.31007000000000000000e+05 / 0x47ffdf80 (0 => OK) 31 DOUBLE: 1.31008000000000000000e+05 / 0x0040fffc0000000000 (0 => OK) -31 SINGLE: 1.20795136000000000000e+09 / 0x4e8fffc0 (0 => OK) +31 SINGLE: 1.31008000000000000000e+05 / 0x47ffe000 (0 => OK) 32 DOUBLE: 1.31009000000000000000e+05 / 0x0040fffc1000000000 (0 => OK) -32 SINGLE: 1.20795148800000000000e+09 / 0x4e8fffc1 (0 => OK) +32 SINGLE: 1.31009000000000000000e+05 / 0x47ffe080 (0 => OK) 33 DOUBLE: 2.14748364700000000000e+09 / 0x0041dfffffffc00000 (0 => OK) -33 SINGLE: 1.32539993600000000000e+09 / 0x4e9dffff (0x10 => INEXACT ) +33 SINGLE: 2.14748352000000000000e+09 / 0x4effffff (0x10 => INEXACT ) 34 DOUBLE: 3.40282346638528859811e+38 / 0x0047efffffe0000000 (0 => OK) -34 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x10 => INEXACT ) +34 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) 35 DOUBLE: 3.40282346638528859811e+38 / 0x0047efffffe0000000 (0 => OK) -35 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x10 => INEXACT ) +35 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) 36 DOUBLE: 1.79769313486231570814e+308 / 0x007fefffffffffffff (0 => OK) -36 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x14 => OVERFLOW INEXACT ) +36 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0x14 => OVERFLOW INEXACT ) 37 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) -37 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0 => OK) +37 SINGLE: inf / 0x7f800000 (0 => OK) 38 DOUBLE: nan / 0x007ff8000000000000 (0 => OK) -38 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0 => OK) +38 SINGLE: nan / 0x7fc00000 (0 => OK) 39 DOUBLE: nan / 0x007ff0000000000001 (0 => OK) -39 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0x1 => INVALID) +39 SINGLE: nan / 0x7fc00000 (0x1 => INVALID) 40 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -40 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +40 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) Converting half-precision to single-precision 00 HALF: 0xffff (0 => OK) 00 SINGLE: -1.31008000000000000000e+05 / 0xc7ffe000 (0 => OK) @@ -2934,45 +2934,45 @@ Converting double-precision to half-precision 40 HALF: 0000 (0x1 => INVALID) Converting double-precision to single-precision 00 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -00 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +00 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) 01 DOUBLE: -nan / 0x00fff8000000000000 (0 => OK) -01 SINGLE: 4.29077299200000000000e+09 / 0x4f7fc000 (0 => OK) +01 SINGLE: -nan / 0xffc00000 (0 => OK) 02 DOUBLE: -inf / 0x00fff0000000000000 (0 => OK) -02 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000 (0 => OK) +02 SINGLE: -inf / 0xff800000 (0 => OK) 03 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff (0 => OK) -03 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff (0x14 => OVERFLOW INEXACT ) +03 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0x14 => OVERFLOW INEXACT ) 04 DOUBLE: -3.40282346638528859811e+38 / 0x00c7efffffe0000000 (0 => OK) -04 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff (0x10 => INEXACT ) +04 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) 05 DOUBLE: -3.40282346638528859811e+38 / 0x00c7efffffe0000000 (0 => OK) -05 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff (0x10 => INEXACT ) +05 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff (0 => OK) 06 DOUBLE: -1.11100000000000007529e+31 / 0x00c661874b135ff654 (0 => OK) -06 SINGLE: 4.07766476800000000000e+09 / 0x4f730c3a (0x10 => INEXACT ) +06 SINGLE: -1.11099992680387713644e+31 / 0xf30c3a58 (0x10 => INEXACT ) 07 DOUBLE: -1.11099999999999999084e+30 / 0x00c62c0bab523323b9 (0 => OK) -07 SINGLE: 4.04962432000000000000e+09 / 0x4f71605d (0x10 => INEXACT ) +07 SINGLE: -1.11099995702702262681e+30 / 0xf1605d5a (0x10 => INEXACT ) 08 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000 (0 => OK) -08 SINGLE: 3.22122547200000000000e+09 / 0x4f400000 (0 => OK) +08 SINGLE: -2.00000000000000000000e+00 / 0xc0000000 (0 => OK) 09 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000 (0 => OK) -09 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000 (0 => OK) +09 SINGLE: -1.00000000000000000000e+00 / 0xbf800000 (0 => OK) 10 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000 (0 => OK) -10 SINGLE: 2.14748364800000000000e+09 / 0x4f000000 (0x18 => UNDERFLOW INEXACT ) +10 SINGLE: -0.00000000000000000000e+00 / 0x80000000 (0x18 => UNDERFLOW INEXACT ) 11 DOUBLE: -1.17549435082228750796e-38 / 0x00b810000000000000 (0 => OK) -11 SINGLE: 2.15587225600000000000e+09 / 0x4f008000 (0 => OK) +11 SINGLE: -1.17549435082228750796e-38 / 0x80800000 (0 => OK) 12 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000 (0 => OK) 12 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0 => OK) 13 DOUBLE: 1.17549435082228750796e-38 / 0x003810000000000000 (0 => OK) -13 SINGLE: 8.38860800000000000000e+06 / 0x4b000000 (0 => OK) +13 SINGLE: 1.17549435082228750796e-38 / 0x00800000 (0 => OK) 14 DOUBLE: 2.98023224000000013060e-08 / 0x003e600000001c5f68 (0 => OK) -14 SINGLE: 8.55638016000000000000e+08 / 0x4e4c0000 (0x10 => INEXACT ) +14 SINGLE: 2.98023223876953125000e-08 / 0x33000000 (0x10 => INEXACT ) 15 DOUBLE: 5.96046000000000015661e-08 / 0x003e6ffffe6cb2fa82 (0 => OK) -15 SINGLE: 8.64026560000000000000e+08 / 0x4e4dffff (0x10 => INEXACT ) +15 SINGLE: 5.96045985901128005934e-08 / 0x337ffff3 (0x10 => INEXACT ) 16 DOUBLE: 6.09755999999999994298e-05 / 0x003f0ff801a9af58a1 (0 => OK) -16 SINGLE: 9.47896320000000000000e+08 / 0x4e61ff00 (0x10 => INEXACT ) +16 SINGLE: 6.09755988989491015672e-05 / 0x387fc00d (0x10 => INEXACT ) 17 DOUBLE: 6.10352000000000013664e-05 / 0x003f100000c06a1ef5 (0 => OK) -17 SINGLE: 9.47912704000000000000e+08 / 0x4e620000 (0x10 => INEXACT ) +17 SINGLE: 6.10351999057456851005e-05 / 0x38800006 (0x10 => INEXACT ) 18 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -18 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +18 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 19 DOUBLE: 1.00097656250000000000e+00 / 0x003ff0040000000000 (0 => OK) -19 SINGLE: 1.06536140800000000000e+09 / 0x4e7e0080 (0 => OK) +19 SINGLE: 1.00097656250000000000e+00 / 0x3f802000 (0 => OK) 20 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000 (0 => OK) 20 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 21 DOUBLE: 1.37899728486072282843e-308 / 0x000009ea82a2287680 (0 => OK) @@ -2980,41 +2980,41 @@ Converting double-precision to single-precision 22 DOUBLE: 1.49147387366816238763e-308 / 0x00000ab98fba843210 (0 => OK) 22 SINGLE: 0.00000000000000000000e+00 / 0000000000 (0x18 => UNDERFLOW INEXACT ) 23 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000 (0 => OK) -23 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000 (0 => OK) +23 SINGLE: 1.00000000000000000000e+00 / 0x3f800000 (0 => OK) 24 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000 (0 => OK) -24 SINGLE: 1.07374182400000000000e+09 / 0x4e800000 (0 => OK) +24 SINGLE: 2.00000000000000000000e+00 / 0x40000000 (0 => OK) 25 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769 (0 => OK) -25 SINGLE: 1.07675443200000000000e+09 / 0x4e805bf0 (0x10 => INEXACT ) +25 SINGLE: 2.71828174591064453125e+00 / 0x402df854 (0x10 => INEXACT ) 26 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18 (0 => OK) -26 SINGLE: 1.07852992000000000000e+09 / 0x4e80921f (0x10 => INEXACT ) +26 SINGLE: 3.14159250259399414062e+00 / 0x40490fda (0x10 => INEXACT ) 27 DOUBLE: 6.55030000000000000000e+04 / 0x0040effbe000000000 (0 => OK) -27 SINGLE: 1.19956249600000000000e+09 / 0x4e8effbe (0 => OK) +27 SINGLE: 6.55030000000000000000e+04 / 0x477fdf00 (0 => OK) 28 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000 (0 => OK) -28 SINGLE: 1.19956275200000000000e+09 / 0x4e8effc0 (0 => OK) +28 SINGLE: 6.55040000000000000000e+04 / 0x477fe000 (0 => OK) 29 DOUBLE: 6.55050000000000000000e+04 / 0x0040effc2000000000 (0 => OK) -29 SINGLE: 1.19956300800000000000e+09 / 0x4e8effc2 (0 => OK) +29 SINGLE: 6.55050000000000000000e+04 / 0x477fe100 (0 => OK) 30 DOUBLE: 1.31007000000000000000e+05 / 0x0040fffbf000000000 (0 => OK) -30 SINGLE: 1.20795123200000000000e+09 / 0x4e8fffbf (0 => OK) +30 SINGLE: 1.31007000000000000000e+05 / 0x47ffdf80 (0 => OK) 31 DOUBLE: 1.31008000000000000000e+05 / 0x0040fffc0000000000 (0 => OK) -31 SINGLE: 1.20795136000000000000e+09 / 0x4e8fffc0 (0 => OK) +31 SINGLE: 1.31008000000000000000e+05 / 0x47ffe000 (0 => OK) 32 DOUBLE: 1.31009000000000000000e+05 / 0x0040fffc1000000000 (0 => OK) -32 SINGLE: 1.20795148800000000000e+09 / 0x4e8fffc1 (0 => OK) +32 SINGLE: 1.31009000000000000000e+05 / 0x47ffe080 (0 => OK) 33 DOUBLE: 2.14748364700000000000e+09 / 0x0041dfffffffc00000 (0 => OK) -33 SINGLE: 1.32539993600000000000e+09 / 0x4e9dffff (0x10 => INEXACT ) +33 SINGLE: 2.14748352000000000000e+09 / 0x4effffff (0x10 => INEXACT ) 34 DOUBLE: 3.40282346638528859811e+38 / 0x0047efffffe0000000 (0 => OK) -34 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x10 => INEXACT ) +34 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) 35 DOUBLE: 3.40282346638528859811e+38 / 0x0047efffffe0000000 (0 => OK) -35 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x10 => INEXACT ) +35 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0 => OK) 36 DOUBLE: 1.79769313486231570814e+308 / 0x007fefffffffffffff (0 => OK) -36 SINGLE: 2.13909491200000000000e+09 / 0x4efeffff (0x14 => OVERFLOW INEXACT ) +36 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff (0x14 => OVERFLOW INEXACT ) 37 DOUBLE: inf / 0x007ff0000000000000 (0 => OK) -37 SINGLE: 2.13909504000000000000e+09 / 0x4eff0000 (0 => OK) +37 SINGLE: inf / 0x7f800000 (0 => OK) 38 DOUBLE: nan / 0x007ff8000000000000 (0 => OK) -38 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0 => OK) +38 SINGLE: nan / 0x7fc00000 (0 => OK) 39 DOUBLE: nan / 0x007ff0000000000001 (0 => OK) -39 SINGLE: 2.14328934400000000000e+09 / 0x4eff8000 (0x1 => INVALID) +39 SINGLE: nan / 0x7fc00000 (0x1 => INVALID) 40 DOUBLE: nan / 0x007ff4000000000000 (0 => OK) -40 SINGLE: 2.14538649600000000000e+09 / 0x4effc000 (0x1 => INVALID) +40 SINGLE: nan / 0x7fe00000 (0x1 => INVALID) Converting half-precision to single-precision 00 HALF: 0xffff (0 => OK) 00 SINGLE: -1.31008000000000000000e+05 / 0xc7ffe000 (0 => OK) From patchwork Fri Jul 5 15:30:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810397 Delivered-To: patch@linaro.org Received: by 2002:ab3:6bc5:0:b0:273:6c53:9181 with SMTP id v5csp523662ltk; Fri, 5 Jul 2024 08:31:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVZJQasIFy72Dws5resitgsY7qVAU2xW1LQ8P3vfaWgrng1lBMOl6kXxqfbLlvTSMdaXfJIX3FnHg/Luk/EdJ8Z X-Google-Smtp-Source: AGHT+IEQdJh8WSKgOVr//ZtivGbO+Z5Lrya3vk4JZQFYd4AF6rtQyuWM098IohqDZhUvOEMEnXQ/ X-Received: by 2002:ad4:594d:0:b0:6b4:fdfd:fece with SMTP id 6a1803df08f44-6b5ed19c200mr52848096d6.44.1720193517154; Fri, 05 Jul 2024 08:31:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193517; cv=none; d=google.com; s=arc-20160816; b=aaC8mqv1KTLeRP/ecyp7MVgXn2pXm1iyh/l1b3Be/9mFSQmvVgZYxD727TvzLHDS4f mbUTeVh9noj4Dtfk8MTNvpywUSxvSpmuLVmTfwS7R/LVipuUo1Szrnn1v0OVtscqGDMT PK9UW71y5LlwQKzblRznx20eLm1dAf8WRbfb2IrkNeP6ZQ9k0rq2V7MuTAMcdOr6WZL4 mAl7QrqNVfN7B5SYzs5tfOH3GbQD7DK8J5FP33x0tFLKEGrD1qqpqmM7NJWbkxD4btzQ whf12XxJa1F/idznZfWQiPkogPXbYg+C7rhGnzReWsNNOQISO0wZCcCrKP5vR4sb+igT zhrQ== 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=nRoFsyx+m619boGjC+CQwE+ICP9tXSsJdqLrwUZiNk8=; fh=DRz3T8hy46IOIOI0+1PyoMvsH/I8h2Md0cQSsMbTLVY=; b=cGHgTDNmmQ3GCtnOfXopPf6/WvgFdzN92lMcNK2b3mEAgcNfDXCYP7G1RX6KnQGQ8a jNNnKHM8DUdSonwLx+QFwPLphG+hx7vl2Q1RAqwterxZhzCLFuuULlJfEcQsLbmlBqzQ 5nl9xOB6acHtscs9qU7R+1np38VMurDMSTHF3/sAbVvGr12Ir/Mb++iXT5h3oMLOVMAJ 6wUtSZHHZHdO/QpkVlchAsjlROGgDcUSSNYJrkJY3QPZkfVQvHPcBsHgDX9i1t5Zs5q5 yUnVqPpk0F4KX60cywk2IyoJV30bPjfnsVw4PFkHkJp6zUm4fimFImOwj9lwseNXrRZl JJrA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lzFvXzTl; 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 6a1803df08f44-6b5f20d1f10si27559656d6.23.2024.07.05.08.31.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:31:57 -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=lzFvXzTl; 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 1sPku9-0005os-EY; Fri, 05 Jul 2024 11:31:21 -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 1sPku6-0005mU-DM for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:18 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPktq-0000OE-VG for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:18 -0400 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a6fd513f18bso195533066b.3 for ; Fri, 05 Jul 2024 08:31:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193461; x=1720798261; 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=nRoFsyx+m619boGjC+CQwE+ICP9tXSsJdqLrwUZiNk8=; b=lzFvXzTlOBxf2RWsQ/YuMko962ejhRQjy5R2AS+ELfom3HhD9Zzv582ceR8dfP6h1U stPMrtWGSqgZHQ3JJ0nYR4fQ6+TcW/Kn2C/umo4Raqczv0bh8M+t5iuy6oq2QMrS2vBd 48tBTJ6Co6kQYzKiaemDfeZC/EJISXRefyQNKyVhDCWthAZvkYd3r4TeZFB2khkmjlic o2W+yDs5kLgWd/CVX9OhbyE430Gv0+5F80ty09Z1U1TJLQ7yFVgxECneN2gZv3D5lS6s 22o5DLwo5+F8ssoUJZE5OUKVRLVMPNZguJpQZkrC8BlvJG3j9M8lJhmdhowuTTxuk4bc ac/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193461; x=1720798261; 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=nRoFsyx+m619boGjC+CQwE+ICP9tXSsJdqLrwUZiNk8=; b=j7li3t3ZjrUSbcMr2JHdpuNm6OGQcny0NeRlloVcVOSNYp9XFadh5YveNQ6NRiHe27 hltw6lx3iWBNqQqyNVizT2hpNNMDgMVvzNi+J1JrpKfBAKrtL4oEQj3xSIFQL0Hnk338 b/nSMuNiQlygqkE5zumwS+9T/mOsZhr+B5c7Od53VXxDnOdQZOy0gzRcPIernmkVRU0Y 9GGCrwyIB50+Tdabnmn/D2zeRaA0w5jFhOmQ7gmcX/uQSEzlviWLZ8L5c3HyHze14pdT GMWuozUcoGziVH80UI3rMh2U8PjEtIMK+I1lzM1lP2M8GUsEH56gH1rzfqdIz1thPBEd ZxfQ== X-Gm-Message-State: AOJu0Yxypvxt3a3lAVhB/e5I9Q+LexTxEsAXdCax5nVv90XcUt7cUqMl u7Ogh4qBzndm9iUPJf5C4xP11gAK5+q1ojeQlRoNhotY06AhpH68wA+8pgzCT20= X-Received: by 2002:a17:906:48d8:b0:a77:da14:840a with SMTP id a640c23a62f3a-a77da1485b8mr91370166b.69.1720193460951; Fri, 05 Jul 2024 08:31:00 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a72aaf6039asm688913266b.54.2024.07.05.08.30.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:30:57 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 61CE262107; Fri, 5 Jul 2024 16:30:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Akihiko Odaki , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 14/40] tests/tcg/arm: Drop -N from LDFLAGS Date: Fri, 5 Jul 2024 16:30:26 +0100 Message-Id: <20240705153052.1219696-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x631.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Richard Henderson This is redudant with a linker script, and is not supported by clang. Signed-off-by: Richard Henderson Reviewed-by: Akihiko Odaki Message-Id: <20240630190050.160642-10-richard.henderson@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-15-alex.bennee@linaro.org> diff --git a/tests/tcg/arm/Makefile.softmmu-target b/tests/tcg/arm/Makefile.softmmu-target index 39e01ce49d..547063c08c 100644 --- a/tests/tcg/arm/Makefile.softmmu-target +++ b/tests/tcg/arm/Makefile.softmmu-target @@ -13,7 +13,7 @@ VPATH += $(ARM_SRC) test-armv6m-undef: test-armv6m-undef.S $(CC) -mcpu=cortex-m0 -mfloat-abi=soft \ -Wl,--build-id=none -x assembler-with-cpp \ - $< -o $@ -nostdlib -N -static \ + $< -o $@ -nostdlib -static \ -T $(ARM_SRC)/$@.ld run-test-armv6m-undef: QEMU_OPTS=-semihosting-config enable=on,target=native,chardev=output -M microbit -kernel @@ -30,7 +30,7 @@ CRT_PATH=$(ARM_SRC) LINK_SCRIPT=$(ARM_SRC)/kernel.ld LDFLAGS=-Wl,-T$(LINK_SCRIPT) CFLAGS+=-nostdlib -ggdb -O0 $(MINILIB_INC) -LDFLAGS+=-static -nostdlib -N $(CRT_OBJS) $(MINILIB_OBJS) -lgcc +LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc # building head blobs .PRECIOUS: $(CRT_OBJS) From patchwork Fri Jul 5 15:30:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810408 Delivered-To: patch@linaro.org Received: by 2002:ab3:6bc5:0:b0:273:6c53:9181 with SMTP id v5csp525166ltk; Fri, 5 Jul 2024 08:34:48 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUJBCQojmKyPCsdETSBSOCo688e8D4215/2v9oUJ2YQqQSvzk0r06e7aXQX//M/KkpbPTEGypVbNSlpnphZfW3o X-Google-Smtp-Source: AGHT+IEdQc6mkGkYQ0yz83mMtto375O2OphwdW+mwctqms5XeFnIPBno5VKMMObndT8UQX3kvxaL X-Received: by 2002:ae9:f40a:0:b0:79e:fc9e:df0d with SMTP id af79cd13be357-79efc9edf6dmr85506885a.73.1720193687929; Fri, 05 Jul 2024 08:34:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193687; cv=none; d=google.com; s=arc-20160816; b=LKkt5yXFziTA98v7p5RIa+RXc0ohvs0nTmYChBoXjFkEdZysoSSauHCGnb6fCXmVXE vgrPGUPanaQOXO1vpbrk6j2Rr/D8D0NaEDGJv3JctK+tx/yyuO3NB5gSO6NarS2emEDz 0e3vkyQy23ljaqqi+Ecmkldcl7Cg7YgrniOV6dNWm39/dbjRlSWjh5iy6EsuXMARgtIm cxbgA/um8guX+9B0nxtsiuC0l5w+z5N45BzlxSbC86vFuZDk+O6cv+ZTVPti8pIGceKM qn78pStI7+ZNIWfcNEVm4pTx9ts3ZSN3hy/uGvC86koDMNQQdRp8V1AWPH+5ve1a3mqI fMSQ== 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=ylCfX57vu2XtKdQ2UE07h/WESYaBK96i7YkZDwjHda4=; fh=DRz3T8hy46IOIOI0+1PyoMvsH/I8h2Md0cQSsMbTLVY=; b=CD8Xl3V+/T4BO9SX/ZHihVwrYDZunPabD4aUX+oU6EJvOOzcPLLGOHjJy0w3bWzBuA wE21QAOZFXfBzvfPiFO4SKf+rPsr2KOVuM9YXanuQNNuPVmJROgrSW92E3oXPLfB1Ip8 0S78NMFCURNiIziAZ3P4yNi7G/L6hpP/ggU/kP+voOq6bSywu3v+9e/Rd5Y9HFlN0FkJ HZuUP1+f3tBpqYmOgqVnttBTyvibwb3Sdwtvx11ojyFs1ndJXznd8HM0AeD3jcBV1/AZ Q0IpHtyVFK0ZBMZUtD8KdJW2chT8T3TD+dai1bK+hU2d0zzT9kGjfE59Osu0po5wM0ZM 2c3Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jMkTZFL+; 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 af79cd13be357-79effa45abcsi13265285a.575.2024.07.05.08.34.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:34:47 -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=jMkTZFL+; 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 1sPku5-0005lC-83; Fri, 05 Jul 2024 11:31:17 -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 1sPku3-0005j7-9f for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:15 -0400 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPkty-0000Rh-57 for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:15 -0400 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a77b550128dso227619966b.0 for ; Fri, 05 Jul 2024 08:31:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193467; x=1720798267; 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=ylCfX57vu2XtKdQ2UE07h/WESYaBK96i7YkZDwjHda4=; b=jMkTZFL+H/x6Kc7yVz5WrvgqBDQV/BzkdYeVZw0oa+71zsjFOJnoI3HnPwl46MQzSF 0chlSeQX1yy2x4i3EU4ubbDXMwVinMCOHA3UC/XOyDkgzbTCVNb6jGGIcNa8vadmBkkD bucmYiRFLq/t4ToeckFB3IznwMaFXia7fK/qWO4Wh5ggZg4hozXfWXLsWnysqIrmxe1W uswP3WIypq8Xvt/c25r6ZtRHAVAQNsH8GAQK3Se4Aeky/WdPMJHXoFaClCkf4BrZdj5o ijjvSOuOAL+Cgmbz9nKJnlAC1MS8LTa128c3LTUj9nC5c3KmZ0ME99Rfa0Y3WfuExm3q 5+zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193467; x=1720798267; 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=ylCfX57vu2XtKdQ2UE07h/WESYaBK96i7YkZDwjHda4=; b=lPY20YaG/EJzRS6wIGWCZmTJ5k+U7mofnuGcEtx8I6OyKz4Wy6jDr9PKQhcCNQlNuJ mG1Ajziah6Qy4twqEK/SVTlFSqoKDt7d6pbKPAe1iLuFTn0IJwErF0iNK97Hik4piu8d vLIKqwB8AYqz3uY+lXgR9P6ikAe8imuaQlYehnWgjIGkX+irv3bjgQxtZ1upSjbrwpBp /gVH0zf1yNWh2hGn4L/GXx9alBnOLR/QMJQrlxuCD9LIpfRDor5F1QjXxmJ/7JC4+LdZ EJpO/BNyzj+YVjQiN1g29bPziYU55JaUVu6lMQSchkaaN1XPGoTNz0MGrXsH38w7tJ15 ZagA== X-Gm-Message-State: AOJu0YzTRBs2CexVdrPHnf+gZ5iXkiuHKMvQaP17dIQkTpNLH91+h2pz L9y/7kiu5w9o9KKeLfflIxxMVz07Hva7aHZ0s90QkoynJ5znFv7nj14z62Hzrfo= X-Received: by 2002:a17:906:17c1:b0:a6f:59dc:4ed0 with SMTP id a640c23a62f3a-a77ba48e64emr387205866b.46.1720193466525; Fri, 05 Jul 2024 08:31:06 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a77ab405d36sm185924166b.186.2024.07.05.08.30.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:31:04 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 760D95F8AF; Fri, 5 Jul 2024 16:30:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Akihiko Odaki , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 15/40] tests/tcg/arm: Use -fno-integrated-as for test-arm-iwmmxt Date: Fri, 5 Jul 2024 16:30:27 +0100 Message-Id: <20240705153052.1219696-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62c.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=unavailable 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: Richard Henderson Clang does not support IWMXT instructions. Fall back to the external assembler. Signed-off-by: Richard Henderson Reviewed-by: Akihiko Odaki Message-Id: <20240630190050.160642-11-richard.henderson@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-16-alex.bennee@linaro.org> diff --git a/tests/tcg/arm/Makefile.target b/tests/tcg/arm/Makefile.target index 0a1965fce7..95f891bf8c 100644 --- a/tests/tcg/arm/Makefile.target +++ b/tests/tcg/arm/Makefile.target @@ -8,6 +8,11 @@ ARM_SRC=$(SRC_PATH)/tests/tcg/arm # Set search path for all sources VPATH += $(ARM_SRC) +config-cc.mak: Makefile + $(quiet-@)( \ + $(call cc-option,-fno-integrated-as, CROSS_CC_HAS_FNIA)) 3> config-cc.mak +-include config-cc.mak + float_madds: CFLAGS+=-mfpu=neon-vfpv4 # Basic Hello World @@ -17,7 +22,8 @@ hello-arm: LDFLAGS+=-nostdlib # IWMXT floating point extensions ARM_TESTS += test-arm-iwmmxt -test-arm-iwmmxt: CFLAGS+=-marm -march=iwmmxt -mabi=aapcs -mfpu=fpv4-sp-d16 +# Clang assembler does not support IWMXT, so use the external assembler. +test-arm-iwmmxt: CFLAGS += -marm -march=iwmmxt -mabi=aapcs -mfpu=fpv4-sp-d16 $(CROSS_CC_HAS_FNIA) test-arm-iwmmxt: test-arm-iwmmxt.S $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) From patchwork Fri Jul 5 15:30:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810396 Delivered-To: patch@linaro.org Received: by 2002:ab3:6bc5:0:b0:273:6c53:9181 with SMTP id v5csp523626ltk; Fri, 5 Jul 2024 08:31:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWIAlgR/bMZxCQVyG4s4c/wA/HVKkIrhjPs4Du6M/uLi4uA3eKK6+bZrLw9tdy/wqT754jMNCvDTY4OjX4ACi2y X-Google-Smtp-Source: AGHT+IHY4OkU8XOalf3s9Wnn2VoNQmrj5F5D+YIyARleQDTBq4N+I5l690XV1caNnq74VG+3kYFN X-Received: by 2002:a05:620a:d51:b0:79d:8153:57b5 with SMTP id af79cd13be357-79eee274083mr486461585a.62.1720193514494; Fri, 05 Jul 2024 08:31:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193514; cv=none; d=google.com; s=arc-20160816; b=SfEViojESkZAyUKYu65IkFS/6ZIdVnsHMwriRCRAvr4PJfV81uS8iKcveh51HPVK14 rSXsjGCnwJfMIRR6vjICFvpJ/iWft6f/gtTHefcbyJyWYDKdgBmgl0bCZ7QPt/E767nL ifG3YyZCcTlVC4IF+AAI0pHQxl0I2hv3M/IsZItGtIeOYFob2q5sUmATVgItCTaPizqX YZFDlpmizTBAKmlgqrHY3TcVOp36cyvudc9hxN/GJnoG8HwF0bgusQrgA3Ct2An9JY8W hayBWTRYSQ/6hFRWhJc8Mq8Zdfr0j/EQ5ovX2DxPAYEtnarGJFM44bv9o+f/cQvpO3Sh bs3w== 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=FV/c21quCr2VaXyJq0rrCWTuAfHB+Xc6e4tf9YOx3HA=; fh=ciSoQgqucu/oEfZlaB6nZdSrNnqkgtVavnibiIeOass=; b=ZP1SClApqM9iI+BeHc6UHjC0Yn6K92e+xhFTVSShEY8emYjMWpoybyuVjvTJH/2k0r N+b4U0d60hN7jp6JQb9Ju/BfTwTwlYkSO0yrP3ODgm93K7UtrizQ3BQpg5g5pVwxYZYx HoO9IYYZtbiounWEpmr1R+0eVM/tnYhVEbh3wf3ZpciX0+P101wOK0L/SnyXSPtRu8wq bI20q66AXsgOmqzn09J1fpD/78dsXf7n3PccicveBm2zW6hxnlDxTEEupgFnRVK/EE8R 9olCOxgGml+ggTKEDQXheg3lJBv0H4f65NnmecvW8ee2Gfa9YIbmAZWsnwr35csPJkul ADzQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xbiw100l; 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 af79cd13be357-79ef8039bebsi129665485a.435.2024.07.05.08.31.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:31:54 -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=xbiw100l; 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 1sPkuB-0005pp-Uf; Fri, 05 Jul 2024 11:31:23 -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 1sPku9-0005oZ-2Q for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:21 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPku0-0000Ra-NP for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:20 -0400 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a7527afa23cso214712066b.2 for ; Fri, 05 Jul 2024 08:31:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193467; x=1720798267; 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=FV/c21quCr2VaXyJq0rrCWTuAfHB+Xc6e4tf9YOx3HA=; b=xbiw100lxVheZOvQJxpgsyiVU047ySljYn6rsgc7Gm3wlyQVYbtyGf9QBUnxiu9xSa PluvtmYTwGCCRJOS7e9OkPFYbVHfahQl642rB/H96kDcm9hfUPOrnVB1PyexLSokxqeX cymJmGZLXYYR44/0YhZUUHuEXq/6iHU7xfvZYotNO3FdSCcj1U9gIZH7RYn5wg6wx0Y7 Hd8hHKLVjs16LOUmfP9WkH2TgSZlUjB+WJOOkHTq5i3bP6uYflhXeNUfgfi/A265GEkB NzQao6rgUz3zOKz1b+etSdbwmDEV1epdyQsgMOKOqrCAA9QM/cwppT7IGTbeUkcIEklr B1ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193467; x=1720798267; 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=FV/c21quCr2VaXyJq0rrCWTuAfHB+Xc6e4tf9YOx3HA=; b=OE03YyFGOKE1nUoks7/B2XOtVZsvYtS+nXPwAsJcVp7aVMNuEmUKd1NNJNA+bnECdj MucJD0nleA4riOnr7clRjQdCFiriC0rooSXSjDZ38iAiAAn3iLFXil5ssFbpJFQlITCN 0vDrjf2j9A/b3hzV2EsLYb2xswqkC6aYvF4PG18lCooy4tSbnxYG9IPN8fPIo/X0javq 2a68FkJPe4Wq9kgApe1GO2JhxuqlL4L35C4c7N9yIA0QGcZV904r0hofrUqnlfgXLhdS ABw41MF62xPL0j348lTO/odFXCSxuix6Rvm9E1jKURsgl9tCXZaLXFasIndT5GYZmq/E F5cQ== X-Gm-Message-State: AOJu0YyEmK+N5mKYigIrFVjrSzjnpxCb5WzHPnS4P/XOqSbpWQRRiwie YjAhdpfq+L5fH52kXtXIxJ9k8ee77Z/pq7zbGzkV19TwJdCxCROkcN5+6X+KAvIDAtJ58YUpfcX H X-Received: by 2002:a17:906:4818:b0:a6f:4e1f:e613 with SMTP id a640c23a62f3a-a77ba48e4c4mr310842966b.37.1720193466737; Fri, 05 Jul 2024 08:31:06 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a77d56ccb8csm46718666b.200.2024.07.05.08.30.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:31:04 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 8B4C56211A; Fri, 5 Jul 2024 16:30:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 16/40] tests/tcg/arm: Manually register allocate half-precision numbers Date: Fri, 5 Jul 2024 16:30:28 +0100 Message-Id: <20240705153052.1219696-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62f.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=unavailable 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: Akihiko Odaki Clang does not allow specifying an integer as the value of a single precision register. Explicitly move value from a general register. Signed-off-by: Akihiko Odaki [rth: Use one single inline asm block.] Signed-off-by: Richard Henderson Reviewed-by: Akihiko Odaki Message-Id: <20240630190050.160642-12-richard.henderson@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-17-alex.bennee@linaro.org> diff --git a/tests/tcg/arm/fcvt.c b/tests/tcg/arm/fcvt.c index 157790e679..d8c61cd29f 100644 --- a/tests/tcg/arm/fcvt.c +++ b/tests/tcg/arm/fcvt.c @@ -355,7 +355,12 @@ static void convert_half_to_single(void) print_half_number(i, input); #if defined(__arm__) - asm("vcvtb.f32.f16 %0, %1" : "=w" (output) : "x" ((uint32_t)input)); + /* + * Clang refuses to allocate an integer to a fp register. + * Perform the move from a general register by hand. + */ + asm("vmov %0, %1\n\t" + "vcvtb.f32.f16 %0, %0" : "=w" (output) : "r" (input)); #else asm("fcvt %s0, %h1" : "=w" (output) : "w" (input)); #endif From patchwork Fri Jul 5 15:30:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810415 Delivered-To: patch@linaro.org Received: by 2002:ab3:6bc5:0:b0:273:6c53:9181 with SMTP id v5csp525348ltk; Fri, 5 Jul 2024 08:35:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXV3oa0b4vIVOYjMNkNWgWMBAPmggQEdHDibC03jdNTfSCBp+zDxIHl8CC+EiksKi87VbgGfhr2cAYjx8XEv5ec X-Google-Smtp-Source: AGHT+IEVhzp5jskW6YFB0PY3ETy+AwxE8yZqrikDi5ojv+ndqK+qPtvVpSUF2ls6j0QuGEvB2UDQ X-Received: by 2002:a05:6214:1d0c:b0:6b5:e77b:b776 with SMTP id 6a1803df08f44-6b5ecfb541bmr67011556d6.5.1720193710644; Fri, 05 Jul 2024 08:35:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193710; cv=none; d=google.com; s=arc-20160816; b=nBn0n+3zQ+1CCZy8RmPlKlxOAGI6buyoy7nsY9//uHxeT4eigaksihszS4eES/gIXc UxnH9QlyHjyDieeW47vQHL2SFRS0/MBHEe/luHZPcGskA1BSBh04yUK6xEdRiCcvqk+l nZADdAaM9/sGC3uL8agLeOmPz/gvath6tFbCEFUbrXcwxjXnC/8klIvi5uF0ycteP5d+ VrjOgUrPDkjg1wBr7kT9nJ5kUhNiGmpQQem3IUDXvSz46BNu4aTuJL6prjScIT6CaK/x CeMI5bSzFy0Ubu4uEeoGsm/0mj/1TCoP+e9haowhbOMK+UpxXkKy8QBrAKVVBTp4wOBW 3RbA== 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=mpfNv2j1tI1/v38krNO8PFDL7fPSKpwptFmGNLBYEoE=; fh=DRz3T8hy46IOIOI0+1PyoMvsH/I8h2Md0cQSsMbTLVY=; b=rx/ifDvbtfDHi+Rord4c8KBF8YQY6cthQptmX46n0zw/qJvqM46qOqMW6TCXlG0E/G B66YHMXMxbp7tmm30nvf1jS+hcoxatNpVbS4nDWFWiQvAQRj3YTE4cB+RTvt2JQfg24H SMagev+enETW32FIrBW4i6U3shzUVEBovelwGYg2rmUneViZBSsZK1U3jM2nwI8XXQ1s HOLT3vJ+LxR1MsR9gaCyqz2cnjbphfgkbzc/aAmSrS+ZYuzuyTRYnQyHovCN1j3kJ0PZ xzgRPSqVpov2BuldjTpYXIcboJZ90VxbD4DOo/B5HGyObkDo4GBjv4n/vJrcGlxOR7Z+ NlfA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ej3zdBcf; 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 6a1803df08f44-6b5eea7b1f1si36956376d6.477.2024.07.05.08.35.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:35:10 -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=ej3zdBcf; 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 1sPku5-0005lZ-SM; Fri, 05 Jul 2024 11:31:17 -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 1sPku3-0005j4-SV for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:15 -0400 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPktw-0000RQ-V1 for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:14 -0400 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a77cbb5e987so99699866b.3 for ; Fri, 05 Jul 2024 08:31:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193466; x=1720798266; 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=mpfNv2j1tI1/v38krNO8PFDL7fPSKpwptFmGNLBYEoE=; b=ej3zdBcfzH/zSAxOhJFma/V29bxTzJiF/+09GrVFfD8bouleA/YCPAgg+YSOtq1obR ubIInOeDnoEtXdc5fad11x6OpCRVYwpdfJup2HMoffLISncwZ7yScM92vbTcyZ3nWDL6 PPnLZbRjOjUttXy61hBPCp4zTA+EjLujNqM1C8taMGJ3cKmIndHh6472AlRRIK6J6nX5 EiQKZgiS4pGHaqdtCMbiU3Gs4RXLfHBdJXtANm1vXIB5G8fiMJ3Eam+wXAioU3KAwmuo n3kDstTcvdxTz8+t/YfdCTD5D0+J/2Ycx52V5X7eLBIj7MbMY+jCfVykISS4ql/WhSCh 8WpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193466; x=1720798266; 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=mpfNv2j1tI1/v38krNO8PFDL7fPSKpwptFmGNLBYEoE=; b=iRku91COMWJSRzWbZkbRIdYtbyADy1jzY/JuJgPSbQwLegJhC5tQE4kETVKDJcFCSF NOIVPw4H0VoooIUnUf4qz2HCBFVwJxn9ilA/NFI4zPneOkM5wLm4MUoI+GNHL94ANTEq exwKtc6LW3mJeW+e9tgoh4td8QHwloX0zj7/p7/IrZCVdik+HylbQnXEZCHtVFGUyR85 msQTM27tdcuIAf7WUXWFYukxCeeg2jJmh0YJFKscd0WcyjwRF1fdm/SYcmawe0HOspfE 2wnuZeF4ZKehR1dBn3Lsix7kQpNFKYOTvP16MCxErqnsJhXRV7PXZo3VGwKFWI8Aj/Gz lniw== X-Gm-Message-State: AOJu0YzPc5+CztL4/gPzg1BPalZupy0flXz8Y6HBhizxE599uOd6DyLU /RvIwAW3gHUsVoRwd1XO3fxbzrKIoh5IbZx3/49/q5Le2V96XeDvlDYJNeWTBjo= X-Received: by 2002:a17:906:494e:b0:a77:cf09:9c70 with SMTP id a640c23a62f3a-a77cf099d0emr113404666b.43.1720193466149; Fri, 05 Jul 2024 08:31:06 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a77d965dc4asm37881266b.87.2024.07.05.08.30.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:31:04 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id A26546211C; Fri, 5 Jul 2024 16:30:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Akihiko Odaki , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 17/40] tests/tcg/arm: Use -march and -mfpu for fcvt Date: Fri, 5 Jul 2024 16:30:29 +0100 Message-Id: <20240705153052.1219696-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x634.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=unavailable 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: Richard Henderson Clang requires the architecture to be set properly in order to assemble the half-precision instructions. Signed-off-by: Richard Henderson Reviewed-by: Akihiko Odaki Message-Id: <20240630190050.160642-13-richard.henderson@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-18-alex.bennee@linaro.org> diff --git a/tests/tcg/arm/Makefile.target b/tests/tcg/arm/Makefile.target index 95f891bf8c..8e287191af 100644 --- a/tests/tcg/arm/Makefile.target +++ b/tests/tcg/arm/Makefile.target @@ -29,8 +29,8 @@ test-arm-iwmmxt: test-arm-iwmmxt.S # Float-convert Tests ARM_TESTS += fcvt -fcvt: LDFLAGS+=-lm -# fcvt: CFLAGS+=-march=armv8.2-a+fp16 -mfpu=neon-fp-armv8 +fcvt: LDFLAGS += -lm +fcvt: CFLAGS += -march=armv8.2-a+fp16 -mfpu=neon-fp-armv8 run-fcvt: fcvt $(call run-test,fcvt,$(QEMU) $<) $(call diff-out,fcvt,$(ARM_SRC)/fcvt.ref) From patchwork Fri Jul 5 15:30:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810423 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp1670023wru; Fri, 5 Jul 2024 08:38:52 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWllwZ24OPReTZy16oBbm8uPM5BqgA6cfWXpuiU/V+FDxeCJiEvVwNWVaDO/Leo1z9v+tA2TF7HGNAjFM4RB6lh X-Google-Smtp-Source: AGHT+IEod8lZLGlRZZHIm8+VefauhTWmZRuukFXS90ZUt5dhmxOsL5KC6AuDgwi6hXCd2AQ9f0uF X-Received: by 2002:a81:4408:0:b0:62f:2553:d3b3 with SMTP id 00721157ae682-652d68bdcf9mr52151327b3.29.1720193932085; Fri, 05 Jul 2024 08:38:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193932; cv=none; d=google.com; s=arc-20160816; b=ih7KPAKD4ERV4xwas00S9I9MfMF5jxelMb2kQzvUhSG58yIu2S7gZF78emGZbSPkbc tma4f/+qL/Rw3EyiUIOW2nGN14bdkNQ+Jj2d2J7naTpZVZzVjFYTJEvoRtzjN4Zahk0+ rj0kJ3OGHRxYA01DpNfVsOwHrLyjW/x1M6wx9xr6ICHfDYdQOYVIGyAH1K1Wyrl1vDZF iTWFY0aIPKgotOOycZybpJDOxi3FjGqjkE7wB3VafkMFaEDAq7SO8pt01oxfk1iue5Ft wxPjzpBSz2Q22Yg+o6WHlo1Dku0mdp6/mYjoLJtK1sAoA0yofadSPWdnP6pPGEp8vt7w HkpA== 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=yODWEb1vcYCc/9pyRjXwD+WI1whqQ36urKRs7eztwzQ=; fh=DRz3T8hy46IOIOI0+1PyoMvsH/I8h2Md0cQSsMbTLVY=; b=lffk0gm/Atp6Y5XoMklqOE3KLYNmm6cDkVt4z3t3xMoQfn3HJjqw4L3dWl7xQ41XlM whRt3QwsJkOORYcriOzSe73NV5Qt288LWvYeERc5A+Tf6P1d2SzZWg35trwAzujFQnk3 MEPVAx32wOvANQrzqF9oeu9rZhMhGuvu9RoWMDEossFMYJ7YiIRTW7zdv13rgkl4zcS3 Qw7JQPb3mFIEKSS/yEyuiq+cKwvDX/S6OiuaIuZdJV/mbrdo+vxEGP1Q9QlkztLhmhHN xnrpdDr4W71rJt9bq489VT35kj6nWI50tTqjEkQ53xqUF5MOtrQZ/ktm8WVTjiDEoP8Z qhNQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FUxHJhzy; 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 d75a77b69052e-447d7d4e9b6si11245031cf.269.2024.07.05.08.38.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:38:52 -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=FUxHJhzy; 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 1sPl0B-0002of-2q; Fri, 05 Jul 2024 11:37:35 -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 1sPl02-0002dY-Dm for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:26 -0400 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPkzz-0001J6-LN for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:25 -0400 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-52e976208f8so2006598e87.2 for ; Fri, 05 Jul 2024 08:37:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193842; x=1720798642; 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=yODWEb1vcYCc/9pyRjXwD+WI1whqQ36urKRs7eztwzQ=; b=FUxHJhzyg4AMlhXoDxktgeU9WXxBc6bcfh3t3iJWUWKsiUiPivNJkAqSIk8Hav8eKS 8uwb15BJhLLZYN4etVQITdCvXvWPTKEAH2LZixf2qT3sJ9izBihdawT7P9IBqaAfNqZc PxpQgrOV87W/0so/ffEjyaKNyTElheQIf6xyuqJMZF4N+iz6Dh2k2CIM2zXdqgIEXlCQ u6oy7P5FHYvB9lwbVP8YCYdLI/fIeXXlEXtXaXlG9Wev4q40MKXM9pxH44UfBpAH3DKG 0Yl4uqDYongF4xJK7IcPuija3KDB2MXtwAvxdBvha9CD/Wk5zjhW0PxhwMdVD1JFX1sx un1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193842; x=1720798642; 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=yODWEb1vcYCc/9pyRjXwD+WI1whqQ36urKRs7eztwzQ=; b=D41wt7RHMxxx6QYooI17hnqpyPfgtdn74vvA4CwALS+opohBvA4t2IIRMa9oHmZL/X /3v6LIJ451MjBCDS4oC9P929+NJ6+myYaLQbqNfRL25rGmC1ch1jDIT4AW4eLrn6koI/ 4nsxntRyrKPtiaw9YYNAzb4t9o/2RN7DcN8DEmVy5OTBX9oIyjOe+D7QVPbvthTHdukV yWwLOzZ2ifiFBwG2zKJTsKzamTwOAYs99d66xIG7z2DK24qwEYh3WpOlsbegslZVZAIn GXIuCp3iPvvIudauhE+hQOtCZ8CP0ufTyLRQLeKqTduwo+0rPWuppPu1gyRmLbX0nReh lgHw== X-Gm-Message-State: AOJu0YyVPcQsFvbQS3qTsiGCU1422O7v3Ucu/SqevnyiX3+VU21juw6K MS4JxjWP+xgoR68z19O7C92fZ4Z4F+qRX+qIByZ31GRpRPDtGgmeLfrFVrM48e0= X-Received: by 2002:ac2:4115:0:b0:52c:f3fa:86c with SMTP id 2adb3069b0e04-52ea0629bc7mr4008184e87.18.1720193841693; Fri, 05 Jul 2024 08:37:21 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a752cb50dc7sm417579466b.101.2024.07.05.08.37.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:37:20 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id B6DD35F92A; Fri, 5 Jul 2024 16:30:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Akihiko Odaki , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 18/40] tests/tcg/arm: Use vmrs/vmsr instead of mcr/mrc Date: Fri, 5 Jul 2024 16:30:30 +0100 Message-Id: <20240705153052.1219696-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::136; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x136.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: Richard Henderson Clang 14 generates /home/rth/qemu/src/tests/tcg/arm/fcvt.c:431:9: error: invalid operand for instruction asm("mrc p10, 7, r1, cr1, cr0, 0\n\t" ^ :1:6: note: instantiated into assembly here mrc p10, 7, r1, cr1, cr0, 0 ^ /home/rth/qemu/src/tests/tcg/arm/fcvt.c:432:32: error: invalid operand for instruction "orr r1, r1, %[flags]\n\t" ^ :3:6: note: instantiated into assembly here mcr p10, 7, r1, cr1, cr0, 0 ^ This is perhaps a clang bug, but using the neon mnemonic is clearer. Signed-off-by: Richard Henderson Reviewed-by: Akihiko Odaki Message-Id: <20240630190050.160642-14-richard.henderson@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-19-alex.bennee@linaro.org> diff --git a/tests/tcg/arm/fcvt.c b/tests/tcg/arm/fcvt.c index d8c61cd29f..ecebbb0247 100644 --- a/tests/tcg/arm/fcvt.c +++ b/tests/tcg/arm/fcvt.c @@ -427,10 +427,9 @@ int main(int argc, char *argv[argc]) /* And now with ARM alternative FP16 */ #if defined(__arm__) - /* See glibc sysdeps/arm/fpu_control.h */ - asm("mrc p10, 7, r1, cr1, cr0, 0\n\t" + asm("vmrs r1, fpscr\n\t" "orr r1, r1, %[flags]\n\t" - "mcr p10, 7, r1, cr1, cr0, 0\n\t" + "vmsr fpscr, r1" : /* no output */ : [flags] "n" (1 << 26) : "r1" ); #else asm("mrs x1, fpcr\n\t" From patchwork Fri Jul 5 15:30:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810420 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp1669901wru; Fri, 5 Jul 2024 08:38:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVfprax+6aeYKvWsuD1Zo1yoqoHysSNBH72A7QgCq85CDE8gvnchnRknxiDA5QuLcr5mIEDKd2wUbamcBAR0kuR X-Google-Smtp-Source: AGHT+IHSkI5TVmJ6hYyTLkrjKWU8Q4/U2Pa+FatcnkEvwAc7glhAmlzo8iFzS+RFGUGh7wx+feV1 X-Received: by 2002:a9d:7acb:0:b0:6fc:3202:2146 with SMTP id 46e09a7af769-7034a7ed1fdmr5114464a34.28.1720193915736; Fri, 05 Jul 2024 08:38:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193915; cv=none; d=google.com; s=arc-20160816; b=q2eRH2ErihuuqsPyR5Eyu51lzYO1vJMX7L6djN7YAgXsFb9SHDoIXV+aQMMRLoo2zQ LG7hA1ZSO0P8rk+sncU7SzacTeN4/YbkGVW6Qx/zeoOFaLaB2EYlMC/8twwbDFhAQm68 nyi65uYxSXLGAAUzviygGd4GorZ4QrWzFcIKeLN9Kz8q9JLA0ht0ujkvBRWLN7Z4Egpe QN8gyOZ1b7mZgvFOe9+Xn2sgb3SU7jUoRTB7YscK6vnArxRvanrVZejVGSrzuDW+Rk+f PwtEBgO0AyDluom6UqVA4UDI8Dih33dGb2kirFCf/RSBLFT9MpWXT7QjKyGcOuFVlxbs uh7Q== 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=n236Rd+ZsQdBpOfpU2JzZjmyVcpBVPLX43laLzo8bCU=; fh=aSwBcz8NuR7InfimTbL/RipGztZWaT5WjeUUk3m4mA4=; b=ucRwlrYMRfLzmwOJluqCokoUwYXMqs5OecRRh7B5ubKUYCnil8WBlnG/8oqaFyWygz ThYT1vhj0JCAsgTFVb3v59sCkC+vLgPJbTIwPbmYsgQbnxv/MsfExWgdyLJeXAe5+4Rd WmC9IMXHZr0GbS1sGAoqd3zjXKGf/qZAwP1HgnSfDxKl+T+RJY0CNf2kf/IoysedWxkH GwVwjgKE1cAXoWJzwdLNVX/ggE3xwWgJOiGlS+14YkRnWuwdPYJhbTMVBdCIzU3diujN 9EGudFDpoGJEQTAfJMZdLAOOdW0I1VM5tEluv68uF02YK6ThFIUKye4CgrI1Ps+pM6DL nH/Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="fcMOHP/x"; 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 af79cd13be357-79d6934d1b8si1686694885a.774.2024.07.05.08.38.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:38:35 -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="fcMOHP/x"; 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 1sPl0B-0002pr-OK; Fri, 05 Jul 2024 11:37:35 -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 1sPl02-0002dl-Qa for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:26 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPl00-0001JE-0m for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:26 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a77b550128dso228461266b.0 for ; Fri, 05 Jul 2024 08:37:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193842; x=1720798642; 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=n236Rd+ZsQdBpOfpU2JzZjmyVcpBVPLX43laLzo8bCU=; b=fcMOHP/xRw1Ihu5WbaqRNOzWTzsxWxKQCxeWvoMez8bFVb071MtwFBvbXh9VhqlJ8p ZpQjbA3Q72/0oy6Rg4v4dsBTcy9TPChd0PnayRYLDgEwjzW9LGXjTwx3vkaCqR8kaDjj e1A82X2qKIAeAzCj1T660VOoJWS6Y4DDgUh62uWYq5IeaUDbedwOL4u+hyw3wZWVI8OV vF77wxCruGyCLpSrSnC8p6f1pq2ZROihwopmA/nivRIm2XnQzPAbVt2wNgavz0M/Ea3H rtCchRTs8+xhLiqOMoJwSnfuFPki0hgif1AAO2ePiPJVQmQb9DYKOVfSkPaQrIukiKHV viVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193842; x=1720798642; 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=n236Rd+ZsQdBpOfpU2JzZjmyVcpBVPLX43laLzo8bCU=; b=f+3JnG/0i/hMjon9GCb9j4jDVj3bEF1Bx+zF8uc0ZyI9rZgG3q2ZJgw4cVuC5xFRa3 ewRp0n1+QTU/uTG35mMQoUA1GptLbBq4vE4yEHMzXMT4aKuNkXTRDA1jxh4LDjfFPCnz CWarqb7SLzDmHCxsEQs9CsF99fJay/rdUf77o2zEcFZeDxjfmBGBo9evTCKCKbSP1wUZ MrB5tLfH6tLi/WlsNVe31VjvGw79qenA+WDKU+pnD6BbVkzpolwhcM8+V0tcS9Xw/4qr bLx7dCTJ4X/QXfPUyi7KZ8TtI7bVigu2peh8523ZncGxTTIwhMTPOd0xrzFCUvR/zX5e fuxw== X-Gm-Message-State: AOJu0YwvWWUeXwPiO/322npYd1z6qAGzE2cg0JM/Ftg4XRBQvPTG/xGh +0bau+XJRe3CdID7xcuk58aZhJjSbXDV+T/kbHLeSt2oQ4P+uOnafD/eqUnQqG0= X-Received: by 2002:a17:906:c00f:b0:a77:dc23:5625 with SMTP id a640c23a62f3a-a77dc235698mr55196266b.22.1720193842229; Fri, 05 Jul 2024 08:37:22 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a77dba80177sm25511866b.30.2024.07.05.08.37.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:37:20 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id CB2666211E; Fri, 5 Jul 2024 16:30:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Akihiko Odaki , =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier Subject: [PULL 19/40] linux-user/main: Suppress out-of-range comparison warning for clang Date: Fri, 5 Jul 2024 16:30:31 +0100 Message-Id: <20240705153052.1219696-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62e.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: Richard Henderson For arm32 host and arm64 guest we get .../main.c:851:32: error: result of comparison of constant 70368744177664 with expression of type 'unsigned long' is always false [-Werror,-Wtautological-constant-out-of-range-compare] if (TASK_UNMAPPED_BASE < reserved_va) { ~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~ We already disable -Wtype-limits here, for this exact comparison, but that is not enough for clang. Disable -Wtautological-compare as well, which is a superset. GCC ignores the unknown warning flag. Signed-off-by: Richard Henderson Reviewed-by: Akihiko Odaki Message-Id: <20240630190050.160642-15-richard.henderson@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-20-alex.bennee@linaro.org> diff --git a/linux-user/main.c b/linux-user/main.c index 94c99a1366..7d3cf45fa9 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -843,6 +843,7 @@ int main(int argc, char **argv, char **envp) */ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" +#pragma GCC diagnostic ignored "-Wtautological-compare" /* * Select an initial value for task_unmapped_base that is in range. From patchwork Fri Jul 5 15:30:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810434 Delivered-To: patch@linaro.org Received: by 2002:ab3:6bc5:0:b0:273:6c53:9181 with SMTP id v5csp531932ltk; Fri, 5 Jul 2024 08:48:03 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX+wlNjjfPn14UFcsTolMgTu0J66r2bZq3r0to2zWhHUz/mEdi915jvhORsyWUwPYvcxaNtg38JK8ZnC6PJlQYl X-Google-Smtp-Source: AGHT+IFLVawd7h84SeJCc0fTZroi+CfS2tWZMg0JP1YZ+puNGPGMpb5gJkenFLE4YL6OmOggzjVe X-Received: by 2002:a05:620a:29c3:b0:79e:ee30:2e81 with SMTP id af79cd13be357-79eee30305dmr587527585a.10.1720194482677; Fri, 05 Jul 2024 08:48:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720194482; cv=none; d=google.com; s=arc-20160816; b=YkuEnXTTHAf9rZlhMx5a8CsPOCfV4q9sCPBD//6dA6uPsaPlYrN2+lXAO4O7NT9kHB MP9HeOcSaVtMWs0ezZf/oGSnB4xC9zfo5Y2teG160SDYpKGtYGdvCzdc60+6ya+1Z9wi vNzKju0jrZqTrPDUbiM1LqUST7IV7GYcj3mK+b1OkKX2WF9xXzlM7hue030Us7pRKzY2 4cOr+Cw2BPy2kKRrpXQnqUc8rGT7i14nMajqitY8xQSfANIoQkxbbjaYgQIcljMqd9tE aX0FohZT7dwY94j9VomxsUtieTmcI93VYofCHkuj0ujx5cZkv5INmHp3TEKJ2Cp+jqV6 RO7w== 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=rcX3YpwLOTpsYf6Zhkg5VHQ84A4CmDm7f1BhkBXtQSg=; fh=MB7eYd7rnLrXI3nJ9rdxTzQtDWXNOvVrI/pGOS81ev0=; b=fwWkKeYKHf5xiF8XY/hSRUAciiBNVOJboeYH40OwNoJ+sbe5AUFiarHPQa4ffRDVh8 Fvwy++OfziiIkIWNwaPkpAiTkCY9jXCXHvlmyoi4mV0AUgzObAarKxaWKue++e8v/2Aa d+QUA5lHYDb1juk8cjYnJmUZbk59JLTblhSHUmaxX/gCnh4NcQq5G1agWi7v+CBxumdI 1sv0zIXZyjcR01ViU0IW6/y0EtMhI1Hq9lkTFFfoCgQ1oqiUFPqNFAXc+VkbOqZzLvKa uLVGZuItfECesL6u2mbMzPiUOWHfA+wI2LTwAPyqVgWZ3gwgzJy+Ayn1Epw1DBa+VOip gN0g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v6x66gDW; 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 af79cd13be357-79d692881c5si1691532985a.167.2024.07.05.08.48.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:48:02 -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=v6x66gDW; 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 1sPl9Z-0005m6-Rj; Fri, 05 Jul 2024 11:47:17 -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 1sPl9Y-0005lx-FE for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:47:16 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPl9W-0005dj-Tp for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:47:16 -0400 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a72517e6225so200780166b.0 for ; Fri, 05 Jul 2024 08:47:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720194433; x=1720799233; 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=rcX3YpwLOTpsYf6Zhkg5VHQ84A4CmDm7f1BhkBXtQSg=; b=v6x66gDWZIcj7Rb9RA3+pRjGb9NtRY19pacTflwaG2+Vo0C9XGMC+hqQ1xCvCuAP7r W3kjfk/T8eqMIhr/W6AHeuLPVZ4pYgaXxijIkZ082BaEci+809NdEXuIe/FouaNuTmqu fNNlAuM5IQ/rwgkL0tTRvse/Dxo7m+VQgzSjztcO7YbOuAWOQX6iPndY26lSc2KHoB+d IXuX+37ijJNvRK4WRUDkgjvHOnst/tWGhVxw44RIOFsohocqhtDBD0GU0z/XM3/jjYmg 8lFn+s8vjLL4CQqKd/cFFvL6hYsgUEP2iIsyU3fNn3Ckaa6up8xuNJqoS9zo13ENp2bt AFKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720194433; x=1720799233; 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=rcX3YpwLOTpsYf6Zhkg5VHQ84A4CmDm7f1BhkBXtQSg=; b=SmVkYPFdv52ZkjlaIk6HoXrNqXGOM4NvgEXa2DihH0lg3soYbFC6YZWf7gW2ZiRwDo DEH1fPWfuwMmiZQSig4n2aO38/CdJsm/APz4QRMl5LTGdKWa6isHWEwVmNVifTTyN3cl z7aHk6JcC5p/p1yZzThd5J+rg62k2YcRiw9FJ0Mth2+9eueuBZPKMwgMNdCS1QzcYnS4 OH8WAWvP2RXYMX6NZd/9olnat+IBnq0xtVz9y9obBGzF8TJX4IHvZOU5aj9mRhM74NrU GbJ8U0LEEH5jWzd7hDUqB2mnBf/KYQmWEtd3q5lnqIVcp+i4PxB4cTi6bGnbreZNIz3V pdNQ== X-Gm-Message-State: AOJu0Yys4yT/j8672BHUjFROciVseKdFwGAql/tKusoW3Ikj+0QYLZwA qfrr3Ow3FLH5yY8gWsayOsuUHMF5JpsbqH9EkwveHNnSakSoObyY0IFCe3GufsQ= X-Received: by 2002:a17:906:8746:b0:a77:c5e4:eebd with SMTP id a640c23a62f3a-a77c5e4f35fmr225965566b.26.1720194432531; Fri, 05 Jul 2024 08:47:12 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a72ab065672sm694985966b.136.2024.07.05.08.47.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:47:11 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id E421D62139; Fri, 5 Jul 2024 16:30:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 20/40] gitlab: don't bother with KVM for TCI builds Date: Fri, 5 Jul 2024 16:30:32 +0100 Message-Id: <20240705153052.1219696-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62f.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 In fact any other accelerator would be pointless as the point is to exercise the TCI accelerator anyway. Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-21-alex.bennee@linaro.org> diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 425fc6479b..e3a0758bd9 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -635,7 +635,7 @@ build-tci: - TARGETS="aarch64 arm hppa m68k microblaze ppc64 s390x x86_64" - mkdir build - cd build - - ../configure --enable-tcg-interpreter --disable-docs --disable-gtk --disable-vnc + - ../configure --enable-tcg-interpreter --disable-kvm --disable-docs --disable-gtk --disable-vnc --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" || { cat config.log meson-logs/meson-log.txt && exit 1; } - make -j"$JOBS" diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml index 3de0341afe..cb499e4ee0 100644 --- a/.gitlab-ci.d/crossbuilds.yml +++ b/.gitlab-ci.d/crossbuilds.yml @@ -68,7 +68,7 @@ cross-i686-tci: variables: IMAGE: debian-i686-cross ACCEL: tcg-interpreter - EXTRA_CONFIGURE_OPTS: --target-list=i386-softmmu,i386-linux-user,aarch64-softmmu,aarch64-linux-user,ppc-softmmu,ppc-linux-user --disable-plugins + EXTRA_CONFIGURE_OPTS: --target-list=i386-softmmu,i386-linux-user,aarch64-softmmu,aarch64-linux-user,ppc-softmmu,ppc-linux-user --disable-plugins --disable-kvm MAKE_CHECK_ARGS: check check-tcg cross-mipsel-system: From patchwork Fri Jul 5 15:30:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810426 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp1670114wru; Fri, 5 Jul 2024 08:39:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWvYtPGu4wv4CFpvHAi8UdZraEhTMcK9BWiRdPssAdL8+wUmBjFI8T42xpcHY8C8lA6kzqEPHoDSwi8/V7NPV58 X-Google-Smtp-Source: AGHT+IEXzdJDQkAKMf4vG0eqj0npuY8pvWtuJkjfQXYBgavaGIUwr7SQZsE/aYwFoE+Xo7H85aIi X-Received: by 2002:a05:620a:46a8:b0:79d:67b4:e0bf with SMTP id af79cd13be357-79eee1c17d5mr579791085a.45.1720193945256; Fri, 05 Jul 2024 08:39:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193945; cv=none; d=google.com; s=arc-20160816; b=taRW2c9dV1g6jLzubbQ8QN3Dg1fAwtqMmCa0sI54WOgPt3sq5EKyYItXT3kWU40reZ vSGtA8vI1A6D+YGtMWjveK+f7mpQqpFZ20YZgD2KJqL8OhuGIJCtdb6x/H2CrrLks4k7 z+kSZkkEJjexTBXmnbym4Yoi4ijBU94dPTjaDgHJkzRHy4QM0L6R/XxhA8geoTPE2zQU 6nC5JDsFiWsqBXd35Jv+bTlCyh+QOXl/WF1TMWiHnjX/7V6QsqCZZcEdle+Aam50Umos g3XKWyPgArotV4a3edLupDksTZTiZR/lPqMctOuQqKnTpmDKeixYckBW43US7HPMvOsy C48A== 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=0dlqVxV0N2PAZeKsvqSde0gH8murih16mQWVBlzmyoo=; fh=aiZZfsPL0mb5SWaIEkEIhV9A861gmKPH5EWZ09/byvk=; b=L6IxUSiZfWYPbIEPPSfwu2fmzhKLTGFP532P8mopwhUbdEF/TSW9EkX2Fne/faigb0 cgX2CudxIoi/+nkU+OPZd/X0OFVMHhTs2OLXY37Z2M2Y4UTM6NagQnnhuZ/wzUsFY9A/ Y7UXRWmqNKIGDqNzYm6bh1ZHzWkJfNQ3hBfNfWDchgaRBHNRPGuNXfuwKingM2x3+BKb qIsW/4rrE4ageGmDrfc2FsitsNKDL1MVlvAUjbpXo25G6LeeRNh69IwI87SE5UbcCHpL I5NoYUVzVWhHF406E4nWNv3xPAX9lVYaOps/Krtpai7zBTKp6vN/Y3iaGMhSf2/RxSTl XyPA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=opyRY+Z6; 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 af79cd13be357-79d6933ab13si1722697685a.579.2024.07.05.08.39.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:39:05 -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=opyRY+Z6; 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 1sPkzy-0002bq-Fn; Fri, 05 Jul 2024 11:37:22 -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 1sPkzt-0002aZ-P8 for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:17 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPkzr-0001Gv-Ma for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:17 -0400 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-58b966b41fbso2492910a12.1 for ; Fri, 05 Jul 2024 08:37:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193834; x=1720798634; 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=0dlqVxV0N2PAZeKsvqSde0gH8murih16mQWVBlzmyoo=; b=opyRY+Z6F3kWtt5Q+gralYQACf1pNgoKANX1Nd/L5WCeE0NIwSMflaM/q4O2uzixO7 O3YkX9KXz0iwPpugj0/fjE9TERNVPNBlwC0d/V+4NvZbiOJV3BQ1BKiFOFZAreKLxsWm vHERnryTXtb0vid5KOcoqpGFk5Qrcs9A+9NhFVQMPHQ/4JpC9A7AiEDiYj8lmDCVWEab qRZRlPpAyiN7n+TPDW4wMcFShcZ1DOMmLWMv/hWNHPlcFABl+Xc/0no3CpA98Mkr1Pyx +hzifHzqZHw3baajGhAZAvWnwE711P3pDEsosPHoBuYmKKdYynvXQMd0r/dXooFcKfH8 GOww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193834; x=1720798634; 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=0dlqVxV0N2PAZeKsvqSde0gH8murih16mQWVBlzmyoo=; b=J20LyX025Wz5hENEZhz2r7gxL3C9BouAqEcKkHqCbDcUuCUOpuL5TuN2hyanFga7wi XmRBcvGGyTOOkRISZjHzltMSXNiZWSi6tA25jbljmAE6ni+KKh4iANuWAZQrtCY5IdZw uUQHLKLeQLagG0tR9B951CTZuIqrhIKcg79vmcLjsrLf/d7DvV8u54nKq/jILrgVNCmp g4s/BjgN1vffM+AAeLzbSKSgV8jWjQeU0VtyJDEO6PZGECue53DFRcPujBM7gH8XHEQe zrXLwOiPNdOUnhgI2T3rieDa2ROSJeqTq2yO/O96Z3/HY+4GAERh/XZUI01YP+AsAY3Q mcfQ== X-Gm-Message-State: AOJu0YzTm/mCWB0TUhAS2ERm/JD38FAYRWKLWFApsqXyWtY6cI/hwKuM Wmhf2hY3BFCgqEWDnAxWcG28Nk85Pn5T9iptxcSOGDPStRHNNpEyA9JFkdiMO6M= X-Received: by 2002:a17:907:76d4:b0:a77:dd5c:d7f4 with SMTP id a640c23a62f3a-a77dd5ce42cmr45292866b.15.1720193834020; Fri, 05 Jul 2024 08:37:14 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a77cdc2e039sm56103766b.28.2024.07.05.08.37.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:37:11 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 086EB6213B; Fri, 5 Jul 2024 16:30:55 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Manos Pitsidianakis , Alexandre Iooss , Mahmoud Mandour , Pierrick Bouvier Subject: [PULL 21/40] test/plugin: make insn plugin less noisy by default Date: Fri, 5 Jul 2024 16:30:33 +0100 Message-Id: <20240705153052.1219696-22-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x532.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 While the match functionality is useful lets make the verbosity optional while we are actually running. Reviewed-by: Manos Pitsidianakis Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-22-alex.bennee@linaro.org> diff --git a/tests/plugin/insn.c b/tests/plugin/insn.c index 5e0aa03223..524f9ddde8 100644 --- a/tests/plugin/insn.c +++ b/tests/plugin/insn.c @@ -20,6 +20,7 @@ static qemu_plugin_u64 insn_count; static bool do_inline; static bool do_size; +static bool do_trace; static GArray *sizes; typedef struct { @@ -73,30 +74,30 @@ static void vcpu_insn_matched_exec_before(unsigned int cpu_index, void *udata) MatchCount *match = qemu_plugin_scoreboard_find(insn_match->counts, cpu_index); - g_autoptr(GString) ts = g_string_new(""); - insn->hits++; - g_string_append_printf(ts, "0x%" PRIx64 ", '%s', %"PRId64 " hits", - insn->vaddr, insn->disas, insn->hits); uint64_t icount = qemu_plugin_u64_get(insn_count, cpu_index); uint64_t delta = icount - match->last_hit; match->hits++; match->total_delta += delta; - - g_string_append_printf(ts, - " , cpu %u," - " %"PRId64" match hits," - " Δ+%"PRId64 " since last match," - " %"PRId64 " avg insns/match\n", - cpu_index, - match->hits, delta, - match->total_delta / match->hits); - match->last_hit = icount; - qemu_plugin_outs(ts->str); + if (do_trace) { + g_autoptr(GString) ts = g_string_new(""); + g_string_append_printf(ts, "0x%" PRIx64 ", '%s', %"PRId64 " hits", + insn->vaddr, insn->disas, insn->hits); + g_string_append_printf(ts, + " , cpu %u," + " %"PRId64" match hits," + " Δ+%"PRId64 " since last match," + " %"PRId64 " avg insns/match\n", + cpu_index, + match->hits, delta, + match->total_delta / match->hits); + + qemu_plugin_outs(ts->str); + } } static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) @@ -216,6 +217,11 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, } } else if (g_strcmp0(tokens[0], "match") == 0) { parse_match(tokens[1]); + } else if (g_strcmp0(tokens[0], "trace") == 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &do_trace)) { + fprintf(stderr, "boolean argument parsing failed: %s\n", opt); + return -1; + } } else { fprintf(stderr, "option parsing failed: %s\n", opt); return -1; From patchwork Fri Jul 5 15:30:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810429 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp1670236wru; Fri, 5 Jul 2024 08:39:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXXCax0Tnc+5u47UMZKUF978CS+eppYrpqJM9IV2GMTAYPCHaAZNH6or59IRdqUJ0zHhyFDPrHO685xm5f5qTqd X-Google-Smtp-Source: AGHT+IGjS0dch2j636TasjKieJRphZ4IBPTHnnVrfpTOE0Fb0Wn5gcrcTe1+fB28yJ8dvPFSk0Zk X-Received: by 2002:a05:620a:29d0:b0:79d:710a:e9af with SMTP id af79cd13be357-79eee273efbmr555700585a.60.1720193961818; Fri, 05 Jul 2024 08:39:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193961; cv=none; d=google.com; s=arc-20160816; b=ennw4x2xaruhXFyg58gOQargbelFkDe8gCEbzuC5zsp95WLH+sDivwTurKlbyxRgMl jbIjmIcyYsw8EjESKerw1xygQ0vNSBHlb268K+5Tdl94dXs0J50OYFLx7LTyrU6ZkI8f C1zwhUSs8/a6MH9CcQxJZpwaKJTQK68TIEvOJ4J++KcS3IE0U4Q8NStuiDFe3II3CxHN eNMnsXm4u2MvVvME4QlnlqvJmInAs0aKvyOSFrgvoREcIQOoXkr9Jz75GXPKEPmz/UjW Utpgkg8dIU5YjzuV3NfdxJG5clos20Th3TyR6e1rM1OyPXdhMOd6Q491mLw/sd/Oax1t vG3w== 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=Lf/1KqRAAMtl+wrn2ncS2jotaeqgCn1AGWcRKaNCTcQ=; fh=aiZZfsPL0mb5SWaIEkEIhV9A861gmKPH5EWZ09/byvk=; b=PStPBy7PYq7ZQxVgb13oicF0F8UhJXowMlu98eNAscpRQSgOR0zYoPhZ9cty0iJjYX m+3zLt5NnMrN6AbmtpUOBlIN3eJWVHO2bROM9oKz3lVqSkFheVTEL/tGaDSH7BbGYSYm fyuFZHBlD5AqQ0oh9aq0p1P6BsqPTcRkhVXzxNVjisMwj52nFDiVVNiIRVY4ll9E7iVS 8etg6fxPLhOS4qxqxDPBHABzsU9/Lx6oD8V88Cvi3iDrW2rNPFUn1FDYJOV8RVi8wKrF /gsf7rfaaGo0u+52QBkuh0fue+Nt6gjmBovUMotRFfTREIS4ww2TlPZbVZxZaYMVYJlf VIrw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="evs/7AoS"; 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 af79cd13be357-79d69338dc8si1701689685a.591.2024.07.05.08.39.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:39: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="evs/7AoS"; 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 1sPl0G-00038X-AB; Fri, 05 Jul 2024 11:37:40 -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 1sPl07-0002g2-5H for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:31 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPkzv-0001Hz-2L for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:30 -0400 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a77cbb5e987so100505266b.3 for ; Fri, 05 Jul 2024 08:37:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193837; x=1720798637; 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=Lf/1KqRAAMtl+wrn2ncS2jotaeqgCn1AGWcRKaNCTcQ=; b=evs/7AoS4FzAabJJkG/Qni7EPuOAn8rQuYS9W44G7LIhu/12BhF/7YPKgNzX0YJSjQ 4H2KfNtH+Iq4BSs4t5wswEJQ0ODJDSSTgxrbDt3m7TNhzfBhGRE8BjMF3IGqs4TlEWnK w1x+x2+3Jq5gyJfaYwjygR/6D467YVFMuSkvB8D2pcX7CHQ/x06jt1gRbkQaNfjC/Z7G /QF/WggxSYUfvZelkOgVUe6DILQ6rbjBDOr3FHeIoCxHHHUBFBrBDommRiRf4sZiPlc5 SngQlntEb15zAkdHaCAfnMBKFm/28J5Nhh68QjtykSXL04z9cDDTwhgnkLEFstIU8G+c QcjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193837; x=1720798637; 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=Lf/1KqRAAMtl+wrn2ncS2jotaeqgCn1AGWcRKaNCTcQ=; b=P1BbFa01ORhhkkeAookoJFX44IDk/BI83zxhE4yHctJGsbFlKSc8fOwOhuNsjI2wOo jx4yG6p0K0dNC8QgQbUwtAWITVbhNwkZhLB8mAtcAgF1Q3+umqS0BYx61fjHAlK+u4+v mzkQo5Efq8ukwHgdWiU/YQkhdaB81G8jLmOqGwfYvwfupILJRk3QDcAhHnOqvQwmr1Yz 9424F8G2bS+oWAf8CFgv1++noUZZ+aF5e3FxULMiWJgeDTTkUGTCeWU0wV5FL7uWqy5o K3lICuIM/UKSMRw1bbimVwPkpzK6tx24rh2R+1AZKxYMGCNKYLMxwYjn+hi2DKtO1ACQ XJBw== X-Gm-Message-State: AOJu0Yz/M5VvszwCmbrHfeEsLyyX7SDrdDo6Z/ZukxeOHRCmYKoTzdLn mMut7qYvTP1u7iSDj0DqBo7+9sWgQSTGGjwN7nRJDnfTBloSs/8tldzywUn51Qb/74xo5aa2BMh 9 X-Received: by 2002:a17:906:2514:b0:a77:cc6f:e77c with SMTP id a640c23a62f3a-a77cc6fed76mr170946166b.58.1720193837413; Fri, 05 Jul 2024 08:37:17 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a77cf0b9181sm54418666b.99.2024.07.05.08.37.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:37:14 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 1A3CF5F92B; Fri, 5 Jul 2024 16:30:55 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Manos Pitsidianakis , Alexandre Iooss , Mahmoud Mandour , Pierrick Bouvier Subject: [PULL 22/40] test/plugins: preserve the instruction record over translations Date: Fri, 5 Jul 2024 16:30:34 +0100 Message-Id: <20240705153052.1219696-23-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62b.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, 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 are interested in the particular instruction so we should use a stable record for it. We could bring this down to physical address but for now vaddr + disas seems to do the trick. Reviewed-by: Manos Pitsidianakis Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-23-alex.bennee@linaro.org> diff --git a/tests/plugin/insn.c b/tests/plugin/insn.c index 524f9ddde8..baf2d07205 100644 --- a/tests/plugin/insn.c +++ b/tests/plugin/insn.c @@ -43,6 +43,44 @@ typedef struct { char *disas; } Instruction; +/* A hash table to hold matched instructions */ +static GHashTable *match_insn_records; +static GMutex match_hash_lock; + + +static Instruction * get_insn_record(const char *disas, uint64_t vaddr, Match *m) +{ + g_autofree char *str_hash = g_strdup_printf("%"PRIx64" %s", vaddr, disas); + Instruction *record; + + g_mutex_lock(&match_hash_lock); + + if (!match_insn_records) { + match_insn_records = g_hash_table_new(g_str_hash, g_str_equal); + } + + record = g_hash_table_lookup(match_insn_records, str_hash); + + if (!record) { + g_autoptr(GString) ts = g_string_new(str_hash); + + record = g_new0(Instruction, 1); + record->disas = g_strdup(disas); + record->vaddr = vaddr; + record->match = m; + + g_hash_table_insert(match_insn_records, str_hash, record); + + g_string_prepend(ts, "Created record for: "); + g_string_append(ts, "\n"); + qemu_plugin_outs(ts->str); + } + + g_mutex_unlock(&match_hash_lock); + + return record; +} + /* * Initialise a new vcpu with reading the register list */ @@ -131,16 +169,19 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) * If we are tracking certain instructions we will need more * information about the instruction which we also need to * save if there is a hit. + * + * We only want one record for each occurrence of the matched + * instruction. */ if (matches->len) { char *insn_disas = qemu_plugin_insn_disas(insn); for (int j = 0; j < matches->len; j++) { Match *m = &g_array_index(matches, Match, j); if (g_str_has_prefix(insn_disas, m->match_string)) { - Instruction *rec = g_new0(Instruction, 1); - rec->disas = g_strdup(insn_disas); - rec->vaddr = qemu_plugin_insn_vaddr(insn); - rec->match = m; + Instruction *rec = get_insn_record(insn_disas, + qemu_plugin_insn_vaddr(insn), + m); + qemu_plugin_register_vcpu_insn_exec_cb( insn, vcpu_insn_matched_exec_before, QEMU_PLUGIN_CB_NO_REGS, rec); @@ -173,13 +214,38 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) qemu_plugin_u64_sum(insn_count)); } qemu_plugin_outs(out->str); - qemu_plugin_scoreboard_free(insn_count.score); + + g_mutex_lock(&match_hash_lock); + for (i = 0; i < matches->len; ++i) { Match *m = &g_array_index(matches, Match, i); + GHashTableIter iter; + Instruction *record; + qemu_plugin_u64 hit_e = qemu_plugin_scoreboard_u64_in_struct(m->counts, MatchCount, hits); + uint64_t hits = qemu_plugin_u64_sum(hit_e); + + g_string_printf(out, "Match: %s, hits %"PRId64"\n", m->match_string, hits); + qemu_plugin_outs(out->str); + + g_hash_table_iter_init(&iter, match_insn_records); + while (g_hash_table_iter_next(&iter, NULL, (void **)&record)) { + if (record->match == m) { + g_string_printf(out, + " %"PRIx64": %s (hits %"PRId64")\n", + record->vaddr, + record->disas, + record->hits); + qemu_plugin_outs(out->str); + } + } + g_free(m->match_string); qemu_plugin_scoreboard_free(m->counts); } + + g_mutex_unlock(&match_hash_lock); + g_array_free(matches, TRUE); g_array_free(sizes, TRUE); } From patchwork Fri Jul 5 15:30:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810430 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp1670263wru; Fri, 5 Jul 2024 08:39:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWCjkB47f3v8QlbhaG64aY7ha5AZgaemwGhk0debM1QWBYm4AV9b2mhcwmeM+JFZi9RcNBqPPkglCaT1j8T3wcD X-Google-Smtp-Source: AGHT+IHGRa5LOiKeoTcmV0/F0AutSCx4m+e5DFftF86xYlkbY0+dTLCraE7wcFFTSMYnn3EjsWRy X-Received: by 2002:ae9:f119:0:b0:79d:623a:6711 with SMTP id af79cd13be357-79eee1f669fmr440870785a.25.1720193967540; Fri, 05 Jul 2024 08:39:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193967; cv=none; d=google.com; s=arc-20160816; b=JrxmIkJx4P9oxODjo8apzylZWiZIgDJd8bg9tLcB2mESHk5t5X8Tbmh2ss59ZLxfv4 dE/0ldG4JV/+pY7kChXzgdPFVBvXQqH9iQ67Ze3UotyZObddYMMTNRODuISHPIhx8db+ bibkpNls+V2YFQB+MkToNtzTzPgTObZPFk07gAtjiCUjC1eUYY4Zso9donGy1hdB2ISX Ld3CPx/22W7rW8N/oZWsPR99iKkGGH5REAc4mnBD81JEw4gBbiTqW0YK3gEh6G+T2Qdj oD0Ytlw5rsRdmgZQcjuv7Iv7vPkS+w6NizPeMklubXaumgdzXhCsWW3fi7zZronSqS0t 2SLA== 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=UMmvQJJsx2DzZLMmy3nNlACqKsBlZyZqjVhcXblbIqc=; fh=aiZZfsPL0mb5SWaIEkEIhV9A861gmKPH5EWZ09/byvk=; b=VlU4s1dNLId3K0CYSkGPMnn4Jh9whR0WJepfQlxvW/H5XAP320l1Z+q7tX54nTxvyG NtIgo4GRxUA9oEnw1GO+6xQR+ovsL+MFz+R4YtA74Nx6Ts7o7IrQkWC3iwqeD6s3qXLx /8Jh7ghVUs0jAqgyb+//2thbfV/ENf2MKjdlB5lUN9LRGwNnutvqOpmSg1AOGA8luNAx ItDW0OyxcLJ8O+JpTKcLg/eYWfVMFiak2UHuj8ZogGlJsdJqsZajLuoUL8tmplyM79Xq EzXCWP/3Sqcbc3xUzgAF8PrPjtuiMqhxzJQ1GM8/9lpHPctsRTQQqy6k0zsUQFKaPQch nE7w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nBorfrRy; 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 af79cd13be357-79d6933b10csi1679994285a.641.2024.07.05.08.39.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:39:27 -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=nBorfrRy; 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 1sPl08-0002gh-VJ; Fri, 05 Jul 2024 11:37:32 -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 1sPkzv-0002bB-MD for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:20 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPkzu-0001Hg-6d for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:19 -0400 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a77c349bb81so135810666b.3 for ; Fri, 05 Jul 2024 08:37:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193837; x=1720798637; 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=UMmvQJJsx2DzZLMmy3nNlACqKsBlZyZqjVhcXblbIqc=; b=nBorfrRyWsoOAHoVOXgomwqnm7d5LAGTo2tozBUYS1MMaNyuuxrYZMqpn9JYp9zT4X JSzKvL9/KX+IDCFV28c6xNDfQzmYHqInMot/8oxJ0CyC4JkkxKrhpqXfi35rkSGjnuDv L8hX+PE/6wroKmXuUe5TEW99qhy0Jzyn6RXDkaWvgi5iUwVeEa2F1npNkkB/W07iI+aJ CaHMhsT2QLrOCDjZXNT1WAN8MJMtk+A12nhne5VztlU/bO8mneAql0CfB2rn6wNEb8dA dGHOyWX2Azv/cpkeZx2JgVUiyQ9vwL+SJ1ueXzymlTJOhjPzdV/PZO3kYT6A8FuZbcfA Avtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193837; x=1720798637; 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=UMmvQJJsx2DzZLMmy3nNlACqKsBlZyZqjVhcXblbIqc=; b=c3cpdPR8wnLB97U/admKbDycJyKo4bGnQSx7PuqRzF55VOS0akBDwoHwmD9eAByZmZ u4gz2DzUx1oUZaLKSJR0SdywqELfKQAM1Es7u0dg+DyNANIbmi9IIytONwKP2eBFb/I5 IX73UJwCxbVR16adeEKCbgMiSgIp5NM+poMLz/gYFC83V+8mDG46G6oW+DWNAJzLhAvT W0fgXNgCP2NWiEtEjn/6JD9/vD1mHqr/otDU5eyKvI+j2juTZSiS4ItHjXrJSkbKqbYJ bOEGgpVb+TeQLTGORS0hiBLoa5ZQYycX2U+AVPPngeN2kDQt0IK2ib/h7fYC+5A4L9u9 +vxQ== X-Gm-Message-State: AOJu0Yz4dNkmmWmeFkU/f30bISYTCfe0NfGD/m6Yn0/yglBUNHkVWwvd LhWF6C4AK5HYpB7HHXwe/LIMZy8HfGAt0+4jWtZ/hw6WAcDU0qNKB8HbNGFE0V4= X-Received: by 2002:a17:906:fa0e:b0:a72:8d2f:859c with SMTP id a640c23a62f3a-a77ba48deb1mr321164466b.33.1720193836475; Fri, 05 Jul 2024 08:37:16 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a754758168asm302976066b.80.2024.07.05.08.37.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:37:14 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 311C96213D; Fri, 5 Jul 2024 16:30:55 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Manos Pitsidianakis , Alexandre Iooss , Mahmoud Mandour , Pierrick Bouvier Subject: [PULL 23/40] plugins/lockstep: preserve sock_path Date: Fri, 5 Jul 2024 16:30:35 +0100 Message-Id: <20240705153052.1219696-24-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x633.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't assign sock_path directly from the autofree'd GStrv, take a copy. Reviewed-by: Manos Pitsidianakis Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-24-alex.bennee@linaro.org> diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index 237543b43a..67a779ee9d 100644 --- a/contrib/plugins/lockstep.c +++ b/contrib/plugins/lockstep.c @@ -347,7 +347,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, return -1; } } else if (g_strcmp0(tokens[0], "sockpath") == 0) { - sock_path = tokens[1]; + sock_path = g_strdup(tokens[1]); } else { fprintf(stderr, "option parsing failed: %s\n", p); return -1; From patchwork Fri Jul 5 15:30:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810422 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp1670018wru; Fri, 5 Jul 2024 08:38:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXkZ5jCj7hepTiRVBZkA2+bEXpM4zxRuA7nFs5SGESgf3+dP6e2n2IU3JDquKJIgK75lurmvNi9AMYcooRz0l0z X-Google-Smtp-Source: AGHT+IGs3EvVNHnNYi9edXokeMwU254WzbHWgxK8+uEw9xalFI9IyKwz/odKcnm0WR7cO2tsd7SM X-Received: by 2002:a05:6214:19eb:b0:6b0:5c89:a870 with SMTP id 6a1803df08f44-6b5ed01178cmr62061616d6.37.1720193931728; Fri, 05 Jul 2024 08:38:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193931; cv=none; d=google.com; s=arc-20160816; b=Z4TwpQtsqIPo4FkF1NW1+NDdwnMHERkujh5pqenoYVYKfVQ2KgaOU+PjpOunFKEdSn 7H3rZdltiaFfGUolZf8j5k4Kskzwbq6WGk+3mEHjXE2NBGpeq5GN+OXNZeWmRvhqhZMZ j+mPwFy/hkh2qJxo3aFairsudL5b/CU156CEvo7hWLym4RaNHsH/M+CG5MbgMToh4+2O mT+jAztXBJR0H/c9O1G4KtwfMLD21glpbDi95x6Yljh6T9PCrUHmvuIIGAMKH6lDT2lo qRtIffXyGmjl8qFVQEmy6ZBx2EkHt7yd6XKOYy21mC2Qlp9XGl2iHwWfiq8ar52j1z0w Vy8A== 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=RP3B/0cPkW5+Move7SaNmebJelEP2P1mPvRnO3rEjf4=; fh=WvKqo/mlKFqgmK0wspBnRrHpzgBONhrhcpU6oKdANsU=; b=a9r9eD4HYWXHIPv0aXUvU0E722tsnx0Fu3En+IMfODwS0R0+VgoBn2yz7M5Z04jDkQ Rdt3BqXnt1HuZ4APb81OX7ZBf+7lCxz1Sn12zztE0Aqpj1DVLO0Nz4BLIg+kkla7ntkU Rl9bwkXFQKQvISv7wRdePpQCJYqYTY8A3ET4+ionX5j7Upt3Yteb8OuEK7CRDhfPv7IS rt8Ogumf214XlI9W1JaSo4VcSdOh2ZoTOd458STLoWWrrYjNltHgxpMyYYkrTe6uYzbS q1PwTUT6/I1+8TFSXAVX57M2a1iDvmsxcR2zNemuP983zE3HlXWb0E+AlgBwDKzNlWx8 pzqA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lvuWJuOS; 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 6a1803df08f44-6b5f8a55d7esi15122936d6.110.2024.07.05.08.38.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:38:51 -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=lvuWJuOS; 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 1sPl08-0002ge-NZ; Fri, 05 Jul 2024 11:37:32 -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 1sPkzw-0002bL-4m for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:20 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPkzu-0001Hj-HN for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:19 -0400 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-58ba3e38028so2365220a12.0 for ; Fri, 05 Jul 2024 08:37:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193837; x=1720798637; 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=RP3B/0cPkW5+Move7SaNmebJelEP2P1mPvRnO3rEjf4=; b=lvuWJuOSWefr+gjQaTwklWxx6VQ/e/GNzz6gurV7EfnRg0A14rW8XpivBgCQyP0ptN SeMm9Uc4jpJTsNPGUEbD4gRR5R+k8KiukAk6jltJubbSYoCD2lRxZV+UAMhYyFI4O4LX C62BP3YJ/jeq4X5XRzUfAHsGMpO/72T7IV1X4BuaGMXgTfT3GWKmNH5Fch2H8VhUPKuz Q7tCDUIDcnAQxy79M/vGSLNkvOTHprtBcU7Sp5qbTPXGgND3MHDve7hWk99acl84Bxhf S6H9l6tBqacfSveLRxiGdA1r75qZDIUIBa4XPtIu9kv+sLDr8l2VHkeWRzDbjcZi095U dGxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193837; x=1720798637; 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=RP3B/0cPkW5+Move7SaNmebJelEP2P1mPvRnO3rEjf4=; b=PBHbZkRRi8NWwu9E2QapLOv00Mcdk54GAVNEI4C52Hqv7Qq3x3lOJH9VCXpVyNIaJZ j6oBPOeRMtPSvXP46jgtZXBE7ai2GcFu0x55XJksorG8mxG9/hqomHxlIPpPczyNo6vW 8A86arqZZvRGTUKWXe/4XJrnZD7XdSIorQtbVkLEJYBVhcGrSzKMimPbqqwROWvCtcVl pyIJnUPBFM8f7J9V5mN5eZRuOVmdecCnKAo0BtMC3YZPAOXKfpnquW+8VgqX5hyRQAa7 ZM8/s/MwPvt5fDGo1/RmLM89pMH5GkMVtALUO63qq5h7YO+r0/N8KFAG17gb0BKxFUVs YnWQ== X-Gm-Message-State: AOJu0YyV4aSRtPz7mtzT0wx8/DVsqptP5/efSrAHKkP+1A/epxBJ0TS8 Z8iIrROnLR3hsxO0+s8vC5gV90+lO6MYKB3OwPgI+F2ZiXzGruXtaIR3ifrDq0U= X-Received: by 2002:a05:6402:2548:b0:585:c001:c1b5 with SMTP id 4fb4d7f45d1cf-58e5a6f21bemr3745678a12.5.1720193836880; Fri, 05 Jul 2024 08:37:16 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-58f9893a747sm972496a12.19.2024.07.05.08.37.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:37:14 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 4891E62142; Fri, 5 Jul 2024 16:30:55 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , Alexandre Iooss , Mahmoud Mandour , Pierrick Bouvier Subject: [PULL 24/40] plugins/lockstep: make mixed-mode safe Date: Fri, 5 Jul 2024 16:30:36 +0100 Message-Id: <20240705153052.1219696-25-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52a.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 ExecState is shared across the socket and if we want to compare say 64 bit and 32 bit binaries we need the two to use the same sizes for things. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-25-alex.bennee@linaro.org> diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index 67a779ee9d..8b90b37f67 100644 --- a/contrib/plugins/lockstep.c +++ b/contrib/plugins/lockstep.c @@ -57,7 +57,7 @@ typedef struct { /* The execution state we compare */ typedef struct { uint64_t pc; - unsigned long insn_count; + uint64_t insn_count; } ExecState; typedef struct { @@ -148,7 +148,7 @@ static void report_divergance(ExecState *us, ExecState *them) g_string_printf(out, "Δ insn_count @ 0x%016" PRIx64 - " (%ld) vs 0x%016" PRIx64 " (%ld)\n", + " (%"PRId64") vs 0x%016" PRIx64 " (%"PRId64")\n", us->pc, us->insn_count, them->pc, them->insn_count); for (entry = log, i = 0; From patchwork Fri Jul 5 15:30:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810424 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp1670076wru; Fri, 5 Jul 2024 08:39:01 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWGRUCL00RcmrU5nS0vxK69ko+DUn+T09EO8y1PnZJ8npTQJKFXs7+f4DIcpYR1P2WhvRKXMHXhAob3NzqTs5CR X-Google-Smtp-Source: AGHT+IEl6Mss/5Ua4hVyCYxMeC/rmxpoFe0VyMuje+BrvwWX4PhucB6SdG+ZvwWOP9kS0fjShYBR X-Received: by 2002:a05:620a:379a:b0:79c:103b:af44 with SMTP id af79cd13be357-79eee285b8fmr473693885a.65.1720193941323; Fri, 05 Jul 2024 08:39:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193941; cv=none; d=google.com; s=arc-20160816; b=pX0CD0JmiX40WuiNc76O0NwxoaO2eQNFEfj/GtxdImp7xTwCi37tfotYQ0uRBTbaPf 9WP1O383HCY33FMRt5v61FEUkj4mBo4FgANCjkxdRD69nBl+EGb2JexR5PA5S4cY1qKa IJ3oKJ6lkoD3rgvoFu3/PHGDma4GUvT3nKWpI1CQJAodqJKKvu0ERjFRuSIBxVm744iR DJTBD/fmkD4KUw366GrUcRAymzhvBUum+J+egygl2Ju2qXT5q/thDKYc9wWJ1pZrP118 TOqZ6ZnvxY9P2UffW3KzuCi//AharC0LVAaSZuD1HME8n8T5LjZvqOz1pLaUvlF7j/vP Ow5Q== 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=ZNf7s8R2vDveHCOH4mOfJzT2WATK9n15xFa8GFpeYac=; fh=aiZZfsPL0mb5SWaIEkEIhV9A861gmKPH5EWZ09/byvk=; b=TGZN1G8GYEn5K1mKLevYZvyjW2vanvXRia/IMpduSVW77c4pEpnv80eyEYQ9jrjMLZ 7Zy8/1gG9E1i91d1UhbzfVfrJc6okeF5RUwQ1iloQNZ95ZnQpJhmonrsWAmZuftcXzUN ls62aQDCwvAkxg0wlUgVAea7tULX06S+nJA6IyJhra712acIt27MOjC0ZM9j1jtusNQv Ed+SJlC0lapGjNcbOSHd9pOsykCXnbPz1Mj7lxnOJ7NFvyPykfRjwqBY89DOPo60x6m8 DxAe2ZzO1mbHhUzEf2DQIBXN4h80AaFDkhn/MB2QjRnclNUVNi/Vs2XgOW5RsgDWFFic eh5g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Akjlxt9u; 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 af79cd13be357-79d692f01e6si1887854985a.374.2024.07.05.08.39.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:39:01 -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=Akjlxt9u; 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 1sPl08-0002gd-Oz; Fri, 05 Jul 2024 11:37:32 -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 1sPkzs-0002Zr-FJ for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:16 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450: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 1sPkzp-0001GX-Uj for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:16 -0400 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a77b60cafecso197590366b.1 for ; Fri, 05 Jul 2024 08:37:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193832; x=1720798632; 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=ZNf7s8R2vDveHCOH4mOfJzT2WATK9n15xFa8GFpeYac=; b=Akjlxt9uwyCF3QueVHdJ6ox/TaI7VGdVyJ8+X6SNy2Ai+3pVAVKCtwAezaFF61DHD6 V+9DYteSLwDdANn2PCMApmjw3QydGjKaLqDS2ayd3CO2Lb1WuzYP6hAz8JudbiaGQJHp zh2PE5HZ+B9yV3oqUUqxW1+BOQcwSvS2afgtDEU/iEDzgV91l3L3x5/GvDNp5PPe5Z8M osOI9FY5zvHzTJfUifceUv+lbggcj2tDAAxb05YFahmndJk2ipEBsLVZ8rj8pWld11EY 8j/zMboPl2QF5mxwb/zEEL3qq0lgl1vZdbq+2Re8quxNc408rsbn9OkMSEN7uCr6PoE6 IoQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193832; x=1720798632; 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=ZNf7s8R2vDveHCOH4mOfJzT2WATK9n15xFa8GFpeYac=; b=L1YyDrl5pvh9fwe2ARqcLsN0XqdBfi4JvtVwnhmGzFDortOuwImaRfQOaXukKAMX3i zbaYuPoTZRo5vKwaroJo+U5003gQn++OHeSRaRluO5XEa49nLwsvap+gZK0armmFjgkv 6cOyyYl7kT6Zk2gng2mly7QDHYkOR1D7PpzC5o2zFfkQdeyKXCjaVa2y48SxF3sIB+Ex Wo86vrihqvJU7+TRWjivux5VBlkQ/J+kLMJY2KwsW3mMa4q0lbCELdudCg1rA7685yk/ cg/kH05zBEg6pmvuz7SKZ8zOFQa2gr8yu9qr1IDa8DmynU9+7M52VlZzwnp6OvTcePHL 2ozQ== X-Gm-Message-State: AOJu0Yyp5EJciGM+P1pGqKJkLTatq+BzKjLsQUqHGucCJkgFVV7DVutq fMusXO332mbM+20V+PhezdYuvvVjIZT+nL53XWAZYNZSDVj+nQJGJHmhTKWoKjs= X-Received: by 2002:a17:907:97c8:b0:a6f:b5ff:a6fd with SMTP id a640c23a62f3a-a77ba46133dmr424780166b.12.1720193832252; Fri, 05 Jul 2024 08:37:12 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a77b6c8b69csm149544266b.45.2024.07.05.08.37.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:37:10 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 5DEFC6214B; Fri, 5 Jul 2024 16:30:55 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Manos Pitsidianakis , Alexandre Iooss , Mahmoud Mandour , Pierrick Bouvier Subject: [PULL 25/40] plugins/lockstep: mention the one-insn-per-tb option Date: Fri, 5 Jul 2024 16:30:37 +0100 Message-Id: <20240705153052.1219696-26-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-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 This really helps with lockstep although its super slow on big jobs. Reviewed-by: Manos Pitsidianakis Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-26-alex.bennee@linaro.org> diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index 8b90b37f67..1765fd6c36 100644 --- a/contrib/plugins/lockstep.c +++ b/contrib/plugins/lockstep.c @@ -14,7 +14,8 @@ * particular run may execute the exact same sequence of blocks. An * asynchronous event (for example X11 graphics update) may cause a * block to end early and a new partial block to start. This means - * serial only test cases are a better bet. -d nochain may also help. + * serial only test cases are a better bet. -d nochain may also help + * as well as -accel tcg,one-insn-per-tb=on * * This code is not thread safe! * From patchwork Fri Jul 5 15:30:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810432 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp1670361wru; Fri, 5 Jul 2024 08:39:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUBkEblZiXqul70kmX5e7GhPLilC9+EDbeoDkRE9yfi0NVUPoIhP58+nPRCWm98MMJ86Ybly3FsyI28uUZ8JNs4 X-Google-Smtp-Source: AGHT+IE/KbRwla3qn4VELcDw0J0eElf91+wA1AfjJyobfzOljCdM0UEbXQVF6vG1Im0F3rdXxQig X-Received: by 2002:a05:690c:6004:b0:627:ddc5:eb5c with SMTP id 00721157ae682-652d80377bcmr59775817b3.34.1720193983744; Fri, 05 Jul 2024 08:39:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193983; cv=none; d=google.com; s=arc-20160816; b=TXJTytEaOXk77cYRMuePMQgznRCmjd23Ch31n6v22Km+BltKLD2c7xAQy++SZ0xPU7 iuFSKruuPjazexcz0Si0EAqdGTcPIkC0UwUsbUUCxhk7/wcBKZPuH2rzARQxbqfohn09 M3VMNPrJ5yUYe5BGQBUxv/CMj8Qx8oWxjxqzHm7w7fSo0Nvqo52TsfBw7B0kqu/IOLM6 kt1hkzidTLEpjeLYTjQ/eDNEZrRnZXroH/7ylAF9HYkpMr4XxZTRyvCZpixvFzs7O9V9 kirFuM3Y4Qw9qlZBtwI1g/6K6Xe3i5CXRgAMlkDLg6PkmKTT8droSM+0ka0To7TTuvH7 z+vg== 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=WM8Oz4o9c2T29sVKmOxM7YRppBa9hMmSs60bXcG4GL4=; fh=FAL2D6uTyIa7tGzjyRrQN+DzefW95j5rgBe4AZL1gi8=; b=PA7yCwXKdSWs7sRO5v/yrAW9aDs8OpuULAxucgxvoeLqWXMsnNX28GvSATmDP66vzv Z49e2JBs/xoIDyp5Hvx0rYuEdw6/8/dLXb/P6AfUe0ArE4xL0XdopinuTGVku/DKtSUy IJdpAQZGcs0YTshw0UK94whMKMm02jJTDl/AtkHZ5h3tnQvsoZHZYKAX23DccTkAexl/ acG5J3+aTFPT3Yufn3RgeZutiV8M1EN7U4CBe+Rdfnm2C4sV9Fd3yCMjrRM4rgWLMpxs QxvlopoobBozW2ZchOYKFQQjo5obnbcMn1FVDcfrto1j6+VYcftA81YXEKbzK0fG65lA i3RA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fFLu3nfS; 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 6a1803df08f44-6b5ed272e88si37213866d6.548.2024.07.05.08.39.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:39:43 -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=fFLu3nfS; 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 1sPl0E-00032E-NF; Fri, 05 Jul 2024 11:37:38 -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 1sPkzw-0002bM-B7 for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:20 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPkzu-0001Ht-Pe for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:20 -0400 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-58ba3e38028so2365231a12.0 for ; Fri, 05 Jul 2024 08:37:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193837; x=1720798637; 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=WM8Oz4o9c2T29sVKmOxM7YRppBa9hMmSs60bXcG4GL4=; b=fFLu3nfSX4XXV8wpthNLS5Ml1/Vb35lL7gzgtD8R+3tj8OleGZ4BwWkdV0rIADfaom GFMoMnTBtB3KwAIK4qWFvtzXG58LnnHBFbPPHQ/wm8xvbUr4nDGuXF+Kaf4neIlJALra ALvZtRaki0dLPcDvjKRg70UQJVyKQLbSegohB4hw+mJqT4wky5Rrz8L8r8F2dTY5LGI3 lw6OzCmKL3FudHqAcHU1gNiodbbMX2J19iQw1TIwnzb01vN8tJWfsnBC/ZrZ8ieW+r7H ab/asXQCRbRKJrfC76p5/QYinSvln+7mus/0urOcXRzzH3hJ09BbihxNq8F+vKl2rsEY zyGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193837; x=1720798637; 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=WM8Oz4o9c2T29sVKmOxM7YRppBa9hMmSs60bXcG4GL4=; b=KZnPrvpU3a4JkCveesfPCT/bxvA4sOF7/3wqs6iXPe0+ycIkilMKEmmKTAEW4J7OYh IMlMNh/JqogX+PbRstjB/dBoEI52UKX9F9lRfNuBkffnZ1LAsRfGZlLf/KCpHMHZQAgh ipXCzfGQTETyCU0oKJiR22bYbKns+Zcr4+lzXGSt5BX1o7L5VBeF/5W/AaVue3ksKY2q 2Wvz19XKU9MA66XFTLUldT4KFscUqkYJAfEG0v6tLK2vb6eLSkp5rKVYxI+vBWHvJplF r+3EniVIrMg8/Xo93vJGLi/4Eed7aF+dhUxQcUTY8PJZTNDZ2jHNyb0KA856e5mNMoDT wP8Q== X-Gm-Message-State: AOJu0YyB5sgLtg+qb8hxhNTYoRpcDg9fVpCe8Z/9e1MCX5rHaX4Giz9i hSmSMgLWG68HWNgDtm5j+YsliRGbgRGaNe7xd7kEyk9Fpc16K7gP5zKm7eQ/jA8= X-Received: by 2002:a05:6402:2548:b0:585:c001:c1b5 with SMTP id 4fb4d7f45d1cf-58e5a6f21bemr3745694a12.5.1720193837133; Fri, 05 Jul 2024 08:37:17 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-58ec828b34asm1785413a12.15.2024.07.05.08.37.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:37:14 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 7384E62152; Fri, 5 Jul 2024 16:30:55 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Alexandre Iooss , Mahmoud Mandour , Pierrick Bouvier Subject: [PULL 26/40] plugins/lockstep: clean-up output Date: Fri, 5 Jul 2024 16:30:38 +0100 Message-Id: <20240705153052.1219696-27-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52b.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 were repeating information which wasn't super clear. As we already will have dumped the last failing PC just note the divergence and dump the previous instruction log. Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-27-alex.bennee@linaro.org> diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index 1765fd6c36..6a7e9bbb39 100644 --- a/contrib/plugins/lockstep.c +++ b/contrib/plugins/lockstep.c @@ -135,10 +135,13 @@ static void report_divergance(ExecState *us, ExecState *them) /* Output short log entry of going out of sync... */ if (verbose || divrec.distance == 1 || diverged) { - g_string_printf(out, - "@ 0x%016" PRIx64 " vs 0x%016" PRIx64 + g_string_printf(out, "@ " + "0x%016" PRIx64 " (%" PRId64 ") vs " + "0x%016" PRIx64 " (%" PRId64 ")" " (%d/%d since last)\n", - us->pc, them->pc, g_slist_length(divergence_log), + us->pc, us->insn_count, + them->pc, them->insn_count, + g_slist_length(divergence_log), divrec.distance); qemu_plugin_outs(out->str); } @@ -147,10 +150,7 @@ static void report_divergance(ExecState *us, ExecState *them) int i; GSList *entry; - g_string_printf(out, - "Δ insn_count @ 0x%016" PRIx64 - " (%"PRId64") vs 0x%016" PRIx64 " (%"PRId64")\n", - us->pc, us->insn_count, them->pc, them->insn_count); + g_string_printf(out, "Δ too high, we have diverged, previous insns\n"); for (entry = log, i = 0; g_slist_next(entry) && i < 5; @@ -163,7 +163,7 @@ static void report_divergance(ExecState *us, ExecState *them) prev->insn_count); } qemu_plugin_outs(out->str); - qemu_plugin_outs("too much divergence... giving up."); + qemu_plugin_outs("giving up\n"); qemu_plugin_uninstall(our_id, plugin_cleanup); } } From patchwork Fri Jul 5 15:30:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810416 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp1669786wru; Fri, 5 Jul 2024 08:38:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXp6HaD6sgTpKWYNVkC5U4nfcd6t0Q5sdJoYze4efiYHYeQ9WpQ9LsxLcOhfRRMCEPKl1oawzgvszNe+hvodnLz X-Google-Smtp-Source: AGHT+IH/tpdaXuWdWIaUSbkorI1ImzyFHqm7lYH6AtkfcTik9XNdK6cBI5rjVYbCz4GNZ5DyLJ6m X-Received: by 2002:a05:622a:1814:b0:446:4504:3c with SMTP id d75a77b69052e-447cbf3d988mr58639601cf.32.1720193895412; Fri, 05 Jul 2024 08:38:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193895; cv=none; d=google.com; s=arc-20160816; b=L0uCKfIgx+nKFhUVZQ96vU4iNYR0YvheBFeFIE3977uMEve5w6+Q2eXgl06ha/kPhi BDYnMmDb+tqIoEWNNX+yPG3D4kScGFyuPD5MB4YaNS4eebN7nIcxAimklRDWBpYQeXKz H5l6Y6dcy7vcIrxvrDIubG+SQhisM79PDQ8nhW8SrW0CDr7d15BeryIFACULS0IdgENh +GhreBkdiQyS9kM94imjksf69XiPSI7Rz2s2pYLGxUHQWcgyLmoWYBVhtNB+o/3LkdrS /XWLNLT4oUIVQ+A0HqKj6yhQFEZ/t7BrsVP2DGeot/+Z8TXAifSODXyGe8vD2Me+XWQM I2KA== 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=Ua23xrZ298Q42RDQyaYLhWTnQd77z5dPlxT8bKsVuUY=; fh=CrdRUL1fpLQTFCPN9ZMN8/bK2Q1k2eAmf1YOdKR0toA=; b=YBeqgPcP/i1f6F2wOAiFo3F6mz2BMKyIyUK4bs8i9br8ofpwFqtLOCd6fOAdRaadbH 3o6VyIz6xKDnY1vtPVGq+9U+B0yOHAKAGSEC46+kHKW40vLlfQkInBEtOXqtLsCJwz6R 5k1dmAnfjZmcjFBqGjUK2cKL0hGprWevuzJyoxRvNociH5V/4jy59LRXnbKNzJQ0fXpj wrc8r+qwTRx4R4PJ7+rkR8OqgZupmdRDKKjMxJA07ujp1AgHeJq9MBB4WEtGbWt+NgKA f4jTu5r4acnQphbXe7zt/A7eZlYKFzv+RSFbLQkQ8O+bVjQPL0TWL+MrzU5uMDo14A9Q 2GhA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T9OaeGVB; 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 d75a77b69052e-4466ff50f1bsi133953881cf.665.2024.07.05.08.38.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:38:15 -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=T9OaeGVB; 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 1sPkzw-0002b6-Gu; Fri, 05 Jul 2024 11:37:20 -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 1sPkzs-0002Zq-F2 for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:16 -0400 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPkzp-0001GP-Id for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:16 -0400 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-58b5f7bf3edso1118672a12.0 for ; Fri, 05 Jul 2024 08:37:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193832; x=1720798632; 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=Ua23xrZ298Q42RDQyaYLhWTnQd77z5dPlxT8bKsVuUY=; b=T9OaeGVBYQU0WVa+fs/1TSFsI2Ra0XfWN6SmbU2MCwsrwBM9Nd1NUlnHgpNVo3HMZU /KvfSlU7pS69DQwacEeFvsNy2MnzesDOqMfSwX9N1XZ8oACPR1bYcu9nyHRT80z0TwlB fEtNv9IWOAYg2hve9mKiLVhvIWoN+cDejvStI+rVwzXWQmu+Jg+kBrj5Dw5lrC+55DT3 m5QXW3lkoEP+tyQrvm0lHnQ2FwdhLMSgZLMC+vGSkOm0HvQ/72Ja/bKAwhV1mMdHiYfq cAjZRWnMIl5QSOuHBm79sFDE06VN5YdlbWfGhQ3/hR/Hvgui8YOr+DKps2Bn7S3iexD5 Zu5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193832; x=1720798632; 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=Ua23xrZ298Q42RDQyaYLhWTnQd77z5dPlxT8bKsVuUY=; b=p4D6qxljGzmHviwGs6cfIIXTFv97hXYpOz+JElLpqNZ/5QVgWiX//VxmCXGei7pC18 EiQnG686TeN3p+ORE8OUcUZlVoQ97KuQp9JJsq+HvP/0wjG+Qd8cS2FtntMK557VSGFv 6Rle/titkftRyBSd3NioLQ6vcRFzI/l1i+sUc27GcrDUt5SMUyuv46opGyFUcCtrzcXQ 7SRLuMnj2iyOQYh4pQd9ud0rYGmPCTZFVge7QrDYR+nR3r9driEDtGVyzkLzgRjKZkvl YioO8fs6eO8wQTE/bGujc4MA+v7a5gxGZZ+yl26tvzabIDCOxEVaP71sgt5zGSkR4L2E ucqA== X-Gm-Message-State: AOJu0YzcGPUcChp5U+uH4HLehFfquFbqaRPVhYGWnkkUKWWMa0YaMvHv W1OiAOlFZhpCHg5Z2QDjYJx4Nx6SbZSUspqL5OaA9NfcO4kCFI7bWIrvKgnLMDE= X-Received: by 2002:a05:6402:1ece:b0:57d:496:209a with SMTP id 4fb4d7f45d1cf-58e5994eb84mr4943921a12.6.1720193831410; Fri, 05 Jul 2024 08:37:11 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5907e4d79ddsm212536a12.59.2024.07.05.08.37.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:37:10 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 896355F876; Fri, 5 Jul 2024 16:30:55 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier , =?utf-8?q?Alex_Benn=C3=A9e?= , Alexandre Iooss , Mahmoud Mandour Subject: [PULL 27/40] plugins: Ensure vCPU index is assigned in init/exit hooks Date: Fri, 5 Jul 2024 16:30:39 +0100 Message-Id: <20240705153052.1219696-28-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52e.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: Philippe Mathieu-Daudé Since vCPUs are hashed by their index, this index can't be uninitialized (UNASSIGNED_CPU_INDEX). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Message-Id: <20240606124010.2460-2-philmd@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-28-alex.bennee@linaro.org> diff --git a/plugins/core.c b/plugins/core.c index 9d737d8278..a864275ae7 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -245,6 +245,7 @@ void qemu_plugin_vcpu_init_hook(CPUState *cpu) { bool success; + assert(cpu->cpu_index != UNASSIGNED_CPU_INDEX); qemu_rec_mutex_lock(&plugin.lock); plugin.num_vcpus = MAX(plugin.num_vcpus, cpu->cpu_index + 1); plugin_cpu_update__locked(&cpu->cpu_index, NULL, NULL); @@ -263,6 +264,7 @@ void qemu_plugin_vcpu_exit_hook(CPUState *cpu) plugin_vcpu_cb__simple(cpu, QEMU_PLUGIN_EV_VCPU_EXIT); + assert(cpu->cpu_index != UNASSIGNED_CPU_INDEX); qemu_rec_mutex_lock(&plugin.lock); success = g_hash_table_remove(plugin.cpu_ht, &cpu->cpu_index); g_assert(success); From patchwork Fri Jul 5 15:30:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810427 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp1670132wru; Fri, 5 Jul 2024 08:39:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXltFGTGbdlpGTm38tluzoAmBSX/EQFt8NXzEM3pFLFXWqsOC/L5Ejc4JkhSoS7caYrJLxYf60MgkbzY5PPcLxY X-Google-Smtp-Source: AGHT+IFrBwO9umcqdri5/IDWzQ9Oy70E2gMisByDu/8CxSa1buxr1hK20kh5IEhLP9l7iv8YbQRY X-Received: by 2002:a05:620a:2683:b0:79d:6c66:a980 with SMTP id af79cd13be357-79eee1c7358mr769390485a.37.1720193948213; Fri, 05 Jul 2024 08:39:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193948; cv=none; d=google.com; s=arc-20160816; b=iBkaB57c1Tr4Iz3FnUdMgOGNHNwJ2Qcx0Aq/cNMaUT6qeUdNvAQz3bK/ETRf58fshG YBTyv+gKFrBOSa978HpTY3jhEKczlh5DY2LDXnoDHDvCftiOZFpruEKEFSup3d2QGE7b tJt1RmEnixfCRGvFFR9P9krgKSE1FRkPF8XD8+HieXfoWF8PtbSriNzG4H5JbOnu5v1E nhq//c+cHL2idzm0VW+omsJM2IUSZs2dKcJJIPv3A0h4qSGmO3lc+tE8T71M9Pm1T83l c0LX9h9rmW7vxHtNr6hhRsZQ8h/sNsDoybrLK9yPskoe+pGjJMacOK42ToViu1b911l+ I+0Q== 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=XHcDwGWcAEdZtrzAOVXBblsUbX47TAsskA5aGzhGobA=; fh=3OLm1pWGbChIj85nExdlNpqlDZpXxTrTHW87/7FUuXE=; b=IkomcagW6Fzfd0nKBEJnja3VFzJYqB5CqBX8eL1hLAtq0Hn0ziO2U6kZSEd0j046VE +XslCqwcKydUOXgSdgk6KeQkmqfGVEhsVTXQt1xxXzc740So/inlJ/anUSVVnVvYXvKv QwXDDF9jffzAuJAw4gGA7PGCfN0/GCm1mFrBnghuvBJMQnoQ/uyxpO4bDyyWvvezP2Oj +kkkSmwE6837v6XlSb5hFs4NPaANjxnB/3vRXTmW3IG0+uRY8A+24cMVAtl4Izcbbmbo wPElcsES4OY++Cj0MvDPpxQK2+2YWghTHDim/AtlEtEB63thZ6x+vBtdypwiWkDuq8yc c2XQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PoFJPeD0; 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 af79cd13be357-79eff1403ddsi35886585a.178.2024.07.05.08.39.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:39:08 -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=PoFJPeD0; 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 1sPl0C-0002rS-EF; Fri, 05 Jul 2024 11:37:36 -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 1sPl04-0002ea-2w for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:28 -0400 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPl02-0001Ja-5Y for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:27 -0400 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2eaae2a6dc1so26647591fa.0 for ; Fri, 05 Jul 2024 08:37:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193843; x=1720798643; 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=XHcDwGWcAEdZtrzAOVXBblsUbX47TAsskA5aGzhGobA=; b=PoFJPeD0JgXi7RFumxc/DUaJralHHwJhNJxHJhu801DR4fP9nkssClfFNoU0DiJUqG l53Bv9pPGliTuoszMXazvlG/MN6c0MSw3dJi5Im9P8Lb/u+DAX7bKKtDV8VG3a8wklGt lMeXcylpnJs5h3irekQo9ooTbx1vfgt1IBpztNSkOPRZx8aM6Bbyd7Ye7bjDwPQHRna7 ratuOqIrqd9If6RgokddrNN5HTABQOSuytc/INt13ZEXICB0EIVQJMfTnKQY+PxDEjMb 1HIn493DlvGYYBxA+YbHIJAj7eAH7Qo6iIornp0/AhqdmS+vRt3PVJrN+47uuo5/YKxa fysA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193843; x=1720798643; 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=XHcDwGWcAEdZtrzAOVXBblsUbX47TAsskA5aGzhGobA=; b=i5hFrCiHKxkhmnNGCBSe7RF+kC81cFhr55rRjzMnJ7dzDjHO/TqiWOp5BFjnIJ7F3t N7sHFFm1gPgIJKaYk2z2TFgnPFOYayGh8LEq7JjoVwDIxjnslq2fHJdKoIw6aeTnDWUS OUB/IR12FQDgaejC+HuiHUxkRI2K9fvdHSwI1ftBcSMt2GpZsNX/23GppttjuxGghOaS 3swOPoN9793xeLKwE3dHPvgmffMnDuLHKfBK5kcFyWAtPmk0IOQnCoolUONxf1c/Fhh0 1mE87bPKXE1THEPt9orteZDoWgCqE1obv9LAYbEGv6fdw1/3W0ZZ+8/piVHv0uqZ4OGf veEg== X-Gm-Message-State: AOJu0YzDGy2DjsVIWSxkCReD9H752Cu4kANGVuBhCZTz2ZG5tYOYiokr XzLCRtXy1raZRbCuTilbNA1dwm5gmKou3kJ6gS4o53+Ue5dN+9B7qM0W/rMLO6A= X-Received: by 2002:a2e:730a:0:b0:2ec:4093:ec7 with SMTP id 38308e7fff4ca-2ee8eda81femr41880451fa.30.1720193842507; Fri, 05 Jul 2024 08:37:22 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a72ab08d0e7sm688192866b.165.2024.07.05.08.37.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:37:20 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id A11D262155; Fri, 5 Jul 2024 16:30:55 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier , =?utf-8?q?Alex_Benn=C3=A9e?= , Eduardo Habkost , Marcel Apfelbaum , Yanan Wang Subject: [PULL 28/40] plugins: Free CPUPluginState before destroying vCPU state Date: Fri, 5 Jul 2024 16:30:40 +0100 Message-Id: <20240705153052.1219696-29-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22c; envelope-from=alex.bennee@linaro.org; helo=mail-lj1-x22c.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: Philippe Mathieu-Daudé cpu::plugin_state is allocated in cpu_common_initfn() when the vCPU state is created. Release it in cpu_common_finalize() when we are done. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Message-Id: <20240606124010.2460-3-philmd@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-29-alex.bennee@linaro.org> diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h index bc5aef979e..af5f9db469 100644 --- a/include/qemu/plugin.h +++ b/include/qemu/plugin.h @@ -149,6 +149,9 @@ struct CPUPluginState { /** * qemu_plugin_create_vcpu_state: allocate plugin state + * + * The returned data must be released with g_free() + * when no longer required. */ CPUPluginState *qemu_plugin_create_vcpu_state(void); diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index f131cde2c0..8f6cb64da3 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -283,6 +283,11 @@ static void cpu_common_finalize(Object *obj) { CPUState *cpu = CPU(obj); +#ifdef CONFIG_PLUGIN + if (tcg_enabled()) { + g_free(cpu->plugin_state); + } +#endif g_array_free(cpu->gdb_regs, TRUE); qemu_lockcnt_destroy(&cpu->in_ioctl_lock); qemu_mutex_destroy(&cpu->work_mutex); From patchwork Fri Jul 5 15:30:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810417 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp1669818wru; Fri, 5 Jul 2024 08:38:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXMJ2x1KbwSPkfC9mbaiCSmENp5hwOKrdE9vKXdZF/fi4p0NQijjAyG83x1VKPwFmHHm7IeWAkv/umSjIg7G58J X-Google-Smtp-Source: AGHT+IH5U6bsLsRfXKgsxia3HpQYAtQ3jPs/y2GUbWSHXKDfs1lzPb33v+vRzsonBRPBZPSQtSf4 X-Received: by 2002:a05:620a:5791:b0:79d:5972:a7ee with SMTP id af79cd13be357-79eee2ad43amr618646085a.68.1720193901162; Fri, 05 Jul 2024 08:38:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193901; cv=none; d=google.com; s=arc-20160816; b=W2UrDlDaG9WxfRKZ91I/QPZGugZJJfGwnV82X+c00PfG4HX+3ExFLDPilMNb6AQTv5 xtQlBmTSjulEsQiHvx7BmqqQqsJ+94fczSM06mC2Xcn23f311vXtMm2GSB9NAhwzHXcI se8Jurvk8HZ1JRuI7YKM/+nsHRZOD+Ue8eJpkhwk37gpvwhmM5DrLGuS0sUOoeUFGgPC c8ovEx6CBkNiPIwZgY16JOqb6LoZ6IEYUplIJMmyMFICEOzr+4o60EV3O7DnBbcGfjWx Pej6VAIuH01YHAS7OndDYm4+UgzHnumYSNPITiR5c/JfXyVsXyJzCuSwuQarO3dhbXKA LFlw== 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=YzA2EMsKf7CQ8lqPZMs8GAjfAh3DVBSL7qsQ3s3Y9XE=; fh=YBgHoFUy7XVgPwC3emg9rlK8nyn4Ph0p6CcWVTGqmtM=; b=EzYagofqZKNrQReEP0Y0ZuYPUXNN22NcDRqDd6qL5hArJ8waxtOrXN8b2unZxtCf9T 17BhPm0ah9TXpLPHI5RsT7iTLAENg2p38GABIiuRjyM+zyrU9UtxknzKsBfNUUHUAU23 ZvzjF3Rftk0UhUnVt36G2d/8DsNU1DLhf8RU7R77Yuz8eaRaH2D5uqH1m6bM+b7rcY42 Yp1qAxOrmPN7TZ0jcA+/1C7xDznQ4Vh5L/SagxfFmPyCmw/5S61ANwbOSZmly7zG/Ch4 3krW3BYoNLv+mq8dqKMhMkLol+R2/+XdDLfsAZleC8cu/vraox08hjFMMqUyFLMiqBJA Uhwg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mr61Th4e; 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 af79cd13be357-79d69308fefsi1663624585a.477.2024.07.05.08.38.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:38: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=mr61Th4e; 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 1sPl02-0002dV-GM; Fri, 05 Jul 2024 11:37:26 -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 1sPkzu-0002aj-Hq for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:18 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPkzs-0001H8-Sd for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:18 -0400 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-57cd26347d3so2434633a12.1 for ; Fri, 05 Jul 2024 08:37:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193835; x=1720798635; 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=YzA2EMsKf7CQ8lqPZMs8GAjfAh3DVBSL7qsQ3s3Y9XE=; b=mr61Th4ex8OBsmmNWv37GykglZ0JpsWZP5TOyG5UbAJPArL26dWNZZHfIaf5MDAh+i 6E1nDF2xPP1CrIDRcL2s4yfsgsw7lR5Ec/lfLNXLgXPVzFHTE0PnpfwkZCw9sO8rURVl xdMLmVZSDDt0f2+1A7xeBLceyEl5TOIEii7HgHURzxohomATdzK2WAmexJCtBeOzh4h8 5ICmTbD8Ux2QhM3kY409kt83suJG9fCZvnrn3AHPPqIm8L3Fh8TXuAr/P14mNXX+YeKf c9aqp8BhHIc4zQhJoHvspuTpEPfrJkEeE0r6nEWK9WXY56jI2yphhHC10CCjfyFg49mH 6MRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193835; x=1720798635; 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=YzA2EMsKf7CQ8lqPZMs8GAjfAh3DVBSL7qsQ3s3Y9XE=; b=C/rF9vefZcfL94Kif2mFWobhKHceYY74P9fT5TORfIcsA39ZmxiEVY7AqZ3kbMD55N 4r7It9WB/9adArwVmk/n0yWeGNldqXmdR1/2qqa9gVO1KCh/UinNbsoBfTwoSapdTCox BsF0m5pvo+mBpHkDQDvqQ7P4lVtnHJ5J0+mTeGLtRlyuFWhvT0U7n2bJqMOkGvkFB6XC dN0MojLgMRPSOaq/ECFeuwUnEQSfNBSm/78suoG1nSU8nQ+p+x76uJc+LezGgaogGo6T uWad34wPifPy86qkFj+rfjnW7/TcESd31awQwMvsY/KchE6K6Ackf4U9NpXQKD2kYBMc +OFQ== X-Gm-Message-State: AOJu0YwSiqk41632bhvG9Tdaby9g8UDn87KYVAyoYwNQubAKbHtVPT8Q bPJyQWFTrPWAuJzHKDhYDFsF5d78IPie9bss9E9k2pu2EelQyhGYiZ8sY2SqRJQ= X-Received: by 2002:a05:6402:274c:b0:57c:6d9a:9149 with SMTP id 4fb4d7f45d1cf-58e5adce5efmr3133130a12.15.1720193834775; Fri, 05 Jul 2024 08:37:14 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-58eff6d1da5sm1537029a12.0.2024.07.05.08.37.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:37:14 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id BA15962156; Fri, 5 Jul 2024 16:30:55 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Pierrick Bouvier , =?utf-8?q?Alex_Benn=C3=A9e?= , Eduardo Habkost , Marcel Apfelbaum , Yanan Wang , Alexandre Iooss , Mahmoud Mandour Subject: [PULL 29/40] accel/tcg: Move qemu_plugin_vcpu_init__async() to plugins/ Date: Fri, 5 Jul 2024 16:30:41 +0100 Message-Id: <20240705153052.1219696-30-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x534.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: Philippe Mathieu-Daudé Calling qemu_plugin_vcpu_init__async() on the vCPU thread is a detail of plugins, not relevant to TCG vCPU management. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier Message-Id: <20240606124010.2460-4-philmd@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-30-alex.bennee@linaro.org> diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index 8f6cb64da3..b19e1fdacf 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -192,13 +192,6 @@ static void cpu_common_parse_features(const char *typename, char *features, } } -#ifdef CONFIG_PLUGIN -static void qemu_plugin_vcpu_init__async(CPUState *cpu, run_on_cpu_data unused) -{ - qemu_plugin_vcpu_init_hook(cpu); -} -#endif - static void cpu_common_realizefn(DeviceState *dev, Error **errp) { CPUState *cpu = CPU(dev); @@ -274,7 +267,7 @@ static void cpu_common_initfn(Object *obj) #ifdef CONFIG_PLUGIN if (tcg_enabled()) { cpu->plugin_state = qemu_plugin_create_vcpu_state(); - async_run_on_cpu(cpu, qemu_plugin_vcpu_init__async, RUN_ON_CPU_NULL); + qemu_plugin_vcpu_init_hook(cpu); } #endif } diff --git a/plugins/core.c b/plugins/core.c index a864275ae7..12c67b4b4e 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -241,7 +241,7 @@ static void plugin_grow_scoreboards__locked(CPUState *cpu) end_exclusive(); } -void qemu_plugin_vcpu_init_hook(CPUState *cpu) +static void qemu_plugin_vcpu_init__async(CPUState *cpu, run_on_cpu_data unused) { bool success; @@ -258,6 +258,12 @@ void qemu_plugin_vcpu_init_hook(CPUState *cpu) plugin_vcpu_cb__simple(cpu, QEMU_PLUGIN_EV_VCPU_INIT); } +void qemu_plugin_vcpu_init_hook(CPUState *cpu) +{ + /* Plugin initialization must wait until the cpu start executing code */ + async_run_on_cpu(cpu, qemu_plugin_vcpu_init__async, RUN_ON_CPU_NULL); +} + void qemu_plugin_vcpu_exit_hook(CPUState *cpu) { bool success; From patchwork Fri Jul 5 15:30:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810419 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp1669882wru; Fri, 5 Jul 2024 08:38:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVP9gic7sXKCqQgvzVKcA5uf/hn3Zll2k0hODyXvrOkUqAui4plvGWr63VsM8T3FNLdf3D3cm8Hjo3TDMn0AgC1 X-Google-Smtp-Source: AGHT+IFXmYr06BtIc76uxIAsZqBenc2wJJkXm0Q9dMkioCuWjSWC0YrRt4+e2A6yOdiiYCf3iPPs X-Received: by 2002:ac8:5d50:0:b0:446:3db0:bdbb with SMTP id d75a77b69052e-447cbeede96mr58052581cf.13.1720193911793; Fri, 05 Jul 2024 08:38:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193911; cv=none; d=google.com; s=arc-20160816; b=AvoMTFc4/9GhyvjKlcK2fPbFPkbja/A3agUXsIx3cLVdiL4IX37NQsv/48dg+8vJPU QSjyQk7+sCzfVAgp3A/j9t2vlM4/3fIE1Lbi3gaKhOV+xzhPg+VwBqeVAFwkxpf709HJ Jnrcy1CX69Jw0ShI2zCttAd+6ntWt3bqPBnm2UBLiFMrnoRfqd4JkFUZ/xX5A+aDL8lL axrpr2jjPKQbDiur6AR4+EaJMz7NTjbsYoNPJul/VbPnYTzVf1FEzadZ0cR3YZ/4I6m7 X8k9akYNHcV6+23rmDDbMcmsph60hn1+/Z6l8dMq0XV79Z2GnTb87257axr4s6qp/Z7v l5gg== 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=AzZJILDpjzCFS1oa5xiSH1SXLCbMpnINOysIyIIVbec=; fh=8Mm9BQmeLpRTl6qJya1IDznvLrd/qBiwVIi7B51sjeA=; b=Y3AnlKpb6sJGkurlpKaxjxFO1HumqSTwrqCi8wu5N7l9fQHZVGaknHCLeJilXTU253 3iRiub0j73f2tO7tnwgittcFuVAAKidLc69/Qf3mElOtY8bycptpG/77BE8YlXS/Gdxh JMMMr5S6q2mY0ThC53xG2mDgrTWD3ka1+3CzVesCBMw9za3PT9B5g3gxkm2tEm+GYEyE RJlym3ZNFELvQo6n21cceYvwBusmAu3ilg9V/WGW2uqSZaphGHfycElFfJYIngcUxOlx hff2J1IKqagFtNUSlXPtcfV5sfL/xlPx3RzWlQaXPnvDj3q80VRywoZuSnLXqM5ALIKV 0arA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EgeIztKz; 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 d75a77b69052e-4465876aec3si163013371cf.120.2024.07.05.08.38.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:38:31 -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=EgeIztKz; 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 1sPl0F-00033B-07; Fri, 05 Jul 2024 11:37:39 -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 1sPl04-0002eb-7Z for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:28 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPl00-0001JG-BZ for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:27 -0400 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-58b447c511eso2387501a12.2 for ; Fri, 05 Jul 2024 08:37:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193843; x=1720798643; 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=AzZJILDpjzCFS1oa5xiSH1SXLCbMpnINOysIyIIVbec=; b=EgeIztKz2EHAecYecCkmc1FD4HYzuqcefh/0ypZ53JtnGiVAJa+bcN4PQ2tBtywOR5 K8pQ0k1brxtRbzYHTlkRqkeYrr2WBPag6Lrk4udXlQphWulWKhnnst744wygd2ZnUesf RR0GUx9T3qtyAoU+Jw6KwfZjLrHSOMNKDNrREjDCy2Z8DwSASqbbaeImvO1aNS3DprGR DyG/GX7+NYlLo8KPAOWjnFWdCMrwKKS1WP16c2bMvuk5VXiqveWYLCTNtXatIkQ+aODV u1vHyGzSUyywY4UdZ8Dr/KC/VFldB/NCLkGi06JWessoiwAoJNULMzjLZMygM4zSu8k5 BmiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193843; x=1720798643; 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=AzZJILDpjzCFS1oa5xiSH1SXLCbMpnINOysIyIIVbec=; b=Csk46In+rMXN3G5Hb4dV3c7Lmr7rYYQFtgTJ9S2LQ5ppnA44t7Bdjrrv+xjtO5i5so Jyisf6K0zIV4XY9BmLP0z+oUMaCRwZ/GyiYU+5nXA3++iAVINhcpKQN2wcyw1HJasx89 ugPixiA4ipSSYlht0eczBXzZf1QWjwXjbrNoFUgy5gtJRHX1mGDIXbNRttVkjaB45vg5 1YGsxIaJZUUdEOPQxH0mKihrsunEfcrNHbT2ZNLemdYSeL2AjvkYfq7yqwC2tNFMztPq oFs7hxGuX/PyiAtPwohdTSw53kkyo+Jq7hjY7SQuKsQVai6Ng3K2x/pVnVFE0i5Bfq75 Ae6w== X-Gm-Message-State: AOJu0Yw2i5oymJAXRptfcV3zljI+Cg30H/6ggP2eMWDtsqjfHRjD122S g5mXFB1I79ZCP6x8rx6aQyGPN43YjCITEwaPGSmL+bGabL0DCGNugh5k7L2iizc= X-Received: by 2002:a17:906:64f:b0:a77:de2a:af00 with SMTP id a640c23a62f3a-a77de2ab225mr27017066b.44.1720193842241; Fri, 05 Jul 2024 08:37:22 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a72aaf638fesm686349366b.68.2024.07.05.08.37.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:37:20 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id CE3E55F931; Fri, 5 Jul 2024 16:30:55 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Gustavo Romero , =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PULL 30/40] gdbstub: Clean up process_string_cmd Date: Fri, 5 Jul 2024 16:30:42 +0100 Message-Id: <20240705153052.1219696-31-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x535.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: Gustavo Romero Change 'process_string_cmd' to return true on success and false on failure, instead of 0 and -1. Signed-off-by: Gustavo Romero Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20240628050850.536447-2-gustavo.romero@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-31-alex.bennee@linaro.org> diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index b3574997ea..37314b92e5 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -962,14 +962,14 @@ static inline int startswith(const char *string, const char *pattern) return !strncmp(string, pattern, strlen(pattern)); } -static int process_string_cmd(const char *data, - const GdbCmdParseEntry *cmds, int num_cmds) +static bool process_string_cmd(const char *data, + const GdbCmdParseEntry *cmds, int num_cmds) { int i; g_autoptr(GArray) params = g_array_new(false, true, sizeof(GdbCmdVariant)); if (!cmds) { - return -1; + return false; } for (i = 0; i < num_cmds; i++) { @@ -984,16 +984,16 @@ static int process_string_cmd(const char *data, if (cmd->schema) { if (cmd_parse_params(&data[strlen(cmd->cmd)], cmd->schema, params)) { - return -1; + return false; } } gdbserver_state.allow_stop_reply = cmd->allow_stop_reply; cmd->handler(params, NULL); - return 0; + return true; } - return -1; + return false; } static void run_cmd_parser(const char *data, const GdbCmdParseEntry *cmd) @@ -1007,7 +1007,7 @@ static void run_cmd_parser(const char *data, const GdbCmdParseEntry *cmd) /* In case there was an error during the command parsing we must * send a NULL packet to indicate the command is not supported */ - if (process_string_cmd(data, cmd, 1)) { + if (!process_string_cmd(data, cmd, 1)) { gdb_put_packet(""); } } @@ -1523,9 +1523,9 @@ static void handle_v_commands(GArray *params, void *user_ctx) return; } - if (process_string_cmd(get_param(params, 0)->data, - gdb_v_commands_table, - ARRAY_SIZE(gdb_v_commands_table))) { + if (!process_string_cmd(get_param(params, 0)->data, + gdb_v_commands_table, + ARRAY_SIZE(gdb_v_commands_table))) { gdb_put_packet(""); } } @@ -1889,15 +1889,15 @@ static void handle_gen_query(GArray *params, void *user_ctx) return; } - if (!process_string_cmd(get_param(params, 0)->data, - gdb_gen_query_set_common_table, - ARRAY_SIZE(gdb_gen_query_set_common_table))) { + if (process_string_cmd(get_param(params, 0)->data, + gdb_gen_query_set_common_table, + ARRAY_SIZE(gdb_gen_query_set_common_table))) { return; } - if (process_string_cmd(get_param(params, 0)->data, - gdb_gen_query_table, - ARRAY_SIZE(gdb_gen_query_table))) { + if (!process_string_cmd(get_param(params, 0)->data, + gdb_gen_query_table, + ARRAY_SIZE(gdb_gen_query_table))) { gdb_put_packet(""); } } @@ -1908,13 +1908,13 @@ static void handle_gen_set(GArray *params, void *user_ctx) return; } - if (!process_string_cmd(get_param(params, 0)->data, - gdb_gen_query_set_common_table, - ARRAY_SIZE(gdb_gen_query_set_common_table))) { + if (process_string_cmd(get_param(params, 0)->data, + gdb_gen_query_set_common_table, + ARRAY_SIZE(gdb_gen_query_set_common_table))) { return; } - if (process_string_cmd(get_param(params, 0)->data, + if (!process_string_cmd(get_param(params, 0)->data, gdb_gen_set_table, ARRAY_SIZE(gdb_gen_set_table))) { gdb_put_packet(""); From patchwork Fri Jul 5 15:30:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810435 Delivered-To: patch@linaro.org Received: by 2002:ab3:6bc5:0:b0:273:6c53:9181 with SMTP id v5csp531935ltk; Fri, 5 Jul 2024 08:48:03 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVWVgVV6rwyoX1ysToaLWcNTQ06ylhb0hjCR9/6RAzK1/nKRrsqY2eKyHGKv+rIhEgQIjpTYuZWMzUBRshpJU/z X-Google-Smtp-Source: AGHT+IEOk29qdfJQ6AhyLvYpDm5uvibJPq4P2/zXkotXiSEp9PMntfLGzGr+GZafKj3gFn4Of7UL X-Received: by 2002:a05:6830:1144:b0:700:d1cd:dd51 with SMTP id 46e09a7af769-7034a80a80amr5528206a34.31.1720194482737; Fri, 05 Jul 2024 08:48:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720194482; cv=none; d=google.com; s=arc-20160816; b=PNb3ntdfKOfT/n90cd3P0JV1ebe2ghZZcYLpX8jAvSeT0Vac9SInH7jyKq830z7rY0 iZhAMBmechTN1xFAfoOWme2ijIK6P6hie06QbceSbaNpgViCitD8puDhQJNmAqW8p2yW ARyJO59K5Wwi7/kHCLOchBEEaCEJvsMMWz4BXhX+NR0LyXbybEfEAOW5Hekcjn/vkihg kDlTrzJ82kyT/iX+8bdMyTAQWBwLshjMjFGjYdkN+xxzN8aMEg3qKBHgZWEZrxnxxlhY 1sEL98o6QVrYJ9FuD1n2sDU/Wdq36a8SndbTu55/K7x4L5WWaF4mtljwzSI3klQrZbn1 d/VA== 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=AEGqmlXFYPvY+nN/cPxtjQjQNeseQhDcWtxEKb6+a1E=; fh=seU5woIfq9m6gBiMUaojKVo0E7BNoIgx/dHL/jw6O8Q=; b=M9Y8182QdexX9ugBTx6XXQFXV1En3yX8nh23qBxIVOeRsBsQfgmnZYKZHKR6gx2g1m KWGh6sVs9h54OLOyzKxfmQJVJTr/KWDgbMVdIxLiv3sHwLMecFIJosrFGVLgDvxP85q+ qHHHkD0kyK8dLx7pqzMfDprf7UJ7DhmRBWPa+TyFRmCHAXz8WA//rZR8J1FhyzbJdDvk X21ipa9MssO+O2YCpPTGjkXpaRF/+xALn5rzV6QpFVZc1gg4UGhZq3CQeOLrS+g2xjvO 32UQciy4fljb1ecxxtiVzk9hGbvbPcm5GWDZQYFeXnl7FXb35EK9wOCS6HjMsHOZtbS3 cq4g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SAp9axVx; 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 af79cd13be357-79d69287542si1673549885a.194.2024.07.05.08.48.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:48:02 -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=SAp9axVx; 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 1sPl9f-0005nG-DT; Fri, 05 Jul 2024 11:47:25 -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 1sPl9c-0005mZ-7h for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:47:21 -0400 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPl9Y-0005pK-Ti for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:47:19 -0400 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-52e9f788e7bso1901030e87.0 for ; Fri, 05 Jul 2024 08:47:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720194435; x=1720799235; 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=AEGqmlXFYPvY+nN/cPxtjQjQNeseQhDcWtxEKb6+a1E=; b=SAp9axVxMlXc6REjVpeOshxWAxxHwrsUUJfpIj2/A0zkpYxGdtPWp0eJjfUhZPFl6k VLF4UW5TSax5/TqFviIefQDuDRR3X9IjZKIQ1CSedBogR9GFgfqUvX9+GwkWzGcDINNo kY6XzK/dZnVYIjF72M09QvozY8zR3ulMZYE4gGx/pDXLHDw1uSPutM/uy4EF6hVOUGAW TJv7pVxx1o9z6i+dz7hA+bZB556QIbD4mP7hj7ZnJPk6ZmB0pUYMYMKhcew5EMThSIKs dXMVIv8ojtVmPL6/wXCWSkaqI5x0QhyMZVz9gknzMXEBJsHGJ0W1Dht3USzMcahwUFCY k62Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720194435; x=1720799235; 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=AEGqmlXFYPvY+nN/cPxtjQjQNeseQhDcWtxEKb6+a1E=; b=h67U4YNSFDwbk2MCp79OHucxSg2XLIU15tZVR+TQIA24ugOl99LAEjTkApqSSUgj9Y gpLV4pVa0701td3UINqO9z4GUnm5pR77GdD7ghLOMJFCd2tp+iuxR4NZYm4VW/RUFL6P jmbxCowScKHqMWyPtTbS/vxD1Ku4BoEJkim3LHQTomxf/hJELivbD6UMkrsuZXx9Vh7J vIyFGZRxegsjsLu0iQCjNHBsJQ6H0MT+336XAgotJc3q2gdynPoUV/Ct4rOJ3urgE04E a2Gf6v4yVmfnXq0SyApcUToMNUsp4H2bNdB4LYvX+s6j56L1Ijo1gxMd/SfOfki9f2W8 +DZA== X-Gm-Message-State: AOJu0Yy2fHqP0cWGkDx1rAIZtxdFu9Qx2gBiD82scmB3GjLzwUFnIUDW vf3/7Ag0nPtONAjBQmUyDV0HOafh3xFoEJUqnNrqQdvwEfP11ELrBF+W2UHY1vg= X-Received: by 2002:a19:2d0e:0:b0:52e:9d28:c288 with SMTP id 2adb3069b0e04-52ea06274d0mr3296791e87.24.1720194433134; Fri, 05 Jul 2024 08:47:13 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a77d965dc4asm38847666b.87.2024.07.05.08.47.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:47:11 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id EEF7262157; Fri, 5 Jul 2024 16:30:55 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Gustavo Romero , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PULL 31/40] gdbstub: Move GdbCmdParseEntry into a new header file Date: Fri, 5 Jul 2024 16:30:43 +0100 Message-Id: <20240705153052.1219696-32-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12b; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x12b.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: Gustavo Romero Move GdbCmdParseEntry and its associated types into a separate header file to allow the use of GdbCmdParseEntry and other gdbstub command functions outside of gdbstub.c. Since GdbCmdParseEntry and get_param are now public, kdoc GdbCmdParseEntry and rename get_param to gdb_get_cmd_param. This commit also makes gdb_put_packet public since is used in gdbstub command handling. Signed-off-by: Gustavo Romero Reviewed-by: Alex Bennée Message-Id: <20240628050850.536447-3-gustavo.romero@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-32-alex.bennee@linaro.org> diff --git a/gdbstub/internals.h b/gdbstub/internals.h index 32f9f63297..34121dc61a 100644 --- a/gdbstub/internals.h +++ b/gdbstub/internals.h @@ -106,7 +106,6 @@ static inline int tohex(int v) */ void gdb_put_strbuf(void); -int gdb_put_packet(const char *buf); int gdb_put_packet_binary(const char *buf, int len, bool dump); void gdb_hextomem(GByteArray *mem, const char *buf, int len); void gdb_memtohex(GString *buf, const uint8_t *mem, int len); @@ -166,27 +165,6 @@ void gdb_put_buffer(const uint8_t *buf, int len); */ void gdb_init_gdbserver_state(void); -typedef enum GDBThreadIdKind { - GDB_ONE_THREAD = 0, - GDB_ALL_THREADS, /* One process, all threads */ - GDB_ALL_PROCESSES, - GDB_READ_THREAD_ERR -} GDBThreadIdKind; - -typedef union GdbCmdVariant { - const char *data; - uint8_t opcode; - unsigned long val_ul; - unsigned long long val_ull; - struct { - GDBThreadIdKind kind; - uint32_t pid; - uint32_t tid; - } thread_id; -} GdbCmdVariant; - -#define get_param(p, i) (&g_array_index(p, GdbCmdVariant, i)) - void gdb_handle_query_rcmd(GArray *params, void *ctx); /* system */ void gdb_handle_query_offsets(GArray *params, void *user_ctx); /* user */ void gdb_handle_query_xfer_auxv(GArray *params, void *user_ctx); /*user */ diff --git a/include/gdbstub/commands.h b/include/gdbstub/commands.h new file mode 100644 index 0000000000..639257493e --- /dev/null +++ b/include/gdbstub/commands.h @@ -0,0 +1,72 @@ +#ifndef GDBSTUB_COMMANDS_H +#define GDBSTUB + +typedef void (*GdbCmdHandler)(GArray *params, void *user_ctx); + +typedef enum GDBThreadIdKind { + GDB_ONE_THREAD = 0, + GDB_ALL_THREADS, /* One process, all threads */ + GDB_ALL_PROCESSES, + GDB_READ_THREAD_ERR +} GDBThreadIdKind; + +typedef union GdbCmdVariant { + const char *data; + uint8_t opcode; + unsigned long val_ul; + unsigned long long val_ull; + struct { + GDBThreadIdKind kind; + uint32_t pid; + uint32_t tid; + } thread_id; +} GdbCmdVariant; + +#define gdb_get_cmd_param(p, i) (&g_array_index(p, GdbCmdVariant, i)) + +/** + * typedef GdbCmdParseEntry - gdb command parser + * + * This structure keeps the information necessary to match a gdb command, + * parse it (extract its parameters), and select the correct handler for it. + * + * @cmd: The command to be matched + * @cmd_startswith: If true, @cmd is compared using startswith + * @schema: Each schema for the command parameter entry consists of 2 chars, + * the first char represents the parameter type handling the second char + * represents the delimiter for the next parameter. + * + * Currently supported schema types: + * 'l' -> unsigned long (stored in .val_ul) + * 'L' -> unsigned long long (stored in .val_ull) + * 's' -> string (stored in .data) + * 'o' -> single char (stored in .opcode) + * 't' -> thread id (stored in .thread_id) + * '?' -> skip according to delimiter + * + * Currently supported delimiters: + * '?' -> Stop at any delimiter (",;:=\0") + * '0' -> Stop at "\0" + * '.' -> Skip 1 char unless reached "\0" + * Any other value is treated as the delimiter value itself + * + * @allow_stop_reply: True iff the gdbstub can respond to this command with a + * "stop reply" packet. The list of commands that accept such response is + * defined at the GDB Remote Serial Protocol documentation. See: + * https://sourceware.org/gdb/onlinedocs/gdb/Stop-Reply-Packets.html#Stop-Reply-Packets. + */ +typedef struct GdbCmdParseEntry { + GdbCmdHandler handler; + const char *cmd; + bool cmd_startswith; + const char *schema; + bool allow_stop_reply; +} GdbCmdParseEntry; + +/** + * gdb_put_packet() - put string into gdb server's buffer so it is sent + * to the client + */ +int gdb_put_packet(const char *buf); + +#endif /* GDBSTUB_COMMANDS_H */ diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index 37314b92e5..9ff2f4177d 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -30,6 +30,7 @@ #include "qemu/error-report.h" #include "trace.h" #include "exec/gdbstub.h" +#include "gdbstub/commands.h" #include "gdbstub/syscalls.h" #ifdef CONFIG_USER_ONLY #include "accel/tcg/vcpu-state.h" @@ -920,43 +921,6 @@ static int cmd_parse_params(const char *data, const char *schema, return 0; } -typedef void (*GdbCmdHandler)(GArray *params, void *user_ctx); - -/* - * cmd_startswith -> cmd is compared using startswith - * - * allow_stop_reply -> true iff the gdbstub can respond to this command with a - * "stop reply" packet. The list of commands that accept such response is - * defined at the GDB Remote Serial Protocol documentation. see: - * https://sourceware.org/gdb/onlinedocs/gdb/Stop-Reply-Packets.html#Stop-Reply-Packets. - * - * schema definitions: - * Each schema parameter entry consists of 2 chars, - * the first char represents the parameter type handling - * the second char represents the delimiter for the next parameter - * - * Currently supported schema types: - * 'l' -> unsigned long (stored in .val_ul) - * 'L' -> unsigned long long (stored in .val_ull) - * 's' -> string (stored in .data) - * 'o' -> single char (stored in .opcode) - * 't' -> thread id (stored in .thread_id) - * '?' -> skip according to delimiter - * - * Currently supported delimiters: - * '?' -> Stop at any delimiter (",;:=\0") - * '0' -> Stop at "\0" - * '.' -> Skip 1 char unless reached "\0" - * Any other value is treated as the delimiter value itself - */ -typedef struct GdbCmdParseEntry { - GdbCmdHandler handler; - const char *cmd; - bool cmd_startswith; - const char *schema; - bool allow_stop_reply; -} GdbCmdParseEntry; - static inline int startswith(const char *string, const char *pattern) { return !strncmp(string, pattern, strlen(pattern)); @@ -1023,7 +987,7 @@ static void handle_detach(GArray *params, void *user_ctx) return; } - pid = get_param(params, 0)->val_ul; + pid = gdb_get_cmd_param(params, 0)->val_ul; } #ifdef CONFIG_USER_ONLY @@ -1061,13 +1025,13 @@ static void handle_thread_alive(GArray *params, void *user_ctx) return; } - if (get_param(params, 0)->thread_id.kind == GDB_READ_THREAD_ERR) { + if (gdb_get_cmd_param(params, 0)->thread_id.kind == GDB_READ_THREAD_ERR) { gdb_put_packet("E22"); return; } - cpu = gdb_get_cpu(get_param(params, 0)->thread_id.pid, - get_param(params, 0)->thread_id.tid); + cpu = gdb_get_cpu(gdb_get_cmd_param(params, 0)->thread_id.pid, + gdb_get_cmd_param(params, 0)->thread_id.tid); if (!cpu) { gdb_put_packet("E22"); return; @@ -1079,7 +1043,7 @@ static void handle_thread_alive(GArray *params, void *user_ctx) static void handle_continue(GArray *params, void *user_ctx) { if (params->len) { - gdb_set_cpu_pc(get_param(params, 0)->val_ull); + gdb_set_cpu_pc(gdb_get_cmd_param(params, 0)->val_ull); } gdbserver_state.signal = 0; @@ -1095,7 +1059,7 @@ static void handle_cont_with_sig(GArray *params, void *user_ctx) * omit the addr parameter */ if (params->len) { - signal = get_param(params, 0)->val_ul; + signal = gdb_get_cmd_param(params, 0)->val_ul; } gdbserver_state.signal = gdb_signal_to_target(signal); @@ -1115,18 +1079,18 @@ static void handle_set_thread(GArray *params, void *user_ctx) return; } - if (get_param(params, 1)->thread_id.kind == GDB_READ_THREAD_ERR) { + if (gdb_get_cmd_param(params, 1)->thread_id.kind == GDB_READ_THREAD_ERR) { gdb_put_packet("E22"); return; } - if (get_param(params, 1)->thread_id.kind != GDB_ONE_THREAD) { + if (gdb_get_cmd_param(params, 1)->thread_id.kind != GDB_ONE_THREAD) { gdb_put_packet("OK"); return; } - pid = get_param(params, 1)->thread_id.pid; - tid = get_param(params, 1)->thread_id.tid; + pid = gdb_get_cmd_param(params, 1)->thread_id.pid; + tid = gdb_get_cmd_param(params, 1)->thread_id.tid; #ifdef CONFIG_USER_ONLY if (gdb_handle_set_thread_user(pid, tid)) { return; @@ -1142,7 +1106,7 @@ static void handle_set_thread(GArray *params, void *user_ctx) * Note: This command is deprecated and modern gdb's will be using the * vCont command instead. */ - switch (get_param(params, 0)->opcode) { + switch (gdb_get_cmd_param(params, 0)->opcode) { case 'c': gdbserver_state.c_cpu = cpu; gdb_put_packet("OK"); @@ -1167,9 +1131,9 @@ static void handle_insert_bp(GArray *params, void *user_ctx) } res = gdb_breakpoint_insert(gdbserver_state.c_cpu, - get_param(params, 0)->val_ul, - get_param(params, 1)->val_ull, - get_param(params, 2)->val_ull); + gdb_get_cmd_param(params, 0)->val_ul, + gdb_get_cmd_param(params, 1)->val_ull, + gdb_get_cmd_param(params, 2)->val_ull); if (res >= 0) { gdb_put_packet("OK"); return; @@ -1191,9 +1155,9 @@ static void handle_remove_bp(GArray *params, void *user_ctx) } res = gdb_breakpoint_remove(gdbserver_state.c_cpu, - get_param(params, 0)->val_ul, - get_param(params, 1)->val_ull, - get_param(params, 2)->val_ull); + gdb_get_cmd_param(params, 0)->val_ul, + gdb_get_cmd_param(params, 1)->val_ull, + gdb_get_cmd_param(params, 2)->val_ull); if (res >= 0) { gdb_put_packet("OK"); return; @@ -1225,10 +1189,10 @@ static void handle_set_reg(GArray *params, void *user_ctx) return; } - reg_size = strlen(get_param(params, 1)->data) / 2; - gdb_hextomem(gdbserver_state.mem_buf, get_param(params, 1)->data, reg_size); + reg_size = strlen(gdb_get_cmd_param(params, 1)->data) / 2; + gdb_hextomem(gdbserver_state.mem_buf, gdb_get_cmd_param(params, 1)->data, reg_size); gdb_write_register(gdbserver_state.g_cpu, gdbserver_state.mem_buf->data, - get_param(params, 0)->val_ull); + gdb_get_cmd_param(params, 0)->val_ull); gdb_put_packet("OK"); } @@ -1243,7 +1207,7 @@ static void handle_get_reg(GArray *params, void *user_ctx) reg_size = gdb_read_register(gdbserver_state.g_cpu, gdbserver_state.mem_buf, - get_param(params, 0)->val_ull); + gdb_get_cmd_param(params, 0)->val_ull); if (!reg_size) { gdb_put_packet("E14"); return; @@ -1264,16 +1228,16 @@ static void handle_write_mem(GArray *params, void *user_ctx) } /* gdb_hextomem() reads 2*len bytes */ - if (get_param(params, 1)->val_ull > - strlen(get_param(params, 2)->data) / 2) { + if (gdb_get_cmd_param(params, 1)->val_ull > + strlen(gdb_get_cmd_param(params, 2)->data) / 2) { gdb_put_packet("E22"); return; } - gdb_hextomem(gdbserver_state.mem_buf, get_param(params, 2)->data, - get_param(params, 1)->val_ull); + gdb_hextomem(gdbserver_state.mem_buf, gdb_get_cmd_param(params, 2)->data, + gdb_get_cmd_param(params, 1)->val_ull); if (gdb_target_memory_rw_debug(gdbserver_state.g_cpu, - get_param(params, 0)->val_ull, + gdb_get_cmd_param(params, 0)->val_ull, gdbserver_state.mem_buf->data, gdbserver_state.mem_buf->len, true)) { gdb_put_packet("E14"); @@ -1291,16 +1255,16 @@ static void handle_read_mem(GArray *params, void *user_ctx) } /* gdb_memtohex() doubles the required space */ - if (get_param(params, 1)->val_ull > MAX_PACKET_LENGTH / 2) { + if (gdb_get_cmd_param(params, 1)->val_ull > MAX_PACKET_LENGTH / 2) { gdb_put_packet("E22"); return; } g_byte_array_set_size(gdbserver_state.mem_buf, - get_param(params, 1)->val_ull); + gdb_get_cmd_param(params, 1)->val_ull); if (gdb_target_memory_rw_debug(gdbserver_state.g_cpu, - get_param(params, 0)->val_ull, + gdb_get_cmd_param(params, 0)->val_ull, gdbserver_state.mem_buf->data, gdbserver_state.mem_buf->len, false)) { gdb_put_packet("E14"); @@ -1324,8 +1288,8 @@ static void handle_write_all_regs(GArray *params, void *user_ctx) } cpu_synchronize_state(gdbserver_state.g_cpu); - len = strlen(get_param(params, 0)->data) / 2; - gdb_hextomem(gdbserver_state.mem_buf, get_param(params, 0)->data, len); + len = strlen(gdb_get_cmd_param(params, 0)->data) / 2; + gdb_hextomem(gdbserver_state.mem_buf, gdb_get_cmd_param(params, 0)->data, len); registers = gdbserver_state.mem_buf->data; for (reg_id = 0; reg_id < gdbserver_state.g_cpu->gdb_num_g_regs && len > 0; @@ -1360,7 +1324,7 @@ static void handle_read_all_regs(GArray *params, void *user_ctx) static void handle_step(GArray *params, void *user_ctx) { if (params->len) { - gdb_set_cpu_pc(get_param(params, 0)->val_ull); + gdb_set_cpu_pc(gdb_get_cmd_param(params, 0)->val_ull); } cpu_single_step(gdbserver_state.c_cpu, gdbserver_state.sstep_flags); @@ -1373,7 +1337,7 @@ static void handle_backward(GArray *params, void *user_ctx) gdb_put_packet("E22"); } if (params->len == 1) { - switch (get_param(params, 0)->opcode) { + switch (gdb_get_cmd_param(params, 0)->opcode) { case 's': if (replay_reverse_step()) { gdb_continue(); @@ -1408,7 +1372,7 @@ static void handle_v_cont(GArray *params, void *user_ctx) return; } - res = gdb_handle_vcont(get_param(params, 0)->data); + res = gdb_handle_vcont(gdb_get_cmd_param(params, 0)->data); if ((res == -EINVAL) || (res == -ERANGE)) { gdb_put_packet("E22"); } else if (res) { @@ -1426,7 +1390,7 @@ static void handle_v_attach(GArray *params, void *user_ctx) goto cleanup; } - process = gdb_get_process(get_param(params, 0)->val_ul); + process = gdb_get_process(gdb_get_cmd_param(params, 0)->val_ul); if (!process) { goto cleanup; } @@ -1523,7 +1487,7 @@ static void handle_v_commands(GArray *params, void *user_ctx) return; } - if (!process_string_cmd(get_param(params, 0)->data, + if (!process_string_cmd(gdb_get_cmd_param(params, 0)->data, gdb_v_commands_table, ARRAY_SIZE(gdb_v_commands_table))) { gdb_put_packet(""); @@ -1555,7 +1519,7 @@ static void handle_set_qemu_sstep(GArray *params, void *user_ctx) return; } - new_sstep_flags = get_param(params, 0)->val_ul; + new_sstep_flags = gdb_get_cmd_param(params, 0)->val_ul; if (new_sstep_flags & ~gdbserver_state.supported_sstep_flags) { gdb_put_packet("E22"); @@ -1615,13 +1579,13 @@ static void handle_query_thread_extra(GArray *params, void *user_ctx) CPUState *cpu; if (!params->len || - get_param(params, 0)->thread_id.kind == GDB_READ_THREAD_ERR) { + gdb_get_cmd_param(params, 0)->thread_id.kind == GDB_READ_THREAD_ERR) { gdb_put_packet("E22"); return; } - cpu = gdb_get_cpu(get_param(params, 0)->thread_id.pid, - get_param(params, 0)->thread_id.tid); + cpu = gdb_get_cpu(gdb_get_cmd_param(params, 0)->thread_id.pid, + gdb_get_cmd_param(params, 0)->thread_id.tid); if (!cpu) { return; } @@ -1673,7 +1637,7 @@ static void handle_query_supported(GArray *params, void *user_ctx) #endif if (params->len) { - const char *gdb_supported = get_param(params, 0)->data; + const char *gdb_supported = gdb_get_cmd_param(params, 0)->data; if (strstr(gdb_supported, "multiprocess+")) { gdbserver_state.multiprocess = true; @@ -1707,15 +1671,15 @@ static void handle_query_xfer_features(GArray *params, void *user_ctx) return; } - p = get_param(params, 0)->data; + p = gdb_get_cmd_param(params, 0)->data; xml = get_feature_xml(p, &p, process); if (!xml) { gdb_put_packet("E00"); return; } - addr = get_param(params, 1)->val_ul; - len = get_param(params, 2)->val_ul; + addr = gdb_get_cmd_param(params, 1)->val_ul; + len = gdb_get_cmd_param(params, 2)->val_ul; total_len = strlen(xml); if (addr > total_len) { gdb_put_packet("E00"); @@ -1889,13 +1853,13 @@ static void handle_gen_query(GArray *params, void *user_ctx) return; } - if (process_string_cmd(get_param(params, 0)->data, + if (process_string_cmd(gdb_get_cmd_param(params, 0)->data, gdb_gen_query_set_common_table, ARRAY_SIZE(gdb_gen_query_set_common_table))) { return; } - if (!process_string_cmd(get_param(params, 0)->data, + if (!process_string_cmd(gdb_get_cmd_param(params, 0)->data, gdb_gen_query_table, ARRAY_SIZE(gdb_gen_query_table))) { gdb_put_packet(""); @@ -1908,13 +1872,13 @@ static void handle_gen_set(GArray *params, void *user_ctx) return; } - if (process_string_cmd(get_param(params, 0)->data, + if (process_string_cmd(gdb_get_cmd_param(params, 0)->data, gdb_gen_query_set_common_table, ARRAY_SIZE(gdb_gen_query_set_common_table))) { return; } - if (!process_string_cmd(get_param(params, 0)->data, + if (!process_string_cmd(gdb_get_cmd_param(params, 0)->data, gdb_gen_set_table, ARRAY_SIZE(gdb_gen_set_table))) { gdb_put_packet(""); diff --git a/gdbstub/syscalls.c b/gdbstub/syscalls.c index 02e3a8f74c..4e1295b782 100644 --- a/gdbstub/syscalls.c +++ b/gdbstub/syscalls.c @@ -16,6 +16,7 @@ #include "sysemu/runstate.h" #include "gdbstub/user.h" #include "gdbstub/syscalls.h" +#include "gdbstub/commands.h" #include "trace.h" #include "internals.h" @@ -154,9 +155,9 @@ void gdb_handle_file_io(GArray *params, void *user_ctx) uint64_t ret; int err; - ret = get_param(params, 0)->val_ull; + ret = gdb_get_cmd_param(params, 0)->val_ull; if (params->len >= 2) { - err = get_param(params, 1)->val_ull; + err = gdb_get_cmd_param(params, 1)->val_ull; } else { err = 0; } @@ -196,7 +197,7 @@ void gdb_handle_file_io(GArray *params, void *user_ctx) gdbserver_syscall_state.current_syscall_cb = NULL; } - if (params->len >= 3 && get_param(params, 2)->opcode == (uint8_t)'C') { + if (params->len >= 3 && gdb_get_cmd_param(params, 2)->opcode == (uint8_t)'C') { gdb_put_packet("T02"); return; } diff --git a/gdbstub/system.c b/gdbstub/system.c index d235403855..1ad87fe7fd 100644 --- a/gdbstub/system.c +++ b/gdbstub/system.c @@ -16,6 +16,7 @@ #include "qemu/cutils.h" #include "exec/gdbstub.h" #include "gdbstub/syscalls.h" +#include "gdbstub/commands.h" #include "exec/hwaddr.h" #include "exec/tb-flush.h" #include "sysemu/cpus.h" @@ -501,7 +502,7 @@ void gdb_handle_set_qemu_phy_mem_mode(GArray *params, void *ctx) return; } - if (!get_param(params, 0)->val_ul) { + if (!gdb_get_cmd_param(params, 0)->val_ul) { phy_memory_mode = 0; } else { phy_memory_mode = 1; @@ -519,7 +520,7 @@ void gdb_handle_query_rcmd(GArray *params, void *ctx) return; } - len = strlen(get_param(params, 0)->data); + len = strlen(gdb_get_cmd_param(params, 0)->data); if (len % 2) { gdb_put_packet("E01"); return; @@ -527,7 +528,7 @@ void gdb_handle_query_rcmd(GArray *params, void *ctx) g_assert(gdbserver_state.mem_buf->len == 0); len = len / 2; - gdb_hextomem(gdbserver_state.mem_buf, get_param(params, 0)->data, len); + gdb_hextomem(gdbserver_state.mem_buf, gdb_get_cmd_param(params, 0)->data, len); g_byte_array_append(gdbserver_state.mem_buf, &zero, 1); qemu_chr_be_write(gdbserver_system_state.mon_chr, gdbserver_state.mem_buf->data, diff --git a/gdbstub/user-target.c b/gdbstub/user-target.c index a9c6c64512..b5e01fd8b0 100644 --- a/gdbstub/user-target.c +++ b/gdbstub/user-target.c @@ -9,6 +9,7 @@ #include "qemu/osdep.h" #include "exec/gdbstub.h" +#include "gdbstub/commands.h" #include "qemu.h" #include "internals.h" #ifdef CONFIG_LINUX @@ -250,8 +251,8 @@ void gdb_handle_query_xfer_auxv(GArray *params, void *user_ctx) return; } - offset = get_param(params, 0)->val_ul; - len = get_param(params, 1)->val_ul; + offset = gdb_get_cmd_param(params, 0)->val_ul; + len = gdb_get_cmd_param(params, 1)->val_ul; ts = get_task_state(gdbserver_state.c_cpu); saved_auxv = ts->info->saved_auxv; auxv_len = ts->info->auxv_len; @@ -288,7 +289,7 @@ void gdb_handle_query_xfer_auxv(GArray *params, void *user_ctx) static const char *get_filename_param(GArray *params, int i) { - const char *hex_filename = get_param(params, i)->data; + const char *hex_filename = gdb_get_cmd_param(params, i)->data; gdb_hextomem(gdbserver_state.mem_buf, hex_filename, strlen(hex_filename) / 2); g_byte_array_append(gdbserver_state.mem_buf, (const guint8 *)"", 1); @@ -306,8 +307,8 @@ static void hostio_reply_with_data(const void *buf, size_t n) void gdb_handle_v_file_open(GArray *params, void *user_ctx) { const char *filename = get_filename_param(params, 0); - uint64_t flags = get_param(params, 1)->val_ull; - uint64_t mode = get_param(params, 2)->val_ull; + uint64_t flags = gdb_get_cmd_param(params, 1)->val_ull; + uint64_t mode = gdb_get_cmd_param(params, 2)->val_ull; #ifdef CONFIG_LINUX int fd = do_guest_openat(cpu_env(gdbserver_state.g_cpu), 0, filename, @@ -325,7 +326,7 @@ void gdb_handle_v_file_open(GArray *params, void *user_ctx) void gdb_handle_v_file_close(GArray *params, void *user_ctx) { - int fd = get_param(params, 0)->val_ul; + int fd = gdb_get_cmd_param(params, 0)->val_ul; if (close(fd) == -1) { g_string_printf(gdbserver_state.str_buf, "F-1,%d", errno); @@ -338,9 +339,9 @@ void gdb_handle_v_file_close(GArray *params, void *user_ctx) void gdb_handle_v_file_pread(GArray *params, void *user_ctx) { - int fd = get_param(params, 0)->val_ul; - size_t count = get_param(params, 1)->val_ull; - off_t offset = get_param(params, 2)->val_ull; + int fd = gdb_get_cmd_param(params, 0)->val_ul; + size_t count = gdb_get_cmd_param(params, 1)->val_ull; + off_t offset = gdb_get_cmd_param(params, 2)->val_ull; size_t bufsiz = MIN(count, BUFSIZ); g_autofree char *buf = g_try_malloc(bufsiz); @@ -383,9 +384,9 @@ void gdb_handle_v_file_readlink(GArray *params, void *user_ctx) void gdb_handle_query_xfer_exec_file(GArray *params, void *user_ctx) { - uint32_t pid = get_param(params, 0)->val_ul; - uint32_t offset = get_param(params, 1)->val_ul; - uint32_t length = get_param(params, 2)->val_ul; + uint32_t pid = gdb_get_cmd_param(params, 0)->val_ul; + uint32_t offset = gdb_get_cmd_param(params, 1)->val_ul; + uint32_t length = gdb_get_cmd_param(params, 2)->val_ul; GDBProcess *process = gdb_get_process(pid); if (!process) { diff --git a/gdbstub/user.c b/gdbstub/user.c index e34b58b407..b36033bc7a 100644 --- a/gdbstub/user.c +++ b/gdbstub/user.c @@ -16,6 +16,7 @@ #include "exec/hwaddr.h" #include "exec/tb-flush.h" #include "exec/gdbstub.h" +#include "gdbstub/commands.h" #include "gdbstub/syscalls.h" #include "gdbstub/user.h" #include "gdbstub/enums.h" @@ -793,7 +794,7 @@ void gdb_syscall_return(CPUState *cs, int num) void gdb_handle_set_catch_syscalls(GArray *params, void *user_ctx) { - const char *param = get_param(params, 0)->data; + const char *param = gdb_get_cmd_param(params, 0)->data; GDBSyscallsMask catch_syscalls_mask; bool catch_all_syscalls; unsigned int num; @@ -858,8 +859,8 @@ void gdb_handle_query_xfer_siginfo(GArray *params, void *user_ctx) unsigned long offset, len; uint8_t *siginfo_offset; - offset = get_param(params, 0)->val_ul; - len = get_param(params, 1)->val_ul; + offset = gdb_get_cmd_param(params, 0)->val_ul; + len = gdb_get_cmd_param(params, 1)->val_ul; if (offset + len > gdbserver_user_state.siginfo_len) { /* Invalid offset and/or requested length. */ From patchwork Fri Jul 5 15:30:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810431 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp1670255wru; Fri, 5 Jul 2024 08:39:26 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWPg+sgIEhYh8VxHEZ8cQCRIda383ZbF22kvIO6BAVIdBg7XWJpJDjnG4o7xHSc/lLNLkf8C3NxQYGeI+fail4s X-Google-Smtp-Source: AGHT+IGdkXsi8gKQHkkwT2Rax9h7FHX87/+gTMdy8LWTWuiYErgMy7G6LSJSbRTcFZAv7xTil1Rd X-Received: by 2002:a05:622a:1493:b0:446:34cd:9e21 with SMTP id d75a77b69052e-447cbf1fd29mr65291281cf.18.1720193966073; Fri, 05 Jul 2024 08:39:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193966; cv=none; d=google.com; s=arc-20160816; b=iiqYhq1ma+jGGdgrtlbf1Lb4eMPsSuXJGSzZDZzthHEJe9Ey1njtcgrlsPzJd5bxf0 s2xSUQu67fSJ7q5XCM3g+S3NUm7A7ugqy73wC664qRgpQnTQrNNQjdMqe95MVj+0JXir urpzAZKU2ieFmI8MBkl1UShy+/G5Ezm1DoWds7UlJ6xAAiiuLkOLd8dFIi9x+emi94zn +e49vDK8p0MWakp5jRlK9JBHhrcmjPR/IwHdDMynhoa9y0qEXRUV03yGkVCQSIhd5BTQ NUSTLRC003MQxIUJCtMIuVnC3gm1RxUMLn21zZKf2K+GFd5bp68Sio57XBjo9ppsUSzG Rdew== 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=lGm+/MmwdTtSAKsTNDRWVhRbZjOTbAPKkLzVOV/KGSY=; fh=seU5woIfq9m6gBiMUaojKVo0E7BNoIgx/dHL/jw6O8Q=; b=lBRtZz3AzH9UL2nJpXsVssUuCdmLPD1bCskImZYPdLPYxUjoAU5d11ucXULPSahTlr itkzan7m0+Xz54Wy+Gb9SZyTa7lNlmcMf51WF3Tr/nPqA1Yg0vRAVU6S/kzWC3j7Cspe 9JyG5BbAZKTbX+rg37m4xz6ZbHrHKqVZ2EW2FA9TztU9gT/lR8+GKpiGloqsE5ZN2H87 pRHwziU06ATk5dS35G22HSnOEo+mkHgHMGhNXu26BS+T09iwCQeNMpUSbYL22FfoBDqj Hu9/E2/+bZlYEC1gBYIVd7LsCg8Vne7FLzp2uTWMG5pWZql7p+A9JBpvGwFpY2bkZMHr Ka0Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wxiuwlqC; 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 d75a77b69052e-446644d92bfsi155572381cf.724.2024.07.05.08.39.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:39:26 -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=wxiuwlqC; 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 1sPkzy-0002cR-MS; Fri, 05 Jul 2024 11:37:22 -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 1sPkzs-0002aN-S4 for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:16 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPkzp-0001GW-Sd for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:16 -0400 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a77cb7c106dso101813466b.1 for ; Fri, 05 Jul 2024 08:37:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193832; x=1720798632; 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=lGm+/MmwdTtSAKsTNDRWVhRbZjOTbAPKkLzVOV/KGSY=; b=wxiuwlqCHnlo6uuUJwH+iKHQivApWutRw8572fMHIIPR0Wyqnvo6PWltXoDUZmUy85 EKC5oERrM3SwpUjc0A+rpyYb6wml+i/+f4pMl70LAbZ98WBda6m6r3wSoLdUpU83E45B YDNTqEOy/VgbT3H05NFt+gHfCJVptfEBZZRJiOOmgoy+2U5hcY4clmVbc1K+4JLUGAuW Ez4/7XubNxikalv7yMU9PDT1BsFh1rRjDqqn63sF+TVW3LDWp9xaboFtrgeiORfDPos7 vSYP0eeGT13mQ9HS+07xn0MR6FJv9KO1t1TARPb2yfUM2N3afbtvy4nN9Q9L9/01J+j8 CTMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193832; x=1720798632; 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=lGm+/MmwdTtSAKsTNDRWVhRbZjOTbAPKkLzVOV/KGSY=; b=RdYtToVVCWmgFieh3W9fs7QJShFwJjfhQeJEm5wnE4xWNks9+mPPysiH83G10q85Hv LhMCeGC9jKAEMvlRGvFW19fNOqxeROQz1668AnRUNyN1VVlqU77Al/q1znr8JleiElx0 pHAsq47xFdCd4algaAZ6F5ZCtc5yFvcqM3Pc/qIeRw/qjTANzexmjo/kD0h/UJuWHcuF j8N+7vmGjgdgZacy6T8dEsejb2Noc3rdIwt8Tg23JzNDq8d/tQoE5wyHSqP6OqoT2cLu gYLM3xcjCKIlQCwrVEMSdL9IEJN3w+BZTu6rx6dbMdw+ePowUFBEhEHzCx2+ufGY1bQw TVcQ== X-Gm-Message-State: AOJu0Yy/9cXQRYr7zJDeRh3gSsjveXCF8MhkTAgBpvlvke5dj3GlAN4y 4JXYwWCD8TlSLkT73H2eyE8G1MaFIR5AsI/Tgr+qpH6nx41iWzwReqnYuiWeVNs= X-Received: by 2002:a17:906:b809:b0:a77:dbf0:d25 with SMTP id a640c23a62f3a-a77dbf00e74mr66622966b.33.1720193831981; Fri, 05 Jul 2024 08:37:11 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a72aaf18b15sm695108466b.19.2024.07.05.08.37.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:37:10 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 111EB62159; Fri, 5 Jul 2024 16:30:56 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Gustavo Romero , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PULL 32/40] gdbstub: Add support for target-specific stubs Date: Fri, 5 Jul 2024 16:30:44 +0100 Message-Id: <20240705153052.1219696-33-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x635.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: Gustavo Romero Currently, it's not possible to have stubs specific to a given target, even though there are GDB features which are target-specific, like, for instance, memory tagging. This commit introduces gdb_extend_qsupported_features, gdb_extend_query_table, and gdb_extend_set_table functions as interfaces to extend the qSupported string, the query handler table, and the set handler table, allowing target-specific stub implementations. Signed-off-by: Gustavo Romero Reviewed-by: Alex Bennée Message-Id: <20240628050850.536447-4-gustavo.romero@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-33-alex.bennee@linaro.org> diff --git a/include/gdbstub/commands.h b/include/gdbstub/commands.h index 639257493e..306dfdef97 100644 --- a/include/gdbstub/commands.h +++ b/include/gdbstub/commands.h @@ -69,4 +69,26 @@ typedef struct GdbCmdParseEntry { */ int gdb_put_packet(const char *buf); +/** + * gdb_extend_query_table() - Extend query table. + * @table: The table with the additional query packet handlers. + * @size: The number of handlers to be added. + */ +void gdb_extend_query_table(GdbCmdParseEntry *table, int size); + +/** + * gdb_extend_set_table() - Extend set table. + * @table: The table with the additional set packet handlers. + * @size: The number of handlers to be added. + */ +void gdb_extend_set_table(GdbCmdParseEntry *table, int size); + +/** + * gdb_extend_qsupported_features() - Extend the qSupported features string. + * @qsupported_features: The additional qSupported feature(s) string. The string + * should start with a semicolon and, if there are more than one feature, the + * features should be separate by a semiocolon. + */ +void gdb_extend_qsupported_features(char *qsupported_features); + #endif /* GDBSTUB_COMMANDS_H */ diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index 9ff2f4177d..b1ca253f97 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -1609,6 +1609,20 @@ static void handle_query_thread_extra(GArray *params, void *user_ctx) gdb_put_strbuf(); } +static char *extended_qsupported_features; +void gdb_extend_qsupported_features(char *qsupported_features) +{ + /* + * We don't support different sets of CPU gdb features on different CPUs yet + * so assert the feature strings are the same on all CPUs, or is set only + * once (1 CPU). + */ + g_assert(extended_qsupported_features == NULL || + g_strcmp0(extended_qsupported_features, qsupported_features) == 0); + + extended_qsupported_features = qsupported_features; +} + static void handle_query_supported(GArray *params, void *user_ctx) { CPUClass *cc; @@ -1648,6 +1662,11 @@ static void handle_query_supported(GArray *params, void *user_ctx) } g_string_append(gdbserver_state.str_buf, ";vContSupported+;multiprocess+"); + + if (extended_qsupported_features) { + g_string_append(gdbserver_state.str_buf, extended_qsupported_features); + } + gdb_put_strbuf(); } @@ -1729,6 +1748,41 @@ static const GdbCmdParseEntry gdb_gen_query_set_common_table[] = { }, }; +/* Compares if a set of command parsers is equal to another set of parsers. */ +static bool cmp_cmds(GdbCmdParseEntry *c, GdbCmdParseEntry *d, int size) +{ + for (int i = 0; i < size; i++) { + if (!(c[i].handler == d[i].handler && + g_strcmp0(c[i].cmd, d[i].cmd) == 0 && + c[i].cmd_startswith == d[i].cmd_startswith && + g_strcmp0(c[i].schema, d[i].schema) == 0)) { + + /* Sets are different. */ + return false; + } + } + + /* Sets are equal, i.e. contain the same command parsers. */ + return true; +} + +static GdbCmdParseEntry *extended_query_table; +static int extended_query_table_size; +void gdb_extend_query_table(GdbCmdParseEntry *table, int size) +{ + /* + * We don't support different sets of CPU gdb features on different CPUs yet + * so assert query table is the same on all CPUs, or is set only once + * (1 CPU). + */ + g_assert(extended_query_table == NULL || + (extended_query_table_size == size && + cmp_cmds(extended_query_table, table, size))); + + extended_query_table = table; + extended_query_table_size = size; +} + static const GdbCmdParseEntry gdb_gen_query_table[] = { { .handler = handle_query_curr_tid, @@ -1821,6 +1875,22 @@ static const GdbCmdParseEntry gdb_gen_query_table[] = { #endif }; +static GdbCmdParseEntry *extended_set_table; +static int extended_set_table_size; +void gdb_extend_set_table(GdbCmdParseEntry *table, int size) +{ + /* + * We don't support different sets of CPU gdb features on different CPUs yet + * so assert set table is the same on all CPUs, or is set only once (1 CPU). + */ + g_assert(extended_set_table == NULL || + (extended_set_table_size == size && + cmp_cmds(extended_set_table, table, size))); + + extended_set_table = table; + extended_set_table_size = size; +} + static const GdbCmdParseEntry gdb_gen_set_table[] = { /* Order is important if has same prefix */ { @@ -1859,11 +1929,21 @@ static void handle_gen_query(GArray *params, void *user_ctx) return; } - if (!process_string_cmd(gdb_get_cmd_param(params, 0)->data, - gdb_gen_query_table, - ARRAY_SIZE(gdb_gen_query_table))) { - gdb_put_packet(""); + if (process_string_cmd(gdb_get_cmd_param(params, 0)->data, + gdb_gen_query_table, + ARRAY_SIZE(gdb_gen_query_table))) { + return; + } + + if (extended_query_table && + process_string_cmd(gdb_get_cmd_param(params, 0)->data, + extended_query_table, + extended_query_table_size)) { + return; } + + /* Can't handle query, return Empty response. */ + gdb_put_packet(""); } static void handle_gen_set(GArray *params, void *user_ctx) @@ -1878,11 +1958,21 @@ static void handle_gen_set(GArray *params, void *user_ctx) return; } - if (!process_string_cmd(gdb_get_cmd_param(params, 0)->data, + if (process_string_cmd(gdb_get_cmd_param(params, 0)->data, gdb_gen_set_table, ARRAY_SIZE(gdb_gen_set_table))) { - gdb_put_packet(""); + return; } + + if (extended_set_table && + process_string_cmd(gdb_get_cmd_param(params, 0)->data, + extended_set_table, + extended_set_table_size)) { + return; + } + + /* Can't handle set, return Empty response. */ + gdb_put_packet(""); } static void handle_target_halt(GArray *params, void *user_ctx) From patchwork Fri Jul 5 15:30:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810433 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp1670392wru; Fri, 5 Jul 2024 08:39:48 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVSan1NWshCkizO6xB9vASxub8d+O0wyXzvAYvC8cuKWLkPgpjmnZFZX5H0gkRnSg4z5oyPrVQfZyD8OJbkzvVp X-Google-Smtp-Source: AGHT+IFtlBRFOk/B5lj7O9+uERIsDWZ+xh8F4ufjBvk6aEjK5yKr1WfH++jfcpF9gLlCrYslquKj X-Received: by 2002:a05:620a:2688:b0:79d:7970:d7d3 with SMTP id af79cd13be357-79eee1b002emr583331985a.2.1720193988191; Fri, 05 Jul 2024 08:39:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193988; cv=none; d=google.com; s=arc-20160816; b=cuILXgPZ/9n8bRSQUkpysdLc9a+n9iK+qw22tta8FAVovFfMe9bZzPOZCvTT+d36dF RuW71I79ik7HMKu8IUo1+ZugbER+sgOdAluCEn/xLqgrSWCnraavfc+OLI4tLhP6P/WW zO1bDGTJ5oNEkWxB9eTezby5YMM2Ot0dOS4FF+KEGF6tZoVKr+gtAUwTMcJ6MYBXKrpG JQkL8bxTvjCH5pbqJmIIVskqhW7LmLFpBKN+Lkw6AFL5uKwtXKnd2Pjn2FdHJ2gi+rZM 2yjRxumIxmKkekftLdBHU7jU/tXxBbG9ucJL+UOKMpHmoUh4HbLsswyMx+dSmEjnsSWT 1NQg== 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=iNTI1OxNzY3tCEGj206q5bDerGVhXw3fIYt94bTCFu0=; fh=8FLk4Ih3Lbrsv0cnY4BqHX+2EEa3ySqAqshMfns3vXY=; b=IzKtEkT9hdd0lL+Uz0ACl6WgbGD7xho/5chRgyJmLYFDcsKlY4xHrG2f2VU2FJ5bBJ A8+hx32hdpbggZ1VqlWTYtVDeFBMHOAX+JDywvUT2pF0FK7D7FMOkw/CJGV9sKVQ7ZUI Iw42keNUjmj2L1VxJ6EPxPUXfp94QwYgLaxnUmNdMumFCdM7xjMIF6V7uUXEZlCFG5yQ C/3aOAJSfV094eXeaKYcx2ZMi+zQxBZciG31Xk4dqxifVRxauhqAsfechZnIC7MApzRO 1Iiwo9DlWp95A+VjgKMe1NmhMj1lreQ3GuVjlzaYbQHRthuwWQiBiPPbBnwTew/GfxPY EtLw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cKvgivHv; 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 af79cd13be357-79d6928781fsi1676049385a.187.2024.07.05.08.39.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:39:48 -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=cKvgivHv; 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 1sPl0E-0002zh-7G; Fri, 05 Jul 2024 11:37:38 -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 1sPkzs-0002Zp-EX for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:16 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450: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 1sPkzq-0001GR-6k for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:16 -0400 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a7527afa23cso215488066b.2 for ; Fri, 05 Jul 2024 08:37:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193832; x=1720798632; 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=iNTI1OxNzY3tCEGj206q5bDerGVhXw3fIYt94bTCFu0=; b=cKvgivHvE6Uom+pPq7kMH9IWKYZrJ3xGeg6MR06AoUJUHVhG0iXJ/X8+XakUdXVKYK /2ztW+bWulUMFwMmpnEEZ467WKQOwCtgA798yLh+QT1hlxeBnLJRCHVMBn7s1cYigt2y OcdQxW58/QOcSl9zagtQ3VVZYned0Y/JndpvspTba1jdF6znQueiX6wBmUq+lKEyvayb kB60M0ugNMvi0JfrIuPFMdyMdPv75loShLUYxUDyRzKbuONfhf1rbOiBrMjVqFOvtPhv RDHuiRnlh232LZt0J34itDOOsD6EqpGiyC+U92Ub8Lcg8V4fB8cNS4yyyISjdWP/s1DN 3WsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193832; x=1720798632; 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=iNTI1OxNzY3tCEGj206q5bDerGVhXw3fIYt94bTCFu0=; b=RmyLaYkOOS8Yx7i2rDNh4+d399VN34MHdaui5jwf/ks5Yu4C/YrOPSpUomB1zqxFqI jGDn0J7WUlIxjDSQexyNHSctqWCBU86dEwwu8jDsFIsMs1wWyh27qS2xT/nXO6kb/ie+ gL9KRxTwizSMfoRsNLmuXOtzJdl/Ib9ZMy76LMWLhbDWGL/rKFkpKCzdPyPfXhO1o6S9 EJ9NvS96JcR2pui1QRXXWqlqVPd8n0BIupUdppCVAk6ptUsydiDfCltuHPc/4QBO/mMW qNqCD72Rq/krbvHxtBZM+gqTtLX4VMLmqzJoXEar6G3N8S9wKuu8sRvyKSx1DTONYiS3 7O3Q== X-Gm-Message-State: AOJu0Yxh3HS7AHl0PxnnsNggtg8d4RjOzVgB1cNIL7ok9tvVhM69Mb4P Q7Ij/Ncd1YFlboJx9/1oVsaxkdrzAqqwpqZjj6hnr7+JgS3yS3lIA9aGYpY2H98= X-Received: by 2002:a17:906:3b8e:b0:a72:4676:4f8 with SMTP id a640c23a62f3a-a77ba70d755mr282546366b.62.1720193831692; Fri, 05 Jul 2024 08:37:11 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a77d8ce6a78sm40399366b.179.2024.07.05.08.37.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:37:10 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2A58A6216F; Fri, 5 Jul 2024 16:30:56 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Gustavo Romero , =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 33/40] target/arm: Fix exception case in allocation_tag_mem_probe Date: Fri, 5 Jul 2024 16:30:45 +0100 Message-Id: <20240705153052.1219696-34-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-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=unavailable 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: Gustavo Romero If page in 'ptr_access' is inaccessible and probe is 'true' allocation_tag_mem_probe should not throw an exception, but currently it does, so fix it. Signed-off-by: Gustavo Romero Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20240628050850.536447-5-gustavo.romero@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-34-alex.bennee@linaro.org> diff --git a/target/arm/tcg/mte_helper.c b/target/arm/tcg/mte_helper.c index 037ac6dd60..a50d576294 100644 --- a/target/arm/tcg/mte_helper.c +++ b/target/arm/tcg/mte_helper.c @@ -96,6 +96,9 @@ static uint8_t *allocation_tag_mem_probe(CPUARMState *env, int ptr_mmu_idx, assert(!(probe && ra)); if (!(flags & (ptr_access == MMU_DATA_STORE ? PAGE_WRITE_ORG : PAGE_READ))) { + if (probe) { + return NULL; + } cpu_loop_exit_sigsegv(env_cpu(env), ptr, ptr_access, !(flags & PAGE_VALID), ra); } From patchwork Fri Jul 5 15:30:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810418 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp1669842wru; Fri, 5 Jul 2024 08:38:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVBsz9olTvx3h98N+ieW0KvK9mv35P19Z5os/K2cKV4xPXuz10F7a4drOROhpCP73kpohb7rLCeYDU3lz2UHhb6 X-Google-Smtp-Source: AGHT+IE9yCOHXbhTYG7h8rA3ykxayGNSTCHK3rsjiW7ncQjs0Sfw8op1v6YDl+qdczg1A94MPZQj X-Received: by 2002:ad4:5d69:0:b0:6b5:9034:54d with SMTP id 6a1803df08f44-6b5ed2840a3mr61351456d6.62.1720193905183; Fri, 05 Jul 2024 08:38:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193905; cv=none; d=google.com; s=arc-20160816; b=fRPR0qDBtZibvL7FKJnnCZ26hHVvffYLlGTfTYAFAWbdbTcJHb4iVcCzaW/LdNSGMC 8aKpDworkvXrZ3HD3YsrHhBXmK1l78kpRcF2++6rLECx+biiwTU5iUDui8PL9NQWZ+Ma BZmYhkywBP8s/FTXVlPP/LAJQrKioxgKzfGh7ub1+u+nPigSJ+wYx6Ya/nqM0Pk/Qynb OoBG2yIbi6SpNkx4+7bpG/Xh/wLt1Zcl+Vl2BXS8TNuRU2/UAlbux0tI9mOtKb8Oxdi6 C42ubVl2DgAGjHC3a8+NzSRbZ+kD+C4pZtyffxar6b9p7D8+xa76l/z0ulBqY8Kyun8M +M6Q== 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=76ccM/rpS4+7b3Bhm1qL0Ddb7vrGKR7l9TAhXh8rp+A=; fh=j/EbjDDvyQ12gdgsvAXy5t49YgxEv9IiDJ225AGivBc=; b=QRjOyI986KVFbIx7TTEIiwmg3D0ASwGzEX6fSlWipr5DNIoPLz1dztrA9SHKeIbd3E 6F/Q6KXIlpw49Jeiowjgz3wzfWGSSl3MggD8X5yEmO8WTd1eqfUAnNEAlotYzYqZPk8F b1NdPd29XM75epMPXFhw7wsR1L+leh/hu4xP6yj4EiwTHdndizq4mWIQ6a+5dCrqVVFK Zd129HdxNHN4HVd7vqDlz/uNA+Ph5l6yyhFwpuSb9/o9eyYO+LHLpo8QTeuKie8zDnCf gJWD1GU7nROS0Ft9LQqaQRwhAlsIU0g6M3ahzvwtXTVRrPF9deQ88cLDEN1iibFq/k4D IlEQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kjFNQzVE; 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 6a1803df08f44-6b5e5c73e7asi50368626d6.142.2024.07.05.08.38.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:38:25 -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=kjFNQzVE; 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 1sPl04-0002dj-Fe; Fri, 05 Jul 2024 11:37:28 -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 1sPl00-0002cs-KK for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:24 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPkzx-0001Ii-E9 for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:24 -0400 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a77c9c5d68bso102304166b.2 for ; Fri, 05 Jul 2024 08:37:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193840; x=1720798640; 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=76ccM/rpS4+7b3Bhm1qL0Ddb7vrGKR7l9TAhXh8rp+A=; b=kjFNQzVEI8ykmlzOEf+A0Oy/chPrmFq+JvD6+Gc+OB0f1s8S51li9eEqodfNYyNogA tFC8Dx/EksX+JpErkm7Jbt5jZ/0fp3wGWJuQjNic72tgcycl8ynqQEr6M9xgfIR4c/xJ smF0iy2zxGikR2tvPgl5PbCsRR9SPODP4Ii2idGvXzg+5JokagHxqkI7eAuikiXn//pc 0Qecbpnqq5xEA9X7Kcvr75/X1CTt56+qRcsywvCdj282mHF+i5bTpdFE3ET8uSR1nI0c omNQRCldwdFvCpQF5Qr2I4UmqAVR+lV/CIYhrkNY1H4E/9f/S8fQbMkXNjpwC+vELQ/M HKzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193840; x=1720798640; 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=76ccM/rpS4+7b3Bhm1qL0Ddb7vrGKR7l9TAhXh8rp+A=; b=lzKWrnJI3vSJFr7R6kyfTKwsRQk0teT6AhjCHz3ZlYOPGIga50YJCdvbxnDBRSd+DF tJE7Rs1+6yZ/ChBtQrIb4elNC5r62eDbV1397LZT/ezLCEiXtU1v14BDxp8b26ZJyncn hKeJ0pBW54gbQRXHfzOjE+BKuj7gT2A6Im4IPJ/djQ6zDwstP+B0mxt52XIgG+aa28Wz X6OpKuYphSMF58FuBnWVtQFg38QxH/t524C8czNCEr8ntcdcYD7bpOoQtGUXoxkb7uLJ QnPplKzI6Tjdq8DvSL4WNZpbwrrCm23Yqq94R1gY2ZRYE1jk78lz4PwSSMY4jk+Hz4uh oLqQ== X-Gm-Message-State: AOJu0YxSqNxEL+/NEpPkPEP8xe3g3JrovTMnW1ze98iAgEEpDmYHaCh/ ieCMwZ9iAFXns/ChTZNi4P35wMe02QFVBTXvTkyy2e2E+53v1w2MqFNHZuCWi1I= X-Received: by 2002:a17:906:2c1a:b0:a77:d773:54ec with SMTP id a640c23a62f3a-a77d773565fmr118370966b.8.1720193839763; Fri, 05 Jul 2024 08:37:19 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a72ab08d138sm690977466b.158.2024.07.05.08.37.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:37:14 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 4086362170; Fri, 5 Jul 2024 16:30:56 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Gustavo Romero , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 34/40] target/arm: Make some MTE helpers widely available Date: Fri, 5 Jul 2024 16:30:46 +0100 Message-Id: <20240705153052.1219696-35-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62b.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: Gustavo Romero Make the MTE helpers allocation_tag_mem_probe, load_tag1, and store_tag1 available to other subsystems. Signed-off-by: Gustavo Romero Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20240628050850.536447-6-gustavo.romero@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-35-alex.bennee@linaro.org> diff --git a/target/arm/tcg/mte_helper.h b/target/arm/tcg/mte_helper.h new file mode 100644 index 0000000000..1f471fb69b --- /dev/null +++ b/target/arm/tcg/mte_helper.h @@ -0,0 +1,66 @@ +/* + * ARM MemTag operation helpers. + * + * This code is licensed under the GNU GPL v2 or later. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#ifndef TARGET_ARM_MTE_H +#define TARGET_ARM_MTE_H + +#include "exec/mmu-access-type.h" + +/** + * allocation_tag_mem_probe: + * @env: the cpu environment + * @ptr_mmu_idx: the addressing regime to use for the virtual address + * @ptr: the virtual address for which to look up tag memory + * @ptr_access: the access to use for the virtual address + * @ptr_size: the number of bytes in the normal memory access + * @tag_access: the access to use for the tag memory + * @probe: true to merely probe, never taking an exception + * @ra: the return address for exception handling + * + * Our tag memory is formatted as a sequence of little-endian nibbles. + * That is, the byte at (addr >> (LOG2_TAG_GRANULE + 1)) contains two + * tags, with the tag at [3:0] for the lower addr and the tag at [7:4] + * for the higher addr. + * + * Here, resolve the physical address from the virtual address, and return + * a pointer to the corresponding tag byte. + * + * If there is no tag storage corresponding to @ptr, return NULL. + * + * If the page is inaccessible for @ptr_access, or has a watchpoint, there are + * three options: + * (1) probe = true, ra = 0 : pure probe -- we return NULL if the page is not + * accessible, and do not take watchpoint traps. The calling code must + * handle those cases in the right priority compared to MTE traps. + * (2) probe = false, ra = 0 : probe, no fault expected -- the caller guarantees + * that the page is going to be accessible. We will take watchpoint traps. + * (3) probe = false, ra != 0 : non-probe -- we will take both memory access + * traps and watchpoint traps. + * (probe = true, ra != 0 is invalid and will assert.) + */ +uint8_t *allocation_tag_mem_probe(CPUARMState *env, int ptr_mmu_idx, + uint64_t ptr, MMUAccessType ptr_access, + int ptr_size, MMUAccessType tag_access, + bool probe, uintptr_t ra); + +/** + * load_tag1 - Load 1 tag (nibble) from byte + * @ptr: The tagged address + * @mem: The tag address (packed, 2 tags in byte) + */ +int load_tag1(uint64_t ptr, uint8_t *mem); + +/** + * store_tag1 - Store 1 tag (nibble) into byte + * @ptr: The tagged address + * @mem: The tag address (packed, 2 tags in byte) + * @tag: The tag to be stored in the nibble + */ +void store_tag1(uint64_t ptr, uint8_t *mem, int tag); + +#endif /* TARGET_ARM_MTE_H */ diff --git a/target/arm/tcg/mte_helper.c b/target/arm/tcg/mte_helper.c index a50d576294..9d2ba287ee 100644 --- a/target/arm/tcg/mte_helper.c +++ b/target/arm/tcg/mte_helper.c @@ -29,6 +29,7 @@ #include "hw/core/tcg-cpu-ops.h" #include "qapi/error.h" #include "qemu/guest-random.h" +#include "mte_helper.h" static int choose_nonexcluded_tag(int tag, int offset, uint16_t exclude) @@ -50,42 +51,10 @@ static int choose_nonexcluded_tag(int tag, int offset, uint16_t exclude) return tag; } -/** - * allocation_tag_mem_probe: - * @env: the cpu environment - * @ptr_mmu_idx: the addressing regime to use for the virtual address - * @ptr: the virtual address for which to look up tag memory - * @ptr_access: the access to use for the virtual address - * @ptr_size: the number of bytes in the normal memory access - * @tag_access: the access to use for the tag memory - * @probe: true to merely probe, never taking an exception - * @ra: the return address for exception handling - * - * Our tag memory is formatted as a sequence of little-endian nibbles. - * That is, the byte at (addr >> (LOG2_TAG_GRANULE + 1)) contains two - * tags, with the tag at [3:0] for the lower addr and the tag at [7:4] - * for the higher addr. - * - * Here, resolve the physical address from the virtual address, and return - * a pointer to the corresponding tag byte. - * - * If there is no tag storage corresponding to @ptr, return NULL. - * - * If the page is inaccessible for @ptr_access, or has a watchpoint, there are - * three options: - * (1) probe = true, ra = 0 : pure probe -- we return NULL if the page is not - * accessible, and do not take watchpoint traps. The calling code must - * handle those cases in the right priority compared to MTE traps. - * (2) probe = false, ra = 0 : probe, no fault expected -- the caller guarantees - * that the page is going to be accessible. We will take watchpoint traps. - * (3) probe = false, ra != 0 : non-probe -- we will take both memory access - * traps and watchpoint traps. - * (probe = true, ra != 0 is invalid and will assert.) - */ -static uint8_t *allocation_tag_mem_probe(CPUARMState *env, int ptr_mmu_idx, - uint64_t ptr, MMUAccessType ptr_access, - int ptr_size, MMUAccessType tag_access, - bool probe, uintptr_t ra) +uint8_t *allocation_tag_mem_probe(CPUARMState *env, int ptr_mmu_idx, + uint64_t ptr, MMUAccessType ptr_access, + int ptr_size, MMUAccessType tag_access, + bool probe, uintptr_t ra) { #ifdef CONFIG_USER_ONLY uint64_t clean_ptr = useronly_clean_ptr(ptr); @@ -287,7 +256,7 @@ uint64_t HELPER(addsubg)(CPUARMState *env, uint64_t ptr, return address_with_allocation_tag(ptr + offset, rtag); } -static int load_tag1(uint64_t ptr, uint8_t *mem) +int load_tag1(uint64_t ptr, uint8_t *mem) { int ofs = extract32(ptr, LOG2_TAG_GRANULE, 1) * 4; return extract32(*mem, ofs, 4); @@ -321,7 +290,7 @@ static void check_tag_aligned(CPUARMState *env, uint64_t ptr, uintptr_t ra) } /* For use in a non-parallel context, store to the given nibble. */ -static void store_tag1(uint64_t ptr, uint8_t *mem, int tag) +void store_tag1(uint64_t ptr, uint8_t *mem, int tag) { int ofs = extract32(ptr, LOG2_TAG_GRANULE, 1) * 4; *mem = deposit32(*mem, ofs, 4, tag); From patchwork Fri Jul 5 15:30:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810406 Delivered-To: patch@linaro.org Received: by 2002:ab3:6bc5:0:b0:273:6c53:9181 with SMTP id v5csp524670ltk; Fri, 5 Jul 2024 08:33:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWsJhXVyky2Gsv+77XEWpKAeKHt+8vkqG3TKpxhna129L1tZgRupqm9cDuYMiTCrRUfPKSjhxtn98JCs/1wP9Mw X-Google-Smtp-Source: AGHT+IG9n0y6qtGHOxPUo2e6c8Gw2XwHaR7EVE0oItxvIm/hbYQammS5kCl/Zwt8PMFcrSVs30rx X-Received: by 2002:a05:6214:19ca:b0:6b2:b13c:5b03 with SMTP id 6a1803df08f44-6b5ed1bafd7mr63072826d6.56.1720193623912; Fri, 05 Jul 2024 08:33:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193623; cv=none; d=google.com; s=arc-20160816; b=uPlKdjFErPbhwunOqfSUL6/zOI4FQvAXKNrTaPD938TDd1NUedoUdJ2ZS94uvpXBG/ EtplBhX2kl/GplN1gws0yfTK1RB0TIhblUeLfSb3xuCXCzByVo+JXNuoUtE3QXY+1e/G SRLSRoygCXq0XnsTuzblQ+fkVwSz3SI81At9oqkQT9S2N6BmDuuNfaGS2gyYmgtUlZpq 9urQhNE/DmJ/L70N/FoWKqBBq3gZoxFth4th0ZiX8Z4gKl7GyM1vOkv9f+NVbgLhEY60 yIwQ/Q5LRJmrwtke0jGK9cskWIWky/rb+n0IAIpPIPjceBX2UixRKLUkZIgEmDVlOAqJ NVBg== 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=6cFGUCF6aXfdVBiObpZIc6vFZvFIj8S4CeyY/mINKQs=; fh=RIavGroAcxKDGrmntDiXlzQHOysZ2XgC8XGZsLy6KUw=; b=wlHT31W8p0Jlx68Xgy3IeIwArLVF1Yh6OOSreS2hywo5TwRwlCPJHEFETYi44fzNJK YqnV0JA8Mvu5C4BTj08JFSlS+ZiG84Y8cC93YEQlTT1NrS9Ev7bHNM0mNorS+qp8i4nv +rYtWWmmUeu+gOr7+mdq4df2WgQPbU4tdcAEuOmsZCjmnQxpkDHTHAqEnOPc7d/U6mhV ijXqYl1VBcIQqRoSGTW4yOCG7yQ0mfgn9IRKg1foDNr9rYHaoLPxstrA6cdj6I6oqKEi M2U+ajV7WD/JNBmgx3QJFJtun4RiTI4vIOnfEpE3Tt8O4CZUzoRnsanKcZ/F42U5DvaN Zstg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O0OcE8yq; 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 6a1803df08f44-6b5ed5751fbsi36082336d6.301.2024.07.05.08.33.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:33:43 -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=O0OcE8yq; 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 1sPku8-0005o1-7P; Fri, 05 Jul 2024 11:31:20 -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 1sPku6-0005m6-6V for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:18 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPktz-0000Sh-6e for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:17 -0400 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-58b447c513aso2092292a12.2 for ; Fri, 05 Jul 2024 08:31:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193470; x=1720798270; 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=6cFGUCF6aXfdVBiObpZIc6vFZvFIj8S4CeyY/mINKQs=; b=O0OcE8yq6tiE1hX795UrGKjsRy3xhJgfDvoLgmCSuOjVUsXwWMIhH+yK5N/QMVZPuj 5iDO+WkCybMr01nkJMJpJn6htq3ulIpsTXmAqEXK4nkRObqOJ2+XxhSZ0BFZE1gFQEpx 75HRdHGGLWWDDhobgRPJYbteyV4H7v1dE8PTsamynhwry4InFQS6WSi9zM7c9NKweGfE fBvM2CbFSRS9ZsVa/+SQ9b50M/AYKOlcJ3YfGh/qIL0wuQr0I7FQsOBKmI7h/ZwrErs8 4iT7HWT2i44QiWyUCXqLM6Izzb5hqYzXtldLLgwxp0xTk6FMYCTAR6feBBfYNJRzbZ8/ emgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193470; x=1720798270; 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=6cFGUCF6aXfdVBiObpZIc6vFZvFIj8S4CeyY/mINKQs=; b=j2NuYsWsOG7CdpHLQDg6rv/29Msd+kKVw4g3EQh0cfFMIP3va10x8dPvPp+QG4ZNoQ sh+cnq/3CMah3KPSHodJmTqZmXAb9+V7CqH6WoFyBtOw+hGmcXsU/oURFTJMhgvyBqeq E3HegEb6xyNODJqCjwY9JM6Oe69jQHDGGivHbyR6dGxBDtxwcHkeVwl9nsqxeMwZPIGi b7MVtSI0qna9moigCvBjTL/pQUXXATEUJ3mbUx1dSH9uoA3NuCDiM3USrD3P5oJkHwNu O44EB8+3ZZ3cXUgellm/QJIy1zPfikjViMbo3g1kTw1Jcidx7U7/KMO7x8+MBi52pAjf 2dCA== X-Gm-Message-State: AOJu0Yyw6jQyIGax3uqxbH9VCXJ9IT3aqOtxY7h1TKya0luuUwG5ZBSR Qfbdj68N04vaiyN1U0TeMxYVzzx/JMZVqRXDBY/H9exooXNUyiwAiXUoTJcAS9M= X-Received: by 2002:a05:6402:11c8:b0:58b:565d:ac92 with SMTP id 4fb4d7f45d1cf-58e5b4a7759mr3682778a12.22.1720193468808; Fri, 05 Jul 2024 08:31:08 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5907e4d79ddsm207464a12.59.2024.07.05.08.31.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:31:06 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 5B65C62174; Fri, 5 Jul 2024 16:30:56 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Gustavo Romero , Manos Pitsidianakis , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Laurent Vivier Subject: [PULL 35/40] target/arm: Factor out code for setting MTE TCF0 field Date: Fri, 5 Jul 2024 16:30:47 +0100 Message-Id: <20240705153052.1219696-36-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x532.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: Gustavo Romero Factor out the code used for setting the MTE TCF0 field from the prctl code into a convenient function. Other subsystems, like gdbstub, need to set this field as well, so keep it as a separate function to avoid duplication and ensure consistency in how this field is set across the board. Signed-off-by: Gustavo Romero Message-Id: <20240628050850.536447-7-gustavo.romero@linaro.org> [AJB: clean-up includes, move MTE defines] Reviewed-by: Manos Pitsidianakis Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-36-alex.bennee@linaro.org> diff --git a/linux-user/aarch64/mte_user_helper.h b/linux-user/aarch64/mte_user_helper.h new file mode 100644 index 0000000000..8685e5175a --- /dev/null +++ b/linux-user/aarch64/mte_user_helper.h @@ -0,0 +1,32 @@ +/* + * ARM MemTag convenience functions. + * + * This code is licensed under the GNU GPL v2 or later. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#ifndef AARCH64_MTE_USER_HELPER_H +#define AARCH64_MTE USER_HELPER_H + +#ifndef PR_MTE_TCF_SHIFT +# define PR_MTE_TCF_SHIFT 1 +# define PR_MTE_TCF_NONE (0UL << PR_MTE_TCF_SHIFT) +# define PR_MTE_TCF_SYNC (1UL << PR_MTE_TCF_SHIFT) +# define PR_MTE_TCF_ASYNC (2UL << PR_MTE_TCF_SHIFT) +# define PR_MTE_TCF_MASK (3UL << PR_MTE_TCF_SHIFT) +# define PR_MTE_TAG_SHIFT 3 +# define PR_MTE_TAG_MASK (0xffffUL << PR_MTE_TAG_SHIFT) +#endif + +/** + * arm_set_mte_tcf0 - Set TCF0 field in SCTLR_EL1 register + * @env: The CPU environment + * @value: The value to be set for the Tag Check Fault in EL0 field. + * + * Only SYNC and ASYNC modes can be selected. If ASYMM mode is given, the SYNC + * mode is selected instead. So, there is no way to set the ASYMM mode. + */ +void arm_set_mte_tcf0(CPUArchState *env, abi_long value); + +#endif /* AARCH64_MTE_USER_HELPER_H */ diff --git a/linux-user/aarch64/target_prctl.h b/linux-user/aarch64/target_prctl.h index aa8e203c15..ed75b9e4b5 100644 --- a/linux-user/aarch64/target_prctl.h +++ b/linux-user/aarch64/target_prctl.h @@ -7,6 +7,7 @@ #define AARCH64_TARGET_PRCTL_H #include "target/arm/cpu-features.h" +#include "mte_user_helper.h" static abi_long do_prctl_sve_get_vl(CPUArchState *env) { @@ -173,26 +174,7 @@ static abi_long do_prctl_set_tagged_addr_ctrl(CPUArchState *env, abi_long arg2) env->tagged_addr_enable = arg2 & PR_TAGGED_ADDR_ENABLE; if (cpu_isar_feature(aa64_mte, cpu)) { - /* - * Write PR_MTE_TCF to SCTLR_EL1[TCF0]. - * - * The kernel has a per-cpu configuration for the sysadmin, - * /sys/devices/system/cpu/cpu/mte_tcf_preferred, - * which qemu does not implement. - * - * Because there is no performance difference between the modes, and - * because SYNC is most useful for debugging MTE errors, choose SYNC - * as the preferred mode. With this preference, and the way the API - * uses only two bits, there is no way for the program to select - * ASYMM mode. - */ - unsigned tcf = 0; - if (arg2 & PR_MTE_TCF_SYNC) { - tcf = 1; - } else if (arg2 & PR_MTE_TCF_ASYNC) { - tcf = 2; - } - env->cp15.sctlr_el[1] = deposit64(env->cp15.sctlr_el[1], 38, 2, tcf); + arm_set_mte_tcf0(env, arg2); /* * Write PR_MTE_TAG to GCR_EL1[Exclude]. diff --git a/linux-user/aarch64/mte_user_helper.c b/linux-user/aarch64/mte_user_helper.c new file mode 100644 index 0000000000..a5b1c8503b --- /dev/null +++ b/linux-user/aarch64/mte_user_helper.c @@ -0,0 +1,35 @@ +/* + * ARM MemTag convenience functions. + * + * This code is licensed under the GNU GPL v2 or later. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#include "qemu/osdep.h" +#include "qemu.h" +#include "mte_user_helper.h" + +void arm_set_mte_tcf0(CPUArchState *env, abi_long value) +{ + /* + * Write PR_MTE_TCF to SCTLR_EL1[TCF0]. + * + * The kernel has a per-cpu configuration for the sysadmin, + * /sys/devices/system/cpu/cpu/mte_tcf_preferred, + * which qemu does not implement. + * + * Because there is no performance difference between the modes, and + * because SYNC is most useful for debugging MTE errors, choose SYNC + * as the preferred mode. With this preference, and the way the API + * uses only two bits, there is no way for the program to select + * ASYMM mode. + */ + unsigned tcf = 0; + if (value & PR_MTE_TCF_SYNC) { + tcf = 1; + } else if (value & PR_MTE_TCF_ASYNC) { + tcf = 2; + } + env->cp15.sctlr_el[1] = deposit64(env->cp15.sctlr_el[1], 38, 2, tcf); +} diff --git a/linux-user/syscall.c b/linux-user/syscall.c index e2804312fc..b8c278b91d 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6281,15 +6281,6 @@ abi_long do_arch_prctl(CPUX86State *env, int code, abi_ulong addr) # define PR_GET_TAGGED_ADDR_CTRL 56 # define PR_TAGGED_ADDR_ENABLE (1UL << 0) #endif -#ifndef PR_MTE_TCF_SHIFT -# define PR_MTE_TCF_SHIFT 1 -# define PR_MTE_TCF_NONE (0UL << PR_MTE_TCF_SHIFT) -# define PR_MTE_TCF_SYNC (1UL << PR_MTE_TCF_SHIFT) -# define PR_MTE_TCF_ASYNC (2UL << PR_MTE_TCF_SHIFT) -# define PR_MTE_TCF_MASK (3UL << PR_MTE_TCF_SHIFT) -# define PR_MTE_TAG_SHIFT 3 -# define PR_MTE_TAG_MASK (0xffffUL << PR_MTE_TAG_SHIFT) -#endif #ifndef PR_SET_IO_FLUSHER # define PR_SET_IO_FLUSHER 57 # define PR_GET_IO_FLUSHER 58 diff --git a/linux-user/aarch64/meson.build b/linux-user/aarch64/meson.build index 248c578d15..f75bb3cd75 100644 --- a/linux-user/aarch64/meson.build +++ b/linux-user/aarch64/meson.build @@ -9,3 +9,5 @@ vdso_le_inc = gen_vdso.process('vdso-le.so', extra_args: ['-r', '__kernel_rt_sigreturn']) linux_user_ss.add(when: 'TARGET_AARCH64', if_true: [vdso_be_inc, vdso_le_inc]) + +linux_user_ss.add(when: 'TARGET_AARCH64', if_true: [files('mte_user_helper.c')]) From patchwork Fri Jul 5 15:30:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810421 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp1670006wru; Fri, 5 Jul 2024 08:38:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX/N2nuUau/vgNjVmP9CeJ9KYvqilgZgGGyELXKOH3D5WVVzYCO1c8YeLHo3dyAr8CaxJTnwGjBSZsmr4yFHF80 X-Google-Smtp-Source: AGHT+IEeVYE5/bz1GOd3PZ5ES/GDhi+CDEUlDfckO0phUdrzLFlb/IZxl6KMMJ8mYm+FR8XugABg X-Received: by 2002:ad4:5bc7:0:b0:6b0:7ea7:4189 with SMTP id 6a1803df08f44-6b5ed250dc2mr57485916d6.42.1720193929965; Fri, 05 Jul 2024 08:38:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193929; cv=none; d=google.com; s=arc-20160816; b=dPuGf25u/PbX85B+/NtV9jWZhBLnG8jb8hkeEJ5VfRQ7uWeEoMii8dR5noNTB9eyRs kpXyuFO0LmqDn6TV8OUv9LMgdHNWbwqt/GlIQlOXgQ6Rx3rzhTMKOC5ecAkaPPNQ5J4h z4Tr9tRglLISAVsA/Z6UN5lxzlFnlOpvI70XNQykxGoKLdjD3QYLf4LRjvXPxZn1kMXU SX9KlNMjZpiVC/cjPtgsadDLWBDb7/18etuoqs8m/ifykGrOlj3fWg3niduxotnAKOjH rnCO2xPafyh9Stq5ziEd1leyG51ZejC7b6O5iWK+cIUTePTot83xId2Pr4Nd61y1oedt qM2Q== 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=tcblXcJm1xF5LxPcrc6RNUAzD4wW3iGRX/uV+phD6V0=; fh=FKe4qLcXgxNVGePk8DrDECLeoHph9zmIpkRPPyTMwXQ=; b=hk8GpaqzSZLeClbtZMaSUp+TiJwgeSnf2XCBBTv5qh00pjRMTwx5LvyLXD4KzFwujk 0gLojHX6lg5xdQlHWd1bkxxqU94peEu7BV/nS/w39OmNdr53avW4sGhsql+u9/XQL2Up 9rLbsEO3GeM58AvUoT9A7BNPD0hQRrvelEvVORxgmlIPB5U1r7ZLyWc9+vom9sueETtp IphZxjlFa6WaXWlCK7ReJSWEVh4eqwtEhHMfY53FTskpA13tndb+uUmIwQjIH36l7bXP 5D4KUi/58e/lFJNLrb6fmhYfLCGZ34sNfMcJlKH0Mve0jGInNN6qrpmWlHBPj3dHWKOz Ei/Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LYl7hFAq; 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 6a1803df08f44-6b5ff57eae2si1458086d6.197.2024.07.05.08.38.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:38: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=LYl7hFAq; 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 1sPl09-0002h6-DD; Fri, 05 Jul 2024 11:37:33 -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 1sPkzy-0002cO-Js for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:22 -0400 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPkzw-0001IW-Va for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:22 -0400 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a77cc73d35fso130563566b.0 for ; Fri, 05 Jul 2024 08:37:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193839; x=1720798639; 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=tcblXcJm1xF5LxPcrc6RNUAzD4wW3iGRX/uV+phD6V0=; b=LYl7hFAque1r8d9B93ePkItkHP0yvn4oi7GgmfPKnr90xEfGPF0n7jrFZeAVNQU3oT OGnESmOsYBnsqRPOd7wH3xLA4JGftWt5GIewBWPlfm7zid6BXPdgnahoOCTtTsk6CJ63 VN4OV7lSKJxWcqBBOVxSSMi6Bs78V3G/fBDbbGLlm6Ilgmu0qjYv+p8Ias6SXro/uFsD e7mWP4TzXMPp4dkVAGfKTI7tWPHTAZ6nNSASyCN7ci44qrweV2pAC8cMcyhghrO+DkAx lEAKtYmWJw7WUKinT4bUE+IEQRQ0hPUP4Mu4xnw1c4V4K8tiO9Xq+kIryaBssYwvaSJa oThw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193839; x=1720798639; 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=tcblXcJm1xF5LxPcrc6RNUAzD4wW3iGRX/uV+phD6V0=; b=aFV3UtBRYNYPzbuEO+9DhMMFT5ioG26aFlewKCpfVCNJK9PwlVB9Ra7visDjeE9PmP o/HuMUK5FSCSuCl8zWg/61O3QhBOZHkBuCyqT1M7/sid93vXH09ZKuh+V0DPFWlm28Ao enqBNNUXpoqt1WJ3AuQYuZ5HHg8SAFiDKuGf2bjlZzYCR5qfAD9XBW4QxSFMt2j8117e 6xoR4nQNsAiUQW46TRP00fM55YrKMrPe9L+Hdq2dwbI3Gmp3DxYP6dswzzf/PrB4/D6u N3VfcKFH/HLK6YMVsvEAEMQRFR7gKnG/tP12qpydnnhTHcx7xK8GInSSO+Q5KyP5oH5D jiFw== X-Gm-Message-State: AOJu0YwbJy4JimxQNNBxAqJXP10UN26SPRLgfqPiyfjwM3AVEkOpWSJc lJ+Mnt0NoqoKdcy7apXx/q2DP2E7gtumwGAzZcNbTf28FDFwfkIZXJRjPQQT9SA= X-Received: by 2002:a17:906:d1d2:b0:a77:cfe9:8ed5 with SMTP id a640c23a62f3a-a77cfe98f21mr157190366b.30.1720193839427; Fri, 05 Jul 2024 08:37:19 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a77c3ef218bsm103433166b.71.2024.07.05.08.37.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:37:14 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 7384B62176; Fri, 5 Jul 2024 16:30:56 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Gustavo Romero , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 36/40] gdbstub: Make hex conversion function non-internal Date: Fri, 5 Jul 2024 16:30:48 +0100 Message-Id: <20240705153052.1219696-37-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62d.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: Gustavo Romero Make gdb_hextomem non-internal so it's not confined to use only in gdbstub.c. Signed-off-by: Gustavo Romero Reviewed-by: Richard Henderson Message-Id: <20240628050850.536447-8-gustavo.romero@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-37-alex.bennee@linaro.org> diff --git a/gdbstub/internals.h b/gdbstub/internals.h index 34121dc61a..bf5a5c6302 100644 --- a/gdbstub/internals.h +++ b/gdbstub/internals.h @@ -107,7 +107,6 @@ static inline int tohex(int v) void gdb_put_strbuf(void); int gdb_put_packet_binary(const char *buf, int len, bool dump); -void gdb_hextomem(GByteArray *mem, const char *buf, int len); void gdb_memtohex(GString *buf, const uint8_t *mem, int len); void gdb_memtox(GString *buf, const char *mem, int len); void gdb_read_byte(uint8_t ch); diff --git a/include/gdbstub/commands.h b/include/gdbstub/commands.h index 306dfdef97..e51f276b40 100644 --- a/include/gdbstub/commands.h +++ b/include/gdbstub/commands.h @@ -91,4 +91,10 @@ void gdb_extend_set_table(GdbCmdParseEntry *table, int size); */ void gdb_extend_qsupported_features(char *qsupported_features); +/** + * Convert a hex string to bytes. Conversion is done per byte, so 2 hex digits + * are converted to 1 byte. Invalid hex digits are treated as 0 digits. + */ +void gdb_hextomem(GByteArray *mem, const char *buf, int len); + #endif /* GDBSTUB_COMMANDS_H */ From patchwork Fri Jul 5 15:30:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810414 Delivered-To: patch@linaro.org Received: by 2002:ab3:6bc5:0:b0:273:6c53:9181 with SMTP id v5csp525328ltk; Fri, 5 Jul 2024 08:35:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXV41iEVFGXngdjpu+bHsEIsFoubwv77bwpKPzupx62YDqk+Ue9dGFpPWknuKziM5SYUFKm/GfwbKqrYY2nTuW7 X-Google-Smtp-Source: AGHT+IHY5otBYWQlWNoYB4B9W2RMcoXHUxqkbH8/uRkzMyJ/DLLSFKBrc1i57fBjUhsWP11jadPl X-Received: by 2002:ac8:7fc2:0:b0:43e:26c1:1244 with SMTP id d75a77b69052e-447cbf8a840mr56189401cf.50.1720193708588; Fri, 05 Jul 2024 08:35:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193708; cv=none; d=google.com; s=arc-20160816; b=gLN0fXFpKuiQ3m9I6X8b3H2bWqi7EZy0WFLg/8RkpVZKf4oPyvB21pHcJv4f11ek+L euwKpiiMQllJEHq3+gEeXS1Pi7PszHRnP7p6BD5JFF1apsECUxuPOkgksJUvpKhdvPca 9PjyRASOnP/F/hTlZW9Rddyk64JP0NP+jdHr7bibbFyXfP0zhlnHWCISTwkqXOnDw2Kg hi6iQFac6puR+r3v0KohV6XDSeRhdKh63MrVb3KDOIe0gKBNEJxDdrdccZ8e7xsiaKwC jc9FIb04VnXFA7Ad6JoyUmSVMEjK+xcbd8KJv2ZmS2XDGA1rdLMd7h94kvogkzd40NQm H1hQ== 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=QehyRM+GTwCmdsI3rONPQxQARmvRAp8NK6kIeDY+sDQ=; fh=jjj6TwvHY3iRWuoaLi1HE+2qE+qjOjyidm5gKY3cdCg=; b=Wv2m1L+rn75hGrK8ZrV/Bky+iTRgS5Fhq9Njsg4CF54Q4UkDbrAf2P0Q2tDjat2AIi Q8WowjhDTm9To7UHKYuVNbxcfbVYKgjCbYHMgOkZUDhH7SUTdqtLLzmfC64ioF3rzWD5 VAybXSkiFW6uxFPjK556EsRyJG5FMLNR7lROQpS2KCBzLSn7z/XtgIIIAwglTK/2qKLO +Jxs/SfVfI6+sItkFu5yBGouKYbryn6hq+MuVbZTDnkEvHYP+cfcS1kxc8zH70orxyeG 6Wm5rqP5UiUu4iBmi7PVmkfLbKC4f45MxxJtAEyehjgPA+6COcHtUhSU7bOD7lW50/XV 7T3g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ool1+wKj; 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 d75a77b69052e-447dcfc4040si5468051cf.282.2024.07.05.08.35.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:35:08 -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=Ool1+wKj; 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 1sPku5-0005lT-MW; Fri, 05 Jul 2024 11:31:17 -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 1sPku4-0005kK-7l for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:16 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPkty-0000Rs-9X for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:15 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a77b550128dso227621066b.0 for ; Fri, 05 Jul 2024 08:31:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193467; x=1720798267; 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=QehyRM+GTwCmdsI3rONPQxQARmvRAp8NK6kIeDY+sDQ=; b=Ool1+wKjSguZSqZldgEQlGRknT9iUHGJIr9DzxKRCyOvQu2YyaU9P6civf5AAgRhbO 9O3X7zMVp3/vxrAaFPr32hGOdtcoHmUBcjV9986AeEmZvLXXQH6h+suRoH+iQb8Sl4/Y vb5glPgzN1dUL5X/ZBerrEx44FLaWwLfskiescsa2i3i8m1s5Xk4ZUImTrbjhlpEZhaA nifeFyG7U0vEPX0IWxwEfTIgWPogYJSwmGXgrSxW66ADhwHdwte4nrfd5KQY+z+r53zK PXmcXX5hUOWV/xReLhCm3LYckpjvmIVMDlVgBoCApZnAQa6AR7UHmXMWU/I/FG8XDFE0 HJTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193467; x=1720798267; 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=QehyRM+GTwCmdsI3rONPQxQARmvRAp8NK6kIeDY+sDQ=; b=Xs/IC3wp9NzzlmnG+dnGe0N8dsP0vFCVIlv+9MbITDNdvG3rwZcF8unnQ5DJarYDUM Shh0jUfk31FUMRz3XRIXVnoxZ+v5Xam0hm8jo/Z6Z6Yh2a+QTI5QbXWvxLKkiSGY8V5Z zmBYIOxain8I37heGCpwcGtCimLM8Z9uXStPtbllHUmcJDaUsaZdR0STDiuTq3/Nx/EB Use4UWuwJSWkJQW65E+uv/y8fe2nNlL26vkenzgJLB57uH0Jf9FBjZbeE4f4DuROkFE/ 3MkV89vrzdP3b1G8jnzPjC7N1mqJQs66POriArWwp6S0RHXmdUBKYdKYE/UIfZPPYRsV 3ztA== X-Gm-Message-State: AOJu0YyNfD60jm3vtGCiTjA99Qma9u8XP1wAo9nunsh9DXu5dESPzsT9 B/8U8EzC/RtWsPrhXDsQWG4qmDcOcS7FAJ5sHB0B2I8yLK/huHPMO/G+0Gs+TRQ= X-Received: by 2002:a17:906:4794:b0:a75:3cd2:aaab with SMTP id a640c23a62f3a-a77ba455290mr397533666b.3.1720193467111; Fri, 05 Jul 2024 08:31:07 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a77da27c044sm33109966b.157.2024.07.05.08.31.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:31:04 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 8C6CB62177; Fri, 5 Jul 2024 16:30:56 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Gustavo Romero , Manos Pitsidianakis , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , =?utf-8?q?Philippe_Mathieu-Da?= =?utf-8?q?ud=C3=A9?= Subject: [PULL 37/40] gdbstub: Pass CPU context to command handler Date: Fri, 5 Jul 2024 16:30:49 +0100 Message-Id: <20240705153052.1219696-38-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62e.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: Gustavo Romero Allow passing the current CPU context to command handlers via user_ctx when the handler requires it. Signed-off-by: Gustavo Romero Message-Id: <20240628050850.536447-9-gustavo.romero@linaro.org> Reviewed-by: Manos Pitsidianakis Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-38-alex.bennee@linaro.org> diff --git a/include/gdbstub/commands.h b/include/gdbstub/commands.h index e51f276b40..f3058f9dda 100644 --- a/include/gdbstub/commands.h +++ b/include/gdbstub/commands.h @@ -54,6 +54,8 @@ typedef union GdbCmdVariant { * "stop reply" packet. The list of commands that accept such response is * defined at the GDB Remote Serial Protocol documentation. See: * https://sourceware.org/gdb/onlinedocs/gdb/Stop-Reply-Packets.html#Stop-Reply-Packets. + * + * @need_cpu_context: Pass current CPU context to command handler via user_ctx. */ typedef struct GdbCmdParseEntry { GdbCmdHandler handler; @@ -61,6 +63,7 @@ typedef struct GdbCmdParseEntry { bool cmd_startswith; const char *schema; bool allow_stop_reply; + bool need_cpu_context; } GdbCmdParseEntry; /** diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index b1ca253f97..5c1612ed2a 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -938,6 +938,7 @@ static bool process_string_cmd(const char *data, for (i = 0; i < num_cmds; i++) { const GdbCmdParseEntry *cmd = &cmds[i]; + void *user_ctx = NULL; g_assert(cmd->handler && cmd->cmd); if ((cmd->cmd_startswith && !startswith(data, cmd->cmd)) || @@ -952,8 +953,12 @@ static bool process_string_cmd(const char *data, } } + if (cmd->need_cpu_context) { + user_ctx = (void *)gdbserver_state.g_cpu; + } + gdbserver_state.allow_stop_reply = cmd->allow_stop_reply; - cmd->handler(params, NULL); + cmd->handler(params, user_ctx); return true; } From patchwork Fri Jul 5 15:30:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810428 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp1670213wru; Fri, 5 Jul 2024 08:39:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXpvtj0sQ3ao6CJYwgL4peypld0xexIvD2j/tUSfAUKQjfuuWXwoV5ACPcKB9w9n4fng63auoMmHTtbPSwyTDz7 X-Google-Smtp-Source: AGHT+IFLNVW02psF/r8CBsbMQ3Z9T0Sof/69NjHS1oBmyPMAAvz2u2MNbpdC9qRYe1AFWiEeJCcy X-Received: by 2002:ac8:588c:0:b0:446:653e:c371 with SMTP id d75a77b69052e-447cbf8a81bmr60434301cf.52.1720193958403; Fri, 05 Jul 2024 08:39:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193958; cv=none; d=google.com; s=arc-20160816; b=kipm4WL9Q+Hwq2mtQqY66p1Ml5VMeDXHXyicrVwqvNRyAAFFrpf5jhdQ4GqZgeSPx4 11HYSEqLyhfJ/9mk/hf1IE1VIo1v+R6CRJnoD5ozMxwl9DyVx/gbB2aKkSp1XNeWjCE6 8NJaC4SQlll3Z65kxiNSi+5orvN36m7phIpIBxLSMtkYam6Cqce+twVTts2J5Xt8+9a3 VCEA9uu1+VS/GFP00vM+sdPr4uAtdGBEhbDhHuV9ZPZLi+hGTuFwiU8utaxK0MSecC88 pGcYidQfBEhYo1ITcUe7OnesuhlGZkBZP+tHYkMMwxdaqtAqhZywLEvvcNlcIVaPH62V 7zdw== 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=SKiCUXhdtxK6IeX+xyMLUyY+4qp63cQ7G8m1vsLFBDw=; fh=jjj6TwvHY3iRWuoaLi1HE+2qE+qjOjyidm5gKY3cdCg=; b=XpLA0iAv7Gl2BSCGrdA7Oh9yu38TmSVcu9vAWYjJE0so/wdgddbHBcSqRaXQ1Dz65k fri4LXhaTPk1eRTS+yDmJDM7kWnJkWHyhqlpYVfAFxx27wneeVUcV9vTnZ4uUelGgi7X HWHG4IOiQcy1bExyPN6eoSKxyzSPZZ7bgZGfhBmZWOobxwXGPFyAzFDTcTtGTLk54Pe+ asT4tqbnk0GNLZazyYzSbO2ac/C1Beh5/lLKUftDGo+V4aFsdzd6uBuwjXa7UGmsvytR qB7meexGtchemRo8DUHpTLD0TzIL4yp9D3Zl16bBz2kVMK3pYXyxGk36Tf1Hj9pKeqQD 5NkQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bLITfrtl; 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 d75a77b69052e-447db5853c3si8323811cf.213.2024.07.05.08.39.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:39:18 -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=bLITfrtl; 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 1sPl0D-0002wH-07; Fri, 05 Jul 2024 11:37: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 1sPl04-0002fT-Lp for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:28 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPl02-0001Jp-5l for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:28 -0400 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a77c4309fc8so156207966b.3 for ; Fri, 05 Jul 2024 08:37:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193844; x=1720798644; 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=SKiCUXhdtxK6IeX+xyMLUyY+4qp63cQ7G8m1vsLFBDw=; b=bLITfrtlcd82T2tV+6oHzycNom1eUubqQdXCTf7NfrvtSdupDt4S2qn1R3UOkEeo4I JKot0/UshjdUv/AKVG0QmWLEn9J8Oe97YAiK5YCoVHHhiifycoBH3J/jZ+g/XrDYSlXs e1OE8iA+rayYt7PXT3BeFdcPZCntsFxxktXRz9aScC9KyU1dYJys/+AyXvkS9ZmbAV1T Jl22H0yj8K2U/KrFlIXxUTiOGHxTIawkAVnwZUfq9qjSVKFn2llNSi6Re9u8syi7JyJ0 Ahlv4HW55MsZVBkEpEEuV7O4g3I0AgpfD2u8bqJ37z5AItGABhPbu1pZ4R7ZiZdKr5pN liEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193844; x=1720798644; 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=SKiCUXhdtxK6IeX+xyMLUyY+4qp63cQ7G8m1vsLFBDw=; b=w+EWKXAlpd6C35D8e3FU9dzSlBh4akDcP8vExMrF2cZqwsAiaRhf1701EDvwyiFKOS 0P1QHgT2WFaGgySCiUsMUuN+kmuygJQQp0U1avJN7fT+DZI2d1NFY6LTr2jFlTOhWvlP 4Lki29bXDHjk/HXlKa5K557Z0VM1Rj4gyacccjh7+HlYP6yhciEX7fYMRDYlmTeqgwsR h3qbwpGAY1ItsbS28zCyrNO8P8lj0cAxPFUbStxt7rXr0hNRj4RqcOwhKG1n3t2AbDIY DfKQbSujSbgraALCsIpptPMkxiW3ifovZJ2J3cdo5Vb8hFtW+m1Z1A3lNOl6DL/W+Woz IOXQ== X-Gm-Message-State: AOJu0Yyg7/BNVvXMeqjm2LT2kjUxjXT5QNJMFvQJZS0xEZqjyyEG0uLu rggEtavIeGmKsLs7DkCcguWETWTfg0e6Wby3Qwe4bUPfqxE4o3IxcfEdDMqvcN3Dnjs9GskWDDS h X-Received: by 2002:a17:907:6e8d:b0:a6f:4bf2:daa2 with SMTP id a640c23a62f3a-a77ba45177amr397396866b.15.1720193844015; Fri, 05 Jul 2024 08:37:24 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a77ccee5277sm61679766b.177.2024.07.05.08.37.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:37:21 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id A283D6217D; Fri, 5 Jul 2024 16:30:56 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Gustavo Romero , Manos Pitsidianakis , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , =?utf-8?q?Philippe_Mathieu-Da?= =?utf-8?q?ud=C3=A9?= Subject: [PULL 38/40] gdbstub: Use true to set cmd_startswith Date: Fri, 5 Jul 2024 16:30:50 +0100 Message-Id: <20240705153052.1219696-39-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x635.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: Gustavo Romero cmd_startswith is a boolean so use 'true' to set it instead of 1. Signed-off-by: Gustavo Romero Message-Id: <20240628050850.536447-10-gustavo.romero@linaro.org> Reviewed-by: Manos Pitsidianakis Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-39-alex.bennee@linaro.org> diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index 5c1612ed2a..b9ad0a063e 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -1433,26 +1433,26 @@ static const GdbCmdParseEntry gdb_v_commands_table[] = { { .handler = handle_v_cont_query, .cmd = "Cont?", - .cmd_startswith = 1 + .cmd_startswith = true }, { .handler = handle_v_cont, .cmd = "Cont", - .cmd_startswith = 1, + .cmd_startswith = true, .allow_stop_reply = true, .schema = "s0" }, { .handler = handle_v_attach, .cmd = "Attach;", - .cmd_startswith = 1, + .cmd_startswith = true, .allow_stop_reply = true, .schema = "l0" }, { .handler = handle_v_kill, .cmd = "Kill;", - .cmd_startswith = 1 + .cmd_startswith = true }, #ifdef CONFIG_USER_ONLY /* @@ -1462,25 +1462,25 @@ static const GdbCmdParseEntry gdb_v_commands_table[] = { { .handler = gdb_handle_v_file_open, .cmd = "File:open:", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "s,L,L0" }, { .handler = gdb_handle_v_file_close, .cmd = "File:close:", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "l0" }, { .handler = gdb_handle_v_file_pread, .cmd = "File:pread:", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "l,L,L0" }, { .handler = gdb_handle_v_file_readlink, .cmd = "File:readlink:", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "s0" }, #endif @@ -1748,7 +1748,7 @@ static const GdbCmdParseEntry gdb_gen_query_set_common_table[] = { { .handler = handle_set_qemu_sstep, .cmd = "qemu.sstep=", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "l0" }, }; @@ -1804,7 +1804,7 @@ static const GdbCmdParseEntry gdb_gen_query_table[] = { { .handler = handle_query_thread_extra, .cmd = "ThreadExtraInfo,", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "t0" }, #ifdef CONFIG_USER_ONLY @@ -1816,14 +1816,14 @@ static const GdbCmdParseEntry gdb_gen_query_table[] = { { .handler = gdb_handle_query_rcmd, .cmd = "Rcmd,", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "s0" }, #endif { .handler = handle_query_supported, .cmd = "Supported:", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "s0" }, { @@ -1834,7 +1834,7 @@ static const GdbCmdParseEntry gdb_gen_query_table[] = { { .handler = handle_query_xfer_features, .cmd = "Xfer:features:read:", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "s:l,l0" }, #if defined(CONFIG_USER_ONLY) @@ -1842,27 +1842,27 @@ static const GdbCmdParseEntry gdb_gen_query_table[] = { { .handler = gdb_handle_query_xfer_auxv, .cmd = "Xfer:auxv:read::", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "l,l0" }, { .handler = gdb_handle_query_xfer_siginfo, .cmd = "Xfer:siginfo:read::", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "l,l0" }, #endif { .handler = gdb_handle_query_xfer_exec_file, .cmd = "Xfer:exec-file:read:", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "l:l,l0" }, #endif { .handler = gdb_handle_query_attached, .cmd = "Attached:", - .cmd_startswith = 1 + .cmd_startswith = true }, { .handler = gdb_handle_query_attached, @@ -1901,14 +1901,14 @@ static const GdbCmdParseEntry gdb_gen_set_table[] = { { .handler = handle_set_qemu_sstep, .cmd = "qemu.sstep:", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "l0" }, #ifndef CONFIG_USER_ONLY { .handler = gdb_handle_set_qemu_phy_mem_mode, .cmd = "qemu.PhyMemMode:", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "l0" }, #endif @@ -1916,7 +1916,7 @@ static const GdbCmdParseEntry gdb_gen_set_table[] = { { .handler = gdb_handle_set_catch_syscalls, .cmd = "CatchSyscalls:", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "s0", }, #endif @@ -2012,7 +2012,7 @@ static int gdb_handle_packet(const char *line_buf) static const GdbCmdParseEntry target_halted_cmd_desc = { .handler = handle_target_halt, .cmd = "?", - .cmd_startswith = 1, + .cmd_startswith = true, .allow_stop_reply = true, }; cmd_parser = &target_halted_cmd_desc; @@ -2023,7 +2023,7 @@ static int gdb_handle_packet(const char *line_buf) static const GdbCmdParseEntry continue_cmd_desc = { .handler = handle_continue, .cmd = "c", - .cmd_startswith = 1, + .cmd_startswith = true, .allow_stop_reply = true, .schema = "L0" }; @@ -2035,7 +2035,7 @@ static int gdb_handle_packet(const char *line_buf) static const GdbCmdParseEntry cont_with_sig_cmd_desc = { .handler = handle_cont_with_sig, .cmd = "C", - .cmd_startswith = 1, + .cmd_startswith = true, .allow_stop_reply = true, .schema = "l0" }; @@ -2047,7 +2047,7 @@ static int gdb_handle_packet(const char *line_buf) static const GdbCmdParseEntry v_cmd_desc = { .handler = handle_v_commands, .cmd = "v", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "s0" }; cmd_parser = &v_cmd_desc; @@ -2064,7 +2064,7 @@ static int gdb_handle_packet(const char *line_buf) static const GdbCmdParseEntry detach_cmd_desc = { .handler = handle_detach, .cmd = "D", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "?.l0" }; cmd_parser = &detach_cmd_desc; @@ -2075,7 +2075,7 @@ static int gdb_handle_packet(const char *line_buf) static const GdbCmdParseEntry step_cmd_desc = { .handler = handle_step, .cmd = "s", - .cmd_startswith = 1, + .cmd_startswith = true, .allow_stop_reply = true, .schema = "L0" }; @@ -2087,7 +2087,7 @@ static int gdb_handle_packet(const char *line_buf) static const GdbCmdParseEntry backward_cmd_desc = { .handler = handle_backward, .cmd = "b", - .cmd_startswith = 1, + .cmd_startswith = true, .allow_stop_reply = true, .schema = "o0" }; @@ -2099,7 +2099,7 @@ static int gdb_handle_packet(const char *line_buf) static const GdbCmdParseEntry file_io_cmd_desc = { .handler = gdb_handle_file_io, .cmd = "F", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "L,L,o0" }; cmd_parser = &file_io_cmd_desc; @@ -2110,7 +2110,7 @@ static int gdb_handle_packet(const char *line_buf) static const GdbCmdParseEntry read_all_regs_cmd_desc = { .handler = handle_read_all_regs, .cmd = "g", - .cmd_startswith = 1 + .cmd_startswith = true }; cmd_parser = &read_all_regs_cmd_desc; } @@ -2120,7 +2120,7 @@ static int gdb_handle_packet(const char *line_buf) static const GdbCmdParseEntry write_all_regs_cmd_desc = { .handler = handle_write_all_regs, .cmd = "G", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "s0" }; cmd_parser = &write_all_regs_cmd_desc; @@ -2131,7 +2131,7 @@ static int gdb_handle_packet(const char *line_buf) static const GdbCmdParseEntry read_mem_cmd_desc = { .handler = handle_read_mem, .cmd = "m", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "L,L0" }; cmd_parser = &read_mem_cmd_desc; @@ -2142,7 +2142,7 @@ static int gdb_handle_packet(const char *line_buf) static const GdbCmdParseEntry write_mem_cmd_desc = { .handler = handle_write_mem, .cmd = "M", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "L,L:s0" }; cmd_parser = &write_mem_cmd_desc; @@ -2153,7 +2153,7 @@ static int gdb_handle_packet(const char *line_buf) static const GdbCmdParseEntry get_reg_cmd_desc = { .handler = handle_get_reg, .cmd = "p", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "L0" }; cmd_parser = &get_reg_cmd_desc; @@ -2164,7 +2164,7 @@ static int gdb_handle_packet(const char *line_buf) static const GdbCmdParseEntry set_reg_cmd_desc = { .handler = handle_set_reg, .cmd = "P", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "L?s0" }; cmd_parser = &set_reg_cmd_desc; @@ -2175,7 +2175,7 @@ static int gdb_handle_packet(const char *line_buf) static const GdbCmdParseEntry insert_bp_cmd_desc = { .handler = handle_insert_bp, .cmd = "Z", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "l?L?L0" }; cmd_parser = &insert_bp_cmd_desc; @@ -2186,7 +2186,7 @@ static int gdb_handle_packet(const char *line_buf) static const GdbCmdParseEntry remove_bp_cmd_desc = { .handler = handle_remove_bp, .cmd = "z", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "l?L?L0" }; cmd_parser = &remove_bp_cmd_desc; @@ -2197,7 +2197,7 @@ static int gdb_handle_packet(const char *line_buf) static const GdbCmdParseEntry set_thread_cmd_desc = { .handler = handle_set_thread, .cmd = "H", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "o.t0" }; cmd_parser = &set_thread_cmd_desc; @@ -2208,7 +2208,7 @@ static int gdb_handle_packet(const char *line_buf) static const GdbCmdParseEntry thread_alive_cmd_desc = { .handler = handle_thread_alive, .cmd = "T", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "t0" }; cmd_parser = &thread_alive_cmd_desc; @@ -2219,7 +2219,7 @@ static int gdb_handle_packet(const char *line_buf) static const GdbCmdParseEntry gen_query_cmd_desc = { .handler = handle_gen_query, .cmd = "q", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "s0" }; cmd_parser = &gen_query_cmd_desc; @@ -2230,7 +2230,7 @@ static int gdb_handle_packet(const char *line_buf) static const GdbCmdParseEntry gen_set_cmd_desc = { .handler = handle_gen_set, .cmd = "Q", - .cmd_startswith = 1, + .cmd_startswith = true, .schema = "s0" }; cmd_parser = &gen_set_cmd_desc; From patchwork Fri Jul 5 15:30:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810425 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp1670095wru; Fri, 5 Jul 2024 08:39:03 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWtnSpUEb+YK09lsh7BW5SLv6g1MEUzQ1DzuXx1n8hteRVm1mhIOgJR5I7M6nkl/aEX/vlLC801QwMZMxcoPorD X-Google-Smtp-Source: AGHT+IHkRyHQWb5t3ZYc96OLBPEJUT7s6gDzZG1BktpA3DaPHjlOzNeDawMDDGMLdp3fK+PdN/u8 X-Received: by 2002:a05:6122:4d0b:b0:4f2:958f:650e with SMTP id 71dfb90a1353d-4f2f4024a63mr6390212e0c.16.1720193943260; Fri, 05 Jul 2024 08:39:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193943; cv=none; d=google.com; s=arc-20160816; b=k8la5cIj8GDSXq8/R+ZYArn8JnxImlJaEN5e5pyxDdoWjM8nRRwBgcSvWlCTC09bwI D7/Yau873Gee81+Yk2uuVUrsAjW1Uiuagmv7x9BFhtZydxLdylsIQgrp2Iw8gT+Tt4Hb IHptzCteLZu4psFnHW3sqQxWiz1MmPwa0ZYukl5reipTrXLjgzc4oBQdOPcZBIBC3Dq+ Cr8Wc1ebYWPf4tDRk9ge1DpQ5fSAyXni8kKrqk4YujUUMVtviPD27LauLgG2CI4mxn25 CfvaNR4f+MBhnfJICijTaWs8wHJjjVy1+U7yLjhQYbCl7fZTHZb8hC5TjB4xe+IHYqCI NH5A== 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=vYrylhe2JsQxot6hVERKE4QV3udfPLvHwktzufwCui8=; fh=BvqH8tkvUnke3KnN7HCRQGgZRKL+GBeGuLK7On+xxo8=; b=UknR+qzdwDhoHQdomlW8MXtTzea/+Y2pQDoSsKqp6Fmp0FxLlZiz1Mv/a9UqhWgqph ELuQuBsbB3CxzUpWwxqhCi0uG3U8E8oHk47TQ+JN1gqlcncpaTVi8FZllKZloGE7ItL7 lxgafRI+a1krLg1aC5tZkiDMf3QHEQ69QCNxqkg43AD9P3j39pxVhHDW70ZEVqwcfUGe 68nDRu903m0PodFvyx+f92I92Y7kvW87lJbfs6g1a8wBCyjzl+x9A10ztsJgk3MVjgpj aaMA6SbnbVG3RBxqe6RuoQb83GBmhvenIjPN5PwQTIhYKJtqH+rj08jsZVbg5jusrvEu iHOQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bnZjLGG+; 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 d75a77b69052e-446644d92bfsi155565591cf.724.2024.07.05.08.39.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:39:03 -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=bnZjLGG+; 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 1sPl0A-0002kZ-19; Fri, 05 Jul 2024 11:37:34 -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 1sPl00-0002dJ-Rz for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:24 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPkzy-0001In-Bm for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:37:24 -0400 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a77c0b42a8fso232957066b.1 for ; Fri, 05 Jul 2024 08:37:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193840; x=1720798640; 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=vYrylhe2JsQxot6hVERKE4QV3udfPLvHwktzufwCui8=; b=bnZjLGG+wV/BCFVLLqqkmn+pWcL0VXzOUXxMnRRj0lCzR5ySGb6ndbpl4XYQMdvUzD ubzC19NmJ+4jXn3w/SUfO5mQ/hzxHx6/eu6B/Naf7YyS1RkxpG14U18MTKf6lapexsIp Iiw6SOcrD062Z7fXPh0M75IEQa1eq0hBW8gDWjO4YiR1gr4QEeoazw+w61T/dWtu7fGV wlf6wSub8RxMbXrk55HK3TszaRUSsMORn67FyEWMVhVzEzDUa+4hbUyG82upjJ4sgGNO 1t4hzKEgjJB2iSMPGT6LegvjEhV7qoitKjixD09oqtij6cx1rTd7wHTJI42wfckk18Oq Qngg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193840; x=1720798640; 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=vYrylhe2JsQxot6hVERKE4QV3udfPLvHwktzufwCui8=; b=Jb18wcnrnTWfegjGAW+kOkX5oS8eZfTh7+1iIZ8nww+BqP0o3TnRY+hztsohgdGzxe uCtwsrec1kpQafrSYfh+rL13Nf/73/cyxVHHlm0B81XNFJa0MC91LFcjjtqYB4XBrvrn V38bNWl4KkIvN/T28JqtgBTCsisajwqhU9jwloXJ3D5IKV4Iz5vrk2g6gAuO+WMiTJTb i7Edq5ZFiwa20qB+mMXKs9JvC91Qqp6zJ+0AKqzpaRKwjyFAs+1XkM+ad67pTXTgwvR1 E/WDcIr+QoNKlrrKPZDqD1lwuK0MIBkbQswER6myU2JSwHGt7wQdLrAwGucesd/qvX+J VlHA== X-Gm-Message-State: AOJu0YwBptojONHKpgULmbZ7B8noh8ALdrvcwQdW+k5g/cEUNXeajWfw tWpfTtOZFR4gkNJT3vtdpzdEGNomYHiHU04TYcvGwxLoZzFDOvAKSOzi8mAWcmxAbsdI/84CQZL t X-Received: by 2002:a17:906:f801:b0:a75:7a8:d70c with SMTP id a640c23a62f3a-a77bd99b7b2mr364133266b.4.1720193840043; Fri, 05 Jul 2024 08:37:20 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a77cbb3ef7asm68371266b.74.2024.07.05.08.37.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:37:14 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id BE5A0621AC; Fri, 5 Jul 2024 16:30:56 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Gustavo Romero , =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 39/40] gdbstub: Add support for MTE in user mode Date: Fri, 5 Jul 2024 16:30:51 +0100 Message-Id: <20240705153052.1219696-40-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x635.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: Gustavo Romero This commit implements the stubs to handle the qIsAddressTagged, qMemTag, and QMemTag GDB packets, allowing all GDB 'memory-tag' subcommands to work with QEMU gdbstub on aarch64 user mode. It also implements the get/set functions for the special GDB MTE register 'tag_ctl', used to control the MTE fault type at runtime. Signed-off-by: Gustavo Romero Message-Id: <20240628050850.536447-11-gustavo.romero@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-40-alex.bennee@linaro.org> diff --git a/configs/targets/aarch64-linux-user.mak b/configs/targets/aarch64-linux-user.mak index ba8bc5fe3f..8f0ed21d76 100644 --- a/configs/targets/aarch64-linux-user.mak +++ b/configs/targets/aarch64-linux-user.mak @@ -1,6 +1,6 @@ TARGET_ARCH=aarch64 TARGET_BASE_ARCH=arm -TARGET_XML_FILES= gdb-xml/aarch64-core.xml gdb-xml/aarch64-fpu.xml gdb-xml/aarch64-pauth.xml +TARGET_XML_FILES= gdb-xml/aarch64-core.xml gdb-xml/aarch64-fpu.xml gdb-xml/aarch64-pauth.xml gdb-xml/aarch64-mte.xml TARGET_HAS_BFLT=y CONFIG_SEMIHOSTING=y CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y diff --git a/target/arm/internals.h b/target/arm/internals.h index 11b5da2562..e1aa1a63b9 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -358,6 +358,10 @@ void init_cpreg_list(ARMCPU *cpu); void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu); void arm_translate_init(void); +void arm_cpu_register_gdb_commands(ARMCPU *cpu); +void aarch64_cpu_register_gdb_commands(ARMCPU *cpu, GString *, GArray *, + GArray *); + void arm_restore_state_to_opc(CPUState *cs, const TranslationBlock *tb, const uint64_t *data); @@ -1640,6 +1644,8 @@ int aarch64_gdb_get_fpu_reg(CPUState *cs, GByteArray *buf, int reg); int aarch64_gdb_set_fpu_reg(CPUState *cs, uint8_t *buf, int reg); int aarch64_gdb_get_pauth_reg(CPUState *cs, GByteArray *buf, int reg); int aarch64_gdb_set_pauth_reg(CPUState *cs, uint8_t *buf, int reg); +int aarch64_gdb_get_tag_ctl_reg(CPUState *cs, GByteArray *buf, int reg); +int aarch64_gdb_set_tag_ctl_reg(CPUState *cs, uint8_t *buf, int reg); void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp); void arm_cpu_sme_finalize(ARMCPU *cpu, Error **errp); void arm_cpu_pauth_finalize(ARMCPU *cpu, Error **errp); diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 35fa281f1b..14d4eca127 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -2518,6 +2518,7 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp) register_cp_regs_for_features(cpu); arm_cpu_register_gdb_regs_for_features(cpu); + arm_cpu_register_gdb_commands(cpu); init_cpreg_list(cpu); diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c index a3bb73cfa7..c3a9b5eb1e 100644 --- a/target/arm/gdbstub.c +++ b/target/arm/gdbstub.c @@ -21,6 +21,7 @@ #include "cpu.h" #include "exec/gdbstub.h" #include "gdbstub/helpers.h" +#include "gdbstub/commands.h" #include "sysemu/tcg.h" #include "internals.h" #include "cpu-features.h" @@ -474,6 +475,41 @@ static GDBFeature *arm_gen_dynamic_m_secextreg_feature(CPUState *cs, #endif #endif /* CONFIG_TCG */ +void arm_cpu_register_gdb_commands(ARMCPU *cpu) +{ + GArray *query_table = + g_array_new(FALSE, FALSE, sizeof(GdbCmdParseEntry)); + GArray *set_table = + g_array_new(FALSE, FALSE, sizeof(GdbCmdParseEntry)); + GString *qsupported_features = g_string_new(NULL); + + if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) { + #ifdef TARGET_AARCH64 + aarch64_cpu_register_gdb_commands(cpu, qsupported_features, query_table, + set_table); + #endif + } + + /* Set arch-specific handlers for 'q' commands. */ + if (query_table->len) { + gdb_extend_query_table(&g_array_index(query_table, + GdbCmdParseEntry, 0), + query_table->len); + } + + /* Set arch-specific handlers for 'Q' commands. */ + if (set_table->len) { + gdb_extend_set_table(&g_array_index(set_table, + GdbCmdParseEntry, 0), + set_table->len); + } + + /* Set arch-specific qSupported feature. */ + if (qsupported_features->len) { + gdb_extend_qsupported_features(qsupported_features->str); + } +} + void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu) { CPUState *cs = CPU(cpu); @@ -507,6 +543,16 @@ void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu) gdb_find_static_feature("aarch64-pauth.xml"), 0); } + +#ifdef CONFIG_USER_ONLY + /* Memory Tagging Extension (MTE) 'tag_ctl' pseudo-register. */ + if (cpu_isar_feature(aa64_mte, cpu)) { + gdb_register_coprocessor(cs, aarch64_gdb_get_tag_ctl_reg, + aarch64_gdb_set_tag_ctl_reg, + gdb_find_static_feature("aarch64-mte.xml"), + 0); + } +#endif #endif } else { if (arm_feature(env, ARM_FEATURE_NEON)) { diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c index caa31ff3fa..2e2bc2700b 100644 --- a/target/arm/gdbstub64.c +++ b/target/arm/gdbstub64.c @@ -21,6 +21,12 @@ #include "cpu.h" #include "internals.h" #include "gdbstub/helpers.h" +#include "gdbstub/commands.h" +#include "tcg/mte_helper.h" +#if defined(CONFIG_USER_ONLY) && defined(CONFIG_LINUX) +#include +#include "mte_user_helper.h" +#endif int aarch64_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n) { @@ -381,3 +387,220 @@ GDBFeature *arm_gen_dynamic_svereg_feature(CPUState *cs, int base_reg) return &cpu->dyn_svereg_feature.desc; } + +#ifdef CONFIG_USER_ONLY +int aarch64_gdb_get_tag_ctl_reg(CPUState *cs, GByteArray *buf, int reg) +{ + ARMCPU *cpu = ARM_CPU(cs); + CPUARMState *env = &cpu->env; + uint64_t tcf0; + + assert(reg == 0); + + tcf0 = extract64(env->cp15.sctlr_el[1], 38, 2); + + return gdb_get_reg64(buf, tcf0); +} + +int aarch64_gdb_set_tag_ctl_reg(CPUState *cs, uint8_t *buf, int reg) +{ + ARMCPU *cpu = ARM_CPU(cs); + CPUARMState *env = &cpu->env; + + uint8_t tcf; + + assert(reg == 0); + + tcf = *buf << PR_MTE_TCF_SHIFT; + + if (!tcf) { + return 0; + } + + /* + * 'tag_ctl' register is actually a "pseudo-register" provided by GDB to + * expose options regarding the type of MTE fault that can be controlled at + * runtime. + */ + arm_set_mte_tcf0(env, tcf); + + return 1; +} + +static void handle_q_memtag(GArray *params, void *user_ctx) +{ + ARMCPU *cpu = ARM_CPU(user_ctx); + CPUARMState *env = &cpu->env; + + uint64_t addr = gdb_get_cmd_param(params, 0)->val_ull; + uint64_t len = gdb_get_cmd_param(params, 1)->val_ul; + int type = gdb_get_cmd_param(params, 2)->val_ul; + + uint8_t *tags; + uint8_t addr_tag; + + g_autoptr(GString) str_buf = g_string_new(NULL); + + /* + * GDB does not query multiple tags for a memory range on remote targets, so + * that's not supported either by gdbstub. + */ + if (len != 1) { + gdb_put_packet("E02"); + } + + /* GDB never queries a tag different from an allocation tag (type 1). */ + if (type != 1) { + gdb_put_packet("E03"); + } + + /* Note that tags are packed here (2 tags packed in one byte). */ + tags = allocation_tag_mem_probe(env, 0, addr, MMU_DATA_LOAD, 8 /* 64-bit */, + MMU_DATA_LOAD, true, 0); + if (!tags) { + /* Address is not in a tagged region. */ + gdb_put_packet("E04"); + return; + } + + /* Unpack tag from byte. */ + addr_tag = load_tag1(addr, tags); + g_string_printf(str_buf, "m%.2x", addr_tag); + + gdb_put_packet(str_buf->str); +} + +static void handle_q_isaddresstagged(GArray *params, void *user_ctx) +{ + ARMCPU *cpu = ARM_CPU(user_ctx); + CPUARMState *env = &cpu->env; + + uint64_t addr = gdb_get_cmd_param(params, 0)->val_ull; + + uint8_t *tags; + const char *reply; + + tags = allocation_tag_mem_probe(env, 0, addr, MMU_DATA_LOAD, 8 /* 64-bit */, + MMU_DATA_LOAD, true, 0); + reply = tags ? "01" : "00"; + + gdb_put_packet(reply); +} + +static void handle_Q_memtag(GArray *params, void *user_ctx) +{ + ARMCPU *cpu = ARM_CPU(user_ctx); + CPUARMState *env = &cpu->env; + + uint64_t start_addr = gdb_get_cmd_param(params, 0)->val_ull; + uint64_t len = gdb_get_cmd_param(params, 1)->val_ul; + int type = gdb_get_cmd_param(params, 2)->val_ul; + char const *new_tags_str = gdb_get_cmd_param(params, 3)->data; + + uint64_t end_addr; + + int num_new_tags; + uint8_t *tags; + + g_autoptr(GByteArray) new_tags = g_byte_array_new(); + + /* + * Only the allocation tag (i.e. type 1) can be set at the stub side. + */ + if (type != 1) { + gdb_put_packet("E02"); + return; + } + + end_addr = start_addr + (len - 1); /* 'len' is always >= 1 */ + /* Check if request's memory range does not cross page boundaries. */ + if ((start_addr ^ end_addr) & TARGET_PAGE_MASK) { + gdb_put_packet("E03"); + return; + } + + /* + * Get all tags in the page starting from the tag of the start address. + * Note that there are two tags packed into a single byte here. + */ + tags = allocation_tag_mem_probe(env, 0, start_addr, MMU_DATA_STORE, + 8 /* 64-bit */, MMU_DATA_STORE, true, 0); + if (!tags) { + /* Address is not in a tagged region. */ + gdb_put_packet("E04"); + return; + } + + /* Convert tags provided by GDB, 2 hex digits per tag. */ + num_new_tags = strlen(new_tags_str) / 2; + gdb_hextomem(new_tags, new_tags_str, num_new_tags); + + uint64_t address = start_addr; + int new_tag_index = 0; + while (address <= end_addr) { + uint8_t new_tag; + int packed_index; + + /* + * Find packed tag index from unpacked tag index. There are two tags + * in one packed index (one tag per nibble). + */ + packed_index = new_tag_index / 2; + + new_tag = new_tags->data[new_tag_index % num_new_tags]; + store_tag1(address, tags + packed_index, new_tag); + + address += TAG_GRANULE; + new_tag_index++; + } + + gdb_put_packet("OK"); +} + +enum Command { + qMemTags, + qIsAddressTagged, + QMemTags, + NUM_CMDS +}; + +static GdbCmdParseEntry cmd_handler_table[NUM_CMDS] = { + [qMemTags] = { + .handler = handle_q_memtag, + .cmd_startswith = true, + .cmd = "MemTags:", + .schema = "L,l:l0", + .need_cpu_context = true + }, + [qIsAddressTagged] = { + .handler = handle_q_isaddresstagged, + .cmd_startswith = true, + .cmd = "IsAddressTagged:", + .schema = "L0", + .need_cpu_context = true + }, + [QMemTags] = { + .handler = handle_Q_memtag, + .cmd_startswith = true, + .cmd = "MemTags:", + .schema = "L,l:l:s0", + .need_cpu_context = true + }, +}; +#endif /* CONFIG_USER_ONLY */ + +void aarch64_cpu_register_gdb_commands(ARMCPU *cpu, GString *qsupported, + GArray *qtable, GArray *stable) +{ +#ifdef CONFIG_USER_ONLY + /* MTE */ + if (cpu_isar_feature(aa64_mte, cpu)) { + g_string_append(qsupported, ";memory-tagging+"); + + g_array_append_val(qtable, cmd_handler_table[qMemTags]); + g_array_append_val(qtable, cmd_handler_table[qIsAddressTagged]); + + g_array_append_val(stable, cmd_handler_table[QMemTags]); + } +#endif +} diff --git a/gdb-xml/aarch64-mte.xml b/gdb-xml/aarch64-mte.xml new file mode 100644 index 0000000000..4b70b4f17a --- /dev/null +++ b/gdb-xml/aarch64-mte.xml @@ -0,0 +1,11 @@ + + + + + + + From patchwork Fri Jul 5 15:30:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810413 Delivered-To: patch@linaro.org Received: by 2002:ab3:6bc5:0:b0:273:6c53:9181 with SMTP id v5csp525322ltk; Fri, 5 Jul 2024 08:35:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXWOtFC1R5lC+AnK7yObH/Fuv0JVN/U2rZGCvfdWsaSNlyplJyybiBLt0f5kcYZU4pQVE1Lq+R/YQH+bJut00I3 X-Google-Smtp-Source: AGHT+IE4toSj3bzrr/PwBHJOg9d+2ujbqog0b9/s6EUyl3cBpYGtmMlZ+H/VjvdDZXqnIUw4dDll X-Received: by 2002:a05:6214:234e:b0:6b5:4e07:2a59 with SMTP id 6a1803df08f44-6b5ecfb5709mr59363616d6.9.1720193707999; Fri, 05 Jul 2024 08:35:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720193707; cv=none; d=google.com; s=arc-20160816; b=cETO5BOBu1rwC6mDeD6nDAh21uEvUeZucpn/W0AM6xTibfOemwlMVlIzYLIpDNagjI hp/ooucKPRw+iIFnfJcW5BlBV529321NnRQPo9c6rdqNOdrRT8nbroZr5iAHIz/Xz8qO 0aOWYIornlRSaT06qvCbNM4eSnLjNfUqr7RBZvfBnpU8yaFImFRyPRnxonhR+26pXl9m tciHonvYNdUWSdou9pBSS/aT4MlXf316xTIf9PxeczLdO9wja/3g7x7ccxl64IJ1iAY9 HOAiqLKV1TJ4nu+uZ+dDJNCpReXkSINofkuzClvXooAW5wIf7FeS5AGzG7Kph+wmw/jr Cojw== 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=Sv3Yug9NCQNk3EkRMmpkOBVsrQGJofWxvPFSJFd8Ubw=; fh=o+EvzwQbrAYBWzH9Tvato/dU9jd8yIvBYxjsNNxa6cI=; b=rHVkaCV2fEMCBEJ+Gz9l9HpEAJG7vAgfqIxQOvbV841t2tdXkg1Qw+KG90c5zOKFOR nub/BxkZAUoTh+GXZI4DHvjPLf9II2PathkgupjGHTpaQIAes9lfgkHeVPApCkNZRFvg /PrGLf/U/3v/UM7xS9SyK4VJeJ6RuB7UTKzhVKFqWPNPPZtCUasGHBKHngtrkeI4wI9D QwvSZUV2v7qbfuvvF2uqXNjvFa6Cq/Fqdg/yxgLQvGTb0d8oxryAAfDPv4+nJmeJseSV otXb2EScZIkMHKQDGY/asgJ+NfCEmE7lJm5kVM/evkkuG380YOXl+NkEPgYwWB877lUH HkKg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="GpVHWtY/"; 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 6a1803df08f44-6b5e80d6a09si48373146d6.90.2024.07.05.08.35.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 08:35:07 -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="GpVHWtY/"; 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 1sPku6-0005md-It; Fri, 05 Jul 2024 11:31:18 -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 1sPku4-0005kx-MW for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:16 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPkty-0000SX-Ap for qemu-devel@nongnu.org; Fri, 05 Jul 2024 11:31:16 -0400 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a7523f0870cso210570566b.3 for ; Fri, 05 Jul 2024 08:31:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720193469; x=1720798269; 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=Sv3Yug9NCQNk3EkRMmpkOBVsrQGJofWxvPFSJFd8Ubw=; b=GpVHWtY/10JPTQqo9fc5W80L2MzD5OWZGs/FeGydDNco5tw07T7Jq1OABijjp313g9 G645+jOJSpqNt5g7Oqx++mr40XEV7fuA8lFZohH0cmecqAP56iixmkzFfIL81zpJRo2R cyt75vKuqwJiPwepZQb+Cf8sra9S6TqQabTQytkyWKCxhM0KBwcLnmsmWbY5oSeE47Bm UEjHMAGomZbMi94iK8Ya2yOGo/in03yUeLON8vhZopefHDc74KYh7cmcqRNt5VFjXiig LAmJ240fdAnPbfMBA9dV7LpfV6lppUZw2GJGxFu/OTIFdXLTtiVun8pSL9qFEnIKlc0i 72JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720193469; x=1720798269; 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=Sv3Yug9NCQNk3EkRMmpkOBVsrQGJofWxvPFSJFd8Ubw=; b=bHjmz/AWym2T1F0vV/EyC1y2ubBq3p/eX3pKNn7MF5JYAPDvjkpecxUTiKLX+zYGMQ p2FSwIePVzT4E+8QyHhy61YDcyE0otbn2s9VYs1ySwqidHyBJLEwbK6CbpZQ6pgqezxH tFpJEsHAPMYq1Ae/1DlSNOWU3EUjur1JfNsYJJ/3+NMGm9slx+2zcZBel4Ntz3Ml+IMO 0eXGQu/YKPO5XfNNnnvhZboEpCFqg70GRGbEhok0qkWDdPiDNRwQTxc7669b6HmzU1Dl wfDcmih1MUZ1Yc6iQfhpWnxi8Ym3q/fg/2Fp3Xrw66TOOCl8K5mikwGWa3gS3nxIB7mf lOeQ== X-Gm-Message-State: AOJu0Yxkx/F+z8/P6b1I6GZKQXp8yU9JZ/W0aeYRsdg6Nnl5uxYvryMn fr8TtsTjf3KYoj3HUqtZ2wd021pRzMN/JCcG91f1xbUgngWn/zasYFiTe9hlRGA= X-Received: by 2002:a17:906:19c4:b0:a6f:33d6:2d45 with SMTP id a640c23a62f3a-a77ba708411mr273219266b.60.1720193468515; Fri, 05 Jul 2024 08:31:08 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a72ae5ac5b8sm683287966b.14.2024.07.05.08.31.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 08:31:06 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id DAE6C621B4; Fri, 5 Jul 2024 16:30:56 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Gustavo Romero , =?utf-8?q?Alex_Benn=C3=A9e?= , Paolo Bonzini , Thomas Huth , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 40/40] tests/tcg/aarch64: Add MTE gdbstub tests Date: Fri, 5 Jul 2024 16:30:52 +0100 Message-Id: <20240705153052.1219696-41-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705153052.1219696-1-alex.bennee@linaro.org> References: <20240705153052.1219696-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62b.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: Gustavo Romero Add tests to exercise the MTE stubs. The tests will only run if a version of GDB that supports MTE is available in the test environment. Signed-off-by: Gustavo Romero [AJB: re-base and checkpatch fixes] Message-Id: <20240628050850.536447-12-gustavo.romero@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240705084047.857176-41-alex.bennee@linaro.org> diff --git a/configure b/configure index 8b6a2f16ce..019fcbd0ef 100755 --- a/configure +++ b/configure @@ -1673,6 +1673,10 @@ for target in $target_list; do echo "GDB=$gdb_bin" >> $config_target_mak fi + if test "${arch}" = "aarch64" && version_ge ${gdb_version##* } 15.0; then + echo "GDB_HAS_MTE=y" >> $config_target_mak + fi + echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> Makefile.prereqs tcg_tests_targets="$tcg_tests_targets $target" fi diff --git a/tests/tcg/aarch64/mte-8.c b/tests/tcg/aarch64/mte-8.c new file mode 100644 index 0000000000..808135ba43 --- /dev/null +++ b/tests/tcg/aarch64/mte-8.c @@ -0,0 +1,99 @@ +/* + * To be compiled with -march=armv8.5-a+memtag + * + * This test is adapted from a Linux test. Please see: + * + * https://www.kernel.org/doc/html/next/arch/arm64/memory-tagging-extension.html#example-of-correct-usage + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +/* + * From arch/arm64/include/uapi/asm/hwcap.h + */ +#define HWCAP2_MTE (1 << 18) + +/* + * From arch/arm64/include/uapi/asm/mman.h + */ +#define PROT_MTE 0x20 + +/* + * Insert a random logical tag into the given pointer. + */ +#define insert_random_tag(ptr) ({ \ + uint64_t __val; \ + asm("irg %0, %1" : "=r" (__val) : "r" (ptr)); \ + __val; \ +}) + +/* + * Set the allocation tag on the destination address. + */ +#define set_tag(tagged_addr) do { \ + asm volatile("stg %0, [%0]" : : "r" (tagged_addr) : "memory"); \ +} while (0) + + +int main(int argc, char *argv[]) +{ + unsigned char *a; + unsigned long page_sz = sysconf(_SC_PAGESIZE); + unsigned long hwcap2 = getauxval(AT_HWCAP2); + + /* check if MTE is present */ + if (!(hwcap2 & HWCAP2_MTE)) { + return EXIT_FAILURE; + } + + /* + * Enable the tagged address ABI, synchronous or asynchronous MTE + * tag check faults (based on per-CPU preference) and allow all + * non-zero tags in the randomly generated set. + */ + if (prctl(PR_SET_TAGGED_ADDR_CTRL, + PR_TAGGED_ADDR_ENABLE | PR_MTE_TCF_SYNC | PR_MTE_TCF_ASYNC | + (0xfffe << PR_MTE_TAG_SHIFT), + 0, 0, 0)) { + perror("prctl() failed"); + return EXIT_FAILURE; + } + + a = mmap(0, page_sz, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + if (a == MAP_FAILED) { + perror("mmap() failed"); + return EXIT_FAILURE; + } + + printf("a[] address is %p\n", a); + + /* + * Enable MTE on the above anonymous mmap. The flag could be passed + * directly to mmap() and skip this step. + */ + if (mprotect(a, page_sz, PROT_READ | PROT_WRITE | PROT_MTE)) { + perror("mprotect() failed"); + return EXIT_FAILURE; + } + + /* access with the default tag (0) */ + a[0] = 1; + a[1] = 2; + + printf("a[0] = %hhu a[1] = %hhu\n", a[0], a[1]); + + /* set the logical and allocation tags */ + a = (unsigned char *)insert_random_tag(a); + set_tag(a); + + printf("%p\n", a); + + return 0; +} diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target index ad1774c2ce..b53218e115 100644 --- a/tests/tcg/aarch64/Makefile.target +++ b/tests/tcg/aarch64/Makefile.target @@ -64,7 +64,7 @@ AARCH64_TESTS += bti-2 # MTE Tests ifneq ($(CROSS_CC_HAS_ARMV8_MTE),) -AARCH64_TESTS += mte-1 mte-2 mte-3 mte-4 mte-5 mte-6 mte-7 +AARCH64_TESTS += mte-1 mte-2 mte-3 mte-4 mte-5 mte-6 mte-7 mte-8 mte-%: CFLAGS += $(CROSS_CC_HAS_ARMV8_MTE) endif @@ -131,6 +131,18 @@ run-gdbstub-sve-ioctls: sve-ioctls basic gdbstub SVE ZLEN support) EXTRA_RUNS += run-gdbstub-sysregs run-gdbstub-sve-ioctls + +ifeq ($(GDB_HAS_MTE),y) +run-gdbstub-mte: mte-8 + $(call run-test, $@, $(GDB_SCRIPT) \ + --gdb $(GDB) \ + --qemu $(QEMU) --qargs "$(QEMU_OPTS)" \ + --bin $< --test $(AARCH64_SRC)/gdbstub/test-mte.py, \ + gdbstub MTE support) + +EXTRA_RUNS += run-gdbstub-mte +endif + endif endif diff --git a/tests/tcg/aarch64/gdbstub/test-mte.py b/tests/tcg/aarch64/gdbstub/test-mte.py new file mode 100644 index 0000000000..2db0663c1a --- /dev/null +++ b/tests/tcg/aarch64/gdbstub/test-mte.py @@ -0,0 +1,86 @@ +from __future__ import print_function +# +# Test GDB memory-tag commands that exercise the stubs for the qIsAddressTagged, +# qMemTag, and QMemTag packets. Logical tag-only commands rely on local +# operations, hence don't exercise any stub. +# +# The test consists in breaking just after a atag() call (which sets the +# allocation tag -- see mte-8.c for details) and setting/getting tags in +# different memory locations and ranges starting at the address of the array +# 'a'. +# +# This is launched via tests/guest-debug/run-test.py +# + + +import gdb +import re +from test_gdbstub import main, report + + +PATTERN_0 = "Memory tags for address 0x[0-9a-f]+ match \(0x[0-9a-f]+\)." +PATTERN_1 = ".*(0x[0-9a-f]+)" + + +def run_test(): + gdb.execute("break 95", False, True) + gdb.execute("continue", False, True) + try: + # Test if we can check correctly that the allocation tag for + # array 'a' matches the logical tag after atag() is called. + co = gdb.execute("memory-tag check a", False, True) + tags_match = re.findall(PATTERN_0, co, re.MULTILINE) + if tags_match: + report(True, f"{tags_match[0]}") + else: + report(False, "Logical and allocation tags don't match!") + + # Test allocation tag 'set and print' commands. Commands on logical + # tags rely on local operation and so don't exercise any stub. + + # Set the allocation tag for the first granule (16 bytes) of + # address starting at 'a' address to a known value, i.e. 0x04. + gdb.execute("memory-tag set-allocation-tag a 1 04", False, True) + + # Then set the allocation tag for the second granule to a known + # value, i.e. 0x06. This tests that contiguous tag granules are + # set correct and don't run over each other. + gdb.execute("memory-tag set-allocation-tag a+16 1 06", False, True) + + # Read the known values back and check if they remain the same. + + co = gdb.execute("memory-tag print-allocation-tag a", False, True) + first_tag = re.match(PATTERN_1, co)[1] + + co = gdb.execute("memory-tag print-allocation-tag a+16", False, True) + second_tag = re.match(PATTERN_1, co)[1] + + if first_tag == "0x4" and second_tag == "0x6": + report(True, "Allocation tags are correctly set/printed.") + else: + report(False, "Can't set/print allocation tags!") + + # Now test fill pattern by setting a whole page with a pattern. + gdb.execute("memory-tag set-allocation-tag a 4096 0a0b", False, True) + + # And read back the tags of the last two granules in page so + # we also test if the pattern is set correctly up to the end of + # the page. + co = gdb.execute("memory-tag print-allocation-tag a+4096-32", False, True) + tag = re.match(PATTERN_1, co)[1] + + co = gdb.execute("memory-tag print-allocation-tag a+4096-16", False, True) + last_tag = re.match(PATTERN_1, co)[1] + + if tag == "0xa" and last_tag == "0xb": + report(True, "Fill pattern is ok.") + else: + report(False, "Fill pattern failed!") + + except gdb.error: + # This usually happens because a GDB version that does not + # support memory tagging was used to run the test. + report(False, "'memory-tag' command failed!") + + +main(run_test, expected_arch="aarch64")