From patchwork Mon Mar 29 11:03:03 2021 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: 410830 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3524934jai; Mon, 29 Mar 2021 04:09:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIXqUrBLrozK/tNtyrKSqHBoYZNGww3RbGo5Jp/ZSzfZS/BV4UQronyr20unM4C1F+gW4V X-Received: by 2002:a02:53:: with SMTP id 80mr23251763jaa.96.1617016151631; Mon, 29 Mar 2021 04:09:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617016151; cv=none; d=google.com; s=arc-20160816; b=ZxrTgr6uBYVTCXVfF0lnxN4OSyk1Nh+F80CVRCjLapXo3GdeCig6WaEkaglNCgJnVL l/t41+Af7pHGM/u3SmpV/XP7R4gzXXL3nmpnAb/i9L7s9DDHRpHgCEVApyrxKfDtB0Pi uxygXSoRVEIvz94BLCcKQIXUeoY0S0eoq+shemrwvDdVGgJYhpdkH8BmZQf3vYxWqq6C zKNkiaH+n1Rzg7OqR30FAtYWP6XniEYrIe3S0zCAWEgvP97FxiqyKE0Vn4sSeezfOIrJ 9OdNoBWwYZQHfO5RUGP2TtGJ0OkvMRy6uOzSFCaf1PyQffCfilG0VA4x5zrPEM1l7oVF KJDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=BTPxFERU7JNP+dRRV3lyj7Z5hAmDZqNFOETfABGGYiA=; b=birud7KMazTXGcT60/xyD+ary799OeLslrcd14hjQ1KO2d+y21AEALAP4BNpROPEYt doSQqC0F/kGQ2uEXpXmjokilp3KyOsPIiqgcSZ3unglg+QoNBsa8kjdiFQ7FK1F3yueG kQwZGYd86XdSfYguIYHTyg4T74kmTcvEERi17fUIGGGj/k9HCsJcc+bRDYSKHo3jw8jI XqpBM9IHZgtlNeuHYKvxdCzpUJpWPG0wRiJdNZYZHc/Ujp3BQakPzE0KL23h4r1PxcSg NAqTEwqikxqWVbYjmgyH73bj+fRUSrqg2X2mxRe3NmeuoCNj2fQl4y1wwH/l2Fd3uzaj 7ijQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=T+4Cnz8c; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w12si12598644ilg.43.2021.03.29.04.09.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Mar 2021 04:09:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=T+4Cnz8c; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQplf-0005aI-4U for patch@linaro.org; Mon, 29 Mar 2021 07:09:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45328) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQpfv-0000Ga-VO for qemu-devel@nongnu.org; Mon, 29 Mar 2021 07:03:15 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:39844) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQpfu-0004jl-9y for qemu-devel@nongnu.org; Mon, 29 Mar 2021 07:03:15 -0400 Received: by mail-wr1-x436.google.com with SMTP id e18so12400449wrt.6 for ; Mon, 29 Mar 2021 04:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BTPxFERU7JNP+dRRV3lyj7Z5hAmDZqNFOETfABGGYiA=; b=T+4Cnz8cTi8a/W5kriEn/jvoMXL3wa9aVK55x5JiDxm7bxLSaKDHDpGLMB2H86jIaZ 4puNlKbZl6wkxJ2P09sk2o6O1xQk4MZ0EOWludd92zyPc3hTQIZjvHJefOLBB0NtX4sj gAHkf9cFoRjShO0BvWubE8KzWw5NkomUe/tcsUZgy8MWjyZk83jed+2aRm/9wGjR+x4L 7OZeLzIiyxcZKeW8OeLPJ7oIXqLufMx+zyC8VyC5Dz0zJG79ZixTMBaDQz7oOIDegFbH tbUPOltl9ocdo8YNQRy8W0Vy+/Fi77hLr8bp/T8oxS0JSuxAoZlk0ECZXnVcNlXaL7NI +gow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BTPxFERU7JNP+dRRV3lyj7Z5hAmDZqNFOETfABGGYiA=; b=l70fUwiy3aNSC96xyg80Bnd0WY08GbzmCgl9TBXWATTGl4A1Iu5DJluTV8vMrlL7dY Qj2/UCX8ZS0SX6jUyH9K8Bz6L7KkbMW4gdvHyz8/cN33ka5oIvm/OEhCVrXsyJosPuit t6Ih5jEbmL7sZbXVAUW+VDPZyVETOzgzsTEPOoa91VVJ2GOG4x29kqG9Lju+vU/gjZNR s/VLrdqpZyqeGsOXdR+uxIA/QW8O5bh+d9XIg7C6SJzFCHR3NnURAivTQjXpS8oo77k9 /Gjs3Fjw8rzsJ2F7KQaI4k5IJYZ+H7AClA6JDwyniMWtInFtzOYCUfKtMogaK9NvD9pX mlGA== X-Gm-Message-State: AOAM53281/4odag6LNyD4boKhcHluvf9zsUp1eByddny+gaz7LLIME2r nlXSPG9aflPCyHyEaHCB8xfjIJlLG1Fmvzex X-Received: by 2002:adf:e68e:: with SMTP id r14mr27608041wrm.273.1617015792968; Mon, 29 Mar 2021 04:03:12 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a15sm19297187wrr.53.2021.03.29.04.03.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Mar 2021 04:03:10 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0136C1FF92; Mon, 29 Mar 2021 12:03:04 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 6/6] tests/i386/test-i386: try and correct constrain 16 bit call (WIP) Date: Mon, 29 Mar 2021 12:03:03 +0100 Message-Id: <20210329110303.15235-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210329110303.15235-1-alex.bennee@linaro.org> References: <20210329110303.15235-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x436.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9e?= , Eduardo Habkost Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Newer compilers complain about non-matching constraints: test-i386.c:1393:5: error: asm operand 2 probably doesn’t match constraints [-Werror] 1393 | asm volatile ("lcall %1, %2" | ^~~ It seems the plain "i" immediate constraint is a little too lax here. What we are actually dealing with is a 32 bit offset into a particular segment. I think that is "Ts" (Address operand without segment register). [AJB: however this just seems to push it a bit further down the road: test-i386.c:1393: Error: operand type mismatch for `lcall' Inline ASM constraints are hard :-/] Signed-off-by: Alex Bennée --- tests/tcg/i386/test-i386.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.20.1 diff --git a/tests/tcg/i386/test-i386.c b/tests/tcg/i386/test-i386.c index 18d5609665..6d8aeccfb5 100644 --- a/tests/tcg/i386/test-i386.c +++ b/tests/tcg/i386/test-i386.c @@ -1392,15 +1392,15 @@ void test_code16(void) /* call the first function */ asm volatile ("lcall %1, %2" : "=a" (res) - : "i" (MK_SEL(1)), "i" (&code16_func1): "memory", "cc"); + : "i" (MK_SEL(1)), "Ts" (&code16_func1): "memory", "cc"); printf("func1() = 0x%08x\n", res); asm volatile ("lcall %2, %3" : "=a" (res), "=c" (res2) - : "i" (MK_SEL(1)), "i" (&code16_func2): "memory", "cc"); + : "i" (MK_SEL(1)), "Ts" (&code16_func2): "memory", "cc"); printf("func2() = 0x%08x spdec=%d\n", res, res2); asm volatile ("lcall %1, %2" : "=a" (res) - : "i" (MK_SEL(1)), "i" (&code16_func3): "memory", "cc"); + : "i" (MK_SEL(1)), "Ts" (&code16_func3): "memory", "cc"); printf("func3() = 0x%08x\n", res); } #endif